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

Helper to install LoraPhy instances on multiple Nodes. More...

#include "lora-phy-helper.h"

+ Collaboration diagram for ns3::lorawan::LoraPhyHelper:

Public Types

enum  DeviceType { GW , ED }
 Enum for the type of device: End Device (ED) or Gateway (GW). More...
 

Public Member Functions

 LoraPhyHelper ()
 Default constructor.
 
Ptr< LoraPhyCreate (Ptr< Node > node, Ptr< NetDevice > device) const
 Create a LoraPhy and connect it to a device on a node.
 
TypeId GetDeviceType () const
 Get the TypeId of the object to be created with LoraPhyHelper.
 
void Set (std::string name, const AttributeValue &v)
 Set an attribute of the underlying PHY object.
 
void SetChannel (Ptr< LoraChannel > channel)
 Set the LoraChannel to connect the PHYs to.
 
void SetDeviceType (enum DeviceType dt)
 Set the kind of PHY this helper will create.
 
void SetGatewayTransmissionPriority (bool txPriority)
 Set if giving priority to downlink transmission over reception at the gateways.
 
void SetMaxReceptionPaths (int maxReceptionPaths)
 Set the maximum number of gateway receive paths.
 

Private Attributes

Ptr< LoraChannelm_channel
 The channel instance the PHYs will be connected to.
 
int m_maxReceptionPaths
 The maximum number of receive paths at the gateway.
 
ObjectFactory m_phy
 The PHY layer factory object.
 
bool m_txPriority
 Whether to give priority to downlink transmission over reception at the gateways.
 

Detailed Description

Helper to install LoraPhy instances on multiple Nodes.

The user must set all parameters before calling Install on nodes.

Definition at line 42 of file lora-phy-helper.h.

Member Enumeration Documentation

◆ DeviceType

Enum for the type of device: End Device (ED) or Gateway (GW).

Enumerator
GW 
ED 

Definition at line 48 of file lora-phy-helper.h.

Constructor & Destructor Documentation

◆ LoraPhyHelper()

ns3::lorawan::LoraPhyHelper::LoraPhyHelper ( )

Default constructor.

Definition at line 32 of file lora-phy-helper.cc.

References NS_LOG_FUNCTION.

Member Function Documentation

◆ Create()

Ptr< LoraPhy > ns3::lorawan::LoraPhyHelper::Create ( Ptr< Node node,
Ptr< NetDevice device 
) const

Create a LoraPhy and connect it to a device on a node.

Parameters
nodeThe node on which we wish to create a wifi PHY.
deviceThe device within which this PHY will be created.
Returns
A newly-created PHY object.

Definition at line 74 of file lora-phy-helper.cc.

References ns3::ObjectFactory::Create(), ns3::TypeId::GetName(), ns3::ObjectFactory::GetTypeId(), m_channel, m_maxReceptionPaths, m_phy, and NS_LOG_FUNCTION.

Referenced by ns3::lorawan::LoraHelper::Install().

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

◆ GetDeviceType()

TypeId ns3::lorawan::LoraPhyHelper::GetDeviceType ( ) const

Get the TypeId of the object to be created with LoraPhyHelper.

Returns
The TypeId instance.

Definition at line 61 of file lora-phy-helper.cc.

References ns3::ObjectFactory::GetTypeId(), m_phy, and NS_LOG_FUNCTION.

Referenced by ns3::lorawan::LoraHelper::Install().

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

◆ Set()

void ns3::lorawan::LoraPhyHelper::Set ( std::string  name,
const AttributeValue v 
)

Set an attribute of the underlying PHY object.

Parameters
nameThe name of the attribute to set.
vThe value of the attribute.

Definition at line 68 of file lora-phy-helper.cc.

References m_phy, and ns3::ObjectFactory::Set().

+ Here is the call graph for this function:

◆ SetChannel()

void ns3::lorawan::LoraPhyHelper::SetChannel ( Ptr< LoraChannel channel)

Set the LoraChannel to connect the PHYs to.

Every PHY created by a call to Install is associated to this channel.

Parameters
channelThe channel to associate to this helper.

Definition at line 40 of file lora-phy-helper.cc.

References m_channel.

Referenced by ns3::lorawan::CreateEndDevices(), and ns3::lorawan::CreateGateways().

+ Here is the caller graph for this function:

◆ SetDeviceType()

void ns3::lorawan::LoraPhyHelper::SetDeviceType ( enum DeviceType  dt)

Set the kind of PHY this helper will create.

Parameters
dtThe device type.

Definition at line 46 of file lora-phy-helper.cc.

References ED, GW, m_phy, NS_LOG_FUNCTION, and ns3::ObjectFactory::SetTypeId().

Referenced by ns3::lorawan::CreateEndDevices(), and ns3::lorawan::CreateGateways().

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

◆ SetGatewayTransmissionPriority()

void ns3::lorawan::LoraPhyHelper::SetGatewayTransmissionPriority ( bool  txPriority)

Set if giving priority to downlink transmission over reception at the gateways.

Parameters
txPriorityWhether gateway transmission interrupt all receptions for their duration.

Definition at line 140 of file lora-phy-helper.cc.

References m_txPriority.

◆ SetMaxReceptionPaths()

void ns3::lorawan::LoraPhyHelper::SetMaxReceptionPaths ( int  maxReceptionPaths)

Set the maximum number of gateway receive paths.

Parameters
maxReceptionPathsThe maximum number of reception paths at the gateway.

Definition at line 133 of file lora-phy-helper.cc.

References m_maxReceptionPaths, and NS_LOG_FUNCTION.

Member Data Documentation

◆ m_channel

Ptr<LoraChannel> ns3::lorawan::LoraPhyHelper::m_channel
private

The channel instance the PHYs will be connected to.

Definition at line 114 of file lora-phy-helper.h.

Referenced by Create(), and SetChannel().

◆ m_maxReceptionPaths

int ns3::lorawan::LoraPhyHelper::m_maxReceptionPaths
private

The maximum number of receive paths at the gateway.

Definition at line 115 of file lora-phy-helper.h.

Referenced by Create(), and SetMaxReceptionPaths().

◆ m_phy

ObjectFactory ns3::lorawan::LoraPhyHelper::m_phy
private

The PHY layer factory object.

Definition at line 113 of file lora-phy-helper.h.

Referenced by Create(), GetDeviceType(), Set(), and SetDeviceType().

◆ m_txPriority

bool ns3::lorawan::LoraPhyHelper::m_txPriority
private

Whether to give priority to downlink transmission over reception at the gateways.

Todo:
This parameter does nothing, to be removed.

Definition at line 116 of file lora-phy-helper.h.

Referenced by SetGatewayTransmissionPriority().


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