|
EMANE
1.0.1
|
A layer stack with a porcessing queue between each layer to decouple to intra queue processing. More...
#include <nemqueuedlayer.h>
Public Types | |
| enum | DescriptorType { DescriptorType::READ, DescriptorType::WRITE } |
Public Member Functions | |
| ~NEMQueuedLayer () | |
| void | initialize (Registrar ®istrar) override |
| void | start () override |
| void | stop () 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 |
| virtual void | configure (const ConfigurationUpdate &update)=0 |
| virtual void | postStart () |
| virtual void | destroy ()=0 throw () |
| virtual void | setDownstreamTransport (DownstreamTransport *pDownstreamTransport) |
| void | sendDownstreamPacket (DownstreamPacket &pkt, const ControlMessages &msgs=empty) |
| void | sendDownstreamControl (const ControlMessages &msgs) |
| virtual void | setUpstreamTransport (UpstreamTransport *pUpstreamTransport) |
| 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) |
Static Public Attributes | |
| static const ControlMessages | empty |
| static const ControlMessages | empty |
Protected Types | |
| using | Callback = std::function< void(int iFd)> |
Protected Member Functions | |
| NEMQueuedLayer (NEMId id, PlatformServiceProvider *pPlatformService) | |
| virtual void | doProcessConfiguration (const ConfigurationUpdate &)=0 |
| virtual void | doProcessDownstreamControl (const ControlMessages &)=0 |
| virtual void | doProcessDownstreamPacket (DownstreamPacket &, const ControlMessages &)=0 |
| virtual void | doProcessUpstreamPacket (UpstreamPacket &, const ControlMessages &)=0 |
| virtual void | doProcessUpstreamControl (const ControlMessages &)=0 |
| virtual void | doProcessEvent (const EventId &, const Serialization &)=0 |
| virtual void | doProcessTimedEvent (TimerEventId eventId, const TimePoint &expireTime, const TimePoint &scheduleTime, const TimePoint &fireTime, const void *arg)=0 |
Protected Attributes | |
| NEMId | id_ |
A layer stack with a porcessing queue between each layer to decouple to intra queue processing.
Definition at line 63 of file nemqueuedlayer.h.
|
protectedinherited |
Definition at line 83 of file filedescriptorserviceprovider.h.
|
stronginherited |
| Enumerator | |
|---|---|
| READ | Process when data is ready to read |
| WRITE | Process when data is ready to write |
Definition at line 53 of file filedescriptorserviceprovider.h.
| EMANE::NEMQueuedLayer::~NEMQueuedLayer | ( | ) |
Definition at line 85 of file nemqueuedlayer.cc.
|
protected |
Definition at line 50 of file nemqueuedlayer.cc.
|
inherited |
Adds a file descriptor for processing
| iFd | File descriptor |
| type | Type of descriptor processing |
| fn | A callable object |
Definition at line 34 of file filedescriptorserviceprovider.inl.
|
pure virtualinherited |
Configure the component.
| update | Configuration update values |
| ConfigureException | thrown when a unexpected configuration item is encountered or there is a problem with the specified item value |
Implemented in EMANE::Models::IEEE80211ABG::MACLayer, EMANE::Models::RFPipe::MACLayer, EMANE::NEMStatefulLayer, EMANE::NEMLayerStack, EMANE::Application::NEMImpl, EMANE::Models::TDMA::BaseModel::Implementation, EMANE::Models::Bypass::MACLayer, EMANE::Models::Bypass::PHYLayer, EMANE::Transports::Virtual::VirtualTransport, EMANE::Transports::Raw::RawTransport, EMANE::Models::TDMA::EventScheduler, EMANE::Models::TDMA::BaseModel, EMANE::Models::PHYAPITest::ShimLayer, EMANE::Application::EventAgentManagerImpl, EMANE::Application::EventGeneratorManagerImpl, EMANE::FrameworkPHY, EMANE::Application::NEMManagerImpl, EMANE::Agents::GPSDLocation::Agent, EMANE::Generators::EEL::Generator, EMANE::Models::CommEffect::Shim, EMANE::Models::TimingAnalysis::ShimLayer, EMANE::Application::TransportAdapterImpl, EMANE::MACLayer, EMANE::PHYLayer, EMANE::ShimLayer, EMANE::Application::TransportManagerImpl, EMANE::TransportLayer, and EMANE::Models::TDMA::BasicQueueManager.
|
pure virtualinherited | |||||||||||||
Destroy the component.
Implemented in EMANE::Models::IEEE80211ABG::MACLayer, EMANE::Models::RFPipe::MACLayer, EMANE::NEMStatefulLayer, EMANE::NEMLayerStack, EMANE::Application::NEMImpl, EMANE::Models::TDMA::BaseModel::Implementation, EMANE::Transports::Virtual::VirtualTransport, EMANE::Models::Bypass::MACLayer, EMANE::Models::Bypass::PHYLayer, EMANE::Models::TDMA::EventScheduler, EMANE::Transports::Raw::RawTransport, EMANE::Models::TDMA::BaseModel, EMANE::Models::PHYAPITest::ShimLayer, EMANE::Application::EventAgentManagerImpl, EMANE::Application::EventGeneratorManagerImpl, EMANE::Application::NEMManagerImpl, EMANE::FrameworkPHY, EMANE::Application::TransportAdapterImpl, EMANE::Agents::GPSDLocation::Agent, EMANE::Generators::EEL::Generator, EMANE::MACLayer, EMANE::PHYLayer, EMANE::ShimLayer, EMANE::Models::CommEffect::Shim, EMANE::Models::TimingAnalysis::ShimLayer, EMANE::Application::TransportManagerImpl, EMANE::TransportLayer, and EMANE::Models::TDMA::BasicQueueManager.
|
protectedpure virtual |
|
protectedpure virtual |
|
protectedpure virtual |
|
protectedpure virtual |
|
protectedpure virtual |
|
protectedpure virtual |
|
protectedpure virtual |
|
inlineinherited |
Gets the application wide unique BuildId of this object.
Definition at line 34 of file buildable.inl.
|
inlineinherited |
|
overridevirtual |
Initialize the component.
| InitializeException | thrown when an error is encountered during initialization |
Implements EMANE::Component.
Reimplemented in EMANE::PHYLayer, EMANE::ShimLayer, and EMANE::TransportLayer.
Definition at line 98 of file nemqueuedlayer.cc.
|
inlinevirtualinherited |
Hook to run any post start functionaililty. Called after all the components have been started.
Reimplemented in EMANE::Models::IEEE80211ABG::MACLayer, EMANE::Models::RFPipe::MACLayer, EMANE::NEMStatefulLayer, EMANE::NEMLayerStack, EMANE::Application::NEMImpl, EMANE::Models::TDMA::BaseModel::Implementation, EMANE::Transports::Virtual::VirtualTransport, EMANE::Models::TDMA::EventScheduler, EMANE::Models::TDMA::BaseModel, EMANE::Models::PHYAPITest::ShimLayer, EMANE::Application::EventAgentManagerImpl, EMANE::Application::EventGeneratorManagerImpl, EMANE::Application::NEMManagerImpl, EMANE::ShimLayer, EMANE::Application::TransportAdapterImpl, EMANE::MACLayer, EMANE::PHYLayer, EMANE::TransportLayer, EMANE::Application::TransportManagerImpl, and EMANE::Models::TDMA::BasicQueueManager.
Definition at line 119 of file component.h.
|
overridevirtual |
Process dynamic running-state configuration updates
| update | Configuration update |
Reimplemented from EMANE::RunningStateMutable.
Definition at line 186 of file nemqueuedlayer.cc.
|
overridevirtual |
Process downstream control message
| msgs | Reference to the ControlMessages |
Implements EMANE::DownstreamTransport.
Definition at line 194 of file nemqueuedlayer.cc.
|
overridevirtual |
Process downstream packet
| pkt | Reference to the DownstreamPacket to process |
| msgs | optional reference to the ControlMessages |
Implements EMANE::DownstreamTransport.
Definition at line 202 of file nemqueuedlayer.cc.
|
overridevirtual |
Process an event.
| eventId | event identifier corresponding to the serialized event |
| serialization | opaque event object data |
Reimplemented from EMANE::EventServiceUser.
Definition at line 230 of file nemqueuedlayer.cc.
|
overridevirtual |
Process a timed event
| 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 |
Reimplemented from EMANE::TimerServiceUser.
Definition at line 241 of file nemqueuedlayer.cc.
| void EMANE::NEMQueuedLayer::processTimer | ( | Function | fn, |
| const TimePoint & | expireTime, | ||
| const TimePoint & | scheduleTime, | ||
| const TimePoint & | fireTime | ||
| ) |
Definition at line 34 of file nemqueuedlayer.inl.
|
overridevirtual |
Process upstream control message
| msgs | reference to the ControlMessages |
Implements EMANE::UpstreamTransport.
Definition at line 222 of file nemqueuedlayer.cc.
|
overridevirtual |
Process upstream packet
| pkt | reference to the UpstreamPacket to process |
| msgs | optional reference to the ControlMessages |
Implements EMANE::UpstreamTransport.
Definition at line 213 of file nemqueuedlayer.cc.
|
inlineinherited |
Send downstream control message
| msgs | reference to the ControlMessages |
Definition at line 44 of file upstreamtransport.inl.
|
inlineinherited |
Send downsteam packet
| pkt | reference to the DownstreamPacket to process |
| msgs | optional reference to the ControlMessages |
Definition at line 37 of file upstreamtransport.inl.
|
inlineinherited |
Send upstream control message
| msgs | Reference to the ControlMessages |
Definition at line 44 of file downstreamtransport.inl.
|
inlineinherited |
Send upstream packet
| pkt | Reference to the UpstreamPacket to process |
| msgs | optional reference to the ControlMessages |
Definition at line 37 of file downstreamtransport.inl.
|
inlineinherited |
Sets the application wide unique BuildId of this object. Builders assign a BuildId to objects at instantiation.
| bid | the BuildId |
Definition at line 40 of file buildable.inl.
|
inlinevirtualinherited |
Set the downstream transport.
| pDownstreamTransport | Pointer to the downstream transport of this upstream transport. |
Reimplemented in EMANE::NEMStatefulLayer, EMANE::PHYLayer, EMANE::MACLayer, EMANE::ShimLayer, and EMANE::TransportLayer.
Definition at line 82 of file upstreamtransport.h.
|
inlinevirtualinherited |
Set the upstream transport.
| pUpstreamTransport | Pointer to the upstream transport of this downstream transport. |
Reimplemented in EMANE::NEMStatefulLayer, EMANE::MACLayer, EMANE::ShimLayer, EMANE::PHYLayer, and EMANE::TransportLayer.
Definition at line 79 of file downstreamtransport.h.
|
overridevirtual |
Start the component.
| StartException | thrown when an error is encountered during start. |
Implements EMANE::Component.
Reimplemented in EMANE::PHYLayer, EMANE::ShimLayer, and EMANE::TransportLayer.
Definition at line 163 of file nemqueuedlayer.cc.
|
overridevirtual |
Stop the component.
| StopException | thrown when an error is encountered during stop |
Implements EMANE::Component.
Reimplemented in EMANE::PHYLayer, EMANE::ShimLayer, and EMANE::TransportLayer.
Definition at line 168 of file nemqueuedlayer.cc.
|
staticinherited |
Definition at line 102 of file downstreamtransport.h.
|
staticinherited |
Definition at line 106 of file upstreamtransport.h.
|
protectedinherited |
Definition at line 81 of file nemlayer.h.