Description

Obtains the device ID string of a Commander core device by its index number within the detected number of devices. The first detected device is indexed as 0, the second as 1, and so on.  Returns 1 if successful, 0 if unsuccessful.

Argument

index

Type: Int  

Specifies the index number of the device to be retrieved (indexes are 0 based).

id

Sends a byte-based list of commands to the Commander core device through the open path device, which is specified in the parameter pHandle and expects no response from the device. Commands must be comma-separated and added to the buffer parameter data. Returns 1 if successful, 0 if unsuccessful.

Type: char*  

Pointer to a character buffer that receives the device name.

Device Name Format:  CMD-4CR-xx  Where xx is the Identification Number(ID) of the device.

Return Value

Type: Int  

Value

Meaning

0

Failure

1

Success

Other (negative)

Host communication failed (see Communication Error Codes)

Examples

Python

api = DLLInterface()

# Get Commander ID

index = 0

id = ctypes.create_string_buffer(64)

return = api.dll.GetCommanderID(index, id)

if return:

   print(f"Device{index} ID: {id}")

V 1.0 Function: GetCommanderHIDName(int index, char* name) 

REPOSITORY PLACEHOLDER LINK


< Previous | Topic Home | Home |  Next  >