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.
Dependencies: NaturalTinyShell_ice libmDot-12Sept mbed-rtos mbed
Fork of ICE by
src/AnalyticsLogger/AnalyticsLogger.cpp@58:a4422d19b2ea, 2016-09-14 (annotated)
- Committer:
- davidjhoward
- Date:
- Wed Sep 14 18:54:23 2016 +0000
- Revision:
- 58:a4422d19b2ea
- Parent:
- 0:65cfa4873284
- Child:
- 60:96e17fb215a6
adding EEPROM drivers
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
jmarkel44 | 0:65cfa4873284 | 1 | /****************************************************************************** |
davidjhoward | 58:a4422d19b2ea | 2 | * |
jmarkel44 | 0:65cfa4873284 | 3 | * File: AnalyticsLogger.cpp |
jmarkel44 | 0:65cfa4873284 | 4 | * Desciption: source for the ICE Analytics Logger |
jmarkel44 | 0:65cfa4873284 | 5 | * |
jmarkel44 | 0:65cfa4873284 | 6 | *****************************************************************************/ |
jmarkel44 | 0:65cfa4873284 | 7 | #include "global.h" |
jmarkel44 | 0:65cfa4873284 | 8 | #include <stdio.h> |
jmarkel44 | 0:65cfa4873284 | 9 | #include "AnalyticsLogger.h" |
davidjhoward | 58:a4422d19b2ea | 10 | #include "eep.h" |
jmarkel44 | 0:65cfa4873284 | 11 | |
jmarkel44 | 0:65cfa4873284 | 12 | /***************************************************************************** |
jmarkel44 | 0:65cfa4873284 | 13 | * Function: AnalyticsLogger |
davidjhoward | 58:a4422d19b2ea | 14 | * Description: entry point for the Analytics Logger |
jmarkel44 | 0:65cfa4873284 | 15 | * |
jmarkel44 | 0:65cfa4873284 | 16 | * @param (IN) args (user-defined arguments) |
jmarkel44 | 0:65cfa4873284 | 17 | * @return none |
jmarkel44 | 0:65cfa4873284 | 18 | *****************************************************************************/ |
jmarkel44 | 0:65cfa4873284 | 19 | void AnalyticsLogger(void const *args) |
jmarkel44 | 0:65cfa4873284 | 20 | { |
jmarkel44 | 0:65cfa4873284 | 21 | printf("\r%s has started...\n", __func__); |
jmarkel44 | 0:65cfa4873284 | 22 | |
jmarkel44 | 0:65cfa4873284 | 23 | while ( true ) { |
davidjhoward | 58:a4422d19b2ea | 24 | // logInfo("Analytics Logger checking for MAIL"); |
davidjhoward | 58:a4422d19b2ea | 25 | osEvent evt = AnalyticsLoggerMailBox.get(1000); |
davidjhoward | 58:a4422d19b2ea | 26 | if (evt.status == osEventMail) { |
davidjhoward | 58:a4422d19b2ea | 27 | AnalyticsLoggerReq_t *mail = (AnalyticsLoggerReq_t*)evt.value.p; |
davidjhoward | 58:a4422d19b2ea | 28 | logInfo("Analytics Logger Mail Received: Timestamp: %s, Entry: %s", mail->timestamp, mail->log_entry); |
davidjhoward | 58:a4422d19b2ea | 29 | AnalyticsLoggerMailBox.free(mail); |
davidjhoward | 58:a4422d19b2ea | 30 | break; |
davidjhoward | 58:a4422d19b2ea | 31 | } else { |
davidjhoward | 58:a4422d19b2ea | 32 | // logInfo("Analytics Logger no MAIL"); |
davidjhoward | 58:a4422d19b2ea | 33 | } |
jmarkel44 | 0:65cfa4873284 | 34 | } |
jmarkel44 | 0:65cfa4873284 | 35 | } |