EMANE  1.2.1
EMANE::Models::TDMA::EventScheduler Class Reference

Reference Scheduler implementation. More...

#include <eventscheduler.h>

Inheritance diagram for EMANE::Models::TDMA::EventScheduler:
EMANE::Models::TDMA::Scheduler EMANE::Component EMANE::PlatformServiceUser EMANE::RunningStateMutable EMANE::EventServiceUser EMANE::TimerServiceUser

Public Member Functions

 EventScheduler (NEMId id, PlatformServiceProvider *pPlatformServiceProvider, SchedulerUser *pSchedulerUser)
 
 ~EventScheduler ()
 
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 processEvent (const EventId &eventId, const Serialization &serialization) override
 
std::pair< RxSlotInfo, bool > getRxSlotInfo (const TimePoint &timePoint) const override
 
std::pair< TxSlotInfos, TimePointgetTxSlotInfo (const TimePoint &timePoint, int multiframes) const override
 
SlotInfo getSlotInfo (std::uint64_t u64AbsoluteSlotIndex) const override
 
SlotInfo getSlotInfo (const TimePoint &timePoint) const override
 
void processSchedulerPacket (UpstreamPacket &pkt, const PacketMetaInfo &packetMetaInfo) override
 
void processPacketMetaInfo (const PacketMetaInfo &packetMetaInfo) override
 
virtual void processTimedEvent (TimerEventId eventId, const TimePoint &expireTime, const TimePoint &scheduleTime, const TimePoint &fireTime, const void *arg)
 
virtual void processConfiguration (const ConfigurationUpdate &update)
 

Protected Attributes

SchedulerUserpSchedulerUser_
 
NEMId id_
 
PlatformServiceProviderpPlatformService_
 

Detailed Description

Reference Scheduler implementation.

Implementation receives a TDMA schdule via an event.

Definition at line 56 of file eventscheduler.h.

Constructor & Destructor Documentation

◆ EventScheduler()

EMANE::Models::TDMA::EventScheduler::EventScheduler ( NEMId  id,
PlatformServiceProvider pPlatformServiceProvider,
SchedulerUser pSchedulerUser 
)

Definition at line 36 of file eventscheduler.cc.

◆ ~EventScheduler()

EMANE::Models::TDMA::EventScheduler::~EventScheduler ( )

Definition at line 49 of file eventscheduler.cc.

Member Function Documentation

◆ configure()

void EMANE::Models::TDMA::EventScheduler::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 103 of file eventscheduler.cc.

◆ destroy()

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

Destroy the component.

Implements EMANE::Component.

Definition at line 139 of file eventscheduler.cc.

◆ getRxSlotInfo()

std::pair< EMANE::Models::TDMA::RxSlotInfo, bool > EMANE::Models::TDMA::EventScheduler::getRxSlotInfo ( const TimePoint timePoint) const
overridevirtual

Gets the RxSlotInfo for a specified time.

Parameters
timePointCurrent time
Returns
A pair holding the RxSlotInfo and a bool set to true if the slot is a valid receive slot.

Implements EMANE::Models::TDMA::Scheduler.

Definition at line 399 of file eventscheduler.cc.

◆ getSlotInfo() [1/2]

EMANE::Models::TDMA::SlotInfo EMANE::Models::TDMA::EventScheduler::getSlotInfo ( std::uint64_t  u64AbsoluteSlotIndex) const
overridevirtual

Gets the slot info for a specified absolute slot index

Parameters
u64AbsoluteSlotIndexAbsolute slot index
Returns
Slot information

Implements EMANE::Models::TDMA::Scheduler.

Definition at line 349 of file eventscheduler.cc.

◆ getSlotInfo() [2/2]

EMANE::Models::TDMA::SlotInfo EMANE::Models::TDMA::EventScheduler::getSlotInfo ( const TimePoint timePoint) const
overridevirtual

Gets the slot info for a specified time

Parameters
timePointTime of desired slot info
Returns
Slot information

Implements EMANE::Models::TDMA::Scheduler.

Definition at line 379 of file eventscheduler.cc.

◆ getTxSlotInfo()

std::pair< EMANE::Models::TDMA::TxSlotInfos, EMANE::TimePoint > EMANE::Models::TDMA::EventScheduler::getTxSlotInfo ( const TimePoint timePoint,
int  multiframes 
) const
overridevirtual

Gets the transmit slot info for a specified number of multiframes occurring on or after a specified time.

Parameters
timePointStart time of transmit opportunity search
multiframesNumber of mulitframes worth of transmit opportunities to return
Returns
A pair holding a list of TxSlotInfo entries and the next time to use when requesting more transmit opportunities.
Note
Using the returned time value during the next request allows you to determine the number of missed opportunities due to system timing/resource issues.

Implements EMANE::Models::TDMA::Scheduler.

Definition at line 444 of file eventscheduler.cc.

◆ initialize()

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

Initialize the component.

Exceptions
InitializeExceptionthrown when an error is encountered during initialization

Implements EMANE::Component.

Definition at line 52 of file eventscheduler.cc.

◆ postStart()

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

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

Reimplemented from EMANE::Component.

Definition at line 121 of file eventscheduler.cc.

◆ processConfiguration()

virtual void EMANE::RunningStateMutable::processConfiguration ( const ConfigurationUpdate update)
inlinevirtualinherited

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 in EMANE::Models::IEEE80211ABG::MACLayer, EMANE::Models::RFPipe::MACLayer, EMANE::Models::TDMA::BaseModel::Implementation, EMANE::Models::TDMA::BaseModel, EMANE::NEMStatefulLayer, EMANE::NEMQueuedLayer, and EMANE::FrameworkPHY.

Definition at line 63 of file runningstatemutable.h.

◆ processEvent()

void EMANE::Models::TDMA::EventScheduler::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 148 of file eventscheduler.cc.

◆ processPacketMetaInfo()

void EMANE::Models::TDMA::EventScheduler::processPacketMetaInfo ( const PacketMetaInfo packetMetaInfo)
overridevirtual

Process packet information for a received over-the-air data packet.

Parameters
packetMetaInfoMeta information associated with received packet

Implements EMANE::Models::TDMA::Scheduler.

Definition at line 524 of file eventscheduler.cc.

◆ processSchedulerPacket()

void EMANE::Models::TDMA::EventScheduler::processSchedulerPacket ( UpstreamPacket pkt,
const PacketMetaInfo packetMetaInfo 
)
overridevirtual

Process a Scheduler message received over-the-air.

Parameters
pktReceived UpstreamPacket
packetMetaInfoMeta information associated with received packet

Implements EMANE::Models::TDMA::Scheduler.

Definition at line 514 of file eventscheduler.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.

◆ start()

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

Start the component.

Exceptions
StartExceptionthrown when an error is encountered during start.

Implements EMANE::Component.

Definition at line 112 of file eventscheduler.cc.

◆ stop()

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

Stop the component.

Exceptions
StopExceptionthrown when an error is encountered during stop

Implements EMANE::Component.

Definition at line 130 of file eventscheduler.cc.

Member Data Documentation

◆ id_

NEMId EMANE::Models::TDMA::Scheduler::id_
protectedinherited

Definition at line 140 of file scheduler.h.

◆ pPlatformService_

PlatformServiceProvider* EMANE::PlatformServiceUser::pPlatformService_
protectedinherited

Definition at line 64 of file platformserviceuser.h.

◆ pSchedulerUser_

SchedulerUser* EMANE::Models::TDMA::Scheduler::pSchedulerUser_
protectedinherited

Definition at line 139 of file scheduler.h.


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