libxchg
Public Member Functions
xchg_message Struct Reference

Represents a stream of values that can be encoded and decoded using the xchg_message_* family of functions. More...

#include <xchg.h>

Public Member Functions

bool xchg_message_init (struct xchg_message *message, char *data, size_t sz_data)
 Resets message and configures it to use the underlying buffer data of size sz_data. More...
 
bool xchg_message_reset (struct xchg_message *message)
 Seeks to the beginning of the underlying buffer of message and resets its error state. More...
 
bool xchg_message_position (struct xchg_message *message, size_t *position)
 Provides the current position in the underlying buffer of message. More...
 
bool xchg_message_seek (struct xchg_message *message, size_t position)
 Seeks to position in the underlying buffer of message. More...
 
bool xchg_message_peek (struct xchg_message *message, enum xchg_type *type, bool *null, bool *list, uint64_t *sz_list)
 Provides information about the next value in message, without advancing its underlying buffer position. More...
 
const char * xchg_message_strerror (const struct xchg_message *message)
 Provides a static string describing the error that occurred during the last operation on message. More...
 
bool xchg_message_read_null (struct xchg_message *message, enum xchg_type *type)
 Reads a null value from message and advances the underlying buffer position. More...
 
bool xchg_message_read_null_list (struct xchg_message *message, enum xchg_type *type)
 Reads a null list from message and advances the underlying buffer position. More...
 
bool xchg_message_read_bool (struct xchg_message *message, bool *value)
 Reads a bool from message and advances the underlying buffer position. More...
 
bool xchg_message_read_bool_list (struct xchg_message *message, bool const *list[], uint64_t *sz_list)
 Reads a list of bool from message and advances the underlying buffer position. More...
 
bool xchg_message_read_int8 (struct xchg_message *message, int8_t *value)
 Reads an int8_t from message and advances the underlying buffer position. More...
 
bool xchg_message_read_int8_list (struct xchg_message *message, int8_t const *list[], uint64_t *sz_list)
 Reads a list of int8_t from message and advances the underlying buffer position. More...
 
bool xchg_message_read_uint8 (struct xchg_message *message, uint8_t *value)
 Reads a uint8_t from message and advances the underlying buffer position. More...
 
bool xchg_message_read_uint8_list (struct xchg_message *message, uint8_t const *list[], uint64_t *sz_list)
 Reads a list of uint8_t from message and advances the underlying buffer position. More...
 
bool xchg_message_read_int16 (struct xchg_message *message, int16_t *value)
 Reads an int16_t from message and advances the underlying buffer position. More...
 
bool xchg_message_read_int16_list (struct xchg_message *message, int16_t const *list[], uint64_t *sz_list)
 Reads a list of int16_t from message and advances the underlying buffer position. More...
 
bool xchg_message_read_uint16 (struct xchg_message *message, uint16_t *value)
 Reads a uint16_t from message and advances the underlying buffer position. More...
 
bool xchg_message_read_uint16_list (struct xchg_message *message, uint16_t const *list[], uint64_t *sz_list)
 Reads a list of uint16_t from message and advances the underlying buffer position. More...
 
bool xchg_message_read_int32 (struct xchg_message *message, int32_t *value)
 Reads an int32_t from message and advances the underlying buffer position. More...
 
bool xchg_message_read_int32_list (struct xchg_message *message, int32_t const *list[], uint64_t *sz_list)
 Reads a list of int32_t from message and advances the underlying buffer position. More...
 
bool xchg_message_read_uint32 (struct xchg_message *message, uint32_t *value)
 Reads a uint32_t from message and advances the underlying buffer position. More...
 
bool xchg_message_read_uint32_list (struct xchg_message *message, uint32_t const *list[], uint64_t *sz_list)
 Reads a list of uint32_t from message and advances the underlying buffer position. More...
 
bool xchg_message_read_int64 (struct xchg_message *message, int64_t *value)
 Reads an int64_t from message and advances the underlying buffer position. More...
 
