BB Frame container class. More...
#include "satellite-bbframe-container.h"
Public Member Functions | |
SatBbFrameContainer () | |
Default constructor for SatBbFrameContainer not supported. More... | |
SatBbFrameContainer (std::vector< SatEnums::SatModcod_t > &modcodsInUse, Ptr< SatBbFrameConf > conf) | |
Actual constructor for SatBbFrameContainer. More... | |
virtual | ~SatBbFrameContainer () |
Destructor. More... | |
void | AddData (uint32_t priorityClass, SatEnums::SatModcod_t modcod, Ptr< Packet > data) |
Add data according to given priority class and MODCOD to container. More... | |
void | ClearAllFrames () |
Remove all frames in containers. More... | |
uint32_t | GetBytesLeftInTailFrame (uint32_t priorityClass, SatEnums::SatModcod_t modcod) |
Get bytes left in last frame of the queue with the given priority class and MODCOD. More... | |
uint32_t | GetFrameSymbols (SatEnums::SatModcod_t modcod) |
Get the total number of symbols, incuding headers, when creating a new BBFrame. More... | |
uint32_t | GetMaxFramePayloadInBytes (uint32_t priorityClass, SatEnums::SatModcod_t modcod) |
Get maximum payload bytes of a frame with the given priority class and MODCOD. More... | |
uint32_t | GetMaxSymbolRate () |
Set the maximum symbol rate of this container, used for time-slicing. More... | |
SatEnums::SatModcod_t | GetModcod (uint32_t priorityClass, double cno) |
Get maximum MODCOD with the given priority class and C/N0. More... | |
Ptr< SatBbFrame > | GetNextFrame () |
Get next frame from container to transmit. More... | |
Time | GetTotalDuration () const |
Get total transmission duration of the frames in container. More... | |
bool | IsEmpty (uint32_t priorityClass, SatEnums::SatModcod_t modcod) |
Indicates if the container for a ModCod and priority is empty (no BBFrame). More... | |
void | MergeBbFrames (double carrierBandwidthInHz) |
void | SetMaxSymbolRate (uint32_t maxSymbolRate) |
Set the maximum symbol rate of this container, used for time-slicing. More... | |
Static Public Member Functions | |
static TypeId | GetTypeId (void) |
Get the type ID. More... | |
Private Types | |
typedef std::map< SatEnums::SatModcod_t, std::deque< Ptr< SatBbFrame > > > | FrameContainer_t |
Private Member Functions | |
void | CreateFrameToTail (uint32_t priorityClass, SatEnums::SatModcod_t modcod) |
Create short or normal frame according to MODCOD and member #m_bbFrameUsageMode. More... | |
Private Attributes | |
Ptr< SatBbFrameConf > | m_bbFrameConf |
TracedCallback< Ptr< SatBbFrame >, Ptr< SatBbFrame > > | m_bbFrameMergeTrace |
Trace for merged BB frames. More... | |
FrameContainer_t | m_container |
std::deque< Ptr< SatBbFrame > > | m_ctrlContainer |
SatEnums::SatBbFrameType_t | m_defaultBbFrameType |
uint32_t | m_maxSymbolRate |
Time | m_totalDuration |
BB Frame container class.
Holds information of BB Frames for forward link scheduling.
SatBbFrameContainer implements own queues (container) for every used MODCODs. These MODCOD queues are used for non control packets (priority class different than 0).
For control messages (priority class 0) is used only one queue with most robust MODCOD.
Definition at line 50 of file satellite-bbframe-container.h.
|
private |
Definition at line 161 of file satellite-bbframe-container.h.
ns3::SatBbFrameContainer::SatBbFrameContainer | ( | ) |
Default constructor for SatBbFrameContainer not supported.
Definition at line 42 of file satellite-bbframe-container.cc.
ns3::SatBbFrameContainer::SatBbFrameContainer | ( | std::vector< SatEnums::SatModcod_t > & | modcodsInUse, |
Ptr< SatBbFrameConf > | conf | ||
) |
Actual constructor for SatBbFrameContainer.
modcodsInUse | MODCODs in use. |
conf | Pointer to BB Frame configuration. |
Definition at line 50 of file satellite-bbframe-container.cc.
References m_bbFrameConf, m_container, m_defaultBbFrameType, ns3::SatEnums::NORMAL_FRAME, ns3::SatEnums::SHORT_FRAME, and ns3::SatEnums::SHORT_FRAMES.
|
virtual |
void ns3::SatBbFrameContainer::AddData | ( | uint32_t | priorityClass, |
SatEnums::SatModcod_t | modcod, | ||
Ptr< Packet > | data | ||
) |
Add data according to given priority class and MODCOD to container.
priorityClass | Priority class of the data (packet) to be added |
modcod | MODCOD of the data (packet) to be added. MODCOD is ignored when priorityClass is 0. |
data | Data (packet) to be added to container |
Definition at line 191 of file satellite-bbframe-container.cc.
References CreateFrameToTail(), GetBytesLeftInTailFrame(), m_bbFrameConf, m_container, m_ctrlContainer, m_defaultBbFrameType, m_totalDuration, ns3::SatEnums::SHORT_AND_NORMAL_FRAMES, and ns3::SatEnums::SHORT_FRAME.
void ns3::SatBbFrameContainer::ClearAllFrames | ( | ) |
Remove all frames in containers.
Definition at line 253 of file satellite-bbframe-container.cc.
References m_container, and m_ctrlContainer.
|
private |
Create short or normal frame according to MODCOD and member #m_bbFrameUsageMode.
Created frame is added back of appropriate container.
priorityClass | Priority for created frame |
modcod | MODCOD for created frame |
Definition at line 301 of file satellite-bbframe-container.cc.
References m_bbFrameConf, m_container, m_ctrlContainer, m_defaultBbFrameType, and m_totalDuration.
Referenced by AddData().
uint32_t ns3::SatBbFrameContainer::GetBytesLeftInTailFrame | ( | uint32_t | priorityClass, |
SatEnums::SatModcod_t | modcod | ||
) |
Get bytes left in last frame of the queue with the given priority class and MODCOD.
priorityClass | Priority class of the queue requested |
modcod | MODOCOD of the queue requested. MODCOD is ignored when priorityClass is 0. |
Definition at line 143 of file satellite-bbframe-container.cc.
References GetMaxFramePayloadInBytes(), m_bbFrameConf, m_container, and m_ctrlContainer.
Referenced by AddData().
uint32_t ns3::SatBbFrameContainer::GetFrameSymbols | ( | SatEnums::SatModcod_t | modcod | ) |
Get the total number of symbols, incuding headers, when creating a new BBFrame.
modcod | MODOCOD of the queue requested. |
Definition at line 234 of file satellite-bbframe-container.cc.
References m_bbFrameConf, and m_defaultBbFrameType.
uint32_t ns3::SatBbFrameContainer::GetMaxFramePayloadInBytes | ( | uint32_t | priorityClass, |
SatEnums::SatModcod_t | modcod | ||
) |
Get maximum payload bytes of a frame with the given priority class and MODCOD.
priorityClass | Priority class of the frame payload requested |
modcod | MODOCOD of the queue requested. MODCOD is ignored when priorityClass is 0. |
Definition at line 120 of file satellite-bbframe-container.cc.
References ns3::SatConstVariables::BITS_PER_BYTE, m_bbFrameConf, and m_defaultBbFrameType.
Referenced by GetBytesLeftInTailFrame().
uint32_t ns3::SatBbFrameContainer::GetMaxSymbolRate | ( | ) |
Set the maximum symbol rate of this container, used for time-slicing.
Definition at line 247 of file satellite-bbframe-container.cc.
References m_maxSymbolRate.
SatEnums::SatModcod_t ns3::SatBbFrameContainer::GetModcod | ( | uint32_t | priorityClass, |
double | cno | ||
) |
Get maximum MODCOD with the given priority class and C/N0.
priorityClass | Priority class of the MODCOD requested |
cno | C/N0 value of the MODCOD requested |
Definition at line 101 of file satellite-bbframe-container.cc.
References m_bbFrameConf, and m_defaultBbFrameType.
Ptr< SatBbFrame > ns3::SatBbFrameContainer::GetNextFrame | ( | ) |
Get next frame from container to transmit.
Definition at line 265 of file satellite-bbframe-container.cc.
References m_container, m_ctrlContainer, and m_totalDuration.
Time ns3::SatBbFrameContainer::GetTotalDuration | ( | ) | const |
Get total transmission duration of the frames in container.
Definition at line 228 of file satellite-bbframe-container.cc.
References m_totalDuration.
|
static |
Get the type ID.
Definition at line 87 of file satellite-bbframe-container.cc.
References m_bbFrameMergeTrace.
bool ns3::SatBbFrameContainer::IsEmpty | ( | uint32_t | priorityClass, |
SatEnums::SatModcod_t | modcod | ||
) |
Indicates if the container for a ModCod and priority is empty (no BBFrame).
priorityClass | Priority class of the container |
modcod | MODCOD of the container. MODCOD is ignored when priorityClass is 0. |
true | if a BBFrame is already open |
Definition at line 176 of file satellite-bbframe-container.cc.
References m_container, and m_ctrlContainer.
void ns3::SatBbFrameContainer::MergeBbFrames | ( | double | carrierBandwidthInHz | ) |
Definition at line 327 of file satellite-bbframe-container.cc.
References m_bbFrameConf, m_bbFrameMergeTrace, m_container, m_ctrlContainer, m_totalDuration, and ns3::SatEnums::SHORT_AND_NORMAL_FRAMES.
void ns3::SatBbFrameContainer::SetMaxSymbolRate | ( | uint32_t | maxSymbolRate | ) |
Set the maximum symbol rate of this container, used for time-slicing.
maxSymbolRate | The new symbol rate. |
Definition at line 241 of file satellite-bbframe-container.cc.
References m_maxSymbolRate.
|
private |
Definition at line 166 of file satellite-bbframe-container.h.
Referenced by SatBbFrameContainer(), AddData(), CreateFrameToTail(), GetBytesLeftInTailFrame(), GetFrameSymbols(), GetMaxFramePayloadInBytes(), GetModcod(), and MergeBbFrames().
|
private |
Trace for merged BB frames.
BB | frame merge to \parma BB frame merge from |
Definition at line 175 of file satellite-bbframe-container.h.
Referenced by GetTypeId(), and MergeBbFrames().
|
private |
Definition at line 164 of file satellite-bbframe-container.h.
Referenced by SatBbFrameContainer(), ~SatBbFrameContainer(), AddData(), ClearAllFrames(), CreateFrameToTail(), GetBytesLeftInTailFrame(), GetNextFrame(), IsEmpty(), and MergeBbFrames().
|
private |
Definition at line 163 of file satellite-bbframe-container.h.
Referenced by AddData(), ClearAllFrames(), CreateFrameToTail(), GetBytesLeftInTailFrame(), GetNextFrame(), IsEmpty(), and MergeBbFrames().
|
private |
Definition at line 167 of file satellite-bbframe-container.h.
Referenced by SatBbFrameContainer(), AddData(), CreateFrameToTail(), GetFrameSymbols(), GetMaxFramePayloadInBytes(), and GetModcod().
|
private |
Definition at line 168 of file satellite-bbframe-container.h.
Referenced by GetMaxSymbolRate(), and SetMaxSymbolRate().
|
private |
Definition at line 165 of file satellite-bbframe-container.h.
Referenced by AddData(), CreateFrameToTail(), GetNextFrame(), GetTotalDuration(), and MergeBbFrames().