This class can install a NetworkServer application on a node. More...
#include "network-server-helper.h"
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 ®istration) |
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< Application > | InstallPriv (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. | |
This class can install a NetworkServer application on a node.
Definition at line 57 of file network-server-helper.h.
ns3::lorawan::NetworkServerHelper::NetworkServerHelper | ( | ) |
Default constructor.
Definition at line 40 of file network-server-helper.cc.
References m_factory, SetAdr(), and ns3::ObjectFactory::SetTypeId().
ns3::lorawan::NetworkServerHelper::~NetworkServerHelper | ( | ) |
Destructor.
Definition at line 47 of file network-server-helper.cc.
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.
enableAdr | Whether to enable ADR in the network server. |
Definition at line 109 of file network-server-helper.cc.
References m_adrEnabled, and NS_LOG_FUNCTION.
ApplicationContainer ns3::lorawan::NetworkServerHelper::Install | ( | Ptr< Node > | node | ) |
Create one lorawan network server application on the Node.
node | The node on which to create the Application. |
Definition at line 76 of file network-server-helper.cc.
References InstallPriv().
Referenced by ns3::lorawan::CreateNetworkServer().
|
private |
Install the NetworkServerComponent objects onto the NetworkServer application.
netServer | A 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().
|
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.
node | A pointer to the Node. |
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().
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.
type | The 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().
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.
name | The name of the application attribute to set. |
value | The value of the application attribute to set. |
Definition at line 52 of file network-server-helper.cc.
References m_factory, and ns3::ObjectFactory::Set().
void ns3::lorawan::NetworkServerHelper::SetEndDevices | ( | NodeContainer | endDevices | ) |
Set which end devices will be managed by this network server.
endDevices | The end device nodes. |
Definition at line 70 of file network-server-helper.cc.
References m_endDevices.
Referenced by ns3::lorawan::CreateNetworkServer().
void ns3::lorawan::NetworkServerHelper::SetGatewaysP2P | ( | const P2PGwRegistration_t & | registration | ) |
Register gateways connected with point-to-point to this network server.
registration | The gateways registration data. |
Definition at line 58 of file network-server-helper.cc.
References m_gatewayRegistrationList, and NS_ASSERT_MSG.
Referenced by ns3::lorawan::CreateNetworkServer().
|
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().
|
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().
|
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().
|
private |
Factory to create the Network server application.
Definition at line 133 of file network-server-helper.h.
Referenced by NetworkServerHelper(), InstallPriv(), and SetAttribute().
|
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().