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

#include <defs.h>

Data Fields

anj_rid_t rid
 
anj_data_type_t type
 
anj_dm_res_operation_t operation
 
const anj_riid_tinsts
 
uint16_t max_inst_count
 

Detailed Description

Main Resource struct.

Field Documentation

◆ insts

const anj_riid_t* insts

Pointer to the array of Resource Instance IDs.

The array must have a size equal to max_inst_count. Unused slots must be explicitly set to ANJ_ID_INVALID.

This array is never modified by the library. If handlers such as anj_dm_res_inst_create_t or anj_dm_res_inst_delete_t are defined for this Resource, the user is responsible for updating the contents of this array accordingly.

When passed to anj_dm_add_obj, all valid IDs must be sorted in strictly ascending order. Gaps or duplicate values are not allowed — the list must contain only unique, valid IDs packed at the beginning of the array.

For single-instance Resources, this field must be set to NULL. For multi-instance Resources, this field must be a valid pointer if max_inst_count is greater than 0.

◆ max_inst_count

uint16_t max_inst_count

Maximum number of instances allowed for this Resource. Ignored for single-instance Resources.

◆ operation

Operation supported by this Resource.

◆ rid

anj_rid_t rid

Resource ID.

◆ type

Resource data type as defined in Appendix C of the LwM2M spec.


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