LoRaMAC  4.4.5
Documentation of the API
RegionAU915.h
Go to the documentation of this file.
1 
37 #ifndef __REGION_AU915_H__
38 #define __REGION_AU915_H__
39 
40 #ifdef __cplusplus
41 extern "C"
42 {
43 #endif
44 
45 #include "region/Region.h"
46 
50 #define AU915_MAX_NB_CHANNELS 72
51 
55 #define AU915_TX_MIN_DATARATE DR_0
56 
60 #define AU915_TX_MAX_DATARATE DR_6
61 
65 #define AU915_RX_MIN_DATARATE DR_8
66 
70 #define AU915_RX_MAX_DATARATE DR_13
71 
75 #define AU915_DEFAULT_DATARATE DR_2
76 
81 #define AU915_DWELL_LIMIT_DATARATE DR_2
82 
86 #define AU915_MIN_RX1_DR_OFFSET 0
87 
91 #define AU915_MAX_RX1_DR_OFFSET 6
92 
96 #define AU915_MIN_TX_POWER TX_POWER_14
97 
101 #define AU915_MAX_TX_POWER TX_POWER_0
102 
106 #define AU915_DEFAULT_TX_POWER TX_POWER_0
107 
111 #define AU915_DEFAULT_UPLINK_DWELL_TIME 1
112 
116 #define AU915_DEFAULT_MAX_EIRP 30.0f
117 
121 #define AU915_DEFAULT_ANTENNA_GAIN 2.15f
122 
126 #define AU915_DUTY_CYCLE_ENABLED 0
127 
131 #define AU915_MAX_RX_WINDOW 3000
132 
136 #define AU915_RX_WND_2_FREQ 923300000
137 
141 #define AU915_RX_WND_2_DR DR_8
142 
143 /*
144  * CLASS B
145  */
149 #define AU915_BEACON_CHANNEL_FREQ 923300000
150 
154 #define AU915_BEACON_CHANNEL_STEPWIDTH 600000
155 
159 #define AU915_PING_SLOT_CHANNEL_FREQ 923300000
160 
164 #define AU915_BEACON_NB_CHANNELS 8
165 
169 #define AU915_BEACON_SIZE 23
170 
174 #define AU915_RFU1_SIZE 5
175 
179 #define AU915_RFU2_SIZE 3
180 
184 #define AU915_BEACON_CHANNEL_DR DR_8
185 
189 #define AU915_BEACON_CHANNEL_BW 2
190 
194 #define AU915_PING_SLOT_CHANNEL_DR DR_8
195 
199 #define AU915_MAX_NB_BANDS 1
200 
205 #define AU915_BAND0 { 1, AU915_MAX_TX_POWER, 0, 0, 0, 0, 0 } // 100.0 %
206 
210 #define AU915_FIRST_RX1_CHANNEL ( (uint32_t) 923300000 )
211 
215 #define AU915_LAST_RX1_CHANNEL ( (uint32_t) 927500000 )
216 
220 #define AU915_STEPWIDTH_RX1_CHANNEL ( (uint32_t) 600000 )
221 
225 static const uint8_t DataratesAU915[] = { 12, 11, 10, 9, 8, 7, 8, 0, 12, 11, 10, 9, 8, 7, 0, 0 };
226 
230 static const uint32_t BandwidthsAU915[] = { 125000, 125000, 125000, 125000, 125000, 125000, 500000, 0, 500000, 500000, 500000, 500000, 500000, 500000, 0, 0 };
231 
235 static const int8_t DatarateOffsetsAU915[7][6] =
236 {
237  { DR_8 , DR_8 , DR_8 , DR_8 , DR_8 , DR_8 }, // DR_0
238  { DR_9 , DR_8 , DR_8 , DR_8 , DR_8 , DR_8 }, // DR_1
239  { DR_10, DR_9 , DR_8 , DR_8 , DR_8 , DR_8 }, // DR_2
240  { DR_11, DR_10, DR_9 , DR_8 , DR_8 , DR_8 }, // DR_3
241  { DR_12, DR_11, DR_10, DR_9 , DR_8 , DR_8 }, // DR_4
242  { DR_13, DR_12, DR_11, DR_10, DR_9 , DR_8 }, // DR_5
243  { DR_13, DR_13, DR_12, DR_11, DR_10, DR_9 }, // DR_6
244 };
245 
250 static const uint8_t MaxPayloadOfDatarateDwell0AU915[] = { 51, 51, 51, 115, 242, 242, 242, 0, 53, 129, 242, 242, 242, 242 };
251 
256 static const uint8_t MaxPayloadOfDatarateDwell1AU915[] = { 0, 0, 11, 53, 125, 242, 242, 0, 53, 129, 242, 242, 242, 242 };
257 
266 
273 
280 
288 void* RegionAU915GetNvmCtx( GetNvmCtxParams_t* params );
289 
299 bool RegionAU915Verify( VerifyParams_t* verify, PhyAttribute_t phyAttribute );
300 
307 void RegionAU915ApplyCFList( ApplyCFListParams_t* applyCFList );
308 
316 bool RegionAU915ChanMaskSet( ChanMaskSetParams_t* chanMaskSet );
317 
331 void RegionAU915ComputeRxWindowParameters( int8_t datarate, uint8_t minRxSymbols, uint32_t rxError, RxConfigParams_t *rxConfigParams );
332 
342 bool RegionAU915RxConfig( RxConfigParams_t* rxConfig, int8_t* datarate );
343 
355 bool RegionAU915TxConfig( TxConfigParams_t* txConfig, int8_t* txPower, TimerTime_t* txTimeOnAir );
356 
364 uint8_t RegionAU915LinkAdrReq( LinkAdrReqParams_t* linkAdrReq, int8_t* drOut, int8_t* txPowOut, uint8_t* nbRepOut, uint8_t* nbBytesParsed );
365 
373 uint8_t RegionAU915RxParamSetupReq( RxParamSetupReqParams_t* rxParamSetupReq );
374 
382 uint8_t RegionAU915NewChannelReq( NewChannelReqParams_t* newChannelReq );
383 
393 int8_t RegionAU915TxParamSetupReq( TxParamSetupReqParams_t* txParamSetupReq );
394 
402 uint8_t RegionAU915DlChannelReq( DlChannelReqParams_t* dlChannelReq );
403 
411 int8_t RegionAU915AlternateDr( int8_t currentDr, AlternateDrType_t type );
412 
425 LoRaMacStatus_t RegionAU915NextChannel( NextChanParams_t* nextChanParams, uint8_t* channel, TimerTime_t* time, TimerTime_t* aggregatedTimeOff );
426 
435 
443 bool RegionAU915ChannelsRemove( ChannelRemoveParams_t* channelRemove );
444 
451 
463 uint8_t RegionAU915ApplyDrOffset( uint8_t downlinkDwellTime, int8_t dr, int8_t drOffset );
464 
470  void RegionAU915RxBeaconSetup( RxBeaconSetup_t* rxBeaconSetup, uint8_t* outDr );
471 
474 #ifdef __cplusplus
475 }
476 #endif
477 
478 #endif // __REGION_AU915_H__
AlternateDrType_t
AlternateDrType_t
Definition: Region.h:1264
RegionAU915ChannelsRemove
bool RegionAU915ChannelsRemove(ChannelRemoveParams_t *channelRemove)
Removes a channel.
Region.h
Region implementation.
GetPhyParams_t
Definition: Region.h:921
DR_8
#define DR_8
Definition: Region.h:223
LoRaMacStatus_t
LoRaMacStatus_t
Definition: LoRaMac.h:2153
ChanMaskSetParams_t
Definition: Region.h:1064
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.
ContinuousWaveParams_t
Definition: Region.h:1344
NextChanParams_t
Definition: Region.h:1279
RxBeaconSetup_t
Definition: Region.h:1375
RegionAU915ComputeRxWindowParameters
void RegionAU915ComputeRxWindowParameters(int8_t datarate, uint8_t minRxSymbols, uint32_t rxError, RxConfigParams_t *rxConfigParams)
RegionAU915DlChannelReq
uint8_t RegionAU915DlChannelReq(DlChannelReqParams_t *dlChannelReq)
The function processes a DlChannel Request.
RegionAU915GetNvmCtx
void * RegionAU915GetNvmCtx(GetNvmCtxParams_t *params)
Returns a pointer to the internal context and its size.
RegionAU915InitDefaults
void RegionAU915InitDefaults(InitDefaultsParams_t *params)
Initializes the channels masks and the channels.
DR_13
#define DR_13
Definition: Region.h:303
NewChannelReqParams_t
Definition: Region.h:1215
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.
TxParamSetupReqParams_t
Definition: Region.h:1230
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:239
PhyAttribute_t
PhyAttribute_t
Definition: Region.h:589
GetNvmCtxParams_t
Definition: Region.h:1000
DR_10
#define DR_10
Definition: Region.h:255
DR_11
#define DR_11
Definition: Region.h:271
ChannelAddParams_t
Definition: Region.h:1318
RegionAU915AlternateDr
int8_t RegionAU915AlternateDr(int8_t currentDr, AlternateDrType_t type)
Alternates the datarate of the channel for the join request.
RegionAU915NextChannel
LoRaMacStatus_t RegionAU915NextChannel(NextChanParams_t *nextChanParams, uint8_t *channel, TimerTime_t *time, TimerTime_t *aggregatedTimeOff)
Searches and set the next random available channel.
RxConfigParams_t
Definition: Region.h:1079
RegionAU915RxBeaconSetup
void RegionAU915RxBeaconSetup(RxBeaconSetup_t *rxBeaconSetup, uint8_t *outDr)
Sets the radio into beacon reception mode.
ApplyCFListParams_t
Definition: Region.h:1049
RegionAU915SetContinuousWave
void RegionAU915SetContinuousWave(ContinuousWaveParams_t *continuousWave)
Sets the radio into continuous wave mode.
DlChannelReqParams_t
Definition: Region.h:1249
RegionAU915ChannelAdd
LoRaMacStatus_t RegionAU915ChannelAdd(ChannelAddParams_t *channelAdd)
Adds a channel.
TxConfigParams_t
Definition: Region.h:1126
RegionAU915RxParamSetupReq
uint8_t RegionAU915RxParamSetupReq(RxParamSetupReqParams_t *rxParamSetupReq)
The function processes a RX Parameter Setup Request.
RegionAU915GetPhyParam
PhyParam_t RegionAU915GetPhyParam(GetPhyParams_t *getPhy)
The function gets a value of a specific phy attribute.
RegionAU915RxConfig
bool RegionAU915RxConfig(RxConfigParams_t *rxConfig, int8_t *datarate)
Configuration of the RX windows.
InitDefaultsParams_t
Definition: Region.h:985
SetBandTxDoneParams_t
Definition: Region.h:958
RxParamSetupReqParams_t
Definition: Region.h:1196
VerifyParams_t
Definition: Region.h:1012
PhyParam_t
Definition: Region.h:890
RegionAU915Verify
bool RegionAU915Verify(VerifyParams_t *verify, PhyAttribute_t phyAttribute)
Verifies a parameter.
DR_12
#define DR_12
Definition: Region.h:287
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.
ChannelRemoveParams_t
Definition: Region.h:1333