23 #include <l4/re/event_enums.h> 24 #include <l4/re/event> 25 #include <l4/re/event-sys.h> 26 #include <l4/re/util/icu_svr> 27 #include <l4/cxx/minmax> 29 #include <l4/sys/cxx/ipc_legacy> 31 namespace L4Re {
namespace Util {
38 template<
typename SVR >
42 typedef Icu_cap_array_svr<SVR> Icu_svr;
46 typename Icu_svr::Irq _irq;
52 L4_RPC_LEGACY_USING(Icu_svr);
57 static_cast<SVR*
>(
this)->reset_event_buffer();
62 long op_get_num_streams(L4Re::Event::Rights)
63 {
return static_cast<SVR*
>(
this)->get_num_streams(); }
65 long op_get_stream_info(L4Re::Event::Rights,
int idx, Event_stream_info &info)
66 {
return static_cast<SVR*
>(
this)->get_stream_info(idx, &info); }
68 long op_get_stream_info_for_id(L4Re::Event::Rights,
l4_umword_t id,
69 Event_stream_info &info)
70 {
return static_cast<SVR*
>(
this)->get_stream_info_for_id(
id, &info); }
72 long op_get_axis_info(L4Re::Event::Rights,
l4_umword_t id,
76 unsigned naxes = cxx::min<unsigned>(L4RE_ABS_MAX, axes.
length);
80 Event_absinfo _info[naxes];
81 int r =
static_cast<SVR*
>(
this)->get_axis_info(
id, naxes, axes.
data, _info);
85 for (
unsigned i = 0; i < naxes; ++i)
86 info.data[i] = _info[i];
92 long op_get_stream_state_for_id(L4Re::Event::Rights,
l4_umword_t stream_id,
93 Event_stream_state &state)
94 {
return static_cast<SVR*
>(
this)->get_stream_state_for_id(stream_id, &state); }
96 int get_num_streams()
const {
return 0; }
97 int get_stream_info(
int, L4Re::Event_stream_info *)
99 int get_stream_info_for_id(
l4_umword_t, L4Re::Event_stream_info *)
101 int get_axis_info(
l4_umword_t,
unsigned ,
unsigned const * ,
102 L4Re::Event_absinfo *)
104 int get_stream_state_for_id(
l4_umword_t, L4Re::Event_stream_state *)
Capability type for RPC interfaces (see L4::Cap<T>).
long op_get_buffer(L4Re::Event::Rights, L4::Ipc::Cap< L4Re::Dataspace > &ds)
Handle L4Re::Event protocol.
Read and interface specific 'W' right for capability flex-pages.
ELEM_TYPE data[MAX]
The data elements.
LEN_TYPE length
The length of the array.
unsigned long l4_umword_t
Unsigned machine word.
Server-side copy in buffer for Array.
Array reference data type for arrays located in the message.
Convenience wrapper for implementing an event server.