ns3::LorawanMac Class Referenceabstract

Class representing the LoRaWAN MAC layer. More...

#include "lorawan-mac.h"

+ Inheritance diagram for ns3::LorawanMac:
+ Collaboration diagram for ns3::LorawanMac:

Public Types

typedef std::array< std::array< uint8_t, 6 >, 8 > ReplyDataRateMatrix
 
- 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

 LorawanMac ()
 
 LorawanMac (uint32_t satId, uint32_t beamId)
 
virtual ~LorawanMac ()
 
virtual void FailedReception (Ptr< const Packet > packet)=0
 Function called by lower layers to inform this layer that reception of a packet we were locked on failed. More...
 
double GetBandwidthFromDataRate (uint8_t dataRate)
 Get the BW corresponding to a data rate, based on this MAC's region. More...
 
double GetDbmForTxPower (uint8_t txPower)
 Get the transmission power in dBm that corresponds, in this region, to the encoded 8-bit txPower. More...
 
Ptr< NetDevice > GetDevice (void)
 Get the device this MAC layer is installed on. More...
 
LoraLogicalChannelHelper GetLoraLogicalChannelHelper (void)
 Get the logical lora channel helper associated with this MAC. More...
 
int GetNPreambleSymbols (void)
 Get the number of PHY preamble symbols this MAC is set to use. More...
 
Time GetOnAirTime (Ptr< Packet > packet, LoraTxParameters txParams)
 Compute the time that a packet with certain characteristics will take to be transmitted. More...
 
Ptr< SatPhyGetPhy (void)
 Get the underlying PHY layer. More...
 
Ptr< SatLoraPhyTxGetPhyTx (void)
 Get the underlying PHY TX layer. More...
 
uint8_t GetSfFromDataRate (uint8_t dataRate)
 Get the SF corresponding to a data rate, based on this MAC's region. More...
 
virtual void Receive (SatPhy::PacketContainer_t packets, Ptr< SatSignalParameters >)=0
 Receive a packet from the lower layer. More...
 
virtual void Send (Ptr< Packet > packet)=0
 Send a packet. More...
 
virtual void Send (Ptr< Packet > packet, const Address &dest, uint16_t protocolNumber)
 Send a packet. More...
 
void SetBandwidthForDataRate (std::vector< double > bandwidthForDataRate)
 Set the vector to use to check up correspondence between bandwidth and DataRate. More...
 
void SetDevice (Ptr< NetDevice > device)
 Set the device this MAC layer is installed on. More...
 
void SetLoraLogicalChannelHelper (LoraLogicalChannelHelper helper)
 Set the LoraLogicalChannelHelper this MAC instance will use. More...
 
void SetMaxAppPayloadForDataRate (std::vector< uint32_t > maxAppPayloadForDataRate)
 Set the maximum App layer payload for a set DataRate. More...
 
void SetNPreambleSymbols (int nPreambleSymbols)
 Set the number of PHY preamble symbols this MAC is set to use. More...
 
void SetPhy (Ptr< SatPhy > phy)
 Set the underlying PHY layer. More...
 
void SetPhyTx (Ptr< SatLoraPhyTx > phyTx)
 Set the underlying PHY TX layer. More...
 
void setRegenerative (bool isRegenerative)
 Indicates if the satellite is regenerative on the link this layer is sending packets. More...
 
void SetReplyDataRateMatrix (ReplyDataRateMatrix replyDataRateMatrix)
 Set the matrix to use when deciding with which DataRate to respond. More...
 
void SetSfForDataRate (std::vector< uint8_t > sfForDataRate)
 Set the vector to use to check up correspondence between SF and DataRate. More...
 
void SetTxDbmForTxPower (std::vector< double > txDbmForTxPower)
 Set the vector to use to check up which transmission power in Dbm corresponds to a certain TxPower value in this MAC's region. More...
 
virtual void TxFinished ()=0
 Perform actions after sending a packet. 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)
 
- Static Public Member Functions inherited from ns3::SatMac
static TypeId GetTypeId (void)
 Derived from Object. More...
 

Protected Attributes

std::vector< double > m_bandwidthForDataRate
 A vector holding the bandwidth each Data Rate corresponds to. More...
 
uint32_t m_beamId
 ID of beam for UT. More...
 
TracedCallback< Ptr< const Packet > > m_cannotSendBecauseDutyCycle
 The trace source that is fired when a packet cannot be sent because of duty cycle limitations. More...
 
LoraLogicalChannelHelper m_channelHelper
 The LoraLogicalChannelHelper instance that is assigned to this MAC. More...
 
