Loading...
Searching...
No Matches
ns3::SatUtMac Class Reference

UT specific Mac class for Sat Net Devices. More...

#include "satellite-ut-mac.h"

Inheritance diagram for ns3::SatUtMac:
Collaboration diagram for ns3::SatUtMac:

Classes

class  SatTimuInfo

Public Types

typedef Callback< void, uint8_t, uint32_t > AssignedDaResourcesCallback
 Callback for informing the amount of dedicated access bytes received from TBTP.
typedef Callback< void, Mac48Address > GatewayUpdateCallback
 Callback to update gateway address after handover.
typedef Callback< void, uint32_t, uint32_t > HandoverCallback
 Callback to reconfigure physical layer during handover.
typedef Callback< void > SendLogonCallback
 Callback to send a logon message to the gateway.
typedef Callback< void, uint8_t > SliceSubscriptionCallback
 Callback to check if TX is operational.
typedef void(* TbtpResourcesTraceCallback) (uint32_t size)
 Callback signature for DaResourcesTrace trace source.
typedef Callback< Time > TimingAdvanceCallback
typedef Callback< bool > TxCheckCallback
 Callback to check if TX is operational.
typedef Callback< void, Ptr< Node > > UpdateAddressAndIdentifierCallback
 Callback to update addresses in statistics helpers.
typedef Callback< void, Mac48Address > UpdateGwAddressCallback
 Callback to update GW address to SatRequestManager.
Public Types inherited from ns3::SatMac
typedef Callback< Ptr< SatBeamScheduler >, uint32_t, uint32_t > BeamSchedulerCallback
 Callback to get the SatBeamScheduler from the beam ID for handover.
typedef Callback< void, Ptr< const Packet > > LoraReceiveCallback
 Callback to receive packet by upper layer.
typedef Callback< Ptr< SatControlMessage >, uint32_t > ReadCtrlMsgCallback
 Callback to read control messages from container storing control messages.
typedef Callback< void, Ptr< Packet >, Mac48Address, Mac48Address > ReceiveCallback
 Callback to receive packet by upper layer.
typedef Callback< uint32_t, Ptr< SatControlMessage > > ReserveCtrlMsgCallback
 Callback to reserve an id and initially store the control message.
typedef Callback< void, Address, Address > RoutingUpdateCallback
 Callback to update routing and ARP tables after handover.
typedef Callback< uint32_t, uint32_t > SendCtrlMsgCallback
 Callback to send a control message and allocate a recv ID for it.
typedef Callback< void, SatPhy::PacketContainer_t, uint32_t, Time, SatSignalParameters::txInfo_sTransmitCallback
 Callback to send packet to lower layer.
typedef Callback< void > UpdateIslCallback
 Callback to update ISL routes when handovers are performed.

Public Member Functions

 SatUtMac ()
 Default constructor, which is not used.
 SatUtMac (Ptr< Node > node, uint32_t satId, uint32_t beamId, Ptr< SatSuperframeSeq > seq, bool crdsaOnlyForControl)
 Construct a SatUtMac.
 ~SatUtMac ()
 Destroy a SatUtMac.
bool ControlMsgTransmissionPossible () const
 Method to check whether a transmission of a control msg is somewhat possible.
uint32_t GetBeamId () const
 Get beam ID of the object.
Mac48Address GetGwAddress ()
 Get address of the GW (or its MAC) serving this UT.
Time GetNextSuperFrameTxTime (uint8_t superFrameSeqId) const
 Get Tx time for the next possible superframe.
uint32_t GetRaChannel () const
 Get RA channel assigned for this UT.
SatUtMacState::RcstState_t GetRcstState () const
uint32_t GetSatId () const
 Get sat ID of the object.
void LogOff ()
bool LogonMsgTransmissionPossible () const
 Method to check whether a transmission of a logon msg is somewhat possible.
virtual void Receive (SatPhy::PacketContainer_t packets, Ptr< SatSignalParameters >)
 Receive packet from lower layer.
virtual void ReceiveQueueEvent (SatQueue::QueueEvent_t event, uint8_t rcIndex)
 Receive a queue event:
virtual void ReceiveQueueEventEssa (SatQueue::QueueEvent_t event, uint8_t rcIndex)
 Receive a queue event:
void SendLogon (Ptr< Packet > packet)
 Receive a logon message to transmit /param packet The logon packet to send.
void SetAssignedDaResourcesCallback (SatUtMac::AssignedDaResourcesCallback cb)
 Set the assigned DA resources callback.
void SetGatewayUpdateCallback (SatUtMac::GatewayUpdateCallback cb)
 Method to set the gateway address update callback.
void SetGwAddress (Mac48Address gwAddress)
 Set address of the GW (or its MAC) serving this UT.
void SetHandoverCallback (SatUtMac::HandoverCallback cb)
 Method to set handover callback.
void SetLogonChannel (uint32_t channelId)
virtual void SetNodeInfo (Ptr< SatNodeInfo > nodeInfo)
 Set the node info.
void SetRaChannel (uint32_t raChannel)
 Set RA channel assigned for this UT.
void SetRandomAccess (Ptr< SatRandomAccess > randomAccess)
 Set the random access module.
virtual void SetSatelliteAddress (Address satelliteAddress)
 Set the satellite MAC address on the other side of this link (if regenerative satellite).
void SetSendLogonCallback (SatUtMac::SendLogonCallback cb)
 Set the logon callback.
void SetSliceSubscriptionCallback (SatUtMac::SliceSubscriptionCallback cb)
 Get sliec subscription info from MAC layer.
void SetTimingAdvanceCallback (SatUtMac::TimingAdvanceCallback cb)
 Set the timing advance callback.
void SetTxCheckCallback (SatUtMac::TxCheckCallback cb)
 Set the TX check callback.
void SetUpdateAddressAndIdentifierCallback (SatUtMac::UpdateAddressAndIdentifierCallback cb)
 Set the callback to update addresses in statistics helpers.
void SetUpdateGwAddressCallback (SatUtMac::UpdateGwAddressCallback cb)
 Set the gw update callback.
Public Member Functions inherited from ns3::SatMac
 SatMac ()
 Construct a SatMac.
 SatMac (uint32_t satId, uint32_t beamId)
 Construct a SatMac.
 ~SatMac ()
 Destroy a SatMac.
virtual void Disable ()
 Disable the MAC layer, i.e.
virtual void Enable ()
 Enable the MAC layer, i.e.
Address GetAddress () const
 Get MAC address.
uint32_t GetBeamId () const
 Get beam ID of the object.
uint32_t GetSatId () const
 Get sat ID of the object.
uint32_t ReserveIdAndStoreCtrlMsgToContainer (Ptr< SatControlMessage > msg)
 Reserve id and store the control message.
uint32_t SendCtrlMsgFromContainer (uint32_t sendId)
 Send the control message from the container.
void SetBeamId (uint32_t beamId)
 Set beam ID of the object.
void SetBeamSchedulerCallback (SatMac::BeamSchedulerCallback cb)
 Set the beam scheduler callback.
void SetHandoverModule (Ptr< SatHandoverModule > handoverModule)
 Set the handover module.
void SetLoraReceiveCallback (SatMac::LoraReceiveCallback cb)
 Method to set receive callback.
void SetReadCtrlCallback (SatMac::ReadCtrlMsgCallback cb)
 Method to set read control message callback.
void SetReceiveCallback (SatMac::ReceiveCallback cb)
 Method to set receive callback.
void SetReserveCtrlCallback (SatMac::ReserveCtrlMsgCallback cb)
 Method to set reserve control message id callback.
void SetRoutingUpdateCallback (SatMac::RoutingUpdateCallback cb)
 Method to set the routing update callback.
void SetSatId (uint32_t satId)
 Set sat ID of the object.
void SetSendCtrlCallback (SatMac::SendCtrlMsgCallback cb)
 Method to set send control message callback.
void SetTransmitCallback (SatMac::TransmitCallback cb)
 Method to set transmit callback.
void SetUpdateIslCallback (SatMac::UpdateIslCallback cb)
 Method to set update ISL callback.

Static Public Member Functions

static TypeId GetTypeId (void)
 Derived from Object.
Static Public Member Functions inherited from ns3::SatMac
static TypeId GetTypeId (void)
 Derived from Object.

Protected Member Functions

void DoDispose (void)
 Dispose of SatUtMac.
Protected Member Functions inherited from ns3::SatMac
void DoDispose (void)
 Dispose of SatMac.
void RxTraces (SatPhy::PacketContainer_t packets)
 Invoke the Rx trace source for each received packet.
virtual void SendPacket (SatPhy::PacketContainer_t packets, uint32_t carrierId, Time duration, SatSignalParameters::txInfo_s txInfo)
 Send packets to lower layer by using a callback.
void SetTimeTag (SatPhy::PacketContainer_t packets)
 Set SatMacTimeTag of packets.

Private Types

enum  HandoverState_t { NO_HANDOVER , HANDOVER_RECOMMENDATION_SENT , WAITING_FOR_TBTP }

Private Member Functions

 SatUtMac (const SatUtMac &)
