[−][src]Function openthread_sys::otCoapMessageInitResponse
pub unsafe extern "C" fn otCoapMessageInitResponse(
aResponse: *mut otMessage,
aRequest: *const otMessage,
aType: otCoapType,
aCode: otCoapCode
) -> otError
This function initializes a response message.
@note Both message ID and token are set according to @p aRequest.
@param[inout] aResponse A pointer to the CoAP response message. @param[in] aRequest A pointer to the CoAP request message. @param[in] aType CoAP message type. @param[in] aCode CoAP message code.
@retval OT_ERROR_NONE Successfully initialized the response message. @retval OT_ERROR_NO_BUFS Insufficient message buffers available to initialize the response message.