Loading...
Searching...
No Matches
ns3::LoraAdrComponent Class Reference

#include "lora-adr-component.h"

Inheritance diagram for ns3::LoraAdrComponent:
Collaboration diagram for ns3::LoraAdrComponent:

Public Member Functions

 LoraAdrComponent ()
virtual ~LoraAdrComponent ()
void BeforeSendingReply (Ptr< LoraEndDeviceStatus > status, Ptr< LoraNetworkStatus > networkStatus)
void OnFailedReply (Ptr< LoraEndDeviceStatus > status, Ptr< LoraNetworkStatus > networkStatus)
 Method that is called when a packet cannot be sent in the downlink.
void OnReceivedPacket (Ptr< const Packet > packet, Ptr< LoraEndDeviceStatus > status, Ptr< LoraNetworkStatus > networkStatus)
 Method that is called when a new packet is received by the NetworkServer.
Public Member Functions inherited from ns3::LoraNetworkControllerComponent
 LoraNetworkControllerComponent ()
virtual ~LoraNetworkControllerComponent ()

Static Public Member Functions

static TypeId GetTypeId (void)
Static Public Member Functions inherited from ns3::LoraNetworkControllerComponent
static TypeId GetTypeId (void)

Private Types

enum  CombiningMethod { AVERAGE , MAXIMUM , MINIMUM }

Private Member Functions

void AdrImplementation (uint8_t *newDataRate, uint8_t *newTxPower, Ptr< LoraEndDeviceStatus > status)
double GetAverageSNR (LoraEndDeviceStatus::ReceivedPacketList packetList, int historyRange)
double GetAverageTxFromGateways (LoraEndDeviceStatus::GatewayList gwList)
double GetMaxSNR (LoraEndDeviceStatus::ReceivedPacketList packetList, int historyRange)
double GetMaxTxFromGateways (LoraEndDeviceStatus::GatewayList gwList)
double GetMinSNR (LoraEndDeviceStatus::ReceivedPacketList packetList, int historyRange)
double GetMinTxFromGateways (LoraEndDeviceStatus::GatewayList gwList)
double GetReceivedPower (LoraEndDeviceStatus::GatewayList gwList)
int GetTxPowerIndex (int txPower)
double RxPowerToSNR (double transmissionPower)
uint8_t SfToDr (uint8_t sf)

Private Attributes

const int B = 125000
enum CombiningMethod historyAveraging
int historyRange
bool m_toggleTxPower
const int max_transmissionPower = 14
const int min_spreadingFactor = 7
const int min_transmissionPower = 2
const int NF = 6
enum CombiningMethod tpAveraging
double treshold [6] = {-20.0, -17.5, -15.0, -12.5, -10.0, -7.5}

Detailed Description

Definition at line 41 of file lora-adr-component.h.

Member Enumeration Documentation

◆ CombiningMethod

Enumerator
AVERAGE 
MAXIMUM 
MINIMUM 

Definition at line 43 of file lora-adr-component.h.

Constructor & Destructor Documentation

◆ LoraAdrComponent()

ns3::LoraAdrComponent::LoraAdrComponent ( )

Definition at line 83 of file lora-adr-component.cc.

Referenced by GetTypeId().

Here is the caller graph for this function:

◆ ~LoraAdrComponent()

ns3::LoraAdrComponent::~LoraAdrComponent ( )
virtual

Definition at line 87 of file lora-adr-component.cc.

Member Function Documentation

◆ AdrImplementation()

void ns3::LoraAdrComponent::AdrImplementation ( uint8_t * newDataRate,
uint8_t * newTxPower,
Ptr< LoraEndDeviceStatus > status )
private

Definition at line 189 of file lora-adr-component.cc.

References AVERAGE, GetAverageSNR(), GetMaxSNR(), GetMinSNR(), historyAveraging, historyRange, max_transmissionPower, MAXIMUM, min_spreadingFactor, min_transmissionPower, MINIMUM, SfToDr(), and treshold.

Referenced by BeforeSendingReply().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ BeforeSendingReply()

void ns3::LoraAdrComponent::BeforeSendingReply ( Ptr< LoraEndDeviceStatus > status,
Ptr< LoraNetworkStatus > networkStatus )
virtual

◆ GetAverageSNR()

double ns3::LoraAdrComponent::GetAverageSNR ( LoraEndDeviceStatus::ReceivedPacketList packetList,
int historyRange )
private

Definition at line 428 of file lora-adr-component.cc.

References GetReceivedPower(), historyRange, and RxPowerToSNR().

Referenced by AdrImplementation().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetAverageTxFromGateways()

double ns3::LoraAdrComponent::GetAverageTxFromGateways ( LoraEndDeviceStatus::GatewayList gwList)
private

Definition at line 339 of file lora-adr-component.cc.

Referenced by GetReceivedPower().

Here is the caller graph for this function:

◆ GetMaxSNR()

double ns3::LoraAdrComponent::GetMaxSNR ( LoraEndDeviceStatus::ReceivedPacketList packetList,
int historyRange )
private

Definition at line 401 of file lora-adr-component.cc.

References GetReceivedPower(), historyRange, and RxPowerToSNR().

Referenced by AdrImplementation().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetMaxTxFromGateways()

double ns3::LoraAdrComponent::GetMaxTxFromGateways ( LoraEndDeviceStatus::GatewayList gwList)
private

Definition at line 321 of file lora-adr-component.cc.