void CreateCrdsaPacketInstances (uint32_t allocationChannel, std::set< uint32_t > slots)
void DoEssaTransmit (Time duration, Ptr< SatWaveform > waveform, uint32_t carrierId, uint8_t rcIndex, SatUtScheduler::SatCompliancePolicy_t policy=SatUtScheduler::LOOSE)
 Notify the upper layer about the ESSA Tx opportunity.
void DoFrameStart ()
 Function which is executed at every frame start.
void DoRandomAccess (SatEnums::RandomAccessTriggerType_t randomAccessTriggerType)
 Do random access evaluation for Tx opportunities.
void DoSlottedAlohaTransmit (Time duration, Ptr< SatWaveform > waveform, uint32_t carrierId, uint8_t rcIndex, SatUtScheduler::SatCompliancePolicy_t policy=SatUtScheduler::LOOSE)
 Notify the upper layer about the Slotted ALOHA Tx opportunity.
void DoTransmit (Time duration, uint32_t carrierId, Ptr< SatWaveform > wf, Ptr< SatTimeSlotConf > tsConf, SatUtScheduler::SatCompliancePolicy_t policy=SatUtScheduler::LOOSE)
 Notify the upper layer about the Tx opportunity.
void ExtractPacketsToSchedule (SatPhy::PacketContainer_t &packets, uint32_t payloadBytes, SatTimeSlotConf::SatTimeSlotType_t type, uint8_t rcIndex, SatUtScheduler::SatCompliancePolicy_t policy, bool randomAccessChannel)
 Extract packets from the underlying queue and put them in the provided container.
SatPhy::PacketContainer_t FetchPackets (uint32_t payloadBytes, SatTimeSlotConf::SatTimeSlotType_t type, uint8_t rcIndex, SatUtScheduler::SatCompliancePolicy_t policy)
std::pair< bool, uint32_t > FindNextAvailableRandomAccessSlot (Time opportunityOffset, Ptr< SatFrameConf > frameConf, uint32_t timeSlotCount, uint32_t superFrameId, uint32_t allocationChannel)
uint32_t GetCurrentSuperFrameId (uint8_t superFrameSeqId) const
Time GetCurrentSuperFrameStartTime (uint8_t superFrameSeqId) const
 Get start time for the current superframe.
uint32_t GetNextRandomAccessAllocationChannel ()
 Function for selecting the allocation channel for the current RA evaluation.
Time GetRealSendingTime (Time t)
 Compute real sending time of UT based on last NCR reception date and clock drift.
bool IsRandomAccessSlotAvailable (uint32_t superFrameId, uint32_t allocationChannelId, uint32_t slotId)
SatUtMacoperator= (const SatUtMac &)
void PrintUsedRandomAccessSlots ()
void ReceiveSignalingPacket (Ptr< Packet > packet)
 Signaling packet receiver, which handles all the signaling packet receptions.
void RemovePastRandomAccessSlots (uint32_t superFrameId)
 Function for removing the past used RA slots.
void ScheduleCrdsaTransmission (uint32_t allocationChannel, SatRandomAccess::RandomAccessTxOpportunities_s txOpportunities)
 Function for scheduling the CRDSA transmissions.
void ScheduleDaTxOpportunity (Time transmitDelay, Time duration, Ptr< SatWaveform > wf, Ptr< SatTimeSlotConf > tsConf, uint32_t carrierId)
 Schdules one Tx opportunity, i.e.
void ScheduleEssaTransmission (uint32_t allocationChannel)
 Function for scheduling the ESSA transmissions.
void ScheduleSlottedAlohaTransmission (uint32_t allocationChannel)
 Function for scheduling the Slotted ALOHA transmissions.
void ScheduleTimeSlots (Ptr< SatTbtpMessage > tbtp)
 Schedules time slots according to received TBTP message.
std::pair< bool, uint32_t > SearchFrameForAvailableSlot (Time superframeStartTime, Ptr< SatFrameConf > frameConf, uint32_t timeSlotCount, uint32_t superFrameId, uint32_t allocationChannel)
void TransmitPackets (SatPhy::PacketContainer_t packets, Time duration, uint32_t carrierId, SatSignalParameters::txInfo_s txInfo)
bool UpdateUsedRandomAccessSlots (uint32_t superFrameId, uint32_t allocationChannel, uint32_t slot)
 Function for updating the used RA slots.

Private Attributes

AssignedDaResourcesCallback m_assignedDaResourcesCallback
 Callback for informing the assigned TBTP resources.
uint32_t m_beamId
 ID of beam for UT.
int32_t m_clockDrift
 Clock drift (number of ticks per second).
bool m_crdsaOnlyForControl
 Planned CRDSA usage:
uint32_t m_crdsaUniquePacketId
 CRDSA packet ID (per frame).
int64_t m_deltaNcr
 Correction to apply to NCR dates.
uint32_t m_firstTransmittableSuperframeId
SatUtMac::GatewayUpdateCallback m_gatewayUpdateCallback
 Gateway address update callback.
Time m_guardTime
 Guard time for time slots.
Mac48Address m_gwAddress
SatUtMac::HandoverCallback m_handoverCallback
 The physical layer handover callback.
uint32_t m_handoverMessagesCount
HandoverState_t m_handoverState
bool m_isRandomAccessScheduled
 Flag that indicates if a method DoRandomAccess is scheduled for asynchronous access.
Time m_lastNcrDateReceived
 Reception date of last NCR control message.
bool m_loggedOn
 UT is logged on.
uint32_t m_logonChannel
 RA channel dedicated to logon messages.
uint32_t m_maxHandoverMessagesSent
Time m_maxWaitingTimeLogonResponse
 Timeout for waiting for a response for a logon message.
uint64_t m_ncr
 NCR value of last NCR control message.
Time m_nextLogonTransmissionPossible
 Instant when a logon message can be transmitted.
Time m_nextPacketTime
 Next time when a next ESSA packet can be safely sent.
Ptr< Node > m_node
 Node containing this MAC.
uint32_t m_raChannel
 RA channel assigned to the UT.
Ptr< SatRandomAccessm_randomAccess
 RA main module.
SatUtMacState m_rcstState
std::queue< Time > m_receptionDates
 Store last 3 packets reception date, to be associated to NCR dates.
uint32_t m_satId
 ID of sat for UT.
SatUtMac::SendLogonCallback m_sendLogonCallback
 Callback for sending a logon message.
uint32_t m_sendLogonTries
 Number of times a logon message has been sent without response.
SatUtMac::SliceSubscriptionCallback m_sliceSubscriptionCallback
 Tx checking callback.
Ptr< SatSuperframeSeqm_superframeSeq
 Used superframe sequence for the return link.
Ptr< SatTbtpContainerm_tbtpContainer
 Container for storing all the TBTP information related to this UT.
TracedCallback< uint32_t > m_tbtpResourcesTrace
 Assigned TBTP resources in superframe for this UT (in bytes).
TimingAdvanceCallback m_timingAdvanceCb
 Callback for getting the timing advance information.
Ptr< SatTimuInfom_timuInfo
SatUtMac::TxCheckCallback m_txCheckCallback
 Tx checking callback.
Ptr< UniformRandomVariable > m_uniformRandomVariable
 Uniform random variable distribution generator.
SatUtMac::UpdateAddressAndIdentifierCallback m_updateAddressAndIdentifierCallback
 Callback to update addresses in statistics helpers.
SatUtMac::UpdateGwAddressCallback m_updateGwAddressCallback
 Callback for sending a logon message.
std::map< std::pair< uint32_t, uint32_t >, std::set< uint32_t > > m_usedRandomAccessSlots
 A container for storing the used RA slots in each frame and allocation channel.
bool m_useLogon
 Should logon be simulated?
Ptr< SatUtSchedulerm_utScheduler
 UT scheduler.
Ptr< UniformRandomVariable > m_waitingTimeLogonRng
 The random generator for waiting transmission time.
Time m_windowInitLogon
 The initial max time to wait when sending a logon message.

Additional Inherited Members

Protected Attributes inherited from ns3::SatMac
Time m_beamEnabledTime
 Time of the last beam enable event.
uint32_t m_beamId
 The ID of the beam where mac belongs.
SatMac::BeamSchedulerCallback m_beamSchedulerCallback
 Callback to get the SatBeamScheduler linked to a beam ID.
TracedCallback< Time > m_beamServiceTrace
 Traced callback for beam being disabled and including service time.
SatEnums::RegenerationMode_t m_forwardLinkRegenerationMode
 Regeneration mode on forward link.
Ptr< SatHandoverModulem_handoverModule
 Module used to perform handovers.
bool m_isRegenerative
 Indicate if satellite is regeneration (at least LINK level) for TX.
bool m_isStatisticsTagsEnabled
 EnableStatisticsTags attribute.
Time m_lastDelay
 Last delay measurement.
Time m_lastLinkDelay
 Last delay measurement for link.
std::queue< Time > m_lastSOF
 Store last 3 SOF date for Forward messages, to insert in NCR packets.
std::queue< Ptr< SatNcrMessage > > m_ncrMessagesToSend
 List of NCR control messages created but not sent yet.
bool m_ncrV2
 Use of version 2 of NCR dates.
