Microchip® Advanced Software Framework

lorawan_multiband.c File Reference

LoRaWAN Multiband file.

Copyright (c) 2019-2020 Microchip Technology Inc. and its subsidiaries.

#include "lorawan.h"
#include "conf_regparams.h"
#include <math.h>
#include "radio_interface.h"
#include "sw_timer.h"
#include "conf_stack.h"
#include "lorawan_reg_params.h"
#include "lorawan_multiband.h"

Functions

StackRetStatus_t CreateAllRegSoftwareTimers (void)
 
static void DutyCycleCallback (uint8_t param)
 
void Enableallchannels ()
 
static void EnableChannels2 (uint8_t startIndx, uint8_t endIndx, uint16_t chMask)
 
static uint32_t GenerateFrequency1 (uint8_t channelIndex)
 
static uint32_t GenerateFrequency2 (uint8_t channelIndex)
 
static uint32_t GenerateFrequencyReception (uint8_t channelIndex)
 
static DataRange_t getChBandDrT1 (uint8_t chMaskCntl, uint16_t channelMask)
 
static DataRange_t getChBandDrT2 (uint8_t chMaskCntl, uint16_t channelMask)
 
static void getRx1WindowparamsType1 (Rx1WindowParamsReq_t *rx1WindowParamReq, Rx1WindowParams_t *rx1WindowParams)
 
static void getRx1WindowparamsType2 (Rx1WindowParamsReq_t *rx1WindowParamReq, Rx1WindowParams_t *rx1WindowParams)
 
static void getRx1WindowparamsType3 (Rx1WindowParamsReq_t *rx1WindowParamReq, Rx1WindowParams_t *rx1WindowParams)
 
static void getRx1WindowparamsType4 (Rx1WindowParamsReq_t *rx1WindowParamReq, Rx1WindowParams_t *rx1WindowParams)
 
static uint8_t getSubBandId (uint32_t frequency)
 
static StackRetStatus_t GetTxChannelConfig1 (bool transmissionType, uint8_t txPwrIndx, uint8_t currDr, radioConfig_t *radioConfig)
 This function is used to select a free channel for transmission and get the corresponding radio configuration for transmission. More...
 
static StackRetStatus_t GetTxChannelConfig2 (bool transmissionType, uint8_t txPwrIndx, uint8_t currDr, radioConfig_t *radioConfig)
 This function is used to select a free channel for transmission and get the corresponding radio configuration for transmission. More...
 
StackRetStatus_t InValidAttr (LorawanRegionalAttributes_t attr, void *attrInput)
 
StackRetStatus_t InValidGetAttr (LorawanRegionalAttributes_t attr, void *attrInput, void *attrOutput)
 
void JoinBackoffCallback (uint8_t param)
 
void JoinDutyCycleCallback (uint8_t param)
 
static void LBTChannelPauseCallback (uint8_t param)
 
StackRetStatus_t LORAREG_EnableallChannels (IsmBand_t ismBand)
 
StackRetStatus_t LORAREG_GetAttr (LorawanRegionalAttributes_t attrType, void *attrInput, void *attrOutput)
 This API provides read access to all the supported Regional Attributes. More...
 
static StackRetStatus_t LORAREG_GetAttr_BandwidthAttrT1 (LorawanRegionalAttributes_t attr, void *attrInput, void *attrOutput)
 
static StackRetStatus_t LORAREG_GetAttr_BandwidthAttrT2 (LorawanRegionalAttributes_t attr, void *attrInput, void *attrOutput)
 
static StackRetStatus_t LORAREG_GetAttr_ChIdStatus (LorawanRegionalAttributes_t attr, void *attrInput, void *attrOutput)
 
static StackRetStatus_t LORAREG_GetAttr_CurChIndx (LorawanRegionalAttributes_t attr, void *attrInput, void *attrOutput)
 
static StackRetStatus_t LORAREG_GetAttr_DataRange (LorawanRegionalAttributes_t attr, void *attrInput, void *attrOutput)
 
static StackRetStatus_t LORAREG_GetAttr_DefLBTParams (LorawanRegionalAttributes_t attr, void *attrInput, void *attrOutput)
 
static StackRetStatus_t LORAREG_GetAttr_DefRx1DataRate (LorawanRegionalAttributes_t attr, void *attrInput, void *attrOutput)
 
static StackRetStatus_t LORAREG_GetAttr_DefRx2DataRate (LorawanRegionalAttributes_t attr, void *attrInput, void *attrOutput)
 
static StackRetStatus_t LORAREG_GetAttr_DefRx2Freq (LorawanRegionalAttributes_t attr, void *attrInput, void *attrOutput)
 
static StackRetStatus_t LORAREG_GetAttr_DefTxPwr (LorawanRegionalAttributes_t attr, void *attrInput, void *attrOutput)
 
static StackRetStatus_t LORAREG_GetAttr_DlFrequency (LorawanRegionalAttributes_t attr, void *attrInput, void *attrOutput)
 
static StackRetStatus_t LORAREG_GetAttr_DRangeChBandT1 (LorawanRegionalAttributes_t attr, void *attrInput, void *attrOutput)
 
static StackRetStatus_t LORAREG_GetAttr_DRangeChBandT2 (LorawanRegionalAttributes_t attr, void *attrInput, void *attrOutput)
 
static StackRetStatus_t LORAREG_GetAttr_DutyCycleT1 (LorawanRegionalAttributes_t attr, void *attrInput, void *attrOutput)
 
static StackRetStatus_t LORAREG_GetAttr_DutyCycleT2 (LorawanRegionalAttributes_t attr, void *attrInput, void *attrOutput)
 
static StackRetStatus_t LORAREG_GetAttr_DutyCycleTimer (LorawanRegionalAttributes_t attr, void *attrInput, void *attrOutput)
 
static StackRetStatus_t LORAREG_GetAttr_FreeChannel1 (LorawanRegionalAttributes_t attr, void *attrInput, void *attrOutput)
 
static StackRetStatus_t LORAREG_GetAttr_FreeChannel2 (LorawanRegionalAttributes_t attr, void *attrInput, void *attrOutput)
 
static StackRetStatus_t LORAREG_GetAttr_FreqT1 (LorawanRegionalAttributes_t attr, void *attrInput, void *attrOutput)
 
static StackRetStatus_t LORAREG_GetAttr_FreqT2 (LorawanRegionalAttributes_t attr, void *attrInput, void *attrOutput)
 
static StackRetStatus_t LORAREG_GetAttr_FreqT3 (LorawanRegionalAttributes_t attr, void *attrInput, void *attrOutput)
 
static StackRetStatus_t LORAREG_GetAttr_JoinDutyCycleRemainingTime (LorawanRegionalAttributes_t attr, void *attrInput, void *attrOutput)
 
static StackRetStatus_t LORAREG_GetAttr_MacAdrAckDelay (LorawanRegionalAttributes_t attr, void *attrInput, void *attrOutput)
 
static StackRetStatus_t LORAREG_GetAttr_MacAdrAckLimit (LorawanRegionalAttributes_t attr, void *attrInput, void *attrOutput)
 
static StackRetStatus_t LORAREG_GetAttr_MacJoinAcptDelay1 (LorawanRegionalAttributes_t attr, void *attrInput, void *attrOutput)
 
static StackRetStatus_t LORAREG_GetAttr_MacJoinAcptDelay2 (LorawanRegionalAttributes_t attr, void *attrInput, void *attrOutput)
 
