ns3::SatGeoMac Class Referenceabstract

The SatGeoMac models the global link MAC layer of the satellite node. More...

#include "satellite-geo-mac.h"

+ Inheritance diagram for ns3::SatGeoMac:
+ Collaboration diagram for ns3::SatGeoMac:

Public Types

typedef Callback< void, SatPhy::PacketContainer_t, Ptr< SatSignalParameters > > ReceiveNetDeviceCallback
 
typedef Callback< void, Ptr< SatSignalParameters > > TransmitCallback
 
- Public Types inherited from ns3::SatMac
typedef Callback< void, Ptr< const Packet > > LoraReceiveCallback
 Callback to receive packet by upper layer. More...
 
typedef Callback< Ptr< SatControlMessage >, uint32_t > ReadCtrlMsgCallback
 Callback to read control messages from container storing control messages. More...
 
typedef Callback< void, Ptr< Packet >, Mac48Address, Mac48Address > ReceiveCallback
 Callback to receive packet by upper layer. More...
 
typedef Callback< uint32_t, Ptr< SatControlMessage > > ReserveCtrlMsgCallback
 Callback to reserve an id and initially store the control message. More...
 
typedef Callback< void, Address, Address > RoutingUpdateCallback
 Callback to update routing and ARP tables after handover. More...
 
typedef Callback< uint32_t, uint32_t > SendCtrlMsgCallback
 Callback to send a control message and allocate a recv ID for it. More...
 
typedef Callback< void, SatPhy::PacketContainer_t, uint32_t, Time, SatSignalParameters::txInfo_sTransmitCallback
 Callback to send packet to lower layer. More...
 

Public Member Functions

 SatGeoMac (uint32_t satId, uint32_t beamId, SatEnums::RegenerationMode_t forwardLinkRegenerationMode, SatEnums::RegenerationMode_t returnLinkRegenerationMode)
 Construct a SatGeoMac. More...
 
 SatGeoMac (void)
 Default constructor. More...
 
virtual ~SatGeoMac ()
 Destructor for SatGeoMac. More...
 
virtual void DoDispose (void)
 Dispose of this class instance. More...
 
virtual void DoInitialize (void)
 
virtual void EnquePacket (Ptr< Packet > packet)=0
 Add new packet to the LLC queue. More...
 
virtual Time GetGuardTime () const
 
TypeId GetInstanceTypeId (void) const
 
void SetFwdScheduler (Ptr< SatFwdLinkScheduler > fwdScheduler)
 Method to set link scheduler (forward or SCPC) More...
 
virtual void SetGuardTime (Time guardTime)
 
void SetLlc (Ptr< SatGeoLlc > llc)
 Set the Geo LLC associated to this Geo MAC layer. More...
 
void SetReceiveNetDeviceCallback (SatGeoMac::ReceiveNetDeviceCallback cb)
 
void SetTransmitCallback (SatGeoMac::TransmitCallback cb)
 
void StartPeriodicTransmissions ()
 Starts periodical transmissions. More...
 
- Public Member Functions inherited from ns3::SatMac
 SatMac ()
 Construct a SatMac. More...
 
 SatMac (uint32_t satId, uint32_t beamId, SatEnums::RegenerationMode_t forwardLinkRegenerationMode, SatEnums::RegenerationMode_t returnLinkRegenerationMode)
 Construct a SatMac. More...
 
 ~SatMac ()
 Destroy a SatMac. More...
 
virtual void Disable ()
 Disable the MAC layer, i.e. More...
 
virtual void Enable ()
 Enable the MAC layer, i.e. More...
 
Address GetAddress () const
 Get MAC address. More...
 
uint32_t GetBeamId () const
 Get beam ID of the object. More...
 
uint32_t GetSatId () const
 Get sat ID of the object. More...
 
virtual void ReceiveQueueEvent (SatQueue::QueueEvent_t event, uint8_t flowIndex)
 Receive a queue event: More...
 
uint32_t ReserveIdAndStoreCtrlMsgToContainer (Ptr< SatControlMessage > msg)
 Reserve id and store the control message. More...
 
uint32_t SendCtrlMsgFromContainer (uint32_t sendId)
 Send the control message from the container. More...
 
void SetLoraReceiveCallback (SatMac::LoraReceiveCallback cb)
 Method to set receive callback. More...
 
