Device Identification Capability
C Reference » Production Nodes Functionality » Device

## Functions

XN_C_API XnStatus XN_C_DECL | xnGetDeviceName (XnNodeHandle hInstance, XnChar *strBuffer, XnUInt32 *pnBufferSize)
XN_C_API XnStatus XN_C_DECL | xnGetVendorSpecificData (XnNodeHandle hInstance, XnChar *strBuffer, XnUInt32 *pnBufferSize)
XN_C_API XnStatus XN_C_DECL | xnGetSerialNumber (XnNodeHandle hInstance, XnChar *strBuffer, XnUInt32 *pnBufferSize)

## Detailed Description

The Device Identification Capability (XN_CAPABILITY_DEVICE_IDENTIFICATION) allows to identify the device according to its name, to a vendor-specific string and its serial number.

## Function Documentation

## xnGetDeviceName()

XN_C_API XnStatus XN_C_DECL xnGetDeviceName | ( | XnNodeHandle | hInstance,
|  | XnChar * | strBuffer,
|  | XnUInt32 * | pnBufferSize )

Gets the device name.

Parameters

  hInstance | [in] A handle to the instance.
  strBuffer | [in] A buffer to accept the device name.
  pnBufferSize | [in/out] Size of the buffer.

Returns
  XN_STATUS_OK if succeeded, or XN_STATUS_OUTPUT_BUFFER_OVERFLOW if buffer is not sufficient. in such a case, the device name should be truncated to fit in the buffer, and pnBufferSize should be updated to the required size.

## xnGetSerialNumber()

XN_C_API XnStatus XN_C_DECL xnGetSerialNumber | ( | XnNodeHandle | hInstance,
|  | XnChar * | strBuffer,
|  | XnUInt32 * | pnBufferSize )

Gets the serial number of the device.

Parameters

  hInstance | [in] A handle to the instance.
  strBuffer | [in] A buffer to accept the string.
  pnBufferSize | [in/out] Size of the buffer.

Returns
  XN_STATUS_OK if succeeded, or XN_STATUS_OUTPUT_BUFFER_OVERFLOW if buffer is not sufficient. in such a case, the string should be truncated to fit in the buffer, and pnBufferSize should be updated to the required size.

## xnGetVendorSpecificData()

XN_C_API XnStatus XN_C_DECL xnGetVendorSpecificData | ( | XnNodeHandle | hInstance,
|  | XnChar * | strBuffer,
|  | XnUInt32 * | pnBufferSize )

Gets a vendor-specific string.

Parameters

  hInstance | [in] A handle to the instance.
  strBuffer | [in] A buffer to accept the string.
  pnBufferSize | [in/out] Size of the buffer.

Returns
  XN_STATUS_OK if succeeded, or XN_STATUS_OUTPUT_BUFFER_OVERFLOW if buffer is not sufficient. in such a case, the string should be truncated to fit in the buffer, and pnBufferSize should be updated to the required size.