Description

Sends a byte-based command to the Commander core device through the open path device, which is specified in the parameter pHandle and expects no response from the device. The command to be sent must be passed as a byte array in parameter command. Returns 1 if successful, 0 if unsuccessful.

The command buffer must be smaller than 64 bytes in length.


Arguments

pHandle

Type: CommanderDeviceHandle*  

Pointer to a device‑handle variable.

command

Type: uint8_t*  

ASCII command byte array to be sent to the Commander.

command_length

Type: size_t*  

Length of buffer in command.


Return Value

Type: Int  


Value

Meaning

0

Failure

1

Success

Other (negative)

Host communication failed (see Communication Error Codes)


Examples

  • Python

api = DLLInterface()

# Send Bytes Commander

command = list('VER'.encode("utf-8"))

ByteArray = ctypes.c_ubyte * len(command)

command_array = ByteArray(*command)

return = api.dll.SendReceiveBytesCommander(self.handle, command_array, len(command))

if return:

   print(f"Sent: {command}")


REPOSITORY PLACEHOLDER LINK

< Previous | Topic Home | Home |  Next  >