Data Structures | |
struct | LogDef |
Macros | |
#define | DATALOG_ALLOC_DYNAMIC true |
#define | DATALOG_ALLOC_STATIC false |
#define | DATALOG_LOG_MAXSIZE 64 |
#define | pxdatalog_log_alloc_init_FromISR() pxdatalog_log_alloc_init( DATALOG_ALLOC_STATIC ) |
Allocate and init a xLogDef structure from an ISR. More... | |
Typedefs | |
typedef struct LogDef | xLogDef |
Functions | |
bool | b_datalog_set_current_log_drive_toDF (void) |
Set the current logs to be stored to the DataFlash. More... | |
bool | b_datalog_set_current_log_drive_toSDMMC (void) |
Set the current logs to be stored to the SDMMC card. More... | |
bool | bdatalog_start (unsigned portBASE_TYPE uxPriority) |
xLogDef * | pxdatalog_log_alloc_init (bool bAllocType) |
Allocate and init a xLogDef structure. More... | |
void | vdatalog_log_free (xLogDef *pxLog) |
Free a data log structure and its content. More... | |
void | vdatalog_make_logstring (xLogDef *pxLog, signed portCHAR *pcLogString) |
Build a log string from a xLogDef log structure. More... | |
portBASE_TYPE | x_datalog_AddLogFromISR (xLogDef *pxLog) |
Add a log in the xLogsQueue, from within an ISR. More... | |
eStatus | xDataLog_GetStatus (void) |
Variables | |
char * | acLogSourceName [] |
#define DATALOG_ALLOC_DYNAMIC true |
xLogDef structure allocation types.
Referenced by e_actuator_cmd_get_value(), e_sensor_cmd_get_value(), pxdatalog_log_alloc_init(), and v_datalog_AddSensorLog().
#define DATALOG_ALLOC_STATIC false |
#define DATALOG_LOG_MAXSIZE 64 |
A data log max size.
Referenced by e_actuator_cmd_get_value(), and e_sensor_cmd_get_value().
#define pxdatalog_log_alloc_init_FromISR | ( | ) | pxdatalog_log_alloc_init( DATALOG_ALLOC_STATIC ) |
Allocate and init a xLogDef structure from an ISR.
Referenced by prvjoystick_ISR_NonNakedBehaviour(), and prvpushb_ISR_NonNakedBehaviour().
enum eLogSourceId |
bool b_datalog_set_current_log_drive_toDF | ( | void | ) |
Set the current logs to be stored to the DataFlash.
References acLogFileName, pcStringCurrentLogDirectoryName, pcStringLogDirectoryNameA, and pdTRUE.
bool b_datalog_set_current_log_drive_toSDMMC | ( | void | ) |
Set the current logs to be stored to the SDMMC card.
References acLogFileName, pcStringCurrentLogDirectoryName, pcStringLogDirectoryNameB, and pdTRUE.
bool bdatalog_start | ( | unsigned portBASE_TYPE | uxPriority | ) |
Start the data logger module.
uxPriority | The base priority of the data logger tasks. |
References DATALOG_INVALID_LOGSRC_ID, DATALOG_LOGSQUEUE_HITHRESHOLD, DATALOG_LOGSQUEUE_SIZE, DATALOG_STACK_SIZE, i, LOGTOFILE_STACK_SIZE, NULL, pcStringCurrentLogDirectoryName, pcStringLogDirectoryNameA, pdPASS, SYS_STATUS_DOWN, vTaskDelete(), xDataLogHndl, xDataLogStatus, xLogToFileHndl, xQueueCreate(), and xTaskCreate.
Referenced by portTASK_FUNCTION().
Allocate and init a xLogDef structure.
bAllocType | Allocation type (dynamic or static) |
bAllocType | Allocation type (dynamic or static(FromISR)) |
References DATALOG_ALLOC_DYNAMIC, DATALOG_INVALID_LOGSRC_ID, DATALOG_LOGSQUEUE_HITHRESHOLD, NULL, LogDef::pcStringLog, LogDef::pfFreeLogStruct, LogDef::pfFreeStringLog, prv_vdatalog_pool_log_free(), pvPortMalloc(), LogDef::rawdate, u8FreeLogIdx, vPortFree(), and xcptime_LocalTime.
Referenced by e_actuator_cmd_get_value(), e_sensor_cmd_get_value(), and v_datalog_AddSensorLog().
void vdatalog_log_free | ( | xLogDef * | pxLog | ) |
Free a data log structure and its content.
pxLog | pointer on the data log structure to free. |
References NULL, LogDef::pcStringLog, LogDef::pfFreeLogStruct, and LogDef::pfFreeStringLog.
Referenced by e_actuator_cmd_get_value(), e_sensor_cmd_get_value(), prv_vsave_logs(), v_datalog_AddSensorLog(), and x_datalog_AddLogFromISR().
void vdatalog_make_logstring | ( | xLogDef * | pxLog, |
signed portCHAR * | pcLogString | ||
) |
Build a log string from a xLogDef log structure.
pxLog | Pointer on a data log structure |
pcLogString | Allocated DATALOG_LOG_MAXSIZE string to fill. |
References acLogSourceName, LogDef::id, LogDef::pcStringLog, LogDef::rawdate, and sprintf().
Referenced by e_actuator_cmd_get_value(), e_sensor_cmd_get_value(), and prv_vsave_logs().
portBASE_TYPE x_datalog_AddLogFromISR | ( | xLogDef * | pxLog | ) |
Add a log in the xLogsQueue, from within an ISR.
pxLog | The log to add to the xLogsQueue. |
References DATALOG_LOGSQUEUE_SIZE, NULL, pdFALSE, portENTER_CRITICAL, portEXIT_CRITICAL, uxNbMsgsInLogsQueue, vdatalog_log_free(), and xQueueSendFromISR.
Referenced by prvjoystick_ISR_NonNakedBehaviour(), and prvpushb_ISR_NonNakedBehaviour().
eStatus xDataLog_GetStatus | ( | void | ) |
Return the status of the datalog module.
References xDataLogStatus.
char* acLogSourceName[] |
Array of nicknames
Referenced by e_actuator_cmd_get_value(), e_actuator_cmd_set_value(), e_sensor_cmd_get_config(), e_sensor_cmd_get_value(), e_sensor_cmd_set_config(), and vdatalog_make_logstring().