Versão sem FFT e aquisição por DMA. 256 amostras.
Dependencies: EthernetInterface NTPClient mbed-rtos mbed
Headers/PmedLog.h@0:e57bc370d339, 2016-01-05 (annotated)
- Committer:
- rebonatto
- Date:
- Tue Jan 05 11:45:44 2016 +0000
- Revision:
- 0:e57bc370d339
Vers?o est?vel sem calculo de FFT. Aquisi??o por DMA. Usa 256 amostras.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
rebonatto | 0:e57bc370d339 | 1 | /* |
rebonatto | 0:e57bc370d339 | 2 | * Settings.h |
rebonatto | 0:e57bc370d339 | 3 | * |
rebonatto | 0:e57bc370d339 | 4 | * Created on: 19/jan/2015 |
rebonatto | 0:e57bc370d339 | 5 | * Author: Marcos A. Lucas |
rebonatto | 0:e57bc370d339 | 6 | */ |
rebonatto | 0:e57bc370d339 | 7 | |
rebonatto | 0:e57bc370d339 | 8 | #ifndef PMEDLOG_H |
rebonatto | 0:e57bc370d339 | 9 | #define PMEDLOG_H |
rebonatto | 0:e57bc370d339 | 10 | |
rebonatto | 0:e57bc370d339 | 11 | #include "mbed.h" |
rebonatto | 0:e57bc370d339 | 12 | #include "Settings.h" |
rebonatto | 0:e57bc370d339 | 13 | |
rebonatto | 0:e57bc370d339 | 14 | #define LOGFILE "/local/pmedlog.txt" |
rebonatto | 0:e57bc370d339 | 15 | |
rebonatto | 0:e57bc370d339 | 16 | |
rebonatto | 0:e57bc370d339 | 17 | //define as constant some log entries |
rebonatto | 0:e57bc370d339 | 18 | static const char *PMEDLOG_INITIALIZING = " Initializing Protegemed ... "; |
rebonatto | 0:e57bc370d339 | 19 | static const char *PMEDLOG_INITIALIZINGWDT = " Initializing Protegemed by WhatchDog Timer... "; |
rebonatto | 0:e57bc370d339 | 20 | static const char *PMEDLOG_STARTED = " Started Protegemed ! "; |
rebonatto | 0:e57bc370d339 | 21 | static const char *PMEDLOG_WRONGCODE = " Oops... wrong code, a reset may be expected "; |
rebonatto | 0:e57bc370d339 | 22 | static const char *PMEDLOG_RESET = " No reason given "; |
rebonatto | 0:e57bc370d339 | 23 | static const char *PMEDLOG_DEFAULTS = " Loaded defaults in Settings ! "; |
rebonatto | 0:e57bc370d339 | 24 | |
rebonatto | 0:e57bc370d339 | 25 | static const char *PMEDLOG_RESETTELNET = " by telnet reset "; |
rebonatto | 0:e57bc370d339 | 26 | static const char *PMEDLOG_UPDATETELNET = " by telnet update "; |
rebonatto | 0:e57bc370d339 | 27 | |
rebonatto | 0:e57bc370d339 | 28 | static const char *PMEDLOG_HTTP_CONNECT = "On HTTP_POST - Connect"; |
rebonatto | 0:e57bc370d339 | 29 | static const char *PMEDLOG_HTTP_SEND = "On HTTP_POST - Send"; |
rebonatto | 0:e57bc370d339 | 30 | |
rebonatto | 0:e57bc370d339 | 31 | class PmedLog |
rebonatto | 0:e57bc370d339 | 32 | { |
rebonatto | 0:e57bc370d339 | 33 | |
rebonatto | 0:e57bc370d339 | 34 | protected: |
rebonatto | 0:e57bc370d339 | 35 | |
rebonatto | 0:e57bc370d339 | 36 | static int m_entry; |
rebonatto | 0:e57bc370d339 | 37 | static time_t m_lastMark; |
rebonatto | 0:e57bc370d339 | 38 | |
rebonatto | 0:e57bc370d339 | 39 | public: |
rebonatto | 0:e57bc370d339 | 40 | |
rebonatto | 0:e57bc370d339 | 41 | PmedLog(); |
rebonatto | 0:e57bc370d339 | 42 | |
rebonatto | 0:e57bc370d339 | 43 | // Control the marks behavior in log file |
rebonatto | 0:e57bc370d339 | 44 | static bool get_LogMarks() { return Settings::get_LogMarks(); } |
rebonatto | 0:e57bc370d339 | 45 | static void set_LogMarks(bool value) { Settings::set_LogMarks(value); } |
rebonatto | 0:e57bc370d339 | 46 | static int get_LogMarksInterval() { return Settings::get_LogMarksInterval(); } |
rebonatto | 0:e57bc370d339 | 47 | static void set_LogMarksInterval(int value) { Settings::set_LogMarksInterval(value); } |
rebonatto | 0:e57bc370d339 | 48 | |
rebonatto | 0:e57bc370d339 | 49 | static void WriteEntry(const char *value); |
rebonatto | 0:e57bc370d339 | 50 | static void Mark(); |
rebonatto | 0:e57bc370d339 | 51 | |
rebonatto | 0:e57bc370d339 | 52 | }; |
rebonatto | 0:e57bc370d339 | 53 | |
rebonatto | 0:e57bc370d339 | 54 | #endif //#ifndef PMEDLOGS_H |
rebonatto | 0:e57bc370d339 | 55 |