ns3::LoraForwarder Class Reference

This application forwards packets between NetDevices: SatLorawanNetDevice -> PointToPointNetDevice and vice versa. More...

#include "lora-forwarder.h"

+ Inheritance diagram for ns3::LoraForwarder:
+ Collaboration diagram for ns3::LoraForwarder:

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...
 

Detailed Description

This application forwards packets between NetDevices: SatLorawanNetDevice -> PointToPointNetDevice and vice versa.

Definition at line 42 of file lora-forwarder.h.

Constructor & Destructor Documentation

◆ LoraForwarder()

ns3::LoraForwarder::LoraForwarder ( )

Definition at line 44 of file lora-forwarder.cc.

◆ ~LoraForwarder()

ns3::LoraForwarder::~LoraForwarder ( )

Definition at line 49 of file lora-forwarder.cc.

Member Function Documentation

◆ GetTypeId()

TypeId ns3::LoraForwarder::GetTypeId ( void  )
static

Definition at line 37 of file lora-forwarder.cc.

◆ ReceiveFromLora()

bool ns3::LoraForwarder::ReceiveFromLora ( Ptr< SatLorawanNetDevice loraNetDevice,
Ptr< const Packet >  packet,
uint16_t  protocol,
const Address &  sender 
)

Receive a packet from the LoraNetDevice.

Parameters
loraNetDeviceThe LoraNetDevice we received the packet from.
packetThe packet we received.
protocolThe protocol number associated to this packet.
senderThe address of the sender.
Returns
True if we can handle the packet, false otherwise.

Definition at line 71 of file lora-forwarder.cc.

References m_pointToPointNetDevice.

Referenced by ns3::LoraForwarderHelper::InstallPriv().

+ Here is the caller graph for this function:

◆ ReceiveFromPointToPoint()

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 89 of file lora-forwarder.cc.

References ns3::LoraBeamTag::GetBeamId(), and m_satLorawanNetDevices.

Referenced by ns3::LoraForwarderHelper::InstallPriv().

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

◆ SetLoraNetDevice()

void ns3::LoraForwarder::SetLoraNetDevice ( uint8_t  beamId,
Ptr< SatLorawanNetDevice loraNetDevice 
)

Sets the device to use to communicate with the EDs.

Parameters
beamIdThe beam ID of the device.
loraNetDeviceThe LoraNetDevice on this node.

Definition at line 63 of file lora-forwarder.cc.

References m_satLorawanNetDevices.

◆ SetPointToPointNetDevice()

void ns3::LoraForwarder::SetPointToPointNetDevice ( Ptr< PointToPointNetDevice >  pointToPointNetDevice)

Sets the P2P device to use to communicate with the NS.

Parameters
pointToPointNetDeviceThe P2PNetDevice on this node.

Definition at line 55 of file lora-forwarder.cc.

References m_pointToPointNetDevice.

◆ StartApplication()

void ns3::LoraForwarder::StartApplication ( void  )

Start the application.

Definition at line 109 of file lora-forwarder.cc.

◆ StopApplication()

void ns3::LoraForwarder::StopApplication ( void  )

Stop the application.

Definition at line 117 of file lora-forwarder.cc.

Member Data Documentation

◆ m_pointToPointNetDevice

Ptr<PointToPointNetDevice> ns3::LoraForwarder::m_pointToPointNetDevice
private

Pointer to the P2PNetDevice we use to.

Definition at line 102 of file lora-forwarder.h.

Referenced by ReceiveFromLora(), and SetPointToPointNetDevice().

◆ m_satLorawanNetDevices

std::map<uint8_t, Ptr<SatLorawanNetDevice> > ns3::LoraForwarder::m_satLorawanNetDevices
private

Map between beam ID and pointer to the node's SatLorawanNetDevice.

Definition at line 99 of file lora-forwarder.h.

Referenced by ReceiveFromPointToPoint(), and SetLoraNetDevice().


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