Ptr< SatNodeInfom_nodeInfo
 Node info containing node related information, such as node type, node id and MAC address (of the SatNetDevice).
TracedCallback< Time, SatEnums::SatPacketEvent_t, SatEnums::SatNodeType_t, uint32_t, Mac48Address, SatEnums::SatLogLevel_t, SatEnums::SatLinkDir_t, std::string > m_packetTrace
 Trace callback used for packet tracing.
SatMac::ReadCtrlMsgCallback m_readCtrlCallback
 The read control message callback.
SatMac::ReserveCtrlMsgCallback m_reserveCtrlCallback
 The reserve control message id callback.
SatEnums::RegenerationMode_t m_returnLinkRegenerationMode
 Regeneration mode on return link.
SatMac::RoutingUpdateCallback m_routingUpdateCallback
 Callback to update routing and ARP tables after a beam handover.
SatMac::ReceiveCallback m_rxCallback
 The upper layer package receive callback.
TracedCallback< const Time &, const Address & > m_rxDelayTrace
 Traced callback for all received packets, including delay information and the address of the senders.
TracedCallback< const Time &, const Address & > m_rxJitterTrace
 Traced callback for all received packets, including jitter information and the address of the senders.
TracedCallback< const Time &, const Address & > m_rxLinkDelayTrace
 Traced callback for all received packets, including link delay information and the address of the senders.
TracedCallback< const Time &, const Address & > m_rxLinkJitterTrace
 Traced callback for all received packets, including link jitter information and the address of the senders.
SatMac::LoraReceiveCallback m_rxLoraCallback
 The upper layer package receive callback.
TracedCallback< Ptr< const Packet >, const Address & > m_rxTrace
 Traced callback for all received packets, including the address of the senders.
Address m_satelliteAddress
 MAC address of satellite on other side of the link.
uint32_t m_satId
 The ID of the sat where mac belongs.
SatMac::SendCtrlMsgCallback m_sendCtrlCallback
 The send control message callback.
SatMac::TransmitCallback m_txCallback
 The lower layer packet transmit callback.
bool m_txEnabled
 Flag indicating whether the MAC is enabled, i.e.
SatMac::UpdateIslCallback m_updateIslCallback
 The update ISL routes callback.

Detailed Description

UT specific Mac class for Sat Net Devices.

This SatUtMac class specializes the MAC class with UT characteristics. UT MAC receives BB frames intended for it (including at least one packet intended for it) from the forward link and disassembles the GSE PDUs from the BB frame. BB frame may hold also TBTP messages from GW (forward link) including allocations for the UT. UT schedules the tx opportunities to LLC via UT scheduler. UT forwards a container of packets to the PHY layer. Packet container models the Frame PDU, including one or more RLE PDUs.

Definition at line 74 of file satellite-ut-mac.h.

Member Typedef Documentation

◆ AssignedDaResourcesCallback

typedef Callback<void, uint8_t, uint32_t> ns3::SatUtMac::AssignedDaResourcesCallback

Callback for informing the amount of dedicated access bytes received from TBTP.

Parameters
uint8_tRC index
uint32_tSum of bytes in this superframe

Definition at line 153 of file satellite-ut-mac.h.

◆ GatewayUpdateCallback

typedef Callback<void, Mac48Address> ns3::SatUtMac::GatewayUpdateCallback

Callback to update gateway address after handover.

Parameters
Mac48Addressthe address of the new gateway

Definition at line 320 of file satellite-ut-mac.h.

◆ HandoverCallback

typedef Callback<void, uint32_t, uint32_t> ns3::SatUtMac::HandoverCallback

Callback to reconfigure physical layer during handover.

Parameters
uint32_tnew beam Id

Definition at line 308 of file satellite-ut-mac.h.

◆ SendLogonCallback

typedef Callback<void> ns3::SatUtMac::SendLogonCallback

Callback to send a logon message to the gateway.

Definition at line 186 of file satellite-ut-mac.h.

◆ SliceSubscriptionCallback

typedef Callback<void, uint8_t> ns3::SatUtMac::SliceSubscriptionCallback

Callback to check if TX is operational.

Definition at line 175 of file satellite-ut-mac.h.

◆ TbtpResourcesTraceCallback

typedef void(* ns3::SatUtMac::TbtpResourcesTraceCallback) (uint32_t size)

Callback signature for DaResourcesTrace trace source.

Parameters
sizethe amount of assigned TBTP resources (in bytes) in the superframe for this UT

Definition at line 302 of file satellite-ut-mac.h.

◆ TimingAdvanceCallback

typedef Callback<Time> ns3::SatUtMac::TimingAdvanceCallback
Returns
Timing advance as Time object.

Definition at line 139 of file satellite-ut-mac.h.

◆ TxCheckCallback

typedef Callback<bool> ns3::SatUtMac::TxCheckCallback

Callback to check if TX is operational.

Definition at line 164 of file satellite-ut-mac.h.

◆ UpdateAddressAndIdentifierCallback

typedef Callback<void, Ptr<Node> > ns3::SatUtMac::UpdateAddressAndIdentifierCallback

Callback to update addresses in statistics helpers.

Definition at line 331 of file satellite-ut-mac.h.

◆ UpdateGwAddressCallback

typedef Callback<void, Mac48Address> ns3::SatUtMac::UpdateGwAddressCallback

Callback to update GW address to SatRequestManager.

Definition at line 197 of file satellite-ut-mac.h.

Member Enumeration Documentation

◆ HandoverState_t

Enumerator
NO_HANDOVER 
HANDOVER_RECOMMENDATION_SENT 
WAITING_FOR_TBTP 

Definition at line 776 of file satellite-ut-mac.h.

Constructor & Destructor Documentation

◆ SatUtMac() [1/3]

◆ SatUtMac() [2/3]

ns3::SatUtMac::SatUtMac ( Ptr< Node > node,
uint32_t satId,
uint32_t beamId,
Ptr< SatSuperframeSeq > seq,
bool crdsaOnlyForControl )

◆ ~SatUtMac()

ns3::SatUtMac::~SatUtMac ( )

Destroy a SatUtMac.

This is the destructor for the SatUtMac.

Definition at line 206 of file satellite-ut-mac.cc.

References m_randomAccess, m_tbtpContainer, and m_timuInfo.

◆ SatUtMac() [3/3]

ns3::SatUtMac::SatUtMac ( const SatUtMac & )
private

References SatUtMac().

Here is the call graph for this function:

Member Function Documentation

◆ ControlMsgTransmissionPossible()

bool ns3::SatUtMac::ControlMsgTransmissionPossible ( ) const

Method to check whether a transmission of a control msg is somewhat possible.

Transmission cannot be guaranteed, but at least the possibility to do so (e.g. random access / CRDSA enabled, TBTP with time slots received).

Returns
Boolean to indicate whether a control msg transmission is possible

Definition at line 365 of file satellite-ut-mac.cc.

References m_logonChannel, m_raChannel, m_randomAccess, m_tbtpContainer, and m_useLogon.

Referenced by ns3::SatUtHelperDvb::Install(), and ReceiveSignalingPacket().

Here is the caller graph for this function:

◆ CreateCrdsaPacketInstances()

void ns3::SatUtMac::CreateCrdsaPacketInstances ( uint32_t allocationChannel,
std::set< uint32_t > slots )
private

CRDSA is evaluated only at the frame start TODO this has to be changed when a proper mobility model is implemented

get the slot payload

reduce the CRDSA signaling overhead from the payload

CRDSA can be utilized to transmit only control messages or both control and user data

get the next packet

create replicas

create replica slot ID tags

loop through the replicas

attach the replica tag

time slot configuration

start time

duration

carrier

create CRDSA Tx params

schedule transmission

Definition at line 1673 of file satellite-ut-mac.cc.

References ns3::SatCrdsaReplicaTag::AddSlotId(), ns3::SatEnums::CONTROL_FID, ns3::SatSignalParameters::txInfo_s::crdsaUniquePacketId, ExtractPacketsToSchedule(), ns3::SatSignalParameters::txInfo_s::fecBlockSizeInBytes, ns3::SatSignalParameters::txInfo_s::frameType, GetRealSendingTime(), ns3::SatUtScheduler::LOOSE, m_crdsaOnlyForControl, m_crdsaUniquePacketId, ns3::SatMac::m_nodeInfo, m_randomAccess, m_superframeSeq, ns3::SatSignalParameters::txInfo_s::modCod, ns3::SatEnums::PACKET_TYPE_CRDSA, ns3::SatSignalParameters::txInfo_s::packetType, ns3::SatSignalParameters::txInfo_s::sliceId, ns3::SatTimeSlotConf::SLOT_TYPE_TRC, ns3::SatUtScheduler::STRICT, ns3::SatConstVariables::SUPERFRAME_SEQUENCE, TransmitPackets(), ns3::SatEnums::UNDEFINED_FRAME, and ns3::SatSignalParameters::txInfo_s::waveformId.

Referenced by ScheduleCrdsaTransmission().

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

◆ DoDispose()

void ns3::SatUtMac::DoDispose ( void )
protected

◆ DoEssaTransmit()

