Functions
Serval_Serializer.h File Reference

Serializer ModuleThis interface provides functions for the serialization and de-serialization of various data type. More...

#include <Serval_Defines.h>
#include <Serval_Types.h>
#include <Serval_StringDescr.h>
+ Include dependency graph for Serval_Serializer.h:

Functions

retcode_t Serializer_deserializeBool (StringDescr_T const *str_ptr, bool *value_ptr)
 
retcode_t Serializer_deserializeDouble (StringDescr_T const *str_ptr, double *value_ptr)
 
retcode_t Serializer_deserializeFloat (StringDescr_T const *str_ptr, float *value_ptr)
 
retcode_t Serializer_deserializeInt16 (StringDescr_T const *str_ptr, int16_t *value_ptr)
 
retcode_t Serializer_deserializeInt32 (StringDescr_T const *str_ptr, int32_t *value_ptr)
 
retcode_t Serializer_deserializeInt64 (StringDescr_T const *str_ptr, int64_t *value_ptr)
 
retcode_t Serializer_deserializeInt8 (StringDescr_T const *str_ptr, int8_t *value_ptr)
 
retcode_t Serializer_deserializeString (StringDescr_T const *str_ptr, char buf[], uint32_t bufSize)
 
retcode_t Serializer_deserializeUint16 (StringDescr_T const *str_ptr, uint16_t *value_ptr)
 
retcode_t Serializer_deserializeUint32 (StringDescr_T const *str_ptr, uint32_t *value_ptr)
 
retcode_t Serializer_deserializeUint64 (StringDescr_T const *str_ptr, uint64_t *value_ptr)
 
retcode_t Serializer_deserializeUint8 (StringDescr_T const *str_ptr, uint8_t *value_ptr)
 
retcode_t Serializer_serialize (char *buf_ptr, int bufSize, int *len_ptr, const char *format,...)
 
static retcode_t Serializer_serializeBool (bool value, char *buf_ptr, int bufSize, int *len_ptr)
 
static retcode_t Serializer_serializeFloat (float value, char *buf_ptr, int bufSize, int *len_ptr)
 
static retcode_t Serializer_serializeInt (int value, char *buf_ptr, int bufSize, int *len_ptr)
 
static retcode_t Serializer_serializeLong (int64_t value, char *buf_ptr, int bufSize, int *len_ptr)
 
static retcode_t Serializer_serializeString (char const *value, char *buf_ptr, int bufSize, int *len_ptr)
 
retcode_t Serializer_vserialize (char *buf_ptr, int bufSize, int *len_ptr, const char *format, va_list args)
 

Function Documentation

retcode_t Serializer_deserializeBool ( StringDescr_T const *  str_ptr,
bool *  value_ptr 
)

This function converts a string into the bool data type.

Parameters
[in]str_ptrThe String Descriptor object that has the value desired
[out]value_ptrPointer to variable where the resulting value will be stored
Returns
RC_OK, if successful
RC_DESERIALIZE_ERROR given string does not match "1", "0", "true", "false"
retcode_t Serializer_deserializeDouble ( StringDescr_T const *  str_ptr,
double *  value_ptr 
)

This function converts a string into the double data type.

Parameters
[in]str_ptrThe String Descriptor object that has the value desired
[out]value_ptrPointer to variable where the resulting value will be stored
Returns
RC_OK, if successful
RC_DESERIALIZE_ERROR given string too long
retcode_t Serializer_deserializeFloat ( StringDescr_T const *  str_ptr,
float *  value_ptr 
)

This function converts a string into the float data type.

Parameters
[in]str_ptrThe String Descriptor object that has the value desired
[out]value_ptrPointer to variable where the resulting value will be stored
Returns
RC_OK, if successful
RC_DESERIALIZE_ERROR given string too long
retcode_t Serializer_deserializeInt16 ( StringDescr_T const *  str_ptr,
int16_t *  value_ptr 
)
retcode_t Serializer_deserializeInt32 ( StringDescr_T const *  str_ptr,
int32_t *  value_ptr 
)
retcode_t Serializer_deserializeInt64 ( StringDescr_T const *  str_ptr,
int64_t *  value_ptr 
)

This function converts a string into integer data type.

Parameters
[in]str_ptrThe String Descriptor object that has the value desired
[out]value_ptrPointer to variable where the resulting value will be stored
Returns
RC_OK, if successful
RC_DESERIALIZE_ERROR given string too long
retcode_t Serializer_deserializeInt8 ( StringDescr_T const *  str_ptr,
int8_t *  value_ptr 
)
retcode_t Serializer_deserializeString ( StringDescr_T const *  str_ptr,
char  buf[],
uint32_t  bufSize 
)

This function copies a string into the given buffer.

Parameters
[in]str_ptrThe String Descriptor object that has the value desired
[out]bufPointer to buffer where the resulting value will be stored
[in]bufSizeSize of the buffer.
Returns
RC_OK, if successful
RC_DESERIALIZE_ERROR given string too long
retcode_t Serializer_deserializeUint16 ( StringDescr_T const *  str_ptr,
uint16_t *  value_ptr 
)
retcode_t Serializer_deserializeUint32 ( StringDescr_T const *  str_ptr,
uint32_t *  value_ptr 
)
retcode_t Serializer_deserializeUint64 ( StringDescr_T const *  str_ptr,
uint64_t *  value_ptr 
)
retcode_t Serializer_deserializeUint8 ( StringDescr_T const *  str_ptr,
uint8_t *  value_ptr 
)
retcode_t Serializer_serialize ( char *  buf_ptr,
int  bufSize,
int *  len_ptr,
const char *  format,
  ... 
)

This function writes data to a buffer in a printf-like fashion.

Parameters
[in]buf_ptrThe buffer to which given value should be written
[in]bufSizeThe size of the buffer
[out]len_ptrThe number of bytes written
[in]formatThe format of the data (specified like for printf()) and followed by the data
Returns
RC_OK on success
RC_MSG_FACTORY_INCOMPLETE given buffer is too small

+ Here is the caller graph for this function:

static retcode_t Serializer_serializeBool ( bool  value,
char *  buf_ptr,
int  bufSize,
int *  len_ptr 
)
inlinestatic

This function writes a bool, a primitive data type, into a given buffer.

Parameters
[in]valueThe value to write to buffer
[out]buf_ptrThe buffer to which given value should be written
[in]bufSizeThe size of the buffer
[out]len_ptrThe number of bytes written
Returns
RC_OK on success
RC_MSG_FACTORY_INCOMPLETE given buffer is too small

+ Here is the call graph for this function:

static retcode_t Serializer_serializeFloat ( float  value,
char *  buf_ptr,
int  bufSize,
int *  len_ptr 
)
inlinestatic

This function writes a float, a primitive data type, into a given buffer.

Parameters
[in]valueThe value to write to buffer
[out]buf_ptrThe buffer to which given value should be written
[in]bufSizeThe size of the buffer
[out]len_ptrThe number of bytes written
Returns
RC_OK, if successful
RC_MSG_FACTORY_INCOMPLETE given buffer is too small

+ Here is the call graph for this function:

static retcode_t Serializer_serializeInt ( int  value,
char *  buf_ptr,
int  bufSize,
int *  len_ptr 
)
inlinestatic

This function writes a integer, a primitive data type, into a given buffer.

Parameters
[in]valueThe value to write to buffer
[out]buf_ptrThe buffer to which given value should be written
[in]bufSizeThe size of the buffer
[out]len_ptrThe number of bytes written
Returns
RC_OK, if successful
RC_MSG_FACTORY_INCOMPLETE given buffer is too small

+ Here is the call graph for this function:

static retcode_t Serializer_serializeLong ( int64_t  value,
char *  buf_ptr,
int  bufSize,
int *  len_ptr 
)
inlinestatic

This function writes a long integer, a primitive data type, into a given buffer.

Parameters
[in]valueThe value to write to buffer
[out]buf_ptrThe buffer to which given value should be written
[in]bufSizeThe size of the buffer
[out]len_ptrThe number of bytes written
Returns
RC_OK, if successful
RC_MSG_FACTORY_INCOMPLETE buffer was too small

+ Here is the call graph for this function:

static retcode_t Serializer_serializeString ( char const *  value,
char *  buf_ptr,
int  bufSize,
int *  len_ptr 
)
inlinestatic

This function writes a string into a given buffer.

Parameters
[in]valueThe value to write to buffer
[out]buf_ptrThe buffer to which given value should be written
[in]bufSizeThe size of the buffer
[out]len_ptrThe number of bytes written
Returns
RC_OK, if successful
RC_MSG_FACTORY_INCOMPLETE given buffer is too small

+ Here is the call graph for this function:

retcode_t Serializer_vserialize ( char *  buf_ptr,
int  bufSize,
int *  len_ptr,
const char *  format,
va_list  args 
)

This function writes data to a buffer in a printf-like fashion.

Parameters
[in]buf_ptrThe buffer to which given value should be written
[in]bufSizeThe size of the buffer
[out]len_ptrThe number of bytes written
[in]formatThe format of the data (specified like for printf()) and followed by the data
[in]argsThe list of data parameters for the given format.
Returns
RC_OK on success
RC_MSG_FACTORY_INCOMPLETE given buffer is too small

This documentation file has been automatically generated on Fri Oct 4 2019 03:47:21 by doxygen 1.8.8