static StackRetStatus_t LORAREG_GetAttr_MacRecvDelay1 (LorawanRegionalAttributes_t attr, void *attrInput, void *attrOutput)
 
static StackRetStatus_t LORAREG_GetAttr_MacRecvDelay2 (LorawanRegionalAttributes_t attr, void *attrInput, void *attrOutput)
 
static StackRetStatus_t LORAREG_GetAttr_MacRetransmitTimeout (LorawanRegionalAttributes_t attr, void *attrInput, void *attrOutput)
 
static StackRetStatus_t LORAREG_GetAttr_MaxChannel (LorawanRegionalAttributes_t attr, void *attrInput, void *attrOutput)
 
static StackRetStatus_t LORAREG_GetAttr_MaxPayloadT1 (LorawanRegionalAttributes_t attr, void *attrInput, void *attrOutput)
 
static StackRetStatus_t LORAREG_GetAttr_MaxPayloadT2 (LorawanRegionalAttributes_t attr, void *attrInput, void *attrOutput)
 
static StackRetStatus_t LORAREG_GetAttr_MaxPayloadT3 (LorawanRegionalAttributes_t attr, void *attrInput, void *attrOutput)
 
static StackRetStatus_t LORAREG_GetAttr_MinDutyCycleTimer (LorawanRegionalAttributes_t attr, void *attrInput, void *attrOutput)
 
static StackRetStatus_t LORAREG_GetAttr_minLBTChPauseTimer (LorawanRegionalAttributes_t attr, void *attrInput, void *attrOutput)
 
static StackRetStatus_t LORAREG_GetAttr_MinMaxDr (LorawanRegionalAttributes_t attr, void *attrInput, void *attrOutput)
 
static StackRetStatus_t LORAREG_GetAttr_MinNewChIndex (LorawanRegionalAttributes_t attr, void *attrInput, void *attrOutput)
 
static StackRetStatus_t LORAREG_GetAttr_ModulationAttrT1 (LorawanRegionalAttributes_t attr, void *attrInput, void *attrOutput)
 
static StackRetStatus_t LORAREG_GetAttr_ModulationAttrT2 (LorawanRegionalAttributes_t attr, void *attrInput, void *attrOutput)
 
static StackRetStatus_t LORAREG_GetAttr_NewTxChConfigT1 (LorawanRegionalAttributes_t attr, void *attrInput, void *attrOutput)
 
static StackRetStatus_t LORAREG_GetAttr_NewTxChConfigT2 (LorawanRegionalAttributes_t attr, void *attrInput, void *attrOutput)
 
static StackRetStatus_t LORAREG_GetAttr_RegDefTxDR (LorawanRegionalAttributes_t attr, void *attrInput, void *attrOutput)
 
static StackRetStatus_t LORAREG_GetAttr_RegDefTxPwr (LorawanRegionalAttributes_t attr, void *attrInput, void *attrOutput)
 
static StackRetStatus_t LORAREG_GetAttr_RegFeatures (LorawanRegionalAttributes_t attr, void *attrInput, void *attrOutput)
 
static StackRetStatus_t LORAREG_GetAttr_Rx1WindowparamsType1 (LorawanRegionalAttributes_t attr, void *attrInput, void *attrOutput)
 
static StackRetStatus_t LORAREG_GetAttr_Rx1WindowparamsType2 (LorawanRegionalAttributes_t attr, void *attrInput, void *attrOutput)
 
static StackRetStatus_t LORAREG_GetAttr_Rx1WindowparamsType3 (LorawanRegionalAttributes_t attr, void *attrInput, void *attrOutput)
 
static StackRetStatus_t LORAREG_GetAttr_Rx1WindowparamsType4 (LorawanRegionalAttributes_t attr, void *attrInput, void *attrOutput)
 
static StackRetStatus_t LORAREG_GetAttr_RxWindowOffsetT1 (LorawanRegionalAttributes_t attr, void *attrInput, void *attrOutput)
 
static StackRetStatus_t LORAREG_GetAttr_RxWindowOffsetT2 (LorawanRegionalAttributes_t attr, void *attrInput, void *attrOutput)
 
static StackRetStatus_t LORAREG_GetAttr_RxWindowSizeT1 (LorawanRegionalAttributes_t attr, void *attrInput, void *attrOutput)
 
static StackRetStatus_t LORAREG_GetAttr_RxWindowSizeT2 (LorawanRegionalAttributes_t attr, void *attrInput, void *attrOutput)
 
static StackRetStatus_t LORAREG_GetAttr_SpreadFactorT1 (LorawanRegionalAttributes_t attr, void *attrInput, void *attrOutput)
 
static StackRetStatus_t LORAREG_GetAttr_SpreadFactorT2 (LorawanRegionalAttributes_t attr, void *attrInput, void *attrOutput)
 
StackRetStatus_t LORAREG_Init (IsmBand_t ismBand)
 This function initializes the LoRaWAN Regional Parameters Module All the resources handled by the regional module eg Channels will be initialized. More...
 
void LORAREG_InitGetAttrFnPtrsAS (void)
 
void LORAREG_InitGetAttrFnPtrsAU (void)
 
void LORAREG_InitGetAttrFnPtrsEU (void)
 
void LORAREG_InitGetAttrFnPtrsIN (void)
 
void LORAREG_InitGetAttrFnPtrsJP (void)
 
void LORAREG_InitGetAttrFnPtrsKR (void)
 
void LORAREG_InitGetAttrFnPtrsNA (void)
 
void LORAREG_InitSetAttrFnPtrsAS (void)
 
void LORAREG_InitSetAttrFnPtrsAU (void)
 
void LORAREG_InitSetAttrFnPtrsEU (void)
 
void LORAREG_InitSetAttrFnPtrsIN (void)
 
void LORAREG_InitSetAttrFnPtrsJP (void)
 
void LORAREG_InitSetAttrFnPtrsKR (void)
 
void LORAREG_InitSetAttrFnPtrsNA (void)
 
void LORAREG_InitValidateAttrFnPtrsAS (void)
 
void LORAREG_InitValidateAttrFnPtrsAU (void)
 
void LORAREG_InitValidateAttrFnPtrsEU (void)
 
void LORAREG_InitValidateAttrFnPtrsIN (void)
 
void LORAREG_InitValidateAttrFnPtrsJP (void)
 
void LORAREG_InitValidateAttrFnPtrsKR (void)
 
void LORAREG_InitValidateAttrFnPtrsNA (void)
 
StackRetStatus_t LORAREG_SetAttr (LorawanRegionalAttributes_t attrType, void *attrInput)
 This API is used to Update the parameters to the regional parameter data base. More...
 
StackRetStatus_t LORAREG_SupportedBands (uint16_t *bands)
 This function returns the supported bands in the LoRaWAN stack ( a compile time feature) More...
 
StackRetStatus_t LORAREG_UnInit (void)
 This API is used to un-initialize the regional band parameters and stop the associated timers. More...
 
StackRetStatus_t LORAREG_ValidateAttr (LorawanRegionalAttributes_t attrType, void *attrInput)
 This API is used to validate if the parameter is according to the specification defined for that band. More...
 
static StackRetStatus_t SearchAvailableChannel1 (uint8_t maxChannels, bool transmissionType, uint8_t currDr, uint8_t *channelIndex)
 This function is used to select a free available channel. More...
 
static StackRetStatus_t SearchAvailableChannel2 (uint8_t maxChannels, bool transmissionType, uint8_t currDr, uint8_t *channelIndex)
 This function is used to select a free available channel. More...
 
static StackRetStatus_t setChannelIdStatus (LorawanRegionalAttributes_t attr, void *attrInput)
 
static StackRetStatus_t setChannelIdStatusT2 (LorawanRegionalAttributes_t attr, void *attrInput)
 
static StackRetStatus_t setChannelIdStatusT3 (LorawanRegionalAttributes_t attr, void *attrInput)
 
static StackRetStatus_t setChlistDefaultState (LorawanRegionalAttributes_t attr, void *attrInput)
 
static StackRetStatus_t setDataRange (LorawanRegionalAttributes_t attr, void *attrInput)
 
static StackRetStatus_t setDataRangeT2 (LorawanRegionalAttributes_t attr, void *attrInput)
 
StackRetStatus_t setDefaultTxPower (IsmBand_t ismBand)
 
static StackRetStatus_t setDlFrequency (LorawanRegionalAttributes_t attr, void *attrInput)
 
static StackRetStatus_t setDutyCycle (LorawanRegionalAttributes_t attr, void *attrInput)
 
static StackRetStatus_t setDutyCycleTimer (LorawanRegionalAttributes_t attr, void *attrInput)
 
static StackRetStatus_t setEnableAllChs (LorawanRegionalAttributes_t attr, void *attrInput)
 
static StackRetStatus_t setFrequency (LorawanRegionalAttributes_t attr, void *attrInput)
 
static StackRetStatus_t setJoinBackoffCntl (LorawanRegionalAttributes_t attr, void *attrInput)
 
static StackRetStatus_t setJoinBackOffTimer (LorawanRegionalAttributes_t attr, void *attrInput)
 
static StackRetStatus_t setJoinDutyCycleTimer (LorawanRegionalAttributes_t attr, void *attrInput)
 
static StackRetStatus_t setJoinSuccess (LorawanRegionalAttributes_t attr, void *attrInput)
 
static StackRetStatus_t setLBTTimer (LorawanRegionalAttributes_t attr, void *attrInput)
 
static StackRetStatus_t setNewChannel (LorawanRegionalAttributes_t attr, void *attrInput)
 
static StackRetStatus_t setNewChannelsT1 (LorawanRegionalAttributes_t attr, void *attrInput)
 
static StackRetStatus_t setTxParams (LorawanRegionalAttributes_t attr, void *attrInput)
 
void StopAllRegSoftwareTimers (void)
 
static void UpdateChannelIdStatus (uint8_t chid, bool statusNew)
 
static void UpdateChannelIdStatusT2 (uint8_t chid, bool statusNew)
 
static void UpdateChannelIdStatusT3 (uint8_t chid, bool statusNew)
 
static void UpdateChannelIdStatusT4 (uint8_t chid, bool statusNew)
 
static void UpdateMinMaxChDataRate (MinMaxDr_t *minmax_val)
 
static StackRetStatus_t ValidateChannelId (LorawanRegionalAttributes_t attr, void *attrInput)
 
static StackRetStatus_t ValidateChannelIdT2 (LorawanRegionalAttributes_t attr, void *attrInput)
 
static StackRetStatus_t ValidateChannelMask (LorawanRegionalAttributes_t attr, void *attrInput)
 
static StackRetStatus_t ValidateChannelMaskCntl (LorawanRegionalAttributes_t attr, void *attrInput)
 
static StackRetStatus_t ValidateChannelMaskCntlT2 (LorawanRegionalAttributes_t attr, void *attrInput)
 
static StackRetStatus_t ValidateChannelMaskT2 (LorawanRegionalAttributes_t attr, void *attrInput)
 
static StackRetStatus_t ValidateChMaskChCntl (LorawanRegionalAttributes_t attr, void *attrInput)
 
static StackRetStatus_t ValidateChMaskChCntlT2 (LorawanRegionalAttributes_t attr, void *attrInput)
 
static StackRetStatus_t ValidateDataRange (LorawanRegionalAttributes_t attr, void *attrInput)
 
static StackRetStatus_t ValidateDataRangeT2 (LorawanRegionalAttributes_t attr, void *attrInput)
 
static StackRetStatus_t ValidateDataRate (LorawanRegionalAttributes_t attr, void *attrInput)
 
static StackRetStatus_t ValidateDataRateRxT1 (LorawanRegionalAttributes_t attr, void *attrInput)
 
static StackRetStatus_t ValidateDataRateRxT2 (LorawanRegionalAttributes_t attr, void *attrInput)
 
static StackRetStatus_t ValidateDataRateTxT1 (LorawanRegionalAttributes_t attr, void *attrInput)
 
static StackRetStatus_t ValidateDataRateTxT2 (LorawanRegionalAttributes_t attr, void *attrInput)
 
static StackRetStatus_t ValidateFreq (LorawanRegionalAttributes_t attr, void *attrInput)
 
static StackRetStatus_t ValidateFreqIN (LorawanRegionalAttributes_t attr, void *attrInput)
 
static StackRetStatus_t ValidateFreqJP (LorawanRegionalAttributes_t attr, void *attrInput)
 
static StackRetStatus_t ValidateFreqKR (LorawanRegionalAttributes_t attr, void *attrInput)
 
static StackRetStatus_t ValidateFrequencyAS (LorawanRegionalAttributes_t attr, void *attrInput)
 
static StackRetStatus_t ValidateRx1DataRateOffset (LorawanRegionalAttributes_t attr, void *attrInput)
 
static StackRetStatus_t ValidateRxFreqT1 (LorawanRegionalAttributes_t attr, void *attrInput)
 
static StackRetStatus_t ValidateSupportedDr (LorawanRegionalAttributes_t attr, void *attrInput)
 
static StackRetStatus_t ValidateTxFreqT1 (LorawanRegionalAttributes_t attr, void *attrInput)
 
static StackRetStatus_t ValidateTxFreqT2 (LorawanRegionalAttributes_t attr, void *attrInput)
 
static StackRetStatus_t ValidateTxPower (LorawanRegionalAttributes_t attr, void *attrInput)
 

Variables

static pLoraRegGetAttr_t pGetAttr [REG_NUM_ATTRIBUTES]
 
static pLoraRegSetAttr_t pSetAttr [REG_NUM_ATTRIBUTES]
 
static pLoraRegValidateAttr_t pValidateAttr [REG_NUM_ATTRIBUTES]
 
RegParams_t RegParams
 
uint8_t regTimerId [REG_PARAMS_TIMERS_COUNT]
 

StackRetStatus_t CreateAllRegSoftwareTimers ( void  )
static void EnableChannels2 ( uint8_t  startIndx,
uint8_t  endIndx,
uint16_t  chMask 
)
static

References DISABLED, ENABLED, i, SHIFT1, and UpdateChannelIdStatus().

Referenced by setNewChannelsT1().

static uint32_t GenerateFrequency1 ( uint8_t  channelIndex)
static
static uint32_t GenerateFrequencyReception ( uint8_t  channelIndex)
static
static DataRange_t getChBandDrT2 ( uint8_t  chMaskCntl,
uint16_t  channelMask 
)
static
static uint8_t getSubBandId ( uint32_t  frequency)
static
static StackRetStatus_t GetTxChannelConfig1 ( bool  transmissionType,
uint8_t  txPwrIndx,
uint8_t  currDr,
radioConfig_t radioConfig 
)
static

This function is used to select a free channel for transmission and get the corresponding radio configuration for transmission.

Parameters
[in]transmissionTypeType of transmission - True : Data Frame ,False : Join Request
[in]txPwrTransmit Power which needs to be converted to the corresponding power in dBm according to the regional specification
[in]currDr: CUrrent Data rate maintained in the MAC which is used to derive the radio configuration
[out]radioConfig: Radio Configuration to be set to the Radio registers
Return values
LORAWAN_SUCCESS: If Channel is found successfully is successful LORAWAN_NO_CHANNELS_FOUND if No free channel is available

References _RegParams::band, _radioConfig::bandwidth, BW_125KHZ, BW_500KHZ, _RegParams::cmnParams, CR_4_5, DISABLED, DR0, _ecrConfig::ecr, _radioConfig::ecrConfig, _radioConfig::freq_hop_period, _radioConfig::frequency, GenerateFrequency1(), GenerateFrequency2(), ISM_NA915, _RegParams::lastUsedChannelIndex, _RegPdsItems::lastUsedSB, LORAWAN_SUCCESS, _RegParamsType1::Max_125khzChan, MAX_CHANNELS_BANDWIDTH_125_AU_NA, _RegParams::maxChannels, _RegParams::maxTxPwr, _radioConfig::modulation, MODULATION_LORA, _ecrConfig::override, _CmnParams::paramsType1, _RegParams::pDrParams, PDS_STORE, _RegParams::regParamItems, result, SearchAvailableChannel1(), _radioConfig::sf, SF_10, SF_12, SF_8, _DRParams::spreadingFactor, and _radioConfig::txPower.

Referenced by LORAREG_GetAttr_NewTxChConfigT1().

static StackRetStatus_t GetTxChannelConfig2 ( bool  transmissionType,
uint8_t  txPwrIndx,
uint8_t  currDr,
radioConfig_t radioConfig 
)
static

This function is used to select a free channel for transmission and get the corresponding radio configuration for transmission.

Parameters
[in]transmissionTypeType of transmission - True : Data Frame ,False : Join Request
[in]txPwrTransmit Power which needs to be converted to the corresponding power in dBm according to the regional specification
[in]currDr: CUrrent Data rate maintained in the MAC which is used to derive the radio configuration
[out]radioConfig: Radio Configuration to be set to the Radio registers
Return values
LORAWAN_SUCCESS: If Channel is found successfully is successful LORAWAN_NO_CHANNELS_FOUND if No free channel is available

References _RegParams::band, _radioConfig::bandwidth, _DRParams::bandwidth, DISABLED, DR2, _radioConfig::ecrConfig, _radioConfig::freq_hop_period, _radioConfig::frequency, ISM_ASBAND, ISM_JPN923, _RegParams::lastUsedChannelIndex, LORAWAN_SUCCESS, _RegParams::maxChannels, _RegParams::maxTxPwr, _radioConfig::modulation, _DRParams::modulation, _ecrConfig::override, _RegParams::pDrParams, _RegParams::pOtherChParams, result, SearchAvailableChannel2(), _radioConfig::sf, _DRParams::spreadingFactor, _radioConfig::txPower, and _OthChannelParams::ulfrequency.

Referenced by LORAREG_GetAttr_NewTxChConfigT2().

StackRetStatus_t InValidAttr ( LorawanRegionalAttributes_t  attr,
void *  attrInput 
)

References LORAWAN_INVALID_REQUEST.

Referenced by LORAREG_Init().

StackRetStatus_t InValidGetAttr ( LorawanRegionalAttributes_t  attr,
void *  attrInput,
void *  attrOutput 
)

References LORAWAN_INVALID_REQUEST.

Referenced by LORAREG_Init().

StackRetStatus_t LORAREG_GetAttr ( LorawanRegionalAttributes_t  attrType,
void *  attrInput,
void *  attrOutput 
)

This API provides read access to all the supported Regional Attributes.

The LoRaWAN mac needs to access the regional database via this API.

Parameters
[in]attrTypeType of Attribute to get from the regional module
[in]attrInputInput used to get the attribute value
[out]Resultof the GET operation
Return values
LORAWAN_SUCCESS: If GET is successful LORAWAN_INVALID_PARAMETER if the input attribute or the attribute type is invalid

References LORAWAN_INVALID_PARAMETER, pGetAttr, REG_NUM_ATTRIBUTES, and result.

static StackRetStatus_t LORAREG_GetAttr_DutyCycleT1 ( LorawanRegionalAttributes_t  attr,
void *  attrInput,
void *  attrOutput 
)
static
static StackRetStatus_t LORAREG_GetAttr_MinDutyCycleTimer ( LorawanRegionalAttributes_t  attr,
void *  attrInput,
void *  attrOutput 
)
static
static StackRetStatus_t LORAREG_GetAttr_Rx1WindowparamsType1 ( LorawanRegionalAttributes_t  attr,
void *  attrInput,
void *  attrOutput 
)
static
static StackRetStatus_t LORAREG_GetAttr_Rx1WindowparamsType2 ( LorawanRegionalAttributes_t  attr,
void *  attrInput,
void *  attrOutput 
)
static
static StackRetStatus_t LORAREG_GetAttr_Rx1WindowparamsType3 ( LorawanRegionalAttributes_t  attr,
void *  attrInput,
void *  attrOutput 
)
static
static StackRetStatus_t LORAREG_GetAttr_Rx1WindowparamsType4 ( LorawanRegionalAttributes_t  attr,
void *  attrInput,
void *  attrOutput 
)
static
StackRetStatus_t LORAREG_Init ( IsmBand_t  ismBand)

This function initializes the LoRaWAN Regional Parameters Module All the resources handled by the regional module eg Channels will be initialized.

Parameters
ismBandThe Regional band which is initialized,This is used to validate if the band is supported by the module and also initializes the module corresponding to the band
Return values
LORAWAN_SUCCESS: If initialization is successful LORAWAN_INVALID_PARAMETER if Initialization is failed

References CreateAllRegSoftwareTimers(), i, InValidAttr(), InValidGetAttr(), ISM_AU915, ISM_BRN923, ISM_EU433, ISM_EU868, ISM_IND865, ISM_JPN923, ISM_KR920, ISM_NA915, ISM_VTM923, LORAReg_InitAS(), LORAReg_InitAU(), LORAReg_InitEU(), LORAReg_InitIN(), LORAReg_InitJP(), LORAReg_InitKR(), LORAReg_InitNA(), LORAWAN_RESOURCE_UNAVAILABLE, LORAWAN_SUCCESS, pGetAttr, pSetAttr, pValidateAttr, REG_NUM_ATTRIBUTES, result, and StopAllRegSoftwareTimers().

void LORAREG_InitGetAttrFnPtrsAS ( void  )

