A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::lorawan Namespace Reference

Classes

class  AdrComponent
 LinkAdrRequest commands management. More...
 
class  BuildingPenetrationLoss
 A class implementing the TR 45.820 model for building losses. More...
 
class  ClassAEndDeviceLorawanMac
 Class representing the MAC layer of a Class A LoRaWAN device. More...
 
class  ConfirmedMessagesComponent
 Network controller component for acknowledgments management. More...
 
class  ConstantLoraTxCurrentModel
 A constant model of the transmission current for a LoRa device, always yielding the same current independently from the transmission power provided. More...
 
class  CorrelatedShadowingPropagationLossModel
 Propagation loss model for spatially correlated shadowing in a city. More...
 
class  DevStatusAns
 Implementation of the DevStatusAns LoRaWAN MAC command. More...
 
class  DevStatusReq
 Implementation of the DevStatusReq LoRaWAN MAC command. More...
 
class  DlChannelAns
 Implementation of the DlChannelAns LoRaWAN MAC command. More...
 
class  DutyCycleAns
 Implementation of the DutyCycleAns LoRaWAN MAC command. More...
 
class  DutyCycleReq
 Implementation of the DutyCycleReq LoRaWAN MAC command. More...
 
class  EndDeviceLoraPhy
 Class representing a LoRa transceiver. More...
 
class  EndDeviceLoraPhyListener
 Receive notifications about PHY events. More...
 
class  EndDeviceLorawanMac
 Class representing the MAC layer of a LoRaWAN device. More...
 
class  EndDeviceStatus
 This class represents the network server's knowledge about an end device in the LoRaWAN network it is administering. More...
 
class  Forwarder
 This application forwards packets between NetDevices: LoraNetDevice -> PointToPointNetDevice and vice versa. More...
 
class  ForwarderHelper
 This class can be used to install Forwarder applications on a set of gateways. More...
 
class  GatewayLoraPhy
 Class modeling a Lora SX1301 chip. More...
 
class  GatewayLorawanMac
 Class representing the MAC layer of a LoRaWAN gateway. More...
 
class  GatewayStatus
 This class represents the network server's knowledge about a gateway in the LoRaWAN network it is administering. More...
 
class  LinearLoraTxCurrentModel
 A linear model of the transmission current for a LoRa device, based on the WiFi model. More...
 
class  LinkAdrAns
 Implementation of the LinkAdrAns LoRaWAN MAC command. More...
 
class  LinkAdrReq
 Implementation of the LinkAdrReq LoRaWAN MAC command. More...
 
class  LinkCheckAns
 Implementation of the LinkCheckAns LoRaWAN MAC command. More...
 
class  LinkCheckComponent
 Network controller component for LinkCheck commands management. More...
 
class  LinkCheckReq
 Implementation of the LinkCheckReq LoRaWAN MAC command. More...
 
class  LogicalLoraChannel
 This class represents a logical LoRaWAN channel. More...
 
class  LogicalLoraChannelHelper
 This class supports LorawanMac instances by managing a list of the logical channels that the device is supposed to be using, and establishes their relationship with SubBands. More...
 
class  LoraChannel
 The class that delivers packets among PHY layers. More...
 
struct  LoraChannelParameters
 A struct that holds meaningful parameters for transmission on a LoraChannel. More...
 
class  LoraDeviceAddress
 This class represents the device address of a LoraWAN end device. More...
 
class  LoraDeviceAddressGenerator
 This class generates sequential LoraDeviceAddress instances. More...
 
class  LoraFrameHeader
 This class represents the Frame header (FHDR) used in a LoraWAN network. More...
 
class  LoraHelper
 Helps to create LoraNetDevice objects. More...
 
class  LoraInterferenceHelper
 Helper for LoraPhy that manages interference calculations. More...
 
class  LoraNetDevice
 Hold together all LoRa related objects. More...
 
class  LoraPacketTracker
 Tracks and stores packets sent in the simulation and provides aggregation functionality. More...
 
