Anjay Lite
Loading...
Searching...
No Matches
anj_dm_obj_struct Struct Reference

#include <defs.h>

Data Fields

anj_oid_t oid
 
const char * version
 
const anj_dm_handlers_thandlers
 
const anj_dm_obj_inst_tinsts
 
uint16_t max_inst_count
 

Detailed Description

A struct defining an Object.

Field Documentation

◆ handlers

const anj_dm_handlers_t* handlers

Pointer to the object handlers. Must not be NULL.

◆ insts

const anj_dm_obj_inst_t* insts

Pointer to the array of Object Instances. For unused slots, anj_dm_obj_inst_t::iid must be set to ANJ_ID_INVALID.

The array must have a size equal to max_inst_count. When calling anj_dm_add_obj, all instances in the array must be sorted in ascending order by their Instance IDs. Gaps or duplicate values are not allowed — the list must contain only unique, valid IDs packed at the beginning of the array.

This array is never modified by the library itself. If anj_dm_inst_create_t or anj_dm_inst_delete_t handlers are defined, the user is responsible for updating the contents of the insts array accordingly.

If max_inst_count is not equal to 0, this field must not be NULL.

◆ max_inst_count

uint16_t max_inst_count

Maximum number of Object Instances allowed for this Object.

◆ oid

anj_oid_t oid

Object ID.

◆ version

const char* version

Object version.

A string with static lifetime, formatted as two digits separated by a dot (e.g., "1.1"). If set to NULL, the LwM2M client will omit the "ver=" attribute in Register and Discover messages, which implies version 1.0.


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