Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: mDotEvent.h
- Revision:
- 137:893a90334924
- Parent:
- 136:d7d7093d4754
- Child:
- 172:7ec44396a51b
diff -r d7d7093d4754 -r 893a90334924 mDotEvent.h
--- a/mDotEvent.h Fri Feb 16 16:00:18 2018 -0600
+++ b/mDotEvent.h Thu Feb 22 11:36:24 2018 -0600
@@ -39,6 +39,7 @@
LoRaMacEventInfoStatus Status;
lora::DownlinkControl Ctrl;
bool TxAckReceived;
+ bool DuplicateRx;
uint8_t TxNbRetries;
uint8_t TxDatarate;
uint8_t RxPort;
@@ -66,6 +67,7 @@
PongRssi(0),
PongSnr(0),
AckReceived(false),
+ DuplicateRx(false),
TxNbRetries(0),
_sleep_cb(NULL)
{
@@ -130,6 +132,7 @@
LinkCheckAnsReceived = false;
PacketReceived = false;
AckReceived = false;
+ DuplicateRx = false;
PongReceived = false;
TxNbRetries = 0;
@@ -189,7 +192,7 @@
_info.TxNbRetries = retries;
}
- virtual void PacketRx(uint8_t port, uint8_t *payload, uint16_t size, int16_t rssi, int8_t snr, lora::DownlinkControl ctrl, uint8_t slot, uint8_t retries, uint32_t address) {
+ virtual void PacketRx(uint8_t port, uint8_t *payload, uint16_t size, int16_t rssi, int8_t snr, lora::DownlinkControl ctrl, uint8_t slot, uint8_t retries, uint32_t address, bool dupRx) {
logDebug("mDotEvent - PacketRx ADDR: %08x", address);
RxPort = port;
PacketReceived = true;
@@ -201,6 +204,8 @@
AckReceived = true;
}
+ DuplicateRx = dupRx;
+
if (mts::MTSLog::getLogLevel() == mts::MTSLog::TRACE_LEVEL) {
std::string packet = mts::Text::bin2hexString(RxPayload, size);
logTrace("Payload: %s", packet.c_str());
@@ -216,6 +221,7 @@
_info.RxRssi = rssi;
_info.RxSnr = snr;
_info.TxAckReceived = AckReceived;
+ _info.DuplicateRx = DuplicateRx;
_info.TxNbRetries = retries;
_info.Status = LORAMAC_EVENT_INFO_STATUS_OK;
Notify();
@@ -308,6 +314,7 @@
int16_t PongSnr;
bool AckReceived;
+ bool DuplicateRx;
uint8_t TxNbRetries;
LoRaMacEventFlags& Flags() {