From f933b19a6fadc89b5ea8907b0a469f7bbaf2719f Mon Sep 17 00:00:00 2001
From: StevenCellist <47155822+StevenCellist@users.noreply.github.com>
Date: Thu, 30 Jan 2025 21:46:30 +0000
Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20=20@=2027653?=
=?UTF-8?q?e1cf7292d643e996028c1a40931e7867143=20=F0=9F=9A=80?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
_lo_ra_w_a_n_8h_source.html | 263 ++++++++++++++++++------------------
1 file changed, 132 insertions(+), 131 deletions(-)
diff --git a/_lo_ra_w_a_n_8h_source.html b/_lo_ra_w_a_n_8h_source.html
index 0f3dc701..da23a610 100644
--- a/_lo_ra_w_a_n_8h_source.html
+++ b/_lo_ra_w_a_n_8h_source.html
@@ -810,155 +810,156 @@ $(document).ready(function(){initNavTree('_lo_ra_w_a_n_8h_source.html',''); init
- 1033 int16_t getMacLen(uint8_t cid, uint8_t* len, uint8_t dir,
bool inclusive =
false);
-
-
-
-
- 1038 bool isPersistentMacCommand(uint8_t cid, uint8_t dir);
-
-
- 1041 int16_t pushMacCommand(uint8_t cid,
const uint8_t* cOcts, uint8_t* out, uint8_t* lenOut, uint8_t dir);
-
-
- 1044 int16_t getMacPayload(uint8_t cid,
const uint8_t* in, uint8_t lenIn, uint8_t* out, uint8_t dir);
-
-
- 1047 int16_t deleteMacCommand(uint8_t cid, uint8_t* inOut, uint8_t* lenInOut, uint8_t dir);
-
-
- 1050 void clearMacCommands(uint8_t* inOut, uint8_t* lenInOut, uint8_t dir);
-
-
- 1053 int16_t setPhyProperties(
const LoRaWANChannel_t* chnl, uint8_t dir, int8_t pwr,
size_t pre = 0);
-
-
- 1056 bool csmaChannelClear(uint8_t difs, uint8_t numBackoff);
-
-
- 1059 bool cadChannelClear();
-
-
- 1062 void getChannelPlanMask(uint64_t* chMaskGrp0123, uint32_t* chMaskGrp45);
-
-
-
-
- 1067 void selectChannelPlanDyn();
-
-
-
- 1071 void selectChannelPlanFix();
-
-
-
- 1075 uint8_t getAvailableChannels(uint16_t* mask);
-
-
- 1078 void setAvailableChannels(uint16_t mask);
-
-
- 1081 int16_t selectChannels();
-
-
- 1084 bool applyChannelMask(uint64_t chMaskGrp0123, uint32_t chMaskGrp45);
-
- 1086#if RADIOLIB_DEBUG_PROTOCOL
-
- 1088 void printChannels();
-
-
-
- 1092 uint32_t generateMIC(
const uint8_t* msg,
size_t len, uint8_t* key);
-
-
-
- 1096 bool verifyMIC(uint8_t* msg,
size_t len, uint8_t* key);
-
-
- 1099 int16_t findDataRate(uint8_t dr,
DataRate_t* dataRate);
-
-
- 1102 void processAES(
const uint8_t* in,
size_t len, uint8_t* key, uint8_t* out, uint32_t fCnt, uint8_t dir, uint8_t ctrId,
bool counter);
-
-
- 1105 static uint16_t checkSum16(
const uint8_t *key, uint16_t keyLen);
-
-
- 1108 static int16_t checkBufferCommon(
const uint8_t *buffer, uint16_t size);
-
-
- 1111 template<
typename T>
- 1112 static T ntoh(
const uint8_t* buff,
size_t size = 0);
-
-
- 1115 template<
typename T>
- 1116 static void hton(uint8_t* buff, T val,
size_t size = 0);
-
+
+ 1034 virtual int16_t getMacLen(uint8_t cid, uint8_t* len, uint8_t dir,
bool inclusive =
false, uint8_t* payload = NULL);
+
+
+
+
+ 1039 bool isPersistentMacCommand(uint8_t cid, uint8_t dir);
+
+
+ 1042 int16_t pushMacCommand(uint8_t cid,
const uint8_t* cOcts, uint8_t* out, uint8_t* lenOut, uint8_t dir);
+
+
+ 1045 int16_t getMacPayload(uint8_t cid,
const uint8_t* in, uint8_t lenIn, uint8_t* out, uint8_t dir);
+
+
+ 1048 int16_t deleteMacCommand(uint8_t cid, uint8_t* inOut, uint8_t* lenInOut, uint8_t dir);
+
+
+ 1051 void clearMacCommands(uint8_t* inOut, uint8_t* lenInOut, uint8_t dir);
+
+
+ 1054 int16_t setPhyProperties(
const LoRaWANChannel_t* chnl, uint8_t dir, int8_t pwr,
size_t pre = 0);
+
+
+ 1057 bool csmaChannelClear(uint8_t difs, uint8_t numBackoff);
+
+
+ 1060 bool cadChannelClear();
+
+
+ 1063 void getChannelPlanMask(uint64_t* chMaskGrp0123, uint32_t* chMaskGrp45);
+
+
+
+
+ 1068 void selectChannelPlanDyn();
+
+
+
+ 1072 void selectChannelPlanFix();
+
+
+
+ 1076 uint8_t getAvailableChannels(uint16_t* mask);
+
+
+ 1079 void setAvailableChannels(uint16_t mask);
+
+
+ 1082 int16_t selectChannels();
+
+
+ 1085 bool applyChannelMask(uint64_t chMaskGrp0123, uint32_t chMaskGrp45);
+
+ 1087#if RADIOLIB_DEBUG_PROTOCOL
+
+ 1089 void printChannels();
+
+
+
+ 1093 uint32_t generateMIC(
const uint8_t* msg,
size_t len, uint8_t* key);
+
+
+
+ 1097 bool verifyMIC(uint8_t* msg,
size_t len, uint8_t* key);
+
+
+ 1100 int16_t findDataRate(uint8_t dr,
DataRate_t* dataRate);
+
+
+ 1103 void processAES(
const uint8_t* in,
size_t len, uint8_t* key, uint8_t* out, uint32_t fCnt, uint8_t dir, uint8_t ctrId,
bool counter);
+
+
+ 1106 static uint16_t checkSum16(
const uint8_t *key, uint16_t keyLen);
+
+
+ 1109 static int16_t checkBufferCommon(
const uint8_t *buffer, uint16_t size);
+
+
+ 1112 template<
typename T>
+ 1113 static T ntoh(
const uint8_t* buff,
size_t size = 0);
+
+
+ 1116 template<
typename T>
+ 1117 static void hton(uint8_t* buff, T val,
size_t size = 0);
+
-
-
- 1120T LoRaWANNode::ntoh(
const uint8_t* buff,
size_t size) {
- 1121 const uint8_t* buffPtr = buff;
- 1122 size_t targetSize =
sizeof(T);
-
-
-
-
- 1127 for(
size_t i = 0; i < targetSize; i++) {
- 1128 res |= (uint32_t)(*(buffPtr++)) << 8*i;
-
-
-
-
-
- 1134void LoRaWANNode::hton(uint8_t* buff, T val,
size_t size) {
- 1135 uint8_t* buffPtr = buff;
- 1136 size_t targetSize =
sizeof(T);
-
-
-
- 1140 for(
size_t i = 0; i < targetSize; i++) {
- 1141 *(buffPtr++) = val >> 8*i;
-
-
-
-
+
+
+ 1121T LoRaWANNode::ntoh(
const uint8_t* buff,
size_t size) {
+ 1122 const uint8_t* buffPtr = buff;
+ 1123 size_t targetSize =
sizeof(T);
+
+
+
+
+ 1128 for(
size_t i = 0; i < targetSize; i++) {
+ 1129 res |= (uint32_t)(*(buffPtr++)) << 8*i;
+
+
+
+
+
+ 1135void LoRaWANNode::hton(uint8_t* buff, T val,
size_t size) {
+ 1136 uint8_t* buffPtr = buff;
+ 1137 size_t targetSize =
sizeof(T);
+
+
+
+ 1141 for(
size_t i = 0; i < targetSize; i++) {
+ 1142 *(buffPtr++) = val >> 8*i;
+
+
+
+
LoRaWAN-compatible node (class A device).
Definition LoRaWAN.h:524
void clearSession()
Clear an active session, so that the device will have to rejoin the network.
Definition LoRaWAN.cpp:278
virtual int16_t sendReceive(const char *strUp, uint8_t fPort, bool isConfirmed=false, LoRaWANEvent_t *eventUp=NULL, LoRaWANEvent_t *eventDown=NULL)
Send a message to the server and wait for a downlink during Rx1 and/or Rx2 window.
Definition LoRaWAN.cpp:43
-int16_t setDatarate(uint8_t drUp)
Set uplink datarate. This should not be used when ADR is enabled.
Definition LoRaWAN.cpp:2619
-void scheduleTransmission(RadioLibTime_t tUplink)
Set the exact time a transmission should occur. Note: this is the internal clock time....
Definition LoRaWAN.cpp:2752
+int16_t setDatarate(uint8_t drUp)
Set uplink datarate. This should not be used when ADR is enabled.
Definition LoRaWAN.cpp:2624
+void scheduleTransmission(RadioLibTime_t tUplink)
Set the exact time a transmission should occur. Note: this is the internal clock time....
Definition LoRaWAN.cpp:2757
RadioLibTime_t scanGuard
Rx window padding in milliseconds according to the spec, the Rx window must be at least enough time t...
Definition LoRaWAN.h:853
-void setCSMA(bool csmaEnabled, uint8_t maxChanges=4, uint8_t backoffMax=0, uint8_t difsSlots=2)
Configures CSMA for LoRaWAN as per TR013, LoRa Alliance.
Definition LoRaWAN.cpp:2734
-void setDutyCycle(bool enable=true, RadioLibTime_t msPerHour=0)
Toggle adherence to dutyCycle limits to on or off.
Definition LoRaWAN.cpp:2709
+void setCSMA(bool csmaEnabled, uint8_t maxChanges=4, uint8_t backoffMax=0, uint8_t difsSlots=2)
Configures CSMA for LoRaWAN as per TR013, LoRa Alliance.
Definition LoRaWAN.cpp:2739
+void setDutyCycle(bool enable=true, RadioLibTime_t msPerHour=0)
Toggle adherence to dutyCycle limits to on or off.
Definition LoRaWAN.cpp:2714
int16_t beginABP(uint32_t addr, const uint8_t *fNwkSIntKey, const uint8_t *sNwkSIntKey, const uint8_t *nwkSEncKey, const uint8_t *appSKey)
Set the device credentials and activation configuration.
Definition LoRaWAN.cpp:614
-RadioLibTime_t timeUntilUplink()
Returns time in milliseconds until next uplink is available under dutyCycle limits.
Definition LoRaWAN.cpp:3260
-void setDeviceStatus(uint8_t battLevel)
Set device status.
Definition LoRaWAN.cpp:2748
-RadioLibTime_t dutyCycleInterval(RadioLibTime_t msPerHour, RadioLibTime_t airtime)
Calculate the minimum interval to adhere to a certain dutyCycle. This interval is based on the ToA of...
Definition LoRaWAN.cpp:3250
-void setDwellTime(bool enable, RadioLibTime_t msPerUplink=0)
Set or disable uplink dwell time limitation; enabled by default if mandatory.
Definition LoRaWAN.cpp:2721
-uint32_t getAFCntDown()
Returns the last application downlink's frame counter; also 0 if no application downlink occured yet.
Definition LoRaWAN.cpp:2768
-RadioLibTime_t getLastToA()
Get the Time-on-air of the last uplink message (in milliseconds).
Definition LoRaWAN.cpp:2781
+RadioLibTime_t timeUntilUplink()
Returns time in milliseconds until next uplink is available under dutyCycle limits.
Definition LoRaWAN.cpp:3265
+void setDeviceStatus(uint8_t battLevel)
Set device status.
Definition LoRaWAN.cpp:2753
+RadioLibTime_t dutyCycleInterval(RadioLibTime_t msPerHour, RadioLibTime_t airtime)
Calculate the minimum interval to adhere to a certain dutyCycle. This interval is based on the ToA of...
Definition LoRaWAN.cpp:3255
+void setDwellTime(bool enable, RadioLibTime_t msPerUplink=0)
Set or disable uplink dwell time limitation; enabled by default if mandatory.
Definition LoRaWAN.cpp:2726
+uint32_t getAFCntDown()
Returns the last application downlink's frame counter; also 0 if no application downlink occured yet.
Definition LoRaWAN.cpp:2773
+RadioLibTime_t getLastToA()
Get the Time-on-air of the last uplink message (in milliseconds).
Definition LoRaWAN.cpp:2786
virtual int16_t activateABP(uint8_t initialDr=RADIOLIB_LORAWAN_DATA_RATE_UNUSED)
Join network by restoring ABP session or performing over-the-air activation. In this procedure,...
Definition LoRaWAN.cpp:959
bool TS009
TS009 Protocol Specification Verification switch (allows FPort 224 and cuts off uplink payload instea...
Definition LoRaWAN.h:839
uint8_t * getBufferNonces()
Returns the pointer to the internal buffer that holds the LW base parameters.
Definition LoRaWAN.cpp:227
uint8_t * getBufferSession()
Returns the pointer to the internal buffer that holds the LW session parameters.
Definition LoRaWAN.cpp:428
bool isActivated()
Whether there is an ongoing session active.
Definition LoRaWAN.cpp:1049
-int16_t setTxPower(int8_t txPower)
Configure TX power of the radio module.
Definition LoRaWAN.cpp:2652
+int16_t setTxPower(int8_t txPower)
Configure TX power of the radio module.
Definition LoRaWAN.cpp:2657
int16_t getMacDeviceTimeAns(uint32_t *gpsEpoch, uint8_t *fraction, bool returnUnix=true)
Returns the network time after requesting a DeviceTime MAC command. Returns 'true' if a network respo...
Definition LoRaWAN.cpp:2470
-uint32_t getNFCntDown()
Returns the last network downlink's frame counter; also 0 if no network downlink occured yet.
Definition LoRaWAN.cpp:2764
+uint32_t getNFCntDown()
Returns the last network downlink's frame counter; also 0 if no network downlink occured yet.
Definition LoRaWAN.cpp:2769
int16_t beginOTAA(uint64_t joinEUI, uint64_t devEUI, const uint8_t *nwkKey, const uint8_t *appKey)
Set the device credentials and activation configuration.
Definition LoRaWAN.cpp:585
-uint8_t getMaxPayloadLen()
Returns the maximum allowed uplink payload size given the current MAC state. Most importantly,...
Definition LoRaWAN.cpp:3269
+uint8_t getMaxPayloadLen()
Returns the maximum allowed uplink payload size given the current MAC state. Most importantly,...
Definition LoRaWAN.cpp:3274
virtual int16_t activateOTAA(uint8_t initialDr=RADIOLIB_LORAWAN_DATA_RATE_UNUSED, LoRaWANJoinEvent_t *joinEvent=NULL)
Join network by restoring OTAA session or performing over-the-air activation. By this procedure,...
Definition LoRaWAN.cpp:869
-uint32_t getFCntUp()
Returns the last uplink's frame counter; also 0 if no uplink occured yet.
Definition LoRaWAN.cpp:2757
+uint32_t getFCntUp()
Returns the last uplink's frame counter; also 0 if no uplink occured yet.
Definition LoRaWAN.cpp:2762
int16_t setBufferNonces(const uint8_t *persistentBuffer)
Fill the internal buffer that holds the LW base parameters with a supplied buffer.
Definition LoRaWAN.cpp:242
-int16_t setRx2Dr(uint8_t dr)
Configure the Rx2 datarate for ABP mode. This should not be needed for LoRaWAN 1.1 as it is configure...
Definition LoRaWAN.cpp:2678
+int16_t setRx2Dr(uint8_t dr)
Configure the Rx2 datarate for ABP mode. This should not be needed for LoRaWAN 1.1 as it is configure...
Definition LoRaWAN.cpp:2683
int16_t sendMacCommandReq(uint8_t cid)
Add a MAC command to the uplink queue. Only LinkCheck and DeviceTime are available to the user....
Definition LoRaWAN.cpp:2435
int16_t getMacLinkCheckAns(uint8_t *margin, uint8_t *gwCnt)
Returns the quality of connectivity after requesting a LinkCheck MAC command. Returns 'true' if a net...
Definition LoRaWAN.cpp:2459
-void setADR(bool enable=true)
Toggle ADR to on or off.
Definition LoRaWAN.cpp:2705
+void setADR(bool enable=true)
Toggle ADR to on or off.
Definition LoRaWAN.cpp:2710
int16_t setBufferSession(const uint8_t *persistentBuffer)
Fill the internal buffer that holds the LW session parameters with a supplied buffer.
Definition LoRaWAN.cpp:460
-uint32_t getDevAddr()
Returns the DevAddr of the device, regardless of OTAA or ABP mode.
Definition LoRaWAN.cpp:2777
-void resetFCntDown()
Reset the downlink frame counters (application and network) This is unsafe and can possibly allow rep...
Definition LoRaWAN.cpp:2772
+uint32_t getDevAddr()
Returns the DevAddr of the device, regardless of OTAA or ABP mode.
Definition LoRaWAN.cpp:2782
+void resetFCntDown()
Reset the downlink frame counters (application and network) This is unsafe and can possibly allow rep...
Definition LoRaWAN.cpp:2777
Provides common interface for protocols that run on LoRa/FSK modules, such as RTTY or LoRaWAN....
Definition PhysicalLayer.h:151
unsigned long RadioLibTime_t
Type used for durations in RadioLib.
Definition TypeDef.h:642
Structure to save information about LoRaWAN band.
Definition LoRaWAN.h:369