Function anj_dm_add_obj
Defined in File core.h
Function Documentation
-
int anj_dm_add_obj(anj_t *anj, const anj_dm_obj_t *obj)
Adds an Object to the data model and validates its structure.
objparameter is not copied; the user must ensure that it remains valid for the entire lifetime of theanjobject or until it is removed using anj_dm_remove_obj.Note
Validation of the Object, its Instances, and Resources is performed only in debug builds (i.e., when the
NDEBUGmacro is not defined). In release builds, internal consistency checks are skipped.Warning
Object Instances in the
objstructure must be stored in ascending order by theiroid.- Parameters:
anj – Anjay object.
obj – Pointer to the Object definition struct.
- Returns:
0 on success, a non-zero value in case of an error.