References BANDWIDTH_ATTR, CHANNEL_ID_STATUS, CURRENT_CHANNEL_INDEX, DATA_RANGE, DATA_RANGE_CH_BAND, DEF_TX_PWR, DEFAULT_RX1_DATA_RATE, DEFAULT_RX2_DATA_RATE, DEFAULT_RX2_FREQUENCY, DL_FREQUENCY, DUTY_CYCLE, FREE_CHANNEL, FREQUENCY, JOIN_DUTY_CYCLE_TIMER, LORAREG_GetAttr_BandwidthAttrT2(), LORAREG_GetAttr_ChIdStatus(), LORAREG_GetAttr_CurChIndx(), LORAREG_GetAttr_DataRange(), LORAREG_GetAttr_DefRx1DataRate(), LORAREG_GetAttr_DefRx2DataRate(), LORAREG_GetAttr_DefRx2Freq(), LORAREG_GetAttr_DefTxPwr(), LORAREG_GetAttr_DlFrequency(), LORAREG_GetAttr_DRangeChBandT2(), LORAREG_GetAttr_DutyCycleT2(), LORAREG_GetAttr_DutyCycleTimer(), LORAREG_GetAttr_FreeChannel2(), LORAREG_GetAttr_FreqT3(), LORAREG_GetAttr_JoinDutyCycleRemainingTime(), LORAREG_GetAttr_MacAdrAckDelay(), LORAREG_GetAttr_MacAdrAckLimit(), LORAREG_GetAttr_MacJoinAcptDelay1(), LORAREG_GetAttr_MacJoinAcptDelay2(), LORAREG_GetAttr_MacRecvDelay1(), LORAREG_GetAttr_MacRecvDelay2(), LORAREG_GetAttr_MacRetransmitTimeout(), LORAREG_GetAttr_MaxChannel(), LORAREG_GetAttr_MaxPayloadT3(), LORAREG_GetAttr_MinMaxDr(), LORAREG_GetAttr_MinNewChIndex(), LORAREG_GetAttr_ModulationAttrT2(), LORAREG_GetAttr_NewTxChConfigT2(), LORAREG_GetAttr_RegDefTxDR(), LORAREG_GetAttr_RegDefTxPwr(), LORAREG_GetAttr_RegFeatures(), LORAREG_GetAttr_Rx1WindowparamsType4(), LORAREG_GetAttr_RxWindowOffsetT2(), LORAREG_GetAttr_RxWindowSizeT2(), LORAREG_GetAttr_SpreadFactorT2(), MAC_ADR_ACK_DELAY, MAC_ADR_ACK_LIMIT, MAC_JOIN_ACCEPT_DELAY1, MAC_JOIN_ACCEPT_DELAY2, MAC_RECEIVE_DELAY1, MAC_RECEIVE_DELAY2, MAC_RETRANSMIT_TIMEOUT, MAX_CHANNELS, MAX_PAYLOAD_SIZE, MIN_DUTY_CYCLE_TIMER, MIN_MAX_DR, MIN_NEW_CH_INDEX, MODULATION_ATTR, NEW_TX_CHANNEL_CONFIG, pGetAttr, REG_DEF_TX_DATARATE, REG_DEF_TX_POWER, RX1_WINDOW_PARAMS, RX_WINDOW_OFFSET, RX_WINDOW_SIZE, SPREADING_FACTOR_ATTR, and SUPPORTED_REGIONAL_FEATURES.

Referenced by LORAReg_InitAS().

void LORAREG_InitGetAttrFnPtrsAU ( void  )

References BANDWIDTH_ATTR, CHANNEL_ID_STATUS, CURRENT_CHANNEL_INDEX, DATA_RANGE, DATA_RANGE_CH_BAND, DEF_TX_PWR, DEFAULT_RX1_DATA_RATE, DEFAULT_RX2_DATA_RATE, DEFAULT_RX2_FREQUENCY, DUTY_CYCLE, DUTY_CYCLE_TIMER, FREE_CHANNEL, FREQUENCY, JOIN_DUTY_CYCLE_TIMER, LORAREG_GetAttr_BandwidthAttrT1(), LORAREG_GetAttr_ChIdStatus(), LORAREG_GetAttr_CurChIndx(), LORAREG_GetAttr_DataRange(), LORAREG_GetAttr_DefRx1DataRate(), LORAREG_GetAttr_DefRx2DataRate(), LORAREG_GetAttr_DefRx2Freq(), LORAREG_GetAttr_DefTxPwr(), LORAREG_GetAttr_DRangeChBandT1(), LORAREG_GetAttr_DutyCycleT1(), LORAREG_GetAttr_FreeChannel1(), LORAREG_GetAttr_FreqT1(), LORAREG_GetAttr_JoinDutyCycleRemainingTime(), LORAREG_GetAttr_MacAdrAckDelay(), LORAREG_GetAttr_MacAdrAckLimit(), LORAREG_GetAttr_MacJoinAcptDelay1(), LORAREG_GetAttr_MacJoinAcptDelay2(), LORAREG_GetAttr_MacRecvDelay1(), LORAREG_GetAttr_MacRecvDelay2(), LORAREG_GetAttr_MacRetransmitTimeout(), LORAREG_GetAttr_MaxChannel(), LORAREG_GetAttr_MaxPayloadT1(), LORAREG_GetAttr_MinDutyCycleTimer(), LORAREG_GetAttr_MinMaxDr(), LORAREG_GetAttr_MinNewChIndex(), LORAREG_GetAttr_ModulationAttrT1(), LORAREG_GetAttr_NewTxChConfigT1(), LORAREG_GetAttr_RegDefTxDR(), LORAREG_GetAttr_RegDefTxPwr(), LORAREG_GetAttr_RegFeatures(), LORAREG_GetAttr_Rx1WindowparamsType1(), LORAREG_GetAttr_RxWindowOffsetT1(), LORAREG_GetAttr_RxWindowSizeT1(), LORAREG_GetAttr_SpreadFactorT1(), MAC_ADR_ACK_DELAY, MAC_ADR_ACK_LIMIT, MAC_JOIN_ACCEPT_DELAY1, MAC_JOIN_ACCEPT_DELAY2, MAC_RECEIVE_DELAY1, MAC_RECEIVE_DELAY2, MAC_RETRANSMIT_TIMEOUT, MAX_CHANNELS, MAX_PAYLOAD_SIZE, MIN_MAX_DR, MIN_NEW_CH_INDEX, MODULATION_ATTR, NEW_TX_CHANNEL_CONFIG, pGetAttr, REG_DEF_TX_DATARATE, REG_DEF_TX_POWER, RX1_WINDOW_PARAMS, RX_WINDOW_OFFSET, RX_WINDOW_SIZE, SPREADING_FACTOR_ATTR, and SUPPORTED_REGIONAL_FEATURES.

Referenced by LORAReg_InitAU().

void LORAREG_InitGetAttrFnPtrsEU ( void  )

