canuck lehead / libmDot_1012-hotifx
Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers mDotEvent.h Source File

mDotEvent.h

00001 #include "LoRaMacEvent.h"
00002 #include "MTSLog.h"
00003 
00004 #ifndef __MDOT_EVENT_H__
00005 #define __MDOT_EVENT_H__
00006 
00007 class mDotEvent : public LoRaMacEvent  {
00008     public:
00009 
00010         virtual ~mDotEvent() {}
00011 
00012         /*!
00013          * MAC layer event callback prototype.
00014          *
00015          * \param [IN] flags Bit field indicating the MAC events occurred
00016          * \param [IN] info  Details about MAC events occurred
00017          */
00018         virtual void MacEvent (LoRaMacEventFlags  *flags, LoRaMacEventInfo  *info) {
00019             logDebug("mDotEvent");
00020 
00021             if (flags->Bits.Rx) {
00022                 logDebug("Rx");
00023 
00024                 // Event Object must delete RxBuffer
00025                 delete[] info->RxBuffer;
00026             }
00027         }
00028 
00029         virtual uint8_t MeasureBattery(void) {
00030             return 255;
00031         }
00032 };
00033 
00034 
00035 #endif // __MDOT_EVENT_H__
00036