EMANE  1.2.1
EMANE::Models::TDMA::BaseModel Class Reference

TDMA radio module implementation that uses specialized scheduler and queue manager modules to allow variant model development. More...

#include <basemodel.h>

Inheritance diagram for EMANE::Models::TDMA::BaseModel:
EMANE::MACLayerImplementor EMANE::Models::TDMA::SchedulerUser EMANE::NEMLayer EMANE::RadioServiceUser EMANE::Component EMANE::UpstreamTransport EMANE::DownstreamTransport EMANE::PlatformServiceUser EMANE::Buildable EMANE::RunningStateMutable EMANE::EventServiceUser EMANE::TimerServiceUser EMANE::Models::TDMA::RadioModel< SCHEDULER, QUEUEMANAGER >

Classes

class  Implementation
 Implementation of BaseModel. More...
 

Public Member Functions

 BaseModel (NEMId id, PlatformServiceProvider *pPlatformServiceProvider, RadioServiceProvider *pRadioServiceProvider, Scheduler *pScheduler, QueueManager *pQueueManager)
 
 ~BaseModel ()
 
void initialize (Registrar &registrar) override
 
void configure (const ConfigurationUpdate &update) override
 
void start () override
 
void postStart () override
 
void stop () override
 
void destroy () override throw ()
 
void processUpstreamControl (const ControlMessages &msgs) override
 
void processUpstreamPacket (const CommonMACHeader &hdr, UpstreamPacket &pkt, const ControlMessages &msgs) override
 
void processDownstreamControl (const ControlMessages &msgs) override
 
void processDownstreamPacket (DownstreamPacket &pkt, const ControlMessages &msgs) override
 
void processEvent (const EventId &, const Serialization &) override
 
void processConfiguration (const ConfigurationUpdate &update) override
 
void notifyScheduleChange (const Frequencies &frequencies, std::uint64_t u64BandwidthHz, const Microseconds &slotDuration, const Microseconds &slotOverhead) override
 
void processSchedulerPacket (DownstreamPacket &pkt) override
 
void processSchedulerControl (const ControlMessages &msgs) override
 
QueueInfos getPacketQueueInfo () const override
 
void sendDownstreamPacket (const CommonMACHeader &hdr, DownstreamPacket &pkt, const ControlMessages &msgs=DownstreamTransport::empty)
 
NEMId getNEMId () const
 
virtual void setDownstreamTransport (DownstreamTransport *pDownstreamTransport)
 
void sendDownstreamControl (const ControlMessages &msgs)
 
virtual void setUpstreamTransport (UpstreamTransport *pUpstreamTransport)
 
void sendUpstreamPacket (UpstreamPacket &pkt, const ControlMessages &msgs=empty)
 
void sendUpstreamControl (const ControlMessages &msgs)
 
virtual void processTimedEvent (TimerEventId eventId, const TimePoint &expireTime, const TimePoint &scheduleTime, const TimePoint &fireTime, const void *arg)
 
BuildId getBuildId () const
 
void setBuildId (BuildId bid)
 

Static Public Attributes

static const ControlMessages empty
 
static const ControlMessages empty
 
static const ControlMessages empty
 

Protected Attributes

NEMId id_
 
PlatformServiceProviderpPlatformService_
 
RadioServiceProviderpRadioService_
 

Detailed Description

TDMA radio module implementation that uses specialized scheduler and queue manager modules to allow variant model development.

Definition at line 53 of file basemodel.h.

Constructor & Destructor Documentation

◆ BaseModel()

EMANE::Models::TDMA::BaseModel::BaseModel ( NEMId  id,
PlatformServiceProvider pPlatformServiceProvider,
RadioServiceProvider pRadioServiceProvider,
Scheduler pScheduler,
QueueManager pQueueManager 
)

Definition at line 36 of file basemodel.cc.

◆ ~BaseModel()

EMANE::Models::TDMA::BaseModel::~BaseModel ( )

Definition at line 52 of file basemodel.cc.

Member Function Documentation

◆ configure()

void EMANE::Models::TDMA::BaseModel::configure ( const ConfigurationUpdate update)
overridevirtual

Configure the component.

Parameters
updateConfiguration update values
Exceptions
ConfigureExceptionthrown when a unexpected configuration item is encountered or there is a problem with the specified item value

Implements EMANE::Component.

Definition at line 65 of file basemodel.cc.

◆ destroy()

void EMANE::Models::TDMA::BaseModel::destroy ( )
throw (
)
overridevirtual

Destroy the component.

Implements EMANE::Component.

Definition at line 93 of file basemodel.cc.

◆ getBuildId()

EMANE::BuildId EMANE::Buildable::getBuildId ( ) const
inlineinherited

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.

◆ getPacketQueueInfo()