Ptr< NetDevice > m_device
 The device this MAC layer is installed on. More...
 
bool m_isRegenerative
 Indicates if satellite is regenerative on the link where this layer is sending packets. More...
 
std::vector< uint32_t > m_maxAppPayloadForDataRate
 A vector holding the maximum app payload size that corresponds to a certain DataRate. More...
 
int m_nPreambleSymbols
 The number of symbols to use in the PHY preamble. More...
 
Ptr< SatPhym_phy
 The PHY instance that sits under this MAC layer. More...
 
TracedCallback< Ptr< const Packet > > m_receivedPacket
 Trace source that is fired when a packet reaches the MAC layer. More...
 
ReplyDataRateMatrix m_replyDataRateMatrix
 The matrix that decides the DR the GW will use in a reply based on the ED's sending DR and on the value of the RX1DROffset parameter. More...
 
TracedCallback< Ptr< const Packet > > m_sentNewPacket
 Trace source that is fired when a new APP layer packet arrives at the MAC layer. More...
 
std::vector< uint8_t > m_sfForDataRate
 A vector holding the SF each Data Rate corresponds to. More...
 
std::vector< double > m_txDbmForTxPower
 A vector holding the power that corresponds to a certain TxPower value. More...
 
- 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...
 

Additional Inherited Members

- 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...
 
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 SetTimeTag (SatPhy::PacketContainer_t packets)
 Set SatMacTimeTag of packets. More...
 

Detailed Description

Class representing the LoRaWAN MAC layer.

This class is meant to be extended differently based on whether the layer belongs to an End Device or a Gateway, while holding some functionality that is common to both.

Definition at line 46 of file lorawan-mac.h.

Member Typedef Documentation

◆ ReplyDataRateMatrix

typedef std::array<std::array<uint8_t, 6>, 8> ns3::LorawanMac::ReplyDataRateMatrix

Definition at line 55 of file lorawan-mac.h.

Constructor & Destructor Documentation

◆ LorawanMac() [1/2]

ns3::LorawanMac::LorawanMac ( )

Definition at line 58 of file lorawan-mac.cc.

◆ LorawanMac() [2/2]

ns3::LorawanMac::LorawanMac ( uint32_t  satId,
uint32_t  beamId 
)

Definition at line 64 of file lorawan-mac.cc.

◆ ~LorawanMac()

ns3::LorawanMac::~LorawanMac ( )
virtual

Definition at line 72 of file lorawan-mac.cc.

Member Function Documentation

◆ FailedReception()

virtual void ns3::LorawanMac::FailedReception ( Ptr< const Packet >  packet)
pure virtual

Function called by lower layers to inform this layer that reception of a packet we were locked on failed.

Parameters
packetthe packet we failed to receive

Implemented in ns3::LorawanMacGateway, ns3::LorawanMacEndDevice, and ns3::LorawanMacEndDeviceClassA.

◆ GetBandwidthFromDataRate()

double ns3::LorawanMac::GetBandwidthFromDataRate ( uint8_t  dataRate)

Get the BW corresponding to a data rate, based on this MAC's region.

Parameters
dataRateThe Data Rate we need to convert to a bandwidth value.
Returns
The bandwidth that corresponds to the parameter Data Rate in this MAC's region, or 0 if the dataRate is not valid.

Definition at line 137 of file lorawan-mac.cc.

References m_bandwidthForDataRate.

Referenced by ns3::LorawanMacEndDeviceClassA::GetNextClassTransmissionDelay(), ns3::LorawanMacEndDevice::OnLinkAdrReq(), ns3::LorawanMacEndDeviceClassA::OnRxClassParamSetupReq(), ns3::LorawanMacGateway::Send(), and ns3::LorawanMacEndDeviceClassA::SendToPhy().

+ Here is the caller graph for this function:

◆ GetDbmForTxPower()

double ns3::LorawanMac::GetDbmForTxPower ( uint8_t  txPower)

Get the transmission power in dBm that corresponds, in this region, to the encoded 8-bit txPower.

Parameters
txPowerThe 8-bit encoded txPower to convert.
Returns
The corresponding transmission power in dBm, or 0 if the encoded power was not recognized as valid.

Definition at line 151 of file lorawan-mac.cc.

References m_txDbmForTxPower.

Referenced by ns3::LorawanMacEndDevice::OnLinkAdrReq().

+ Here is the caller graph for this function:

◆ GetDevice()

Ptr< NetDevice > ns3::LorawanMac::GetDevice ( void  )

Get the device this MAC layer is installed on.

