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.
Dependents: mDot_LoRa_Connect_ABPA_DHT22_sleep mDot_LoRa_Connect_ABPA FrostyBoySensor mDot_LoRa_Connect_ABPA_Lux ... more
Fork of libmDot-mbed5 by
Revision 26:17479e0039f6, committed 2016-08-30
- Comitter:
- Jenkins@KEILDM1.dc.multitech.prv
- Date:
- Tue Aug 30 11:48:00 2016 -0500
- Parent:
- 25:27e9d60ed709
- Child:
- 27:77283306c283
- Commit message:
- update from git revision 2.0.6-5-g26d9b3f
Changed in this revision
--- a/Lora.h Mon Aug 29 14:48:33 2016 -0500
+++ b/Lora.h Tue Aug 30 11:48:00 2016 -0500
@@ -260,7 +260,8 @@
LORA_JOIN_BACKOFF = 14,
LORA_NO_FREE_CHAN = 15,
LORA_AGGREGATED_DUTY_CYCLE = 16,
- LORA_MAX_PAYLOAD_EXCEEDED
+ LORA_MAC_COMMAND_ERROR = 17,
+ LORA_MAX_PAYLOAD_EXCEEDED = 18
};
/**
--- a/MacEvents.h Mon Aug 29 14:48:33 2016 -0500
+++ b/MacEvents.h Tue Aug 30 11:48:00 2016 -0500
@@ -39,6 +39,8 @@
virtual void RxTimeout(uint8_t slot) = 0;
virtual void RxError(uint8_t slot) = 0;
+ virtual void MissedAck(uint8_t retries);
+
virtual uint8_t MeasureBattery() = 0;
private:
--- a/Mote.h Mon Aug 29 14:48:33 2016 -0500
+++ b/Mote.h Tue Aug 30 11:48:00 2016 -0500
@@ -118,6 +118,12 @@
* @return battery level 0-255, 0 - external power, 1-254 level min-max, 255 device unable to measure battery
*/
virtual uint8_t MeasureBattery();
+
+ /**
+ * Fired when ack attempts are exhausted and RxTimeout or RxError occur
+ * @param retries number of attempts to resend the packet
+ */
+ virtual void MissedAck(uint8_t retries);
};
class Mote {
Binary file libmDot.ar has changed
--- a/mDotEvent.h Mon Aug 29 14:48:33 2016 -0500
+++ b/mDotEvent.h Tue Aug 30 11:48:00 2016 -0500
@@ -121,6 +121,7 @@
PacketReceived = false;
AckReceived = false;
PongReceived = false;
+ TxNbRetries = 0;
logDebug("mDotEvent - TxDone");
memset(&_flags, 0, sizeof(LoRaMacEventFlags));
@@ -162,6 +163,12 @@
Notify();
}
+ virtual void MissedAck(uint8_t retries) {
+ logDebug("mDotEvent - MissedAck : retries %u", retries);
+ TxNbRetries = retries;
+ _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 = 0) {
logDebug("mDotEvent - PacketRx");
RxPort = port;
@@ -189,7 +196,7 @@
_info.RxRssi = rssi;
_info.RxSnr = snr;
_info.TxAckReceived = AckReceived;
- _info.TxAckReceived = retries;
+ _info.TxNbRetries = retries;
_info.Status = LORAMAC_EVENT_INFO_STATUS_OK;
Notify();
}