virtual void SetNodeInfo (Ptr< SatNodeInfo > nodeInfo)
 Set the node info. More...
 
void SetReadCtrlCallback (SatMac::ReadCtrlMsgCallback cb)
 Method to set read control message callback. More...
 
void SetReceiveCallback (SatMac::ReceiveCallback cb)
 Method to set receive callback. More...
 
void SetReserveCtrlCallback (SatMac::ReserveCtrlMsgCallback cb)
 Method to set reserve control message id callback. More...
 
void SetRoutingUpdateCallback (SatMac::RoutingUpdateCallback cb)
 Method to set the routing update callback. More...
 
virtual void SetSatelliteAddress (Address satelliteAddress)
 Set the satellite MAC address on the other side of this link (if regenerative satellite). More...
 
void SetSendCtrlCallback (SatMac::SendCtrlMsgCallback cb)
 Method to set send control message callback. More...
 
void SetTransmitCallback (SatMac::TransmitCallback cb)
 Method to set transmit callback. More...
 

Static Public Member Functions

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

Protected Member Functions

virtual Address GetRxUtAddress (Ptr< Packet > packet)=0
 Get the UT address associated to this RX packet. More...
 
virtual SatEnums::SatLinkDir_t GetSatLinkRxDir ()=0
 Get the link RX direction. More...
 
virtual SatEnums::SatLinkDir_t GetSatLinkTxDir ()=0
 Get the link TX direction. More...
 
virtual void RxTraces (SatPhy::PacketContainer_t packets)
 Invoke the Rx trace source for each received packet. More...
 
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. More...
 
void StartTransmission (uint32_t carrierId)
 Start sending a Packet Down the Wire. More...
 
- Protected Member Functions inherited from ns3::SatMac
void DoDispose (void)
 Dispose of SatMac. More...
 
void RxTraces (SatPhy::PacketContainer_t packets)
 Invoke the Rx trace source for each received packet. More...
 
void SetTimeTag (SatPhy::PacketContainer_t packets)
 Set SatMacTimeTag of packets. More...
 

Protected Attributes

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

Detailed Description

The SatGeoMac models the global link MAC layer of the satellite node.

Definition at line 44 of file satellite-geo-mac.h.

Member Typedef Documentation

◆ ReceiveNetDeviceCallback

◆ TransmitCallback

Definition at line 109 of file satellite-geo-mac.h.

Constructor & Destructor Documentation

◆ SatGeoMac() [1/2]

ns3::SatGeoMac::SatGeoMac ( void  )

Default constructor.

Definition at line 64 of file satellite-geo-mac.cc.

◆ SatGeoMac() [2/2]

ns3::SatGeoMac::SatGeoMac ( uint32_t  satId,
uint32_t  beamId,
SatEnums::RegenerationMode_t  forwardLinkRegenerationMode,
SatEnums::RegenerationMode_t  returnLinkRegenerationMode 
)

Construct a SatGeoMac.

This is the constructor for the SatGeoMac

Parameters
satIdID of sat for UT
beamIdID of beam for UT
forwardLinkRegenerationModeForward link regeneration mode
returnLinkRegenerationModeReturn link regeneration mode

Definition at line 70 of file satellite-geo-mac.cc.

◆ ~SatGeoMac()

ns3::SatGeoMac::~SatGeoMac ( )
virtual

Destructor for SatGeoMac.

Definition at line 83 of file satellite-geo-mac.cc.

Member Function Documentation

◆ DoDispose()

void ns3::SatGeoMac::DoDispose ( void  )
virtual

Dispose of this class instance.

Reimplemented in ns3::SatGeoUserMac, and ns3::SatGeoFeederMac.

Definition at line 89 of file satellite-geo-mac.cc.

◆ DoInitialize()

void ns3::SatGeoMac::DoInitialize ( void  )
virtual

Reimplemented in ns3::SatGeoUserMac, and ns3::SatGeoFeederMac.

Definition at line 96 of file satellite-geo-mac.cc.

◆ EnquePacket()

virtual void ns3::SatGeoMac::EnquePacket ( Ptr< Packet >  packet)
pure virtual

Add new packet to the LLC queue.

Parameters
packetPackets to be sent.

Implemented in ns3::SatGeoUserMac, and ns3::SatGeoFeederMac.

