LoRaMAC  4.4.7
Documentation of the API
Region implementation

This is the common API to access the specific regional implementations. More...

Data Structures

struct  BeaconFormat_t
 
union  PhyParam_t
 
struct  GetPhyParams_t
 
struct  SetBandTxDoneParams_t
 
struct  InitDefaultsParams_t
 
union  VerifyParams_t
 
struct  ApplyCFListParams_t
 
struct  ChanMaskSetParams_t
 
struct  RxConfigParams_t
 
struct  TxConfigParams_t
 
struct  RxParamSetupReqParams_t
 
struct  NewChannelReqParams_t
 
struct  TxParamSetupReqParams_t
 
struct  DlChannelReqParams_t
 
struct  NextChanParams_t
 
struct  ChannelAddParams_t
 
struct  ChannelRemoveParams_t
 
struct  ContinuousWaveParams_t
 
struct  RxBeaconSetup_t
 

Macros

#define LC(channelIndex)   ( uint16_t )( 1 << ( channelIndex - 1 ) )
 
#define REGION_VERSION   0x00010003
 

Enumerations

enum  PhyAttribute_t {
  PHY_FREQUENCY, PHY_MIN_RX_DR, PHY_MIN_TX_DR, PHY_MAX_RX_DR,
  PHY_MAX_TX_DR, PHY_TX_DR, PHY_DEF_TX_DR, PHY_RX_DR,
  PHY_MAX_TX_POWER, PHY_TX_POWER, PHY_DEF_TX_POWER, PHY_DEF_ADR_ACK_LIMIT,
  PHY_DEF_ADR_ACK_DELAY, PHY_MAX_PAYLOAD, PHY_DUTY_CYCLE, PHY_MAX_RX_WINDOW,
  PHY_RECEIVE_DELAY1, PHY_RECEIVE_DELAY2, PHY_JOIN_ACCEPT_DELAY1, PHY_JOIN_ACCEPT_DELAY2,
  PHY_MAX_FCNT_GAP, PHY_ACK_TIMEOUT, PHY_DEF_DR1_OFFSET, PHY_DEF_RX2_FREQUENCY,
  PHY_DEF_RX2_DR, PHY_CHANNELS_MASK, PHY_CHANNELS_DEFAULT_MASK, PHY_MAX_NB_CHANNELS,
  PHY_CHANNELS, PHY_DEF_UPLINK_DWELL_TIME, PHY_DEF_DOWNLINK_DWELL_TIME, PHY_DEF_MAX_EIRP,
  PHY_DEF_ANTENNA_GAIN, PHY_NEXT_LOWER_TX_DR, PHY_BEACON_INTERVAL, PHY_BEACON_RESERVED,
  PHY_BEACON_GUARD, PHY_BEACON_WINDOW, PHY_BEACON_WINDOW_SLOTS, PHY_PING_SLOT_WINDOW,
  PHY_BEACON_SYMBOL_TO_DEFAULT, PHY_BEACON_SYMBOL_TO_EXPANSION_MAX, PHY_PING_SLOT_SYMBOL_TO_EXPANSION_MAX, PHY_BEACON_SYMBOL_TO_EXPANSION_FACTOR,
  PHY_PING_SLOT_SYMBOL_TO_EXPANSION_FACTOR, PHY_MAX_BEACON_LESS_PERIOD, PHY_BEACON_DELAY_BEACON_TIMING_ANS, PHY_BEACON_CHANNEL_FREQ,
  PHY_BEACON_FORMAT, PHY_BEACON_CHANNEL_DR, PHY_BEACON_NB_CHANNELS, PHY_BEACON_CHANNEL_OFFSET,
  PHY_PING_SLOT_CHANNEL_FREQ, PHY_PING_SLOT_CHANNEL_DR, PHY_PING_SLOT_NB_CHANNELS, PHY_SF_FROM_DR,
  PHY_BW_FROM_DR
}
 
enum  InitType_t { INIT_TYPE_DEFAULTS, INIT_TYPE_RESET_TO_DEFAULT_CHANNELS, INIT_TYPE_ACTIVATE_DEFAULT_CHANNELS }
 