void ns3::SatUtMac::DoEssaTransmit ( Time duration,
Ptr< SatWaveform > waveform,
uint32_t carrierId,
uint8_t rcIndex,
SatUtScheduler::SatCompliancePolicy_t policy = SatUtScheduler::LOOSE )
private

Notify the upper layer about the ESSA Tx opportunity.

If upper layer returns a PDU, send it to lower layer.

Parameters
durationduration of the burst
waveformwaveform
carrierIdCarrier id used for the transmission
rcIndexRC index

get the slot payload

get the next packets

create ESSA Tx params

update m_nextPacketTime

schedule a DoRandomAccess then in case there still are packets to transmit ( schedule DoRandomAccess in case there is a back-off to compute )

Definition at line 738 of file satellite-ut-mac.cc.

References ns3::SatSignalParameters::txInfo_s::crdsaUniquePacketId, DoRandomAccess(), ns3::SatSignalParameters::txInfo_s::fecBlockSizeInBytes, ns3::SatSignalParameters::txInfo_s::frameType, ns3::SatUtils::GetPacketInfo(), GetRealSendingTime(), ns3::SatEnums::LD_RETURN, ns3::SatEnums::LL_MAC, m_crdsaUniquePacketId, m_isRandomAccessScheduled, m_nextPacketTime, ns3::SatMac::m_nodeInfo, ns3::SatMac::m_packetTrace, m_utScheduler, ns3::SatSignalParameters::txInfo_s::modCod, ns3::SatEnums::PACKET_SENT, ns3::SatEnums::PACKET_TYPE_ESSA, ns3::SatSignalParameters::txInfo_s::packetType, ns3::SatEnums::RA_TRIGGER_TYPE_ESSA, ns3::SatTimeSlotConf::SLOT_TYPE_TRC, TransmitPackets(), ns3::SatEnums::UNDEFINED_FRAME, and ns3::SatSignalParameters::txInfo_s::waveformId.

Referenced by ScheduleEssaTransmission().

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

◆ DoFrameStart()

◆ DoRandomAccess()

void ns3::SatUtMac::DoRandomAccess ( SatEnums::RandomAccessTriggerType_t randomAccessTriggerType)
private

Do random access evaluation for Tx opportunities.

Parameters
randomAccessTriggerType

reset the isRandomAccessScheduled flag. TODO: should be done only if randomAccessTriggerType is ESSA

select the RA allocation channel

run random access algorithm

process Slotted ALOHA Tx opportunities

schedule the check for next available RA slot

process CRDSA Tx opportunities

schedule CRDSA transmission

process ESSA opportunities

set the is RA scheduled TODO: if there are no Tx opportunities there'll be no scheduling until a new event arrives

schedule the transmission

Definition at line 1305 of file satellite-ut-mac.cc.

References GetNextRandomAccessAllocationChannel(), GetRealSendingTime(), m_isRandomAccessScheduled, m_logonChannel, ns3::SatMac::m_nodeInfo, m_randomAccess, m_rcstState, m_useLogon, ns3::SatEnums::RA_TX_OPPORTUNITY_CRDSA, ns3::SatEnums::RA_TX_OPPORTUNITY_ESSA, ns3::SatEnums::RA_TX_OPPORTUNITY_SLOTTED_ALOHA, ScheduleCrdsaTransmission(), ScheduleEssaTransmission(), ScheduleSlottedAlohaTransmission(), ns3::SatRandomAccess::RandomAccessTxOpportunities_s::slottedAlohaTxOpportunity, ns3::SatUtMacState::TDMA_SYNC, and ns3::SatRandomAccess::RandomAccessTxOpportunities_s::txOpportunityType.

Referenced by DoEssaTransmit(), DoFrameStart(), ReceiveQueueEvent(), and ReceiveQueueEventEssa().

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

◆ DoSlottedAlohaTransmit()

void ns3::SatUtMac::DoSlottedAlohaTransmit ( Time duration,
Ptr< SatWaveform > waveform,
uint32_t carrierId,
uint8_t rcIndex,
SatUtScheduler::SatCompliancePolicy_t policy = SatUtScheduler::LOOSE )
private

Notify the upper layer about the Slotted ALOHA Tx opportunity.

If upper layer returns a PDU, send it to lower layer.

Parameters
durationduration of the burst
waveformwaveform
carrierIdCarrier id used for the transmission
rcIndexRC index

get the slot payload

reduce the SA signaling overhead from the payload

Definition at line 674 of file satellite-ut-mac.cc.

References ExtractPacketsToSchedule(), ns3::SatSignalParameters::txInfo_s::fecBlockSizeInBytes, ns3::SatSignalParameters::txInfo_s::frameType, ns3::SatUtils::GetPacketInfo(), ns3::SatEnums::LD_RETURN, ns3::SatEnums::LL_MAC, ns3::SatMac::m_nodeInfo, ns3::SatMac::m_packetTrace, m_randomAccess, ns3::SatSignalParameters::txInfo_s::modCod, ns3::SatEnums::PACKET_SENT, ns3::SatEnums::PACKET_TYPE_SLOTTED_ALOHA, ns3::SatSignalParameters::txInfo_s::packetType, ns3::SatTimeSlotConf::SLOT_TYPE_C, TransmitPackets(), ns3::SatEnums::UNDEFINED_FRAME, and ns3::SatSignalParameters::txInfo_s::waveformId.

Referenced by ScheduleSlottedAlohaTransmission().

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

◆ DoTransmit()

void ns3::SatUtMac::DoTransmit ( Time duration,
uint32_t carrierId,
Ptr< SatWaveform > wf,
Ptr< SatTimeSlotConf > tsConf,
SatUtScheduler::SatCompliancePolicy_t policy = SatUtScheduler::LOOSE )
private

◆ ExtractPacketsToSchedule()

void ns3::SatUtMac::ExtractPacketsToSchedule ( SatPhy::PacketContainer_t & packets,
uint32_t payloadBytes,
SatTimeSlotConf::SatTimeSlotType_t type,
uint8_t rcIndex,
SatUtScheduler::SatCompliancePolicy_t policy,
bool randomAccessChannel )
private

Extract packets from the underlying queue and put them in the provided container.

Parameters
packetsContainer for the packets to extract
payloadBytesTx opportunity payload
typeTime slot type
rcIndexRC index
policyScheduler policy
randomAccessChannelwhether the packets are to be sent on RA or DA

Definition at line 2188 of file satellite-ut-mac.cc.

References ns3::SatEnums::CONTROL_FID, GetCurrentSuperFrameId(), ns3::SatControlMsgTag::GetMsgType(), HANDOVER_RECOMMENDATION_SENT, m_firstTransmittableSuperframeId, m_handoverState, m_utScheduler, NO_HANDOVER, ns3::SatControlMsgTag::SAT_HR_CTRL_MSG, ns3::SatTimeSlotConf::SLOT_TYPE_C, ns3::SatUtScheduler::STRICT, and ns3::SatConstVariables::SUPERFRAME_SEQUENCE.

Referenced by CreateCrdsaPacketInstances(), DoSlottedAlohaTransmit(), and FetchPackets().

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

◆ FetchPackets()

SatPhy::PacketContainer_t ns3::SatUtMac::FetchPackets ( uint32_t payloadBytes,
SatTimeSlotConf::SatTimeSlotType_t type,
uint8_t rcIndex,
SatUtScheduler::SatCompliancePolicy_t policy )
private
Parameters
payloadBytesTx opportunity payload
typeTime slot type
rcIndexRC index
policyScheduler policy
Returns

Instruct the UT scheduler to fill the packet container based on given input; e.g. payload, RC index. The packet container models the FPDU, which may contain several RLE PDUs

Definition at line 815 of file satellite-ut-mac.cc.

References ExtractPacketsToSchedule(), ns3::SatUtils::GetPacketInfo(), ns3::SatEnums::LD_RETURN, ns3::SatEnums::LL_MAC, ns3::SatMac::m_nodeInfo, ns3::SatMac::m_packetTrace, and ns3::SatEnums::PACKET_SENT.

Referenced by DoTransmit().

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

◆ FindNextAvailableRandomAccessSlot()

std::pair< bool, uint32_t > ns3::SatUtMac::FindNextAvailableRandomAccessSlot ( Time opportunityOffset,
Ptr< SatFrameConf > frameConf,
uint32_t timeSlotCount,
uint32_t superFrameId,
uint32_t allocationChannel )
private
Parameters
opportunityOffset
frameConf
timeSlotCount
superFrameId
allocationChannel
Returns

iterate through slots in this frame

if slot offset is equal or larger than Tx opportunity offset, i.e., the slot is in the future

if slot is available, set the slot as used and continue with the transmission

Definition at line 1526 of file satellite-ut-mac.cc.

References ns3::SatMac::m_nodeInfo, and UpdateUsedRandomAccessSlots().

Referenced by SearchFrameForAvailableSlot().

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

◆ GetBeamId()

uint32_t ns3::SatUtMac::GetBeamId ( ) const
inline

Get beam ID of the object.

Returns
beam ID

Definition at line 124 of file satellite-ut-mac.h.

References m_beamId.

