GPS Device
Loading...
Searching...
No Matches
datalog.h
Go to the documentation of this file.
1
25
31
32
#ifndef DATALOG_H__
33
#define DATALOG_H__
34
35
#include "
err.h
"
36
#include "configuration.h"
37
44
52
typedef
enum
{
53
DATALOG_TIME_1S
= 1,
54
DATALOG_TIME_2S
= 2,
55
DATALOG_TIME_3S
= 3,
56
DATALOG_TIME_4S
= 4,
57
DATALOG_TIME_5S
= 5,
58
DATALOG_TIME_10S
= 10,
59
DATALOG_TIME_20S
= 20,
60
DATALOG_TIME_30S
= 30,
61
DATALOG_TIME_40S
= 40,
62
DATALOG_TIME_50S
= 50,
63
DATALOG_TIME_60S
= 60,
64
}
DATALOG_TIME_te
;
65
72
typedef
struct
{
74
char
name
[CONFIG_SD_MAX_NAME_LEN];
75
77
DATALOG_TIME_te
datalog_time
;
78
}
DATALOG_CFG_ts
;
79
88
typedef
struct
datalog_handle_s
DATALOG_HANDLE_ts
;
89
91
98
115
ERR_te
datalog_init_subsys
(
void
);
116
129
ERR_te
datalog_deinit_subsys
(
void
);
130
144
ERR_te
datalog_start_subsys
(
void
);
145
159
ERR_te
datalog_stop_subsys
(
void
);
160
179
ERR_te
datalog_init_handle
(
DATALOG_CFG_ts
const
*datalog_cfg,
DATALOG_HANDLE_ts
**datalog_handle_o);
180
195
ERR_te
datalog_deinit_handle
(
DATALOG_HANDLE_ts
const
*
datalog_handle
);
196
215
ERR_te
datalog_run_handle
(
DATALOG_HANDLE_ts
*
datalog_handle
);
216
218
219
#endif
220
err.h
System-wide error code definitions.
datalog_init_handle
ERR_te datalog_init_handle(DATALOG_CFG_ts const *datalog_cfg, DATALOG_HANDLE_ts **datalog_handle_o)
Initializes and registers a data log handle.
Definition
datalog.c:247
datalog_stop_subsys
ERR_te datalog_stop_subsys(void)
Stops the data log subsystem.
Definition
datalog.c:223
datalog_deinit_handle
ERR_te datalog_deinit_handle(DATALOG_HANDLE_ts const *datalog_handle)
Deinitializes a data log handle.
Definition
datalog.c:329
datalog_run_handle
ERR_te datalog_run_handle(DATALOG_HANDLE_ts *datalog_handle)
Writes a GPS data entry to the log file if the logging interval has elapsed.
Definition
datalog.c:384
datalog_start_subsys
ERR_te datalog_start_subsys(void)
Starts the data log subsystem.
Definition
datalog.c:199
datalog_deinit_subsys
ERR_te datalog_deinit_subsys(void)
Deinitializes the data log subsystem.
Definition
datalog.c:174
datalog_init_subsys
ERR_te datalog_init_subsys(void)
Initializes the data log subsystem.
Definition
datalog.c:137
DATALOG_HANDLE_ts
struct datalog_handle_s DATALOG_HANDLE_ts
Opaque handle representing a data log instance.
Definition
datalog.h:88
DATALOG_TIME_te
DATALOG_TIME_te
Logging interval in seconds between consecutive log entries.
Definition
datalog.h:52
DATALOG_TIME_40S
@ DATALOG_TIME_40S
Definition
datalog.h:61
DATALOG_TIME_20S
@ DATALOG_TIME_20S
Definition
datalog.h:59
DATALOG_TIME_3S
@ DATALOG_TIME_3S
Definition
datalog.h:55
DATALOG_TIME_10S
@ DATALOG_TIME_10S
Definition
datalog.h:58
DATALOG_TIME_4S
@ DATALOG_TIME_4S
Definition
datalog.h:56
DATALOG_TIME_2S
@ DATALOG_TIME_2S
Definition
datalog.h:54
DATALOG_TIME_60S
@ DATALOG_TIME_60S
Definition
datalog.h:63
DATALOG_TIME_30S
@ DATALOG_TIME_30S
Definition
datalog.h:60
DATALOG_TIME_1S
@ DATALOG_TIME_1S
Definition
datalog.h:53
DATALOG_TIME_50S
@ DATALOG_TIME_50S
Definition
datalog.h:62
DATALOG_TIME_5S
@ DATALOG_TIME_5S
Definition
datalog.h:57
ERR_te
ERR_te
Standard return type used by all public API functions.
Definition
err.h:35
datalog_handle
DATALOG_HANDLE_ts * datalog_handle
Definition
main.c:66
DATALOG_CFG_ts
Configuration structure for initializing a data log handle.
Definition
datalog.h:72
DATALOG_CFG_ts::name
char name[CONFIG_SD_MAX_NAME_LEN]
Definition
datalog.h:74
DATALOG_CFG_ts::datalog_time
DATALOG_TIME_te datalog_time
Definition
datalog.h:77
datalog_handle_s
Internal structure representing a single data log instance.
Definition
datalog.c:37
core
inc
datalog.h
Generated by
1.14.0