ns3::RxParamSetupReq Class Reference

Implementation of the RxParamSetupReq LoRaWAN MAC command. More...

#include "lorawan-mac-command.h"

+ Inheritance diagram for ns3::RxParamSetupReq:
+ Collaboration diagram for ns3::RxParamSetupReq:

Public Member Functions

 RxParamSetupReq ()
 
 RxParamSetupReq (uint8_t rx1DrOffset, uint8_t rx2DataRate, double frequency)
 Constructor providing initialization of all fields. More...
 
virtual uint8_t Deserialize (Buffer::Iterator &start)
 Deserialize the buffer into a MAC command. More...
 
double GetFrequency (void)
 Get this command's frequency. More...
 
uint8_t GetRx1DrOffset (void)
 Get this command's Rx1DrOffset parameter. More...
 
uint8_t GetRx2DataRate (void)
 Get this command's Rx2DataRate parameter. More...
 
virtual void Print (std::ostream &os) const
 Print the contents of this MAC command in human-readable format. More...
 
virtual void Serialize (Buffer::Iterator &start) const
 Serialize the contents of this MAC command into a buffer, according to the LoRaWAN standard. More...
 
- Public Member Functions inherited from ns3::LorawanMacCommand
 LorawanMacCommand ()
 
virtual ~LorawanMacCommand ()
 
virtual enum MacCommandType GetCommandType (void) const
 Get the commandType of this MAC command. More...
 
virtual uint8_t GetSerializedSize (void) const
 Get serialized length of this MAC command. More...
 

Private Attributes

double m_frequency
 The frequency in Hz More...
 
uint8_t m_rx1DrOffset
 
uint8_t m_rx2DataRate
 

Additional Inherited Members

- Static Public Member Functions inherited from ns3::LorawanMacCommand
static uint8_t GetCIDFromLorawanMacCommand (enum MacCommandType commandType)
 Get the CID that corresponds to this MAC command. More...
 
static TypeId GetTypeId (void)
 
- Protected Attributes inherited from ns3::LorawanMacCommand
enum MacCommandType m_commandType
 The type of this command. More...
 
uint8_t m_serializedSize
 This MAC command's serialized size. More...
 

Detailed Description

Implementation of the RxParamSetupReq LoRaWAN MAC command.

Definition at line 342 of file lorawan-mac-command.h.

Constructor & Destructor Documentation

◆ RxParamSetupReq() [1/2]

ns3::RxParamSetupReq::RxParamSetupReq ( )

◆ RxParamSetupReq() [2/2]

ns3::RxParamSetupReq::RxParamSetupReq ( uint8_t  rx1DrOffset,
uint8_t  rx2DataRate,
double  frequency 
)

Constructor providing initialization of all fields.

Parameters
rx1DrOffsetThe Data Rate offset to use for the first receive window.
rx2DataRateThe Data Rate to use for the second receive window.
frequencyThe frequency in Hz to use for the second receive window.

Definition at line 563 of file lorawan-mac-command.cc.

References ns3::LorawanMacCommand::m_commandType, ns3::LorawanMacCommand::m_serializedSize, and ns3::RX_PARAM_SETUP_REQ.

Member Function Documentation

◆ Deserialize()

uint8_t ns3::RxParamSetupReq::Deserialize ( Buffer::Iterator &  start)
virtual

Deserialize the buffer into a MAC command.

Parameters
startA pointer to the buffer that contains the serialized command.
Returns
the number of bytes that were consumed.

Implements ns3::LorawanMacCommand.

Definition at line 603 of file lorawan-mac-command.cc.

References m_frequency, m_rx1DrOffset, m_rx2DataRate, and ns3::LorawanMacCommand::m_serializedSize.

◆ GetFrequency()

double ns3::RxParamSetupReq::GetFrequency ( void  )

Get this command's frequency.

Returns
The frequency parameter, in Hz.

Definition at line 651 of file lorawan-mac-command.cc.

References m_frequency.

◆ GetRx1DrOffset()

uint8_t ns3::RxParamSetupReq::GetRx1DrOffset ( void  )

Get this command's Rx1DrOffset parameter.

Returns
The Rx1DrOffset parameter.

Definition at line 635 of file lorawan-mac-command.cc.

References m_rx1DrOffset.

◆ GetRx2DataRate()

uint8_t ns3::RxParamSetupReq::GetRx2DataRate ( void  )

Get this command's Rx2DataRate parameter.

Returns
The Rx2DataRate parameter.

Definition at line 643 of file lorawan-mac-command.cc.

References m_rx2DataRate.

◆ Print()

void ns3::RxParamSetupReq::Print ( std::ostream &  os) const
virtual

Print the contents of this MAC command in human-readable format.

Parameters
osThe std::ostream instance on which to print the MAC command.

Implements ns3::LorawanMacCommand.

Definition at line 624 of file lorawan-mac-command.cc.

References m_frequency, m_rx1DrOffset, and m_rx2DataRate.

◆ Serialize()

void ns3::RxParamSetupReq::Serialize ( Buffer::Iterator &  start) const
virtual

Serialize the contents of this MAC command into a buffer, according to the LoRaWAN standard.

Parameters
startA pointer to the buffer into which to serialize the command.

Implements ns3::LorawanMacCommand.

Definition at line 586 of file lorawan-mac-command.cc.

References ns3::LorawanMacCommand::GetCIDFromLorawanMacCommand(), ns3::LorawanMacCommand::m_commandType, m_frequency, m_rx1DrOffset, and m_rx2DataRate.

+ Here is the call graph for this function:

Member Data Documentation

◆ m_frequency

double ns3::RxParamSetupReq::m_frequency
private

The frequency in Hz

Definition at line 384 of file lorawan-mac-command.h.

Referenced by Deserialize(), GetFrequency(), Print(), and Serialize().

◆ m_rx1DrOffset

uint8_t ns3::RxParamSetupReq::m_rx1DrOffset
private

Definition at line 382 of file lorawan-mac-command.h.

Referenced by Deserialize(), GetRx1DrOffset(), Print(), and Serialize().

◆ m_rx2DataRate

uint8_t ns3::RxParamSetupReq::m_rx2DataRate
private

Definition at line 383 of file lorawan-mac-command.h.

Referenced by Deserialize(), GetRx2DataRate(), Print(), and Serialize().


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