pub unsafe extern "C" fn bluetil_ad_find_str(
ad: *const bluetil_ad_t,
type_: u8,
str_: *mut c_char,
str_len: size_t,
) -> c_int
Expand description
@brief Find the given field and copy its payload into a string
The resulting string is \0
terminated. If the resulting string is too large
to fit into the given buffer, it will be truncated to the maximum possible
size (but still including the \0
at the end).
@param[in] ad advertising data descriptor
@param[in] type field type to look for
@param[out] str resulting string is written to this buffer
@param[in] str_len maximum number of bytes to write to @p str, including
the \0
character
@return BLUETIL_AD_OK if the field was found and copied @return BLUETIL_AD_NOTFOUND if the given field was not found