|
LoRaMAC
4.4.5
Documentation of the API
|
Go to the documentation of this file.
62 #include "utilities.h"
70 #define LC( channelIndex ) ( uint16_t )( 1 << ( channelIndex - 1 ) )
72 #ifndef REGION_VERSION
76 #define REGION_VERSION 0x00010003
513 #define TX_POWER_10 10
529 #define TX_POWER_11 11
545 #define TX_POWER_12 12
561 #define TX_POWER_13 13
577 #define TX_POWER_14 14
582 #define TX_POWER_15 15
589 typedef enum ePhyAttribute
831 typedef enum eInitType
856 typedef enum eChannelsMask
871 typedef struct sBeaconFormat
890 typedef union uPhyParam
921 typedef struct sGetPhyParams
958 typedef struct sSetBandTxDoneParams
985 typedef struct sInitDefaultsParams
1000 typedef struct sGetNvmCtxParams
1012 typedef union uVerifyParams
1049 typedef struct sApplyCFListParams
1064 typedef struct sChanMaskSetParams
1079 typedef struct sRxConfigParams
1126 typedef struct sTxConfigParams
1157 typedef struct sLinkAdrReqParams
1196 typedef struct sRxParamSetupReqParams
1215 typedef struct sNewChannelReqParams
1230 typedef struct sTxParamSetupReqParams
1249 typedef struct sDlChannelReqParams
1264 typedef enum eAlternateDrType
1279 typedef struct sNextChanParams
1318 typedef struct sChannelAddParams
1333 typedef struct sChannelRemoveParams
1344 typedef struct sContinuousWaveParams
1375 typedef struct sRxBeaconSetupParams
1720 #endif // __REGION_H__
AlternateDrType_t
Definition: Region.h:1264
uint8_t Size
Definition: Region.h:1058
uint32_t RxTime
Definition: Region.h:1384
BeaconFormat_t BeaconFormat
Definition: Region.h:911
bool DutyCycleEnabled
Definition: Region.h:1300
TimerTime_t LastAggrTx
Definition: Region.h:1288
SysTime_t ElapsedTimeSinceStartUp
Definition: Region.h:979
ChannelParams_t * NewChannel
Definition: Region.h:1220
LoRaMacStatus_t
Definition: LoRaMac.h:2153
int32_t WindowOffset
Definition: Region.h:1108
uint8_t CurrentNbRep
Definition: Region.h:1190
uint8_t RegionApplyDrOffset(LoRaMacRegion_t region, uint8_t downlinkDwellTime, int8_t dr, int8_t drOffset)
Computes new datarate according to the given offset.
void * RegionGetNvmCtx(LoRaMacRegion_t region, GetNvmCtxParams_t *params)
Returns a pointer to the internal context and its size.
bool RegionTxConfig(LoRaMacRegion_t region, TxConfigParams_t *txConfig, int8_t *txPower, TimerTime_t *txTimeOnAir)
TX configuration.
int8_t DrOffset
Definition: Region.h:1096
Definition: Region.h:1273
uint8_t DownlinkDwellTime
Definition: Region.h:946
Definition: LoRaMac.h:217
int8_t RegionTxParamSetupReq(LoRaMacRegion_t region, TxParamSetupReqParams_t *txParamSetupReq)
The function processes a TX ParamSetup Request.
uint16_t Timeout
Definition: Region.h:1369
Definition: Region.h:1064
int8_t Datarate
Definition: Region.h:932
int8_t CurrentTxPower
Definition: Region.h:1186
ChannelParams_t * Channels
Definition: Region.h:907
uint8_t Rfu2Size
Definition: Region.h:884
uint8_t PayloadSize
Definition: Region.h:1170
Definition: Region.h:1344
Definition: Region.h:1279
Definition: Region.h:1375
uint8_t Channel
Definition: Region.h:952
Version_t RegionGetVersion(void)
Gets the version of the regional parameters implementation.
PhyParam_t RegionGetPhyParam(LoRaMacRegion_t region, GetPhyParams_t *getPhy)
The function gets a value of a specific phy attribute.
float MaxEirp
Definition: Region.h:1143
LoRaMacRegion_t
Definition: LoRaMac.h:2268
uint8_t UplinkDwellTime
Definition: Region.h:939
bool RegionChannelsRemove(LoRaMacRegion_t region, ChannelRemoveParams_t *channelRemove)
Removes a channel.
InitType_t
Definition: Region.h:831
bool DutyCycle
Definition: Region.h:1025
LoRaMacStatus_t RegionChannelAdd(LoRaMacRegion_t region, ChannelAddParams_t *channelAdd)
Adds a channel.
Definition: Region.h:1215
uint16_t PktLen
Definition: Region.h:1151
InitType_t Type
Definition: Region.h:994
Definition: Region.h:1230
uint32_t Frequency
Definition: Region.h:1017
uint8_t ChannelId
Definition: Region.h:1254
void RegionComputeRxWindowParameters(LoRaMacRegion_t region, int8_t datarate, uint8_t minRxSymbols, uint32_t rxError, RxConfigParams_t *rxConfigParams)
uint32_t Rx1Frequency
Definition: Region.h:1258
uint8_t Rfu1Size
Definition: Region.h:880
PhyAttribute_t Attribute
Definition: Region.h:926
void RegionRxBeaconSetup(LoRaMacRegion_t region, RxBeaconSetup_t *rxBeaconSetup, uint8_t *outDr)
Sets the radio into beacon reception mode.
uint8_t RegionDlChannelReq(LoRaMacRegion_t region, DlChannelReqParams_t *dlChannelReq)
The function processes a DlChannel Request.
PhyAttribute_t
Definition: Region.h:589
bool LastTxIsJoinRequest
Definition: Region.h:1308
Version_t Version
Definition: Region.h:1162
bool RegionVerify(LoRaMacRegion_t region, VerifyParams_t *verify, PhyAttribute_t phyAttribute)
Verifies a parameter.
int8_t TxPower
Definition: Region.h:1021
bool RegionRxConfig(LoRaMacRegion_t region, RxConfigParams_t *rxConfig, int8_t *datarate)
Configuration of the RX windows.
Definition: Region.h:1000
TimerTime_t LastTxDoneTime
Definition: Region.h:971
Definition: Region.h:1029
bool RegionChanMaskSet(LoRaMacRegion_t region, ChanMaskSetParams_t *chanMaskSet)
Sets a channels mask.
void RegionInitDefaults(LoRaMacRegion_t region, InitDefaultsParams_t *params)
Initializes the channels masks and the channels.
void * NvmCtx
Definition: Region.h:990
TimerTime_t DutyCycleTimePeriod
Definition: Region.h:915
Definition: Region.h:1318
Definition: Region.h:1157
int8_t RegionAlternateDr(LoRaMacRegion_t region, int8_t currentDr, AlternateDrType_t type)
Alternates the datarate of the channel for the join request.
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.
uint32_t WindowTimeout
Definition: Region.h:1104
Definition: Region.h:1079
LoRa MAC layer implementation.
uint8_t MaxEirp
Definition: Region.h:1243
void RegionSetBandTxDone(LoRaMacRegion_t region, SetBandTxDoneParams_t *txDone)
Updates the last TX done parameters of the current channel.
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.
Definition: Region.h:1049
uint8_t BeaconSize
Definition: Region.h:876
Definition: Region.h:1249
ChannelsMask_t
Definition: Region.h:856
void RegionSetContinuousWave(LoRaMacRegion_t region, ContinuousWaveParams_t *continuousWave)
Sets the radio into continuous wave mode.
Definition: Region.h:1126
float AntennaGain
Definition: Region.h:1147
TimerTime_t AggrTimeOff
Definition: Region.h:1284
uint32_t Value
Definition: Region.h:895
uint16_t * ChannelsMask
Definition: Region.h:903
float fValue
Definition: Region.h:899
bool Joined
Definition: Region.h:967
uint16_t SymbolTimeout
Definition: Region.h:1380
uint8_t Bandwidth
Definition: Region.h:1092
uint8_t * Payload
Definition: Region.h:1054
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.
uint16_t * ChannelsMaskIn
Definition: Region.h:1069
bool RxContinuous
Definition: Region.h:1116
Definition: Region.h:1196
Definition: Region.h:1012
int8_t ChannelId
Definition: Region.h:1224
LoRaMacRxSlot_t
Definition: LoRaMac.h:259
size_t nvmCtxSize
Definition: Region.h:1005
bool AdrEnabled
Definition: Region.h:1178
uint8_t RegionNewChannelReq(LoRaMacRegion_t region, NewChannelReqParams_t *newChannelReq)
The function processes a New Channel Request.
int8_t CurrentDatarate
Definition: Region.h:1182
LoRaMacRxSlot_t RxSlot
Definition: Region.h:1120
TimerTime_t LastTxAirTime
Definition: Region.h:975
uint8_t RegionRxParamSetupReq(LoRaMacRegion_t region, RxParamSetupReqParams_t *rxParamSetupReq)
The function processes a RX Parameter Setup Request.
Region independent implementations which are common to all regions.
Definition: Region.h:1269
void RegionApplyCFList(LoRaMacRegion_t region, ApplyCFListParams_t *applyCFList)
The function parses the input buffer and sets up the channels of the CF list.
Definition: Region.h:1333
ChannelsMask_t ChannelsMaskType
Definition: Region.h:1073