pub unsafe extern "C" fn icsneo_serialNumToString(
num: u32,
str_: *mut c_char,
count: *mut usize,
) -> boolExpand description
\brief Convert a serial number in numerical format to its string representation.
\param[in] num A numerical serial number.
\param[out] str A pointer to a buffer where the string representation will be written. NULL can be passed, which will write a character count to count.
\param[inout] count A pointer to a size_t which, prior to the call,
holds the maximum number of characters to be written (so str must be of size count + 1 to account for the NULL terminator),
and after the call holds the number of characters written.
\returns True if str contains the string representation of the given serial number.
On older devices, the serial number is one like 138635, the numerical representation is the same as the string representation.
On newer devices, the serial number is one like RS2259, and this function can convert the numerical value back into the string seen on the back of the device.
A query for length (str == NULL) will return false.
icsneo_getLastError() should be checked to verify that the neodevice_t provided was valid.
The client application should provide a buffer of size 7, as serial numbers are always 6 characters or fewer.
If the size provided is not large enough, the output will be NOT be truncated.
Nothing will be written to the output.
Instead, an icsneo::APIEvent::BufferInsufficient will be available in icsneo_getLastError().
False will be returned, and count will now contain the number of bytes necessary to store the full string.