ns3::SatTbtpContainer Class Reference

A container of received TBTPs. More...

#include "satellite-tbtp-container.h"

+ Inheritance diagram for ns3::SatTbtpContainer:
+ Collaboration diagram for ns3::SatTbtpContainer:

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< SatSuperframeSeqm_superframeSeq
 Superframe sequence. More...
 
TbtpMap_t m_tbtps
 

Detailed Description

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 67 of file satellite-tbtp-container.h.

Member Typedef Documentation

◆ TbtpMap_t

typedef std::multimap<Time, Ptr<SatTbtpMessage> > ns3::SatTbtpContainer::TbtpMap_t
private

Definition at line 126 of file satellite-tbtp-container.h.

Constructor & Destructor Documentation

◆ SatTbtpContainer() [1/2]

ns3::SatTbtpContainer::SatTbtpContainer ( )

Default constructor.

Definition at line 57 of file satellite-tbtp-container.cc.

◆ SatTbtpContainer() [2/2]

ns3::SatTbtpContainer::SatTbtpContainer ( Ptr< SatSuperframeSeq seq)

Constructor with initialization parameters.

Parameters
seq

Definition at line 66 of file satellite-tbtp-container.cc.

◆ ~SatTbtpContainer()

ns3::SatTbtpContainer::~SatTbtpContainer ( )

Destructor for SatTbtpContainer.

Definition at line 76 of file satellite-tbtp-container.cc.

Member Function Documentation

◆ Add()

void ns3::SatTbtpContainer::Add ( Time  startTime,
Ptr< SatTbtpMessage tbtp 
)

Add a TBTP message to the container.

Parameters
startTimeTBTP superframe transmit start time
tbtpTBTP message

Definition at line 95 of file satellite-tbtp-container.cc.

References m_maxStoredTbtps, m_rcvdTbtps, and m_tbtps.

◆ Clear()

void ns3::SatTbtpContainer::Clear ( )

Definition at line 111 of file satellite-tbtp-container.cc.

References m_tbtps.

◆ DoDispose()

void ns3::SatTbtpContainer::DoDispose ( void  )
virtual

Dispose of this class instance.

Definition at line 81 of file satellite-tbtp-container.cc.

References m_tbtps.

◆ GetTypeId()

TypeId ns3::SatTbtpContainer::GetTypeId ( void  )
static

Get the type ID.

Returns
the object TypeId

Definition at line 44 of file satellite-tbtp-container.cc.

References m_maxStoredTbtps.

◆ HasScheduledTimeSlots()

bool ns3::SatTbtpContainer::HasScheduledTimeSlots ( )

Method of checking whether the UT has been scheduled time slots into the future.

Returns
bool Boolean indicating whether 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 137 of file satellite-tbtp-container.cc.

References m_address, m_superframeSeq, m_tbtps, RemovePastTbtps(), and ns3::SatConstVariables::SUPERFRAME_SEQUENCE.

Referenced by ns3::SatUtMac::SetRandomAccess().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RemovePastTbtps()

void ns3::SatTbtpContainer::RemovePastTbtps ( )
private

Function for removing the TBTPs which are in the past.

Definition at line 119 of file satellite-tbtp-container.cc.

References m_superFrameDuration, and m_tbtps.

Referenced by HasScheduledTimeSlots().

+ Here is the caller graph for this function:

◆ SetMacAddress()

void ns3::SatTbtpContainer::SetMacAddress ( Mac48Address  address)

Set the MAC address of this node.

Parameters
addressMAC address of this node

Definition at line 88 of file satellite-tbtp-container.cc.

References m_address.

Member Data Documentation

◆ m_address

Mac48Address ns3::SatTbtpContainer::m_address
private

Address of this UT.

Definition at line 132 of file satellite-tbtp-container.h.

Referenced by HasScheduledTimeSlots(), and SetMacAddress().

◆ m_maxStoredTbtps

uint32_t ns3::SatTbtpContainer::m_maxStoredTbtps
private

Maximum stored TBTPs in the container.

Definition at line 142 of file satellite-tbtp-container.h.

Referenced by Add(), and GetTypeId().

◆ m_rcvdTbtps

uint32_t ns3::SatTbtpContainer::m_rcvdTbtps
private

Number of received TBTPs.

Definition at line 147 of file satellite-tbtp-container.h.

Referenced by Add().

◆ m_superFrameDuration

Time ns3::SatTbtpContainer::m_superFrameDuration
private

Superframe duration.

Definition at line 152 of file satellite-tbtp-container.h.

Referenced by RemovePastTbtps().

◆ m_superframeSeq

Ptr<SatSuperframeSeq> ns3::SatTbtpContainer::m_superframeSeq
private

Superframe sequence.

Definition at line 137 of file satellite-tbtp-container.h.

Referenced by HasScheduledTimeSlots().

◆ m_tbtps

TbtpMap_t ns3::SatTbtpContainer::m_tbtps
private

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