class  LoraPhy
 Base class for PHY layers implementing the LoRa modulation scheme. More...
 
class  LoraPhyHelper
 Helper to install LoraPhy instances on multiple Nodes. More...
 
class  LoraRadioEnergyModel
 A LoRa radio energy model. More...
 
class  LoraRadioEnergyModelHelper
 Installs LoraRadioEnergyModel on devices. More...
 
class  LoraRadioEnergyModelPhyListener
 Installable listener for LoRa physiscal layer state changes. More...
 
class  LoraTag
 Tag used to save various data about a packet, like its Spreading Factor and data about interference. More...
 
class  LoraTxCurrentModel
 Model the transmit current as a function of the transmit power and mode. More...
 
struct  LoraTxParameters
 Structure to collect all parameters that are used to compute the duration of a packet (excluding payload length). More...
 
class  LorawanMac
 Class representing the LoRaWAN MAC layer. More...
 
class  LorawanMacHeader
 This class represents the Mac header of a LoRaWAN packet. More...
 
class  LorawanMacHelper
 Helper class for configuring and installing the LorawanMac class on devices and gateways. More...
 
class  MacCommand
 This base class is used to represent a general MAC command. More...
 
struct  MacPacketStatus
 Stores MAC-layer packet metrics of sender/receivers. More...
 
struct  NetworkComponents
 Stores the main elements of a simulated LoRaWAN network. More...
 
class  NetworkController
 This class collects a series of components that deal with various aspects of managing the network, and queries them for action when a new packet is received or other events occur in the network. More...
 
class  NetworkControllerComponent
 Generic class describing a component of the NetworkController. More...
 
class  NetworkScheduler
 Network server component in charge of scheduling downling packets onto devices' reception windows. More...
 
class  NetworkServer
 The NetworkServer is an application standing on top of a node equipped with links that connect it with the gateways. More...
 
class  NetworkServerHelper
 This class can install a NetworkServer application on a node. More...
 
class  NetworkStatus
 This class represents the knowledge about the state of the network that is available at the network server. More...
 
class  NewChannelAns
 Implementation of the NewChannelAns LoRaWAN MAC command. More...
 
class  NewChannelReq
 Implementation of the NewChannelReq LoRaWAN MAC command. More...
 
class  NwkAddr
 Class representing the Network Address component of a LoraDeviceAddress (25 bits) More...
 
class  NwkID
 Class representing the NetworkId component of a LoraDeviceAddress (7 bits). More...
 
class  OneShotSender
 Packet sender application to send a single packet. More...
 
class  OneShotSenderHelper
 This class can be used to install OneShotSender applications on multiple nodes at once. More...
 
struct  PacketStatus
 Stores PHY-layer uplink packet metrics of sender/receivers. More...
 
class  PeriodicSender
 Implements a sender application generating packets following a periodic point process. More...
 
class  PeriodicSenderHelper
 This class can be used to install PeriodicSender applications on a wide range of nodes. More...
 
struct  RetransmissionStatus
 Stores (optionally enabled) MAC layer packet retransmission process metrics of end devices. More...
 
class  RxParamSetupAns
 Implementation of the RxParamSetupAns LoRaWAN MAC command. More...
 
class  RxParamSetupReq
 Implementation of the RxParamSetupReq LoRaWAN MAC command. More...
 
class  RxTimingSetupAns
 Implementation of the RxTimingSetupAns LoRaWAN MAC command. More...
 
class  RxTimingSetupReq
 Implementation of the RxTimingSetupReq LoRaWAN MAC command. More...
 
class  SimpleEndDeviceLoraPhy
 Class representing a simple LoRa transceiver, with an error model based on receiver sensitivity and a SIR table. More...
 
class  SimpleGatewayLoraPhy
 Class modeling a Lora SX1301 chip. More...
 
class  SubBand
 Class representing a SubBand, i.e., a frequency band subject to some regulations on duty cycle and transmission power. More...
 