◆ GetCurrentSuperFrameId()

uint32_t ns3::SatUtMac::GetCurrentSuperFrameId ( uint8_t superFrameSeqId) const
private

Definition at line 440 of file satellite-ut-mac.cc.

References m_timingAdvanceCb.

Referenced by ExtractPacketsToSchedule(), ScheduleCrdsaTransmission(), and ScheduleSlottedAlohaTransmission().

Here is the caller graph for this function:

◆ GetCurrentSuperFrameStartTime()

Time ns3::SatUtMac::GetCurrentSuperFrameStartTime ( uint8_t superFrameSeqId) const
private

Get start time for the current superframe.

Parameters
superFrameSeqIdSuperframe sequence id
Returns
Time Time to transmit

Definition at line 429 of file satellite-ut-mac.cc.

References m_timingAdvanceCb.

Referenced by ScheduleCrdsaTransmission(), and ScheduleSlottedAlohaTransmission().

Here is the caller graph for this function:

◆ GetGwAddress()

Mac48Address ns3::SatUtMac::GetGwAddress ( )

Get address of the GW (or its MAC) serving this UT.

Returns
Address of the GW.

Definition at line 295 of file satellite-ut-mac.cc.

References m_gwAddress.

◆ GetNextRandomAccessAllocationChannel()

uint32_t ns3::SatUtMac::GetNextRandomAccessAllocationChannel ( )
private

Function for selecting the allocation channel for the current RA evaluation.

Returns
allocation channel ID

TODO at the moment only one allocation channel is supported

Definition at line 1383 of file satellite-ut-mac.cc.

References ns3::SatMac::m_nodeInfo, and m_raChannel.

Referenced by DoRandomAccess().

Here is the caller graph for this function:

◆ GetNextSuperFrameTxTime()

Time ns3::SatUtMac::GetNextSuperFrameTxTime ( uint8_t superFrameSeqId) const

Get Tx time for the next possible superframe.

Parameters
superFrameSeqIdSuperframe sequence id
Returns
Time Time to transmit

Definition at line 418 of file satellite-ut-mac.cc.

References m_timingAdvanceCb.

Referenced by DoFrameStart(), and SetTimingAdvanceCallback().

Here is the caller graph for this function:

◆ GetRaChannel()

uint32_t ns3::SatUtMac::GetRaChannel ( ) const

Get RA channel assigned for this UT.

Returns
RA channel assigned to this UT.

Definition at line 347 of file satellite-ut-mac.cc.

References m_raChannel.

◆ GetRcstState()

SatUtMacState::RcstState_t ns3::SatUtMac::GetRcstState ( ) const

Definition at line 2181 of file satellite-ut-mac.cc.

References m_rcstState.

◆ GetRealSendingTime()

Time ns3::SatUtMac::GetRealSendingTime ( Time t)
private

Compute real sending time of UT based on last NCR reception date and clock drift.

Parameters
tSending time if clock is perfect (relative time from Simulator::Now ())
Returns
Corrected time (relative time from Simulator::Now ())

Definition at line 2126 of file satellite-ut-mac.cc.

References m_clockDrift, and m_deltaNcr.

Referenced by CreateCrdsaPacketInstances(), DoEssaTransmit(), DoFrameStart(), DoRandomAccess(), ScheduleDaTxOpportunity(), ScheduleEssaTransmission(), ScheduleSlottedAlohaTransmission(), SendLogon(), and SetTimingAdvanceCallback().

Here is the caller graph for this function:

◆ GetSatId()

uint32_t ns3::SatUtMac::GetSatId ( ) const
inline

Get sat ID of the object.

Returns
sat ID

Definition at line 115 of file satellite-ut-mac.h.

References m_satId.

◆ GetTypeId()

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

Derived from Object.

Definition at line 65 of file satellite-ut-mac.cc.

References ns3::SatMac::SatMac(), m_clockDrift, m_guardTime, m_maxHandoverMessagesSent, m_maxWaitingTimeLogonResponse, m_superframeSeq, m_tbtpResourcesTrace, m_utScheduler, and m_windowInitLogon.

Here is the call graph for this function:

◆ IsRandomAccessSlotAvailable()

bool ns3::SatUtMac::IsRandomAccessSlotAvailable ( uint32_t superFrameId,
uint32_t allocationChannelId,
uint32_t slotId )
private
Parameters
superFrameId
allocationChannelId
slotId
Returns

References ns3::SatUtScheduler::LOOSE.

◆ LogOff()

void ns3::SatUtMac::LogOff ( )

Definition at line 322 of file satellite-ut-mac.cc.

References m_loggedOn, m_logonChannel, m_raChannel, and m_rcstState.

Referenced by DoFrameStart(), and ReceiveSignalingPacket().

Here is the caller graph for this function:

◆ LogonMsgTransmissionPossible()

bool ns3::SatUtMac::LogonMsgTransmissionPossible ( ) const

Method to check whether a transmission of a logon msg is somewhat possible.

Returns
Boolean to indicate whether a logon msg transmission is possible

Definition at line 379 of file satellite-ut-mac.cc.

References m_rcstState, m_useLogon, and ns3::SatUtMacState::READY_FOR_LOGON.

Referenced by ns3::SatUtHelperDvb::Install().

Here is the caller graph for this function:

◆ operator=()

SatUtMac & ns3::SatUtMac::operator= ( const SatUtMac & )
private

References SatUtMac().

Here is the call graph for this function:

◆ PrintUsedRandomAccessSlots()

void ns3::SatUtMac::PrintUsedRandomAccessSlots ( )
private

Definition at line 1925 of file satellite-ut-mac.cc.

References ns3::SatMac::m_nodeInfo, and m_usedRandomAccessSlots.

◆ Receive()

◆ ReceiveQueueEvent()

void ns3::SatUtMac::ReceiveQueueEvent ( SatQueue::QueueEvent_t event,
uint8_t rcIndex )
virtual

Receive a queue event:

  • FIRST_BUFFER_RCVD
  • BUFFER_EMPTY /param event Queue event from SatQueue /param rcIndex Identifier of the queue

Reimplemented from ns3::SatMac.

Definition at line 897 of file satellite-ut-mac.cc.

References ns3::SatQueue::BUFFERED_PKT, ns3::SatEnums::CONTROL_FID, DoRandomAccess(), ns3::SatQueue::FIRST_BUFFERED_PKT, ns3::SatMac::m_nodeInfo, m_randomAccess, and ns3::SatEnums::RA_TRIGGER_TYPE_SLOTTED_ALOHA.

Referenced by ns3::SatUtHelperDvb::Install().

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

◆ ReceiveQueueEventEssa()

void ns3::SatUtMac::ReceiveQueueEventEssa ( SatQueue::QueueEvent_t event,
uint8_t rcIndex )
virtual

Receive a queue event:

  • FIRST_BUFFER_RCVD
  • BUFFER_EMPTY /param event Queue event from SatQueue /param rcIndex Identifier of the queue

Definition at line 921 of file satellite-ut-mac.cc.

References ns3::SatQueue::BUFFERED_PKT, DoRandomAccess(), ns3::SatQueue::FIRST_BUFFERED_PKT, m_isRandomAccessScheduled, ns3::SatMac::m_nodeInfo, m_randomAccess, and ns3::SatEnums::RA_TRIGGER_TYPE_ESSA.

Referenced by ns3::SatUtHelperDvb::Install().

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

◆ ReceiveSignalingPacket()

void ns3::SatUtMac::ReceiveSignalingPacket ( Ptr< Packet > packet)
private

Signaling packet receiver, which handles all the signaling packet receptions.

Parameters
packetReceived signaling packet

Control message NOT found in container anymore! This means, that the SatBeamHelper::CtrlMsgStoreTimeInFwdLink attribute may be set to too short value or there are something wrong in the FWD link RRM.

Control message NOT found in container anymore! This means, that the SatBeamHelper::CtrlMsgStoreTimeInFwdLink attribute may be set to too short value or there are something wrong in the FWD link RRM.

Control message NOT found in container anymore! This means, that the SatBeamHelper::CtrlMsgStoreTimeInFwdLink attribute may be set to too short value or there are something wrong in the FWD link RRM.

Control message NOT found in container anymore! This means, that the SatBeamHelper::CtrlMsgStoreTimeInFwdLink attribute may be set to too short value or there are something wrong in the FWD link RRM.

Control message NOT found in container anymore! This means, that the SatBeamHelper::CtrlMsgStoreTimeInFwdLink attribute may be set to too short value or there are something wrong in the FWD link RRM.

Definition at line 1080 of file satellite-ut-mac.cc.

