EZR
Dependencies: CRC16 FreescaleIAP FreescaleWatchdog GGSProtocol LM75B PIMA Parameters PersistentCircularQueue SerialNumberV2COM mbed-dev-watchdog_2016_03_04
Fork of smartRamalKW by
alarm.h@22:b66e36356dd4, 2015-10-19 (annotated)
- Committer:
- tpadovani
- Date:
- Mon Oct 19 20:34:15 2015 +0000
- Revision:
- 22:b66e36356dd4
- Parent:
- 19:1f623070b9dd
debug condicional
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
tpadovani | 19:1f623070b9dd | 1 | #ifndef ALARM_H |
tpadovani | 19:1f623070b9dd | 2 | #define ALARM_H |
tpadovani | 13:eed9484a89bc | 3 | |
tpadovani | 13:eed9484a89bc | 4 | #include "mbed.h" |
tpadovani | 13:eed9484a89bc | 5 | #include "queue.h" |
tpadovani | 13:eed9484a89bc | 6 | #include "appParameters.h" |
tpadovani | 22:b66e36356dd4 | 7 | #include "debug.h" |
tpadovani | 13:eed9484a89bc | 8 | |
tpadovani | 13:eed9484a89bc | 9 | typedef struct{ |
tpadovani | 13:eed9484a89bc | 10 | unsigned int time; |
tpadovani | 13:eed9484a89bc | 11 | unsigned short int code; |
tpadovani | 13:eed9484a89bc | 12 | unsigned short int state; |
tpadovani | 13:eed9484a89bc | 13 | } AlarmEntry; |
tpadovani | 13:eed9484a89bc | 14 | |
tpadovani | 13:eed9484a89bc | 15 | class Alarm { |
tpadovani | 13:eed9484a89bc | 16 | |
tpadovani | 13:eed9484a89bc | 17 | PersistentCircularQueue alarmQueue; |
tpadovani | 13:eed9484a89bc | 18 | |
tpadovani | 13:eed9484a89bc | 19 | public: |
tpadovani | 13:eed9484a89bc | 20 | void loadQueue(int size, int sector); |
tpadovani | 13:eed9484a89bc | 21 | void writeAlarm(int code, bool state, bool previousState); |
tpadovani | 13:eed9484a89bc | 22 | char* getAllAlarms(); |
tpadovani | 13:eed9484a89bc | 23 | |
tpadovani | 13:eed9484a89bc | 24 | }; |
tpadovani | 13:eed9484a89bc | 25 | |
tpadovani | 13:eed9484a89bc | 26 | #endif |