class  TxParamSetupAns
 Implementation of the TxParamSetupAns LoRaWAN MAC command. More...
 
class  TxParamSetupReq
 Implementation of the TxParamSetupReq LoRaWAN MAC command. More...
 

Typedefs

typedef std::map< Ptr< const Packet >, MacPacketStatusMacPacketData
 
typedef std::list< std::pair< Ptr< PointToPointNetDevice >, Ptr< Node > > > P2PGwRegistration_t
 Store network server app registration details for gateway nodes having a P2P link with the network server.
 
typedef std::map< Ptr< const Packet >, PacketStatusPhyPacketData
 
typedef std::map< Ptr< const Packet >, RetransmissionStatusRetransmissionData
 

Enumerations

enum  MacCommandType {
  INVALID , LINK_CHECK_REQ , LINK_CHECK_ANS , LINK_ADR_REQ ,
  LINK_ADR_ANS , DUTY_CYCLE_REQ , DUTY_CYCLE_ANS , RX_PARAM_SETUP_REQ ,
  RX_PARAM_SETUP_ANS , DEV_STATUS_REQ , DEV_STATUS_ANS , NEW_CHANNEL_REQ ,
  NEW_CHANNEL_ANS , RX_TIMING_SETUP_REQ , RX_TIMING_SETUP_ANS , TX_PARAM_SETUP_REQ ,
  TX_PARAM_SETUP_ANS , DL_CHANNEL_REQ , DL_CHANNEL_ANS
}
 Enum for every possible command type. More...
 
enum  PhyPacketOutcome {
  RECEIVED , INTERFERED , NO_MORE_RECEIVERS , UNDER_SENSITIVITY ,
  LOST_BECAUSE_TX , UNSET
}
 

Functions

Ptr< LoraChannelCreateChannel ()
 
NodeContainer CreateEndDevices (int nDevices, MobilityHelper mobility, Ptr< LoraChannel > channel)
 
NodeContainer CreateGateways (int nGateways, MobilityHelper mobility, Ptr< LoraChannel > channel)
 
Ptr< NodeCreateNetworkServer (NodeContainer endDevices, NodeContainer gateways)
 
double DbmToW (double dbm)
 Convert from dBm to Watts.
 
double DbToRatio (double db)
 Convert from dB to ratio.
 
template<typename T >
Ptr< T > GetMacLayerFromNode (Ptr< Node > n)
 
NetworkComponents InitializeNetwork (int nDevices, int nGateways)
 
bool operator!= (const Ptr< LogicalLoraChannel > &first, const Ptr< LogicalLoraChannel > &second)
 Overload the != operator to compare different instances of the same LogicalLoraChannel.
 
std::ostream & operator<< (std::ostream &os, const EndDeviceStatus &status)
 
std::ostream & operator<< (std::ostream &os, const LoraChannelParameters &params)
 Allow logging of LoraChannelParameters like with any other data type.
 
std::ostream & operator<< (std::ostream &os, const LoraDeviceAddress &address)
 Operator overload to correctly handle logging when an address is passed as an argument.
 
std::ostream & operator<< (std::ostream &os, const LoraInterferenceHelper::Event &event)
 Allow easy logging of LoraInterferenceHelper Events.
 
std::ostream & operator<< (std::ostream &os, const LoraTxParameters &params)
 Allow logging of LoraTxParameters like with any other data type.
 
bool operator== (const Ptr< LogicalLoraChannel > &first, const Ptr< LogicalLoraChannel > &second)
 Overload of the == operator to compare different instances of the same LogicalLoraChannel.
 
double RatioToDb (double ratio)
 Convert from ratio to dB.
 
double WToDbm (double w)
 Convert from Watts to dBm.
 

Variables

double inf = std::numeric_limits<double>::max()
 

Typedef Documentation

◆ MacPacketData

Definition at line 78 of file lora-packet-tracker.h.

◆ P2PGwRegistration_t

Store network server app registration details for gateway nodes having a P2P link with the network server.

