MultiTech / libmDot-Custom

Fork of libmDot-custom by Jason Reiss

Information

Library has been updated to mbed 5.x

The LoRaWAN Certification test mode implementation is built-in to libmDot code. When a start test mode packet is received the library will not return until test mode has ended.

Warning

This library is currently in BETA release. Unresolved issues may be experienced. Software is provided as is with no expectation of support of bug fixes in the future. Please report issues found through the mbed website or directly to support.multitech.com.

Changing of channel plan parameters may cause the device to no longer respect local RF regulations. Please use caution and respect your local regulations.

In AT Command Firmware remove line 803.

CommandTerminal/CommandTerminal.cpp

        delete[] info->RxBuffer;

Likewise, if your application is handling events from the library asynchronously.

Creating new channel plans

Copy EU868 or US915 custom channel plan as a starting point

Import programmDot_AT_firmware_CUSTOM

AT Firmware with custom channel plan support

EU868 provides a framework for a DYNAMIC channel plan with duty-cycle limitations

US915 provides a framework for a FIXED channel plan

RADIO_POWERS are measured output in dBm for each radio tx power setting.

Additional MAC Commands can be implemented by overriding the HandleMacCommand function.

Steps

  1. Setup datarates, duty-cycle bands and channels in ChannelPlan_* constructor
  2. Modify GetJoinDatarate and CalculateJoinBackoff to change join datarates and backoff
  3. Customize HandleJoinAccept datarates
  4. Use GetRxWindow(int) to define how the device open Rx window 1 and 2
  5. GetNextChannel will pick a channel from the enabled channel at the current datarate before each TX
Committer:
jreiss
Date:
Wed Jan 18 13:35:33 2017 +0000
Revision:
25:36d92b31ad2b
Add appkey and appeui functions; Add dwelltime and maxeirp getters/setters; KR920: max DR 7; AS923: max tx power 36 and maxeirp 20 defaults

Who changed what in which revision?

