SatFwdLinkSchedulerDefault schedules BB frames for forward link. More...
#include "satellite-scpc-scheduler.h"
Public Member Functions | |
SatScpcScheduler () | |
Construct a SatFwdLinkScheduler. More... | |
SatScpcScheduler (Ptr< SatBbFrameConf > conf, Mac48Address address, double carrierBandwidthInHz) | |
Actual constructor of a SatFwdLinkScheduler. More... | |
~SatScpcScheduler () | |
Destroy a SatFwdLinkScheduler. More... | |
virtual TypeId | GetInstanceTypeId (void) const |
Get the type ID of instance. More... | |
virtual std::pair< Ptr< SatBbFrame >, const Time > | GetNextFrame () |
Get next frame to be transmitted. More... | |
Public Member Functions inherited from ns3::SatFwdLinkScheduler | |
SatFwdLinkScheduler () | |
Construct a SatFwdLinkScheduler. More... | |
SatFwdLinkScheduler (Ptr< SatBbFrameConf > conf, Mac48Address address, double carrierBandwidthInHz) | |
Actual constructor of a SatFwdLinkScheduler. More... | |
~SatFwdLinkScheduler () | |
Destroy a SatFwdLinkScheduler. More... | |
virtual void | ClearAllPackets () |
Remove all packets being treated. More... | |
void | CnoInfoUpdated (Mac48Address utAddress, double cnoEstimate) |
Called when UT's C/N0 estimation is updated. More... | |
Time | GetDefaultFrameDuration () const |
Return the BB frame duration of the default frame format, i.e. More... | |
bool | SendControlMsg (Ptr< SatControlMessage > message, const Address &dest) const |
Method te send a control message to a destination. More... | |
void | SetDummyFrameSendingEnabled (bool dummyFrameSendingEnabled) |
Set the value of m_dummyFrameSendingEnabled. More... | |
void | SetSchedContextCallback (SatFwdLinkScheduler::SchedContextCallback cb) |
Method to set Tx opportunity callback. More... | |
void | SetSendControlMsgCallback (SatFwdLinkScheduler::SendControlMsgCallback cb) |
Method to set the control message sender callback. More... | |
void | SetTxOpportunityCallback (SatFwdLinkScheduler::TxOpportunityCallback cb) |
Method to set Tx opportunity callback. More... | |
Static Public Member Functions | |
static TypeId | GetTypeId (void) |
Get the type ID. More... | |
Static Public Member Functions inherited from ns3::SatFwdLinkScheduler | |
static bool | CompareSoFlowId (Ptr< SatSchedulingObject > obj1, Ptr< SatSchedulingObject > obj2) |
Compares to scheduling objects priorities. More... | |
static bool | CompareSoPriorityHol (Ptr< SatSchedulingObject > obj1, Ptr< SatSchedulingObject > obj2) |
Compares to scheduling objects priorities and HOL. More... | |
static bool | CompareSoPriorityLoad (Ptr< SatSchedulingObject > obj1, Ptr< SatSchedulingObject > obj2) |
Compares to scheduling objects priorities and load. More... | |
static TypeId | GetTypeId (void) |
Get the type ID. More... | |
Private Member Functions | |
void | DoDispose (void) |
Do dispose actions. More... | |
void | GetSchedulingObjects (std::vector< Ptr< SatSchedulingObject >> &output) |
Gets scheduling object in sorted order according to configured sorting criteria. More... | |
void | PeriodicTimerExpired () |
Handles periodic timer timeouts. More... | |
void | ScheduleBbFrames () |
Schedule BB Frames. More... | |
void | SendAndClearSymbolsSentStat () |
Send stats and reset all the symbols sent count for each slice to zero. More... | |
Private Attributes | |
Ptr< SatBbFrameContainer > | m_bbFrameContainer |
The container for BB Frames. More... | |
Time | m_schedulingStartThresholdTime |
Threshold time of total transmissions in BB Frame container to trigger a scheduling round. More... | |
Time | m_schedulingStopThresholdTime |
Threshold time of total transmissions in BB Frame container to stop a scheduling round. More... | |
uint32_t | m_symbolsSent |
The number of symbols sent for each slice during an allocation cycle. More... | |
Additional Inherited Members | |
Public Types inherited from ns3::SatFwdLinkScheduler | |
typedef Callback< void, std::vector< Ptr< SatSchedulingObject > > & > | SchedContextCallback |
Callback to get scheduling contexts from upper layer. More... | |
enum | ScheduleSortingCriteria_t { NO_SORT , BUFFERING_DELAY_SORT , BUFFERING_LOAD_SORT , RANDOM_SORT , PRIORITY_SORT } |
Types for sorting algorithm used by forward link scheduler. More... | |
typedef Callback< bool, Ptr< SatControlMessage >, const Address & > | SendControlMsgCallback |
Callback to notify upper layer about Tx opportunity. More... | |
typedef Callback< Ptr< Packet >, uint32_t, Mac48Address, uint8_t, uint32_t &, uint32_t & > | TxOpportunityCallback |
Callback to notify upper layer about Tx opportunity. More... | |
Protected Types inherited from ns3::SatFwdLinkScheduler | |
typedef std::map< Mac48Address, Ptr< SatCnoEstimator > > | CnoEstimatorMap_t |
Protected Member Functions inherited from ns3::SatFwdLinkScheduler | |
SatFwdLinkScheduler (const SatFwdLinkScheduler &) | |
bool | CnoMatchWithFrame (double cno, Ptr< SatBbFrame > frame) const |
Check if given estimated C/N0 match with given frame. More... | |
Ptr< SatCnoEstimator > | CreateCnoEstimator () |
Create estimator for the UT according to set attributes. More... | |
void | DoDispose (void) |
Do dispose actions. More... | |
double | GetSchedulingObjectCno (Ptr< SatSchedulingObject > ob) |
void | GetSchedulingObjects (std::vector< Ptr< SatSchedulingObject >> &output) |
Gets scheduling object in sorted order according to configured sorting criteria. More... | |
SatFwdLinkScheduler & | operator= (const SatFwdLinkScheduler &) |
void | PeriodicTimerExpired () |
Handles periodic timer timeouts. More... | |
void | ScheduleBbFrames () |
Schedule BB Frames. More... | |
void | SortSchedulingObjects (std::vector< Ptr< SatSchedulingObject >> &so) |
Sorts given scheduling objects according to configured sorting criteria. More... | |
Protected Attributes inherited from ns3::SatFwdLinkScheduler | |
ScheduleSortingCriteria_t | m_additionalSortCriteria |
Additional sorting criteria for scheduling objects received from LLC. More... | |
Ptr< SatBbFrameConf > | m_bbFrameConf |
Configured BB Frame conf. More... | |
double | m_carrierBandwidthInHz |
Carrier bandwidth in hertz where scheduler is associated to. More... | |
Time | m_cnoEstimationWindow |
Time window for C/N0 estimation. More... | |
CnoEstimatorMap_t | m_cnoEstimatorContainer |
C/N0 estimator per UT. More... | |
SatCnoEstimator::EstimationMode_t | m_cnoEstimatorMode |
Mode used for C/N0 estimator. More... | |
bool | m_dummyFrameSendingEnabled |
Flag indicating if Dummy Frames are sent or not. More... | |
Mac48Address | m_macAddress |
MAC address of the this instance (node) More... | |
Time | m_periodicInterval |
The interval for periodic scheduling timer. More... | |
Ptr< UniformRandomVariable > | m_random |
Random variable used in FWD link scheduling. More... | |
SatFwdLinkScheduler::SchedContextCallback | m_schedContextCallback |
The scheduling context getter callback. More... | |
TracedCallback< uint8_t, double > | m_schedulingSymbolRateTrace |
Traced callback for symbol rate, with flowId, requested Modcod info. More... | |
SatFwdLinkScheduler::SendControlMsgCallback | m_sendControlMsgCallback |
The control message sender callback. More... | |
SatFwdLinkScheduler::TxOpportunityCallback | m_txOpportunityCallback |
Callback to notify the txOpportunity to upper layer Returns a packet Attributes: payload in bytes. More... | |
SatFwdLinkSchedulerDefault schedules BB frames for forward link.
This is the reference case of the scheduler, without separation between slices. It uses only one instance of BbFrameContainer.
SatFwdLinkSchedulerDefault communicated through callback functions to request scheduling
objects and notifying TX opportunities.
GW MAC requests frames from scheduler through method GetNextFrame.
Definition at line 48 of file satellite-scpc-scheduler.h.
ns3::SatScpcScheduler::SatScpcScheduler | ( | ) |
Construct a SatFwdLinkScheduler.
This the default constructor for the SatFwdLinkScheduler is not supported.
Definition at line 70 of file satellite-scpc-scheduler.cc.
ns3::SatScpcScheduler::SatScpcScheduler | ( | Ptr< SatBbFrameConf > | conf, |
Mac48Address | address, | ||
double | carrierBandwidthInHz | ||
) |
Actual constructor of a SatFwdLinkScheduler.
conf | BB Frame configuration |
address | MAC address |
carrierBandwidthInHz | Carrier bandwidth where scheduler is associated to [Hz]. |
Definition at line 77 of file satellite-scpc-scheduler.cc.
References ns3::SatFwdLinkScheduler::m_bbFrameConf, m_bbFrameContainer, ns3::SatFwdLinkScheduler::m_periodicInterval, and PeriodicTimerExpired().
ns3::SatScpcScheduler::~SatScpcScheduler | ( | ) |
Destroy a SatFwdLinkScheduler.
This is the destructor for the SatFwdLinkScheduler.
Definition at line 94 of file satellite-scpc-scheduler.cc.
|
private |
Do dispose actions.
Definition at line 100 of file satellite-scpc-scheduler.cc.
References ns3::SatFwdLinkScheduler::DoDispose(), and m_bbFrameContainer.
|
virtual |
Get the type ID of instance.
Reimplemented from ns3::SatFwdLinkScheduler.
Definition at line 63 of file satellite-scpc-scheduler.cc.
References GetTypeId().
|
virtual |
Get next frame to be transmitted.
Reimplemented from ns3::SatFwdLinkScheduler.
Definition at line 108 of file satellite-scpc-scheduler.cc.
References ns3::SatEnums::DUMMY_FRAME, ns3::SatFwdLinkScheduler::m_bbFrameConf, m_bbFrameContainer, ns3::SatFwdLinkScheduler::m_carrierBandwidthInHz, ns3::SatFwdLinkScheduler::m_dummyFrameSendingEnabled, ns3::SatFwdLinkScheduler::m_macAddress, m_schedulingStartThresholdTime, m_symbolsSent, ScheduleBbFrames(), ns3::SatMacTag::SetDestAddress(), ns3::SatAddressE2ETag::SetE2EDestAddress(), ns3::SatAddressE2ETag::SetE2ESourceAddress(), and ns3::SatMacTag::SetSourceAddress().
|
private |
Gets scheduling object in sorted order according to configured sorting criteria.
output | reference to a vector which will be filled with pointers to the scheduling objects available for scheduling. |
Definition at line 254 of file satellite-scpc-scheduler.cc.
References m_bbFrameContainer, ns3::SatFwdLinkScheduler::m_schedContextCallback, m_schedulingStopThresholdTime, and ns3::SatFwdLinkScheduler::SortSchedulingObjects().
Referenced by ScheduleBbFrames().
|
static |
Get the type ID.
Definition at line 36 of file satellite-scpc-scheduler.cc.
References m_bbFrameContainer, m_schedulingStartThresholdTime, and m_schedulingStopThresholdTime.
Referenced by GetInstanceTypeId().
|
private |
Handles periodic timer timeouts.
Definition at line 168 of file satellite-scpc-scheduler.cc.
References ns3::SatFwdLinkScheduler::m_periodicInterval, ScheduleBbFrames(), and SendAndClearSymbolsSentStat().
Referenced by SatScpcScheduler().
|
private |
Schedule BB Frames.
Definition at line 189 of file satellite-scpc-scheduler.cc.
References ns3::SatFwdLinkScheduler::GetSchedulingObjectCno(), GetSchedulingObjects(), ns3::SatFwdLinkScheduler::m_bbFrameConf, m_bbFrameContainer, ns3::SatFwdLinkScheduler::m_carrierBandwidthInHz, m_schedulingStopThresholdTime, and ns3::SatFwdLinkScheduler::m_txOpportunityCallback.
Referenced by GetNextFrame(), and PeriodicTimerExpired().
|
privatevirtual |
Send stats and reset all the symbols sent count for each slice to zero.
Reimplemented from ns3::SatFwdLinkScheduler.
Definition at line 179 of file satellite-scpc-scheduler.cc.
References ns3::SatFwdLinkScheduler::m_schedulingSymbolRateTrace, and m_symbolsSent.
Referenced by PeriodicTimerExpired().
|
private |
The container for BB Frames.
Definition at line 126 of file satellite-scpc-scheduler.h.
Referenced by SatScpcScheduler(), DoDispose(), GetNextFrame(), GetSchedulingObjects(), GetTypeId(), and ScheduleBbFrames().
|
private |
Threshold time of total transmissions in BB Frame container to trigger a scheduling round.
Definition at line 131 of file satellite-scpc-scheduler.h.
Referenced by GetNextFrame(), and GetTypeId().
|
private |
Threshold time of total transmissions in BB Frame container to stop a scheduling round.
Definition at line 136 of file satellite-scpc-scheduler.h.
Referenced by GetSchedulingObjects(), GetTypeId(), and ScheduleBbFrames().
|
private |
The number of symbols sent for each slice during an allocation cycle.
Definition at line 141 of file satellite-scpc-scheduler.h.
Referenced by GetNextFrame(), and SendAndClearSymbolsSentStat().