Typedef anjay_dm_resource_execute_t
Defined in File dm.h
Typedef Documentation
-
typedef int anjay_dm_resource_execute_t(anjay_t *anjay, const anjay_dm_object_def_t *const *obj_ptr, anjay_iid_t iid, anjay_rid_t rid, anjay_execute_ctx_t *ctx)
A handler that performs the Execute action on given Resource, called only if the Resource is PRESENT and of the ANJAY_DM_RES_E kind (as returned by anjay_dm_list_resources_t).
- 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 ctx:
Execute context to read the execution arguments from, using the anjay_execute_get_* function family.
- 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.