bool xchg_message_read_int64_list (struct xchg_message *message, int64_t const *list[], uint64_t *sz_list)
 Reads a list of int64_t from message and advances the underlying buffer position. More...
 
bool xchg_message_read_uint64 (struct xchg_message *message, uint64_t *value)
 Reads a uint64_t from message and advances the underlying buffer position. More...
 
bool xchg_message_read_uint64_list (struct xchg_message *message, uint64_t const *list[], uint64_t *sz_list)
 Reads a list of uint64_t from message and advances the underlying buffer position. More...
 
bool xchg_message_read_float32 (struct xchg_message *message, float_t *value)
 Reads a float32_t from message and advances the underlying buffer position. More...
 
bool xchg_message_read_float32_list (struct xchg_message *message, float_t const *list[], uint64_t *sz_list)
 Reads a list of float32_t from message and advances the underlying buffer position. More...
 
bool xchg_message_read_float64 (struct xchg_message *message, double_t *value)
 Reads a float64_t from message and advances the underlying buffer position. More...
 
bool xchg_message_read_float64_list (struct xchg_message *message, double_t const *list[], uint64_t *sz_list)
 Reads a list of float64_t from message and advances the underlying buffer position. More...
 
bool xchg_message_write_null (struct xchg_message *message, enum xchg_type type)
 Writes a null type to message and advances the underlying buffer position. More...
 
bool xchg_message_write_null_list (struct xchg_message *message, enum xchg_type type)
 Writes a null list of type to message and advances the underlying buffer position. More...
 
bool xchg_message_write_bool (struct xchg_message *message, bool value)
 Writes a bool value to message and advances the underlying buffer position. More...
 
bool xchg_message_write_bool_list (struct xchg_message *message, const bool list[], uint64_t sz_list)
 Writes a bool[] list of size sz_list to message and advances the underlying buffer position. More...
 
bool xchg_message_write_int8 (struct xchg_message *message, int8_t value)
 Writes an int8_t value to message and advances the underlying buffer position. More...
 
bool xchg_message_write_int8_list (struct xchg_message *message, const int8_t list[], uint64_t sz_list)
 Writes an int8_t[] list of size sz_list to message and advances the underlying buffer position. More...
 
bool xchg_message_write_uint8 (struct xchg_message *message, uint8_t value)
 Writes a uint8_t value to message and advances the underlying buffer position. More...
 
bool xchg_message_write_uint8_list (struct xchg_message *message, const uint8_t list[], uint64_t sz_list)
 Writes a uint8_t[] list of size sz_list to message and advances the underlying buffer position. More...
 
bool xchg_message_write_int16 (struct xchg_message *message, int16_t value)
 Writes an int16_t value to message and advances the underlying buffer position. More...
 
bool xchg_message_write_int16_list (struct xchg_message *message, const int16_t list[], uint64_t sz_list)
 Writes an int16_t[] list of size sz_list to message and advances the underlying buffer position. More...
 
bool xchg_message_write_uint16 (struct xchg_message *message, uint16_t value)
 Writes a uint16_t value to message and advances the underlying buffer position. More...
 
bool xchg_message_write_uint16_list (struct xchg_message *message, const uint16_t list[], uint64_t sz_list)
 Writes a uint16_t[] list of size sz_list to message and advances the underlying buffer position. More...
 
bool xchg_message_write_int32 (struct xchg_message *message, int32_t value)
 Writes an int32_t value to message and advances the underlying buffer position. More...
 
bool xchg_message_write_int32_list (struct xchg_message *message, const int32_t list[], uint64_t sz_list)
 Writes an int32_t[] list of size sz_list to message and advances the underlying buffer position. More...
 
bool xchg_message_write_uint32 (struct xchg_message *message, uint32_t value)
 Writes a uint32_t value to message and advances the underlying buffer position. More...
 
bool xchg_message_write_uint32_list (struct xchg_message *message, const uint32_t list[], uint64_t sz_list)
 Writes a uint32_t[] list of size sz_list to message and advances the underlying buffer position. More...
 