UserRevisionLine numberNew contents of line
jreiss 25:36d92b31ad2b 1 #ifndef MDOT_EVENT_H
jreiss 25:36d92b31ad2b 2 #define MDOT_EVENT_H
jreiss 25:36d92b31ad2b 3
jreiss 25:36d92b31ad2b 4 #include "mDot.h"
jreiss 25:36d92b31ad2b 5 #include "MacEvents.h"
jreiss 25:36d92b31ad2b 6 #include "MTSLog.h"
jreiss 25:36d92b31ad2b 7 #include "MTSText.h"
jreiss 25:36d92b31ad2b 8
jreiss 25:36d92b31ad2b 9 typedef union {
jreiss 25:36d92b31ad2b 10 uint8_t Value;
jreiss 25:36d92b31ad2b 11 struct {
jreiss 25:36d92b31ad2b 12 uint8_t :1;
jreiss 25:36d92b31ad2b 13 uint8_t Tx :1;
jreiss 25:36d92b31ad2b 14 uint8_t Rx :1;
jreiss 25:36d92b31ad2b 15 uint8_t RxData :1;
jreiss 25:36d92b31ad2b 16 uint8_t RxSlot :2;
jreiss 25:36d92b31ad2b 17 uint8_t LinkCheck :1;
jreiss 25:36d92b31ad2b 18 uint8_t JoinAccept :1;
jreiss 25:36d92b31ad2b 19 } Bits;
jreiss 25:36d92b31ad2b 20 } LoRaMacEventFlags;
jreiss 25:36d92b31ad2b 21
jreiss 25:36d92b31ad2b 22 typedef enum {
jreiss 25:36d92b31ad2b 23 LORAMAC_EVENT_INFO_STATUS_OK = 0,
jreiss 25:36d92b31ad2b 24 LORAMAC_EVENT_INFO_STATUS_ERROR,
jreiss 25:36d92b31ad2b 25 LORAMAC_EVENT_INFO_STATUS_TX_TIMEOUT,
jreiss 25:36d92b31ad2b 26 LORAMAC_EVENT_INFO_STATUS_RX_TIMEOUT,
jreiss 25:36d92b31ad2b 27 LORAMAC_EVENT_INFO_STATUS_RX_ERROR,
jreiss 25:36d92b31ad2b 28 LORAMAC_EVENT_INFO_STATUS_JOIN_FAIL,
jreiss 25:36d92b31ad2b 29 LORAMAC_EVENT_INFO_STATUS_DOWNLINK_FAIL,
jreiss 25:36d92b31ad2b 30 LORAMAC_EVENT_INFO_STATUS_ADDRESS_FAIL,
jreiss 25:36d92b31ad2b 31 LORAMAC_EVENT_INFO_STATUS_MIC_FAIL,
jreiss 25:36d92b31ad2b 32 } LoRaMacEventInfoStatus;
jreiss 25:36d92b31ad2b 33
jreiss 25:36d92b31ad2b 34 /*!
jreiss 25:36d92b31ad2b 35 * LoRaMAC event information
jreiss 25:36d92b31ad2b 36 */
jreiss 25:36d92b31ad2b 37 typedef struct {
jreiss 25:36d92b31ad2b 38 LoRaMacEventInfoStatus Status;
jreiss 25:36d92b31ad2b 39 lora::DownlinkControl Ctrl;
jreiss 25:36d92b31ad2b 40 bool TxAckReceived;
jreiss 25:36d92b31ad2b 41 uint8_t TxNbRetries;
jreiss 25:36d92b31ad2b 42 uint8_t TxDatarate;
jreiss 25:36d92b31ad2b 43 uint8_t RxPort;
jreiss 25:36d92b31ad2b 44 uint8_t *RxBuffer;
jreiss 25:36d92b31ad2b 45 uint8_t RxBufferSize;
jreiss 25:36d92b31ad2b 46 int16_t RxRssi;
jreiss 25:36d92b31ad2b 47 uint8_t RxSnr;
jreiss 25:36d92b31ad2b 48 uint16_t Energy;
jreiss 25:36d92b31ad2b 49 uint8_t DemodMargin;
jreiss 25:36d92b31ad2b 50 uint8_t NbGateways;
jreiss 25:36d92b31ad2b 51 } LoRaMacEventInfo;
jreiss 25:36d92b31ad2b 52
jreiss 25:36d92b31ad2b 53 class mDotEvent: public lora::MacEvents {
jreiss 25:36d92b31ad2b 54 public:
jreiss 25:36d92b31ad2b 55
jreiss 25:36d92b31ad2b 56 mDotEvent()
jreiss 25:36d92b31ad2b 57 :
jreiss 25:36d92b31ad2b 58 LinkCheckAnsReceived(false),
jreiss 25:36d92b31ad2b 59 DemodMargin(0),
jreiss 25:36d92b31ad2b 60 NbGateways(0),
jreiss 25:36d92b31ad2b 61 PacketReceived(false),
jreiss 25:36d92b31ad2b 62 RxPort(0),
jreiss 25:36d92b31ad2b 63 RxPayloadSize(0),
jreiss 25:36d92b31ad2b 64 PongReceived(false),
jreiss 25:36d92b31ad2b 65 PongRssi(0),
jreiss 25:36d92b31ad2b 66 PongSnr(0),
jreiss 25:36d92b31ad2b 67 AckReceived(false),
jreiss 25:36d92b31ad2b 68 TxNbRetries(0)
jreiss 25:36d92b31ad2b 69 {
jreiss 25:36d92b31ad2b 70 memset(&_flags, 0, sizeof(LoRaMacEventFlags));
jreiss 25:36d92b31ad2b 71 memset(&_info, 0, sizeof(LoRaMacEventInfo));
jreiss 25:36d92b31ad2b 72 }
jreiss 25:36d92b31ad2b 73
jreiss 25:36d92b31ad2b 74 virtual ~mDotEvent() {
jreiss 25:36d92b31ad2b 75 }
jreiss 25:36d92b31ad2b 76
jreiss 25:36d92b31ad2b 77 virtual void MacEvent(LoRaMacEventFlags *flags, LoRaMacEventInfo *info) {
jreiss 25:36d92b31ad2b 78 if (mts::MTSLog::getLogLevel() == mts::MTSLog::TRACE_LEVEL) {
jreiss 25:36d92b31ad2b 79 std::string msg = "OK";
jreiss 25:36d92b31ad2b 80 switch (info->Status) {
jreiss 25:36d92b31ad2b 81 case LORAMAC_EVENT_INFO_STATUS_ERROR:
jreiss 25:36d92b31ad2b 82 msg = "ERROR";
jreiss 25:36d92b31ad2b 83 break;
jreiss 25:36d92b31ad2b 84 case LORAMAC_EVENT_INFO_STATUS_TX_TIMEOUT:
jreiss 25:36d92b31ad2b 85 msg = "TX_TIMEOUT";
jreiss 25:36d92b31ad2b 86 break;
jreiss 25:36d92b31ad2b 87 case LORAMAC_EVENT_INFO_STATUS_RX_TIMEOUT:
jreiss 25:36d92b31ad2b 88 msg = "RX_TIMEOUT";
jreiss 25:36d92b31ad2b 89 break;
jreiss 25:36d92b31ad2b 90 case LORAMAC_EVENT_INFO_STATUS_RX_ERROR:
jreiss 25:36d92b31ad2b 91 msg = "RX_ERROR";
jreiss 25:36d92b31ad2b 92 break;
jreiss 25:36d92b31ad2b 93 case LORAMAC_EVENT_INFO_STATUS_JOIN_FAIL:
jreiss 25:36d92b31ad2b 94 msg = "JOIN_FAIL";
jreiss 25:36d92b31ad2b 95 break;
jreiss 25:36d92b31ad2b 96 case LORAMAC_EVENT_INFO_STATUS_DOWNLINK_FAIL:
jreiss 25:36d92b31ad2b 97 msg = "DOWNLINK_FAIL";
jreiss 25:36d92b31ad2b 98 break;
jreiss 25:36d92b31ad2b 99 case LORAMAC_EVENT_INFO_STATUS_ADDRESS_FAIL:
jreiss 25:36d92b31ad2b 100 msg = "ADDRESS_FAIL";
jreiss 25:36d92b31ad2b 101 break;
jreiss 25:36d92b31ad2b 102 case LORAMAC_EVENT_INFO_STATUS_MIC_FAIL:
jreiss 25:36d92b31ad2b 103 msg = "MIC_FAIL";
jreiss 25:36d92b31ad2b 104 break;
jreiss 25:36d92b31ad2b 105 default:
jreiss 25:36d92b31ad2b 106 break;
jreiss 25:36d92b31ad2b 107 }
jreiss 25:36d92b31ad2b 108 logTrace("Event: %s", msg.c_str());
jreiss 25:36d92b31ad2b 109
jreiss 25:36d92b31ad2b 110 logTrace("Flags Tx: %d Rx: %d RxData: %d RxSlot: %d LinkCheck: %d JoinAccept: %d",
jreiss 25:36d92b31ad2b 111 flags->Bits.Tx, flags->Bits.Rx, flags->Bits.RxData, flags->Bits.RxSlot, flags->Bits.LinkCheck, flags->Bits.JoinAccept);
jreiss 25:36d92b31ad2b 112 logTrace("Info: Status: %d ACK: %d Retries: %d TxDR: %d RxPort: %d RxSize: %d RSSI: %d SNR: %d Energy: %d Margin: %d Gateways: %d",
jreiss 25:36d92b31ad2b 113 info->Status, info->TxAckReceived, info->TxNbRetries, info->TxDatarate, info->RxPort, info->RxBufferSize,
jreiss 25:36d92b31ad2b 114 info->RxRssi, info->RxSnr, info->Energy, info->DemodMargin, info->NbGateways);
jreiss 25:36d92b31ad2b 115 }
jreiss 25:36d92b31ad2b 116 }
jreiss 25:36d92b31ad2b 117
jreiss 25:36d92b31ad2b 118 virtual void TxDone(uint8_t dr) {
jreiss 25:36d92b31ad2b 119 RxPayloadSize = 0;
jreiss 25:36d92b31ad2b 120 LinkCheckAnsReceived = false;
jreiss 25:36d92b31ad2b 121 PacketReceived = false;
jreiss 25:36d92b31ad2b 122 AckReceived = false;
jreiss 25:36d92b31ad2b 123 PongReceived = false;
jreiss 25:36d92b31ad2b 124 TxNbRetries = 0;
jreiss 25:36d92b31ad2b 125
jreiss 25:36d92b31ad2b 126 logDebug("mDotEvent - TxDone");
jreiss 25:36d92b31ad2b 127 memset(&_flags, 0, sizeof(LoRaMacEventFlags));
jreiss 25:36d92b31ad2b 128 memset(&_info, 0, sizeof(LoRaMacEventInfo));
jreiss 25:36d92b31ad2b 129
jreiss 25:36d92b31ad2b 130 _flags.Bits.Tx = 1;
jreiss 25:36d92b31ad2b 131 _info.TxDatarate = dr;
jreiss 25:36d92b31ad2b 132 _info.Status = LORAMAC_EVENT_INFO_STATUS_OK;
jreiss 25:36d92b31ad2b 133 Notify();
jreiss 25:36d92b31ad2b 134 }
jreiss 25:36d92b31ad2b 135
jreiss 25:36d92b31ad2b 136 void Notify() {
jreiss 25:36d92b31ad2b 137 MacEvent(&_flags, &_info);
jreiss 25:36d92b31ad2b 138 }
jreiss 25:36d92b31ad2b 139
jreiss 25:36d92b31ad2b 140 virtual void TxTimeout(void) {
jreiss 25:36d92b31ad2b 141 logDebug("mDotEvent - TxTimeout");
jreiss 25:36d92b31ad2b 142
jreiss 25:36d92b31ad2b 143 _flags.Bits.Tx = 1;
jreiss 25:36d92b31ad2b 144 _info.Status = LORAMAC_EVENT_INFO_STATUS_TX_TIMEOUT;
jreiss 25:36d92b31ad2b 145 Notify();
jreiss 25:36d92b31ad2b 146 }
jreiss 25:36d92b31ad2b 147
jreiss 25:36d92b31ad2b 148 virtual void JoinAccept(uint8_t *payload, uint16_t size, int16_t rssi, int8_t snr) {
jreiss 25:36d92b31ad2b 149 logDebug("mDotEvent - JoinAccept");
jreiss 25:36d92b31ad2b 150
jreiss 25:36d92b31ad2b 151 _flags.Bits.Tx = 0;
jreiss 25:36d92b31ad2b 152 _flags.Bits.JoinAccept = 1;
jreiss 25:36d92b31ad2b 153 _info.Status = LORAMAC_EVENT_INFO_STATUS_OK;
jreiss 25:36d92b31ad2b 154 Notify();
jreiss 25:36d92b31ad2b 155 }
jreiss 25:36d92b31ad2b 156
jreiss 25:36d92b31ad2b 157 virtual void JoinFailed(uint8_t *payload, uint16_t size, int16_t rssi, int8_t snr) {
jreiss 25:36d92b31ad2b 158 logDebug("mDotEvent - JoinFailed");
jreiss 25:36d92b31ad2b 159
jreiss 25:36d92b31ad2b 160 _flags.Bits.Tx = 0;
jreiss 25:36d92b31ad2b 161 _flags.Bits.JoinAccept = 1;
jreiss 25:36d92b31ad2b 162 _info.Status = LORAMAC_EVENT_INFO_STATUS_JOIN_FAIL;
jreiss 25:36d92b31ad2b 163 Notify();
jreiss 25:36d92b31ad2b 164 }
jreiss 25:36d92b31ad2b 165
jreiss 25:36d92b31ad2b 166 virtual void MissedAck(uint8_t retries) {
jreiss 25:36d92b31ad2b 167 logDebug("mDotEvent - MissedAck : retries %u", retries);
jreiss 25:36d92b31ad2b 168 TxNbRetries = retries;
jreiss 25:36d92b31ad2b 169 _info.TxNbRetries = retries;
jreiss 25:36d92b31ad2b 170 }
jreiss 25:36d92b31ad2b 171
jreiss 25:36d92b31ad2b 172 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) {
jreiss 25:36d92b31ad2b 173 logDebug("mDotEvent - PacketRx");
jreiss 25:36d92b31ad2b 174 RxPort = port;
jreiss 25:36d92b31ad2b 175 PacketReceived = true;
jreiss 25:36d92b31ad2b 176
jreiss 25:36d92b31ad2b 177 memcpy(RxPayload, payload, size);
jreiss 25:36d92b31ad2b 178 RxPayloadSize = size;
jreiss 25:36d92b31ad2b 179
jreiss 25:36d92b31ad2b 180 if (ctrl.Bits.Ack) {
jreiss 25:36d92b31ad2b 181 AckReceived = true;
jreiss 25:36d92b31ad2b 182 }
jreiss 25:36d92b31ad2b 183
jreiss 25:36d92b31ad2b 184 if (mts::MTSLog::getLogLevel() == mts::MTSLog::TRACE_LEVEL) {
jreiss 25:36d92b31ad2b 185 std::string packet = mts::Text::bin2hexString(RxPayload, size);
jreiss 25:36d92b31ad2b 186 logTrace("Payload: %s", packet.c_str());
jreiss 25:36d92b31ad2b 187 }
jreiss 25:36d92b31ad2b 188
jreiss 25:36d92b31ad2b 189 _flags.Bits.Tx = 0;
jreiss 25:36d92b31ad2b 190 _flags.Bits.Rx = 1;
jreiss 25:36d92b31ad2b 191 _flags.Bits.RxData = size > 0;
jreiss 25:36d92b31ad2b 192 _flags.Bits.RxSlot = slot;
jreiss 25:36d92b31ad2b 193 _info.RxBuffer = payload;
jreiss 25:36d92b31ad2b 194 _info.RxBufferSize = size;
jreiss 25:36d92b31ad2b 195 _info.RxPort = port;
jreiss 25:36d92b31ad2b 196 _info.RxRssi = rssi;
jreiss 25:36d92b31ad2b 197 _info.RxSnr = snr;
jreiss 25:36d92b31ad2b 198 _info.TxAckReceived = AckReceived;
jreiss 25:36d92b31ad2b 199 _info.TxNbRetries = retries;
jreiss 25:36d92b31ad2b 200 _info.Status = LORAMAC_EVENT_INFO_STATUS_OK;
jreiss 25:36d92b31ad2b 201 Notify();
jreiss 25:36d92b31ad2b 202 }
jreiss 25:36d92b31ad2b 203
jreiss 25:36d92b31ad2b 204 virtual void RxDone(uint8_t *payload, uint16_t size, int16_t rssi, int8_t snr, lora::DownlinkControl ctrl, uint8_t slot) {
jreiss 25:36d92b31ad2b 205 logDebug("mDotEvent - RxDone");
jreiss 25:36d92b31ad2b 206 }
jreiss 25:36d92b31ad2b 207
jreiss 25:36d92b31ad2b 208 virtual void Pong(int16_t m_rssi, int8_t m_snr, int16_t s_rssi, int8_t s_snr) {
jreiss 25:36d92b31ad2b 209 logDebug("mDotEvent - Pong");
jreiss 25:36d92b31ad2b 210 PongReceived = true;
jreiss 25:36d92b31ad2b 211 PongRssi = s_rssi;
jreiss 25:36d92b31ad2b 212 PongSnr = s_snr;
jreiss 25:36d92b31ad2b 213 }
jreiss 25:36d92b31ad2b 214
jreiss 25:36d92b31ad2b 215 virtual void NetworkLinkCheck(int16_t m_rssi, int8_t m_snr, int8_t s_snr, uint8_t s_gateways) {
jreiss 25:36d92b31ad2b 216 logDebug("mDotEvent - NetworkLinkCheck");
jreiss 25:36d92b31ad2b 217 LinkCheckAnsReceived = true;
jreiss 25:36d92b31ad2b 218 DemodMargin = s_snr;
jreiss 25:36d92b31ad2b 219 NbGateways = s_gateways;
jreiss 25:36d92b31ad2b 220
jreiss 25:36d92b31ad2b 221 _flags.Bits.Tx = 0;
jreiss 25:36d92b31ad2b 222 _flags.Bits.LinkCheck = 1;
jreiss 25:36d92b31ad2b 223 _info.RxRssi = m_rssi;
jreiss 25:36d92b31ad2b 224 _info.RxSnr = m_snr;
jreiss 25:36d92b31ad2b 225 _info.DemodMargin = s_snr;
jreiss 25:36d92b31ad2b 226 _info.NbGateways = s_gateways;
jreiss 25:36d92b31ad2b 227 _info.Status = LORAMAC_EVENT_INFO_STATUS_OK;
jreiss 25:36d92b31ad2b 228 Notify();
jreiss 25:36d92b31ad2b 229 }
jreiss 25:36d92b31ad2b 230
jreiss 25:36d92b31ad2b 231 virtual void RxTimeout(uint8_t slot) {
jreiss 25:36d92b31ad2b 232 // logDebug("mDotEvent - RxTimeout");
jreiss 25:36d92b31ad2b 233
jreiss 25:36d92b31ad2b 234 _flags.Bits.Tx = 0;
jreiss 25:36d92b31ad2b 235 _flags.Bits.RxSlot = slot;
jreiss 25:36d92b31ad2b 236 _info.Status = LORAMAC_EVENT_INFO_STATUS_RX_TIMEOUT;
jreiss 25:36d92b31ad2b 237 Notify();
jreiss 25:36d92b31ad2b 238 }
jreiss 25:36d92b31ad2b 239
jreiss 25:36d92b31ad2b 240 virtual void RxError(uint8_t slot) {
jreiss 25:36d92b31ad2b 241 logDebug("mDotEvent - RxError");
jreiss 25:36d92b31ad2b 242
jreiss 25:36d92b31ad2b 243 memset(&_flags, 0, sizeof(LoRaMacEventFlags));
jreiss 25:36d92b31ad2b 244 memset(&_info, 0, sizeof(LoRaMacEventInfo));
jreiss 25:36d92b31ad2b 245
jreiss 25:36d92b31ad2b 246 _flags.Bits.RxSlot = slot;
jreiss 25:36d92b31ad2b 247 _info.Status = LORAMAC_EVENT_INFO_STATUS_RX_ERROR;
jreiss 25:36d92b31ad2b 248 Notify();
jreiss 25:36d92b31ad2b 249 }
jreiss 25:36d92b31ad2b 250
jreiss 25:36d92b31ad2b 251 virtual uint8_t MeasureBattery(void) {
jreiss 25:36d92b31ad2b 252 return 255;
jreiss 25:36d92b31ad2b 253 }
jreiss 25:36d92b31ad2b 254
jreiss 25:36d92b31ad2b 255 bool LinkCheckAnsReceived;
jreiss 25:36d92b31ad2b 256 uint8_t DemodMargin;
jreiss 25:36d92b31ad2b 257 uint8_t NbGateways;
jreiss 25:36d92b31ad2b 258
jreiss 25:36d92b31ad2b 259 bool PacketReceived;
jreiss 25:36d92b31ad2b 260 uint8_t RxPort;
jreiss 25:36d92b31ad2b 261 uint8_t RxPayload[255];
jreiss 25:36d92b31ad2b 262 uint8_t RxPayloadSize;
jreiss 25:36d92b31ad2b 263
jreiss 25:36d92b31ad2b 264 bool PongReceived;
jreiss 25:36d92b31ad2b 265 int16_t PongRssi;
jreiss 25:36d92b31ad2b 266 int16_t PongSnr;
jreiss 25:36d92b31ad2b 267
jreiss 25:36d92b31ad2b 268 bool AckReceived;
jreiss 25:36d92b31ad2b 269 uint8_t TxNbRetries;
jreiss 25:36d92b31ad2b 270
jreiss 25:36d92b31ad2b 271 LoRaMacEventFlags& Flags() {
jreiss 25:36d92b31ad2b 272 return _flags;
jreiss 25:36d92b31ad2b 273 }
jreiss 25:36d92b31ad2b 274 LoRaMacEventInfo& Info() {
jreiss 25:36d92b31ad2b 275 return _info;
jreiss 25:36d92b31ad2b 276 }
jreiss 25:36d92b31ad2b 277
jreiss 25:36d92b31ad2b 278 private:
jreiss 25:36d92b31ad2b 279
jreiss 25:36d92b31ad2b 280 LoRaMacEventFlags _flags;
jreiss 25:36d92b31ad2b 281 LoRaMacEventInfo _info;
jreiss 25:36d92b31ad2b 282
jreiss 25:36d92b31ad2b 283 //
jreiss 25:36d92b31ad2b 284 // /*!
jreiss 25:36d92b31ad2b 285 // * MAC layer event callback prototype.
jreiss 25:36d92b31ad2b 286 // *
jreiss 25:36d92b31ad2b 287 // * \param [IN] flags Bit field indicating the MAC events occurred
jreiss 25:36d92b31ad2b 288 // * \param [IN] info Details about MAC events occurred
jreiss 25:36d92b31ad2b 289 // */
jreiss 25:36d92b31ad2b 290 // virtual void MacEvent(LoRaMacEventFlags *flags, LoRaMacEventInfo *info) {
jreiss 25:36d92b31ad2b 291 // logDebug("mDotEvent");
jreiss 25:36d92b31ad2b 292 //
jreiss 25:36d92b31ad2b 293 // if (flags->Bits.Rx) {
jreiss 25:36d92b31ad2b 294 // logDebug("Rx");
jreiss 25:36d92b31ad2b 295 //
jreiss 25:36d92b31ad2b 296 // // Event Object must delete RxBuffer
jreiss 25:36d92b31ad2b 297 // delete[] info->RxBuffer;
jreiss 25:36d92b31ad2b 298 // }
jreiss 25:36d92b31ad2b 299 // }
jreiss 25:36d92b31ad2b 300 //
jreiss 25:36d92b31ad2b 301
jreiss 25:36d92b31ad2b 302 };
jreiss 25:36d92b31ad2b 303
jreiss 25:36d92b31ad2b 304 #endif // __MDOT_EVENT_H__
jreiss 25:36d92b31ad2b 305