LoRaMAC  4.4.5
Documentation of the API
RegionAS923.h
Go to the documentation of this file.
1 
37 #ifndef __REGION_AS923_H__
38 #define __REGION_AS923_H__
39 
40 #ifdef __cplusplus
41 extern "C"
42 {
43 #endif
44 
45 #include "region/Region.h"
46 
51 #define CHANNEL_PLAN_GROUP_AS923_1 1
52 
57 #define CHANNEL_PLAN_GROUP_AS923_2 2
58 
63 #define CHANNEL_PLAN_GROUP_AS923_3 3
64 
69 #define CHANNEL_PLAN_GROUP_AS923_1_JP 4
70 
74 #define AS923_MAX_NB_CHANNELS 16
75 
79 #define AS923_NUMB_DEFAULT_CHANNELS 2
80 
84 #define AS923_NUMB_CHANNELS_CF_LIST 5
85 
89 #define AS923_TX_MIN_DATARATE DR_0
90 
94 #define AS923_TX_MAX_DATARATE DR_7
95 
99 #define AS923_RX_MIN_DATARATE DR_0
100 
104 #define AS923_RX_MAX_DATARATE DR_7
105 
109 #define AS923_DEFAULT_DATARATE DR_2
110 
115 #define AS923_DWELL_LIMIT_DATARATE DR_2
116 
120 #define AS923_MIN_RX1_DR_OFFSET 0
121 
125 #define AS923_MAX_RX1_DR_OFFSET 7
126 
130 #define AS923_MIN_TX_POWER TX_POWER_7
131 
135 #define AS923_MAX_TX_POWER TX_POWER_0
136 
140 #define AS923_DEFAULT_TX_POWER TX_POWER_0
141 
145 #define AS923_DEFAULT_UPLINK_DWELL_TIME 1
146 
150 #define AS923_DEFAULT_MAX_EIRP 16.0f
151 
155 #define AS923_DEFAULT_ANTENNA_GAIN 2.15f
156 
160 #define AS923_DUTY_CYCLE_ENABLED 0
161 
165 #define AS923_MAX_RX_WINDOW 3000
166 
167 #if ( AS923_DEFAULT_DATARATE > DR_5 )
168 #error "A default DR higher than DR_5 may lead to connectivity loss."
169 #endif
170 
174 #define AS923_RX_WND_2_FREQ 923200000
175 
179 #define AS923_RX_WND_2_DR DR_2
180 
181 /*
182  * CLASS B
183  */
187 #define AS923_BEACON_CHANNEL_FREQ 923400000
188 
192 #define AS923_PING_SLOT_CHANNEL_FREQ 923400000
193 
197 #define AS923_BEACON_SIZE 17
198 
202 #define AS923_RFU1_SIZE 2
203 
207 #define AS923_RFU2_SIZE 0
208 
212 #define AS923_BEACON_CHANNEL_DR DR_3
213 
217 #define AS923_BEACON_CHANNEL_BW 0
218 
222 #define AS923_PING_SLOT_CHANNEL_DR DR_3
223 
227 #define AS923_MAX_NB_BANDS 1
228 
233 #define AS923_BAND0 { 100, AS923_MAX_TX_POWER, 0, 0, 0, 0, 0 } // 1.0 %
234 
239 #define AS923_LC1 { 923200000, 0, { ( ( DR_5 << 4 ) | DR_0 ) }, 0 }
240 
245 #define AS923_LC2 { 923400000, 0, { ( ( DR_5 << 4 ) | DR_0 ) }, 0 }
246 
250 #define AS923_JOIN_CHANNELS ( uint16_t )( LC( 1 ) | LC( 2 ) )
251 
255 #define AS923_RSSI_FREE_TH -80
256 
260 #define AS923_CARRIER_SENSE_TIME 5
261 
265 static const uint8_t DataratesAS923[] = { 12, 11, 10, 9, 8, 7, 7, 50 };
266 
270 static const uint32_t BandwidthsAS923[] = { 125000, 125000, 125000, 125000, 125000, 125000, 250000, 0 };
271 
276 static const uint8_t MaxPayloadOfDatarateDwell0AS923[] = { 59, 59, 123, 123, 250, 250, 250, 250 };
277 
282 static const uint8_t MaxPayloadOfDatarateDwell1AS923[] = { 0, 0, 19, 61, 133, 250, 250, 250 };
283 
288 static const uint8_t MaxPayloadOfDatarateDwell1DownAS923[] = { 0, 0, 11, 53, 126, 242, 242, 242 };
289 
293 static const int8_t EffectiveRx1DrOffsetAS923[] = { 0, 1, 2, 3, 4, 5, -1, -2 };
294 
303 
310 
317 
325 void* RegionAS923GetNvmCtx( GetNvmCtxParams_t* params );
326 
336 bool RegionAS923Verify( VerifyParams_t* verify, PhyAttribute_t phyAttribute );
337 
344 void RegionAS923ApplyCFList( ApplyCFListParams_t* applyCFList );
345 
353 bool RegionAS923ChanMaskSet( ChanMaskSetParams_t* chanMaskSet );
354 
368 void RegionAS923ComputeRxWindowParameters( int8_t datarate, uint8_t minRxSymbols, uint32_t rxError, RxConfigParams_t *rxConfigParams );
369 
379 bool RegionAS923RxConfig( RxConfigParams_t* rxConfig, int8_t* datarate );
380 
392 bool RegionAS923TxConfig( TxConfigParams_t* txConfig, int8_t* txPower, TimerTime_t* txTimeOnAir );
393 
401 uint8_t RegionAS923LinkAdrReq( LinkAdrReqParams_t* linkAdrReq, int8_t* drOut, int8_t* txPowOut, uint8_t* nbRepOut, uint8_t* nbBytesParsed );
402 
410 uint8_t RegionAS923RxParamSetupReq( RxParamSetupReqParams_t* rxParamSetupReq );
411 
419 uint8_t RegionAS923NewChannelReq( NewChannelReqParams_t* newChannelReq );
420 
430 int8_t RegionAS923TxParamSetupReq( TxParamSetupReqParams_t* txParamSetupReq );
431 
439 uint8_t RegionAS923DlChannelReq( DlChannelReqParams_t* dlChannelReq );
440 
448 int8_t RegionAS923AlternateDr( int8_t currentDr, AlternateDrType_t type );
449 
462 LoRaMacStatus_t RegionAS923NextChannel( NextChanParams_t* nextChanParams, uint8_t* channel, TimerTime_t* time, TimerTime_t* aggregatedTimeOff );
463 
472 
480 bool RegionAS923ChannelsRemove( ChannelRemoveParams_t* channelRemove );
481 
488 
500 uint8_t RegionAS923ApplyDrOffset( uint8_t downlinkDwellTime, int8_t dr, int8_t drOffset );
501 
507  void RegionAS923RxBeaconSetup( RxBeaconSetup_t* rxBeaconSetup, uint8_t* outDr );
508 
511 #ifdef __cplusplus
512 }
513 #endif
514 
515 #endif // __REGION_AS923_H__
AlternateDrType_t
AlternateDrType_t
Definition: Region.h:1264
Region.h
Region implementation.
RegionAS923DlChannelReq
uint8_t RegionAS923DlChannelReq(DlChannelReqParams_t *dlChannelReq)
The function processes a DlChannel Request.
RegionAS923RxParamSetupReq
uint8_t RegionAS923RxParamSetupReq(RxParamSetupReqParams_t *rxParamSetupReq)
The function processes a RX Parameter Setup Request.
GetPhyParams_t
Definition: Region.h:921
RegionAS923ChannelAdd
LoRaMacStatus_t RegionAS923ChannelAdd(ChannelAddParams_t *channelAdd)
Adds a channel.
LoRaMacStatus_t
LoRaMacStatus_t
Definition: LoRaMac.h:2153
RegionAS923InitDefaults
void RegionAS923InitDefaults(InitDefaultsParams_t *params)
Initializes the channels masks and the channels.
RegionAS923GetPhyParam
PhyParam_t RegionAS923GetPhyParam(GetPhyParams_t *getPhy)
The function gets a value of a specific phy attribute.
RegionAS923NewChannelReq
uint8_t RegionAS923NewChannelReq(NewChannelReqParams_t *newChannelReq)
The function processes a Channel Request.
RegionAS923ApplyCFList
void RegionAS923ApplyCFList(ApplyCFListParams_t *applyCFList)
The function parses the input buffer and sets up the channels of the CF list.
ChanMaskSetParams_t
Definition: Region.h:1064
ContinuousWaveParams_t
Definition: Region.h:1344
NextChanParams_t
Definition: Region.h:1279
RxBeaconSetup_t
Definition: Region.h:1375
RegionAS923SetBandTxDone
void RegionAS923SetBandTxDone(SetBandTxDoneParams_t *txDone)
Updates the last TX done parameters of the current channel.
RegionAS923RxBeaconSetup
void RegionAS923RxBeaconSetup(RxBeaconSetup_t *rxBeaconSetup, uint8_t *outDr)
Sets the radio into beacon reception mode.
RegionAS923Verify
bool RegionAS923Verify(VerifyParams_t *verify, PhyAttribute_t phyAttribute)
Verifies a parameter.
NewChannelReqParams_t
Definition: Region.h:1215
TxParamSetupReqParams_t
Definition: Region.h:1230
RegionAS923NextChannel
LoRaMacStatus_t RegionAS923NextChannel(NextChanParams_t *nextChanParams, uint8_t *channel, TimerTime_t *time, TimerTime_t *aggregatedTimeOff)
Searches and set the next random available channel.
RegionAS923ApplyDrOffset
uint8_t RegionAS923ApplyDrOffset(uint8_t downlinkDwellTime, int8_t dr, int8_t drOffset)
Computes new datarate according to the given offset.
PhyAttribute_t
PhyAttribute_t
Definition: Region.h:589
RegionAS923SetContinuousWave
void RegionAS923SetContinuousWave(ContinuousWaveParams_t *continuousWave)
Sets the radio into continuous wave mode.
GetNvmCtxParams_t
Definition: Region.h:1000
RegionAS923GetNvmCtx
void * RegionAS923GetNvmCtx(GetNvmCtxParams_t *params)
Returns a pointer to the internal context and its size.
ChannelAddParams_t
Definition: Region.h:1318
RegionAS923AlternateDr
int8_t RegionAS923AlternateDr(int8_t currentDr, AlternateDrType_t type)
Alternates the datarate of the channel for the join request.
RxConfigParams_t
Definition: Region.h:1079
ApplyCFListParams_t
Definition: Region.h:1049
DlChannelReqParams_t
Definition: Region.h:1249
TxConfigParams_t
Definition: Region.h:1126
RegionAS923TxParamSetupReq
int8_t RegionAS923TxParamSetupReq(TxParamSetupReqParams_t *txParamSetupReq)
The function processes a TX ParamSetup Request.
RegionAS923ChannelsRemove
bool RegionAS923ChannelsRemove(ChannelRemoveParams_t *channelRemove)
Removes a channel.
RegionAS923RxConfig
bool RegionAS923RxConfig(RxConfigParams_t *rxConfig, int8_t *datarate)
Configuration of the RX windows.
InitDefaultsParams_t
Definition: Region.h:985
SetBandTxDoneParams_t
Definition: Region.h:958
RegionAS923ComputeRxWindowParameters
void RegionAS923ComputeRxWindowParameters(int8_t datarate, uint8_t minRxSymbols, uint32_t rxError, RxConfigParams_t *rxConfigParams)
RxParamSetupReqParams_t
Definition: Region.h:1196
VerifyParams_t
Definition: Region.h:1012
PhyParam_t
Definition: Region.h:890
RegionAS923ChanMaskSet
bool RegionAS923ChanMaskSet(ChanMaskSetParams_t *chanMaskSet)
Sets a channels mask.
RegionAS923TxConfig
bool RegionAS923TxConfig(TxConfigParams_t *txConfig, int8_t *txPower, TimerTime_t *txTimeOnAir)
TX configuration.
RegionAS923LinkAdrReq
uint8_t RegionAS923LinkAdrReq(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