References BANDWIDTH_ATTR, CHANNEL_ID_STATUS, CURRENT_CHANNEL_INDEX, DATA_RANGE, DATA_RANGE_CH_BAND, DEF_TX_PWR, DEFAULT_RX1_DATA_RATE, DEFAULT_RX2_DATA_RATE, DEFAULT_RX2_FREQUENCY, DL_FREQUENCY, DUTY_CYCLE, FREE_CHANNEL, FREQUENCY, JOIN_DUTY_CYCLE_TIMER, LORAREG_GetAttr_BandwidthAttrT2(), LORAREG_GetAttr_ChIdStatus(), LORAREG_GetAttr_CurChIndx(), LORAREG_GetAttr_DataRange(), LORAREG_GetAttr_DefRx1DataRate(), LORAREG_GetAttr_DefRx2DataRate(), LORAREG_GetAttr_DefRx2Freq(), LORAREG_GetAttr_DefTxPwr(), LORAREG_GetAttr_DlFrequency(), LORAREG_GetAttr_DRangeChBandT2(), LORAREG_GetAttr_DutyCycleT2(), LORAREG_GetAttr_DutyCycleTimer(), LORAREG_GetAttr_FreeChannel2(), LORAREG_GetAttr_FreqT2(), LORAREG_GetAttr_JoinDutyCycleRemainingTime(), LORAREG_GetAttr_MacAdrAckDelay(), LORAREG_GetAttr_MacAdrAckLimit(), LORAREG_GetAttr_MacJoinAcptDelay1(), LORAREG_GetAttr_MacJoinAcptDelay2(), LORAREG_GetAttr_MacRecvDelay1(), LORAREG_GetAttr_MacRecvDelay2(), LORAREG_GetAttr_MacRetransmitTimeout(), LORAREG_GetAttr_MaxChannel(), LORAREG_GetAttr_MaxPayloadT2(), LORAREG_GetAttr_MinMaxDr(), LORAREG_GetAttr_MinNewChIndex(), LORAREG_GetAttr_ModulationAttrT2(), LORAREG_GetAttr_NewTxChConfigT2(), LORAREG_GetAttr_RegDefTxDR(), LORAREG_GetAttr_RegDefTxPwr(), LORAREG_GetAttr_RegFeatures(), LORAREG_GetAttr_Rx1WindowparamsType2(), LORAREG_GetAttr_RxWindowOffsetT2(), LORAREG_GetAttr_RxWindowSizeT2(), LORAREG_GetAttr_SpreadFactorT2(), MAC_ADR_ACK_DELAY, MAC_ADR_ACK_LIMIT, MAC_JOIN_ACCEPT_DELAY1, MAC_JOIN_ACCEPT_DELAY2, MAC_RECEIVE_DELAY1, MAC_RECEIVE_DELAY2, MAC_RETRANSMIT_TIMEOUT, MAX_CHANNELS, MAX_PAYLOAD_SIZE, MIN_DUTY_CYCLE_TIMER, MIN_MAX_DR, MIN_NEW_CH_INDEX, MODULATION_ATTR, NEW_TX_CHANNEL_CONFIG, pGetAttr, REG_DEF_TX_DATARATE, REG_DEF_TX_POWER, RX1_WINDOW_PARAMS, RX_WINDOW_OFFSET, RX_WINDOW_SIZE, SPREADING_FACTOR_ATTR, and SUPPORTED_REGIONAL_FEATURES.

Referenced by LORAReg_InitEU().

void LORAREG_InitGetAttrFnPtrsIN ( void  )

References BANDWIDTH_ATTR, CHANNEL_ID_STATUS, CURRENT_CHANNEL_INDEX, DATA_RANGE, DATA_RANGE_CH_BAND, DEF_TX_PWR, DEFAULT_RX1_DATA_RATE, DEFAULT_RX2_DATA_RATE, DEFAULT_RX2_FREQUENCY, DL_FREQUENCY, FREE_CHANNEL, FREQUENCY, JOIN_DUTY_CYCLE_TIMER, LORAREG_GetAttr_BandwidthAttrT2(), LORAREG_GetAttr_ChIdStatus(), LORAREG_GetAttr_CurChIndx(), LORAREG_GetAttr_DataRange(), LORAREG_GetAttr_DefRx1DataRate(), LORAREG_GetAttr_DefRx2DataRate(), LORAREG_GetAttr_DefRx2Freq(), LORAREG_GetAttr_DefTxPwr(), LORAREG_GetAttr_DlFrequency(), LORAREG_GetAttr_DRangeChBandT2(), LORAREG_GetAttr_FreeChannel2(), LORAREG_GetAttr_FreqT2(), LORAREG_GetAttr_JoinDutyCycleRemainingTime(), LORAREG_GetAttr_MacAdrAckDelay(), LORAREG_GetAttr_MacAdrAckLimit(), LORAREG_GetAttr_MacJoinAcptDelay1(), LORAREG_GetAttr_MacJoinAcptDelay2(), LORAREG_GetAttr_MacRecvDelay1(), LORAREG_GetAttr_MacRecvDelay2(), LORAREG_GetAttr_MacRetransmitTimeout(), LORAREG_GetAttr_MaxChannel(), LORAREG_GetAttr_MaxPayloadT2(), LORAREG_GetAttr_MinMaxDr(), LORAREG_GetAttr_MinNewChIndex(), LORAREG_GetAttr_ModulationAttrT2(), LORAREG_GetAttr_NewTxChConfigT2(), LORAREG_GetAttr_RegDefTxDR(), LORAREG_GetAttr_RegDefTxPwr(), LORAREG_GetAttr_RegFeatures(), LORAREG_GetAttr_Rx1WindowparamsType3(), LORAREG_GetAttr_RxWindowOffsetT2(), LORAREG_GetAttr_RxWindowSizeT2(), LORAREG_GetAttr_SpreadFactorT2(), MAC_ADR_ACK_DELAY, MAC_ADR_ACK_LIMIT, MAC_JOIN_ACCEPT_DELAY1, MAC_JOIN_ACCEPT_DELAY2, MAC_RECEIVE_DELAY1, MAC_RECEIVE_DELAY2, MAC_RETRANSMIT_TIMEOUT, MAX_CHANNELS, MAX_PAYLOAD_SIZE, MIN_MAX_DR, MIN_NEW_CH_INDEX, MODULATION_ATTR, NEW_TX_CHANNEL_CONFIG, pGetAttr, REG_DEF_TX_DATARATE, REG_DEF_TX_POWER, RX1_WINDOW_PARAMS, RX_WINDOW_OFFSET, RX_WINDOW_SIZE, SPREADING_FACTOR_ATTR, and SUPPORTED_REGIONAL_FEATURES.

Referenced by LORAReg_InitIN().

void LORAREG_InitGetAttrFnPtrsJP ( void  )

References BANDWIDTH_ATTR, CHANNEL_ID_STATUS, CURRENT_CHANNEL_INDEX, DATA_RANGE, DATA_RANGE_CH_BAND, DEF_TX_PWR, DEFAULT_LBT_PARAMS, DEFAULT_RX1_DATA_RATE, DEFAULT_RX2_DATA_RATE, DEFAULT_RX2_FREQUENCY, DL_FREQUENCY, DUTY_CYCLE, FREE_CHANNEL, FREQUENCY, JOIN_DUTY_CYCLE_TIMER, LORAREG_GetAttr_BandwidthAttrT2(), LORAREG_GetAttr_ChIdStatus(), LORAREG_GetAttr_CurChIndx(), LORAREG_GetAttr_DataRange(), LORAREG_GetAttr_DefLBTParams(), LORAREG_GetAttr_DefRx1DataRate(), LORAREG_GetAttr_DefRx2DataRate(), LORAREG_GetAttr_DefRx2Freq(), LORAREG_GetAttr_DefTxPwr(), LORAREG_GetAttr_DlFrequency(), LORAREG_GetAttr_DRangeChBandT2(), LORAREG_GetAttr_DutyCycleT2(), LORAREG_GetAttr_DutyCycleTimer(), LORAREG_GetAttr_FreeChannel2(), LORAREG_GetAttr_FreqT3(), LORAREG_GetAttr_JoinDutyCycleRemainingTime(), LORAREG_GetAttr_MacAdrAckDelay(), LORAREG_GetAttr_MacAdrAckLimit(), LORAREG_GetAttr_MacJoinAcptDelay1(), LORAREG_GetAttr_MacJoinAcptDelay2(), LORAREG_GetAttr_MacRecvDelay1(), LORAREG_GetAttr_MacRecvDelay2(), LORAREG_GetAttr_MacRetransmitTimeout(), LORAREG_GetAttr_MaxChannel(), LORAREG_GetAttr_MaxPayloadT3(), LORAREG_GetAttr_minLBTChPauseTimer(), LORAREG_GetAttr_MinMaxDr(), LORAREG_GetAttr_MinNewChIndex(), LORAREG_GetAttr_ModulationAttrT2(), LORAREG_GetAttr_NewTxChConfigT2(), LORAREG_GetAttr_RegDefTxDR(), LORAREG_GetAttr_RegDefTxPwr(), LORAREG_GetAttr_RegFeatures(), LORAREG_GetAttr_Rx1WindowparamsType4(), LORAREG_GetAttr_RxWindowOffsetT2(), LORAREG_GetAttr_RxWindowSizeT2(), LORAREG_GetAttr_SpreadFactorT2(), MAC_ADR_ACK_DELAY, MAC_ADR_ACK_LIMIT, MAC_JOIN_ACCEPT_DELAY1, MAC_JOIN_ACCEPT_DELAY2, MAC_RECEIVE_DELAY1, MAC_RECEIVE_DELAY2, MAC_RETRANSMIT_TIMEOUT, MAX_CHANNELS, MAX_PAYLOAD_SIZE, MIN_DUTY_CYCLE_TIMER, MIN_LBT_CHANNEL_PAUSE_TIMER, MIN_MAX_DR, MIN_NEW_CH_INDEX, MODULATION_ATTR, NEW_TX_CHANNEL_CONFIG, pGetAttr, REG_DEF_TX_DATARATE, REG_DEF_TX_POWER, RX1_WINDOW_PARAMS, RX_WINDOW_OFFSET, RX_WINDOW_SIZE, SPREADING_FACTOR_ATTR, and SUPPORTED_REGIONAL_FEATURES.

