Description

Opens a device to a Commander core device by its device index string. Returns 1 if successful, 0 if unsuccessful.

Execute this for restart after disconnecting with the function, CloseCommander.

Arguments

pHandle

Type: CommanderDeviceHandle*  

Pointer to a device‑handle variable.

Receives the opened device handle if the function succeeds.

index

Type: int  

Device index number.

The device index is 0 indexed, the max index is 1 less than the number obtained using GetCommanderCount.

Return Value

Type: Int  

Value

Meaning

0

Failure

1

Success

Other (negative)

Host communication failed (see Communication Error Codes)

Examples

  • Python

api = DLLInterface()

# Open Commander by Index

index = 0

handle = c_void_p()

return = api.dll.OpenCommanderByIndex(ctypes.byref(handle), index)

if return:

      print(f"Device{index} is Opened")

REPOSITORY PLACEHOLDER LINK

< Previous | Topic Home | Home |  Next  >