Typedef anjay_dm_instance_write_default_attrs_t

Typedef Documentation

typedef int anjay_dm_instance_write_default_attrs_t(anjay_t *anjay, const anjay_dm_object_def_t *const *obj_ptr, anjay_iid_t iid, anjay_ssid_t ssid, const anjay_dm_oi_attributes_t *attrs)

A handler that sets default attributes for the Object Instance.

Param anjay:

Anjay object to operate on.

Param obj_ptr:

Object definition pointer, as passed to anjay_register_object .

Param iid:

Checked Object Instance ID.

Param ssid:

Short Server ID of the server requesting the operation.

Param attrs:

Attributes to set for the Object Instance.

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.