Anjay Lite
Loading...
Searching...
No Matches
anj_res_value_t Union Reference

#include <defs.h>

Data Fields

anj_bytes_or_string_value_t bytes_or_string
 
struct { 
 
   anj_get_external_data_t *   get_external_data 
 
   anj_open_external_data_t *   open_external_data 
 
   anj_close_external_data_t *   close_external_data 
 
   void *   user_args 
 
external_data 
 
int64_t int_value
 
uint64_t uint_value
 
double double_value
 
bool bool_value
 
anj_objlnk_value_t objlnk
 
int64_t time_value
 

Detailed Description

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.

Field Documentation

◆ bool_value

bool bool_value

Boolean value (see ANJ_DATA_TYPE_BOOL).

◆ bytes_or_string

anj_bytes_or_string_value_t bytes_or_string

String or Opaque value (see ANJ_DATA_TYPE_BYTES, ANJ_DATA_TYPE_STRING).

◆ close_external_data

anj_close_external_data_t* close_external_data

Optional callback to finalize/clean up after reading is done or on error.

◆ double_value

double double_value

Floating-point value (see ANJ_DATA_TYPE_DOUBLE).

◆ [struct]

struct { ... } 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.

◆ get_external_data

anj_get_external_data_t* get_external_data

Mandatory callback to stream chunks of data during encoding.

◆ int_value

int64_t int_value

Integer value (see ANJ_DATA_TYPE_INT).

◆ objlnk

Object Link value (see ANJ_DATA_TYPE_OBJLNK).

◆ open_external_data

anj_open_external_data_t* open_external_data

Optional callback to initialize the external source before reading.

◆ time_value

int64_t time_value

Time value as a UNIX timestamp (see ANJ_DATA_TYPE_TIME).

◆ uint_value

uint64_t uint_value

Unsigned integer value (see ANJ_DATA_TYPE_UINT).

◆ user_args

void* user_args

Application-defined pointer, passed unchanged to all callbacks.


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