EMANE::Models::TDMA::QueueInfos EMANE::Models::TDMA::BaseModel::getPacketQueueInfo ( ) const
overridevirtual

Gets queue status.

Returns
A list of QueueInfo entries.

Implements EMANE::Models::TDMA::SchedulerUser.

Definition at line 158 of file basemodel.cc.

◆ initialize()

void EMANE::Models::TDMA::BaseModel::initialize ( Registrar registrar)
overridevirtual

Initialize the component.

Exceptions
InitializeExceptionthrown when an error is encountered during initialization

Implements EMANE::Component.

Definition at line 57 of file basemodel.cc.

◆ notifyScheduleChange()

void EMANE::Models::TDMA::BaseModel::notifyScheduleChange ( const Frequencies frequencies,
std::uint64_t  u64BandwidthHz,
const Microseconds slotDuration,
const Microseconds slotOverhead 
)
overridevirtual

Notifies when a schedule change occurs

Parameters
frequenciesSet of frequencies used in the schedule
u64BandwidthHzTransceiver bandwidth
slotDurationSlot duration
slotOverheadSlot overhead

Implements EMANE::Models::TDMA::SchedulerUser.

Definition at line 137 of file basemodel.cc.

◆ postStart()

void EMANE::Models::TDMA::BaseModel::postStart ( )
overridevirtual

Hook to run any post start functionaililty. Called after all the components have been started.

Reimplemented from EMANE::Component.

Definition at line 78 of file basemodel.cc.

◆ processConfiguration()

void EMANE::Models::TDMA::BaseModel::processConfiguration ( const ConfigurationUpdate update)
overridevirtual

Process dynamic running-state configuration updates

Parameters
updateConfiguration update
Note
Running state configuration errors are indicated using a validator. Validators can be registered using the ConfigurationRegistrar.

Reimplemented from EMANE::RunningStateMutable.

Definition at line 132 of file basemodel.cc.

◆ processDownstreamControl()

void EMANE::Models::TDMA::BaseModel::processDownstreamControl ( const ControlMessages msgs)
overridevirtual

Process downstream control message

Parameters
msgsReference to the ControlMessages

Implements EMANE::DownstreamTransport.

Definition at line 112 of file basemodel.cc.

◆ processDownstreamPacket()

void EMANE::Models::TDMA::BaseModel::processDownstreamPacket ( DownstreamPacket pkt,
const ControlMessages msgs 
)
overridevirtual

Process downstream packet

Parameters
pktReference to the DownstreamPacket to process
msgsoptional reference to the ControlMessages

Implements EMANE::DownstreamTransport.

Definition at line 118 of file basemodel.cc.

◆ processEvent()

void EMANE::Models::TDMA::BaseModel::processEvent ( const EventId eventId,
const Serialization serialization 
)
overridevirtual

Process an event.

Parameters
eventIdevent identifier corresponding to the serialized event
serializationopaque event object data

Reimplemented from EMANE::EventServiceUser.

Definition at line 125 of file basemodel.cc.

◆ processSchedulerControl()

void EMANE::Models::TDMA::BaseModel::processSchedulerControl ( const ControlMessages msgs)
overridevirtual

Processes Scheduler control messages for communication with the downsteam NEM layer

Parameters
msgsControl messages

Implements EMANE::Models::TDMA::SchedulerUser.

Definition at line 152 of file basemodel.cc.

◆ processSchedulerPacket()

void EMANE::Models::TDMA::BaseModel::processSchedulerPacket ( DownstreamPacket pkt)
overridevirtual

Processes a Scheduler packet for transmission over-the-air

Parameters
pktPacket to transmit

Implements EMANE::Models::TDMA::SchedulerUser.

Definition at line 146 of file basemodel.cc.

◆ processTimedEvent()

virtual void EMANE::TimerServiceUser::processTimedEvent ( TimerEventId  eventId,
const TimePoint expireTime,
const TimePoint scheduleTime,
const TimePoint fireTime,
const void *  arg 
)
inlinevirtualinherited

Process a timed event

Parameters
eventIdIdentifier corresponding to the timer being processed
expireTimeThe time the timer was scheduled to expire
scheduleTimeThe Time the timer was scheduled
fireTimeTime time The time the timer actually fired
argOpaque timed event data
Note
All times are abosulte using CLOCK_REALTIME

Reimplemented in EMANE::NEMStatefulLayer, EMANE::Models::Bypass::PHYLayer, EMANE::NEMQueuedLayer, EMANE::Models::PHYAPITest::ShimLayer, EMANE::Models::CommEffect::Shim, EMANE::Agents::GPSDLocation::Agent, EMANE::TimerServiceProxy, and EMANE::NEMTimerServiceProxy.

Definition at line 62 of file timerserviceuser.h.