Referenced by GetReceivedPower().

Here is the caller graph for this function:

◆ GetMinSNR()

double ns3::LoraAdrComponent::GetMinSNR ( LoraEndDeviceStatus::ReceivedPacketList packetList,
int historyRange )
private

Definition at line 374 of file lora-adr-component.cc.

References GetReceivedPower(), historyRange, and RxPowerToSNR().

Referenced by AdrImplementation().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetMinTxFromGateways()

double ns3::LoraAdrComponent::GetMinTxFromGateways ( LoraEndDeviceStatus::GatewayList gwList)
private

Definition at line 303 of file lora-adr-component.cc.

Referenced by GetReceivedPower().

Here is the caller graph for this function:

◆ GetReceivedPower()

double ns3::LoraAdrComponent::GetReceivedPower ( LoraEndDeviceStatus::GatewayList gwList)
private

Definition at line 357 of file lora-adr-component.cc.

References AVERAGE, GetAverageTxFromGateways(), GetMaxTxFromGateways(), GetMinTxFromGateways(), MAXIMUM, MINIMUM, and tpAveraging.

Referenced by GetAverageSNR(), GetMaxSNR(), and GetMinSNR().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetTxPowerIndex()

int ns3::LoraAdrComponent::GetTxPowerIndex ( int txPower)
private

Definition at line 454 of file lora-adr-component.cc.

Referenced by BeforeSendingReply().

Here is the caller graph for this function:

◆ GetTypeId()

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

Definition at line 42 of file lora-adr-component.cc.

References LoraAdrComponent(), AVERAGE, historyAveraging, historyRange, m_toggleTxPower, MAXIMUM, MINIMUM, and tpAveraging.

Referenced by OnFailedReply(), and OnReceivedPacket().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ OnFailedReply()

void ns3::LoraAdrComponent::OnFailedReply ( Ptr< LoraEndDeviceStatus > status,
Ptr< LoraNetworkStatus > networkStatus )
virtual

Method that is called when a packet cannot be sent in the downlink.

Parameters
statusThe EndDeviceStatus of the device to which it was impossible to send a reply.
networkStatusA pointer to the NetworkStatus object

Implements ns3::LoraNetworkControllerComponent.

Definition at line 182 of file lora-adr-component.cc.

References GetTypeId().

Here is the call graph for this function:

◆ OnReceivedPacket()

void ns3::LoraAdrComponent::OnReceivedPacket ( Ptr< const Packet > packet,
Ptr< LoraEndDeviceStatus > status,
Ptr< LoraNetworkStatus > networkStatus )
virtual

Method that is called when a new packet is received by the NetworkServer.

Parameters
packetThe newly received packet
networkStatusA pointer to the NetworkStatus object

Implements ns3::LoraNetworkControllerComponent.

Definition at line 92 of file lora-adr-component.cc.

References GetTypeId().

Here is the call graph for this function:

◆ RxPowerToSNR()

double ns3::LoraAdrComponent::RxPowerToSNR ( double transmissionPower)
private

Definition at line 295 of file lora-adr-component.cc.

References B, and NF.

Referenced by GetAverageSNR(), GetMaxSNR(), and GetMinSNR().

Here is the caller graph for this function:

◆ SfToDr()

uint8_t ns3::LoraAdrComponent::SfToDr ( uint8_t sf)
private

Definition at line 269 of file lora-adr-component.cc.

Referenced by AdrImplementation(), and BeforeSendingReply().

Here is the caller graph for this function:

Member Data Documentation

◆ B

const int ns3::LoraAdrComponent::B = 125000
private

Definition at line 113 of file lora-adr-component.h.

Referenced by RxPowerToSNR().

◆ historyAveraging

enum CombiningMethod ns3::LoraAdrComponent::historyAveraging
private

Definition at line 98 of file lora-adr-component.h.

Referenced by AdrImplementation(), and GetTypeId().

◆ historyRange

int ns3::LoraAdrComponent::historyRange
private

◆ m_toggleTxPower

bool ns3::LoraAdrComponent::m_toggleTxPower
private

Definition at line 122 of file lora-adr-component.h.

Referenced by BeforeSendingReply(), and GetTypeId().

◆ max_transmissionPower

const int ns3::LoraAdrComponent::max_transmissionPower = 14
private

Definition at line 107 of file lora-adr-component.h.

Referenced by AdrImplementation().

◆ min_spreadingFactor

const int ns3::LoraAdrComponent::min_spreadingFactor = 7
private

Definition at line 101 of file lora-adr-component.h.

Referenced by AdrImplementation().

◆ min_transmissionPower

const int ns3::LoraAdrComponent::min_transmissionPower = 2
private

Definition at line 104 of file lora-adr-component.h.

Referenced by AdrImplementation().

◆ NF

const int ns3::LoraAdrComponent::NF = 6
private

Definition at line 116 of file lora-adr-component.h.

Referenced by RxPowerToSNR().

◆ tpAveraging

enum CombiningMethod ns3::LoraAdrComponent::tpAveraging
private

Definition at line 92 of file lora-adr-component.h.

Referenced by GetReceivedPower(), and GetTypeId().

◆ treshold

double ns3::LoraAdrComponent::treshold[6] = {-20.0, -17.5, -15.0, -12.5, -10.0, -7.5}
private

Definition at line 120 of file lora-adr-component.h.

Referenced by AdrImplementation().


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