A container of received TBTPs. More...
#include "satellite-tbtp-container.h"
Public Member Functions | |
SatTbtpContainer () | |
Default constructor. More... | |
SatTbtpContainer (Ptr< SatSuperframeSeq > seq) | |
Constructor with initialization parameters. More... | |
~SatTbtpContainer () | |
Destructor for SatTbtpContainer. More... | |
void | Add (Time startTime, Ptr< SatTbtpMessage > tbtp) |
Add a TBTP message to the container. More... | |
void | Clear () |
virtual void | DoDispose () |
Dispose of this class instance. More... | |
bool | HasScheduledTimeSlots () |
Method of checking whether the UT has been scheduled time slots into the future. More... | |
void | SetMacAddress (Mac48Address address) |
Set the MAC address of this node. More... | |
Static Public Member Functions | |
static TypeId | GetTypeId (void) |
Get the type ID. More... | |
Private Types | |
typedef std::multimap< Time, Ptr< SatTbtpMessage > > | TbtpMap_t |
Private Member Functions | |
void | RemovePastTbtps () |
Function for removing the TBTPs which are in the past. More... | |
Private Attributes | |
Mac48Address | m_address |
Address of this UT. More... | |
uint32_t | m_maxStoredTbtps |
Maximum stored TBTPs in the container. More... | |
uint32_t | m_rcvdTbtps |
Number of received TBTPs. More... | |
Time | m_superFrameDuration |
Superframe duration. More... | |
Ptr< SatSuperframeSeq > | m_superframeSeq |
Superframe sequence. More... | |
TbtpMap_t | m_tbtps |
A container of received TBTPs.
All the received TBTPs with the calculated transmit time are stored here. The container may be used to check whether the UT has known scheduled time slots in the future.
Definition at line 68 of file satellite-tbtp-container.h.
|
private |
Definition at line 127 of file satellite-tbtp-container.h.
ns3::SatTbtpContainer::SatTbtpContainer | ( | ) |
Default constructor.
Definition at line 58 of file satellite-tbtp-container.cc.
ns3::SatTbtpContainer::SatTbtpContainer | ( | Ptr< SatSuperframeSeq > | seq | ) |
Constructor with initialization parameters.
seq |
Definition at line 67 of file satellite-tbtp-container.cc.
ns3::SatTbtpContainer::~SatTbtpContainer | ( | ) |
Destructor for SatTbtpContainer.
Definition at line 77 of file satellite-tbtp-container.cc.
void ns3::SatTbtpContainer::Add | ( | Time | startTime, |
Ptr< SatTbtpMessage > | tbtp | ||
) |
Add a TBTP message to the container.
startTime | TBTP superframe transmit start time |
tbtp | TBTP message |
Definition at line 96 of file satellite-tbtp-container.cc.
References m_maxStoredTbtps, m_rcvdTbtps, and m_tbtps.
void ns3::SatTbtpContainer::Clear | ( | ) |
Definition at line 112 of file satellite-tbtp-container.cc.
References m_tbtps.
|
virtual |
Dispose of this class instance.
Definition at line 82 of file satellite-tbtp-container.cc.
References m_tbtps.
|
static |
Get the type ID.
Definition at line 45 of file satellite-tbtp-container.cc.
References m_maxStoredTbtps.
bool ns3::SatTbtpContainer::HasScheduledTimeSlots | ( | ) |
Method of checking whether the UT has been scheduled time slots into the future.
The time slots are not necessarily in increasing order in the TBTP. Sort the time slots into increasing order based on time.
Calculate the duration of the last slot. To be able to do that we need the superframe conf, frame conf, time slot conf and symbol rate.
Check that the TBTP has a time slot which is in the future. It does not matter how long to the future the time slot is, since the same method may be used for both CRDSA and SA, and we do not have any idea of what are their randomization intervals etc.
Definition at line 138 of file satellite-tbtp-container.cc.
References m_address, m_superframeSeq, m_tbtps, RemovePastTbtps(), and ns3::SatConstVariables::SUPERFRAME_SEQUENCE.
Referenced by ns3::SatUtMac::SetRandomAccess().
|
private |
Function for removing the TBTPs which are in the past.
Definition at line 120 of file satellite-tbtp-container.cc.
References m_superFrameDuration, and m_tbtps.
Referenced by HasScheduledTimeSlots().
void ns3::SatTbtpContainer::SetMacAddress | ( | Mac48Address | address | ) |
Set the MAC address of this node.
address | MAC address of this node |
Definition at line 89 of file satellite-tbtp-container.cc.
References m_address.
|
private |
Address of this UT.
Definition at line 133 of file satellite-tbtp-container.h.
Referenced by HasScheduledTimeSlots(), and SetMacAddress().
|
private |
Maximum stored TBTPs in the container.
Definition at line 143 of file satellite-tbtp-container.h.
Referenced by Add(), and GetTypeId().
|
private |
Number of received TBTPs.
Definition at line 148 of file satellite-tbtp-container.h.
Referenced by Add().
|
private |
Superframe duration.
Definition at line 153 of file satellite-tbtp-container.h.
Referenced by RemovePastTbtps().
|
private |
Superframe sequence.
Definition at line 138 of file satellite-tbtp-container.h.
Referenced by HasScheduledTimeSlots().
|
private |
Definition at line 128 of file satellite-tbtp-container.h.
Referenced by Add(), Clear(), DoDispose(), HasScheduledTimeSlots(), and RemovePastTbtps().