libmDot 1.0.12-hotfix
Diff: mDotEvent.h
- Revision:
- 0:5f84bdd949b8
diff -r 000000000000 -r 5f84bdd949b8 mDotEvent.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mDotEvent.h Sun Jul 17 00:03:03 2016 +0000 @@ -0,0 +1,36 @@ +#include "LoRaMacEvent.h" +#include "MTSLog.h" + +#ifndef __MDOT_EVENT_H__ +#define __MDOT_EVENT_H__ + +class mDotEvent : public LoRaMacEvent { + public: + + virtual ~mDotEvent() {} + + /*! + * MAC layer event callback prototype. + * + * \param [IN] flags Bit field indicating the MAC events occurred + * \param [IN] info Details about MAC events occurred + */ + virtual void MacEvent(LoRaMacEventFlags *flags, LoRaMacEventInfo *info) { + logDebug("mDotEvent"); + + if (flags->Bits.Rx) { + logDebug("Rx"); + + // Event Object must delete RxBuffer + delete[] info->RxBuffer; + } + } + + virtual uint8_t MeasureBattery(void) { + return 255; + } +}; + + +#endif // __MDOT_EVENT_H__ +