For each gateway, store in a pair:

  • The Point-to-point net device of the network server;
  • The gateway node connected to the P2P net device.

Definition at line 39 of file network-server-helper.h.

◆ PhyPacketData

Definition at line 79 of file lora-packet-tracker.h.

◆ RetransmissionData

Definition at line 80 of file lora-packet-tracker.h.

Enumeration Type Documentation

◆ MacCommandType

Enum for every possible command type.

Enumerator
INVALID 
LINK_CHECK_REQ 
LINK_CHECK_ANS 
LINK_ADR_REQ 
LINK_ADR_ANS 
DUTY_CYCLE_REQ 
DUTY_CYCLE_ANS 
RX_PARAM_SETUP_REQ 
RX_PARAM_SETUP_ANS 
DEV_STATUS_REQ 
DEV_STATUS_ANS 
NEW_CHANNEL_REQ 
NEW_CHANNEL_ANS 
RX_TIMING_SETUP_REQ 
RX_TIMING_SETUP_ANS 
TX_PARAM_SETUP_REQ 
TX_PARAM_SETUP_ANS 
DL_CHANNEL_REQ 
DL_CHANNEL_ANS 

Definition at line 24 of file mac-command.h.

◆ PhyPacketOutcome

Enumerator
RECEIVED 
INTERFERED 
NO_MORE_RECEIVERS 
UNDER_SENSITIVITY 
LOST_BECAUSE_TX 
UNSET 

Definition at line 23 of file lora-packet-tracker.h.

Function Documentation

◆ CreateChannel()

Ptr< LoraChannel > ns3::lorawan::CreateChannel ( )

Definition at line 17 of file utilities.cc.

References ns3::CreateObject().

Referenced by InitializeNetwork().

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

◆ CreateEndDevices()

NodeContainer ns3::lorawan::CreateEndDevices ( int nDevices,
MobilityHelper mobility,
Ptr< LoraChannel > channel )

Definition at line 30 of file utilities.cc.

References ns3::NodeContainer::Create(), ns3::lorawan::LoraPhyHelper::ED, ns3::lorawan::LorawanMacHelper::ED_A, ns3::lorawan::LoraHelper::Install(), nDevices, ns3::lorawan::LoraPhyHelper::SetChannel(), ns3::lorawan::LoraPhyHelper::SetDeviceType(), and ns3::lorawan::LorawanMacHelper::SetDeviceType().

Referenced by InitializeNetwork().

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

◆ CreateGateways()

NodeContainer ns3::lorawan::CreateGateways ( int nGateways,
MobilityHelper mobility,
Ptr< LoraChannel > channel )

Definition at line 58 of file utilities.cc.

References ns3::NodeContainer::Create(), ns3::lorawan::LoraPhyHelper::GW, ns3::lorawan::LorawanMacHelper::GW, ns3::lorawan::LoraHelper::Install(), nGateways, ns3::lorawan::LoraPhyHelper::SetChannel(), ns3::lorawan::LoraPhyHelper::SetDeviceType(), and ns3::lorawan::LorawanMacHelper::SetDeviceType().

Referenced by InitializeNetwork().

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

◆ CreateNetworkServer()

Ptr< Node > ns3::lorawan::CreateNetworkServer ( NodeContainer endDevices,
NodeContainer gateways )

Definition at line 85 of file utilities.cc.

References ns3::NodeContainer::Begin(), ns3::CreateObject(), ns3::DynamicCast(), ns3::NodeContainer::End(), ns3::lorawan::ForwarderHelper::Install(), ns3::lorawan::NetworkServerHelper::Install(), ns3::lorawan::NetworkServerHelper::SetEndDevices(), and ns3::lorawan::NetworkServerHelper::SetGatewaysP2P().

Referenced by InitializeNetwork().

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

◆ DbmToW()

double ns3::lorawan::DbmToW ( double dbm)

Convert from dBm to Watts.

Parameters
dbmThe power in dBm.
Returns
The equivalent Watts for the given dBm value.