enum  ChannelsMask_t { CHANNELS_MASK, CHANNELS_DEFAULT_MASK }
 
enum  AlternateDrType_t { ALTERNATE_DR, ALTERNATE_DR_RESTORE }
 

Functions

bool RegionIsActive (LoRaMacRegion_t region)
 The function verifies if a region is active or not. If a region is not active, it cannot be used. More...
 
PhyParam_t RegionGetPhyParam (LoRaMacRegion_t region, GetPhyParams_t *getPhy)
 The function gets a value of a specific phy attribute. More...
 
void RegionSetBandTxDone (LoRaMacRegion_t region, SetBandTxDoneParams_t *txDone)
 Updates the last TX done parameters of the current channel. More...
 
void RegionInitDefaults (LoRaMacRegion_t region, InitDefaultsParams_t *params)
 Initializes the channels masks and the channels. More...
 
bool RegionVerify (LoRaMacRegion_t region, VerifyParams_t *verify, PhyAttribute_t phyAttribute)
 Verifies a parameter. More...
 
void RegionApplyCFList (LoRaMacRegion_t region, ApplyCFListParams_t *applyCFList)
 The function parses the input buffer and sets up the channels of the CF list. More...
 
bool RegionChanMaskSet (LoRaMacRegion_t region, ChanMaskSetParams_t *chanMaskSet)
 Sets a channels mask. More...
 
bool RegionRxConfig (LoRaMacRegion_t region, RxConfigParams_t *rxConfig, int8_t *datarate)
 Configuration of the RX windows. More...
 
void RegionComputeRxWindowParameters (LoRaMacRegion_t region, int8_t datarate, uint8_t minRxSymbols, uint32_t rxError, RxConfigParams_t *rxConfigParams)
 
bool RegionTxConfig (LoRaMacRegion_t region, TxConfigParams_t *txConfig, int8_t *txPower, TimerTime_t *txTimeOnAir)
 TX configuration. More...
 
uint8_t RegionLinkAdrReq (LoRaMacRegion_t region, LinkAdrReqParams_t *linkAdrReq, int8_t *drOut, int8_t *txPowOut, uint8_t *nbRepOut, uint8_t *nbBytesParsed)
 The function processes a Link ADR Request. More...
 
uint8_t RegionRxParamSetupReq (LoRaMacRegion_t region, RxParamSetupReqParams_t *rxParamSetupReq)
 The function processes a RX Parameter Setup Request. More...
 
int8_t RegionNewChannelReq (LoRaMacRegion_t region, NewChannelReqParams_t *newChannelReq)
 The function processes a New Channel Request. More...
 
int8_t RegionTxParamSetupReq (LoRaMacRegion_t region, TxParamSetupReqParams_t *txParamSetupReq)
 The function processes a TX ParamSetup Request. More...
 
int8_t RegionDlChannelReq (LoRaMacRegion_t region, DlChannelReqParams_t *dlChannelReq)
 The function processes a DlChannel Request. More...
 
int8_t RegionAlternateDr (LoRaMacRegion_t region, int8_t currentDr, AlternateDrType_t type)
 Alternates the datarate of the channel for the join request. More...
 
LoRaMacStatus_t RegionNextChannel (LoRaMacRegion_t region, NextChanParams_t *nextChanParams, uint8_t *channel, TimerTime_t *time, TimerTime_t *aggregatedTimeOff)
 Searches and set the next random available channel. More...
 
LoRaMacStatus_t RegionChannelAdd (LoRaMacRegion_t region, ChannelAddParams_t *channelAdd)
 Adds a channel. More...
 
bool RegionChannelsRemove (LoRaMacRegion_t region, ChannelRemoveParams_t *channelRemove)
 Removes a channel. More...
 
void RegionSetContinuousWave (LoRaMacRegion_t region, ContinuousWaveParams_t *continuousWave)
 Sets the radio into continuous wave mode. More...
 
