Rleg  2
 All Data Structures Files Functions Variables Typedefs Macros Groups Pages
datalogger.h
Go to the documentation of this file.
1 #ifndef DATALOGGER_H
2 #define DATALOGGER_H
3 
4 // Module configuration
5 #define DATALOGGER_MODULE_ENABLED 1
6 #define DATALOGGER_DEBUG_MODE 0
7 
8 // Sets if you want to overwrite (0) or to append _1, _2, etc. to each new datalogger file
9 #define DATALOGGER_ENABLE_NEW_FILE_ENNUMERATION 0
10 #define DATALOGGER_FILE_NAME "rleg"
11 #define DATALOGGER_FOLDER "matlabdatafiles"
12 #define DATALOGGER_STANDARD_QUEUE_SIZE 750
13 
14 // What should be logged?
15 #define DATALOGGER_LOG_TIME 1
16 #define DATALOGGER_LOG_EXECTIMES 1
17 #define DATALOGGER_LOG_RAW_IMU 1
18 #define DATALOGGER_LOG_EFFORTS 1
19 #define DATALOGGER_LOG_MRA 1
20 //define DATALOGGER_LOG_LOCAL_COORDINATE_SYSTEM 1
21 //#define DATALOGGER_LOG_LOCAL_FIELDS 1
22 #define DATALOGGER_LOG_CALIBRATED_IMU 1
23 //#define DATALOGGER_LOG_ESTIMATOR 1
24 //#define DATALOGGER_LOG_CONTROLLERS 1
25 
26 // Internal
27 #define DATALOGGER_NOT_INITIALIZED 0
28 #define DATALOGGER_INITIALIZED 1
29 #define DATALOGGER_NOT_RUNNING 0
30 #define DATALOGGER_RUNNING 1
31 #define DATALOGGER_VARIABLE_NOT_INSERTED 0
32 #define DATALOGGER_VARIABLE_INSERTED 1
33 
34 // Returns
35 #define DATALOGGER_SUCCESS 1
36 #define DATALOGGER_FAILURE -1
37 #define DATALOGGER_ERROR_NOT_INITIALIZED -2
38 #define DATALOGGER_VARIBALE_ALREADY_INSERTED -3
39 
40 int datalogger_init(void);
41 int datalogger_close(void);
42 int datalogger_write_file(void);
43 int datalogger_update_IPC(void);
44 int datalogger_update(double t_s, double t_control_exec_s, double t_ui_exec_s, double t0_s, IMU_DATA_STRUCT *pimu_data, EFF_DATA_STRUCT *peff_data, MRA_DATA_STRUCT *pmra_data /*,IMUMEASURE *pimu_measure, MAGNETOMETERMEASURE *pmagnetometer_measure, ESTIMATION_DATA_STRUCT *pestimation_data, CONTROL_DATA_STRUCT *pcontrol_data*/);
45 int datalogger_set_Ts(double Ts);
46 int datalogger_status(void);
47 int datalogger_start(void);
48 int datalogger_stop(void);
49 int datalogger_file_exists(const char * filename);
50 
51 #endif //DATALOGGER_H
int datalogger_stop(void)
Definition: datalogger.c:601
Struct to control MRA.
Data of IMU structure.
Definition: communication.h:93
int datalogger_update(double t_s, double t_control_exec_s, double t_ui_exec_s, double t0_s, IMU_DATA_STRUCT *pimu_data, EFF_DATA_STRUCT *peff_data, MRA_DATA_STRUCT *pmra_data)
Definition: datalogger.c:272
int datalogger_write_file(void)
Definition: datalogger.c:240
int datalogger_close(void)
Definition: datalogger.c:215
int datalogger_file_exists(const char *filename)
Definition: datalogger.c:618
int datalogger_update_IPC(void)
Definition: datalogger.c:256
int datalogger_status(void)
Definition: datalogger.c:571
int datalogger_start(void)
Definition: datalogger.c:584
int datalogger_set_Ts(double Ts)
Definition: datalogger.c:540
int datalogger_init(void)
Definition: datalogger.c:41