Referenced by LORAReg_InitJP().

void LORAREG_InitGetAttrFnPtrsKR ( void  )

References BANDWIDTH_ATTR, CHANNEL_ID_STATUS, CURRENT_CHANNEL_INDEX, DATA_RANGE, DATA_RANGE_CH_BAND, DEF_TX_PWR, DEFAULT_LBT_PARAMS, DEFAULT_RX1_DATA_RATE, DEFAULT_RX2_DATA_RATE, DEFAULT_RX2_FREQUENCY, DL_FREQUENCY, FREE_CHANNEL, FREQUENCY, JOIN_DUTY_CYCLE_TIMER, LORAREG_GetAttr_BandwidthAttrT2(), LORAREG_GetAttr_ChIdStatus(), LORAREG_GetAttr_CurChIndx(), LORAREG_GetAttr_DataRange(), LORAREG_GetAttr_DefLBTParams(), LORAREG_GetAttr_DefRx1DataRate(), LORAREG_GetAttr_DefRx2DataRate(), LORAREG_GetAttr_DefRx2Freq(), LORAREG_GetAttr_DefTxPwr(), LORAREG_GetAttr_DlFrequency(), LORAREG_GetAttr_DRangeChBandT2(), LORAREG_GetAttr_FreeChannel2(), LORAREG_GetAttr_FreqT2(), LORAREG_GetAttr_JoinDutyCycleRemainingTime(), LORAREG_GetAttr_MacAdrAckDelay(), LORAREG_GetAttr_MacAdrAckLimit(), LORAREG_GetAttr_MacJoinAcptDelay1(), LORAREG_GetAttr_MacJoinAcptDelay2(), LORAREG_GetAttr_MacRecvDelay1(), LORAREG_GetAttr_MacRecvDelay2(), LORAREG_GetAttr_MacRetransmitTimeout(), LORAREG_GetAttr_MaxChannel(), LORAREG_GetAttr_MaxPayloadT2(), LORAREG_GetAttr_minLBTChPauseTimer(), LORAREG_GetAttr_MinMaxDr(), LORAREG_GetAttr_MinNewChIndex(), LORAREG_GetAttr_ModulationAttrT2(), LORAREG_GetAttr_NewTxChConfigT2(), LORAREG_GetAttr_RegDefTxDR(), LORAREG_GetAttr_RegDefTxPwr(), LORAREG_GetAttr_RegFeatures(), LORAREG_GetAttr_Rx1WindowparamsType2(), LORAREG_GetAttr_RxWindowOffsetT2(), LORAREG_GetAttr_RxWindowSizeT2(), LORAREG_GetAttr_SpreadFactorT2(), MAC_ADR_ACK_DELAY, MAC_ADR_ACK_LIMIT, MAC_JOIN_ACCEPT_DELAY1, MAC_JOIN_ACCEPT_DELAY2, MAC_RECEIVE_DELAY1, MAC_RECEIVE_DELAY2, MAC_RETRANSMIT_TIMEOUT, MAX_CHANNELS, MAX_PAYLOAD_SIZE, MIN_LBT_CHANNEL_PAUSE_TIMER, MIN_MAX_DR, MIN_NEW_CH_INDEX, MODULATION_ATTR, NEW_TX_CHANNEL_CONFIG, pGetAttr, REG_DEF_TX_DATARATE, REG_DEF_TX_POWER, RX1_WINDOW_PARAMS, RX_WINDOW_OFFSET, RX_WINDOW_SIZE, SPREADING_FACTOR_ATTR, and SUPPORTED_REGIONAL_FEATURES.

Referenced by LORAReg_InitKR().

void LORAREG_InitGetAttrFnPtrsNA ( void  )

References BANDWIDTH_ATTR, CHANNEL_ID_STATUS, CURRENT_CHANNEL_INDEX, DATA_RANGE, DATA_RANGE_CH_BAND, DEF_TX_PWR, DEFAULT_RX1_DATA_RATE, DEFAULT_RX2_DATA_RATE, DEFAULT_RX2_FREQUENCY, DUTY_CYCLE, FREE_CHANNEL, FREQUENCY, JOIN_DUTY_CYCLE_TIMER, LORAREG_GetAttr_BandwidthAttrT1(), LORAREG_GetAttr_ChIdStatus(), LORAREG_GetAttr_CurChIndx(), LORAREG_GetAttr_DataRange(), LORAREG_GetAttr_DefRx1DataRate(), LORAREG_GetAttr_DefRx2DataRate(), LORAREG_GetAttr_DefRx2Freq(), LORAREG_GetAttr_DefTxPwr(), LORAREG_GetAttr_DRangeChBandT1(), LORAREG_GetAttr_DutyCycleT1(), LORAREG_GetAttr_FreeChannel1(), LORAREG_GetAttr_FreqT1(), LORAREG_GetAttr_JoinDutyCycleRemainingTime(), LORAREG_GetAttr_MacAdrAckDelay(), LORAREG_GetAttr_MacAdrAckLimit(), LORAREG_GetAttr_MacJoinAcptDelay1(), LORAREG_GetAttr_MacJoinAcptDelay2(), LORAREG_GetAttr_MacRecvDelay1(), LORAREG_GetAttr_MacRecvDelay2(), LORAREG_GetAttr_MacRetransmitTimeout(), LORAREG_GetAttr_MaxChannel(), LORAREG_GetAttr_MaxPayloadT1(), LORAREG_GetAttr_MinDutyCycleTimer(), LORAREG_GetAttr_MinMaxDr(), LORAREG_GetAttr_MinNewChIndex(), LORAREG_GetAttr_ModulationAttrT1(), LORAREG_GetAttr_NewTxChConfigT1(), LORAREG_GetAttr_RegDefTxDR(), LORAREG_GetAttr_RegDefTxPwr(), LORAREG_GetAttr_RegFeatures(), LORAREG_GetAttr_Rx1WindowparamsType1(), LORAREG_GetAttr_RxWindowOffsetT1(), LORAREG_GetAttr_RxWindowSizeT1(), LORAREG_GetAttr_SpreadFactorT1(), MAC_ADR_ACK_DELAY, MAC_ADR_ACK_LIMIT, MAC_JOIN_ACCEPT_DELAY1, MAC_JOIN_ACCEPT_DELAY2, MAC_RECEIVE_DELAY1, MAC_RECEIVE_DELAY2, MAC_RETRANSMIT_TIMEOUT, MAX_CHANNELS, MAX_PAYLOAD_SIZE, MIN_DUTY_CYCLE_TIMER, MIN_MAX_DR, MIN_NEW_CH_INDEX, MODULATION_ATTR, NEW_TX_CHANNEL_CONFIG, pGetAttr, REG_DEF_TX_DATARATE, REG_DEF_TX_POWER, RX1_WINDOW_PARAMS, RX_WINDOW_OFFSET, RX_WINDOW_SIZE, SPREADING_FACTOR_ATTR, and SUPPORTED_REGIONAL_FEATURES.

