29 NS_LOG_COMPONENT_DEFINE(
"LoraForwarder");
34 NS_OBJECT_ENSURE_REGISTERED(LoraForwarder);
40 TypeId(
"ns3::LoraForwarder").SetParent<Application>().AddConstructor<LoraForwarder>();
46 NS_LOG_FUNCTION_NOARGS();
51 NS_LOG_FUNCTION_NOARGS();
57 NS_LOG_FUNCTION(
this << pointToPointNetDevice);
65 NS_LOG_FUNCTION(
this << loraNetDevice);
72 Ptr<const Packet> packet,
74 const Address& sender)
76 NS_LOG_FUNCTION(
this << packet << protocol << sender);
78 Ptr<Packet> packetCopy = packet->Copy();
81 packetCopy->AddPacketTag(beamTag);
90 Ptr<const Packet> packet,
92 const Address& sender)
94 NS_LOG_FUNCTION(
this << packet << protocol << sender);
96 Ptr<Packet> packetCopy = packet->Copy();
99 packetCopy->RemovePacketTag(tag);
111 NS_LOG_FUNCTION(
this);
119 NS_LOG_FUNCTION_NOARGS();
Tag used to save various data about a packet, like its Spreading Factor and data about interference.
uint8_t GetBeamId() const
Read which beam ID this packet was transmitted with.
Ptr< PointToPointNetDevice > m_pointToPointNetDevice
Pointer to the P2PNetDevice we use to.
bool ReceiveFromLora(Ptr< SatLorawanNetDevice > loraNetDevice, Ptr< const Packet > packet, uint16_t protocol, const Address &sender)
Receive a packet from the LoraNetDevice.
std::map< uint8_t, Ptr< SatLorawanNetDevice > > m_satLorawanNetDevices
Map between beam ID and pointer to the node's SatLorawanNetDevice.
static TypeId GetTypeId(void)
void StartApplication(void)
Start the application.
void StopApplication(void)
Stop the application.
void SetLoraNetDevice(uint8_t beamId, Ptr< SatLorawanNetDevice > loraNetDevice)
Sets the device to use to communicate with the EDs.
bool ReceiveFromPointToPoint(Ptr< NetDevice > pointToPointNetDevice, Ptr< const Packet > packet, uint16_t protocol, const Address &sender)
Receive a packet from the PointToPointNetDevice.
void SetPointToPointNetDevice(Ptr< PointToPointNetDevice > pointToPointNetDevice)
Sets the P2P device to use to communicate with the NS.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.