References ControlMsgTransmissionPossible(), ns3::SatMacTag::GetDestAddress(), ns3::SatAddressE2ETag::GetE2ESourceAddress(), ns3::SatControlMsgTag::GetMsgId(), ns3::SatControlMsgTag::GetMsgType(), ns3::SatLog::LOG_WARNING, LogOff(), m_beamId, m_clockDrift, m_deltaNcr, m_firstTransmittableSuperframeId, m_handoverState, m_lastNcrDateReceived, m_loggedOn, m_ncr, ns3::SatMac::m_ncrV2, ns3::SatMac::m_nodeInfo, m_raChannel, m_randomAccess, m_rcstState, ns3::SatMac::m_readCtrlCallback, m_receptionDates, ns3::SatMac::m_rxCallback, m_sendLogonTries, m_sliceSubscriptionCallback, m_timuInfo, ns3::SatUtMacState::NCR_RECOVERY, NO_HANDOVER, ns3::SatControlMsgTag::SAT_ARQ_ACK, ns3::SatControlMsgTag::SAT_CMT_CTRL_MSG, ns3::SatControlMsgTag::SAT_LOGOFF_CTRL_MSG, ns3::SatControlMsgTag::SAT_LOGON_RESPONSE_CTRL_MSG, ns3::SatControlMsgTag::SAT_NCR_CTRL_MSG, ns3::SatControlMsgTag::SAT_RA_CTRL_MSG, ns3::SatControlMsgTag::SAT_SLICE_CTRL_MSG, ns3::SatControlMsgTag::SAT_TBTP_CTRL_MSG, ns3::SatControlMsgTag::SAT_TIMU_CTRL_MSG, ScheduleTimeSlots(), and WAITING_FOR_TBTP.

Referenced by Receive().

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

◆ RemovePastRandomAccessSlots()

void ns3::SatUtMac::RemovePastRandomAccessSlots ( uint32_t superFrameId)
private

Function for removing the past used RA slots.

Parameters
superFrameIdsuper frame ID

Definition at line 1903 of file satellite-ut-mac.cc.

References ns3::SatMac::m_nodeInfo, and m_usedRandomAccessSlots.

Referenced by UpdateUsedRandomAccessSlots().

Here is the caller graph for this function:

◆ ScheduleCrdsaTransmission()

void ns3::SatUtMac::ScheduleCrdsaTransmission ( uint32_t allocationChannel,
SatRandomAccess::RandomAccessTxOpportunities_s txOpportunities )
private

Function for scheduling the CRDSA transmissions.

Parameters
allocationChannelRA allocation channel
txOpportunitiesTx opportunities

loop through the unique packets

loop through the replicas

check and update used slots

TODO this needs to be handled when multiple allocation channels are implemented In that case a slot exclusion list should be used when randomizing the Tx slots

create replicas and schedule the packets

Definition at line 1623 of file satellite-ut-mac.cc.

References ns3::SatRandomAccess::RandomAccessTxOpportunities_s::crdsaTxOpportunities, CreateCrdsaPacketInstances(), GetCurrentSuperFrameId(), GetCurrentSuperFrameStartTime(), m_crdsaUniquePacketId, ns3::SatMac::m_nodeInfo, ns3::SatConstVariables::SUPERFRAME_SEQUENCE, and UpdateUsedRandomAccessSlots().

Referenced by DoRandomAccess().

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

◆ ScheduleDaTxOpportunity()

void ns3::SatUtMac::ScheduleDaTxOpportunity ( Time transmitDelay,
Time duration,
Ptr< SatWaveform > wf,
Ptr< SatTimeSlotConf > tsConf,
uint32_t carrierId )
private

Schdules one Tx opportunity, i.e.

time slot.

Parameters
transmitDelaytime when transmit possibility starts
durationduration of the burst
wfwaveform
tsConfTime slot conf
carrierIdCarrier id used for the transmission

Definition at line 563 of file satellite-ut-mac.cc.

References DoTransmit(), GetRealSendingTime(), and ns3::SatUtScheduler::LOOSE.

Referenced by ScheduleTimeSlots().

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

◆ ScheduleEssaTransmission()

void ns3::SatUtMac::ScheduleEssaTransmission ( uint32_t allocationChannel)
private

Function for scheduling the ESSA transmissions.

Parameters
allocationChannelRA allocation channel

start time

not transmiting at the moment, transmit now

duration

carrier

schedule transmission

Definition at line 1570 of file satellite-ut-mac.cc.

References ns3::SatEnums::CONTROL_FID, DoEssaTransmit(), GetRealSendingTime(), ns3::SatUtScheduler::LOOSE, m_nextPacketTime, ns3::SatMac::m_nodeInfo, m_superframeSeq, and ns3::SatConstVariables::SUPERFRAME_SEQUENCE.

Referenced by DoRandomAccess().

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

◆ ScheduleSlottedAlohaTransmission()

void ns3::SatUtMac::ScheduleSlottedAlohaTransmission ( uint32_t allocationChannel)
private

Function for scheduling the Slotted ALOHA transmissions.

Parameters
allocationChannelallocation channel

check if we have known DAMA allocations this functionality checks the current and all known future frames for DAMA allocation TODO it might be better to check only the current frame or a limited subset of frames

search for the next available slot if there is no free slots in the current frame, look for it in the following frames

time slot configuration

start time

duration

carrier

schedule transmission

Definition at line 1394 of file satellite-ut-mac.cc.

References ns3::SatEnums::CONTROL_FID, DoSlottedAlohaTransmit(), GetCurrentSuperFrameId(), GetCurrentSuperFrameStartTime(), GetRealSendingTime(), ns3::SatMac::m_nodeInfo, m_superframeSeq, m_tbtpContainer, SearchFrameForAvailableSlot(), ns3::SatUtScheduler::STRICT, and ns3::SatConstVariables::SUPERFRAME_SEQUENCE.

Referenced by DoRandomAccess().

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

◆ ScheduleTimeSlots()

void ns3::SatUtMac::ScheduleTimeSlots ( Ptr< SatTbtpMessage > tbtp)
private

Schedules time slots according to received TBTP message.

Parameters
tbtpPointer to TBTP message.

Calculate the sending time of the time slots within this TBTP for this specific UT. UTs may be located at different distances from the satellite, thus they shall have to send the time slots at different times so that the transmissions are received at the GW at correct time.

If using asynchronous access (no timeslots), return TODO find better way of doing this

Definition at line 449 of file satellite-ut-mac.cc.

References ns3::SatSuperframeConf::CONFIG_TYPE_4, m_assignedDaResourcesCallback, ns3::SatMac::m_nodeInfo, m_rcstState, m_superframeSeq, m_tbtpContainer, m_tbtpResourcesTrace, m_timingAdvanceCb, m_useLogon, ns3::SatEnums::NUM_FIDS, ns3::SatUtMacState::READY_FOR_TDMA_SYNC, ScheduleDaTxOpportunity(), ns3::SatTimeSlotConf::SLOT_TYPE_C, ns3::SatConstVariables::SUPERFRAME_SEQUENCE, and ns3::SatUtMacState::TDMA_SYNC.

Referenced by ReceiveSignalingPacket().

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

◆ SearchFrameForAvailableSlot()

std::pair< bool, uint32_t > ns3::SatUtMac::SearchFrameForAvailableSlot ( Time superframeStartTime,
Ptr< SatFrameConf > frameConf,
uint32_t timeSlotCount,
uint32_t superFrameId,
uint32_t allocationChannel )
private
Parameters
superframeStartTime
frameConf
timeSlotCount
superFrameId
allocationChannel
Returns

if we can not use the current superframe, e.g., we are in the the middle of the last slot of the frame, we will use offset 0, e.g., the first slot of the next frame

Definition at line 1497 of file satellite-ut-mac.cc.

References FindNextAvailableRandomAccessSlot(), and ns3::SatMac::m_nodeInfo.

Referenced by ScheduleSlottedAlohaTransmission().

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

◆ SendLogon()

◆ SetAssignedDaResourcesCallback()

void ns3::SatUtMac::SetAssignedDaResourcesCallback ( SatUtMac::AssignedDaResourcesCallback cb)

Set the assigned DA resources callback.

Parameters
cbcallback to invoke whenever TBTP is received.

Definition at line 410 of file satellite-ut-mac.cc.

References m_assignedDaResourcesCallback.

◆ SetGatewayUpdateCallback()

void ns3::SatUtMac::SetGatewayUpdateCallback ( SatUtMac::GatewayUpdateCallback cb)

Method to set the gateway address update callback.

Parameters
cbcallback to invoke to update gateway address

Definition at line 242 of file satellite-ut-mac.cc.

References m_gatewayUpdateCallback.

◆ SetGwAddress()

void ns3::SatUtMac::SetGwAddress ( Mac48Address gwAddress)

Set address of the GW (or its MAC) serving this UT.

Parameters
gwAddressAddress of the GW.

Definition at line 303 of file satellite-ut-mac.cc.

References m_gatewayUpdateCallback, and m_gwAddress.

Referenced by DoFrameStart().

Here is the caller graph for this function:

◆ SetHandoverCallback()

void ns3::SatUtMac::SetHandoverCallback ( SatUtMac::HandoverCallback cb)

Method to set handover callback.

Parameters
cbcallback to invoke whenever a TIM-U is received prompting us to switch beams

Definition at line 235 of file satellite-ut-mac.cc.

References m_handoverCallback.

◆ SetLogonChannel()

void ns3::SatUtMac::SetLogonChannel ( uint32_t channelId)

Definition at line 331 of file satellite-ut-mac.cc.

References m_logonChannel, and m_useLogon.

◆ SetNodeInfo()

