12#include "ns3/sub-band.h"
22 : m_maxReceptionPaths(8),
73 if (typeId ==
"ns3::SimpleGatewayLoraPhy")
86 std::vector<double> frequencies;
87 frequencies.push_back(868.1);
88 frequencies.push_back(868.3);
89 frequencies.push_back(868.5);
91 for (
auto& f : frequencies)
96 int receptionPaths = 0;
105 else if (typeId ==
"ns3::SimpleEndDeviceLoraPhy")
116 phy->SetDevice(device);
Hold a value for an Attribute.
Ptr< Object > Create() const
Create an Object instance of the configured TypeId.
void Set(const std::string &name, const AttributeValue &value, Args &&... args)
Set an attribute to be set during construction.
TypeId GetTypeId() const
Get the TypeId which will be created by this ObjectFactory.
void SetTypeId(TypeId tid)
Set the TypeId of the Objects to be created by this factory.
Smart pointer class similar to boost::intrusive_ptr.
a unique identifier for an interface.
std::string GetName() const
Get the name.
void SetDeviceType(enum DeviceType dt)
Set the kind of PHY this helper will create.
DeviceType
Enum for the type of device: End Device (ED) or Gateway (GW).
Ptr< LoraChannel > m_channel
The channel instance the PHYs will be connected to.
TypeId GetDeviceType() const
Get the TypeId of the object to be created with LoraPhyHelper.
Ptr< LoraPhy > Create(Ptr< Node > node, Ptr< NetDevice > device) const
Create a LoraPhy and connect it to a device on a node.
void SetMaxReceptionPaths(int maxReceptionPaths)
Set the maximum number of gateway receive paths.
void Set(std::string name, const AttributeValue &v)
Set an attribute of the underlying PHY object.
LoraPhyHelper()
Default constructor.
bool m_txPriority
Whether to give priority to downlink transmission over reception at the gateways.
void SetGatewayTransmissionPriority(bool txPriority)
Set if giving priority to downlink transmission over reception at the gateways.
void SetChannel(Ptr< LoraChannel > channel)
Set the LoraChannel to connect the PHYs to.
int m_maxReceptionPaths
The maximum number of receive paths at the gateway.
ObjectFactory m_phy
The PHY layer factory object.
Base class for PHY layers implementing the LoRa modulation scheme.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Ptr< T1 > DynamicCast(const Ptr< T2 > &p)
Cast a Ptr.