RocketLogger  1.0
rl_lib.h File Reference
#include "lib_util.h"
#include "types.h"
#include "rl_hw.h"
#include "util.h"
+ Include dependency graph for rl_lib.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

rl_state rl_get_status (void)
 
int rl_read_status (struct rl_status *status)
 
void rl_read_calibration (struct rl_calibration *calibration_ptr, struct rl_conf *conf)
 
int rl_start (struct rl_conf *conf)
 
int rl_stop (void)
 

Function Documentation

rl_state rl_get_status ( void  )

Copyright (c) 2016-2017, ETH Zurich, Computer Engineering Group

Copyright (c) 2016-2017, ETH Zurich, Computer Engineering Group Get status of RocketLogger

Returns
current status rl_state

Definition at line 11 of file rl_lib.c.

References FAILURE, get_pid(), read_status(), RL_OFF, and rl_status::state.

Referenced by main(), and rl_stop().

+ Here is the call graph for this function:

void rl_read_calibration ( struct rl_calibration calibration_ptr,
struct rl_conf conf 
)

Read calibration file

Parameters
calibration_ptrPointer to rl_calibration to write to
confCurrent rl_conf configuration

Definition at line 52 of file rl_lib.c.

References calibration, and read_calibration().

Referenced by print_status().

+ Here is the call graph for this function:

int rl_read_status ( struct rl_status status)

Read status of RocketLogger

Parameters
statusPointer to rl_status struct to write to
Returns
current status rl_state

Definition at line 33 of file rl_lib.c.

References FAILURE, get_pid(), read_status(), RL_OFF, and rl_status::state.

Referenced by main().

+ Here is the call graph for this function:

int rl_start ( struct rl_conf conf)

RocketLogger start function: start sampling

Parameters
confPointer to desired rl_conf configuration
Returns
SUCCESS in case of success, FAILURE otherwise

Definition at line 62 of file rl_lib.c.

References check_sample_rate(), check_update_rate(), CONTINUOUS, rl_conf::enable_web_server, ERROR, FAILURE, rl_conf::file_format, hw_close(), hw_init(), hw_sample(), INFO, LIMIT, METER, METER_UPDATE_RATE, MIN_ADC_RATE, rl_conf::mode, NO_FILE, rl_log(), rl_conf::sample_limit, rl_conf::sample_rate, set_pid(), sig_handler(), SUCCESS, rl_conf::update_rate, and WARNING.

Referenced by main().

+ Here is the call graph for this function:

int rl_stop ( void  )

RocketLogger stop function (to stop continuous mode)

Returns
SUCCESS in case of success, FAILURE otherwise

Definition at line 137 of file rl_lib.c.

References ERROR, FAILURE, get_pid(), rl_get_status(), rl_log(), RL_RUNNING, and SUCCESS.

Referenced by main().

+ Here is the call graph for this function: