12#ifndef CLASS_A_END_DEVICE_LORAWAN_MAC_H
13#define CLASS_A_END_DEVICE_LORAWAN_MAC_H
119 void OnRxParamSetupReq(uint8_t rx1DrOffset, uint8_t rx2DataRate,
double frequencyHz)
override;
An identifier for simulation events.
Smart pointer class similar to boost::intrusive_ptr.
Simulation virtual time values and global simulation resolution.
a unique identifier for an interface.
uint8_t m_rx1DrOffset
The RX1DROffset parameter value.
uint32_t m_firstReceiveWindowFrequencyHz
The frequency [Hz] to listen on for the first receive window.
void OpenSecondReceiveWindow()
Perform operations needed to open the second receive window.
uint8_t GetSecondReceiveWindowDataRate() const
Get the data rate that will be used in the second receive window.
Time m_receiveDelay2
The interval between when a packet is done sending and when the second receive window is opened.
ClassAEndDeviceLorawanMac()
Default constructor.
static TypeId GetTypeId()
Register this type.
void FailedReception(Ptr< const Packet > packet) override
Inform this layer that reception of a packet we were locked on failed.
uint32_t GetSecondReceiveWindowFrequency() const
Get the frequency that is used for the second receive window.
RxOutcome
Set of possible outcomes of a reception window.
@ NONE
Reception window timed out.
@ FAIL
Reception initiated but failed.
@ ACK
Correctly received a network acknowledgement.
@ RECV
Correctly received a downlink packet (no ACK).
Time GetNextClassTransmissionDelay() const override
Find the minimum wait time before the next possible transmission based on end device's Class Type sch...
void SetSecondReceiveWindowFrequency(uint32_t frequencyHz)
Set the frequency that will be used for the second receive window.
bool m_busy
Whether the MAC layer is currently busy with in the LoRaWAN Class A process of transmitting an uplink...
uint8_t m_secondReceiveWindowDataRate
The data rate to listen for during the second downlink transmission.
Time m_receiveDelay1
The interval between when a packet is done sending and when the first receive window is opened.
void CloseFirstReceiveWindow()
Perform operations needed to close the first receive window.
void SendToPhy(Ptr< Packet > packet) override
Gather PHY transmission parameters and send a packet through the LoRa physical layer.
uint32_t m_secondReceiveWindowFrequencyHz
The frequency [Hz] to listen on for the second receive window.
void TxFinished(Ptr< const Packet > packet) override
Perform actions after sending a packet.
void CloseSecondReceiveWindow()
Perform operations needed to close the second receive window.
void OnRxParamSetupReq(uint8_t rx1DrOffset, uint8_t rx2DataRate, double frequencyHz) override
Perform the actions that need to be taken when receiving a RxParamSetupReq command based on the Devic...
uint8_t GetFirstReceiveWindowDataRate()
Get the data rate that will be used in the first receive window.
void ManageRetransmissions(RxOutcome outcome)
Decide whether we can retransmit based on reception outcome.
EventId m_secondReceiveWindow
The event of the second receive window opening, used to cancel the second window in case the first on...
void SetSecondReceiveWindowDataRate(uint8_t dataRate)
Set the data rate to be used in the second receive window.
void Receive(Ptr< const Packet > packet) override
Receive a packet from the lower layer.
~ClassAEndDeviceLorawanMac() override
Destructor.
void OpenFirstReceiveWindow()
Perform operations needed to open the first receive window.
EndDeviceLorawanMac()
Default constructor.
Every class exported by the ns3 library is enclosed in the ns3 namespace.