◆ processUpstreamControl()

void EMANE::Models::TDMA::BaseModel::processUpstreamControl ( const ControlMessages msgs)
overridevirtual

Process upstream control message

Parameters
msgsreference to the ControlMessages

Implements EMANE::UpstreamTransport.

Definition at line 99 of file basemodel.cc.

◆ processUpstreamPacket()

void EMANE::Models::TDMA::BaseModel::processUpstreamPacket ( const CommonMACHeader hdr,
UpstreamPacket pkt,
const ControlMessages msgs 
)
overridevirtual

Process an upstream packet

Parameters
hdrMAC message header
pktUpstream packet reference
msgsOptional control messages
Note
Control message ownership is transferred with this call. Control messages should not be accessed after this point.

Implements EMANE::MACLayerImplementor.

Definition at line 105 of file basemodel.cc.

◆ sendDownstreamControl()

void EMANE::UpstreamTransport::sendDownstreamControl ( const ControlMessages msgs)
inlineinherited

Send downstream control message

Parameters
msgsreference to the ControlMessages

Definition at line 44 of file upstreamtransport.inl.

◆ sendDownstreamPacket()

void EMANE::MACLayerImplementor::sendDownstreamPacket ( const CommonMACHeader hdr,
DownstreamPacket pkt,
const ControlMessages msgs = DownstreamTransport::empty 
)
inlineinherited

Sends a downstream packet

Parameters
hdrMAC message header
pktDownstream packet reference
msgsOptional control messages
Note
Control message ownership is transferred with this call. Control messages should not be accessed after this point.

Definition at line 37 of file maclayerimpl.inl.

◆ sendUpstreamControl()

void EMANE::DownstreamTransport::sendUpstreamControl ( const ControlMessages msgs)
inlineinherited

Send upstream control message

Parameters
msgsReference to the ControlMessages

Definition at line 44 of file downstreamtransport.inl.

◆ sendUpstreamPacket()

void EMANE::DownstreamTransport::sendUpstreamPacket ( UpstreamPacket pkt,
const ControlMessages msgs = empty 
)
inlineinherited

Send upstream packet

Parameters
pktReference to the UpstreamPacket to process
msgsoptional reference to the ControlMessages

Definition at line 37 of file downstreamtransport.inl.

◆ 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
bidthe BuildId
Note
: This method is for internal framework use only.

Definition at line 40 of file buildable.inl.

◆ setDownstreamTransport()

virtual void EMANE::UpstreamTransport::setDownstreamTransport ( DownstreamTransport pDownstreamTransport)
inlinevirtualinherited

Set the downstream transport.

Parameters
pDownstreamTransportPointer to the downstream transport of this upstream transport.
Note
: This method is for internal framework use only.

Reimplemented in EMANE::NEMStatefulLayer, EMANE::PHYLayer, EMANE::MACLayer, EMANE::ShimLayer, and EMANE::TransportLayer.

Definition at line 82 of file upstreamtransport.h.

◆ setUpstreamTransport()

virtual void EMANE::DownstreamTransport::setUpstreamTransport ( UpstreamTransport pUpstreamTransport)
inlinevirtualinherited

Set the upstream transport.

Parameters
pUpstreamTransportPointer 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.

◆ start()

void EMANE::Models::TDMA::BaseModel::start ( )
overridevirtual

Start the component.

Exceptions
StartExceptionthrown when an error is encountered during start.

Implements EMANE::Component.

Definition at line 71 of file basemodel.cc.

◆ stop()

void EMANE::Models::TDMA::BaseModel::stop ( )
overridevirtual

Stop the component.

Exceptions
StopExceptionthrown when an error is encountered during stop

Implements EMANE::Component.

Definition at line 85 of file basemodel.cc.

Member Data Documentation

◆ empty [1/3]

const ControlMessages EMANE::Models::TDMA::SchedulerUser::empty
staticinherited

Definition at line 97 of file scheduleruser.h.

◆ empty [2/3]

const EMANE::ControlMessages EMANE::DownstreamTransport::empty
staticinherited

Definition at line 102 of file downstreamtransport.h.

◆ empty [3/3]

const EMANE::ControlMessages EMANE::UpstreamTransport::empty
staticinherited

Definition at line 106 of file upstreamtransport.h.

◆ id_

NEMId EMANE::NEMLayer::id_
protectedinherited

Definition at line 81 of file nemlayer.h.

◆ pPlatformService_

PlatformServiceProvider* EMANE::PlatformServiceUser::pPlatformService_
protectedinherited

Definition at line 64 of file platformserviceuser.h.

◆ pRadioService_

RadioServiceProvider* EMANE::RadioServiceUser::pRadioService_
protectedinherited

Definition at line 57 of file radioserviceuser.h.


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