Helper to install LoraPhy instances on multiple Nodes. More...
#include "lora-phy-helper.h"
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< LoraPhy > | Create (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< LoraChannel > | m_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. | |
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.
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.
ns3::lorawan::LoraPhyHelper::LoraPhyHelper | ( | ) |
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.
node | The node on which we wish to create a wifi PHY. |
device | The device within which this PHY will be created. |
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().
TypeId ns3::lorawan::LoraPhyHelper::GetDeviceType | ( | ) | const |
Get the TypeId of the object to be created with LoraPhyHelper.
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().
void ns3::lorawan::LoraPhyHelper::Set | ( | std::string | name, |
const AttributeValue & | v | ||
) |
Set an attribute of the underlying PHY object.
name | The name of the attribute to set. |
v | The value of the attribute. |
Definition at line 68 of file lora-phy-helper.cc.
References m_phy, and ns3::ObjectFactory::Set().
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.
channel | The 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().
void ns3::lorawan::LoraPhyHelper::SetDeviceType | ( | enum DeviceType | dt | ) |
Set the kind of PHY this helper will create.
dt | The 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().
void ns3::lorawan::LoraPhyHelper::SetGatewayTransmissionPriority | ( | bool | txPriority | ) |
Set if giving priority to downlink transmission over reception at the gateways.
txPriority | Whether gateway transmission interrupt all receptions for their duration. |
Definition at line 140 of file lora-phy-helper.cc.
References m_txPriority.
void ns3::lorawan::LoraPhyHelper::SetMaxReceptionPaths | ( | int | maxReceptionPaths | ) |
Set the maximum number of gateway receive paths.
maxReceptionPaths | The 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.
|
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().
|
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().
|
private |
The PHY layer factory object.
Definition at line 113 of file lora-phy-helper.h.
Referenced by Create(), GetDeviceType(), Set(), and SetDeviceType().
|
private |
Whether to give priority to downlink transmission over reception at the gateways.
Definition at line 116 of file lora-phy-helper.h.
Referenced by SetGatewayTransmissionPriority().