3.1.12 StreamDataToCommander
Description
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.
The data buffer can hold up to 1000 comma-separated commands.
Arguments
pHandle
Type: CommanderDeviceHandle*
Pointer to a device‑handle variable.
data
Type: uint8_t*
Array of ASCII commands to be sent to the Commander.
length
Type: size_t*
Total number of bytes in the data buffer.
Return Value
Type: Int
|
Value |
Meaning |
|
0 |
Failure |
|
1 |
Success |
|
Other (negative) |
Host communication failed (see Communication Error Codes) |
Examples
- Python
|
api = DLLInterface() # Stream Data Commander dataToStream = "" for i in range(1000): xValue = i temp = "I1000000:" + str(xValue*100) + ":100:10000000" + "," dataToStream += temp command = dataToSend.encode() return = api.dll.StreamDataToCommander(handle, command, len(command)) if return: print(f"Sent: {command}") |
REPOSITORY PLACEHOLDER LINK
< Previous | Topic Home | Home | Next >