SELKIELogger  1.0.0
Logger: Generic serial device support
Collaboration diagram for Logger: Generic serial device support:

Classes

struct  rx_params
 Serial device specific parameters. More...
 

Functions

void * rx_setup (void *ptargs)
 Generic serial connection setup. More...
 
void * rx_logging (void *ptargs)
 Serial source main logging loop. More...
 
void * rx_shutdown (void *ptargs)
 Serial source shutdown. More...
 
void * rx_channels (void *ptargs)
 Serial source channel map. More...
 
device_callbacks rx_getCallbacks (void)
 Fill out device callback functions for logging. More...
 
rx_params rx_getParams (void)
 Fill out default MP source parameters. More...
 
bool rx_parseConfig (log_thread_args_t *lta, config_section *s)
 Take a configuration section and parse parameters. More...
 

Detailed Description

Adds support for reading arbitrary serial data from devices that output messages not otherwise covered or interpreted by this software.

Function Documentation

◆ rx_channels()

void* rx_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.

Parameters
[in]ptargsPointer to log_thread_args_t
Returns
NULL - Exit code in ptargs->returnCode if required

Definition at line 167 of file LoggerSerial.c.

◆ rx_getCallbacks()

device_callbacks rx_getCallbacks ( void  )

Fill out device callback functions for logging.

Returns
device_callbacks for serial sources

Definition at line 138 of file LoggerSerial.c.

◆ rx_getParams()

rx_params rx_getParams ( void  )

Fill out default MP source parameters.

Returns
Default parameters for serial sources

Definition at line 149 of file LoggerSerial.c.

◆ rx_logging()

void* rx_logging ( void *  ptargs)

Serial source main logging loop.

Reads messages from the connection established by rx_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.

Parameters
[in]ptargsPointer to log_thread_args_t
Returns
NULL - Exit code in ptargs->returnCode if required

Definition at line 62 of file LoggerSerial.c.

◆ rx_parseConfig()

bool rx_parseConfig ( log_thread_args_t lta,
config_section s 
)

Take a configuration section and parse parameters.

Parameters
[in]ltaPointer to log_thread_args_t
[in]sPointer to config_section to be parsed
Returns
True on success, false on error

Definition at line 210 of file LoggerSerial.c.

◆ rx_setup()

void* rx_setup ( void *  ptargs)

Generic serial connection setup.

Opens a serial connection and the required baud rate.

It is assumed that no other setup is required for these devices.

Parameters
[in]ptargsPointer to log_thread_args_t
Returns
NULL - Exit code in ptargs->returnCode if required

Definition at line 34 of file LoggerSerial.c.

◆ rx_shutdown()

void* rx_shutdown ( void *  ptargs)

Serial source shutdown.

Simple wrapper around rx_closeConnection(), which will do any cleanup required.

Parameters
[in]ptargsPointer to log_thread_args_t
Returns
NULL - Exit code in ptargs->returnCode if required

Definition at line 120 of file LoggerSerial.c.