◆ GetGuardTime()

Time ns3::SatGeoMac::GetGuardTime ( ) const
virtual

Definition at line 253 of file satellite-geo-mac.cc.

References m_guardTime.

Referenced by ns3::SatGeoFeederMac::GetTypeId(), and ns3::SatGeoUserMac::GetTypeId().

+ Here is the caller graph for this function:

◆ GetInstanceTypeId()

TypeId ns3::SatGeoMac::GetInstanceTypeId ( void  ) const

Definition at line 57 of file satellite-geo-mac.cc.

References GetTypeId().

+ Here is the call graph for this function:

◆ GetRxUtAddress()

virtual Address ns3::SatGeoMac::GetRxUtAddress ( Ptr< Packet >  packet)
protectedpure virtual

Get the UT address associated to this RX packet.

May be source or destination address depending on link used

Parameters
packetThe packet to consider
Returns
The address of associated UT

Implemented in ns3::SatGeoUserMac, and ns3::SatGeoFeederMac.

Referenced by RxTraces().

+ Here is the caller graph for this function:

◆ GetSatLinkRxDir()

virtual SatEnums::SatLinkDir_t ns3::SatGeoMac::GetSatLinkRxDir ( )
protectedpure virtual

Get the link RX direction.

Must be implemented by child clases.

Returns
The link RX direction

Implemented in ns3::SatGeoUserMac, and ns3::SatGeoFeederMac.

◆ GetSatLinkTxDir()

virtual SatEnums::SatLinkDir_t ns3::SatGeoMac::GetSatLinkTxDir ( )
protectedpure virtual

Get the link TX direction.

Must be implemented by child clases.

Returns
The link TX direction

Implemented in ns3::SatGeoUserMac, and ns3::SatGeoFeederMac.

Referenced by SendPacket().

+ Here is the caller graph for this function:

◆ GetTypeId()

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

inherited from Object

Definition at line 45 of file satellite-geo-mac.cc.

References m_bbFrameTxTrace.

Referenced by GetInstanceTypeId().

+ Here is the caller graph for this function:

◆ RxTraces()

void ns3::SatGeoMac::RxTraces ( SatPhy::PacketContainer_t  packets)
protectedvirtual

Invoke the Rx trace source for each received packet.

Parameters
packetsContainer of the pointers to the packets received.

Definition at line 195 of file satellite-geo-mac.cc.

References ns3::SatMacTag::GetDestAddress(), GetRxUtAddress(), ns3::SatMacLinkTimeTag::GetSenderLinkTimestamp(), ns3::SatMac::m_isStatisticsTagsEnabled, ns3::SatMac::m_lastLinkDelay, ns3::SatMac::m_nodeInfo, ns3::SatMac::m_rxLinkDelayTrace, ns3::SatMac::m_rxLinkJitterTrace, and ns3::SatMac::m_rxTrace.

Referenced by ns3::SatGeoFeederMac::Receive(), and ns3::SatGeoUserMac::Receive().

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

◆ SendPacket()

void ns3::SatGeoMac::SendPacket ( SatPhy::PacketContainer_t  packets,
uint32_t  carrierId,
Time  duration,
SatSignalParameters::txInfo_s  txInfo 
)
protectedvirtual

Send packets to lower layer by using a callback.

Parameters
packetsPackets to be sent.
carrierIdID of the carrier used for transmission.
durationDuration of the physical layer transmission.
txInfoAdditional parameterization for burst transmission.

Reimplemented from ns3::SatMac.

Definition at line 162 of file satellite-geo-mac.cc.

References ns3::SatUtils::GetPacketInfo(), GetSatLinkTxDir(), ns3::SatEnums::LL_MAC, m_beamId, ns3::SatMac::m_nodeInfo, ns3::SatMac::m_packetTrace, m_satId, m_txCallback, ns3::SatEnums::PACKET_SENT, and ns3::SatMac::SetTimeTag().

Referenced by StartTransmission().

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

◆ SetFwdScheduler()

void ns3::SatGeoMac::SetFwdScheduler ( Ptr< SatFwdLinkScheduler fwdScheduler)

Method to set link scheduler (forward or SCPC)

Parameters
Thescheduler to use

Definition at line 241 of file satellite-geo-mac.cc.

References m_fwdScheduler.

◆ SetGuardTime()