uint8_t RegionApplyDrOffset (LoRaMacRegion_t region, uint8_t downlinkDwellTime, int8_t dr, int8_t drOffset)
 Computes new datarate according to the given offset. More...
 
void RegionRxBeaconSetup (LoRaMacRegion_t region, RxBeaconSetup_t *rxBeaconSetup, uint8_t *outDr)
 Sets the radio into beacon reception mode. More...
 
Version_t RegionGetVersion (void)
 Gets the version of the regional parameters implementation. More...
 

Detailed Description

This is the common API to access the specific regional implementations.

Preprocessor options:


Data Structure Documentation

◆ BeaconFormat_t

struct BeaconFormat_t

Structure containing the beacon format

Data Fields
uint8_t BeaconSize

Size of the beacon

uint8_t Rfu1Size

Size of the RFU 1 data field

uint8_t Rfu2Size

Size of the RFU 2 data field

◆ PhyParam_t

union PhyParam_t

Union for the structure uGetPhyParams

Data Fields
uint32_t Value

A parameter value.

float fValue

A floating point value.

uint16_t * ChannelsMask

Pointer to the channels mask.

ChannelParams_t * Channels

Pointer to the channels.

BeaconFormat_t BeaconFormat

Beacon format

TimerTime_t DutyCycleTimePeriod

Duty Cycle Period

◆ GetPhyParams_t

struct GetPhyParams_t

Parameter structure for the function RegionGetPhyParam.

Data Fields
PhyAttribute_t Attribute

Setup the parameter to get.

int8_t Datarate

Datarate. The parameter is needed for the following queries: PHY_MAX_PAYLOAD, PHY_NEXT_LOWER_TX_DR, PHY_SF_FROM_DR, PHY_BW_FROM_DR.

uint8_t UplinkDwellTime

Uplink dwell time. This parameter must be set to query: PHY_MAX_PAYLOAD, PHY_MIN_TX_DR. The parameter is needed for the following queries: PHY_MIN_TX_DR, PHY_MAX_PAYLOAD, PHY_NEXT_LOWER_TX_DR.

uint8_t DownlinkDwellTime

Downlink dwell time. This parameter must be set to query: PHY_MAX_PAYLOAD, PHY_MIN_RX_DR. The parameter is needed for the following queries: PHY_MIN_RX_DR, PHY_MAX_PAYLOAD.

uint8_t Channel

Specification of the downlink channel. Used in Class B only. The parameter is needed for the following queries: PHY_BEACON_CHANNEL_FREQ, PHY_PING_SLOT_CHANNEL_FREQ

◆ SetBandTxDoneParams_t

struct SetBandTxDoneParams_t

Parameter structure for the function RegionSetBandTxDone.

Data Fields
uint8_t Channel

Channel to update.

bool Joined

Joined Set to true, if the node has joined the network

TimerTime_t LastTxDoneTime

Last TX done time.

TimerTime_t LastTxAirTime

Time-on-air of the last transmission.

SysTime_t ElapsedTimeSinceStartUp

Elapsed time since initialization.

◆ InitDefaultsParams_t

struct InitDefaultsParams_t

Parameter structure for the function RegionInitDefaults.

Data Fields
void * NvmGroup1

Pointer to region NVM group1.

void * NvmGroup2

Pointer to region NVM group2.

InitType_t Type

Sets the initialization type.

◆ VerifyParams_t

union VerifyParams_t

Parameter structure for the function RegionVerify.

Data Fields
uint32_t Frequency

Channel frequency to verify

int8_t TxPower

TX power to verify.

bool DutyCycle

Set to true, if the duty cycle is enabled, otherwise false.

struct sDatarateParams DatarateParams

◆ ApplyCFListParams_t

struct ApplyCFListParams_t

Parameter structure for the function RegionApplyCFList.

Data Fields
uint8_t * Payload

Payload which contains the CF list.

uint8_t Size

Size of the payload.

◆ ChanMaskSetParams_t

struct ChanMaskSetParams_t

Parameter structure for the function RegionChanMaskSet.

Data Fields
uint16_t * ChannelsMaskIn

Pointer to the channels mask which should be set.

