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.
Fork of libmDot by
mDotEvent.h@17:0da384ba484b, 2016-11-18 (annotated)
- Committer:
- Leon Lindenfelser
- Date:
- Fri Nov 18 11:10:04 2016 -0600
- Revision:
- 17:0da384ba484b
- Parent:
- 15:b50f92f1c6ff
Previous libmDot version "16:e4f80db195b6" has the wrong header files for mDot.h and mDotEvent.h. Use with mbed version 121 and mbed-rtos version 116.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Leon Lindenfelser |
17:0da384ba484b | 1 | #include "LoRaMacEvent.h" |
Mike Fiore |
13:0f89ec319c18 | 2 | #include "MTSLog.h" |
jreiss | 15:b50f92f1c6ff | 3 | |
Leon Lindenfelser |
17:0da384ba484b | 4 | class mDotEvent : public LoRaMacEvent { |
Mike Fiore |
13:0f89ec319c18 | 5 | public: |
Mike Fiore |
13:0f89ec319c18 | 6 | |
Leon Lindenfelser |
17:0da384ba484b | 7 | virtual ~mDotEvent() {} |
jreiss | 15:b50f92f1c6ff | 8 | |
Leon Lindenfelser |
17:0da384ba484b | 9 | /*! |
Leon Lindenfelser |
17:0da384ba484b | 10 | * MAC layer event callback prototype. |
Leon Lindenfelser |
17:0da384ba484b | 11 | * |
Leon Lindenfelser |
17:0da384ba484b | 12 | * \param [IN] flags Bit field indicating the MAC events occurred |
Leon Lindenfelser |
17:0da384ba484b | 13 | * \param [IN] info Details about MAC events occurred |
Leon Lindenfelser |
17:0da384ba484b | 14 | */ |
Leon Lindenfelser |
17:0da384ba484b | 15 | virtual void MacEvent(LoRaMacEventFlags *flags, LoRaMacEventInfo *info) { |
Leon Lindenfelser |
17:0da384ba484b | 16 | logDebug("mDotEvent"); |
jreiss | 15:b50f92f1c6ff | 17 | |
Leon Lindenfelser |
17:0da384ba484b | 18 | if (flags->Bits.Rx) { |
Leon Lindenfelser |
17:0da384ba484b | 19 | logDebug("Rx"); |
jreiss | 15:b50f92f1c6ff | 20 | |
Leon Lindenfelser |
17:0da384ba484b | 21 | // Event Object must delete RxBuffer |
Leon Lindenfelser |
17:0da384ba484b | 22 | delete[] info->RxBuffer; |
Leon Lindenfelser |
17:0da384ba484b | 23 | } |
Mike Fiore |
13:0f89ec319c18 | 24 | } |
Mike Fiore |
13:0f89ec319c18 | 25 | |
Mike Fiore |
13:0f89ec319c18 | 26 | virtual uint8_t MeasureBattery(void) { |
Mike Fiore |
13:0f89ec319c18 | 27 | return 255; |
Mike Fiore |
13:0f89ec319c18 | 28 | } |
Mike Fiore |
13:0f89ec319c18 | 29 | }; |