When the OPC DataHub executes a command, it may return a success message or an error message. The returned message contains the original command, and some or all of the arguments for the command. These messages will be received by programs using the DataHub APIs for C++, Java, and .NET, but they will not be received by DataHub scripts. The two types of success messages are:
No arguments: (success command)
One or more arguments: (success command arg1)
Success messages are returned if the DataHub command acksuccess has been previously issued with a value of 1. A value of 0 means no success messages will be returned. Error messages are returned any time there is an error. There are four types of error messages:
No arguments: (error "-2: (command): error message")
One argument: (error "-2: (command arg1): error message")
Two arguments: (error "-2: (command arg1 arg2): error message")
More than two arguments: (error "-2: (command arg1 ...): error message")
The error messages are the negation of these error codes:
ST_OK | The function executed without error. |
ST_ERROR | An error occurred. |
ST_NO_TASK | A required task does not exist. |
ST_NO_MSG | There is no message available. |
ST_WOULDBLOCK | This action would block, and is not permitted. |
ST_INTR | An interrupt occurred. |
ST_FULL | The queue is full. |
ST_LOCKED | A DataHub point is locked. |
ST_SECURITY | The security level is insufficient. |
ST_NO_POINT | A required DataHub point does not exist. |
ST_INSIG | A change in a DataHub point's value is insignificant. This is not really an error, but a notification that no exception will be generated by the datahub. |
ST_UNKNOWN | There is an unknown error. |
ST_NO_QUEUE | A target task has no queue, or qserve is absent. |
ST_CMD_SYNTAX_ERROR | The command was not found, or there was a syntax error. |
ST_REPLIED | The reply was complete. |
ST_WRONG_TYPE | The type of a point or variable was wrong. |
ST_TOO_LARGE | A value to be written to memory is larger than the available buffer. |
ST_NO_MEMORY | There is insufficient memory available. |
ST_OLD_DATA | Time-significant data is out of date. |
ST_TIMEOUT | A timeout occurred in poll mode. |
Copyright © 1995-2010 by Cogent Real-Time Systems, Inc. All rights reserved.