SatFwdLinkSchedulerTimeSlicing schedules BB frames for forward link. More...
#include "satellite-fwd-link-scheduler-time-slicing.h"
Public Member Functions | |
| SatFwdLinkSchedulerTimeSlicing () | |
| Construct a SatFwdLinkScheduler. | |
| SatFwdLinkSchedulerTimeSlicing (Ptr< SatBbFrameConf > conf, Mac48Address address, double carrierBandwidthInHz) | |
| Actual constructor of a SatFwdLinkScheduler. | |
| ~SatFwdLinkSchedulerTimeSlicing () | |
| Destroy a SatFwdLinkScheduler. | |
| virtual void | ClearAllPackets () |
| Remove all packets being treated. | |
| virtual std::pair< Ptr< SatBbFrame >, const Time > | GetNextFrame () |
| Get next frame to be transmitted. | |
| virtual void | NotifyConstructionCompleted () override |
| Notifier called once the ObjectBase is fully constructed. | |
| Public Member Functions inherited from ns3::SatFwdLinkScheduler | |
| SatFwdLinkScheduler () | |
| Construct a SatFwdLinkScheduler. | |
| SatFwdLinkScheduler (Ptr< SatBbFrameConf > conf, Mac48Address address, double carrierBandwidthInHz) | |
| Actual constructor of a SatFwdLinkScheduler. | |
| ~SatFwdLinkScheduler () | |
| Destroy a SatFwdLinkScheduler. | |
| void | CnoInfoUpdated (Mac48Address utAddress, double cnoEstimate) |
| Called when UT's C/N0 estimation is updated. | |
| Time | GetDefaultFrameDuration () const |
| Return the BB frame duration of the default frame format, i.e. | |
| bool | SendControlMsg (Ptr< SatControlMessage > message, const Address &dest) const |
| Method te send a control message to a destination. | |
| void | SetDummyFrameSendingEnabled (bool dummyFrameSendingEnabled) |
| Set the value of m_dummyFrameSendingEnabled. | |
| void | SetSchedContextCallback (SatFwdLinkScheduler::SchedContextCallback cb) |
| Method to set Tx opportunity callback. | |
| void | SetSendControlMsgCallback (SatFwdLinkScheduler::SendControlMsgCallback cb) |
| Method to set the control message sender callback. | |
| void | SetTxOpportunityCallback (SatFwdLinkScheduler::TxOpportunityCallback cb) |
| Method to set Tx opportunity callback. | |
Static Public Member Functions | |
| static TypeId | GetTypeId (void) |
| Get the type ID. | |
| Static Public Member Functions inherited from ns3::SatFwdLinkScheduler | |
| static bool | CompareSoFlowId (Ptr< SatSchedulingObject > obj1, Ptr< SatSchedulingObject > obj2) |
| Compares to scheduling objects priorities. | |
| static bool | CompareSoPriorityHol (Ptr< SatSchedulingObject > obj1, Ptr< SatSchedulingObject > obj2) |
| Compares to scheduling objects priorities and HOL. | |
| static bool | CompareSoPriorityLoad (Ptr< SatSchedulingObject > obj1, Ptr< SatSchedulingObject > obj2) |
| Compares to scheduling objects priorities and load. | |
| static TypeId | GetTypeId (void) |
| Get the type ID. | |
Private Member Functions | |
| bool | CanOpenBbFrame (Mac48Address address, uint32_t priorityClass, SatEnums::SatModcod_t modcod) |
| void | DoDispose (void) |
| Do dispose actions. | |
| void | GetSchedulingObjects (std::vector< Ptr< SatSchedulingObject > > &output) |
| Gets scheduling object in sorted order according to configured sorting criteria. | |
| uint32_t | GetSymbols (uint8_t sliceId, SatEnums::SatModcod_t modcod) |
| Time | GetTotalDuration () |
| void | ScheduleBbFrames () |
| Schedule BB Frames. | |
| void | SendAndClearSymbolsSentStat () |
| Send stats and reset all the symbols sent count for each slice to zero. | |
| void | SendTimeSliceSubscription (Mac48Address address, std::vector< uint8_t > slices) |
Private Attributes | |
| std::map< uint8_t, Ptr< SatBbFrameContainer > > | m_bbFrameContainers |
| The containers for BBFrames. | |
| uint8_t | m_lastSliceAssigned |
| The slice of the last MAC address discovered. | |
| uint8_t | m_lastSliceDequeued |
| The last slice from which a BBFrame has been sent. | |
| uint8_t | m_numberOfSlices |
| The number of slices. | |
| std::map< Mac48Address, uint8_t > | m_slicesMapping |
| The association between a destination MAC address and its slice. | |
| std::map< uint8_t, uint32_t > | m_symbolsSent |
| The number of symbols sent for each slice during an allocation cycle. | |
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. | |
| 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. | |
| typedef Callback< Ptr< Packet >, uint32_t, Mac48Address, uint8_t, uint32_t &, uint32_t & > | TxOpportunityCallback |
| Callback to notify upper layer about Tx opportunity. | |
| 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. | |
| Ptr< SatCnoEstimator > | CreateCnoEstimator () |
| Create estimator for the UT according to set attributes. | |
| void | DoDispose (void) |
| Do dispose actions. | |
| double | GetSchedulingObjectCno (Ptr< SatSchedulingObject > ob) |
| void | GetSchedulingObjects (std::vector< Ptr< SatSchedulingObject > > &output) |
| Gets scheduling object in sorted order according to configured sorting criteria. | |
| SatFwdLinkScheduler & | operator= (const SatFwdLinkScheduler &) |
| void | PeriodicTimerExpired () |
| Handles periodic timer timeouts. | |
| void | SortSchedulingObjects (std::vector< Ptr< SatSchedulingObject > > &so) |
| Sorts given scheduling objects according to configured sorting criteria. | |
| Protected Attributes inherited from ns3::SatFwdLinkScheduler | |
| ScheduleSortingCriteria_t | m_additionalSortCriteria |
| Additional sorting criteria for scheduling objects received from LLC. | |
| Ptr< SatBbFrameConf > | m_bbFrameConf |
| Configured BB Frame conf. | |
| double | m_carrierBandwidthInHz |
| Carrier bandwidth in hertz where scheduler is associated to. | |
| Time | m_cnoEstimationWindow |
| Time window for C/N0 estimation. | |
| CnoEstimatorMap_t | m_cnoEstimatorContainer |
| C/N0 estimator per UT. | |
| SatCnoEstimator::EstimationMode_t | m_cnoEstimatorMode |
| Mode used for C/N0 estimator. | |
| bool | m_dummyFrameSendingEnabled |
| Flag indicating if Dummy Frames are sent or not. | |
| Mac48Address | m_macAddress |
| MAC address of the this instance (node). | |
| Time | m_periodicInterval |
| The interval for periodic scheduling timer. | |
| Ptr< UniformRandomVariable > | m_random |
| Random variable used in FWD link scheduling. | |
| SatFwdLinkScheduler::SchedContextCallback | m_schedContextCallback |
| The scheduling context getter callback. | |
| TracedCallback< uint8_t, double > | m_schedulingSymbolRateTrace |
| Traced callback for symbol rate, with flowId, requested Modcod info. | |
| SatFwdLinkScheduler::SendControlMsgCallback | m_sendControlMsgCallback |
| The control message sender callback. | |
| SatFwdLinkScheduler::TxOpportunityCallback | m_txOpportunityCallback |
| Callback to notify the txOpportunity to upper layer Returns a packet Attributes: payload in bytes. | |
SatFwdLinkSchedulerTimeSlicing schedules BB frames for forward link.
It classifies the packets into different time slices depending on its destination MAC address.
SatFwdLinkSchedulerTimeSlicing 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-fwd-link-scheduler-time-slicing.h.
| ns3::SatFwdLinkSchedulerTimeSlicing::SatFwdLinkSchedulerTimeSlicing | ( | ) |
Construct a SatFwdLinkScheduler.
This the default constructor for the SatFwdLinkScheduler is not supported.
Definition at line 52 of file satellite-fwd-link-scheduler-time-slicing.cc.
References ns3::SatFwdLinkScheduler::SatFwdLinkScheduler().
| ns3::SatFwdLinkSchedulerTimeSlicing::SatFwdLinkSchedulerTimeSlicing | ( | 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 59 of file satellite-fwd-link-scheduler-time-slicing.cc.
References ns3::SatFwdLinkScheduler::SatFwdLinkScheduler(), m_lastSliceAssigned, and m_lastSliceDequeued.
| ns3::SatFwdLinkSchedulerTimeSlicing::~SatFwdLinkSchedulerTimeSlicing | ( | ) |
Destroy a SatFwdLinkScheduler.
This is the destructor for the SatFwdLinkScheduler.
Definition at line 132 of file satellite-fwd-link-scheduler-time-slicing.cc.
|
private |
Definition at line 428 of file satellite-fwd-link-scheduler-time-slicing.cc.
References GetSymbols(), m_bbFrameContainers, ns3::SatFwdLinkScheduler::m_periodicInterval, m_slicesMapping, and ns3::SatEnums::SAT_NONVALID_MODCOD.
Referenced by ScheduleBbFrames().
|
virtual |
Remove all packets being treated.
Reimplemented from ns3::SatFwdLinkScheduler.
Definition at line 238 of file satellite-fwd-link-scheduler-time-slicing.cc.
References m_bbFrameContainers.
|
private |
Do dispose actions.
Definition at line 138 of file satellite-fwd-link-scheduler-time-slicing.cc.
References ns3::SatFwdLinkScheduler::DoDispose(), and m_bbFrameContainers.
|
virtual |
Get next frame to be transmitted.
Reimplemented from ns3::SatFwdLinkScheduler.
Definition at line 146 of file satellite-fwd-link-scheduler-time-slicing.cc.
References ns3::SatEnums::DUMMY_FRAME, ns3::SatFwdLinkScheduler::m_bbFrameConf, m_bbFrameContainers, ns3::SatFwdLinkScheduler::m_carrierBandwidthInHz, ns3::SatFwdLinkScheduler::m_dummyFrameSendingEnabled, m_lastSliceDequeued, ns3::SatFwdLinkScheduler::m_macAddress, m_numberOfSlices, ns3::SatFwdLinkScheduler::m_periodicInterval, m_symbolsSent, 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 381 of file satellite-fwd-link-scheduler-time-slicing.cc.
References GetTotalDuration(), ns3::SatFwdLinkScheduler::m_periodicInterval, ns3::SatFwdLinkScheduler::m_schedContextCallback, and ns3::SatFwdLinkScheduler::SortSchedulingObjects().
Referenced by ScheduleBbFrames().
|
private |
Definition at line 477 of file satellite-fwd-link-scheduler-time-slicing.cc.
References m_bbFrameContainers, ns3::SatFwdLinkScheduler::m_carrierBandwidthInHz, and ns3::SatEnums::SAT_NONVALID_MODCOD.
Referenced by CanOpenBbFrame().
|
private |
Definition at line 395 of file satellite-fwd-link-scheduler-time-slicing.cc.
References m_bbFrameContainers.
Referenced by GetSchedulingObjects(), and ScheduleBbFrames().
|
static |
Get the type ID.
Definition at line 38 of file satellite-fwd-link-scheduler-time-slicing.cc.
References ns3::SatFwdLinkScheduler::SatFwdLinkScheduler(), and m_numberOfSlices.
|
overridevirtual |
Notifier called once the ObjectBase is fully constructed.
This method is invoked once all member attributes have been initialized. Subclasses can override this method to be notified of this event but if they do this, they must chain up to their parent's NotifyConstructionCompleted method.
Reimplemented from ns3::SatFwdLinkScheduler.
Definition at line 70 of file satellite-fwd-link-scheduler-time-slicing.cc.
References ns3::SatFwdLinkScheduler::m_bbFrameConf, m_bbFrameContainers, ns3::SatFwdLinkScheduler::m_carrierBandwidthInHz, m_numberOfSlices, ns3::SatFwdLinkScheduler::m_periodicInterval, m_symbolsSent, ns3::SatEnums::NORMAL_FRAME, ns3::SatFwdLinkScheduler::NotifyConstructionCompleted(), ns3::SatEnums::SAT_NONVALID_MODCOD, and ns3::SatEnums::SHORT_FRAME.
|
privatevirtual |
Schedule BB Frames.
Implements ns3::SatFwdLinkScheduler.
Definition at line 270 of file satellite-fwd-link-scheduler-time-slicing.cc.
References CanOpenBbFrame(), ns3::SatFwdLinkScheduler::GetSchedulingObjectCno(), GetSchedulingObjects(), GetTotalDuration(), ns3::SatFwdLinkScheduler::m_bbFrameConf, m_bbFrameContainers, ns3::SatFwdLinkScheduler::m_carrierBandwidthInHz, m_lastSliceAssigned, m_numberOfSlices, ns3::SatFwdLinkScheduler::m_periodicInterval, m_slicesMapping, ns3::SatFwdLinkScheduler::m_txOpportunityCallback, ScheduleBbFrames(), and SendTimeSliceSubscription().
Referenced by ScheduleBbFrames().
|
privatevirtual |
Send stats and reset all the symbols sent count for each slice to zero.
Implements ns3::SatFwdLinkScheduler.
Definition at line 250 of file satellite-fwd-link-scheduler-time-slicing.cc.
References m_numberOfSlices, ns3::SatFwdLinkScheduler::m_schedulingSymbolRateTrace, and m_symbolsSent.
|
private |
Definition at line 411 of file satellite-fwd-link-scheduler-time-slicing.cc.
References ns3::SatFwdLinkScheduler::m_sendControlMsgCallback.
Referenced by ScheduleBbFrames().
|
private |
The containers for BBFrames.
The keys are the slices and the values the associated container
Definition at line 162 of file satellite-fwd-link-scheduler-time-slicing.h.
Referenced by CanOpenBbFrame(), ClearAllPackets(), DoDispose(), GetNextFrame(), GetSymbols(), GetTotalDuration(), NotifyConstructionCompleted(), and ScheduleBbFrames().
|
private |
The slice of the last MAC address discovered.
Used to associated destination MAC address to a slice following a Round Robin law.
Definition at line 184 of file satellite-fwd-link-scheduler-time-slicing.h.
Referenced by SatFwdLinkSchedulerTimeSlicing(), and ScheduleBbFrames().
|
private |
The last slice from which a BBFrame has been sent.
used for Round Robin scheduling.
Definition at line 189 of file satellite-fwd-link-scheduler-time-slicing.h.
Referenced by SatFwdLinkSchedulerTimeSlicing(), and GetNextFrame().
|
private |
The number of slices.
Definition at line 178 of file satellite-fwd-link-scheduler-time-slicing.h.
Referenced by GetNextFrame(), GetTypeId(), NotifyConstructionCompleted(), ScheduleBbFrames(), and SendAndClearSymbolsSentStat().
|
private |
The association between a destination MAC address and its slice.
Slice 0 is the container for control BBFrames that are broadcasted to all UT.
Definition at line 168 of file satellite-fwd-link-scheduler-time-slicing.h.
Referenced by CanOpenBbFrame(), and ScheduleBbFrames().
|
private |
The number of symbols sent for each slice during an allocation cycle.
Definition at line 173 of file satellite-fwd-link-scheduler-time-slicing.h.
Referenced by GetNextFrame(), NotifyConstructionCompleted(), and SendAndClearSymbolsSentStat().