L4Re - L4 Runtime Environment
L4::Server_object_t< IFACE, BASE > Struct Template Reference

Base class (template) for server implementing server objects. More...

+ Inheritance diagram for L4::Server_object_t< IFACE, BASE >:
+ Collaboration diagram for L4::Server_object_t< IFACE, BASE >:

Public Types

typedef IFACE Interface
 Data type of the IPC interface definition.
 

Public Member Functions

BASE::Demand get_buffer_demand () const
 
int dispatch_meta_request (L4::Ipc::Iostream &ios)
 Implementation of the meta protocol based on IFACE. More...
 

Static Public Member Functions

template<typename THIS >
static int proto_dispatch (THIS *self, l4_umword_t rights, L4::Ipc::Iostream &ios)
 Implementation of protocol-based dispatch for this server object. More...
 

Detailed Description

template<typename IFACE, typename BASE = L4::Server_object>
struct L4::Server_object_t< IFACE, BASE >

Base class (template) for server implementing server objects.

Template Parameters
IFACEThe IPC interface class that defines the interface that shall be implemented.
BASEThe server object base class (usually L4::Server_object).
Examples:
examples/libs/l4re/c++/shared_ds/ds_srv.cc, and examples/libs/l4re/streammap/server.cc.

Definition at line 91 of file ipc_server.

Member Function Documentation

◆ dispatch_meta_request()

template<typename IFACE, typename BASE = L4::Server_object>
int L4::Server_object_t< IFACE, BASE >::dispatch_meta_request ( L4::Ipc::Iostream ios)
inline

Implementation of the meta protocol based on IFACE.

Parameters
iosThe IO stream used for receiving the message.

This function can be used to handle incoming L4_PROTO_META protcol requests. The implementation uses the L4::Type_info of IFACE to handle the requests. Call this function in the implementation of Server_object::dispatch() when the received message tag has protocol L4_PROTO_META (L4::Meta::Protocol).

Definition at line 110 of file ipc_server.

◆ get_buffer_demand()

template<typename IFACE, typename BASE = L4::Server_object>
BASE::Demand L4::Server_object_t< IFACE, BASE >::get_buffer_demand ( ) const
inline
Returns
the server-side buffer demand based in IFACE.

Definition at line 97 of file ipc_server.

◆ proto_dispatch()

template<typename IFACE, typename BASE = L4::Server_object>
template<typename THIS >
static int L4::Server_object_t< IFACE, BASE >::proto_dispatch ( THIS *  self,
l4_umword_t  rights,
L4::Ipc::Iostream ios 
)
inlinestatic

Implementation of protocol-based dispatch for this server object.

Parameters
selfThe this pointer for the object (inherits from Server_object_t).
rightsThe rights from the received IPC (forwarded to p_dispatch()).
iosThe message stream for the incoming and the reply message.

Server objects may call this function from their dispatch() function. This function reads the protocol ID from the message tag and uses the p_dispatch code to dispatch to overloaded p_dispatch functions of self.

Definition at line 125 of file ipc_server.


The documentation for this struct was generated from the following file: