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

This class can install a NetworkServer application on a node. More...

#include "network-server-helper.h"

+ Collaboration diagram for ns3::lorawan::NetworkServerHelper:

Public Member Functions

 NetworkServerHelper ()
 Default constructor.
 
 ~NetworkServerHelper ()
 Destructor.
 
void EnableAdr (bool enableAdr)
 Enable (true) or disable (false) the Adaptive Data Rate (ADR) component in the Network Server created by this helper.
 
ApplicationContainer Install (Ptr< Node > node)
 Create one lorawan network server application on the Node.
 
void SetAdr (std::string type)
 Set the Adaptive Data Rate (ADR) implementation to use in the network server created by this helper.
 
void SetAttribute (std::string name, const AttributeValue &value)
 Record an attribute to be set in each Application after it is is created.
 
void SetEndDevices (NodeContainer endDevices)
 Set which end devices will be managed by this network server.
 
void SetGatewaysP2P (const P2PGwRegistration_t &registration)
 Register gateways connected with point-to-point to this network server.
 

Private Member Functions

void InstallComponents (Ptr< NetworkServer > netServer)
 Install the NetworkServerComponent objects onto the NetworkServer application.
 
Ptr< ApplicationInstallPriv (Ptr< Node > node)
 Do the actual NetworkServer application installation on the Node.
 

Private Attributes

bool m_adrEnabled
 Whether to enable the Adaptive Data Rate (ADR) algorithm on the NetworkServer application.
 
ObjectFactory m_adrSupportFactory
 Factory to create the Adaptive Data Rate (ADR) component.
 
NodeContainer m_endDevices
 Set of end devices to connect to this network server.
 
ObjectFactory m_factory
 Factory to create the Network server application.
 
std::list< std::pair< Ptr< NetDevice >, Ptr< Node > > > m_gatewayRegistrationList
 List of gateway to register to this network server.
 

Detailed Description

This class can install a NetworkServer application on a node.

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

Constructor & Destructor Documentation

◆ NetworkServerHelper()

ns3::lorawan::NetworkServerHelper::NetworkServerHelper ( )

Default constructor.

Definition at line 40 of file network-server-helper.cc.

References m_factory, SetAdr(), and ns3::ObjectFactory::SetTypeId().

+ Here is the call graph for this function:

◆ ~NetworkServerHelper()

ns3::lorawan::NetworkServerHelper::~NetworkServerHelper ( )

Destructor.

Definition at line 47 of file network-server-helper.cc.

Member Function Documentation

◆ EnableAdr()

void ns3::lorawan::NetworkServerHelper::EnableAdr ( bool  enableAdr)

Enable (true) or disable (false) the Adaptive Data Rate (ADR) component in the Network Server created by this helper.

Parameters
enableAdrWhether to enable ADR in the network server.

Definition at line 109 of file network-server-helper.cc.

References m_adrEnabled, and NS_LOG_FUNCTION.

◆ Install()

ApplicationContainer ns3::lorawan::NetworkServerHelper::Install ( Ptr< Node node)

Create one lorawan network server application on the Node.

Parameters
nodeThe node on which to create the Application.
Returns
The application created.

Definition at line 76 of file network-server-helper.cc.

References InstallPriv().

Referenced by ns3::lorawan::CreateNetworkServer().

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

◆ InstallComponents()

void ns3::lorawan::NetworkServerHelper::InstallComponents ( Ptr< NetworkServer netServer)
private

Install the NetworkServerComponent objects onto the NetworkServer application.

Parameters
netServerA pointer to the NetworkServer application.

Definition at line 126 of file network-server-helper.cc.

References ns3::ObjectFactory::Create(), m_adrEnabled, m_adrSupportFactory, and NS_LOG_FUNCTION.

Referenced by InstallPriv().

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

◆ InstallPriv()

Ptr< Application > ns3::lorawan::NetworkServerHelper::InstallPriv ( Ptr< Node node)
private

Do the actual NetworkServer application installation on the Node.

This function creates the NetworkServer application, installs it on the Node, connect the gateways to the Node with a PointToPoint link, registers gateways and devices in the NetworkServer application, and installs the necessary NetworkServerComponent objects.

Parameters
nodeA pointer to the Node.
Returns
A pointer to the installed NetworkServer application.

Definition at line 82 of file network-server-helper.cc.

References ns3::ObjectFactory::Create(), InstallComponents(), m_endDevices, m_factory, m_gatewayRegistrationList, ns3::MakeCallback(), NS_ASSERT_MSG, NS_LOG_FUNCTION, and ns3::lorawan::NetworkServer::Receive().

Referenced by Install().

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

◆ SetAdr()

void ns3::lorawan::NetworkServerHelper::SetAdr ( std::string  type)

Set the Adaptive Data Rate (ADR) implementation to use in the network server created by this helper.

Parameters
typeThe type of ADR implementation.

Definition at line 117 of file network-server-helper.cc.

References m_adrSupportFactory, NS_LOG_FUNCTION, and ns3::ObjectFactory::SetTypeId().

Referenced by NetworkServerHelper().

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

◆ SetAttribute()

void ns3::lorawan::NetworkServerHelper::SetAttribute ( std::string  name,
const AttributeValue value 
)

Record an attribute to be set in each Application after it is is created.

Parameters
nameThe name of the application attribute to set.
valueThe value of the application attribute to set.

Definition at line 52 of file network-server-helper.cc.

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

+ Here is the call graph for this function:

◆ SetEndDevices()

void ns3::lorawan::NetworkServerHelper::SetEndDevices ( NodeContainer  endDevices)

Set which end devices will be managed by this network server.

Parameters
endDevicesThe end device nodes.

Definition at line 70 of file network-server-helper.cc.

References m_endDevices.

Referenced by ns3::lorawan::CreateNetworkServer().

+ Here is the caller graph for this function:

◆ SetGatewaysP2P()

void ns3::lorawan::NetworkServerHelper::SetGatewaysP2P ( const P2PGwRegistration_t registration)

Register gateways connected with point-to-point to this network server.

Remarks
For the moment, only P2P connections are supported.
Parameters
registrationThe gateways registration data.
See also
ns3::lorawan::P2PGwRegistration_t

Definition at line 58 of file network-server-helper.cc.

References m_gatewayRegistrationList, and NS_ASSERT_MSG.

Referenced by ns3::lorawan::CreateNetworkServer().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_adrEnabled

bool ns3::lorawan::NetworkServerHelper::m_adrEnabled
private

Whether to enable the Adaptive Data Rate (ADR) algorithm on the NetworkServer application.

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

Referenced by EnableAdr(), and InstallComponents().

◆ m_adrSupportFactory

ObjectFactory ns3::lorawan::NetworkServerHelper::m_adrSupportFactory
private

Factory to create the Adaptive Data Rate (ADR) component.

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

Referenced by InstallComponents(), and SetAdr().

◆ m_endDevices

NodeContainer ns3::lorawan::NetworkServerHelper::m_endDevices
private

Set of end devices to connect to this network server.

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

Referenced by InstallPriv(), and SetEndDevices().

◆ m_factory

ObjectFactory ns3::lorawan::NetworkServerHelper::m_factory
private

Factory to create the Network server application.

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

Referenced by NetworkServerHelper(), InstallPriv(), and SetAttribute().

◆ m_gatewayRegistrationList

std::list<std::pair<Ptr<NetDevice>, Ptr<Node> > > ns3::lorawan::NetworkServerHelper::m_gatewayRegistrationList
private

List of gateway to register to this network server.

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

Referenced by InstallPriv(), and SetGatewaysP2P().


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