Union anj_res_value_t
Defined in File defs.h
Union Documentation
-
union anj_res_value_t
- #include <include_public/anj/defs.h>
Union type holding the value of a resource, in one of the supported LwM2M data types (see OMA LwM2M Core Specification v1.2.2 [OMA-TS-LightweightM2M_Core-V1_2_2-20240613-A] C).
The active field depends on the resource’s anj_data_type_t.
Public Members
-
anj_bytes_or_string_value_t bytes_or_string
String or Opaque value (see ANJ_DATA_TYPE_BYTES, ANJ_DATA_TYPE_STRING).
-
anj_get_external_data_t *get_external_data
Mandatory callback to stream chunks of data during encoding.
-
anj_open_external_data_t *open_external_data
Optional callback to initialize the external source before reading.
-
anj_close_external_data_t *close_external_data
Optional callback to finalize/clean up after reading is done or on error.
-
void *user_args
Application-defined pointer, passed unchanged to all callbacks.
-
struct anj_res_value_t external_data
Configuration for resources that use external data streaming (see ANJ_DATA_TYPE_EXTERNAL_BYTES, ANJ_DATA_TYPE_EXTERNAL_STRING).
These fields are only valid in output contexts.
-
int64_t int_value
Integer value (see ANJ_DATA_TYPE_INT).
-
uint64_t uint_value
Unsigned integer value (see ANJ_DATA_TYPE_UINT).
-
double double_value
Floating-point value (see ANJ_DATA_TYPE_DOUBLE).
-
bool bool_value
Boolean value (see ANJ_DATA_TYPE_BOOL).
-
anj_objlnk_value_t objlnk
Object Link value (see ANJ_DATA_TYPE_OBJLNK).
-
int64_t time_value
Time value as a UNIX timestamp (see ANJ_DATA_TYPE_TIME).
-
anj_bytes_or_string_value_t bytes_or_string