openthread_sys

Function otCoapSendRequestBlockWiseWithParameters

Source
pub unsafe extern "C" fn otCoapSendRequestBlockWiseWithParameters(
    aInstance: *mut otInstance,
    aMessage: *mut otMessage,
    aMessageInfo: *const otMessageInfo,
    aHandler: otCoapResponseHandler,
    aContext: *mut c_void,
    aTxParameters: *const otCoapTxParameters,
    aTransmitHook: otCoapBlockwiseTransmitHook,
    aReceiveHook: otCoapBlockwiseReceiveHook,
) -> otError
Expand description

Sends a CoAP request block-wise with custom transmission parameters.

Is available when OPENTHREAD_CONFIG_COAP_BLOCKWISE_TRANSFER_ENABLE configuration is enabled.

If a response for a request is expected, respective function and context information should be provided. If the response is expected to be block-wise, a respective hook function should be provided. If no response is expected, these arguments should be NULL pointers.

@param[in] aInstance A pointer to an OpenThread instance. @param[in] aMessage A pointer to the message to send. @param[in] aMessageInfo A pointer to the message info associated with @p aMessage. @param[in] aHandler A function pointer that shall be called on response reception or timeout. @param[in] aContext A pointer to arbitrary context information. May be NULL if not used. @param[in] aTxParameters A pointer to transmission parameters for this request. Use NULL for defaults. @param[in] aTransmitHook A pointer to a hook function for outgoing block-wise transfer. @param[in] aReceiveHook A pointer to a hook function for incoming block-wise transfer.

@retval OT_ERROR_NONE Successfully sent CoAP message. @retval OT_ERROR_NO_BUFS Failed to allocate retransmission data. @retval OT_ERROR_INVALID_ARGS Invalid arguments are given.