Definition at line 26 of file lora-utils.cc.

Referenced by ns3::lorawan::LinearLoraTxCurrentModel::CalcTxCurrent().

+ Here is the caller graph for this function:

◆ DbToRatio()

double ns3::lorawan::DbToRatio ( double db)

Convert from dB to ratio.

Parameters
dbThe dB value.
Returns
The equivalent ratio from the given dB value.

Definition at line 19 of file lora-utils.cc.

◆ GetMacLayerFromNode()

template<typename T >
Ptr< T > ns3::lorawan::GetMacLayerFromNode ( Ptr< Node > n)

Definition at line 46 of file utilities.h.

References ns3::DynamicCast().

Referenced by NetworkStatusTest::DoRun().

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

◆ InitializeNetwork()

NetworkComponents ns3::lorawan::InitializeNetwork ( int nDevices,
int nGateways )

Definition at line 117 of file utilities.cc.

References CreateChannel(), CreateEndDevices(), CreateGateways(), CreateNetworkServer(), nDevices, nGateways, and ns3::lorawan::LorawanMacHelper::SetSpreadingFactorsUp().

Referenced by DownlinkPacketTest::DoRun(), LinkCheckTest::DoRun(), NetworkStatusTest::DoRun(), and UplinkPacketTest::DoRun().

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

◆ operator!=()

bool ns3::lorawan::operator!= ( const Ptr< LogicalLoraChannel > & first,
const Ptr< LogicalLoraChannel > & second )

Overload the != operator to compare different instances of the same LogicalLoraChannel.

Definition at line 122 of file logical-lora-channel.cc.

◆ operator<<() [1/5]

std::ostream & ns3::lorawan::operator<< ( std::ostream & os,
const EndDeviceStatus & status )
Parameters
osThe stream.
statusThe status.
Returns
A reference to the stream.

Definition at line 397 of file end-device-status.cc.

◆ operator<<() [2/5]

std::ostream & ns3::lorawan::operator<< ( std::ostream & os,
const LoraChannelParameters & params )

Allow logging of LoraChannelParameters like with any other data type.

Definition at line 201 of file lora-channel.cc.

◆ operator<<() [3/5]

std::ostream & ns3::lorawan::operator<< ( std::ostream & os,
const LoraDeviceAddress & address )

Operator overload to correctly handle logging when an address is passed as an argument.

Definition at line 260 of file lora-device-address.cc.

◆ operator<<() [4/5]

std::ostream & ns3::lorawan::operator<< ( std::ostream & os,
const LoraInterferenceHelper::Event & event )

Allow easy logging of LoraInterferenceHelper Events.

Parameters
osThe output stream for logging
eventThe event to be logged

Definition at line 99 of file lora-interference-helper.cc.

◆ operator<<() [5/5]

std::ostream & ns3::lorawan::operator<< ( std::ostream & os,
const LoraTxParameters & params )

Allow logging of LoraTxParameters like with any other data type.

Definition at line 200 of file lora-phy.cc.

◆ operator==()

bool ns3::lorawan::operator== ( const Ptr< LogicalLoraChannel > & first,
const Ptr< LogicalLoraChannel > & second )

Overload of the == operator to compare different instances of the same LogicalLoraChannel.

Definition at line 109 of file logical-lora-channel.cc.

References NS_LOG_DEBUG.

◆ RatioToDb()

double ns3::lorawan::RatioToDb ( double ratio)

Convert from ratio to dB.

Parameters
ratioThe ratio value.
Returns
The equivalent dB from the given ratio value.

Definition at line 39 of file lora-utils.cc.

◆ WToDbm()

double ns3::lorawan::WToDbm ( double w)

Convert from Watts to dBm.

Parameters
wThe power in Watts.
Returns
The equivalent dBm for the given Watts.

Definition at line 33 of file lora-utils.cc.

Variable Documentation

◆ inf

double ns3::lorawan::inf = std::numeric_limits<double>::max()

Definition at line 112 of file lora-interference-helper.cc.