Referenced by LORAReg_InitNA().

StackRetStatus_t LORAREG_SetAttr ( LorawanRegionalAttributes_t  attrType,
void *  attrInput 
)

This API is used to Update the parameters to the regional parameter data base.

Parameters
[in]attrTypeType of Attribute to update in the regional module
[in]attrInputInput used to update the attribute value
Return values
LORAWAN_SUCCESS: If Update is successful LORAWAN_INVALID_PARAMETER if the input attribute or the attribute type is invalid

References LORAWAN_INVALID_PARAMETER, pSetAttr, REG_NUM_ATTRIBUTES, and result.

StackRetStatus_t LORAREG_SupportedBands ( uint16_t *  bands)

This function returns the supported bands in the LoRaWAN stack ( a compile time feature)

Parameters
ismBandThe Regional bands supported is updated in this parameter
Return values
LORAWAN_SUCCESS: If initialization is successful LORAWAN_INVALID_PARAMETER if Initialization is failed

References ISM_ASBAND, ISM_AU915, ISM_EUBAND, ISM_IND865, ISM_JPN923, ISM_KR920, ISM_NA915, and LORAWAN_SUCCESS.

StackRetStatus_t LORAREG_UnInit ( void  )

This API is used to un-initialize the regional band parameters and stop the associated timers.

LORAWAN_INVALID_PARAMETER if the input attribute or the attribute type is invalid

References _RegParams::band, _RegPdsItems::fileid, ISM_EU868, LORAWAN_INVALID_PARAMETER, PDS_FILE_REG_EU868_12_IDX, PDS_UnRegFile(), _RegParams::regParamItems, result, and StopAllRegSoftwareTimers().

StackRetStatus_t LORAREG_ValidateAttr ( LorawanRegionalAttributes_t  attrType,
void *  attrInput 
)

This API is used to validate if the parameter is according to the specification defined for that band.

Parameters
[in]attrTypeType of Attribute to validate in the regional module
[in]attrInputInput used to validate the attribute value
Return values
LORAWAN_SUCCESS: If Validate is successful LORAWAN_INVALID_PARAMETER if the input attribute or the attribute type is invalid

References LORAWAN_INVALID_PARAMETER, pValidateAttr, REG_NUM_ATTRIBUTES, and result.

Referenced by setNewChannel().

static StackRetStatus_t SearchAvailableChannel1 ( uint8_t  maxChannels,
bool  transmissionType,
uint8_t  currDr,
uint8_t *  channelIndex 
)
static

This function is used to select a free available channel.

Parameters
[in]transmissionTypeType of transmission - True : Data Frame ,False : Join Request
[in]maxChannelsMaximum number of channels to search
[in]currDr: CUrrent Data rate maintained in the MAC which is used to derive the radio configuration
[out]channelIndex: Index of the selected free channel
Return values
LORAWAN_SUCCESS: If Channel is found successfully is successful LORAWAN_NO_CHANNELS_FOUND if No free channel is available

References _RegParams::cmnParams, _channelParams::dataRange, ENABLED, _RegParams::FeaturesSupport, i, j, JOIN_BACKOFF_SUPPORT, _RegParams::lastUsedChannelIndex, _RegParamsType1::lastUsedSB, LORAWAN_NO_CHANNELS_FOUND, LORAWAN_SUCCESS, _DataRange::max, MAX_CHANNELS_BANDWIDTH_125_AU_NA, MAX_CHANNELS_BANDWIDTH_500_AU_NA, MAX_SUBBANDS, _DataRange::min, NO_OF_CH_IN_SUBBAND, _CmnParams::paramsType1, _RegParams::pChParams, _RegParams::pJoinDutyCycleTimer, result, _channelParams::status, SwTimerIsRunning(), and _JoinDutyCycleTimer::timerId.

Referenced by GetTxChannelConfig1(), and LORAREG_GetAttr_FreeChannel1().

static StackRetStatus_t SearchAvailableChannel2 ( uint8_t  maxChannels,
bool  transmissionType,
uint8_t  currDr,
uint8_t *  channelIndex 
)
static

This function is used to select a free available channel.

Parameters
[in]transmissionTypeType of transmission - True : Data Frame ,False : Join Request
[in]maxChannelsMaximum number of channels to search
[in]currDr: CUrrent Data rate maintained in the MAC which is used to derive the radio configuration
[out]channelIndex: Index of the selected free channel
Return values
LORAWAN_SUCCESS: If Channel is found successfully is successful LORAWAN_NO_CHANNELS_FOUND if No free channel is available

References _RegParamsType2::aggregatedDutyCycleTimeout, _RegParams::band, _RegParams::cmnParams, _channelParams::dataRange, ENABLED, _RegParams::FeaturesSupport, i, ISM_ASBAND, ISM_EUBAND, ISM_JPN923, JOIN_BACKOFF_SUPPORT, _OthChannelParams::joinRequestChannel, LORAWAN_NO_CHANNELS_FOUND, LORAWAN_SUCCESS, _DataRange::max, _DataRange::min, _CmnParams::paramsType2, _RegParams::pChParams, _RegParams::pJoinDutyCycleTimer, _RegParams::pOtherChParams, _RegParams::pSubBandParams, result, _channelParams::status, _OthChannelParams::subBandId, _SubBandParams::subBandTimeout, SwTimerIsRunning(), and _JoinDutyCycleTimer::timerId.

Referenced by GetTxChannelConfig2(), and LORAREG_GetAttr_FreeChannel2().

void StopAllRegSoftwareTimers ( void  )
static StackRetStatus_t ValidateChannelMask ( LorawanRegionalAttributes_t  attr,
void *  attrInput 
)
static
static StackRetStatus_t ValidateFreq ( LorawanRegionalAttributes_t  attr,
void *  attrInput 
)
static
static StackRetStatus_t ValidateFreqIN ( LorawanRegionalAttributes_t  attr,
void *  attrInput 
)
static
static StackRetStatus_t ValidateFreqJP ( LorawanRegionalAttributes_t  attr,
void *  attrInput 
)
static
static StackRetStatus_t ValidateFreqKR ( LorawanRegionalAttributes_t  attr,
void *  attrInput 
)
static