9#ifndef LORAWAN_MAC_HELPER_H
10#define LORAWAN_MAC_HELPER_H
12#include "ns3/class-a-end-device-lorawan-mac.h"
13#include "ns3/gateway-lorawan-mac.h"
14#include "ns3/lora-channel.h"
15#include "ns3/lora-device-address-generator.h"
16#include "ns3/lora-phy.h"
17#include "ns3/lorawan-mac.h"
18#include "ns3/net-device.h"
19#include "ns3/node-container.h"
20#include "ns3/random-variable-stream.h"
177 std::vector<double> distribution);
Hold a value for an Attribute.
keep track of a set of node pointers.
Instantiate subclasses of ns3::Object.
Smart pointer class similar to boost::intrusive_ptr.
Helper class for configuring and installing the LorawanMac class on devices and gateways.
void ConfigureForAlohaRegion(Ptr< ClassAEndDeviceLorawanMac > edMac) const
Perform region-specific configurations for the ALOHA band.
LorawanMacHelper()
Default constructor.
void SetDeviceType(enum DeviceType dt)
Set the kind of MAC this helper will create.
void SetAddressGenerator(Ptr< LoraDeviceAddressGenerator > addrGen)
Set the address generator to use for creation of these nodes.
static std::vector< int > SetSpreadingFactorsUp(NodeContainer endDevices, NodeContainer gateways, Ptr< LoraChannel > channel)
Initialize the end devices' data rate parameter.
void ApplyCommonEuConfigurations(Ptr< LorawanMac > lorawanMac) const
Apply configurations that are common both for the GatewayLorawanMac and the ClassAEndDeviceLorawanMac...
enum Regions m_region
The region in which the device will operate.
Regions
Define the operational region.
void SetRegion(enum Regions region)
Set the region in which the device is to operate.
void Set(std::string name, const AttributeValue &v)
Set an attribute of the underlying MAC object.
ObjectFactory m_mac
MAC-layer object factory.
Ptr< LorawanMac > Create(Ptr< Node > node, Ptr< NetDevice > device) const
Create the LorawanMac instance and connect it to a device.
static std::vector< int > SetSpreadingFactorsGivenDistribution(NodeContainer endDevices, NodeContainer gateways, std::vector< double > distribution)
Randomly initialize the end devices' data rate parameter according to the given distribution.
Ptr< LoraDeviceAddressGenerator > m_addrGen
Pointer to the address generator to use.
void ConfigureForSingleChannelRegion(Ptr< ClassAEndDeviceLorawanMac > edMac) const
Perform region-specific configurations for the SINGLECHANNEL band.
void ApplyCommonSingleChannelConfigurations(Ptr< LorawanMac > lorawanMac) const
Apply configurations that are common both for the GatewayLorawanMac and the ClassAEndDeviceLorawanMac...
DeviceType
Define the kind of device.
void ApplyCommonAlohaConfigurations(Ptr< LorawanMac > lorawanMac) const
Apply configurations that are common both for the GatewayLorawanMac and the ClassAEndDeviceLorawanMac...
enum DeviceType m_deviceType
The kind of device to install.
void ConfigureForEuRegion(Ptr< ClassAEndDeviceLorawanMac > edMac) const
Perform region-specific configurations for the 868 MHz EU band.
Every class exported by the ns3 library is enclosed in the ns3 namespace.