bool xchg_message_write_int64 (struct xchg_message *message, int64_t value)
 Writes an int64_t value to message and advances the underlying buffer position. More...
 
bool xchg_message_write_int64_list (struct xchg_message *message, const int64_t list[], uint64_t sz_list)
 Writes an int64_t[] list of size sz_list to message and advances the underlying buffer position. More...
 
bool xchg_message_write_uint64 (struct xchg_message *message, uint64_t value)
 Writes a uint64_t value to message and advances the underlying buffer position. More...
 
bool xchg_message_write_uint64_list (struct xchg_message *message, const uint64_t list[], uint64_t sz_list)
 Writes a uint64_t[] list of size sz_list to message and advances the underlying buffer position. More...
 
bool xchg_message_write_float32 (struct xchg_message *message, float_t value)
 Writes a float32_t value to message and advances the underlying buffer position. More...
 
bool xchg_message_write_float32_list (struct xchg_message *message, const float_t list[], uint64_t sz_list)
 Writes a float32_t[] list of size sz_list to message and advances the underlying buffer position. More...
 
bool xchg_message_write_float64 (struct xchg_message *message, double_t value)
 Writes a float64_t value to message and advances the underlying buffer position. More...
 
bool xchg_message_write_float64_list (struct xchg_message *message, const double_t list[], uint64_t sz_list)
 Writes a float64_t[] list of size sz_list to message and advances the underlying buffer position. More...
 

Detailed Description

Represents a stream of values that can be encoded and decoded using the xchg_message_* family of functions.

Note
This type should be treated as opaque. Use the various xchg_message_* accessor functions to manipulate messages.

Member Function Documentation

◆ xchg_message_init()

bool xchg_message_init ( struct xchg_message message,
char *  data,
size_t  sz_data 
)

Resets message and configures it to use the underlying buffer data of size sz_data.

Parameters
[in]messagepointer to an xchg_message structure
[in]datapointer to a memory buffer
[in]sz_datasize of the data memory buffer
Returns
true if the xchg_message was initialized, or false if invalid arguments were provided
Note
Do not initialize an xchg_message that you plan to use with an xchg_channel. Instead, use xchg_channel_prepare or xchg_channel_receive to initialize the xchg_message with memory that is backed by the channel's underlying ingress/egress buffers.

◆ xchg_message_peek()

bool xchg_message_peek ( struct xchg_message message,
enum xchg_type *  type,
bool *  null,
bool *  list,
uint64_t *  sz_list 
)

Provides information about the next value in message, without advancing its underlying buffer position.

Parameters
[in]messagepointer to an xchg_message structure
[out]typeoptional pointer to storage for an xchg_type which will indicate the datatype of the next value or list
[out]nulloptional pointer to storage for a bool which will indicate whether the next value is null
[out]listoptional pointer to storage for a bool which will indicate whether the next value is a list
[out]sz_listoptional pointer to storage for a uint64_t which will indicate the number of entries in the list
Returns
true if a valid next value is available in message, otherwise false
Note
If this function succeeds, then calling the corresponding xchg_read_* function is guaranteed to succeed.

◆ xchg_message_position()

bool xchg_message_position ( struct xchg_message message,
size_t *  position 
)

Provides the current position in the underlying buffer of message.

Parameters
[in]messagepointer to an xchg_message structure
[out]positionpointer to storage for the current position in the underlying buffer of message
Returns
true if the position argument was filled, or false if invalid arguments were provided

◆ xchg_message_read_bool()

bool xchg_message_read_bool ( struct xchg_message message,
bool *  value 
)

Reads a bool from message and advances the underlying buffer position.

Parameters
[in]messagepointer to an xchg_message structure
[out]valuepointer to storage for a bool which will hold the value
Returns
true if a bool was read, otherwise false

◆ xchg_message_read_bool_list()

bool xchg_message_read_bool_list ( struct xchg_message message,
bool const *  list[],
uint64_t *  sz_list 
)

Reads a list of bool from message and advances the underlying buffer position.

Parameters
[in]messagepointer to an xchg_message structure
[out]listpointer to storage for a bool[] which will contain the list
[out]sz_listpointer to storage for a uint64_t which will indicate the number of entries in list
Returns
true if a list of bool was read, otherwise false

◆ xchg_message_read_float32()

bool xchg_message_read_float32 ( struct xchg_message message,
float_t *  value 
)

Reads a float32_t from message and advances the underlying buffer position.

Parameters
[in]messagepointer to an xchg_message structure
[out]valuepointer to storage for a float32_t which will hold the value
Returns
true if a float32_t was read, otherwise false

◆ xchg_message_read_float32_list()

bool xchg_message_read_float32_list ( struct xchg_message message,
float_t const *  list[],
uint64_t *  sz_list 
)

Reads a list of float32_t from message and advances the underlying buffer position.

Parameters
[in]messagepointer to an xchg_message structure
[out]listpointer to storage for a float32_t[] which will contain the list
[out]sz_listpointer to storage for a uint64_t which will indicate the number of entries in list
Returns
true if a list of float32_t was read, otherwise false

◆ xchg_message_read_float64()

bool xchg_message_read_float64 ( struct xchg_message message,
double_t *  value 
)

Reads a float64_t from message and advances the underlying buffer position.

Parameters
[in]messagepointer to an xchg_message structure
[out]valuepointer to storage for a float64_t which will hold the value
Returns
true if a float64_t was read, otherwise false

◆ xchg_message_read_float64_list()

bool xchg_message_read_float64_list ( struct xchg_message message,
double_t const *  list[],
uint64_t *  sz_list 
)

Reads a list of float64_t from message and advances the underlying buffer position.

Parameters
[in]messagepointer to an xchg_message structure
[out]listpointer to storage for a float64_t[] which will contain the list
[out]sz_listpointer to storage for a uint64_t which will indicate the number of entries in list
Returns
true if a list of float64_t was read, otherwise false

◆ xchg_message_read_int16()

bool xchg_message_read_int16 ( struct xchg_message message,
int16_t *  value 
)

Reads an int16_t from message and advances the underlying buffer position.

Parameters
[in]messagepointer to an xchg_message structure
[out]valuepointer to storage for an int16_t which will hold the value
Returns
true if an int16_t was read, otherwise false

◆ xchg_message_read_int16_list()

bool xchg_message_read_int16_list ( struct xchg_message message,
int16_t const *  list[],
uint64_t *  sz_list 
)

Reads a list of int16_t from message and advances the underlying buffer position.

Parameters
[in]messagepointer to an xchg_message structure
[out]listpointer to storage for an int16_t[] which will contain the list
[out]sz_listpointer to storage for a uint64_t which will indicate the number of entries in list
Returns
true if a list of int16_t was read, otherwise false

◆ xchg_message_read_int32()

bool xchg_message_read_int32 ( struct xchg_message message,
int32_t *  value 
)

Reads an int32_t from message and advances the underlying buffer position.

Parameters
[in]messagepointer to an xchg_message structure
[out]valuepointer to storage for an int32_t which will hold the value
Returns
true if an int32_t was read, otherwise false

◆ xchg_message_read_int32_list()

bool xchg_message_read_int32_list ( struct xchg_message message,
int32_t const *  list[],
uint64_t *  sz_list 
)

Reads a list of int32_t from message and advances the underlying buffer position.

Parameters
[in]messagepointer to an xchg_message structure
[out]listpointer to storage for an int32_t[] which will contain the list
[out]sz_listpointer to storage for a uint64_t which will indicate the number of entries in list
Returns
true if a list of int32_t was read, otherwise false

◆ xchg_message_read_int64()

bool xchg_message_read_int64 ( struct xchg_message message,
int64_t *  value 
)

Reads an int64_t from message and advances the underlying buffer position.

Parameters
[in]messagepointer to an xchg_message structure
[out]valuepointer to storage for an int64_t which will hold the value
Returns
true if an int64_t was read, otherwise false

◆ xchg_message_read_int64_list()

bool xchg_message_read_int64_list ( struct xchg_message message,
int64_t const *  list[],
uint64_t *  sz_list 
)

Reads a list of int64_t from message and advances the underlying buffer position.

Parameters
[in]messagepointer to an xchg_message structure
[out]listpointer to storage for an int64_t[] which will contain the list
[out]sz_listpointer to storage for a uint64_t which will indicate the number of entries in list
Returns
true if a list of int64_t was read, otherwise false

◆ xchg_message_read_int8()

bool xchg_message_read_int8 ( struct xchg_message message,
int8_t *  value 
)

Reads an int8_t from message and advances the underlying buffer position.

Parameters
[in]messagepointer to an xchg_message structure
[out]valuepointer to storage for an int8_t which will hold the value
Returns
true if an int8_t was read, otherwise false

◆ xchg_message_read_int8_list()

bool xchg_message_read_int8_list ( struct xchg_message message,
int8_t const *  list[],
uint64_t *  sz_list 
)

Reads a list of int8_t from message and advances the underlying buffer position.

Parameters
[in]messagepointer to an xchg_message structure
[out]listpointer to storage for an int8_t[] which will contain the list
[out]sz_listpointer to storage for a uint64_t which will indicate the number of entries in list
Returns
true if a list of int8_t was read, otherwise false

◆ xchg_message_read_null()

bool xchg_message_read_null ( struct xchg_message message,
enum xchg_type *  type 
)

Reads a null value from message and advances the underlying buffer position.

Parameters
[in]messagepointer to an xchg_message structure
[out]typepointer to storage for an xchg_type which will indicate the datatype of the null value
Returns
true if a null value was read, otherwise false

◆ xchg_message_read_null_list()

bool xchg_message_read_null_list ( struct xchg_message message,
enum xchg_type *  type 
)

Reads a null list from message and advances the underlying buffer position.

Parameters
[in]messagepointer to an xchg_message structure
[out]typepointer to storage for an xchg_type which will indicate the datatype of entries in the null list
Returns
true if a null list was read, otherwise false

◆ xchg_message_read_uint16()

bool xchg_message_read_uint16 ( struct xchg_message message,
uint16_t *  value 
)

Reads a uint16_t from message and advances the underlying buffer position.

Parameters
[in]messagepointer to an xchg_message structure
[out]valuepointer to storage for a uint16_t which will hold the value
Returns
true if a uint16_t was read, otherwise false

◆ xchg_message_read_uint16_list()

bool xchg_message_read_uint16_list ( struct xchg_message message,
uint16_t const *  list[],
uint64_t *  sz_list 
)

Reads a list of uint16_t from message and advances the underlying buffer position.

Parameters
[in]messagepointer to an xchg_message structure
[out]listpointer to storage for a uint16_t[] which will contain the list
[out]sz_listpointer to storage for a uint64_t which will indicate the number of entries in list
Returns
true if a list of uint16_t was read, otherwise false

◆ xchg_message_read_uint32()

bool xchg_message_read_uint32 ( struct xchg_message message,
uint32_t *  value 
)

Reads a uint32_t from message and advances the underlying buffer position.

Parameters
[in]messagepointer to an xchg_message structure
[out]valuepointer to storage for a uint32_t which will hold the value
Returns
true if a uint32_t was read, otherwise false

◆ xchg_message_read_uint32_list()

bool xchg_message_read_uint32_list ( struct xchg_message message,
uint32_t const *  list[],
uint64_t *  sz_list 
)

Reads a list of uint32_t from message and advances the underlying buffer position.

Parameters
[in]messagepointer to an xchg_message structure
[out]listpointer to storage for a uint32_t[] which will contain the list
[out]sz_listpointer to storage for a uint32_t which will indicate the number of entries in list
Returns
true if a list of uint32_t was read, otherwise false

◆ xchg_message_read_uint64()

bool xchg_message_read_uint64 ( struct xchg_message message,
uint64_t *  value 
)

Reads a uint64_t from message and advances the underlying buffer position.

Parameters
[in]messagepointer to an xchg_message structure
[out]valuepointer to storage for a uint64_t which will hold the value
Returns
true if a uint64_t was read, otherwise false

◆ xchg_message_read_uint64_list()

bool xchg_message_read_uint64_list ( struct xchg_message message,
uint64_t const *  list[],
uint64_t *  sz_list 
)

Reads a list of uint64_t from message and advances the underlying buffer position.

Parameters
[in]messagepointer to an xchg_message structure
[out]listpointer to storage for a uint64_t[] which will contain the list
[out]sz_listpointer to storage for a uint64_t which will indicate the number of entries in list
Returns
true if a list of uint64_t was read, otherwise false

◆ xchg_message_read_uint8()

bool xchg_message_read_uint8 ( struct xchg_message message,
uint8_t *  value 
)

Reads a uint8_t from message and advances the underlying buffer position.

Parameters
[in]messagepointer to an xchg_message structure
[out]valuepointer to storage for a uint8_t which will hold the value
Returns
true if a uint8_t was read, otherwise false

◆ xchg_message_read_uint8_list()

bool xchg_message_read_uint8_list ( struct xchg_message message,
uint8_t const *  list[],
uint64_t *  sz_list 
)

Reads a list of uint8_t from message and advances the underlying buffer position.

Parameters
[in]messagepointer to an xchg_message structure
[out]listpointer to storage for a uint8_t[] which will contain the list
[out]sz_listpointer to storage for a uint64_t which will indicate the number of entries in list
Returns
true if a list of uint8_t was read, otherwise false

◆ xchg_message_reset()

bool xchg_message_reset ( struct xchg_message message)

Seeks to the beginning of the underlying buffer of message and resets its error state.

Parameters
[in]messagepointer to an xchg_message structure
Returns
true if the xchg_message was reset, or false if invalid arguments were provided

◆ xchg_message_seek()

bool xchg_message_seek ( struct xchg_message message,
size_t  position 
)

Seeks to position in the underlying buffer of message.

Parameters
[in]messagepointer to an xchg_message structure
[in]positionabsolute position to seek to in the underlying buffer of message
Returns
true if the underlying buffer's position was updated, or false if the requested position is out of bounds

◆ xchg_message_strerror()

const char * xchg_message_strerror ( const struct xchg_message message)

Provides a static string describing the error that occurred during the last operation on message.

Parameters
[in]messagepointer to an xchg_message structure
Returns
pointer to a static string describing the error that occurred during the last operation on message

◆ xchg_message_write_bool()

bool xchg_message_write_bool ( struct xchg_message message,
bool  value 
)

Writes a bool value to message and advances the underlying buffer position.

Parameters
[in]messagepointer to an xchg_message structure
[in]valuebool value to write
Returns
true if a bool was written, otherwise false

◆ xchg_message_write_bool_list()

bool xchg_message_write_bool_list ( struct xchg_message message,
const bool  list[],
uint64_t  sz_list 
)

Writes a bool[] list of size sz_list to message and advances the underlying buffer position.

Parameters
[in]messagepointer to an xchg_message structure
[in]listlist of bool values to write
[in]sz_listnumber of entries in list
Returns
true if a bool[] was written, otherwise false

◆ xchg_message_write_float32()

bool xchg_message_write_float32 ( struct xchg_message message,
float_t  value 
)

Writes a float32_t value to message and advances the underlying buffer position.

Parameters
[in]messagepointer to an xchg_message structure
[in]valuefloat32_t value to write
Returns
true if a float32_t was written, otherwise false

◆ xchg_message_write_float32_list()

bool xchg_message_write_float32_list ( struct xchg_message message,
const float_t  list[],
uint64_t  sz_list 
)

