| SX126x-Arduino 2.0.1

RegionAU915.h
Go to the documentation of this file.
1
35 #ifndef __REGION_AU915_H__
36 #define __REGION_AU915_H__
37
38 extern "C"
39 {
40
44 #define AU915_MAX_NB_CHANNELS 72
45
49 #define AU915_TX_MIN_DATARATE DR_0
50
54 #define AU915_TX_MAX_DATARATE DR_13
55
59 #define AU915_RX_MIN_DATARATE DR_8
60
64 #define AU915_RX_MAX_DATARATE DR_13
65
69 #define AU915_DEFAULT_DATARATE DR_2
70
74 #define AU915_MIN_RX1_DR_OFFSET 0
75
79 #define AU915_MAX_RX1_DR_OFFSET 6
80
84 #define AU915_DEFAULT_RX1_DR_OFFSET 0
85
89 #define AU915_MIN_TX_POWER TX_POWER_14
90
94 #define AU915_MAX_TX_POWER TX_POWER_0
95
99 #define AU915_DEFAULT_TX_POWER TX_POWER_0
100
104 #define AU915_DEFAULT_MAX_EIRP 30.0f
105
109 #define AU915_DEFAULT_ANTENNA_GAIN 2.15f
110
114 #define AU915_ADR_ACK_LIMIT 64
115
119 #define AU915_ADR_ACK_DELAY 32
120
124 #define AU915_DUTY_CYCLE_ENABLED 0
125
129 #define AU915_MAX_RX_WINDOW 3000
130
134 #define AU915_RECEIVE_DELAY1 1000
135
139 #define AU915_RECEIVE_DELAY2 2000
140
144 #define AU915_JOIN_ACCEPT_DELAY1 5000
145
149 #define AU915_JOIN_ACCEPT_DELAY2 6000
150
154 #define AU915_MAX_FCNT_GAP 16384
155
159 #define AU915_ACKTIMEOUT 2000
160
164 #define AU915_ACK_TIMEOUT_RND 1000
165
169 #define AU915_RX_WND_2_FREQ 923300000
170
174 #define AU915_RX_WND_2_DR DR_8
175
179 #define AU915_MAX_NB_BANDS 1
180
185 #define AU915_BAND0 \
186 { \
187 1, AU915_MAX_TX_POWER, 0, 0 \
188 } // 100.0 %
189
193 #define AU915_FIRST_RX1_CHANNEL ((uint32_t)923300000)
194
198 #define AU915_LAST_RX1_CHANNEL ((uint32_t)927500000)
199
203 #define AU915_STEPWIDTH_RX1_CHANNEL ((uint32_t)600000)
204
208 static const uint8_t DataratesAU915[] = {12, 11, 10, 9, 8, 7, 8, 0, 12, 11, 10, 9, 8, 7, 0, 0};
209
213 static const uint32_t BandwidthsAU915[] = {125000, 125000, 125000, 125000, 125000, 125000, 500000, 0, 500000, 500000, 500000, 500000, 500000, 500000, 0, 0};
214
218 static const int8_t DatarateOffsetsAU915[7][6] =
219 {
220 {DR_8, DR_8, DR_8, DR_8, DR_8, DR_8}, // DR_0
221 {DR_9, DR_8, DR_8, DR_8, DR_8, DR_8}, // DR_1
222 {DR_10, DR_9, DR_8, DR_8, DR_8, DR_8}, // DR_2
223 {DR_11, DR_10, DR_9, DR_8, DR_8, DR_8}, // DR_3
224 {DR_12, DR_11, DR_10, DR_9, DR_8, DR_8}, // DR_4
225 {DR_13, DR_12, DR_11, DR_10, DR_9, DR_8}, // DR_5
226 {DR_13, DR_13, DR_12, DR_11, DR_10, DR_9}, // DR_6
227 };
228
232 static const uint8_t MaxPayloadOfDatarateAU915[] = {51, 51, 51, 115, 242, 242, 242, 0, 53, 129, 242, 242, 242, 242};
233
237 static const uint8_t MaxPayloadOfDatarateRepeaterAU915[] = {0, 0, 11, 53, 125, 242, 242, 0, 53, 129, 242, 242, 242, 242};
238
246 PhyParam_t RegionAU915GetPhyParam(GetPhyParams_t *getPhy);
247
253 void RegionAU915SetBandTxDone(SetBandTxDoneParams_t *txDone);
254
260 void RegionAU915InitDefaults(InitType_t type);
261
271 bool RegionAU915Verify(VerifyParams_t *verify, PhyAttribute_t phyAttribute);
272
279 void RegionAU915ApplyCFList(ApplyCFListParams_t *applyCFList);
280
288 bool RegionAU915ChanMaskSet(ChanMaskSetParams_t *chanMaskSet);
289
303 bool RegionAU915AdrNext(AdrNextParams_t *adrNext, int8_t *drOut, int8_t *txPowOut, uint32_t *adrAckCounter);
304
318 void RegionAU915ComputeRxWindowParameters(int8_t datarate, uint8_t minRxSymbols, uint32_t rxError, RxConfigParams_t *rxConfigParams);
319
329 bool RegionAU915RxConfig(RxConfigParams_t *rxConfig, int8_t *datarate);
330
342 bool RegionAU915TxConfig(TxConfigParams_t *txConfig, int8_t *txPower, TimerTime_t *txTimeOnAir);
343
359 uint8_t RegionAU915LinkAdrReq(LinkAdrReqParams_t *linkAdrReq, int8_t *drOut, int8_t *txPowOut, uint8_t *nbRepOut, uint8_t *nbBytesParsed);
360
368 uint8_t RegionAU915RxParamSetupReq(RxParamSetupReqParams_t *rxParamSetupReq);
369
377 uint8_t RegionAU915NewChannelReq(NewChannelReqParams_t *newChannelReq);
378
388 int8_t RegionAU915TxParamSetupReq(TxParamSetupReqParams_t *txParamSetupReq);
389
397 uint8_t RegionAU915DlChannelReq(DlChannelReqParams_t *dlChannelReq);
398
406 int8_t RegionAU915AlternateDr(AlternateDrParams_t *alternateDr);
407
413 void RegionAU915CalcBackOff(CalcBackOffParams_t *calcBackOff);
414
429 bool RegionAU915NextChannel(NextChanParams_t *nextChanParams, uint8_t *channel, TimerTime_t *time, TimerTime_t *aggregatedTimeOff);
430
438 LoRaMacStatus_t RegionAU915ChannelAdd(ChannelAddParams_t *channelAdd);
439
447 bool RegionAU915ChannelsRemove(ChannelRemoveParams_t *channelRemove);
448
454 void RegionAU915SetContinuousWave(ContinuousWaveParams_t *continuousWave);
455
467 uint8_t RegionAU915ApplyDrOffset(uint8_t downlinkDwellTime, int8_t dr, int8_t drOffset);
468
470 };
471 #endif // __REGION_AU915_H__
RegionAU915ChannelsRemove
bool RegionAU915ChannelsRemove(ChannelRemoveParams_t *channelRemove)
Removes a channel.
RegionAU915CalcBackOff
void RegionAU915CalcBackOff(CalcBackOffParams_t *calcBackOff)
Calculates the back-off time.
sChannelRemoveParams
Definition: Region.h:1217
DR_8
#define DR_8
Definition: Region.h:236
LoRaMacStatus_t
enum eLoRaMacStatus LoRaMacStatus_t
sTxConfigParams
Definition: Region.h:999
InitType_t
enum eInitType InitType_t
sSetBandTxDoneParams
Definition: Region.h:832
sRxParamSetupReqParams
Definition: Region.h:1065
uVerifyParams
Definition: Region.h:850
sRxConfigParams
Definition: Region.h:948
sAlternateDrParams
Definition: Region.h:1133
sNewChannelReqParams
Definition: Region.h:1084
RegionAU915ApplyDrOffset
uint8_t RegionAU915ApplyDrOffset(uint8_t downlinkDwellTime, int8_t dr, int8_t drOffset)
Computes new datarate according to the given offset.
RegionAU915NewChannelReq
uint8_t RegionAU915NewChannelReq(NewChannelReqParams_t *newChannelReq)
The function processes a Channel Request.
RegionAU915ComputeRxWindowParameters
void RegionAU915ComputeRxWindowParameters(int8_t datarate, uint8_t minRxSymbols, uint32_t rxError, RxConfigParams_t *rxConfigParams)
sContinuousWaveParams
Definition: Region.h:1228
RegionAU915DlChannelReq
uint8_t RegionAU915DlChannelReq(DlChannelReqParams_t *dlChannelReq)
The function processes a DlChannel Request.
RegionAU915AlternateDr
int8_t RegionAU915AlternateDr(AlternateDrParams_t *alternateDr)
Alternates the datarate of the channel for the join request.
sAdrNextParams
Definition: Region.h:917
DatarateOffsetsAU915
static const int8_t DatarateOffsetsAU915[7][6]
Definition: RegionAU915.h:218
sCalcBackOffParams
Definition: Region.h:1144
DR_13
#define DR_13
Definition: Region.h:331
RegionAU915InitDefaults
void RegionAU915InitDefaults(InitType_t type)
Initializes the channels masks and the channels.
RegionAU915SetBandTxDone
void RegionAU915SetBandTxDone(SetBandTxDoneParams_t *txDone)
Updates the last TX done parameters of the current channel.
RegionAU915TxConfig
bool RegionAU915TxConfig(TxConfigParams_t *txConfig, int8_t *txPower, TimerTime_t *txTimeOnAir)
TX configuration.
RegionAU915ChanMaskSet
bool RegionAU915ChanMaskSet(ChanMaskSetParams_t *chanMaskSet)
Sets a channels mask.
RegionAU915TxParamSetupReq
int8_t RegionAU915TxParamSetupReq(TxParamSetupReqParams_t *txParamSetupReq)
The function processes a TX ParamSetup Request.
sApplyCFListParams
Definition: Region.h:887
sTxParamSetupReqParams
Definition: Region.h:1099
RegionAU915ApplyCFList
void RegionAU915ApplyCFList(ApplyCFListParams_t *applyCFList)
The function parses the input buffer and sets up the channels of the CF list.
DR_9
#define DR_9
Definition: Region.h:255
sChanMaskSetParams
Definition: Region.h:902
sLinkAdrReqParams
Definition: Region.h:1030
DR_10
#define DR_10
Definition: Region.h:274
DR_11
#define DR_11
Definition: Region.h:293
MaxPayloadOfDatarateRepeaterAU915
static const uint8_t MaxPayloadOfDatarateRepeaterAU915[]
Definition: RegionAU915.h:237
sNextChanParams
Definition: Region.h:1175
uPhyParam
Definition: Region.h:780
RegionAU915SetContinuousWave
void RegionAU915SetContinuousWave(ContinuousWaveParams_t *continuousWave)
Sets the radio into continuous wave mode.
MaxPayloadOfDatarateAU915
static const uint8_t MaxPayloadOfDatarateAU915[]
Definition: RegionAU915.h:232
RegionAU915ChannelAdd
LoRaMacStatus_t RegionAU915ChannelAdd(ChannelAddParams_t *channelAdd)
Adds a channel.
RegionAU915RxParamSetupReq
uint8_t RegionAU915RxParamSetupReq(RxParamSetupReqParams_t *rxParamSetupReq)
The function processes a RX Parameter Setup Request.
sChannelAddParams
Definition: Region.h:1202
RegionAU915GetPhyParam
PhyParam_t RegionAU915GetPhyParam(GetPhyParams_t *getPhy)
The function gets a value of a specific phy attribute.
RegionAU915NextChannel
bool RegionAU915NextChannel(NextChanParams_t *nextChanParams, uint8_t *channel, TimerTime_t *time, TimerTime_t *aggregatedTimeOff)
Searches and set the next random available channel.
DataratesAU915
static const uint8_t DataratesAU915[]
Definition: RegionAU915.h:208
sDlChannelReqParams
Definition: Region.h:1118
sGetPhyParams
Definition: Region.h:803
RegionAU915RxConfig
bool RegionAU915RxConfig(RxConfigParams_t *rxConfig, int8_t *datarate)
Configuration of the RX windows.
RegionAU915AdrNext
bool RegionAU915AdrNext(AdrNextParams_t *adrNext, int8_t *drOut, int8_t *txPowOut, uint32_t *adrAckCounter)
Calculates the next datarate to set, when ADR is on or off.
BandwidthsAU915
static const uint32_t BandwidthsAU915[]
Definition: RegionAU915.h:213
RegionAU915Verify
bool RegionAU915Verify(VerifyParams_t *verify, PhyAttribute_t phyAttribute)
Verifies a parameter.
PhyAttribute_t
enum ePhyAttribute PhyAttribute_t
TimerTime_t
uint32_t TimerTime_t
Timer time variable definition.
Definition: timer.h:69
DR_12
#define DR_12
Definition: Region.h:312
RegionAU915LinkAdrReq
uint8_t RegionAU915LinkAdrReq(LinkAdrReqParams_t *linkAdrReq, int8_t *drOut, int8_t *txPowOut, uint8_t *nbRepOut, uint8_t *nbBytesParsed)
The function processes a Link ADR Request.