Bridge for a shim NEM layer. Decouples a ShimLayerImplementor implementation from the NEM to allow for interface modification and encapsulation.
More...
#include <shimlayer.h>
|
| | ShimLayer (NEMId id, NEMLayer *pImplementor, PlatformServiceProvider *pPlatformService) |
| |
| | ~ShimLayer () |
| |
| void | initialize (Registrar ®istrar) override |
| |
| void | configure (const ConfigurationUpdate &update) override |
| |
| void | start () override |
| |
| void | stop () override |
| |
| void | postStart () override |
| |
| void | destroy () override throw () |
| |
| void | setDownstreamTransport (DownstreamTransport *) override |
| |
| void | setUpstreamTransport (UpstreamTransport *) override |
| |
| void | processConfiguration (const ConfigurationUpdate &update) override |
| |
| void | processDownstreamControl (const ControlMessages &msgs) override |
| |
| void | processDownstreamPacket (DownstreamPacket &pkt, const ControlMessages &msgs) override |
| |
| void | processUpstreamPacket (UpstreamPacket &pkt, const ControlMessages &msgs) override |
| |
| void | processUpstreamControl (const ControlMessages &msgs) override |
| |
| void | processEvent (const EventId &eventId, const Serialization &serialization) override |
| |
| void | processTimedEvent (TimerEventId eventId, const TimePoint &expireTime, const TimePoint &scheduleTime, const TimePoint &fireTime, const void *arg) override |
| |
| template<typename Function > |
| void | processTimer (Function fn, const TimePoint &expireTime, const TimePoint &scheduleTime, const TimePoint &fireTime) |
| |
| NEMId | getNEMId () const |
| |
| void | sendDownstreamPacket (DownstreamPacket &pkt, const ControlMessages &msgs=empty) |
| |
| void | sendDownstreamControl (const ControlMessages &msgs) |
| |
| void | sendUpstreamPacket (UpstreamPacket &pkt, const ControlMessages &msgs=empty) |
| |
| void | sendUpstreamControl (const ControlMessages &msgs) |
| |
| BuildId | getBuildId () const |
| |
| void | setBuildId (BuildId bid) |
| |
| template<typename Function > |
| void | addFileDescriptor (int iFd, DescriptorType type, Function fn) |
| |
|
| using | Callback = std::function< void(int iFd)> |
| |
Bridge for a shim NEM layer. Decouples a ShimLayerImplementor implementation from the NEM to allow for interface modification and encapsulation.
Definition at line 51 of file libemane/shimlayer.h.
◆ Callback
◆ DescriptorType
◆ ShimLayer()
◆ ~ShimLayer()
| EMANE::ShimLayer::~ShimLayer |
( |
| ) |
|
◆ addFileDescriptor()
template<typename Function >
| void EMANE::FileDescriptorServiceProvider::addFileDescriptor |
( |
int |
iFd, |
|
|
DescriptorType |
type, |
|
|
Function |
fn |
|
) |
| |
|
inherited |
Adds a file descriptor for processing
- Parameters
-
| iFd | File descriptor |
| type | Type of descriptor processing |
| fn | A callable object |
Definition at line 34 of file filedescriptorserviceprovider.inl.
◆ configure()
Configure the component.
- Parameters
-
| update | Configuration update values |
- Exceptions
-
| ConfigureException | thrown when a unexpected configuration item is encountered or there is a problem with the specified item value |
Implements EMANE::Component.
Definition at line 57 of file libemane/shimlayer.cc.
◆ destroy()
| void EMANE::ShimLayer::destroy |
( |
| ) |
|
| throw | ( | |
| ) | | |
|
overridevirtual |
◆ getBuildId()
Gets the application wide unique BuildId of this object.
- Returns
- the BuildId
Definition at line 34 of file buildable.inl.
◆ getNEMId()
| NEMId EMANE::NEMLayer::getNEMId |
( |
| ) |
const |
|
inlineinherited |
Get the NEM identifier.
- Returns
- NEM identifier
Definition at line 72 of file nemlayer.h.
◆ initialize()
| void EMANE::ShimLayer::initialize |
( |
Registrar & |
registrar | ) |
|
|
overridevirtual |
◆ postStart()
| void EMANE::ShimLayer::postStart |
( |
| ) |
|
|
overridevirtual |
◆ processConfiguration()
◆ processDownstreamControl()
| void EMANE::NEMQueuedLayer::processDownstreamControl |
( |
const ControlMessages & |
msgs | ) |
|
|
overridevirtualinherited |
◆ processDownstreamPacket()
◆ processEvent()
| void EMANE::NEMQueuedLayer::processEvent |
( |
const EventId & |
eventId, |
|
|
const Serialization & |
serialization |
|
) |
| |
|
overridevirtualinherited |
Process an event.
- Parameters
-
| eventId | event identifier corresponding to the serialized event |
| serialization | opaque event object data |
Reimplemented from EMANE::EventServiceUser.
Definition at line 236 of file nemqueuedlayer.cc.
◆ processTimedEvent()
Process a timed event
- Parameters
-
| eventId | Identifier corresponding to the timer being processed |
| expireTime | The time the timer was scheduled to expire |
| scheduleTime | The Time the timer was scheduled |
| fireTime | Time time The time the timer actually fired |
| arg | Opaque timed event data |
- Note
- All times are abosulte using CLOCK_REALTIME
Reimplemented from EMANE::TimerServiceUser.
Definition at line 247 of file nemqueuedlayer.cc.
◆ processTimer()
template<typename Function >
| void EMANE::NEMQueuedLayer::processTimer |
( |
Function |
fn, |
|
|
const TimePoint & |
expireTime, |
|
|
const TimePoint & |
scheduleTime, |
|
|
const TimePoint & |
fireTime |
|
) |
| |
|
inherited |
◆ processUpstreamControl()
| void EMANE::NEMQueuedLayer::processUpstreamControl |
( |
const ControlMessages & |
msgs | ) |
|
|
overridevirtualinherited |
◆ processUpstreamPacket()
◆ sendDownstreamControl()
| void EMANE::UpstreamTransport::sendDownstreamControl |
( |
const ControlMessages & |
msgs | ) |
|
|
inlineinherited |
Send downstream control message
- Parameters
-
| msgs | reference to the ControlMessages |
Definition at line 44 of file upstreamtransport.inl.
◆ sendDownstreamPacket()
◆ sendUpstreamControl()
| void EMANE::DownstreamTransport::sendUpstreamControl |
( |
const ControlMessages & |
msgs | ) |
|
|
inlineinherited |
Send upstream control message
- Parameters
-
| msgs | Reference to the ControlMessages |
Definition at line 44 of file downstreamtransport.inl.
◆ sendUpstreamPacket()
◆ setBuildId()
| void EMANE::Buildable::setBuildId |
( |
BuildId |
bid | ) |
|
|
inlineinherited |
Sets the application wide unique BuildId of this object. Builders assign a BuildId to objects at instantiation.
- Parameters
-
- Note
- : This method is for internal framework use only.
Definition at line 40 of file buildable.inl.
◆ setDownstreamTransport()
Set the downstream transport.
- Parameters
-
| pDownstreamTransport | Pointer to the downstream transport of this upstream transport. |
- Note
- : This method is for internal framework use only.
Reimplemented from EMANE::UpstreamTransport.
Definition at line 131 of file libemane/shimlayer.cc.
◆ setUpstreamTransport()
| void EMANE::ShimLayer::setUpstreamTransport |
( |
UpstreamTransport * |
pUpstreamTransport | ) |
|
|
overridevirtual |
◆ start()
| void EMANE::ShimLayer::start |
( |
| ) |
|
|
overridevirtual |
◆ stop()
| void EMANE::ShimLayer::stop |
( |
| ) |
|
|
overridevirtual |
◆ empty [1/2]
◆ empty [2/2]
◆ id_
| NEMId EMANE::NEMLayer::id_ |
|
protectedinherited |
The documentation for this class was generated from the following files: