44 if (pid ==
FAILURE || kill(pid, 0) < 0) {
64 if (pid ==
FAILURE || kill(pid, 0) < 0) {
99 if (daemon(1, 1) < 0) {
100 rl_log(
ERROR,
"failed to create background process");
111 rl_log(
WARNING,
"too low sample rate. Setting rate to 1kSps");
130 rl_log(
WARNING,
"webserver plot does not work with update rates >1. " 131 "Disabling webserver ...");
140 "Ambient logging not possible without file. Disabling ambient ...");
145 pid_t pid = getpid();
162 rl_log(
WARNING,
"No ambient sensor found. Disabling ambient ...");
Limited sampling mode (limited by number of samples to take)
rl_mode mode
Sampling mode.
Continuous sampling mode (in background)
#define METER_UPDATE_RATE
Data update rate in METER mode.
int check_sample_rate(int sample_rate)
struct rl_status status
Current status of RocketLogger.
void rl_log(rl_log_type type, const char *format,...)
int read_status(struct rl_status *status)
struct rl_ambient ambient
Ambient conf.
int enable_web_server
En-/disable plots on web interface.
int check_update_rate(int update_rate)
int sample_limit
Sample limit (0 for continuous)
int hw_sample(struct rl_conf *conf, char *file_comment)
void sig_handler(int signo)
void rl_read_calibration(struct rl_calibration *calibration_ptr, struct rl_conf *conf)
rl_file_format file_format
File format.
int update_rate
Data update rate.
int rl_start(struct rl_conf *conf, char *file_comment)
struct rl_conf conf
Current configuration.
int sample_rate
Sampling rate.
void hw_init(struct rl_conf *conf)
rl_state rl_get_status(void)
#define MIN_ADC_RATE
Minimal ADC sampling rate.
Meter mode (display current values in terminal)
void hw_close(struct rl_conf *conf)
int read_calibration(struct rl_conf *conf)
int rl_read_status(struct rl_status *status)
struct rl_calibration calibration
Calibration data.