SELKIELogger  1.0.0
#include "strarray.h"
#include <stdint.h>
Include dependency graph for messages.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

union  msg_data_t
 
struct  msg_t
 Queuable message. More...
 

Enumerations

enum  msg_dtype_t {
  MSG_ERROR = -1 , MSG_UNDEF = 0 , MSG_FLOAT , MSG_TIMESTAMP ,
  MSG_BYTES , MSG_STRING , MSG_STRARRAY , MSG_NUMARRAY
}
 Each data type should map to an entry in the msg_data_t union. More...
 

Functions

msg_tmsg_new_float (const uint8_t source, const uint8_t type, const float val)
 Create new message with a single numeric value. More...
 
msg_tmsg_new_timestamp (const uint8_t source, const uint8_t type, const uint32_t ts)
 Create a timestamp message. More...
 
msg_tmsg_new_string (const uint8_t source, const uint8_t type, const size_t len, const char *str)
 Create a new message with a single string embedded. More...
 
msg_tmsg_new_string_array (const uint8_t source, const uint8_t type, const strarray *array)
 Create a new message containing an array of strings. More...
 
msg_tmsg_new_bytes (const uint8_t source, const uint8_t type, const size_t len, const uint8_t *bytes)
 Create a new message containing raw binary data. More...
 
msg_tmsg_new_float_array (const uint8_t source, const uint8_t type, const size_t entries, const float *array)
 Create a new message containing an array of floating point data. More...
 
char * msg_to_string (const msg_t *msg)
 Generate string representation of message. More...
 
char * msg_data_to_string (const msg_t *msg)
 Generate string representation of message data. More...
 
char * msg_data_narr_to_string (const msg_t *msg)
 Convert numerical array to string. More...
 
char * msg_data_sarr_to_string (const msg_t *msg)
 Represent string array as single string. More...
 
void msg_destroy (msg_t *msg)
 Destroy a message. More...
 

Detailed Description

Message data types and handling functions

Definition in file messages.h.