Returns
The NetDevice this MAC layer will refer to.

Definition at line 90 of file lorawan-mac.cc.

References m_device.

◆ GetLoraLogicalChannelHelper()

LoraLogicalChannelHelper ns3::LorawanMac::GetLoraLogicalChannelHelper ( void  )

Get the logical lora channel helper associated with this MAC.

Returns
The instance of LoraLogicalChannelHelper that this MAC is using.

Definition at line 111 of file lorawan-mac.cc.

References m_channelHelper.

◆ GetNPreambleSymbols()

int ns3::LorawanMac::GetNPreambleSymbols ( void  )

Get the number of PHY preamble symbols this MAC is set to use.

Returns
The number of preamble symbols to use (typically 8).

Definition at line 238 of file lorawan-mac.cc.

References m_nPreambleSymbols.

◆ GetOnAirTime()

Time ns3::LorawanMac::GetOnAirTime ( Ptr< Packet >  packet,
LoraTxParameters  txParams 
)

Compute the time that a packet with certain characteristics will take to be transmitted.

Besides from the ones saved in LoraTxParameters, the packet's payload (obtained through a GetSize () call to accout for the presence of Headers and Trailers, too) also influences the packet transmit time.

Parameters
packetThe packet that needs to be transmitted.
txParamsThe set of parameters that will be used for transmission.
Returns
The time necessary to transmit the packet.

Definition at line 164 of file lorawan-mac.cc.

References ns3::LoraTxParameters::bandwidthHz, ns3::LoraTxParameters::codingRate, ns3::LoraTxParameters::crcEnabled, ns3::LoraTxParameters::headerDisabled, ns3::LoraTxParameters::lowDataRateOptimizationEnabled, ns3::LoraTxParameters::nPreamble, and ns3::LoraTxParameters::sf.

Referenced by ns3::LorawanMacGateway::Send(), and ns3::LorawanMacEndDeviceClassA::SendToPhy().

+ Here is the caller graph for this function:

◆ GetPhy()

Ptr< SatPhy > ns3::LorawanMac::GetPhy ( void  )

Get the underlying PHY layer.

Returns
The PHY layer that this MAC is connected to.

Definition at line 96 of file lorawan-mac.cc.

References m_phy.

◆ GetPhyTx()

Ptr<SatLoraPhyTx> ns3::LorawanMac::GetPhyTx ( void  )

Get the underlying PHY TX layer.

Returns
The PHY TX layer that this MAC is connected to.

◆ GetSfFromDataRate()

uint8_t ns3::LorawanMac::GetSfFromDataRate ( uint8_t  dataRate)

Get the SF corresponding to a data rate, based on this MAC's region.

Parameters
dataRateThe Data Rate we need to convert to a Spreading Factor value.
Returns
The SF that corresponds to a Data Rate in this MAC's region, or 0 if the dataRate is not valid.

Definition at line 123 of file lorawan-mac.cc.

References m_sfForDataRate.

Referenced by ns3::LorawanMacEndDeviceClassA::GetNextClassTransmissionDelay(), ns3::LorawanMacEndDevice::OnLinkAdrReq(), ns3::LorawanMacEndDeviceClassA::OnRxClassParamSetupReq(), ns3::LorawanMacEndDeviceClassA::OpenSecondReceiveWindow(), ns3::LorawanMacGateway::Send(), and ns3::LorawanMacEndDeviceClassA::SendToPhy().

+ Here is the caller graph for this function:

◆ GetTypeId()

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

Definition at line 35 of file lorawan-mac.cc.

References m_cannotSendBecauseDutyCycle, m_receivedPacket, and m_sentNewPacket.

◆ Receive()

virtual void ns3::LorawanMac::Receive ( SatPhy::PacketContainer_t  packets,
Ptr< SatSignalParameters  
)
pure virtual

Receive a packet from the lower layer.

Parameters
packetsthe received packets

Implemented in ns3::LorawanMacGateway, and ns3::LorawanMacEndDevice.

Referenced by ns3::SatGwHelper::InstallLora(), and ns3::SatUtHelper::InstallLora().

+ Here is the caller graph for this function:

◆ Send() [1/2]

virtual void ns3::LorawanMac::Send ( Ptr< Packet >  packet)
pure virtual

Send a packet.

Parameters
packetThe packet to send.

Implemented in ns3::LorawanMacGateway, and ns3::LorawanMacEndDevice.

◆ Send() [2/2]

void ns3::LorawanMac::Send ( Ptr< Packet >  packet,
const Address &  dest,
uint16_t  protocolNumber 
)
virtual

