SELKIELogger
1.0.0
|
Classes | |
struct | lpms_params |
Serial device specific parameters. More... | |
Functions | |
void * | lpms_setup (void *ptargs) |
Generic serial connection setup. More... | |
bool | lpms_queue_message (msgqueue *Q, const uint8_t src, const uint8_t chan, const float val) |
Helper function: Create and queue data messages, with error handling. More... | |
void * | lpms_logging (void *ptargs) |
Serial source main logging loop. More... | |
void * | lpms_shutdown (void *ptargs) |
Serial source shutdown. More... | |
void * | lpms_channels (void *ptargs) |
Serial source channel map. More... | |
device_callbacks | lpms_getCallbacks (void) |
Fill out device callback functions for logging. More... | |
lpms_params | lpms_getParams (void) |
Fill out default MP source parameters. More... | |
bool | lpms_parseConfig (log_thread_args_t *lta, config_section *s) |
Take a configuration section and parse parameters. More... | |
Adds support for LPMS IMU devices.
void* lpms_channels | ( | void * | ptargs | ) |
Serial source channel map.
Populate list of channels and push to queue as a map message
Exits thread in case of error.
[in] | ptargs | Pointer to log_thread_args_t |
Definition at line 466 of file LoggerLPMS.c.
device_callbacks lpms_getCallbacks | ( | void | ) |
Fill out device callback functions for logging.
Definition at line 441 of file LoggerLPMS.c.
lpms_params lpms_getParams | ( | void | ) |
Fill out default MP source parameters.
Definition at line 452 of file LoggerLPMS.c.
void* lpms_logging | ( | void * | ptargs | ) |
Serial source main logging loop.
Reads messages from the connection established by lpms_setup(), and pushes them to the queue. Data is not interpreted, just pushed into the queue with suitable headers.
Message size is variable, based on min/max limits and the amount of data available to read from the source.
Terminates thread in case of error.
[in] | ptargs | Pointer to log_thread_args_t |
Definition at line 159 of file LoggerLPMS.c.
bool lpms_parseConfig | ( | log_thread_args_t * | lta, |
config_section * | s | ||
) |
Take a configuration section and parse parameters.
[in] | lta | Pointer to log_thread_args_t |
[in] | s | Pointer to config_section to be parsed |
Definition at line 532 of file LoggerLPMS.c.
|
inline |
Helper function: Create and queue data messages, with error handling.
Create a floating point value message for the specified source and channel numbers, and push it to the queue (Q). If unable to create or push the message, tidy up and return false.
Reduces code duplication in lpms_logging()
[in] | Q | Pointer to message queue |
[in] | src | Message source number |
[in] | chan | Message type/channel number |
[in] | val | Message value |
Definition at line 136 of file LoggerLPMS.c.
void* lpms_setup | ( | void * | ptargs | ) |
Generic serial connection setup.
Opens a serial connection and the required baud rate.
[in] | ptargs | Pointer to log_thread_args_t |
Definition at line 58 of file LoggerLPMS.c.
void* lpms_shutdown | ( | void * | ptargs | ) |
Serial source shutdown.
Simple wrapper around lpms_closeConnection(), which will do any cleanup required.
[in] | ptargs | Pointer to log_thread_args_t |
Definition at line 423 of file LoggerLPMS.c.