Writes a float32_t[] list of size sz_list to message and advances the underlying buffer position.

Parameters
[in]messagepointer to an xchg_message structure
[in]listlist of float32_t values to write
[in]sz_listnumber of entries in list
Returns
true if a float32_t[] was written, otherwise false

◆ xchg_message_write_float64()

bool xchg_message_write_float64 ( struct xchg_message message,
double_t  value 
)

Writes a float64_t value to message and advances the underlying buffer position.

Parameters
[in]messagepointer to an xchg_message structure
[in]valuefloat64_t value to write
Returns
true if a float64_t was written, otherwise false

◆ xchg_message_write_float64_list()

bool xchg_message_write_float64_list ( struct xchg_message message,
const double_t  list[],
uint64_t  sz_list 
)

Writes a float64_t[] list of size sz_list to message and advances the underlying buffer position.

Parameters
[in]messagepointer to an xchg_message structure
[in]listlist of float64_t values to write
[in]sz_listnumber of entries in list
Returns
true if a float64_t[] was written, otherwise false

◆ xchg_message_write_int16()

bool xchg_message_write_int16 ( struct xchg_message message,
int16_t  value 
)

Writes an int16_t value to message and advances the underlying buffer position.

Parameters
[in]messagepointer to an xchg_message structure
[in]valueint16_t value to write
Returns
true if an int16_t was written, otherwise false

◆ xchg_message_write_int16_list()

bool xchg_message_write_int16_list ( struct xchg_message message,
const int16_t  list[],
uint64_t  sz_list 
)

Writes an int16_t[] list of size sz_list to message and advances the underlying buffer position.

Parameters
[in]messagepointer to an xchg_message structure
[in]listlist of int16_t values to write
[in]sz_listnumber of entries in list
Returns
true if an int16_t[] was written, otherwise false

◆ xchg_message_write_int32()

bool xchg_message_write_int32 ( struct xchg_message message,
int32_t  value 
)

Writes an int32_t value to message and advances the underlying buffer position.

Parameters
[in]messagepointer to an xchg_message structure
[in]valueint32_t value to write
Returns
true if an int32_t was written, otherwise false

◆ xchg_message_write_int32_list()

bool xchg_message_write_int32_list ( struct xchg_message message,
const int32_t  list[],
uint64_t  sz_list 
)

Writes an int32_t[] list of size sz_list to message and advances the underlying buffer position.

Parameters
[in]messagepointer to an xchg_message structure
[in]listlist of int32_t values to write
[in]sz_listnumber of entries in list
Returns
true if an int32_t[] was written, otherwise false

◆ xchg_message_write_int64()

bool xchg_message_write_int64 ( struct xchg_message message,
int64_t  value 
)

Writes an int64_t value to message and advances the underlying buffer position.

Parameters
[in]messagepointer to an xchg_message structure
[in]valueint64_t value to write
Returns
true if an int64_t was written, otherwise false

◆ xchg_message_write_int64_list()

bool xchg_message_write_int64_list ( struct xchg_message message,
const int64_t  list[],
uint64_t  sz_list 
)

Writes an int64_t[] list of size sz_list to message and advances the underlying buffer position.

Parameters
[in]messagepointer to an xchg_message structure
[in]listlist of int64_t values to write
[in]sz_listnumber of entries in list
Returns
true if an int64_t[] was written, otherwise false

◆ xchg_message_write_int8()

bool xchg_message_write_int8 ( struct xchg_message message,
int8_t  value 
)

Writes an int8_t value to message and advances the underlying buffer position.

Parameters
[in]messagepointer to an xchg_message structure
[in]valueint8_t value to write
Returns
true if an int8_t was written, otherwise false

◆ xchg_message_write_int8_list()

bool xchg_message_write_int8_list ( struct xchg_message message,
const int8_t  list[],
uint64_t  sz_list 
)

Writes an int8_t[] list of size sz_list to message and advances the underlying buffer position.

