Soletta™ Framework
Framework for making IoT devices

Full online documentation | C API Index
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Fields
sol_memdesc_ops_enumeration Struct Reference

Operations specific to SOL_MEMDESC_TYPE_ENUMERATION. More...

#include <sol-memdesc.h>

Data Fields

uint16_t api_version
 API version, must match SOL_MEMDESC_OPS_ENUMERATION_API_VERSION at runtime. More...
 
int(* from_str )(const struct sol_memdesc *desc, void *ptr_return, const struct sol_str_slice str)
 convert enumeration value from string. More...
 
const char *(* to_str )(const struct sol_memdesc *desc, const void *memory)
 convert enumeration value to string. More...
 

Detailed Description

Operations specific to SOL_MEMDESC_TYPE_ENUMERATION.

This provides enumeration-specific operations to use when dealing with a memory description.

See Also
struct sol_memdesc_ops
struct sol_memdesc

Field Documentation

uint16_t sol_memdesc_ops_enumeration::api_version

API version, must match SOL_MEMDESC_OPS_ENUMERATION_API_VERSION at runtime.

int(* sol_memdesc_ops_enumeration::from_str)(const struct sol_memdesc *desc, void *ptr_return, const struct sol_str_slice str)

convert enumeration value from string.

The return is stored in ptr_return, which must be the size stated in struct sol_memdesc::size as returned by sol_memdesc_get_size().

The string is given in the form of a slice so it doesn't need to be null-terminated.

On error, negative errno is returned. 0 on success.

See Also
sol_memdesc_enumeration_from_str()
const char*(* sol_memdesc_ops_enumeration::to_str)(const struct sol_memdesc *desc, const void *memory)

convert enumeration value to string.

On error, NULL should be returned and errno set. On success non-NULL is returned.

See Also
sol_memdesc_enumeration_to_str()

The documentation for this struct was generated from the following file: