[][src]Function k4a_sys_temp::k4a_device_get_serialnum

pub unsafe extern "C" fn k4a_device_get_serialnum(
    device_handle: k4a_device_t,
    serial_number: *mut c_char,
    serial_number_size: *mut usize
) -> k4a_buffer_result_t

Get the Azure Kinect device serial number.

\param device_handle Handle obtained by k4a_device_open().

\param serial_number Location to write the serial number to. If the function returns ::K4A_BUFFER_RESULT_SUCCEEDED, this will be a NULL terminated string of ASCII characters. If this input is NULL \p serial_number_size will still be updated to return the size of the buffer needed to store the string.

\param serial_number_size On input, the size of the \p serial_number buffer if that pointer is not NULL. On output, this value is set to the actual number of bytes in the serial number (including the null terminator).

\returns A return of ::K4A_BUFFER_RESULT_SUCCEEDED means that the \p serial_number has been filled in. If the buffer is too small the function returns ::K4A_BUFFER_RESULT_TOO_SMALL and the size of the serial number is returned in the \p serial_number_size parameter. All other failures return ::K4A_BUFFER_RESULT_FAILED.

\relates k4a_device_t

\remarks Queries the device for its serial number. If the caller needs to know the size of the serial number to allocate memory, the function should be called once with a NULL \p serial_number to get the needed size in the \p serial_number_size output, and then again with the allocated buffer.

\remarks Only a complete serial number will be returned. If the caller's buffer is too small, the function will return ::K4A_BUFFER_RESULT_TOO_SMALL without returning any data in \p serial_number.

\xmlonly k4a.h (include k4a/k4a.h) k4a.lib k4a.dll \endxmlonly