ChannelsMask_t ChannelsMaskType

Pointer to the channels mask which should be set.

◆ RxConfigParams_t

struct RxConfigParams_t

Parameter structure for the function RegionRxConfig.

Data Fields
uint8_t Channel

The RX channel.

int8_t Datarate

RX datarate.

uint8_t Bandwidth

RX bandwidth.

int8_t DrOffset

RX datarate offset.

uint32_t Frequency

RX frequency.

uint32_t WindowTimeout

RX window timeout

int32_t WindowOffset

RX window offset

uint8_t DownlinkDwellTime

Downlink dwell time.

bool RxContinuous

Set to true, if RX should be continuous.

LoRaMacRxSlot_t RxSlot

Sets the RX window.

◆ TxConfigParams_t

struct TxConfigParams_t

Parameter structure for the function RegionTxConfig.

Data Fields
uint8_t Channel

The TX channel.

int8_t Datarate

The TX datarate.

int8_t TxPower

The TX power.

float MaxEirp

The Max EIRP, if applicable.

float AntennaGain

The antenna gain, if applicable.

uint16_t PktLen

Frame length to setup.

◆ LinkAdrReqParams_t

struct LinkAdrReqParams_t

Parameter structure for the function RegionLinkAdrReq.

Data Fields
Version_t Version

Current LoRaWAN Version

uint8_t * Payload

Pointer to the payload which contains the MAC commands.

uint8_t PayloadSize

Size of the payload.

uint8_t UplinkDwellTime

Uplink dwell time.

bool AdrEnabled

Set to true, if ADR is enabled.

int8_t CurrentDatarate

The current datarate.

int8_t CurrentTxPower

The current TX power.

uint8_t CurrentNbRep

The current number of repetitions.

◆ RxParamSetupReqParams_t

struct RxParamSetupReqParams_t

Parameter structure for the function RegionRxParamSetupReq.

Data Fields
int8_t Datarate

The datarate to setup.

int8_t DrOffset

Datarate offset.

uint32_t Frequency

The frequency to setup.

◆ NewChannelReqParams_t

struct NewChannelReqParams_t

Parameter structure for the function RegionNewChannelReq.

Data Fields
ChannelParams_t * NewChannel

Pointer to the new channels.

int8_t ChannelId

Channel id.

◆ TxParamSetupReqParams_t

struct TxParamSetupReqParams_t

Parameter structure for the function RegionTxParamSetupReq.

Data Fields
uint8_t UplinkDwellTime

Uplink dwell time.

uint8_t DownlinkDwellTime

Downlink dwell time.

uint8_t MaxEirp

Max EIRP.

◆ DlChannelReqParams_t

struct DlChannelReqParams_t

Parameter structure for the function RegionDlChannelReq.

Data Fields
uint8_t ChannelId

Channel Id to add the frequency.

uint32_t Rx1Frequency

Alternative frequency for the Rx1 window.

◆ NextChanParams_t

struct NextChanParams_t

Parameter structure for the function RegionNextChannel.

Data Fields
TimerTime_t AggrTimeOff

Aggregated time-off time.

TimerTime_t LastAggrTx

Time of the last aggregated TX.

int8_t Datarate

Current datarate.

bool Joined

Set to true, if the node has already joined a network, otherwise false.

bool DutyCycleEnabled

Set to true, if the duty cycle is enabled, otherwise false.

SysTime_t ElapsedTimeSinceStartUp

Elapsed time since the start of the node.

bool LastTxIsJoinRequest

Joined Set to true, if the last uplink was a join request

uint16_t PktLen

Payload length of the next frame

◆ ChannelAddParams_t

struct ChannelAddParams_t

Parameter structure for the function RegionChannelsAdd.

Data Fields
ChannelParams_t * NewChannel

Pointer to the new channel to add.

uint8_t ChannelId

Channel id to add.

◆ ChannelRemoveParams_t

struct ChannelRemoveParams_t

Parameter structure for the function RegionChannelsRemove.

Data Fields
uint8_t ChannelId

Channel id to remove.

◆ ContinuousWaveParams_t

