This application forwards packets between NetDevices: SatLorawanNetDevice -> PointToPointNetDevice and vice versa. More...
#include "lora-forwarder.h"
Public Member Functions | |
LoraForwarder () | |
~LoraForwarder () | |
bool | ReceiveFromLora (Ptr< SatLorawanNetDevice > loraNetDevice, Ptr< const Packet > packet, uint16_t protocol, const Address &sender) |
Receive a packet from the LoraNetDevice. More... | |
bool | ReceiveFromPointToPoint (Ptr< NetDevice > pointToPointNetDevice, Ptr< const Packet > packet, uint16_t protocol, const Address &sender) |
Receive a packet from the PointToPointNetDevice. More... | |
void | SetLoraNetDevice (uint8_t beamId, Ptr< SatLorawanNetDevice > loraNetDevice) |
Sets the device to use to communicate with the EDs. More... | |
void | SetPointToPointNetDevice (Ptr< PointToPointNetDevice > pointToPointNetDevice) |
Sets the P2P device to use to communicate with the NS. More... | |
void | StartApplication (void) |
Start the application. More... | |
void | StopApplication (void) |
Stop the application. More... | |
Static Public Member Functions | |
static TypeId | GetTypeId (void) |
Private Attributes | |
Ptr< PointToPointNetDevice > | m_pointToPointNetDevice |
Pointer to the P2PNetDevice we use to. More... | |
std::map< uint8_t, Ptr< SatLorawanNetDevice > > | m_satLorawanNetDevices |
Map between beam ID and pointer to the node's SatLorawanNetDevice. More... | |
This application forwards packets between NetDevices: SatLorawanNetDevice -> PointToPointNetDevice and vice versa.
Definition at line 43 of file lora-forwarder.h.
ns3::LoraForwarder::LoraForwarder | ( | ) |
Definition at line 44 of file lora-forwarder.cc.
ns3::LoraForwarder::~LoraForwarder | ( | ) |
Definition at line 49 of file lora-forwarder.cc.
|
static |
Definition at line 37 of file lora-forwarder.cc.
bool ns3::LoraForwarder::ReceiveFromLora | ( | Ptr< SatLorawanNetDevice > | loraNetDevice, |
Ptr< const Packet > | packet, | ||
uint16_t | protocol, | ||
const Address & | sender | ||
) |
Receive a packet from the LoraNetDevice.
loraNetDevice | The LoraNetDevice we received the packet from. |
packet | The packet we received. |
protocol | The protocol number associated to this packet. |
sender | The address of the sender. |
Definition at line 71 of file lora-forwarder.cc.
References m_pointToPointNetDevice.
Referenced by ns3::LoraForwarderHelper::InstallPrivGwDvb(), and ns3::LoraForwarderHelper::InstallPrivGwLora().
bool ns3::LoraForwarder::ReceiveFromPointToPoint | ( | Ptr< NetDevice > | pointToPointNetDevice, |
Ptr< const Packet > | packet, | ||
uint16_t | protocol, | ||
const Address & | sender | ||
) |
Receive a packet from the PointToPointNetDevice.
Definition at line 86 of file lora-forwarder.cc.
References ns3::LoraBeamTag::GetBeamId(), and m_satLorawanNetDevices.
Referenced by ns3::LoraForwarderHelper::InstallPrivGwDvb(), and ns3::LoraForwarderHelper::InstallPrivGwLora().
void ns3::LoraForwarder::SetLoraNetDevice | ( | uint8_t | beamId, |
Ptr< SatLorawanNetDevice > | loraNetDevice | ||
) |
Sets the device to use to communicate with the EDs.
beamId | The beam ID of the device. |
loraNetDevice | The LoraNetDevice on this node. |
Definition at line 63 of file lora-forwarder.cc.
References m_satLorawanNetDevices.
void ns3::LoraForwarder::SetPointToPointNetDevice | ( | Ptr< PointToPointNetDevice > | pointToPointNetDevice | ) |
Sets the P2P device to use to communicate with the NS.
pointToPointNetDevice | The P2PNetDevice on this node. |
Definition at line 55 of file lora-forwarder.cc.
References m_pointToPointNetDevice.
void ns3::LoraForwarder::StartApplication | ( | void | ) |
Start the application.
Definition at line 106 of file lora-forwarder.cc.
void ns3::LoraForwarder::StopApplication | ( | void | ) |
Stop the application.
Definition at line 114 of file lora-forwarder.cc.
|
private |
Pointer to the P2PNetDevice we use to.
Definition at line 103 of file lora-forwarder.h.
Referenced by ReceiveFromLora(), and SetPointToPointNetDevice().
|
private |
Map between beam ID and pointer to the node's SatLorawanNetDevice.
Definition at line 100 of file lora-forwarder.h.
Referenced by ReceiveFromPointToPoint(), and SetLoraNetDevice().