The LoraNetworkServer is an application standing on top of a node equipped with links that connect it with the gateways. More...
#include "lora-network-server.h"
Public Member Functions | |
LoraNetworkServer () | |
virtual | ~LoraNetworkServer () |
void | AddComponent (Ptr< LoraNetworkControllerComponent > component) |
A NetworkControllerComponent to this LoraNetworkServer instance. More... | |
void | AddGateway (Ptr< Node > gateway, Ptr< NetDevice > netDevice) |
Add this gateway to the list of gateways connected to this NS. More... | |
void | AddNode (Ptr< Node > node) |
Inform the LoraNetworkServer that this node is connected to the network. More... | |
void | AddNodes (NodeContainer nodes) |
Inform the LoraNetworkServer that these nodes are connected to the network. More... | |
Ptr< LoraNetworkStatus > | GetNetworkStatus (void) |
bool | Receive (Ptr< NetDevice > device, Ptr< const Packet > packet, uint16_t protocol, const Address &address) |
Receive a packet from a gateway. More... | |
void | StartApplication (void) |
Start the NS application. More... | |
void | StopApplication (void) |
Stop the NS application. More... | |
Static Public Member Functions | |
static TypeId | GetTypeId (void) |
Protected Attributes | |
Ptr< LoraNetworkController > | m_controller |
TracedCallback< Ptr< const Packet > > | m_receivedPacket |
Ptr< LoraNetworkScheduler > | m_scheduler |
Ptr< LoraNetworkStatus > | m_status |
The LoraNetworkServer is an application standing on top of a node equipped with links that connect it with the gateways.
This version of the LoraNetworkServer attempts to closely mimic an actual Network Server, by providing as much functionality as possible.
Definition at line 53 of file lora-network-server.h.
ns3::LoraNetworkServer::LoraNetworkServer | ( | ) |
Definition at line 60 of file lora-network-server.cc.
|
virtual |
Definition at line 68 of file lora-network-server.cc.
void ns3::LoraNetworkServer::AddComponent | ( | Ptr< LoraNetworkControllerComponent > | component | ) |
A NetworkControllerComponent to this LoraNetworkServer instance.
Definition at line 192 of file lora-network-server.cc.
References m_controller.
void ns3::LoraNetworkServer::AddGateway | ( | Ptr< Node > | gateway, |
Ptr< NetDevice > | netDevice | ||
) |
Add this gateway to the list of gateways connected to this NS.
Each GW is identified by its Address in the NS-GWs network.
Definition at line 86 of file lora-network-server.cc.
References m_status, ns3::SatEnums::REGENERATION_NETWORK, and ns3::SatEnums::TRANSPARENT.
void ns3::LoraNetworkServer::AddNode | ( | Ptr< Node > | node | ) |
Inform the LoraNetworkServer that this node is connected to the network.
This method will create a DeviceStatus object for the new node (if it doesn't already exist).
Definition at line 144 of file lora-network-server.cc.
References m_status.
Referenced by AddNodes().
void ns3::LoraNetworkServer::AddNodes | ( | NodeContainer | nodes | ) |
Inform the LoraNetworkServer that these nodes are connected to the network.
This method will create a DeviceStatus object for each new node, and add it to the list.
Definition at line 131 of file lora-network-server.cc.
References AddNode().
Ptr< LoraNetworkStatus > ns3::LoraNetworkServer::GetNetworkStatus | ( | void | ) |
Definition at line 200 of file lora-network-server.cc.
References m_status.
|
static |
Definition at line 46 of file lora-network-server.cc.
References m_receivedPacket.
bool ns3::LoraNetworkServer::Receive | ( | Ptr< NetDevice > | device, |
Ptr< const Packet > | packet, | ||
uint16_t | protocol, | ||
const Address & | address | ||
) |
Receive a packet from a gateway.
packet | the received packet |
Definition at line 169 of file lora-network-server.cc.
References m_controller, m_receivedPacket, m_scheduler, and m_status.
Referenced by ns3::LoraNetworkServerHelper::InstallPriv().
void ns3::LoraNetworkServer::StartApplication | ( | void | ) |
Start the NS application.
Definition at line 74 of file lora-network-server.cc.
void ns3::LoraNetworkServer::StopApplication | ( | void | ) |
Stop the NS application.
Definition at line 80 of file lora-network-server.cc.
|
protected |
Definition at line 110 of file lora-network-server.h.
Referenced by AddComponent(), and Receive().
|
protected |
Definition at line 113 of file lora-network-server.h.
Referenced by GetTypeId(), and Receive().
|
protected |
Definition at line 111 of file lora-network-server.h.
Referenced by Receive().
|
protected |
Definition at line 109 of file lora-network-server.h.
Referenced by AddGateway(), AddNode(), GetNetworkStatus(), and Receive().