15 #ifndef DEV_ESSENTIAL_DDL_CAPI_H_INCLUDED_
16 #define DEV_ESSENTIAL_DDL_CAPI_H_INCLUDED_
80 char***
const memory);
152 char***
const struct_names);
164 size_t*
const alignment);
179 char***
const struct_elements);
199 const char* struct_name,
200 const char* element_name,
201 char**
const type_name,
203 size_t*
const arraysize,
204 size_t*
const bytepos,
205 size_t*
const bitpos,
206 size_t*
const alignment,
207 size_t*
const byteorder);
221 const char* type_name,
222 bool*
const predefined,
223 size_t*
const numbits,
224 size_t*
const arraysize);
242 const char* enum_name,
244 bool*
const predefined,
246 char***
const entry_names,
247 char***
const entry_values);
273 const char* struct_name,
275 size_t*
const data_size);
290 const char* struct_name,
292 const size_t data_size,
314 size_t*
const index);
348 const char* substruct,
349 size_t*
const index);
363 const size_t data_size);
375 const char* substruct,
377 const size_t data_size);
388 size_t*
const index);
399 size_t*
const data_size);
415 const size_t data_size);
431 const size_t data_size);
471 const size_t data_size);
485 const char* substruct,
487 const size_t data_size);
A_UTIL_DLL_EXPORT int32_t ddl_capi_struct_buffer_size(const DDL_CAPI_Handle_T ddl, const char *struct_name, const DDL_CAPI_DataRepresentation representation, size_t *const data_size)
Returns the data_size of struct_name in the specified representation.
A_UTIL_DLL_EXPORT int32_t ddl_capi_codec_get_element_byIndex(const DDL_CAPI_Codec_Handle_T codec, size_t index, void *const data)
Gets the data of the element specified by index.
void * DDL_CAPI_Codec_Handle_T
A handle for encoding/decoding a specific struct.
A_UTIL_DLL_EXPORT int32_t ddl_capi_struct_elements(const DDL_CAPI_Handle_T ddl, const char *name, size_t *const count, char ***const struct_elements)
Retrieve all struct_elements names for a given struct name.
A_UTIL_DLL_EXPORT int32_t ddl_capi_codec_get_array_byIndex(const DDL_CAPI_Codec_Handle_T codec, const size_t index, void *const data, const size_t size)
Copies the array specified by index into data in the format and representation specified by codec.
A_UTIL_DLL_EXPORT int32_t ddl_capi_ddl_tostring(const DDL_CAPI_Handle_T ddl, char **const xml)
Returns the xml string for a ddl handle.
A_UTIL_DLL_EXPORT int32_t ddl_capi_ddl_tofile(const DDL_CAPI_Handle_T ddl, const char *path)
Saves a ddl at the given file path.
A_UTIL_DLL_EXPORT int32_t ddl_capi_codec_get_substruct_byIndex(const DDL_CAPI_Codec_Handle_T codec, const size_t index, void *const data, const size_t data_size)
Copies the substruct specified by index into data in the format and representation specified by codec...
A_UTIL_DLL_EXPORT int32_t ddl_capi_stringarray_free(const DDL_CAPI_Handle_T ddl, size_t count, char ***const memory)
Frees a string array at memory.
A_UTIL_DLL_EXPORT int32_t ddl_capi_codec_get_substruct_index(const DDL_CAPI_Codec_Handle_T codec, const char *substruct, size_t *const index)
Gets the index of the specified substruct.
A_UTIL_DLL_EXPORT int32_t ddl_capi_codec_get_array_index(const DDL_CAPI_Codec_Handle_T codec, const char *array, size_t *const index)
Gets the index of the specified array.
A_UTIL_DLL_EXPORT int32_t ddl_capi_enum_data(const DDL_CAPI_Handle_T ddl, const char *enum_name, char **const type, bool *const predefined, size_t *const count, char ***const entry_names, char ***const entry_values)
Retrieve data for a given enum enum_name.
DDL_CAPI_DataRepresentation
Enum type for the representation of the input data.
@ DDL_CAPI_Data_deserialized
value for deserialized representation
@ DDL_CAPI_Data_serialized
value for serialized representation
A_UTIL_DLL_EXPORT int32_t ddl_capi_codec_get_element_byName(const DDL_CAPI_Codec_Handle_T codec, const char *element, void *const data)
Gets the data of element.
A_UTIL_DLL_EXPORT const char * ddl_capi_last_error(const DDL_CAPI_Handle_T ddl)
Returns the last error for the given ddl.
A_UTIL_DLL_EXPORT int32_t ddl_capi_codec_set_element_byIndex(const DDL_CAPI_Codec_Handle_T codec, const size_t index, const void *data)
Sets the data of the element specified by index.
A_UTIL_DLL_EXPORT int32_t ddl_capi_codec_get_element_index(const DDL_CAPI_Codec_Handle_T codec, const char *element, size_t *const index)
Gets the index of the specified element.
A_UTIL_DLL_EXPORT int32_t ddl_capi_codec_free(DDL_CAPI_Codec_Handle_T *const codec)
Frees a codec handle.
A_UTIL_DLL_EXPORT int32_t ddl_capi_codec_get_substruct_byName(const DDL_CAPI_Codec_Handle_T codec, const char *substruct, void *const data, const size_t data_size)
Copies the substruct into data in the format and representation specified by codec.
A_UTIL_DLL_EXPORT const char * ddl_capi_last_codecerror(const DDL_CAPI_Codec_Handle_T ddl)
Returns the last error for the given codec.
A_UTIL_DLL_EXPORT int32_t ddl_capi_element_data(const DDL_CAPI_Handle_T ddl, const char *struct_name, const char *element_name, char **const type_name, type_t *const typeOfType, size_t *const arraysize, size_t *const bytepos, size_t *const bitpos, size_t *const alignment, size_t *const byteorder)
Retrieve data for a given element element_name of struct struct_name.
A_UTIL_DLL_EXPORT int32_t ddl_capi_codec_create(const DDL_CAPI_Handle_T ddl, const char *struct_name, void *const data, const size_t data_size, const DDL_CAPI_DataRepresentation representation, DDL_CAPI_Codec_Handle_T *const codec)
Creates a codec for the given struct_name.
A_UTIL_DLL_EXPORT int32_t ddl_capi_resolve_type(const DDL_CAPI_Handle_T ddl, const char *type, char **const xml)
Retrieve a minimalistic DDL that only resolves the specified type.
A_UTIL_DLL_EXPORT int32_t ddl_capi_codec_set_element_byName(const DDL_CAPI_Codec_Handle_T codec, const char *element, const void *data)
Sets the data of element.
A_UTIL_DLL_EXPORT int32_t ddl_capi_structs(const DDL_CAPI_Handle_T ddl, size_t *const count, char ***const struct_names)
Retrieve all structs_names defined in the ddl.
A_UTIL_DLL_EXPORT int32_t ddl_capi_type_data(const DDL_CAPI_Handle_T ddl, const char *type_name, bool *const predefined, size_t *const numbits, size_t *const arraysize)
Retrieve data for a given type type_name.
A_UTIL_DLL_EXPORT int32_t ddl_capi_free(DDL_CAPI_Handle_T *const ddl)
Frees a ddl handle.
A_UTIL_DLL_EXPORT int32_t ddl_capi_load_from_file(const char *path, DDL_CAPI_Handle_T *const ddl)
Loads a ddl from a file with the given path.
A_UTIL_DLL_EXPORT int32_t ddl_capi_struct_data(const DDL_CAPI_Handle_T ddl, const char *name, size_t *const alignment)
Retrieve the alignment for a given struct name.
A_UTIL_DLL_EXPORT int32_t ddl_capi_codec_set_substruct_byIndex(const DDL_CAPI_Codec_Handle_T codec, const size_t index, const void *data, const size_t data_size)
Sets the data of the sub-struct specified by index.
A_UTIL_DLL_EXPORT int32_t ddl_capi_codec_set_array_byIndex(const DDL_CAPI_Codec_Handle_T codec, const size_t index, const void *data, const size_t data_size)
Stores data into the array specified by index.
A_UTIL_DLL_EXPORT int32_t ddl_capi_codec_set_array_byName(const DDL_CAPI_Codec_Handle_T codec, const char *array, const void *data, const size_t data_size)
Writes data to the location of array.
A_UTIL_DLL_EXPORT int32_t ddl_capi_codec_transform(const DDL_CAPI_Codec_Handle_T dest, const DDL_CAPI_Codec_Handle_T source)
Writes all elements from source into destination.
A_UTIL_DLL_EXPORT int32_t ddl_capi_codec_get_array_size(const DDL_CAPI_Codec_Handle_T codec, const char *array, size_t *const data_size)
Gets the size of the specified array.
type_t
Enum type for the representation of struct element data type.
@ enum_type
value for enum type
@ data_type
value for data type
@ struct_type
value for struct type
void * DDL_CAPI_Handle_T
A handle for a ddl description.
A_UTIL_DLL_EXPORT int32_t ddl_capi_string_free(char **const memory)
Frees a string at memory.
A_UTIL_DLL_EXPORT int32_t ddl_capi_load_from_string(const char *xml, DDL_CAPI_Handle_T *const ddl)
Loads a ddl from the xml string.
A_UTIL_DLL_EXPORT int32_t ddl_capi_codec_set_substruct_byName(const DDL_CAPI_Codec_Handle_T codec, const char *substruct, const void *data, const size_t data_size)
Sets the data of substruct.
A_UTIL_DLL_EXPORT int32_t ddl_capi_codec_get_array_byName(const DDL_CAPI_Codec_Handle_T codec, const char *array, void *const data, const size_t size)
Copies the array into data in the format and representation specified by codec.
Definition of preprocessor macro A_UTIL_DLL_EXPORT.
#define A_UTIL_DLL_EXPORT
Defines standard exporting rules for symbol visibility.
definition of the ddl namespace