Function riot_sys::gcoap_obs_init

source ·
pub unsafe extern "C" fn gcoap_obs_init(
    pdu: *mut coap_pkt_t,
    buf: *mut u8,
    len: size_t,
    resource: *const coap_resource_t
) -> c_int
Expand description

@brief Initializes a CoAP Observe notification packet on a buffer, for the observer registered for a resource

First verifies that an observer has been registered for the resource.

@param[out] pdu Notification metadata @param[out] buf Buffer containing the PDU @param[in] len Length of the buffer @param[in] resource Resource for the notification

@return GCOAP_OBS_INIT_OK on success @return GCOAP_OBS_INIT_ERR on error @return GCOAP_OBS_INIT_UNUSED if no observer for resource