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_kind_t kind
 
const anj_riid_tinsts
 
uint16_t max_inst_count
 

Detailed Description

Struct defining a Resource.

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 is ignored. For Multi-Instance Resources, this field must be a valid pointer if max_inst_count is greater than 0.

◆ kind

Resource kind.

◆ max_inst_count

uint16_t max_inst_count

Maximum number of instances allowed for this Resource. Ignored for Single-Instance Resources.

◆ rid

anj_rid_t rid

Resource ID.

◆ type

Resource data type.


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