Parameters
[in]messagepointer to an xchg_message structure
[in]listlist of int8_t values to write
[in]sz_listnumber of entries in list
Returns
true if an int8_t[] was written, otherwise false

◆ xchg_message_write_null()

bool xchg_message_write_null ( struct xchg_message message,
enum xchg_type  type 
)

Writes a null type to message and advances the underlying buffer position.

Parameters
[in]messagepointer to an xchg_message structure
[in]typedatatype of the null value
Returns
true if a null value was written, otherwise false

◆ xchg_message_write_null_list()

bool xchg_message_write_null_list ( struct xchg_message message,
enum xchg_type  type 
)

Writes a null list of type to message and advances the underlying buffer position.

Parameters
[in]messagepointer to an xchg_message structure
[in]typedatatype of entries in the the null list
Returns
true if a null list was written, otherwise false

◆ xchg_message_write_uint16()

bool xchg_message_write_uint16 ( struct xchg_message message,
uint16_t  value 
)

Writes a uint16_t value to message and advances the underlying buffer position.

Parameters
[in]messagepointer to an xchg_message structure
[in]valueuint16_t value to write
Returns
true if a uint16_t was written, otherwise false

◆ xchg_message_write_uint16_list()

bool xchg_message_write_uint16_list ( struct xchg_message message,
const uint16_t  list[],
uint64_t  sz_list 
)

Writes a uint16_t[] list of size sz_list to message and advances the underlying buffer position.

Parameters
[in]messagepointer to an xchg_message structure
[in]listlist of uint16_t values to write
[in]sz_listnumber of entries in list
Returns
true if a uint16_t[] was written, otherwise false

◆ xchg_message_write_uint32()

bool xchg_message_write_uint32 ( struct xchg_message message,
uint32_t  value 
)

Writes a uint32_t value to message and advances the underlying buffer position.

Parameters
[in]messagepointer to an xchg_message structure
[in]valueuint32_t value to write
Returns
true if a uint32_t was written, otherwise false

◆ xchg_message_write_uint32_list()

bool xchg_message_write_uint32_list ( struct xchg_message message,
const uint32_t  list[],
uint64_t  sz_list 
)

Writes a uint32_t[] list of size sz_list to message and advances the underlying buffer position.

Parameters
[in]messagepointer to an xchg_message structure
[in]listlist of uint32_t values to write
[in]sz_listnumber of entries in list
Returns
true if a uint32_t[] was written, otherwise false

◆ xchg_message_write_uint64()

bool xchg_message_write_uint64 ( struct xchg_message message,
uint64_t  value 
)

Writes a uint64_t value to message and advances the underlying buffer position.

Parameters
[in]messagepointer to an xchg_message structure
[in]valueuint64_t value to write
Returns
true if a uint64_t was written, otherwise false

◆ xchg_message_write_uint64_list()

bool xchg_message_write_uint64_list ( struct xchg_message message,
const uint64_t  list[],
uint64_t  sz_list 
)

Writes a uint64_t[] list of size sz_list to message and advances the underlying buffer position.

Parameters
[in]messagepointer to an xchg_message structure
[in]listlist of uint64_t values to write
[in]sz_listnumber of entries in list
Returns
true if a uint64_t[] was written, otherwise false

◆ xchg_message_write_uint8()

bool xchg_message_write_uint8 ( struct xchg_message message,
uint8_t  value 
)

Writes a uint8_t value to message and advances the underlying buffer position.

Parameters
[in]messagepointer to an xchg_message structure
[in]valueuint8_t value to write
Returns
true if a uint8_t was written, otherwise false

◆ xchg_message_write_uint8_list()

bool xchg_message_write_uint8_list ( struct xchg_message message,
const uint8_t  list[],
uint64_t  sz_list 
)

Writes a uint8_t[] list of size sz_list to message and advances the underlying buffer position.

Parameters
[in]messagepointer to an xchg_message structure
[in]listlist of uint8_t values to write
[in]sz_listnumber of entries in list
Returns
true if a uint8_t[] was written, otherwise false