struct ContinuousWaveParams_t

Parameter structure for the function RegionContinuousWave.

Data Fields
uint8_t Channel

Current channel index.

int8_t Datarate

Datarate. Used to limit the TX power.

int8_t TxPower

The TX power to setup.

float MaxEirp

Max EIRP, if applicable.

float AntennaGain

The antenna gain, if applicable.

uint16_t Timeout

Specifies the time the radio will stay in CW mode.

◆ RxBeaconSetup_t

struct RxBeaconSetup_t

Parameter structure for the function RegionRxBeaconSetup

Data Fields
uint16_t SymbolTimeout

Symbol timeout.

uint32_t RxTime

Receive time.

uint32_t Frequency

The frequency to setup.

Macro Definition Documentation

◆ LC

#define LC (   channelIndex)    ( uint16_t )( 1 << ( channelIndex - 1 ) )

Macro to compute bit of a channel index.

◆ REGION_VERSION

#define REGION_VERSION   0x00010003

Regional parameters version definition.

Enumeration Type Documentation

◆ PhyAttribute_t

Enumeration of phy attributes.

Enumerator
PHY_FREQUENCY 

Frequency. It is available to perform a verification with RegionVerify().

PHY_MIN_RX_DR 

Minimum RX datarate.

PHY_MIN_TX_DR 

Minimum TX datarate.

PHY_MAX_RX_DR 

Maximum RX datarate.

PHY_MAX_TX_DR 

Maximum TX datarate.

PHY_TX_DR 

TX datarate. This is a parameter which can't be queried. It is available to perform a verification with RegionVerify().

PHY_DEF_TX_DR 

Default TX datarate.

PHY_RX_DR 

RX datarate. It is available to perform a verification with RegionVerify().

PHY_MAX_TX_POWER 

Maximum TX power.

PHY_TX_POWER 

TX power. It is available to perform a verification with RegionVerify().

PHY_DEF_TX_POWER 

Default TX power.

PHY_DEF_ADR_ACK_LIMIT 

Default ADR_ACK_LIMIT value.

PHY_DEF_ADR_ACK_DELAY 

Default ADR_ACK_DELAY value.

PHY_MAX_PAYLOAD 

Maximum payload possible.

PHY_DUTY_CYCLE 

Duty cycle.

PHY_MAX_RX_WINDOW 

Maximum receive window duration.

PHY_RECEIVE_DELAY1 

Receive delay for window 1.

PHY_RECEIVE_DELAY2 

Receive delay for window 2.

PHY_JOIN_ACCEPT_DELAY1 

Join accept delay for window 1.

PHY_JOIN_ACCEPT_DELAY2 

Join accept delay for window 2.

PHY_MAX_FCNT_GAP 

Maximum frame counter gap.

PHY_ACK_TIMEOUT 

Acknowledgement time out.

PHY_DEF_DR1_OFFSET 

Default datarate offset for window 1.

PHY_DEF_RX2_FREQUENCY 

Default receive window 2 frequency.

PHY_DEF_RX2_DR 

Default receive window 2 datarate.

PHY_CHANNELS_MASK 

Channels mask.

PHY_CHANNELS_DEFAULT_MASK 

Channels default mask.

PHY_MAX_NB_CHANNELS 

Maximum number of supported channels

PHY_CHANNELS 

Channels.

PHY_DEF_UPLINK_DWELL_TIME 

Default value of the uplink dwell time.

PHY_DEF_DOWNLINK_DWELL_TIME 

Default value of the downlink dwell time.

PHY_DEF_MAX_EIRP 

Default value of the MaxEIRP.

PHY_DEF_ANTENNA_GAIN 

Default value of the antenna gain.

PHY_NEXT_LOWER_TX_DR 

Next lower datarate.

PHY_BEACON_INTERVAL 

Beacon interval in ms.

PHY_BEACON_RESERVED 

Beacon reserved time in ms.

PHY_BEACON_GUARD 

Beacon guard time in ms.

PHY_BEACON_WINDOW 

Beacon window time in ms.

PHY_BEACON_WINDOW_SLOTS 

