SELKIELogger  1.0.0
Collaboration diagram for Logger: Native device support:

Classes

struct  mp_params
 MP Source device specific parameters. More...
 

Functions

void * mp_setup (void *ptargs)
 MP connection setup. More...
 
void * mp_logging (void *ptargs)
 MP source main logging loop. More...
 
void * mp_channels (void *ptargs)
 Push device information from cache to queue. More...
 
void * mp_shutdown (void *ptargs)
 MP source shutdown. More...
 
device_callbacks mp_getCallbacks (void)
 Fill out device callback functions for logging. More...
 
mp_params mp_getParams (void)
 Fill out default MP source parameters. More...
 
bool mp_parseConfig (log_thread_args_t *lta, config_section *s)
 Take a configuration section and parse parameters. More...
 

Detailed Description

Adds support for reading messages from devices that directly output message pack format messages.

Reading messages from the device and validating the messages is handled by the functions documented in SELKIELoggerMP.h

Function Documentation

◆ mp_channels()

void* mp_channels ( void *  ptargs)

Push device information from cache to queue.

Duplicate cached channel map and enqueue

Terminates thread on error.

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

Definition at line 164 of file LoggerMP.c.

◆ mp_getCallbacks()

device_callbacks mp_getCallbacks ( void  )

Fill out device callback functions for logging.

Returns
device_callbacks for SELKIELogger serial devices

Definition at line 224 of file LoggerMP.c.

◆ mp_getParams()

mp_params mp_getParams ( void  )

Fill out default MP source parameters.

Returns
Default parameters for SELKIELogger serial devices

Definition at line 235 of file LoggerMP.c.

◆ mp_logging()

void* mp_logging ( void *  ptargs)

MP source main logging loop.

Reads messages from the serial connection established by mp_setup(), and pushes them to the queue. As messages are already in the right format, no further processing is done here.

Parameters
[in]ptargsPointer to log_thread_args_t
Returns
NULL - Error code stored in ptarges->returnCode if required

Definition at line 57 of file LoggerMP.c.

◆ mp_parseConfig()

bool mp_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 250 of file LoggerMP.c.

◆ mp_setup()

void* mp_setup ( void *  ptargs)

MP connection setup.

Uses mp_openConnection to connect to a device providing messge pack formatted data. It is assumed that no other setup is required for these devices.

Parameters
[in]ptargsPointer to log_thread_args_t
Returns
NULL - Error code stored in ptarges->returnCode if required

Definition at line 33 of file LoggerMP.c.

◆ mp_shutdown()

void* mp_shutdown ( void *  ptargs)

MP source shutdown.

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

Parameters
[in]ptargsPointer to log_thread_args_t
Returns
NULL

Definition at line 206 of file LoggerMP.c.