Send a packet.

Parameters
packetThe packet to send.

Definition at line 78 of file lorawan-mac.cc.

◆ SetBandwidthForDataRate()

void ns3::LorawanMac::SetBandwidthForDataRate ( std::vector< double >  bandwidthForDataRate)

Set the vector to use to check up correspondence between bandwidth and DataRate.

Parameters
bandwidthForDataRateA vector that contains at position i the bandwidth that should correspond to DR i in this MAC's region.

Definition at line 214 of file lorawan-mac.cc.

References m_bandwidthForDataRate.

◆ SetDevice()

void ns3::LorawanMac::SetDevice ( Ptr< NetDevice >  device)

Set the device this MAC layer is installed on.

Parameters
deviceThe NetDevice this MAC layer will refer to.

Definition at line 84 of file lorawan-mac.cc.

References m_device.

◆ SetLoraLogicalChannelHelper()

void ns3::LorawanMac::SetLoraLogicalChannelHelper ( LoraLogicalChannelHelper  helper)

Set the LoraLogicalChannelHelper this MAC instance will use.

Parameters
helperThe instance of the helper to use.

Definition at line 117 of file lorawan-mac.cc.

References m_channelHelper.

◆ SetMaxAppPayloadForDataRate()

void ns3::LorawanMac::SetMaxAppPayloadForDataRate ( std::vector< uint32_t >  maxAppPayloadForDataRate)

Set the maximum App layer payload for a set DataRate.

Parameters
maxAppPayloadForDataRateA vector that contains at position i the maximum Application layer payload that should correspond to DR i in this MAC's region.

Definition at line 220 of file lorawan-mac.cc.

References m_maxAppPayloadForDataRate.

◆ SetNPreambleSymbols()

void ns3::LorawanMac::SetNPreambleSymbols ( int  nPreambleSymbols)

Set the number of PHY preamble symbols this MAC is set to use.

Parameters
nPreambleSymbolsThe number of preamble symbols to use (typically 8).

Definition at line 232 of file lorawan-mac.cc.

References m_nPreambleSymbols.

◆ SetPhy()

void ns3::LorawanMac::SetPhy ( Ptr< SatPhy phy)

Set the underlying PHY layer.

Parameters
phythe phy layer

Definition at line 102 of file lorawan-mac.cc.

References m_phy, and TxFinished().

+ Here is the call graph for this function:

◆ SetPhyTx()

void ns3::LorawanMac::SetPhyTx ( Ptr< SatLoraPhyTx phyTx)

Set the underlying PHY TX layer.

Parameters
phythe phy tx layer

◆ setRegenerative()

void ns3::LorawanMac::setRegenerative ( bool  isRegenerative)

Indicates if the satellite is regenerative on the link this layer is sending packets.

Definition at line 244 of file lorawan-mac.cc.

References m_isRegenerative.

◆ SetReplyDataRateMatrix()

void ns3::LorawanMac::SetReplyDataRateMatrix ( ReplyDataRateMatrix  replyDataRateMatrix)

Set the matrix to use when deciding with which DataRate to respond.

Region based.

Parameters
replyDataRateMatrixA matrix containing the reply DataRates, based on the sending DataRate and on the value of the RX1DROffset parameter.

Definition at line 251 of file lorawan-mac.cc.

References m_replyDataRateMatrix.

◆ SetSfForDataRate()

void ns3::LorawanMac::SetSfForDataRate ( std::vector< uint8_t >  sfForDataRate)

Set the vector to use to check up correspondence between SF and DataRate.

Parameters
sfForDataRateA vector that contains at position i the SF that should correspond to DR i.

Definition at line 208 of file lorawan-mac.cc.

References m_sfForDataRate.

◆ SetTxDbmForTxPower()

void ns3::LorawanMac::SetTxDbmForTxPower ( std::vector< double >  txDbmForTxPower)

Set the vector to use to check up which transmission power in Dbm corresponds to a certain TxPower value in this MAC's region.

Parameters
txDbmForTxPowerA vector that contains at position i the transmission power in dBm that should correspond to a TXPOWER value of i in this MAC's region.

Definition at line 226 of file lorawan-mac.cc.

References m_txDbmForTxPower.

◆ TxFinished()

virtual void ns3::LorawanMac::TxFinished ( )
pure virtual

Perform actions after sending a packet.

Implemented in ns3::LorawanMacGateway, ns3::LorawanMacEndDevice, and ns3::LorawanMacEndDeviceClassA.

Referenced by SetPhy().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_bandwidthForDataRate

std::vector<double> ns3::LorawanMac::m_bandwidthForDataRate
protected

A vector holding the bandwidth each Data Rate corresponds to.

Definition at line 299 of file lorawan-mac.h.

Referenced by GetBandwidthFromDataRate(), and SetBandwidthForDataRate().

◆ m_beamId

uint32_t ns3::LorawanMac::m_beamId
protected

ID of beam for UT.

Definition at line 326 of file lorawan-mac.h.

◆ m_cannotSendBecauseDutyCycle

TracedCallback<Ptr<const Packet> > ns3::LorawanMac::m_cannotSendBecauseDutyCycle
protected

The trace source that is fired when a packet cannot be sent because of duty cycle limitations.

See also
class CallBackTraceSource

Definition at line 263 of file lorawan-mac.h.

Referenced by GetTypeId(), and ns3::LorawanMacEndDevice::Send().

◆ m_channelHelper

◆ m_device

Ptr<NetDevice> ns3::LorawanMac::m_device
protected

The device this MAC layer is installed on.

Definition at line 284 of file lorawan-mac.h.

Referenced by GetDevice(), ns3::LorawanMacGateway::Receive(), ns3::LorawanMacGateway::Send(), ns3::LorawanMacEndDeviceClassA::SendToPhy(), and SetDevice().

◆ m_isRegenerative

bool ns3::LorawanMac::m_isRegenerative
protected

Indicates if satellite is regenerative on the link where this layer is sending packets.

Definition at line 331 of file lorawan-mac.h.

Referenced by setRegenerative().

◆ m_maxAppPayloadForDataRate

std::vector<uint32_t> ns3::LorawanMac::m_maxAppPayloadForDataRate
protected

A vector holding the maximum app payload size that corresponds to a certain DataRate.

Definition at line 305 of file lorawan-mac.h.

Referenced by ns3::LorawanMacEndDevice::DoSend(), and SetMaxAppPayloadForDataRate().

◆ m_nPreambleSymbols

int ns3::LorawanMac::m_nPreambleSymbols
protected

The number of symbols to use in the PHY preamble.

Definition at line 310 of file lorawan-mac.h.

Referenced by GetNPreambleSymbols(), ns3::LorawanMacEndDeviceClassA::SendToPhy(), and SetNPreambleSymbols().

◆ m_phy

Ptr<SatPhy> ns3::LorawanMac::m_phy
protected

The PHY instance that sits under this MAC layer.

Definition at line 279 of file lorawan-mac.h.

Referenced by GetPhy(), ns3::LorawanMacGateway::IsTransmitting(), ns3::LorawanMacGateway::Send(), ns3::LorawanMacEndDeviceClassA::SendToPhy(), and SetPhy().

◆ m_receivedPacket

TracedCallback<Ptr<const Packet> > ns3::LorawanMac::m_receivedPacket
protected

Trace source that is fired when a packet reaches the MAC layer.

Definition at line 268 of file lorawan-mac.h.

Referenced by GetTypeId(), ns3::LorawanMacEndDeviceClassA::Receive(), and ns3::LorawanMacGateway::Receive().

◆ m_replyDataRateMatrix

ReplyDataRateMatrix ns3::LorawanMac::m_replyDataRateMatrix
protected

The matrix that decides the DR the GW will use in a reply based on the ED's sending DR and on the value of the RX1DROffset parameter.

Definition at line 321 of file lorawan-mac.h.

Referenced by ns3::LorawanMacEndDeviceClassA::GetFirstReceiveWindowDataRate(), and SetReplyDataRateMatrix().

◆ m_sentNewPacket

TracedCallback<Ptr<const Packet> > ns3::LorawanMac::m_sentNewPacket
protected

Trace source that is fired when a new APP layer packet arrives at the MAC layer.

Definition at line 274 of file lorawan-mac.h.

Referenced by ns3::LorawanMacEndDevice::DoSend(), GetTypeId(), and ns3::LorawanMacGateway::Send().

◆ m_sfForDataRate

std::vector<uint8_t> ns3::LorawanMac::m_sfForDataRate
protected

A vector holding the SF each Data Rate corresponds to.

Definition at line 294 of file lorawan-mac.h.

Referenced by GetSfFromDataRate(), and SetSfForDataRate().

◆ m_txDbmForTxPower

std::vector<double> ns3::LorawanMac::m_txDbmForTxPower
protected

A vector holding the power that corresponds to a certain TxPower value.

Definition at line 315 of file lorawan-mac.h.

Referenced by GetDbmForTxPower(), and SetTxDbmForTxPower().


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