Struct anj_dm_obj_struct

Struct Documentation

struct anj_dm_obj_struct

Struct defining an Object.

Public Members

anj_oid_t oid

Object ID.

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:

  • for Core Objects, implies the Object version contained in the supported release of LwM2M Enabler (e.g. Server Object has version 1.2 in LwM2M 1.2)

  • for Non-core Objects implies version 1.0.

const anj_dm_handlers_t *handlers

Pointer to the Object handlers. Must not be NULL.

const anj_dm_obj_inst_t *insts

Pointer to the array of Object Instances. For unused slots, 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.

uint16_t max_inst_count

Maximum number of Object Instances allowed for this Object.