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

Stores a complete or partial value of a data model entry, check "Data Types" appendix in LwM2M specification for more information.

Field Documentation

◆ bool_value

bool bool_value

Boolean value, valid when the underlying data type is ANJ_DATA_TYPE_BOOL.

◆ bytes_or_string

anj_bytes_or_string_value_t bytes_or_string

Chunk of information valid for when the underlying data type is ANJ_DATA_TYPE_BYTES or ANJ_DATA_TYPE_STRING.

◆ close_external_data

anj_close_external_data_t* close_external_data

Callback function called after all data has been read or when an error occurs.

Note
This callback is NOT mandatory.

◆ double_value

double double_value

Double-precision floating-point value, valid when the underlying data type is ANJ_DATA_TYPE_DOUBLE.

◆ [struct]

struct { ... } external_data

Configuration for resources that use an external data callback.

This should only be set for output contexts, and only when the resource's data type is set to either ANJ_DATA_TYPE_EXTERNAL_BYTES or ANJ_DATA_TYPE_EXTERNAL_STRING.

◆ get_external_data

anj_get_external_data_t* get_external_data

Callback function used to retrieve a chunk of data during encoding.

This function may be called multiple times to stream the resource's content in parts.

Note
This callback is mandatory.

◆ int_value

int64_t int_value

Integer value, valid when the underlying data type is ANJ_DATA_TYPE_INT.

◆ objlnk

Objlnk value, valid when the underlying data type is ANJ_DATA_TYPE_OBJLNK.

◆ open_external_data

anj_open_external_data_t* open_external_data

Callback function used to prepare external data source.

Note
This callback is NOT mandatory.

◆ time_value

int64_t time_value

Time value, expressed as a UNIX timestamp, valid when the underlying data type is ANJ_DATA_TYPE_TIME.

◆ uint_value

uint64_t uint_value

Unsigned Integer value, valid when the underlying data type is ANJ_DATA_TYPE_UINT.

◆ user_args

void* user_args

Opaque pointer that will be passed to get_external_data on every call.

Can be used by the application to provide additional context or state.


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