LoRaMAC  4.6.0
Documentation of the API
RegionCN470B20.h
Go to the documentation of this file.
1 
33 #ifndef __REGION_CN470_B20_H__
34 #define __REGION_CN470_B20_H__
35 
36 #ifdef __cplusplus
37 extern "C"
38 {
39 #endif
40 
41 #include "region/Region.h"
42 
47 #define CN470_B20_CHANNELS_MASK_SIZE 4
48 
53 #define CN470_B20_JOIN_ACCEPT_LIST_SIZE 4
54 
60 #define CN470_B20_BEACON_NB_CHANNELS 1
61 
67 #define CN470_B20_PING_SLOT_NB_CHANNELS 32
68 
73 #define CN470_B20_FIRST_RX1_CHANNEL 476900000
74 
79 #define CN470_B20_LAST_RX1_CHANNEL 483100000
80 
86 #define CN470_B20_STEPWIDTH_RX1_CHANNEL 200000
87 
92 #define CN470_B20_FIRST_RX2_CHANNEL 496900000
93 
98 #define CN470_B20_LAST_RX2_CHANNEL 503100000
99 
105 #define CN470_B20_STEPWIDTH_RX2_CHANNEL 200000
106 
111 #define CN470_B20_FIRST_TX1_CHANNEL CN470_B20_FIRST_RX1_CHANNEL
112 
117 #define CN470_B20_LAST_TX1_CHANNEL CN470_B20_LAST_RX1_CHANNEL
118 
124 #define CN470_B20_STEPWIDTH_TX1_CHANNEL CN470_B20_STEPWIDTH_RX1_CHANNEL
125 
130 #define CN470_B20_FIRST_TX2_CHANNEL CN470_B20_FIRST_RX2_CHANNEL
131 
136 #define CN470_B20_LAST_TX2_CHANNEL CN470_B20_LAST_RX2_CHANNEL
137 
143 #define CN470_B20_STEPWIDTH_TX2_CHANNEL CN470_B20_STEPWIDTH_RX2_CHANNEL
144 
150 #define CN470_B20_RX_WND_2_FREQ_ABP 498300000
151 
157 #define CN470_B20_RX_WND_2_FREQ_OTAA { 478300000, 498300000 }
158 
170 uint32_t RegionCN470B20GetDownlinkFrequency( uint8_t channel, uint8_t joinChannelIndex, bool isPingSlot );
171 
180 uint8_t RegionCN470B20GetBeaconChannelOffset( uint8_t joinChannelIndex );
181 
196 uint8_t RegionCN470B20LinkAdrChMaskUpdate( uint16_t* channelsMask, uint8_t chMaskCntl,
197  uint16_t chanMask, ChannelParams_t* channels );
198 
207 bool RegionCN470B20VerifyRfFreq( uint32_t frequency );
208 
216 
223 void RegionCN470B20InitializeChannelsMask( uint16_t* channelsDefaultMask );
224 
233 uint32_t RegionCN470B20GetRx1Frequency( uint8_t channel );
234 
245 uint32_t RegionCN470B20GetRx2Frequency( uint8_t joinChannelIndex, bool isOtaaDevice );
246 
249 #ifdef __cplusplus
250 }
251 #endif
252 
253 #endif // __REGION_CN470_B20_H__
Region.h
Region implementation.
RegionCN470B20GetDownlinkFrequency
uint32_t RegionCN470B20GetDownlinkFrequency(uint8_t channel, uint8_t joinChannelIndex, bool isPingSlot)
Calculation of the beacon frequency.
RegionCN470B20InitializeChannelsMask
void RegionCN470B20InitializeChannelsMask(uint16_t *channelsDefaultMask)
Initializes the channels default mask for the Channel plan type B, 20MHz.
RegionCN470B20LinkAdrChMaskUpdate
uint8_t RegionCN470B20LinkAdrChMaskUpdate(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 B,...
ChannelParams_t
Definition: LoRaMacTypes.h:1220
RegionCN470B20GetBeaconChannelOffset
uint8_t RegionCN470B20GetBeaconChannelOffset(uint8_t joinChannelIndex)
Performs the update of the channelsMask based on the input parameters for the Channel plan type B,...
RegionCN470B20InitializeChannels
void RegionCN470B20InitializeChannels(ChannelParams_t *channels)
Initializes all channels, datarates, frequencies and bands for the Channel plan type B,...
RegionCN470B20GetRx1Frequency
uint32_t RegionCN470B20GetRx1Frequency(uint8_t channel)
Computes the frequency for the RX1 window for the Channel plan type B, 20MHz.
RegionCN470B20VerifyRfFreq
bool RegionCN470B20VerifyRfFreq(uint32_t frequency)
Verifies if the frequency provided is valid for the Channel plan type B, 20MHz.
RegionCN470B20GetRx2Frequency
uint32_t RegionCN470B20GetRx2Frequency(uint8_t joinChannelIndex, bool isOtaaDevice)
Computes the frequency for the RX2 window for the Channel plan type B, 20MHz.