void ns3::SatGeoMac::SetGuardTime ( Time  guardTime)
virtual

Definition at line 259 of file satellite-geo-mac.cc.

References m_guardTime.

Referenced by ns3::SatGeoFeederMac::GetTypeId(), and ns3::SatGeoUserMac::GetTypeId().

+ Here is the caller graph for this function:

◆ SetLlc()

void ns3::SatGeoMac::SetLlc ( Ptr< SatGeoLlc llc)

Set the Geo LLC associated to this Geo MAC layer.

Definition at line 247 of file satellite-geo-mac.cc.

References m_llc.

◆ SetReceiveNetDeviceCallback()

void ns3::SatGeoMac::SetReceiveNetDeviceCallback ( SatGeoMac::ReceiveNetDeviceCallback  cb)

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

References m_rxNetDeviceCallback.

◆ SetTransmitCallback()

void ns3::SatGeoMac::SetTransmitCallback ( SatGeoMac::TransmitCallback  cb)

Definition at line 265 of file satellite-geo-mac.cc.

References m_txCallback.

◆ StartPeriodicTransmissions()

void ns3::SatGeoMac::StartPeriodicTransmissions ( )

Starts periodical transmissions.

Called when MAC is wanted to take care of periodic sending.

Definition at line 103 of file satellite-geo-mac.cc.

References m_fwdScheduler, and StartTransmission().

+ Here is the call graph for this function:

◆ StartTransmission()

void ns3::SatGeoMac::StartTransmission ( uint32_t  carrierId)
protected

Start sending a Packet Down the Wire.

The StartTransmission method is used internally in the SatGeoMac to begin the process of sending a packet out on the PHY layer.

Parameters
carrierIdid of the carrier.
Returns
true if success, false on failure

Decrease a guard time from BB frame duration.

GEO MAC is disabled, thus get the duration of the default BB frame and try again then.

Definition at line 116 of file satellite-geo-mac.cc.

References ns3::SatSignalParameters::txInfo_s::frameType, m_bbFrameTxTrace, m_fwdScheduler, m_guardTime, ns3::SatMac::m_txEnabled, ns3::SatSignalParameters::txInfo_s::modCod, ns3::SatEnums::PACKET_TYPE_DEDICATED_ACCESS, ns3::SatSignalParameters::txInfo_s::packetType, SendPacket(), ns3::SatSignalParameters::txInfo_s::sliceId, and ns3::SatSignalParameters::txInfo_s::waveformId.

Referenced by StartPeriodicTransmissions().

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

Member Data Documentation

◆ m_bbFrameTxTrace

TracedCallback<Ptr<SatBbFrame> > ns3::SatGeoMac::m_bbFrameTxTrace
protected

Trace for transmitted BB frames.

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

Referenced by GetTypeId(), and StartTransmission().

◆ m_beamId

uint32_t ns3::SatGeoMac::m_beamId
protected

ID of beam for UT.

Definition at line 187 of file satellite-geo-mac.h.

Referenced by SendPacket().

◆ m_fwdScheduler

Ptr<SatFwdLinkScheduler> ns3::SatGeoMac::m_fwdScheduler
protected

◆ m_guardTime

Time ns3::SatGeoMac::m_guardTime
protected

Guard time for BB frames.

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

Definition at line 177 of file satellite-geo-mac.h.

Referenced by GetGuardTime(), SetGuardTime(), and StartTransmission().

◆ m_llc

Ptr<SatGeoLlc> ns3::SatGeoMac::m_llc
protected

LLC layer linked to this MAC.

Definition at line 192 of file satellite-geo-mac.h.

Referenced by ns3::SatGeoFeederMac::EnquePacket(), ns3::SatGeoUserMac::EnquePacket(), and SetLlc().

◆ m_rxNetDeviceCallback

ReceiveNetDeviceCallback ns3::SatGeoMac::m_rxNetDeviceCallback
protected

◆ m_satId

uint32_t ns3::SatGeoMac::m_satId
protected

ID of sat for UT.

Definition at line 182 of file satellite-geo-mac.h.

Referenced by SendPacket().

◆ m_txCallback

TransmitCallback ns3::SatGeoMac::m_txCallback
protected

Definition at line 199 of file satellite-geo-mac.h.

Referenced by SendPacket(), and SetTransmitCallback().


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