famouso::mw::api::EventChannel< ECH > Class Template Reference
This is the base class of each EventChannel. More...
#include <EventChannel.h>
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 Subject & | subject () 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
typedef ECH famouso::mw::api::EventChannel< ECH >::eventChannelHandler |
Constructor & Destructor Documentation
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
uint16_t famouso::mw::api::EventChannel< ECH >::dummy_mw_action_impl | ( | MWAction & | mw_action | ) | [inline, protected] |
ECH& famouso::mw::api::EventChannel< ECH >::ech | ( | ) | const [inline] |
get the local event channel handler object
Referenced by famouso::mw::api::PublisherEventChannel< ECH >::announce(), famouso::mw::gwl::GatewayEventChannel< ECH >::GatewayEventChannel(), famouso::mw::api::PublisherEventChannel< ECH >::publish(), famouso::mw::api::ReflectionPublisherEventChannel< ECH >::publish(), famouso::mw::api::ReflectionPublisherEventChannel< ECH >::ReflectionPublisherEventChannel(), famouso::mw::api::SubscriberEventChannel< ECH >::subscribe(), famouso::mw::api::SubscriberEventChannel< ECH >::unsubscribe(), and famouso::mw::api::ReflectionPublisherEventChannel< ECH >::~ReflectionPublisherEventChannel().
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.
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
ECH::SNN& famouso::mw::api::EventChannel< ECH >::snn | ( | ) | [inline] |
give the Short Network Name representation of the subject corresponding to that event channel
Referenced by famouso::mw::el::EventLayerClientStub::announce(), famouso::mw::el::EventLayer< LL >::announce(), famouso::mw::el::EventLayerClientStub::publish(), famouso::mw::el::EventLayer< LL >::publish(), famouso::mw::el::EventLayerClientStub::subscribe(), famouso::mw::el::EventLayer< LL >::subscribe(), famouso::mw::el::EventLayerClientStub::unannounce(), and famouso::mw::el::EventLayerClientStub::unsubscribe().
const Subject& famouso::mw::api::EventChannel< ECH >::subject | ( | ) | const [inline] |
give the 64Bit subject of that event channel
Referenced by famouso::mw::el::EventLayerClientStub::announce(), famouso::mw::el::EventLayer< LL >::announce(), famouso::mw::el::EventLayerClientStub::publish(), famouso::mw::el::EventLayer< LL >::publish(), famouso::mw::el::EventLayerClientStub::subscribe(), and famouso::mw::el::EventLayer< LL >::subscribe().
Friends And Related Function Documentation
friend class ManagementLayer [friend] |
Field Documentation
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:
- include/mw/api/EventChannel.h