openthread_sys

Function otNetworkNameFromString

Source
pub unsafe extern "C" fn otNetworkNameFromString(
    aNetworkName: *mut otNetworkName,
    aNameString: *const c_char,
) -> otError
Expand description

Sets an otNetworkName instance from a given null terminated C string.

@p aNameString must follow UTF-8 encoding and the Network Name length must not be longer than OT_NETWORK_NAME_MAX_SIZE.

@param[out] aNetworkName A pointer to the otNetworkName to set. @param[in] aNameString A name C string.

@retval OT_ERROR_NONE Successfully set @p aNetworkName from @p aNameString. @retval OT_ERROR_INVALID_ARGS @p aNameStrng is invalid (too long or does not follow UTF-8 encoding).