openthread_sys

Function otNcpStreamWrite

Source
pub unsafe extern "C" fn otNcpStreamWrite(
    aStreamId: c_int,
    aDataPtr: *const u8,
    aDataLen: c_int,
) -> otError
Expand description

@brief Send data to the host via a specific stream.

Attempts to send the given data to the host using the given aStreamId. This is useful for reporting error messages, implementing debug/diagnostic consoles, and potentially other types of datastreams.

The write either is accepted in its entirety or rejected. Partial writes are not attempted.

@param[in] aStreamId A numeric identifier for the stream to write to. If set to ‘0’, will default to the debug stream. @param[in] aDataPtr A pointer to the data to send on the stream. If aDataLen is non-zero, this param MUST NOT be NULL. @param[in] aDataLen The number of bytes of data from aDataPtr to send.

@retval OT_ERROR_NONE The data was queued for delivery to the host. @retval OT_ERROR_BUSY There are not enough resources to complete this request. This is usually a temporary condition. @retval OT_ERROR_INVALID_ARGS The given aStreamId was invalid.