EMANE  1.2.1
EMANE::Models::TDMA::BasicQueueManager Class Reference

Reference QueueManager implementation. More...

#include <basicqueuemanager.h>

Inheritance diagram for EMANE::Models::TDMA::BasicQueueManager:
EMANE::Models::TDMA::QueueManager EMANE::Component EMANE::PlatformServiceUser EMANE::RunningStateMutable EMANE::Models::TDMA::PacketStatusPublisherUser EMANE::EventServiceUser EMANE::TimerServiceUser

Public Member Functions

 BasicQueueManager (NEMId id, PlatformServiceProvider *pPlatformServiceProvider)
 
 ~BasicQueueManager ()
 
void initialize (Registrar &registrar) override
 
void configure (const ConfigurationUpdate &update) override
 
void start () override
 
void postStart () override
 
void stop () override
 
void destroy () override throw ()
 
size_t enqueue (std::uint8_t u8QueueIndex, DownstreamPacket &&pkt) override
 
std::tuple< EMANE::Models::TDMA::MessageComponents, size_t > dequeue (std::uint8_t u8QueueIndex, size_t length, NEMId destination) override
 
QueueInfos getPacketQueueInfo () const override
 
virtual void processConfiguration (const ConfigurationUpdate &update)
 
void setPacketStatusPublisher (PacketStatusPublisher *pPacketStatusPublisher)
 

Protected Attributes

NEMId id_
 
PlatformServiceProviderpPlatformService_
 
PacketStatusPublisherpPacketStatusPublisher_
 

Detailed Description

Reference QueueManager implementation.

Definition at line 49 of file basicqueuemanager.h.

Constructor & Destructor Documentation

◆ BasicQueueManager()

EMANE::Models::TDMA::BasicQueueManager::BasicQueueManager ( NEMId  id,
PlatformServiceProvider pPlatformServiceProvider 
)

Definition at line 55 of file basicqueuemanager.cc.

◆ ~BasicQueueManager()

EMANE::Models::TDMA::BasicQueueManager::~BasicQueueManager ( )

Definition at line 60 of file basicqueuemanager.cc.

Member Function Documentation

◆ configure()

void EMANE::Models::TDMA::BasicQueueManager::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 118 of file basicqueuemanager.cc.

◆ dequeue()

std::tuple< EMANE::Models::TDMA::MessageComponents, size_t > EMANE::Models::TDMA::BasicQueueManager::dequeue ( std::uint8_t  u8QueueIndex,
size_t  length,
NEMId  destination 
)
overridevirtual

Dequeues a specified number of bytes from a specified queue.

Parameters
u8QueueIndexQueue index of target queue
lengthlength to dequeue in bytes
destinationNEM destination to dequeue, 0 indicates any NEM.
Returns
A tuple containing a list of MessageComponent entries and the the total size in bytes across all entries.
Note
Unless restricted by configuration, the dequeue operation will search multiple queues (highest priority first) in order to return the specified number of bytes. If fragmentation is disabled, all packets in the initially specified queue that are larger than the requested size will be discarded.

Implements EMANE::Models::TDMA::QueueManager.

Definition at line 297 of file basicqueuemanager.cc.

◆ destroy()

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

Destroy the component.

Implements EMANE::Component.

Definition at line 255 of file basicqueuemanager.cc.

◆ enqueue()

size_t EMANE::Models::TDMA::BasicQueueManager::enqueue ( std::uint8_t  u8QueueIndex,
DownstreamPacket &&  pkt 
)
overridevirtual

Enqueues a packet in to a specified queue.

Parameters
u8QueueIndexQueue index of target queue
pktPacket to enqueue
Returns
The number of packets dropped as a result of this enqueue. This value would be non-zero in the case of overflow.

Implements EMANE::Models::TDMA::QueueManager.

Definition at line 264 of file basicqueuemanager.cc.

◆ getPacketQueueInfo()

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

Gets queue status.

Returns
A list of QueueInfo entries.

Implements EMANE::Models::TDMA::QueueManager.

Definition at line 392 of file basicqueuemanager.cc.

◆ initialize()

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

Initialize the component.

Exceptions
InitializeExceptionthrown when an error is encountered during initialization

Implements EMANE::Component.

Definition at line 62 of file basicqueuemanager.cc.

◆ postStart()

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

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

Reimplemented from EMANE::Component.

Definition at line 237 of file basicqueuemanager.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.

◆ setPacketStatusPublisher()

void EMANE::Models::TDMA::PacketStatusPublisherUser::setPacketStatusPublisher ( PacketStatusPublisher pPacketStatusPublisher)
inlineinherited

Sets the PacketStatusPublisher

Parameters
pPacketStatusPublisherPacketStatusPublisher reference

Definition at line 64 of file packetstatuspublisheruser.h.

◆ start()

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

Start the component.

Exceptions
StartExceptionthrown when an error is encountered during start.

Implements EMANE::Component.

Definition at line 228 of file basicqueuemanager.cc.

◆ stop()

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

Stop the component.

Exceptions
StopExceptionthrown when an error is encountered during stop

Implements EMANE::Component.

Definition at line 246 of file basicqueuemanager.cc.

Member Data Documentation

◆ id_

NEMId EMANE::Models::TDMA::QueueManager::id_
protectedinherited

Definition at line 115 of file queuemanager.h.

◆ pPacketStatusPublisher_

PacketStatusPublisher* EMANE::Models::TDMA::PacketStatusPublisherUser::pPacketStatusPublisher_
protectedinherited

Definition at line 70 of file packetstatuspublisheruser.h.

◆ pPlatformService_

PlatformServiceProvider* EMANE::PlatformServiceUser::pPlatformService_
protectedinherited

Definition at line 64 of file platformserviceuser.h.


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