Azure Kinect Sensor SDK  refs/heads/master
Documentation for https://github.com/Microsoft/Azure-Kinect-Sensor-SDK

◆ k4a_device_get_serialnum()

k4a_buffer_result_t k4a_device_get_serialnum ( k4a_device_t  device_handle,
char *  serial_number,
size_t *  serial_number_size 
)
related

Get the Azure Kinect device serial number.

Parameters
device_handleHandle obtained by k4a_device_open().
serial_numberLocation 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 serial_number_size will still be updated to return the size of the buffer needed to store the string.
serial_number_sizeOn input, the size of the 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 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 serial_number_size parameter. All other failures return K4A_BUFFER_RESULT_FAILED.
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 serial_number to get the needed size in the serial_number_size output, and then again with the allocated buffer.
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 serial_number.