Menu

famouso::mw::api::EventChannel< ECH > Class Template Reference

This is the base class of each EventChannel. More...

#include <EventChannel.h>

Inheritance diagram for famouso::mw::api::EventChannel< ECH >:
Chain famouso::mw::api::PublisherEventChannel< ECH > famouso::mw::api::ReflectionPublisherEventChannel< ECH > famouso::mw::api::SubscriberEventChannel< ECH > famouso::mw::gwl::Gateway< ECH, Storage > famouso::mw::gwl::GatewayEventChannel< ECH >

Data Structures

struct  MWAction

Public Types

typedef ECH eventChannelHandler

Public Member Functions

ECH & ech () const
 get the local event channel handler object
ECH::SNN & snn ()
 give the Short Network Name representation of the subject corresponding to that event channel
const ECH::SNN & snn () const
 give the Short Network Name representation of the subject corresponding to that event channel in case of a const object instance
const Subjectsubject () const
 give the 64Bit subject of that event channel
uint16_t get_requirements (uint8_t *buffer) const
 get channel requirement attribute set (binary representation)

Protected Member Functions

uint16_t dummy_mw_action_impl (MWAction &mw_action)
 EventChannel (const Subject &s)
 Constructor of the class is protected to avoid instanciating objects.

Protected Attributes

util::Delegate< MWAction
&, uint16_t > 
mw_action_trampoline
 Triggers a channel action that needs information from higher class derivation level.

Friends

class ManagementLayer

Detailed Description

template<class ECH>
class famouso::mw::api::EventChannel< ECH >

This is the base class of each EventChannel.

The EventChannel encapsulates the needed data structures to handle the publish/subscribe communication and implements the redirection of the calls to the EventLayer (famouso::mw::el) also.

See also:
famouso::mw::el::EventLayer

Member Typedef Documentation

template<class ECH>
typedef ECH famouso::mw::api::EventChannel< ECH >::eventChannelHandler

Constructor & Destructor Documentation

template<class ECH>
famouso::mw::api::EventChannel< ECH >::EventChannel ( const Subject s  )  [inline, protected]

Constructor of the class is protected to avoid instanciating objects.

References famouso::mw::api::EventChannel< ECH >::dummy_mw_action_impl(), and famouso::mw::api::EventChannel< ECH >::mw_action_trampoline.


Member Function Documentation

template<class ECH>
uint16_t famouso::mw::api::EventChannel< ECH >::get_requirements ( uint8_t *  buffer  )  const [inline]

get channel requirement attribute set (binary representation)

Parameters:
buffer Buffer to store the binary representation of the attribute set or NULL.
Returns:
length of the binary representation in bytes
Note:
You must ensure that buffer is large enough to hold the attribute set. Call this function with a NULL argument to get the size for buffer allocation.

References famouso::mw::api::EventChannel< ECH >::MWAction::action, famouso::mw::api::EventChannel< ECH >::MWAction::buffer, famouso::mw::api::EventChannel< ECH >::MWAction::get_requirements, and famouso::mw::api::EventChannel< ECH >::mw_action_trampoline.

template<class ECH>
const ECH::SNN& famouso::mw::api::EventChannel< ECH >::snn (  )  const [inline]

give the Short Network Name representation of the subject corresponding to that event channel in case of a const object instance


Friends And Related Function Documentation

template<class ECH>
friend class ManagementLayer [friend]

Field Documentation

template<class ECH>
util::Delegate<MWAction &, uint16_t> famouso::mw::api::EventChannel< ECH >::mw_action_trampoline [protected]

Triggers a channel action that needs information from higher class derivation level.

Note:
Only one delegate for multiple function (and no virtuals) to save RAM.
Todo:

Save RAM by replacing this with another type of delegate wich does not store an object pointer, because the this pointer is known at invocation time.

Save RAM for configurations without a management channel by leaving it out in that cases.

Referenced by famouso::mw::api::EventChannel< ECH >::EventChannel(), and famouso::mw::api::EventChannel< ECH >::get_requirements().


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