void ns3::SatUtMac::SetNodeInfo ( Ptr< SatNodeInfo > nodeInfo)
virtual

Set the node info.

Parameters
nodeInfocontaining node specific information

Reimplemented from ns3::SatMac.

Definition at line 312 of file satellite-ut-mac.cc.

References m_tbtpContainer, m_utScheduler, and ns3::SatMac::SetNodeInfo().

Here is the call graph for this function:

◆ SetRaChannel()

void ns3::SatUtMac::SetRaChannel ( uint32_t raChannel)

Set RA channel assigned for this UT.

Parameters
raChannelRA channel assigned to this UT.

Definition at line 339 of file satellite-ut-mac.cc.

References m_raChannel.

Referenced by ns3::SatUtHelperDvb::Install().

Here is the caller graph for this function:

◆ SetRandomAccess()

void ns3::SatUtMac::SetRandomAccess ( Ptr< SatRandomAccess > randomAccess)

Set the random access module.

Parameters
randomAccess

Definition at line 355 of file satellite-ut-mac.cc.

References ns3::SatTbtpContainer::HasScheduledTimeSlots(), m_randomAccess, and m_tbtpContainer.

Here is the call graph for this function:

◆ SetSatelliteAddress()

void ns3::SatUtMac::SetSatelliteAddress ( Address satelliteAddress)
virtual

Set the satellite MAC address on the other side of this link (if regenerative satellite).

Reimplemented from ns3::SatMac.

Definition at line 288 of file satellite-ut-mac.cc.

References ns3::SatMac::m_isRegenerative, and ns3::SatMac::m_satelliteAddress.

Referenced by DoFrameStart().

Here is the caller graph for this function:

◆ SetSendLogonCallback()

void ns3::SatUtMac::SetSendLogonCallback ( SatUtMac::SendLogonCallback cb)

Set the logon callback.

Parameters
cbcallback to invoke when sending a logon message

Definition at line 272 of file satellite-ut-mac.cc.

References m_sendLogonCallback.

◆ SetSliceSubscriptionCallback()

void ns3::SatUtMac::SetSliceSubscriptionCallback ( SatUtMac::SliceSubscriptionCallback cb)

Get sliec subscription info from MAC layer.

Parameters
cbcallback to invoke slices subscription changes

Definition at line 264 of file satellite-ut-mac.cc.

References m_sliceSubscriptionCallback.

◆ SetTimingAdvanceCallback()

void ns3::SatUtMac::SetTimingAdvanceCallback ( SatUtMac::TimingAdvanceCallback cb)

Set the timing advance callback.

Parameters
cbcallback to invoke whenever a timing advance is needed by SatUtMac object.

schedule the next frame start

Definition at line 390 of file satellite-ut-mac.cc.

References DoFrameStart(), GetNextSuperFrameTxTime(), GetRealSendingTime(), m_timingAdvanceCb, and ns3::SatConstVariables::SUPERFRAME_SEQUENCE.

Here is the call graph for this function:

◆ SetTxCheckCallback()

void ns3::SatUtMac::SetTxCheckCallback ( SatUtMac::TxCheckCallback cb)

Set the TX check callback.

Parameters
cbcallback to invoke when checking if TX is enabled

Definition at line 256 of file satellite-ut-mac.cc.

References m_txCheckCallback.

◆ SetUpdateAddressAndIdentifierCallback()

void ns3::SatUtMac::SetUpdateAddressAndIdentifierCallback ( SatUtMac::UpdateAddressAndIdentifierCallback cb)

Set the callback to update addresses in statistics helpers.

Parameters
cbCallback to update addresses in statistics helpers

Definition at line 249 of file satellite-ut-mac.cc.

References m_updateAddressAndIdentifierCallback.

◆ SetUpdateGwAddressCallback()

void ns3::SatUtMac::SetUpdateGwAddressCallback ( SatUtMac::UpdateGwAddressCallback cb)

Set the gw update callback.

Parameters
cbcallback to update GW address to SatRequestManager

Definition at line 280 of file satellite-ut-mac.cc.

References m_updateGwAddressCallback.

◆ TransmitPackets()

void ns3::SatUtMac::TransmitPackets ( SatPhy::PacketContainer_t packets,
Time duration,
uint32_t carrierId,
SatSignalParameters::txInfo_s txInfo )
private
Parameters
packets
duration
carrierId
txInfo

Definition at line 862 of file satellite-ut-mac.cc.

References ns3::SatUtMacState::HOLD_STANDBY, m_guardTime, ns3::SatMac::m_nodeInfo, m_rcstState, ns3::SatUtMacState::READY_FOR_TDMA_SYNC, and ns3::SatMac::SendPacket().

Referenced by CreateCrdsaPacketInstances(), DoEssaTransmit(), DoSlottedAlohaTransmit(), DoTransmit(), and SendLogon().

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

◆ UpdateUsedRandomAccessSlots()

bool ns3::SatUtMac::UpdateUsedRandomAccessSlots ( uint32_t superFrameId,
uint32_t allocationChannel,
uint32_t slot )
private

Function for updating the used RA slots.

Parameters
superFrameIdsuper frame ID
allocationChannelallocation channel
slotRA slot
Returns
was the update successful

remove past RA Tx opportunity information

Definition at line 1848 of file satellite-ut-mac.cc.

References ns3::SatMac::m_nodeInfo, m_usedRandomAccessSlots, and RemovePastRandomAccessSlots().

Referenced by FindNextAvailableRandomAccessSlot(), and ScheduleCrdsaTransmission().

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

Member Data Documentation

◆ m_assignedDaResourcesCallback

AssignedDaResourcesCallback ns3::SatUtMac::m_assignedDaResourcesCallback
private

Callback for informing the assigned TBTP resources.

Definition at line 620 of file satellite-ut-mac.h.

Referenced by ScheduleTimeSlots(), and SetAssignedDaResourcesCallback().

◆ m_beamId

uint32_t ns3::SatUtMac::m_beamId
private

ID of beam for UT.

Definition at line 605 of file satellite-ut-mac.h.

Referenced by SatUtMac(), SatUtMac(), DoFrameStart(), GetBeamId(), and ReceiveSignalingPacket().

◆ m_clockDrift

int32_t ns3::SatUtMac::m_clockDrift
private

Clock drift (number of ticks per second).

Definition at line 769 of file satellite-ut-mac.h.

Referenced by SatUtMac(), SatUtMac(), GetRealSendingTime(), GetTypeId(), and ReceiveSignalingPacket().

◆ m_crdsaOnlyForControl

bool ns3::SatUtMac::m_crdsaOnlyForControl
private

Planned CRDSA usage:

  • true -> only for control
  • false -> for control and user data

Definition at line 712 of file satellite-ut-mac.h.

Referenced by SatUtMac(), SatUtMac(), and CreateCrdsaPacketInstances().

◆ m_crdsaUniquePacketId

uint32_t ns3::SatUtMac::m_crdsaUniquePacketId
private

CRDSA packet ID (per frame).

Definition at line 705 of file satellite-ut-mac.h.

Referenced by SatUtMac(), SatUtMac(), CreateCrdsaPacketInstances(), DoEssaTransmit(), DoFrameStart(), and ScheduleCrdsaTransmission().

◆ m_deltaNcr

int64_t ns3::SatUtMac::m_deltaNcr
private

Correction to apply to NCR dates.

Definition at line 764 of file satellite-ut-mac.h.

Referenced by SatUtMac(), SatUtMac(), GetRealSendingTime(), and ReceiveSignalingPacket().

◆ m_firstTransmittableSuperframeId

uint32_t ns3::SatUtMac::m_firstTransmittableSuperframeId
private

◆ m_gatewayUpdateCallback

SatUtMac::GatewayUpdateCallback ns3::SatUtMac::m_gatewayUpdateCallback
private

Gateway address update callback.

Definition at line 798 of file satellite-ut-mac.h.

Referenced by SatUtMac(), SatUtMac(), DoDispose(), SetGatewayUpdateCallback(), and SetGwAddress().

◆ m_guardTime

Time ns3::SatUtMac::m_guardTime
private

Guard time for time slots.

The guard time is modeled by shortening the duration of a time slot by a m_guardTime set by an attribute.

Definition at line 631 of file satellite-ut-mac.h.

Referenced by SatUtMac(), SatUtMac(), GetTypeId(), and TransmitPackets().

◆ m_gwAddress

Mac48Address ns3::SatUtMac::m_gwAddress
private

Definition at line 747 of file satellite-ut-mac.h.

Referenced by DoFrameStart(), DoTransmit(), GetGwAddress(), and SetGwAddress().

◆ m_handoverCallback

SatUtMac::HandoverCallback ns3::SatUtMac::m_handoverCallback
private

The physical layer handover callback.

Definition at line 793 of file satellite-ut-mac.h.

Referenced by SatUtMac(), SatUtMac(), DoDispose(), DoFrameStart(), and SetHandoverCallback().

◆ m_handoverMessagesCount

uint32_t ns3::SatUtMac::m_handoverMessagesCount
private

Definition at line 785 of file satellite-ut-mac.h.

Referenced by SatUtMac(), SatUtMac(), and DoFrameStart().

