WireWare native: WireWare ExecuteClientCommand I

From FactorityWiki

Jump to: navigation, search

Contents

Summary

Sends a command to a connected client.


WIREWARE_RESULT WireWare_ExecuteClientCommand_I (
WIREWARE_MACHINEI_HANDLE hMachine, // The handle of the machine object
WIREWARE_MACHINE_CLIENTI_HANDLE hClient, // The handle of the client connection.
WIREWARE_CSTR command, // Pointer to command string
WIREWARE_STR result, // Pointer to result buffer
WIREWARE_INT maxResult, // The size of the result buffer
WIREWARE_TIMEOUT timeout, // timeout in ms
);

Parameters

hMachine
Specifies the handle of the machine object.
hClient
Specifies the handle of the client connection to which the command should be sent. Handles of client connections can only be optained by setting a notification function ( WireWare_SetMachineNotificationCallback_I)
command
Specifies a pointer to null-terminated command string, which is sent to the client.
result
Specifies a pointer to the buffer, which gets assigned the resulting string of the command execution.
maxResult
Specifies the size of the result buffer. If the resulting string cannot be stored in the buffer, an error is returned.
timeout
Specifies the maximum allowed execution time (in ms) for this function.

Result

If the function succeeds, the return value is WIREWARE_ERROR_NONE. Otherwise it returns an appropriate error code.


Explanation

This function sends a command string to the specified client. Since client handles cannot be queried, they have to be optained by setting a notification function ( WireWare_SetMachineNotificationCallback_I) and storing the passed client handles.

See also

WireWare_SetMachineNotificationCallback_I