LoRaMAC
4.4.5
Documentation of the API
|
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 |
struct | GetNvmCtxParams_t |
union | VerifyParams_t |
struct | ApplyCFListParams_t |
struct | ChanMaskSetParams_t |
struct | RxConfigParams_t |
struct | TxConfigParams_t |
struct | LinkAdrReqParams_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 |
#define | DR_0 0 |
#define | DR_1 1 |
#define | DR_2 2 |
#define | DR_3 3 |
#define | DR_4 4 |
#define | DR_5 5 |
#define | DR_6 6 |
#define | DR_7 7 |
#define | DR_8 8 |
#define | DR_9 9 |
#define | DR_10 10 |
#define | DR_11 11 |
#define | DR_12 12 |
#define | DR_13 13 |
#define | DR_14 14 |
#define | DR_15 15 |
#define | TX_POWER_0 0 |
#define | TX_POWER_1 1 |
#define | TX_POWER_2 2 |
#define | TX_POWER_3 3 |
#define | TX_POWER_4 4 |
#define | TX_POWER_5 5 |
#define | TX_POWER_6 6 |
#define | TX_POWER_7 7 |
#define | TX_POWER_8 8 |
#define | TX_POWER_9 9 |
#define | TX_POWER_10 10 |
#define | TX_POWER_11 11 |
#define | TX_POWER_12 12 |
#define | TX_POWER_13 13 |
#define | TX_POWER_14 14 |
#define | TX_POWER_15 15 |
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... | |
void * | RegionGetNvmCtx (LoRaMacRegion_t region, GetNvmCtxParams_t *params) |
Returns a pointer to the internal context and its size. 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... | |
uint8_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... | |
uint8_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... | |
This is the common API to access the specific regional implementations.
Preprocessor options:
struct BeaconFormat_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 |
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 |
struct SetBandTxDoneParams_t |
Parameter structure for the function RegionSetBandTxDone.
struct InitDefaultsParams_t |
Parameter structure for the function RegionInitDefaults.
Data Fields | ||
---|---|---|
void * | NvmCtx |
Pointer to region module context to be restored. |
InitType_t | Type |
Sets the initialization type. |
struct GetNvmCtxParams_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 |
struct ApplyCFListParams_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. |
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. |
struct TxConfigParams_t |
struct LinkAdrReqParams_t |
Parameter structure for the function RegionLinkAdrReq.
struct RxParamSetupReqParams_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. |
struct TxParamSetupReqParams_t |
struct DlChannelReqParams_t |
struct NextChanParams_t |
Parameter structure for the function RegionNextChannel.
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. |
struct ChannelRemoveParams_t |
struct ContinuousWaveParams_t |
Parameter structure for the function RegionContinuousWave.
struct RxBeaconSetup_t |
#define LC | ( | channelIndex | ) | ( uint16_t )( 1 << ( channelIndex - 1 ) ) |
Macro to compute bit of a channel index.
#define REGION_VERSION 0x00010003 |
Regional parameters version definition.
#define DR_0 0 |
Region | SF |
---|---|
AS923 | SF12 - BW125 |
AU915 | SF10 - BW125 |
CN470 | SF12 - BW125 |
CN779 | SF12 - BW125 |
EU433 | SF12 - BW125 |
EU868 | SF12 - BW125 |
IN865 | SF12 - BW125 |
KR920 | SF12 - BW125 |
US915 | SF10 - BW125 |
RU864 | SF12 - BW125 |
#define DR_1 1 |
Region | SF |
---|---|
AS923 | SF11 - BW125 |
AU915 | SF9 - BW125 |
CN470 | SF11 - BW125 |
CN779 | SF11 - BW125 |
EU433 | SF11 - BW125 |
EU868 | SF11 - BW125 |
IN865 | SF11 - BW125 |
KR920 | SF11 - BW125 |
US915 | SF9 - BW125 |
RU864 | SF11 - BW125 |
#define DR_2 2 |
Region | SF |
---|---|
AS923 | SF10 - BW125 |
AU915 | SF8 - BW125 |
CN470 | SF10 - BW125 |
CN779 | SF10 - BW125 |
EU433 | SF10 - BW125 |
EU868 | SF10 - BW125 |
IN865 | SF10 - BW125 |
KR920 | SF10 - BW125 |
US915 | SF8 - BW125 |
RU864 | SF10 - BW125 |
#define DR_3 3 |
Region | SF |
---|---|
AS923 | SF9 - BW125 |
AU915 | SF7 - BW125 |
CN470 | SF9 - BW125 |
CN779 | SF9 - BW125 |
EU433 | SF9 - BW125 |
EU868 | SF9 - BW125 |
IN865 | SF9 - BW125 |
KR920 | SF9 - BW125 |
US915 | SF7 - BW125 |
RU864 | SF9 - BW125 |
#define DR_4 4 |
Region | SF |
---|---|
AS923 | SF8 - BW125 |
AU915 | SF8 - BW500 |
CN470 | SF8 - BW125 |
CN779 | SF8 - BW125 |
EU433 | SF8 - BW125 |
EU868 | SF8 - BW125 |
IN865 | SF8 - BW125 |
KR920 | SF8 - BW125 |
US915 | SF8 - BW500 |
RU864 | SF8 - BW125 |
#define DR_5 5 |
Region | SF |
---|---|
AS923 | SF7 - BW125 |
AU915 | RFU |
CN470 | SF7 - BW125 |
CN779 | SF7 - BW125 |
EU433 | SF7 - BW125 |
EU868 | SF7 - BW125 |
IN865 | SF7 - BW125 |
KR920 | SF7 - BW125 |
US915 | RFU |
RU864 | SF7 - BW125 |
#define DR_6 6 |
Region | SF |
---|---|
AS923 | SF7 - BW250 |
AU915 | RFU |
CN470 | SF12 - BW125 |
CN779 | SF7 - BW250 |
EU433 | SF7 - BW250 |
EU868 | SF7 - BW250 |
IN865 | SF7 - BW250 |
KR920 | RFU |
US915 | RFU |
RU864 | SF7 - BW250 |
#define DR_7 7 |
Region | SF |
---|---|
AS923 | FSK |
AU915 | RFU |
CN470 | SF12 - BW125 |
CN779 | FSK |
EU433 | FSK |
EU868 | FSK |
IN865 | FSK |
KR920 | RFU |
US915 | RFU |
RU864 | FSK |
#define DR_8 8 |
Region | SF |
---|---|
AS923 | RFU |
AU915 | SF12 - BW500 |
CN470 | RFU |
CN779 | RFU |
EU433 | RFU |
EU868 | RFU |
IN865 | RFU |
KR920 | RFU |
US915 | SF12 - BW500 |
RU864 | RFU |
#define DR_9 9 |
Region | SF |
---|---|
AS923 | RFU |
AU915 | SF11 - BW500 |
CN470 | RFU |
CN779 | RFU |
EU433 | RFU |
EU868 | RFU |
IN865 | RFU |
KR920 | RFU |
US915 | SF11 - BW500 |
RU864 | RFU |
#define DR_10 10 |
Region | SF |
---|---|
AS923 | RFU |
AU915 | SF10 - BW500 |
CN470 | RFU |
CN779 | RFU |
EU433 | RFU |
EU868 | RFU |
IN865 | RFU |
KR920 | RFU |
US915 | SF10 - BW500 |
RU864 | RFU |
#define DR_11 11 |
Region | SF |
---|---|
AS923 | RFU |
AU915 | SF9 - BW500 |
CN470 | RFU |
CN779 | RFU |
EU433 | RFU |
EU868 | RFU |
IN865 | RFU |
KR920 | RFU |
US915 | SF9 - BW500 |
RU864 | RFU |
#define DR_12 12 |
Region | SF |
---|---|
AS923 | RFU |
AU915 | SF8 - BW500 |
CN470 | RFU |
CN779 | RFU |
EU433 | RFU |
EU868 | RFU |
IN865 | RFU |
KR920 | RFU |
US915 | SF8 - BW500 |
RU864 | RFU |
#define DR_13 13 |
Region | SF |
---|---|
AS923 | RFU |
AU915 | SF7 - BW500 |
CN470 | RFU |
CN779 | RFU |
EU433 | RFU |
EU868 | RFU |
IN865 | RFU |
KR920 | RFU |
US915 | SF7 - BW500 |
RU864 | RFU |
#define DR_14 14 |
Region | SF |
---|---|
AS923 | RFU |
AU915 | RFU |
CN470 | RFU |
CN779 | RFU |
EU433 | RFU |
EU868 | RFU |
IN865 | RFU |
KR920 | RFU |
US915 | RFU |
RU864 | RFU |
#define DR_15 15 |
Region | SF |
---|---|
AS923 | RFU |
AU915 | RFU |
CN470 | RFU |
CN779 | RFU |
EU433 | RFU |
EU868 | RFU |
IN865 | RFU |
KR920 | RFU |
US915 | RFU |
RU864 | RFU |
#define TX_POWER_0 0 |
Region | dBM |
---|---|
AS923 | Max EIRP |
AU915 | Max EIRP |
CN470 | Max EIRP |
CN779 | Max EIRP |
EU433 | Max EIRP |
EU868 | Max EIRP |
IN865 | Max EIRP |
KR920 | Max EIRP |
US915 | Max ERP |
RU864 | Max EIRP |
#define TX_POWER_1 1 |
Region | dBM |
---|---|
AS923 | Max EIRP - 2 |
AU915 | Max EIRP - 2 |
CN470 | Max EIRP - 2 |
CN779 | Max EIRP - 2 |
EU433 | Max EIRP - 2 |
EU868 | Max EIRP - 2 |
IN865 | Max EIRP - 2 |
KR920 | Max EIRP - 2 |
US915 | Max ERP - 2 |
RU864 | Max EIRP - 2 |
#define TX_POWER_2 2 |
Region | dBM |
---|---|
AS923 | Max EIRP - 4 |
AU915 | Max EIRP - 4 |
CN470 | Max EIRP - 4 |
CN779 | Max EIRP - 4 |
EU433 | Max EIRP - 4 |
EU868 | Max EIRP - 4 |
IN865 | Max EIRP - 4 |
KR920 | Max EIRP - 4 |
US915 | Max ERP - 4 |
RU864 | Max EIRP - 4 |
#define TX_POWER_3 3 |
Region | dBM |
---|---|
AS923 | Max EIRP - 6 |
AU915 | Max EIRP - 6 |
CN470 | Max EIRP - 6 |
CN779 | Max EIRP - 6 |
EU433 | Max EIRP - 6 |
EU868 | Max EIRP - 6 |
IN865 | Max EIRP - 6 |
KR920 | Max EIRP - 6 |
US915 | Max ERP - 6 |
RU864 | Max EIRP - 6 |
#define TX_POWER_4 4 |
Region | dBM |
---|---|
AS923 | Max EIRP - 8 |
AU915 | Max EIRP - 8 |
CN470 | Max EIRP - 8 |
CN779 | Max EIRP - 8 |
EU433 | Max EIRP - 8 |
EU868 | Max EIRP - 8 |
IN865 | Max EIRP - 8 |
KR920 | Max EIRP - 8 |
US915 | Max ERP - 8 |
RU864 | Max EIRP - 8 |
#define TX_POWER_5 5 |
Region | dBM |
---|---|
AS923 | Max EIRP - 10 |
AU915 | Max EIRP - 10 |
CN470 | Max EIRP - 10 |
CN779 | Max EIRP - 10 |
EU433 | Max EIRP - 10 |
EU868 | Max EIRP - 10 |
IN865 | Max EIRP - 10 |
KR920 | Max EIRP - 10 |
US915 | Max ERP - 10 |
RU864 | Max EIRP - 10 |
#define TX_POWER_6 6 |
Region | dBM |
---|---|
AS923 | Max EIRP - 12 |
AU915 | Max EIRP - 12 |
CN470 | Max EIRP - 12 |
CN779 | - |
EU433 | - |
EU868 | Max EIRP - 12 |
IN865 | Max EIRP - 12 |
KR920 | Max EIRP - 12 |
US915 | Max ERP - 12 |
RU864 | Max EIRP - 12 |
#define TX_POWER_7 7 |
Region | dBM |
---|---|
AS923 | Max EIRP - 14 |
AU915 | Max EIRP - 14 |
CN470 | Max EIRP - 14 |
CN779 | - |
EU433 | - |
EU868 | Max EIRP - 14 |
IN865 | Max EIRP - 14 |
KR920 | Max EIRP - 14 |
US915 | Max ERP - 14 |
RU864 | Max EIRP - 14 |
#define TX_POWER_8 8 |
Region | dBM |
---|---|
AS923 | - |
AU915 | Max EIRP - 16 |
CN470 | - |
CN779 | - |
EU433 | - |
EU868 | - |
IN865 | Max EIRP - 16 |
KR920 | - |
US915 | Max ERP - 16 |
RU864 | - |
#define TX_POWER_9 9 |
Region | dBM |
---|---|
AS923 | - |
AU915 | Max EIRP - 18 |
CN470 | - |
CN779 | - |
EU433 | - |
EU868 | - |
IN865 | Max EIRP - 18 |
KR920 | - |
US915 | Max ERP - 18 |
RU864 | - |
#define TX_POWER_10 10 |
Region | dBM |
---|---|
AS923 | - |
AU915 | Max EIRP - 20 |
CN470 | - |
CN779 | - |
EU433 | - |
EU868 | - |
IN865 | Max EIRP - 20 |
KR920 | - |
US915 | Max ERP - 20 |
RU864 | - |
#define TX_POWER_11 11 |
Region | dBM |
---|---|
AS923 | - |
AU915 | Max EIRP - 22 |
CN470 | - |
CN779 | - |
EU433 | - |
EU868 | - |
IN865 | - |
KR920 | - |
US915 | Max ERP - 22 |
RU864 | - |
#define TX_POWER_12 12 |
Region | dBM |
---|---|
AS923 | - |
AU915 | Max EIRP - 24 |
CN470 | - |
CN779 | - |
EU433 | - |
EU868 | - |
IN865 | - |
KR920 | - |
US915 | Max ERP - 24 |
RU864 | - |
#define TX_POWER_13 13 |
Region | dBM |
---|---|
AS923 | - |
AU915 | Max EIRP - 26 |
CN470 | - |
CN779 | - |
EU433 | - |
EU868 | - |
IN865 | - |
KR920 | - |
US915 | Max ERP - 26 |
RU864 | - |
#define TX_POWER_14 14 |
Region | dBM |
---|---|
AS923 | - |
AU915 | Max EIRP - 28 |
CN470 | - |
CN779 | - |
EU433 | - |
EU868 | - |
IN865 | - |
KR920 | - |
US915 | Max ERP - 28 |
RU864 | - |
#define TX_POWER_15 15 |
RFU
enum 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 |
enum InitType_t |
Enumeration of initialization types.
enum ChannelsMask_t |
enum AlternateDrType_t |
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.
[IN] | region LoRaWAN region. |
Return | true, if the region is supported. |
PhyParam_t RegionGetPhyParam | ( | LoRaMacRegion_t | region, |
GetPhyParams_t * | getPhy | ||
) |
The function gets a value of a specific phy attribute.
[IN] | region LoRaWAN region. |
[IN] | getPhy Pointer to the function parameters. |
Returns | a structure containing the PHY parameter. |
void RegionSetBandTxDone | ( | LoRaMacRegion_t | region, |
SetBandTxDoneParams_t * | txDone | ||
) |
Updates the last TX done parameters of the current channel.
[IN] | region LoRaWAN region. |
[IN] | txDone Pointer to the function parameters. |
void RegionInitDefaults | ( | LoRaMacRegion_t | region, |
InitDefaultsParams_t * | params | ||
) |
Initializes the channels masks and the channels.
[IN] | region LoRaWAN region. |
[IN] | params Pointer to the function parameters. |
void* RegionGetNvmCtx | ( | LoRaMacRegion_t | region, |
GetNvmCtxParams_t * | params | ||
) |
Returns a pointer to the internal context and its size.
[IN] | region LoRaWAN region. |
[IN] | params Pointer to the function parameters. |
Points | to a structure where the module store its non-volatile context. |
bool RegionVerify | ( | LoRaMacRegion_t | region, |
VerifyParams_t * | verify, | ||
PhyAttribute_t | phyAttribute | ||
) |
Verifies a parameter.
[IN] | region LoRaWAN region. |
[IN] | verify Pointer to the function parameters. |
[IN] | type Sets the initialization type. |
Returns | true, if the parameter is valid. |
void RegionApplyCFList | ( | LoRaMacRegion_t | region, |
ApplyCFListParams_t * | applyCFList | ||
) |
The function parses the input buffer and sets up the channels of the CF list.
[IN] | region LoRaWAN region. |
[IN] | applyCFList Pointer to the function parameters. |
bool RegionChanMaskSet | ( | LoRaMacRegion_t | region, |
ChanMaskSetParams_t * | chanMaskSet | ||
) |
Sets a channels mask.
[IN] | region LoRaWAN region. |
[IN] | chanMaskSet Pointer to the function parameters. |
Returns | true, if the channels mask could be set. |
bool RegionRxConfig | ( | LoRaMacRegion_t | region, |
RxConfigParams_t * | rxConfig, | ||
int8_t * | datarate | ||
) |
Configuration of the RX windows.
[IN] | region LoRaWAN region. |
[IN] | rxConfig Pointer to the function parameters. |
[OUT] | datarate The datarate index which was set. |
Returns | true, if the configuration was applied successfully. |
void RegionComputeRxWindowParameters | ( | LoRaMacRegion_t | region, |
int8_t | datarate, | ||
uint8_t | minRxSymbols, | ||
uint32_t | rxError, | ||
RxConfigParams_t * | rxConfigParams | ||
) |
Computes the Rx window timeout and offset.
[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]rxConfigParams | Returns updated WindowTimeout and WindowOffset fields. |
bool RegionTxConfig | ( | LoRaMacRegion_t | region, |
TxConfigParams_t * | txConfig, | ||
int8_t * | txPower, | ||
TimerTime_t * | txTimeOnAir | ||
) |
TX configuration.
[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. |
Returns | true, if the configuration was applied successfully. |
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.
[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. |
Returns | the status of the operation, according to the LoRaMAC specification. |
uint8_t RegionRxParamSetupReq | ( | LoRaMacRegion_t | region, |
RxParamSetupReqParams_t * | rxParamSetupReq | ||
) |
The function processes a RX Parameter Setup Request.
[IN] | region LoRaWAN region. |
[IN] | rxParamSetupReq Pointer to the function parameters. |
Returns | the status of the operation, according to the LoRaMAC specification. |
uint8_t RegionNewChannelReq | ( | LoRaMacRegion_t | region, |
NewChannelReqParams_t * | newChannelReq | ||
) |
The function processes a New Channel Request.
[IN] | region LoRaWAN region. |
[IN] | newChannelReq Pointer to the function parameters. |
Returns | the status of the operation, according to the LoRaMAC specification. |
int8_t RegionTxParamSetupReq | ( | LoRaMacRegion_t | region, |
TxParamSetupReqParams_t * | txParamSetupReq | ||
) |
The function processes a TX ParamSetup Request.
[IN] | region LoRaWAN region. |
[IN] | txParamSetupReq Pointer to the function parameters. |
Returns | the 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. |
uint8_t RegionDlChannelReq | ( | LoRaMacRegion_t | region, |
DlChannelReqParams_t * | dlChannelReq | ||
) |
The function processes a DlChannel Request.
[IN] | region LoRaWAN region. |
[IN] | dlChannelReq Pointer to the function parameters. |
Returns | the status of the operation, according to the LoRaMAC specification. |
int8_t RegionAlternateDr | ( | LoRaMacRegion_t | region, |
int8_t | currentDr, | ||
AlternateDrType_t | type | ||
) |
Alternates the datarate of the channel for the join request.
[IN] | region LoRaWAN region. |
[IN] | currentDr Current datarate. |
[IN] | type Alternation type. |
Datarate | to apply. |
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.
[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. |
Function | status [1: OK, 0: Unable to find a channel on the current datarate]. |
LoRaMacStatus_t RegionChannelAdd | ( | LoRaMacRegion_t | region, |
ChannelAddParams_t * | channelAdd | ||
) |
Adds a channel.
[IN] | region LoRaWAN region. |
[IN] | channelAdd Pointer to the function parameters. |
Status | of the operation. |
bool RegionChannelsRemove | ( | LoRaMacRegion_t | region, |
ChannelRemoveParams_t * | channelRemove | ||
) |
Removes a channel.
[IN] | region LoRaWAN region. |
[IN] | channelRemove Pointer to the function parameters. |
Returns | true, if the channel was removed successfully. |
void RegionSetContinuousWave | ( | LoRaMacRegion_t | region, |
ContinuousWaveParams_t * | continuousWave | ||
) |
Sets the radio into continuous wave mode.
[IN] | region LoRaWAN region. |
[IN] | continuousWave Pointer to the function parameters. |
uint8_t RegionApplyDrOffset | ( | LoRaMacRegion_t | region, |
uint8_t | downlinkDwellTime, | ||
int8_t | dr, | ||
int8_t | drOffset | ||
) |
Computes new datarate according to the given offset.
[IN] | downlinkDwellTime Downlink dwell time configuration. 0: No limit, 1: 400ms |
[IN] | dr Current datarate |
[IN] | drOffset Offset to be applied |
newDr | Computed datarate. |
void RegionRxBeaconSetup | ( | LoRaMacRegion_t | region, |
RxBeaconSetup_t * | rxBeaconSetup, | ||
uint8_t * | outDr | ||
) |
Sets the radio into beacon reception mode.
[IN] | rxBeaconSetup Pointer to the function parameters | |
[out] | outDr | Datarate used to receive the beacon |
Version_t RegionGetVersion | ( | void | ) |
Gets the version of the regional parameters implementation.
Version | of the regional parameters. |