◆ m_handoverState

HandoverState_t ns3::SatUtMac::m_handoverState
private

◆ m_isRandomAccessScheduled

bool ns3::SatUtMac::m_isRandomAccessScheduled
private

Flag that indicates if a method DoRandomAccess is scheduled for asynchronous access.

Definition at line 723 of file satellite-ut-mac.h.

Referenced by SatUtMac(), SatUtMac(), DoEssaTransmit(), DoRandomAccess(), and ReceiveQueueEventEssa().

◆ m_lastNcrDateReceived

Time ns3::SatUtMac::m_lastNcrDateReceived
private

Reception date of last NCR control message.

Definition at line 754 of file satellite-ut-mac.h.

Referenced by SatUtMac(), SatUtMac(), and ReceiveSignalingPacket().

◆ m_loggedOn

bool ns3::SatUtMac::m_loggedOn
private

UT is logged on.

Definition at line 661 of file satellite-ut-mac.h.

Referenced by SatUtMac(), SatUtMac(), DoFrameStart(), LogOff(), and ReceiveSignalingPacket().

◆ m_logonChannel

uint32_t ns3::SatUtMac::m_logonChannel
private

RA channel dedicated to logon messages.

Definition at line 656 of file satellite-ut-mac.h.

Referenced by SatUtMac(), SatUtMac(), ControlMsgTransmissionPossible(), DoRandomAccess(), LogOff(), SendLogon(), and SetLogonChannel().

◆ m_maxHandoverMessagesSent

uint32_t ns3::SatUtMac::m_maxHandoverMessagesSent
private

Definition at line 786 of file satellite-ut-mac.h.

Referenced by SatUtMac(), SatUtMac(), DoFrameStart(), and GetTypeId().

◆ m_maxWaitingTimeLogonResponse

Time ns3::SatUtMac::m_maxWaitingTimeLogonResponse
private

Timeout for waiting for a response for a logon message.

Definition at line 681 of file satellite-ut-mac.h.

Referenced by SatUtMac(), SatUtMac(), GetTypeId(), and SendLogon().

◆ m_ncr

uint64_t ns3::SatUtMac::m_ncr
private

NCR value of last NCR control message.

Definition at line 759 of file satellite-ut-mac.h.

Referenced by SatUtMac(), SatUtMac(), and ReceiveSignalingPacket().

◆ m_nextLogonTransmissionPossible

Time ns3::SatUtMac::m_nextLogonTransmissionPossible
private

Instant when a logon message can be transmitted.

Definition at line 690 of file satellite-ut-mac.h.

Referenced by SatUtMac(), SatUtMac(), DoFrameStart(), and SendLogon().

◆ m_nextPacketTime

Time ns3::SatUtMac::m_nextPacketTime
private

Next time when a next ESSA packet can be safely sent.

Definition at line 717 of file satellite-ut-mac.h.

Referenced by SatUtMac(), SatUtMac(), DoEssaTransmit(), and ScheduleEssaTransmission().

◆ m_node

Ptr<Node> ns3::SatUtMac::m_node
private

Node containing this MAC.

Definition at line 595 of file satellite-ut-mac.h.

Referenced by SatUtMac(), and DoFrameStart().

◆ m_raChannel

uint32_t ns3::SatUtMac::m_raChannel
private

◆ m_randomAccess

◆ m_rcstState

◆ m_receptionDates

std::queue<Time> ns3::SatUtMac::m_receptionDates
private

Store last 3 packets reception date, to be associated to NCR dates.

Definition at line 774 of file satellite-ut-mac.h.

Referenced by Receive(), and ReceiveSignalingPacket().

◆ m_satId

uint32_t ns3::SatUtMac::m_satId
private

ID of sat for UT.

Definition at line 600 of file satellite-ut-mac.h.

Referenced by SatUtMac(), SatUtMac(), DoFrameStart(), and GetSatId().

◆ m_sendLogonCallback

SatUtMac::SendLogonCallback ns3::SatUtMac::m_sendLogonCallback
private

Callback for sending a logon message.

Definition at line 813 of file satellite-ut-mac.h.

Referenced by SatUtMac(), SatUtMac(), DoDispose(), DoFrameStart(), and SetSendLogonCallback().

◆ m_sendLogonTries

uint32_t ns3::SatUtMac::m_sendLogonTries
private

Number of times a logon message has been sent without response.

Definition at line 671 of file satellite-ut-mac.h.

Referenced by SatUtMac(), SatUtMac(), ReceiveSignalingPacket(), and SendLogon().

◆ m_sliceSubscriptionCallback

SatUtMac::SliceSubscriptionCallback ns3::SatUtMac::m_sliceSubscriptionCallback
private

Tx checking callback.

Definition at line 808 of file satellite-ut-mac.h.

Referenced by SatUtMac(), SatUtMac(), DoDispose(), ReceiveSignalingPacket(), and SetSliceSubscriptionCallback().

◆ m_superframeSeq

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

◆ m_tbtpContainer

Ptr<SatTbtpContainer> ns3::SatUtMac::m_tbtpContainer
private

Container for storing all the TBTP information related to this UT.

Definition at line 636 of file satellite-ut-mac.h.

Referenced by SatUtMac(), ~SatUtMac(), ControlMsgTransmissionPossible(), DoDispose(), DoFrameStart(), ScheduleSlottedAlohaTransmission(), ScheduleTimeSlots(), SetNodeInfo(), and SetRandomAccess().

◆ m_tbtpResourcesTrace

TracedCallback<uint32_t> ns3::SatUtMac::m_tbtpResourcesTrace
private

Assigned TBTP resources in superframe for this UT (in bytes).

Definition at line 700 of file satellite-ut-mac.h.

Referenced by GetTypeId(), and ScheduleTimeSlots().

◆ m_timingAdvanceCb

TimingAdvanceCallback ns3::SatUtMac::m_timingAdvanceCb
private

Callback for getting the timing advance information.

Definition at line 615 of file satellite-ut-mac.h.

Referenced by SatUtMac(), SatUtMac(), DoDispose(), GetCurrentSuperFrameId(), GetCurrentSuperFrameStartTime(), GetNextSuperFrameTxTime(), ScheduleTimeSlots(), and SetTimingAdvanceCallback().

◆ m_timuInfo

Ptr<SatTimuInfo> ns3::SatUtMac::m_timuInfo
private

◆ m_txCheckCallback

SatUtMac::TxCheckCallback ns3::SatUtMac::m_txCheckCallback
private

Tx checking callback.

Definition at line 803 of file satellite-ut-mac.h.

Referenced by SatUtMac(), SatUtMac(), DoDispose(), DoFrameStart(), DoTransmit(), and SetTxCheckCallback().

◆ m_uniformRandomVariable

Ptr<UniformRandomVariable> ns3::SatUtMac::m_uniformRandomVariable
private

Uniform random variable distribution generator.

Definition at line 641 of file satellite-ut-mac.h.

Referenced by SatUtMac().

◆ m_updateAddressAndIdentifierCallback

SatUtMac::UpdateAddressAndIdentifierCallback ns3::SatUtMac::m_updateAddressAndIdentifierCallback
private

Callback to update addresses in statistics helpers.

Definition at line 823 of file satellite-ut-mac.h.

Referenced by DoFrameStart(), and SetUpdateAddressAndIdentifierCallback().

◆ m_updateGwAddressCallback

SatUtMac::UpdateGwAddressCallback ns3::SatUtMac::m_updateGwAddressCallback
private

Callback for sending a logon message.

Definition at line 818 of file satellite-ut-mac.h.

Referenced by SatUtMac(), SatUtMac(), DoDispose(), DoFrameStart(), and SetUpdateGwAddressCallback().

◆ m_usedRandomAccessSlots

std::map<std::pair<uint32_t, uint32_t>, std::set<uint32_t> > ns3::SatUtMac::m_usedRandomAccessSlots
private

A container for storing the used RA slots in each frame and allocation channel.

Definition at line 646 of file satellite-ut-mac.h.

Referenced by PrintUsedRandomAccessSlots(), RemovePastRandomAccessSlots(), and UpdateUsedRandomAccessSlots().

◆ m_useLogon

bool ns3::SatUtMac::m_useLogon
private

◆ m_utScheduler

Ptr<SatUtScheduler> ns3::SatUtMac::m_utScheduler
private

UT scheduler.

Definition at line 695 of file satellite-ut-mac.h.

Referenced by DoDispose(), DoEssaTransmit(), ExtractPacketsToSchedule(), GetTypeId(), and SetNodeInfo().

◆ m_waitingTimeLogonRng

Ptr<UniformRandomVariable> ns3::SatUtMac::m_waitingTimeLogonRng
private

The random generator for waiting transmission time.

Definition at line 685 of file satellite-ut-mac.h.

Referenced by SatUtMac(), SatUtMac(), and SendLogon().

◆ m_windowInitLogon

Time ns3::SatUtMac::m_windowInitLogon
private

The initial max time to wait when sending a logon message.

Definition at line 676 of file satellite-ut-mac.h.

Referenced by SatUtMac(), SatUtMac(), GetTypeId(), and SendLogon().


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