LoRaMAC  4.4.6
Documentation of the API
LoRaMacAdr.h File Reference

LoRa MAC ADR implementation. More...

Go to the source code of this file.

Data Structures

struct  CalcNextAdrParams_t
 

Functions

bool LoRaMacAdrCalcNext (CalcNextAdrParams_t *adrNext, int8_t *drOut, int8_t *txPowOut, uint32_t *adrAckCounter)
 Calculates the next datarate to set, when ADR is on or off. More...
 

Detailed Description

LoRa MAC ADR implementation.

______ _
/ _____) _ | |
( (____ _____ ____ _| |_ _____ ____| |__
\____ \| ___ | (_ _) ___ |/ ___) _ \
_____) ) ____| | | || |_| ____( (___| | | |
(______/|_____)_|_|_| \__)_____)\____)_| |_|
(C)2013-2017 Semtech
___ _____ _ ___ _ _____ ___ ___ ___ ___
/ __|_ _/_\ / __| |/ / __/ _ \| _ \/ __| __|
\__ \ | |/ _ \ (__| ' <| _| (_) | / (__| _|
|___/ |_/_/ \_\___|_|\_\_| \___/|_|_\\___|___|
embedded.connectivity.solutions===============
Author
Miguel Luis ( Semtech )
Gregory Cristian ( Semtech )
Daniel Jaeckle ( STACKFORCE )
Johannes Bruder ( STACKFORCE )

Data Structure Documentation

◆ CalcNextAdrParams_t

struct CalcNextAdrParams_t
Data Fields
Version_t Version

LoRaWAN Minor Version 1.X

bool UpdateChanMask

Set to true, if the function should update the channels mask.

bool AdrEnabled

Set to true, if ADR is enabled.

uint32_t AdrAckCounter

ADR ack counter.

uint16_t AdrAckLimit

ADR Ack limit

uint16_t AdrAckDelay

ADR Ack delay

int8_t Datarate

Datarate used currently.

int8_t TxPower

TX power used currently.

uint8_t UplinkDwellTime

UplinkDwellTime

LoRaMacRegion_t Region

Region

Function Documentation

◆ LoRaMacAdrCalcNext()

bool LoRaMacAdrCalcNext ( CalcNextAdrParams_t adrNext,
int8_t *  drOut,
int8_t *  txPowOut,
uint32_t *  adrAckCounter 
)

Calculates the next datarate to set, when ADR is on or off.

Parameters
[IN]adrNext Pointer to the function parameters.
[OUT]drOut The calculated datarate for the next TX.
[OUT]txPowOut The TX power for the next TX.
[OUT]adrAckCounter The calculated ADR acknowledgement counter.
Return values
Returnstrue, if an ADR request should be performed.