LoRaMAC  4.6.0
Documentation of the API
RegionCN470A20.h
Go to the documentation of this file.
1 
33 #ifndef __REGION_CN470_A20_H__
34 #define __REGION_CN470_A20_H__
35 
36 #ifdef __cplusplus
37 extern "C"
38 {
39 #endif
40 
41 #include "region/Region.h"
42 
47 #define CN470_A20_CHANNELS_MASK_SIZE 4
48 
53 #define CN470_A20_JOIN_ACCEPT_LIST_SIZE 4
54 
60 #define CN470_A20_BEACON_NB_CHANNELS 8
61 
67 #define CN470_A20_PING_SLOT_NB_CHANNELS 8
68 
73 #define CN470_A20_FIRST_RX_CHANNEL 483900000
74 
79 #define CN470_A20_LAST_RX_CHANNEL 496500000
80 
86 #define CN470_A20_STEPWIDTH_RX_CHANNEL 200000
87 
92 #define CN470_A20_FIRST_TX1_CHANNEL 470300000
93 
99 #define CN470_A20_STEPWIDTH_TX1_CHANNEL 200000
100 
105 #define CN470_A20_FIRST_TX2_CHANNEL 503500000
106 
111 #define CN470_A20_LAST_TX2_CHANNEL 509700000
112 
118 #define CN470_A20_STEPWIDTH_TX2_CHANNEL 200000
119 
125 #define CN470_A20_RX_WND_2_FREQ_ABP 486900000
126 
132 #define CN470_A20_RX_WND_2_FREQ_OTAA { 485300000, 486900000, 488500000, 490100000, \
133  491700000, 493300000, 494000000, 496500000 }
134 
146 uint32_t RegionCN470A20GetDownlinkFrequency( uint8_t channel, uint8_t joinChannelIndex, bool isPingSlot );
147 
156 uint8_t RegionCN470A20GetBeaconChannelOffset( uint8_t joinChannelIndex );
157 
172 uint8_t RegionCN470A20LinkAdrChMaskUpdate( uint16_t* channelsMask, uint8_t chMaskCntl,
173  uint16_t chanMask, ChannelParams_t* channels );
174 
183 bool RegionCN470A20VerifyRfFreq( uint32_t frequency );
184 
192 
199 void RegionCN470A20InitializeChannelsMask( uint16_t* channelsDefaultMask );
200 
209 uint32_t RegionCN470A20GetRx1Frequency( uint8_t channel );
210 
221 uint32_t RegionCN470A20GetRx2Frequency( uint8_t joinChannelIndex, bool isOtaaDevice );
222 
225 #ifdef __cplusplus
226 }
227 #endif
228 
229 #endif // __REGION_CN470_A20_H__
RegionCN470A20GetRx2Frequency
uint32_t RegionCN470A20GetRx2Frequency(uint8_t joinChannelIndex, bool isOtaaDevice)
Computes the frequency for the RX2 window for the channel plan type A, 20MHz.
Region.h
Region implementation.
RegionCN470A20InitializeChannelsMask
void RegionCN470A20InitializeChannelsMask(uint16_t *channelsDefaultMask)
Initializes the channels default mask for the channel plan type A, 20MHz.
RegionCN470A20LinkAdrChMaskUpdate
uint8_t RegionCN470A20LinkAdrChMaskUpdate(uint16_t *channelsMask, uint8_t chMaskCntl, uint16_t chanMask, ChannelParams_t *channels)
Performs the update of the channelsMask based on the input parameters for the channel plan type A,...
RegionCN470A20GetBeaconChannelOffset
uint8_t RegionCN470A20GetBeaconChannelOffset(uint8_t joinChannelIndex)
Performs the update of the channelsMask based on the input parameters for the channel plan type A,...
RegionCN470A20GetDownlinkFrequency
uint32_t RegionCN470A20GetDownlinkFrequency(uint8_t channel, uint8_t joinChannelIndex, bool isPingSlot)
Calculation of the beacon frequency.
RegionCN470A20GetRx1Frequency
uint32_t RegionCN470A20GetRx1Frequency(uint8_t channel)
Computes the frequency for the RX1 window for the channel plan type A, 20MHz.
RegionCN470A20VerifyRfFreq
bool RegionCN470A20VerifyRfFreq(uint32_t frequency)
Verifies if the frequency provided is valid for the channel plan type A, 20MHz.
ChannelParams_t
Definition: LoRaMacTypes.h:1220
RegionCN470A20InitializeChannels
void RegionCN470A20InitializeChannels(ChannelParams_t *channels)
Initializes all channels, datarates, frequencies and bands for the channel plan type A,...