ns3::LorawanMacCommand Class Referenceabstract

This base class is used to represent a general MAC command. More...

#include "lorawan-mac-command.h"

+ Inheritance diagram for ns3::LorawanMacCommand:
+ Collaboration diagram for ns3::LorawanMacCommand:

Public Member Functions

 LorawanMacCommand ()
 
virtual ~LorawanMacCommand ()
 
virtual uint8_t Deserialize (Buffer::Iterator &start)=0
 Deserialize the buffer into a MAC command. More...
 
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...
 
virtual void Print (std::ostream &os) const =0
 Print the contents of this MAC command in human-readable format. More...
 
virtual void Serialize (Buffer::Iterator &start) const =0
 Serialize the contents of this MAC command into a buffer, according to the LoRaWAN standard. More...
 

Static Public Member Functions

static uint8_t GetCIDFromLorawanMacCommand (enum MacCommandType commandType)
 Get the CID that corresponds to this MAC command. More...
 
static TypeId GetTypeId (void)
 

Protected Attributes

enum MacCommandType m_commandType
 The type of this command. More...
 
uint8_t m_serializedSize
 This MAC command's serialized size. More...
 

Detailed Description

This base class is used to represent a general MAC command.

Pure virtual methods that handle serialization, deserialization and other common features are supposed to be defined in detail by child classes, based on that MAC command's attributes and structure.

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

Constructor & Destructor Documentation

◆ LorawanMacCommand()

ns3::LorawanMacCommand::LorawanMacCommand ( )

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

◆ ~LorawanMacCommand()

ns3::LorawanMacCommand::~LorawanMacCommand ( )
virtual

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

Member Function Documentation

◆ Deserialize()

virtual uint8_t ns3::LorawanMacCommand::Deserialize ( Buffer::Iterator &  start)
pure 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.

Implemented in ns3::DlChannelAns, ns3::TxParamSetupReq, ns3::TxParamSetupAns, ns3::RxTimingSetupAns, ns3::RxTimingSetupReq, ns3::NewChannelAns, ns3::NewChannelReq, ns3::DevStatusAns, ns3::DevStatusReq, ns3::RxParamSetupAns, ns3::RxParamSetupReq, ns3::DutyCycleAns, ns3::DutyCycleReq, ns3::LinkAdrAns, ns3::LinkAdrReq, ns3::LinkCheckAns, and ns3::LinkCheckReq.

◆ GetCIDFromLorawanMacCommand()

◆ GetCommandType()

enum MacCommandType ns3::LorawanMacCommand::GetCommandType ( void  ) const
virtual

Get the commandType of this MAC command.

Returns
The type of MAC command this object represents.

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

◆ GetSerializedSize()

uint8_t ns3::LorawanMacCommand::GetSerializedSize ( void  ) const
virtual

Get serialized length of this MAC command.

Returns
The number of bytes the MAC command takes up.

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

References m_serializedSize.

◆ GetTypeId()

TypeId ns3::LorawanMacCommand::GetTypeId ( void  )
static

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

◆ Print()

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

◆ Serialize()

virtual void ns3::LorawanMacCommand::Serialize ( Buffer::Iterator &  start) const
pure 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.

Implemented in ns3::DlChannelAns, ns3::TxParamSetupReq, ns3::TxParamSetupAns, ns3::RxTimingSetupAns, ns3::RxTimingSetupReq, ns3::NewChannelAns, ns3::NewChannelReq, ns3::DevStatusAns, ns3::DevStatusReq, ns3::RxParamSetupAns, ns3::RxParamSetupReq, ns3::DutyCycleAns, ns3::DutyCycleReq, ns3::LinkAdrAns, ns3::LinkAdrReq, ns3::LinkCheckAns, and ns3::LinkCheckReq.

Member Data Documentation

◆ m_commandType

◆ m_serializedSize


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