Beacon window time in numer of slots.

PHY_PING_SLOT_WINDOW 

Ping slot length time in ms.

PHY_BEACON_SYMBOL_TO_DEFAULT 

Default symbol timeout for beacons and ping slot windows.

PHY_BEACON_SYMBOL_TO_EXPANSION_MAX 

Maximum symbol timeout for beacons.

PHY_PING_SLOT_SYMBOL_TO_EXPANSION_MAX 

Maximum symbol timeout for ping slots.

PHY_BEACON_SYMBOL_TO_EXPANSION_FACTOR 

Symbol expansion value for beacon windows in case of beacon loss in symbols.

PHY_PING_SLOT_SYMBOL_TO_EXPANSION_FACTOR 

Symbol expansion value for ping slot windows in case of beacon loss in symbols.

PHY_MAX_BEACON_LESS_PERIOD 

Maximum allowed beacon less time in ms.

PHY_BEACON_DELAY_BEACON_TIMING_ANS 

Delay time for the BeaconTimingAns in ms.

PHY_BEACON_CHANNEL_FREQ 

Beacon channel frequency.

PHY_BEACON_FORMAT 

The format of the beacon.

PHY_BEACON_CHANNEL_DR 

The beacon channel datarate.

PHY_BEACON_NB_CHANNELS 

The number of channels for the beacon reception.

PHY_BEACON_CHANNEL_OFFSET 

The static offset for the downlink channel calculation.

PHY_PING_SLOT_CHANNEL_FREQ 

Ping slot channel frequency.

PHY_PING_SLOT_CHANNEL_DR 

The datarate of a ping slot channel.

PHY_PING_SLOT_NB_CHANNELS 

The number of channels for the ping slot reception.

PHY_SF_FROM_DR 

The equivalent spreading factor value from datarate

PHY_BW_FROM_DR 

The equivalent bandwith index from datarate

◆ InitType_t

enum InitType_t

Enumeration of initialization types.

Enumerator
INIT_TYPE_DEFAULTS 

Initializes the regional default settings for the band, channel and default channels mask. Some regions also initiate other default configurations. In general, this type is intended to be called once during the initialization.

INIT_TYPE_RESET_TO_DEFAULT_CHANNELS 

Resets the channels mask to the default channels. Deactivates all other channels.

INIT_TYPE_ACTIVATE_DEFAULT_CHANNELS 

Activates the default channels. Leaves all other active channels active.

◆ ChannelsMask_t

Enumerator
CHANNELS_MASK 

The channels mask.

CHANNELS_DEFAULT_MASK 

The channels default mask.

◆ AlternateDrType_t

Enumeration of alternation type

Enumerator
ALTERNATE_DR 

Type to use for an alternation

ALTERNATE_DR_RESTORE 

Type to use to restore one alternation

Function Documentation

◆ RegionIsActive()

bool RegionIsActive ( LoRaMacRegion_t  region)

The function verifies if a region is active or not. If a region is not active, it cannot be used.

Parameters
[IN]region LoRaWAN region.
Return values
Returntrue, if the region is supported.

◆ RegionGetPhyParam()

PhyParam_t RegionGetPhyParam ( LoRaMacRegion_t  region,
GetPhyParams_t getPhy 
)

The function gets a value of a specific phy attribute.

Parameters
[IN]region LoRaWAN region.
[IN]getPhy Pointer to the function parameters.
Return values
Returnsa structure containing the PHY parameter.

◆ RegionSetBandTxDone()

void RegionSetBandTxDone ( LoRaMacRegion_t  region,
SetBandTxDoneParams_t txDone 
)

Updates the last TX done parameters of the current channel.

Parameters
[IN]region LoRaWAN region.
[IN]txDone Pointer to the function parameters.

◆ RegionInitDefaults()

void RegionInitDefaults ( LoRaMacRegion_t  region,
InitDefaultsParams_t params 
)

Initializes the channels masks and the channels.

Parameters
[IN]region LoRaWAN region.
[IN]params Pointer to the function parameters.

◆ RegionVerify()

