Diffusion C API  6.6.0-preview.1
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
diffusion-binary.h File Reference


bool read_diffusion_binary_value (const DIFFUSION_VALUE_T *value, void **binary, DIFFUSION_API_ERROR *error)
 Get the binary value. More...
bool write_diffusion_binary_value (const void *binary, const BUF_T *buf, size_t len)
 Write binary data into a BUF_T for an update. More...

Function Documentation

bool read_diffusion_binary_value ( const DIFFUSION_VALUE_T value,
void **  binary,

Get the binary value.

valuevalue to retrieve the binary data from.
binarypointer to a pointer where the binary data will be stored. Must be freed after use.
errorpopulated if an error occurs. Can be NULL.
true if the value is successfully read and binary pointer value set to the binary data. False otherwise.
bool write_diffusion_binary_value ( const void *  binary,
const BUF_T buf,
size_t  len 

Write binary data into a BUF_T for an update.

binaryvalue to be written into the BUF_T
lenlength of the binary value to be written
a BUF_T containing CBOR encoded data for a binary topic update. NULL will be returned if the provided binary pointer is NULL.