spinel_datatype_unpack_in_place() function
Parses spinel data similar to sscanf(). Actually calls spinel_datatype_vunpack_in_place() to parse data. @sa spinel_datatype_vunpack_in_place()
Arguments
data_in
A pointer to the data to parse.
data_len
The length of @p data_in in bytes.
pack_format
C string that contains a format string follows the same specification of spinel.
Return value
The parsed length in bytes.
Notes
This function behaves different from `spinel_datatype_unpack()`: - This function expects composite data arguments of pointer to data type, while `spinel_datatype_unpack()` expects them of pointer to data type pointer. For example, if `SPINEL_DATATYPE_EUI64_C` is present in @p pack_format, this function expects a `spinel_eui64_t *` is included in variable arguments, while `spinel_datatype_unpack()` expects a `spinel_eui64_t **` is included. - For `SPINEL_DATATYPE_UTF8_C`, this function expects two arguments, the first of type `char *` and the second is of type `size_t` to indicate length of the provided buffer in the first argument just like `strncpy()`, while `spinel_datatype_unpack()` only expects a `const char **`.
spinel_datatype_unpack_in_place() is called by 4 functions and calls 1 function:
![]()
spinel_datatype_unpack_in_place()
spinel_datatype_unpack_in_place() reads 1 variable:
![]()
spinel_datatype_unpack_in_place()