|
MAV'RIC
|
Log data in files. More...
#include <data_logging.hpp>

Classes | |
| struct | conf_t |
| Configuration of the data_logging element. More... | |
Public Member Functions | |
| Data_logging (File &file, State &state, conf_t config=default_config()) | |
| Data logging constructor. | |
| bool | create_new_log_file (const char *file_name_, uint32_t sysid) |
| Initialise the data logging module. | |
| bool | update () |
| The task to log the data to the SD card. | |
| bool | start (void) |
| Start logging data. | |
| bool | stop (void) |
| Stop logging data. | |
| template<typename T > | |
| bool | add_field (const T *val, const char *param_name) |
| Registers parameter to log on the SD card (integer version) | |
| template<typename T > | |
| bool | add_field (const T *val, const char *param_name, uint32_t precision) |
| Registers parameter to log on the SD card (float and double version) | |
| template<> | |
| bool | add_field (const uint8_t *val, const char *param_name) |
| template<> | |
| bool | add_field (const int8_t *val, const char *param_name) |
| template<> | |
| bool | add_field (const uint16_t *val, const char *param_name) |
| template<> | |
| bool | add_field (const int16_t *val, const char *param_name) |
| template<> | |
| bool | add_field (const uint32_t *val, const char *param_name) |
| template<> | |
| bool | add_field (const int32_t *val, const char *param_name) |
| template<> | |
| bool | add_field (const uint64_t *val, const char *param_name) |
| template<> | |
| bool | add_field (const int64_t *val, const char *param_name) |
| template<> | |
| bool | add_field (const float *val, const char *param_name, uint32_t precision) |
| template<> | |
| bool | add_field (const double *val, const char *param_name, uint32_t precision) |
| template<> | |
| bool | add_field (const bool *val, const char *param_name) |
Static Public Member Functions | |
| static conf_t | default_config () |
| Default configuration for the data_logging. | |
Protected Member Functions | |
| virtual uint32_t | max_count (void)=0 |
| Get maximum number of variables to log. | |
| virtual data_logging_entry_t * | list ()=0 |
| Get list of variables to log. | |
Log data in files.
This class is abstract and does not contains the task list, use the child class Data_logging_T
| bool Data_logging::add_field | ( | const T * | val, |
| const char * | param_name | ||
| ) |
Registers parameter to log on the SD card (integer version)
| data_logging | The pointer to the data logging structure |
| val | The parameter value |
| param_name | Name of the parameter |
| T | Type of parameter to add |
| bool Data_logging::add_field | ( | const T * | val, |
| const char * | param_name, | ||
| uint32_t | precision | ||
| ) |
Registers parameter to log on the SD card (float and double version)
| data_logging | The pointer to the data logging structure |
| val | The parameter value |
| param_name | Name of the parameter |
| precision | The number of digit after the zero |
| T | Type of parameter to add (float or double) |
| bool Data_logging::create_new_log_file | ( | const char * | file_name_, |
| uint32_t | sysid | ||
| ) |
Initialise the data logging module.
| file_name | The pointer to name of the file to create |
| sysid | The system identification number of the MAV |

| static conf_t Data_logging::default_config | ( | ) | [inline, static] |
Default configuration for the data_logging.
| virtual data_logging_entry_t* Data_logging::list | ( | ) | [protected, pure virtual] |
Get list of variables to log.
Abstract method to be implemented in child classes
Implemented in Data_logging_T< N >, and Data_logging_T< 10 >.
| virtual uint32_t Data_logging::max_count | ( | void | ) | [protected, pure virtual] |
Get maximum number of variables to log.
Abstract method to be implemented in child classes
Implemented in Data_logging_T< N >, and Data_logging_T< 10 >.
| bool Data_logging::start | ( | void | ) |
Start logging data.
Will succeed only if the MAV is disarmed

| bool Data_logging::stop | ( | void | ) |
Stop logging data.
Will succeed only if the MAV is disarmed

| bool Data_logging::update | ( | void | ) |
The task to log the data to the SD card.
| data_logging | The pointer to the data logging structure |

1.7.6.1