LoRaMAC  4.4.6
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 5
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 
290 bool RegionAU915Verify( VerifyParams_t* verify, PhyAttribute_t phyAttribute );
291 
298 void RegionAU915ApplyCFList( ApplyCFListParams_t* applyCFList );
299 
307 bool RegionAU915ChanMaskSet( ChanMaskSetParams_t* chanMaskSet );
308 
322 void RegionAU915ComputeRxWindowParameters( int8_t datarate, uint8_t minRxSymbols, uint32_t rxError, RxConfigParams_t *rxConfigParams );
323 
333 bool RegionAU915RxConfig( RxConfigParams_t* rxConfig, int8_t* datarate );
334 
346 bool RegionAU915TxConfig( TxConfigParams_t* txConfig, int8_t* txPower, TimerTime_t* txTimeOnAir );
347 
355 uint8_t RegionAU915LinkAdrReq( LinkAdrReqParams_t* linkAdrReq, int8_t* drOut, int8_t* txPowOut, uint8_t* nbRepOut, uint8_t* nbBytesParsed );
356 
364 uint8_t RegionAU915RxParamSetupReq( RxParamSetupReqParams_t* rxParamSetupReq );
365 
373 int8_t RegionAU915NewChannelReq( NewChannelReqParams_t* newChannelReq );
374 
384 int8_t RegionAU915TxParamSetupReq( TxParamSetupReqParams_t* txParamSetupReq );
385 
393 int8_t RegionAU915DlChannelReq( DlChannelReqParams_t* dlChannelReq );
394 
402 int8_t RegionAU915AlternateDr( int8_t currentDr, AlternateDrType_t type );
403 
416 LoRaMacStatus_t RegionAU915NextChannel( NextChanParams_t* nextChanParams, uint8_t* channel, TimerTime_t* time, TimerTime_t* aggregatedTimeOff );
417 
426 
434 bool RegionAU915ChannelsRemove( ChannelRemoveParams_t* channelRemove );
435 
442 
454 uint8_t RegionAU915ApplyDrOffset( uint8_t downlinkDwellTime, int8_t dr, int8_t drOffset );
455 
461  void RegionAU915RxBeaconSetup( RxBeaconSetup_t* rxBeaconSetup, uint8_t* outDr );
462 
465 #ifdef __cplusplus
466 }
467 #endif
468 
469 #endif // __REGION_AU915_H__
AlternateDrType_t
AlternateDrType_t
Definition: Region.h:747
RegionAU915ChannelsRemove
bool RegionAU915ChannelsRemove(ChannelRemoveParams_t *channelRemove)
Removes a channel.
Region.h
Region implementation.
DR_8
#define DR_8
Definition: LoRaMacTypes.h:205
GetPhyParams_t
Definition: Region.h:412
LoRaMacStatus_t
LoRaMacStatus_t
Definition: LoRaMac.h:2227
ChanMaskSetParams_t
Definition: Region.h:547
RegionAU915ApplyDrOffset
uint8_t RegionAU915ApplyDrOffset(uint8_t downlinkDwellTime, int8_t dr, int8_t drOffset)
Computes new datarate according to the given offset.
ContinuousWaveParams_t
Definition: Region.h:827
NextChanParams_t
Definition: Region.h:762
RxBeaconSetup_t
Definition: Region.h:858
RegionAU915ComputeRxWindowParameters
void RegionAU915ComputeRxWindowParameters(int8_t datarate, uint8_t minRxSymbols, uint32_t rxError, RxConfigParams_t *rxConfigParams)
DR_13
#define DR_13
Definition: LoRaMacTypes.h:285
RegionAU915InitDefaults
void RegionAU915InitDefaults(InitDefaultsParams_t *params)
Initializes the channels masks and the channels.
RegionAU915DlChannelReq
int8_t RegionAU915DlChannelReq(DlChannelReqParams_t *dlChannelReq)
The function processes a DlChannel Request.
NewChannelReqParams_t
Definition: Region.h:698
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:713
DR_12
#define DR_12
Definition: LoRaMacTypes.h:269
RegionAU915ApplyCFList
void RegionAU915ApplyCFList(ApplyCFListParams_t *applyCFList)
The function parses the input buffer and sets up the channels of the CF list.
PhyAttribute_t
PhyAttribute_t
Definition: Region.h:84
ChannelAddParams_t
Definition: Region.h:801
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:562
RegionAU915NewChannelReq
int8_t RegionAU915NewChannelReq(NewChannelReqParams_t *newChannelReq)
The function processes a Channel Request.
RegionAU915RxBeaconSetup
void RegionAU915RxBeaconSetup(RxBeaconSetup_t *rxBeaconSetup, uint8_t *outDr)
Sets the radio into beacon reception mode.
ApplyCFListParams_t
Definition: Region.h:532
RegionAU915SetContinuousWave
void RegionAU915SetContinuousWave(ContinuousWaveParams_t *continuousWave)
Sets the radio into continuous wave mode.
DlChannelReqParams_t
Definition: Region.h:732
RegionAU915ChannelAdd
LoRaMacStatus_t RegionAU915ChannelAdd(ChannelAddParams_t *channelAdd)
Adds a channel.
TxConfigParams_t
Definition: Region.h:609
RegionAU915RxParamSetupReq
uint8_t RegionAU915RxParamSetupReq(RxParamSetupReqParams_t *rxParamSetupReq)
The function processes a RX Parameter Setup Request.
DR_9
#define DR_9
Definition: LoRaMacTypes.h:221
RegionAU915GetPhyParam
PhyParam_t RegionAU915GetPhyParam(GetPhyParams_t *getPhy)
The function gets a value of a specific phy attribute.
DR_10
#define DR_10
Definition: LoRaMacTypes.h:237
DR_11
#define DR_11
Definition: LoRaMacTypes.h:253
RegionAU915RxConfig
bool RegionAU915RxConfig(RxConfigParams_t *rxConfig, int8_t *datarate)
Configuration of the RX windows.
InitDefaultsParams_t
Definition: Region.h:476
SetBandTxDoneParams_t
Definition: Region.h:449
RxParamSetupReqParams_t
Definition: Region.h:679
VerifyParams_t
Definition: Region.h:495
PhyParam_t
Definition: Region.h:381
RegionAU915Verify
bool RegionAU915Verify(VerifyParams_t *verify, PhyAttribute_t phyAttribute)
Verifies a parameter.
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:816