12#ifndef CLASS_A_END_DEVICE_LORAWAN_MAC_H
13#define CLASS_A_END_DEVICE_LORAWAN_MAC_H
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.
Class representing the MAC layer of a Class A LoRaWAN device.
uint8_t m_rx1DrOffset
The RX1DROffset parameter value.
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
Function called by lower layers to inform this layer that reception of a packet we were locked on fai...
double GetSecondReceiveWindowFrequency() const
Get the frequency that is used for the second receive window.
double m_secondReceiveWindowFrequency
The frequency to listen on for the second receive window.
EventId m_closeFirstWindow
The event of the closing the first receive window.
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.
Time GetNextClassTransmissionDelay(Time waitingTime) override
Find the minimum waiting time before the next possible transmission based on end device's Class Type.
void OnRxClassParamSetupReq(Ptr< RxParamSetupReq > rxParamSetupReq) override
Perform the actions that need to be taken when receiving a RxParamSetupReq command based on the Devic...
void CloseFirstReceiveWindow()
Perform operations needed to close the first receive window.
void SendToPhy(Ptr< Packet > packet) override
Add headers and send a packet with the sending function of the physical layer.
void TxFinished(Ptr< const Packet > packet) override
Perform actions after sending a packet.
void CloseSecondReceiveWindow()
Perform operations needed to close the second receive window.
uint8_t GetFirstReceiveWindowDataRate()
Get the data rate that will be used in the first receive window.
EventId m_closeSecondWindow
The event of the closing the second receive window.
EventId m_secondReceiveWindow
The event of the second receive window opening.
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.
void SetSecondReceiveWindowFrequency(double frequencyMHz)
Set the frequency that will be used for the second receive window.
~ClassAEndDeviceLorawanMac() override
Destructor.
void OpenFirstReceiveWindow()
Perform operations needed to open the first receive window.
Class representing the MAC layer of a LoRaWAN device.
Every class exported by the ns3 library is enclosed in the ns3 namespace.