bool RegionVerify ( LoRaMacRegion_t  region,
VerifyParams_t verify,
PhyAttribute_t  phyAttribute 
)

Verifies a parameter.

Parameters
[IN]region LoRaWAN region.
[IN]verify Pointer to the function parameters.
[IN]type Sets the initialization type.
Return values
Returnstrue, if the parameter is valid.

◆ RegionApplyCFList()

void RegionApplyCFList ( LoRaMacRegion_t  region,
ApplyCFListParams_t applyCFList 
)

The function parses the input buffer and sets up the channels of the CF list.

Parameters
[IN]region LoRaWAN region.
[IN]applyCFList Pointer to the function parameters.

◆ RegionChanMaskSet()

bool RegionChanMaskSet ( LoRaMacRegion_t  region,
ChanMaskSetParams_t chanMaskSet 
)

Sets a channels mask.

Parameters
[IN]region LoRaWAN region.
[IN]chanMaskSet Pointer to the function parameters.
Return values
Returnstrue, if the channels mask could be set.

◆ RegionRxConfig()

bool RegionRxConfig ( LoRaMacRegion_t  region,
RxConfigParams_t rxConfig,
int8_t *  datarate 
)

Configuration of the RX windows.

Parameters
[IN]region LoRaWAN region.
[IN]rxConfig Pointer to the function parameters.
[OUT]datarate The datarate index which was set.
Return values
Returnstrue, if the configuration was applied successfully.

◆ RegionComputeRxWindowParameters()

void RegionComputeRxWindowParameters ( LoRaMacRegion_t  region,
int8_t  datarate,
uint8_t  minRxSymbols,
uint32_t  rxError,
RxConfigParams_t rxConfigParams 
)

Computes the Rx window timeout and offset.

Parameters
[IN]region LoRaWAN region.
[IN]datarate Rx window datarate index to be used
[IN]minRxSymbols Minimum required number of symbols to detect an Rx frame.
[IN]rxError System maximum timing error of the receiver. In milliseconds The receiver will turn on in a [-rxError : +rxError] ms interval around RxOffset
[OUT]rxConfigParamsReturns updated WindowTimeout and WindowOffset fields.

◆ RegionTxConfig()

bool RegionTxConfig ( LoRaMacRegion_t  region,
TxConfigParams_t txConfig,
int8_t *  txPower,
TimerTime_t *  txTimeOnAir 
)

TX configuration.

Parameters
[IN]region LoRaWAN region.
[IN]txConfig Pointer to the function parameters.
[OUT]txPower The tx power index which was set.
[OUT]txTimeOnAir The time-on-air of the frame.
Return values
Returnstrue, if the configuration was applied successfully.

◆ RegionLinkAdrReq()

uint8_t RegionLinkAdrReq ( LoRaMacRegion_t  region,
LinkAdrReqParams_t linkAdrReq,
int8_t *  drOut,
int8_t *  txPowOut,
uint8_t *  nbRepOut,
uint8_t *  nbBytesParsed 
)

The function processes a Link ADR Request.

Parameters
[IN]region LoRaWAN region.
[IN]linkAdrReq Pointer to the function parameters.
[OUT]drOut The datarate which was applied.
[OUT]txPowOut The TX power which was applied.
[OUT]nbRepOut The number of repetitions to apply.
[OUT]nbBytesParsed The number bytes which were parsed.
Return values
Returnsthe status of the operation, according to the LoRaMAC specification.

◆ RegionRxParamSetupReq()

uint8_t RegionRxParamSetupReq ( LoRaMacRegion_t  region,
RxParamSetupReqParams_t rxParamSetupReq 
)

The function processes a RX Parameter Setup Request.

Parameters
[IN]region LoRaWAN region.
[IN]rxParamSetupReq Pointer to the function parameters.
Return values
Returnsthe status of the operation, according to the LoRaMAC specification.

◆ RegionNewChannelReq()

int8_t RegionNewChannelReq ( LoRaMacRegion_t  region,
NewChannelReqParams_t newChannelReq 
)

The function processes a New Channel Request.

