Merge pull request #900 from StevenCellist/master

[LoRaWAN] Expose downlink framecounters
This commit is contained in:
Jan Gromeš 2023-12-09 16:24:53 +01:00 committed by GitHub
commit fa9054263d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 0 deletions

View file

@ -299,6 +299,9 @@ uplink KEYWORD2
downlink KEYWORD2 downlink KEYWORD2
sendReceive KEYWORD2 sendReceive KEYWORD2
setDeviceStatus KEYWORD2 setDeviceStatus KEYWORD2
getFcntUp KEYWORD2
getNFcntDown KEYWORD2
getAFcntDown KEYWORD2
setDatarate KEYWORD2 setDatarate KEYWORD2
setADR KEYWORD2 setADR KEYWORD2
setTxPower KEYWORD2 setTxPower KEYWORD2

View file

@ -1335,6 +1335,14 @@ uint32_t LoRaWANNode::getFcntUp() {
return(this->fcntUp); return(this->fcntUp);
} }
uint32_t LoRaWANNode::getNFcntDown() {
return(this->nFcntDown);
}
uint32_t LoRaWANNode::getAFcntDown() {
return(this->aFcntDown);
}
uint32_t LoRaWANNode::generateMIC(uint8_t* msg, size_t len, uint8_t* key) { uint32_t LoRaWANNode::generateMIC(uint8_t* msg, size_t len, uint8_t* key) {
if((msg == NULL) || (len == 0)) { if((msg == NULL) || (len == 0)) {
return(0); return(0);

View file

@ -527,6 +527,12 @@ class LoRaWANNode {
/*! \brief Returns the last uplink's frame counter */ /*! \brief Returns the last uplink's frame counter */
uint32_t getFcntUp(); uint32_t getFcntUp();
/*! \brief Returns the last network downlink's frame counter */
uint32_t getNFcntDown();
/*! \brief Returns the last application downlink's frame counter */
uint32_t getAFcntDown();
/*! /*!
\brief Set uplink datarate. This should not be used when ADR is enabled. \brief Set uplink datarate. This should not be used when ADR is enabled.
\param dr Datarate to use for uplinks. \param dr Datarate to use for uplinks.