Table of Contents
The DataHub has an internal command set, documented in the OPC DataHub Command Set reference. When you change the configuration of the DataHub in the Properties window, one or more of these commands is written in the configuration file, and the DataHub receives that command every time it starts up. You can use these commands to create custom configuration files. (Please see Appendix B, Configuration Files.)
It is also possible to issue these commands to the DataHub during run-time in any of the following ways:
With a DataHub script, using the special datahub_command function.
Using the DataHub APIs for C++, Java, and .NET.
Over a direct TCP connection.
This is how custom applications can interact directly with the DataHub. For example, DataSim connects to the DataHub by using the DataHub APIs for C++, Java, and .NET.
DataHub commands have the following syntax:
(command arg1 arg2 ...)
The whole command must be surrounded by parentheses. The command name and its arguments are each separated by white space—single spaces, tabs, or carriage returns are allowed. For example, the following line of a custom configuration file tells the OPC DataHub to create a new data domain, named TestDomain.
(create_domain TestDomain)
Multiple-word strings must be in quotes. Numbers take their own values. Booleans are 0 for false and 1 for true.
Copyright © 1995-2010 by Cogent Real-Time Systems, Inc. All rights reserved.