Parameters
[IN]region LoRaWAN region.
[IN]newChannelReq Pointer to the function parameters.
Return values
Returnsthe status of the operation, according to the LoRaMAC specification.

◆ RegionTxParamSetupReq()

int8_t RegionTxParamSetupReq ( LoRaMacRegion_t  region,
TxParamSetupReqParams_t txParamSetupReq 
)

The function processes a TX ParamSetup Request.

Parameters
[IN]region LoRaWAN region.
[IN]txParamSetupReq Pointer to the function parameters.
Return values
Returnsthe status of the operation, according to the LoRaMAC specification. Returns -1, if the functionality is not implemented. In this case, the end node shall ignore the command.

◆ RegionDlChannelReq()

int8_t RegionDlChannelReq ( LoRaMacRegion_t  region,
DlChannelReqParams_t dlChannelReq 
)

The function processes a DlChannel Request.

Parameters
[IN]region LoRaWAN region.
[IN]dlChannelReq Pointer to the function parameters.
Return values
Returnsthe status of the operation, according to the LoRaMAC specification.

◆ RegionAlternateDr()

int8_t RegionAlternateDr ( LoRaMacRegion_t  region,
int8_t  currentDr,
AlternateDrType_t  type 
)

Alternates the datarate of the channel for the join request.

Parameters
[IN]region LoRaWAN region.
[IN]currentDr Current datarate.
[IN]type Alternation type.
Return values
Datarateto apply.

◆ RegionNextChannel()

LoRaMacStatus_t RegionNextChannel ( LoRaMacRegion_t  region,
NextChanParams_t nextChanParams,
uint8_t *  channel,
TimerTime_t *  time,
TimerTime_t *  aggregatedTimeOff 
)

Searches and set the next random available channel.

Parameters
[IN]region LoRaWAN region.
[OUT]channel Next channel to use for TX.
[OUT]time Time to wait for the next transmission according to the duty cycle.
[OUT]aggregatedTimeOff Updates the aggregated time off.
Return values
Functionstatus [1: OK, 0: Unable to find a channel on the current datarate].

◆ RegionChannelAdd()

LoRaMacStatus_t RegionChannelAdd ( LoRaMacRegion_t  region,
ChannelAddParams_t channelAdd 
)

Adds a channel.

Parameters
[IN]region LoRaWAN region.
[IN]channelAdd Pointer to the function parameters.
Return values
Statusof the operation.

◆ RegionChannelsRemove()

bool RegionChannelsRemove ( LoRaMacRegion_t  region,
ChannelRemoveParams_t channelRemove 
)

Removes a channel.

Parameters
[IN]region LoRaWAN region.
[IN]channelRemove Pointer to the function parameters.
Return values
Returnstrue, if the channel was removed successfully.

◆ RegionSetContinuousWave()

void RegionSetContinuousWave ( LoRaMacRegion_t  region,
ContinuousWaveParams_t continuousWave 
)

Sets the radio into continuous wave mode.

Parameters
[IN]region LoRaWAN region.
[IN]continuousWave Pointer to the function parameters.

◆ RegionApplyDrOffset()

uint8_t RegionApplyDrOffset ( LoRaMacRegion_t  region,
uint8_t  downlinkDwellTime,
int8_t  dr,
int8_t  drOffset 
)

Computes new datarate according to the given offset.

Parameters
[IN]downlinkDwellTime Downlink dwell time configuration. 0: No limit, 1: 400ms
[IN]dr Current datarate
[IN]drOffset Offset to be applied
Return values
newDrComputed datarate.

◆ RegionRxBeaconSetup()

void RegionRxBeaconSetup ( LoRaMacRegion_t  region,
RxBeaconSetup_t rxBeaconSetup,
uint8_t *  outDr 
)

Sets the radio into beacon reception mode.

Parameters
[IN]rxBeaconSetup Pointer to the function parameters
[out]outDrDatarate used to receive the beacon

◆ RegionGetVersion()

Version_t RegionGetVersion ( void  )

Gets the version of the regional parameters implementation.

Return values
Versionof the regional parameters.