RtecatWaitForCommand
RtecatWaitForCommand waits for a command for a specified time duration.
Syntax
RTECAT_COMMAND_STATUS RtecatWaitForCommand(
[in] double Timeout,
[in] BOOL AbortOnTimeout,
[in] RTECAT_COMMAND_STATUS Status
);
Parameters
[in] Timeout
The time duration to wait.
[in] AbortOnTimeout
TRUE to abort the command when the time duration elapses, FALSE otherwise.
[in] Status
The Status structure contains the handle for the command to be waited on.
Return Values
The function returns an RTECAT_COMMAND_STATUS structure. If an error occurs, field State of the structure is set to ecatCommandError and the error code is stored in field ErrorId (see RTECAT_ERROR for error values). If the function succeeds, ErrorId is set to ecatErrNoError (which is represented by the value 0). If the function fails, it stores a different error value.
Possible return values:
| Return value | Meaning |
|---|---|
|
ecatErrNoError |
The function succeeded. |
|
ecatErrWrongParameter |
The command is not active. |
|
ecatErrMainDeviceNotReady |
The MainDevice is not ready. |
Remarks
RtecatWaitForCommand doesn't return error codes for individual commands.
RtecatWaitForCommand is an asynchronous function that takes time to complete. It allows for background execution and requires you to check its status by calling RtecatGetCommandStatus.
Requirements
| Minimum supported version | Header | Library |
|---|---|---|
|
wRTOS 1.0 SDK |
RtecatApi.h |
RtecatApi_W64.lib (Windows), RtecatApi.lib (RTSS) |
See Also: