23 #ifndef LORA_END_DEVICE_STATUS_H
24 #define LORA_END_DEVICE_STATUS_H
31 #include <ns3/ipv4-header.h>
32 #include <ns3/net-device.h>
33 #include <ns3/object.h>
34 #include <ns3/pointer.h>
194 Ptr<LorawanMacEndDeviceClassA> endDeviceMac);
289 Ptr<LorawanMacEndDeviceClassA>
GetMac(
void);
361 Ptr<LorawanMacEndDeviceClassA>
m_mac;
This class represents the device address of a LoraWAN End Device.
This class represents the Network Server's knowledge about an End Device in the LoRaWAN network it is...
double m_firstReceiveWindowFrequency
uint8_t GetBeamId(void)
Get the beam ID this device is using.
double GetFirstReceiveWindowFrequency(void)
Get the first window frequency of this device.
ReceivedPacketList GetReceivedPacketList(void)
Get the received packet list.
void AddMACCommand(Ptr< LorawanMacCommand > macCommand)
Add MAC command to the list.
Ptr< Packet > GetReplyPayload(void)
Get the data of the reply packet.
virtual ~LoraEndDeviceStatus()
void SetSecondReceiveWindowFrequency(double frequency)
Set the second window frequency of this device.
void SetSecondReceiveWindowOffset(uint8_t offset)
Set the spreading factor this device is using in the first receive window.
void SetFirstReceiveWindowSpreadingFactor(uint8_t sf)
Set the spreading factor this device is using in the first receive window.
void UpdateGatewayData(GatewayList gwList, Address gwAddress, double rcvPower)
Update Gateway data when more then one gateway receive the same packet.
void RemoveReceiveWindowOpportunity(void)
void SetBeamId(uint8_t beamId)
Set the beam ID this device is using.
uint8_t GetFirstReceiveWindowSpreadingFactor(void)
Get the spreading factor this device is using in the first receive window.
friend std::ostream & operator<<(std::ostream &os, const LoraEndDeviceStatus &status)
double m_secondReceiveWindowFrequency
LorawanMacHeader GetReplyMacHeader(void)
Get the reply packet mac header.
std::list< std::pair< Ptr< const Packet >, ReceivedPacketInfo > > ReceivedPacketList
uint8_t m_secondReceiveWindowOffset
void SetReplyMacHeader(LorawanMacHeader macHeader)
Set the reply packet mac header.
bool NeedsReply(void)
Whether the end device needs a reply.
LoraEndDeviceStatus::ReceivedPacketInfo GetLastReceivedPacketInfo(void)
Return the information about the last packet that was received from the device.
uint8_t GetModcod(void)
Get the modcod this device is using.
static TypeId GetTypeId(void)
Ptr< Packet > GetCompleteReplyPacket(void)
Get the reply packet.
void SetReplyPayload(Ptr< Packet > replyPayload)
Set the packet reply payload.
void SetReplyFrameHeader(LoraFrameHeader frameHeader)
Set the reply packet frame header.
EventId m_receiveWindowEvent
std::map< Address, PacketInfoPerGw > GatewayList
void InitializeReply(void)
Initialize reply.
Ptr< LorawanMacEndDeviceClassA > m_mac
Pointer to the MAC layer of this device.
double GetSecondReceiveWindowFrequency(void)
Return the second window frequency of this device.
Ptr< const Packet > GetLastPacketReceivedFromDevice(void)
Return the last packet that was received from this device.
uint8_t GetSecondReceiveWindowOffset(void)
Get the offset of spreading factor this device is using in the second receive window with respect to ...
void SetModcod(uint8_t modcod)
Set the modcod this device is using.
void InsertReceivedPacket(Ptr< const Packet > receivedPacket, const Address &gwAddress)
Insert a received packet in the packet list.
bool HasReceiveWindowOpportunityScheduled()
Returns whether we already decided we will schedule a transmission to this ED.
LoraFrameHeader GetReplyFrameHeader(void)
Get the reply packet frame header.
ReceivedPacketList m_receivedPacketList
uint8_t m_firstReceiveWindowSpreadingFactor
void SetFirstReceiveWindowFrequency(double frequency)
Set the first window frequency of this device.
LoraDeviceAddress m_endDeviceAddress
void SetReceiveWindowOpportunity(EventId event)
std::map< double, Address > GetPowerGatewayMap(void)
Return an ordered list of the best gateways.
Ptr< LorawanMacEndDeviceClassA > GetMac(void)
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.
Structure saving information regarding the packet reception in each gateway.
Time receivedTime
Time at which the packet was received by this gateway.
Address gwAddress
Address of the gateway that received the packet.
double rxPower
Reception power of the packet at this gateway.
Structure saving information regarding all packet receptions.
GatewayList gwList
List of gateways that received this packet.
Ptr< const Packet > packet
The received packet.
Structure representing the reply that the network server will send this device at the first opportuni...
LorawanMacHeader macHeader
LoraFrameHeader frameHeader