Anjay Lite
|
#include <defs.h>
Data Fields | |
anj_rid_t | rid |
anj_data_type_t | type |
anj_dm_res_operation_t | operation |
const anj_riid_t * | insts |
uint16_t | max_inst_count |
Main Resource struct.
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.
uint16_t max_inst_count |
Maximum number of instances allowed for this Resource. Ignored for single-instance Resources.
anj_dm_res_operation_t operation |
Operation supported by this Resource.
anj_rid_t rid |
Resource ID.
anj_data_type_t type |
Resource data type as defined in Appendix C of the LwM2M spec.