Typedef anjay_dm_resource_instance_remove_t
Defined in File dm.h
Typedef Documentation
-
typedef int anjay_dm_resource_instance_remove_t(anjay_t *anjay, const anjay_dm_object_def_t *const *obj_ptr, anjay_iid_t iid, anjay_rid_t rid, anjay_riid_t riid)
A handler that removes a Resource Instance from a Multiple Resource.
This handler will only be called if the Resource is PRESENT, is of the ANJAY_DM_RES_WM or ANJAY_DM_RES_RWM kinds (as returned by anjay_dm_list_resources_t), and the Resource Instance is PRESENT as well (has recently been returned via anjay_dm_list_resource_instances_t).
Note: if this handler is not implemented, then the Delete operation on the Resource Instance (
riid) will not succeed.NOTE: This operation is new to the LwM2M 1.2 standard. It will never be called when communicating using protocol version 1.0 or 1.1. If you do not aim for LwM2M 1.2 compliance, this handler can be left unimplemented.
- Param anjay:
Anjay object to operate on.
- Param obj_ptr:
Object definition pointer, as passed to anjay_register_object .
- Param iid:
Object Instance ID.
- Param rid:
Resource ID.
- Param riid:
Resource Instance ID to remove.
- Return:
This handler should return:
0 on success,
a negative value in case of error. If it returns one of ANJAY_ERR_ constants, the response message will have an appropriate CoAP response code. Otherwise, the device will respond with an unspecified (but valid) error code.