DataHub APIs for C++, Java, and .NET

Version 6.4

December 12, 2008

The C++, Java, and .NET Application Program Interfaces for the Cascade DataHub.

Copyright, trademark, and software license information.

Table of Contents


1. Introduction
1.1. When to use the different Cogent APIs
1.2. Preliminaries
1.3. C++ Programming
1.4. Java Programming
1.5. .NET Programming

2. Web Programming with Java
2.1. Overview
2.2. Working with Java Applets
2.2.1. Connecting
2.2.2. Applet Configuration
2.2.3. Specifying Colors
2.2.4. Customization
2.2.5. Browser Limitations
2.3. Configuring the DataHub Web Server
2.4. Testing the DataHub Web Server
2.5. In the web page
2.5.1. Data model
2.5.2. Example HTML coding
2.5.3. Using a Base applet
2.5.4. Using Listener applets

3. Standard Java Applets
DataHubBaseApplet - a base class, not instantiated.
DataHubBaseButton - a base class for buttons.
DataHubButton - a push button that sends a value for a DataHub point.
DataHubCheckBox - a check box that toggles a DataHub point between two values.
DataHubEntryField - an entry field for changing the value of a DataHub point.
DataHubGauge - a gauge for displaying DataHub point values.
DataHubLabel - displays the value of a DataHub point in a text field.
DataHubLineChart - displays a real-time trend of DataHub data.
DataHubLink - makes a TCP connetion to the DataHub.
DataHubListener - a base class for all applets that send and receive data.
DataHubProgressBar - a horizontal or vertical progress bar for displaying DataHub data.
DataHubRadioButton - a radio buttona special button, used in a DataHubRadioGroup.
DataHubRadioGroup - a group of radio buttons for assigning a value to a DataHub point.
DataHubSlider - a slider that assigns a numeric value to a DataHub point.
DataHubSpinner - sets the value of a DataHub point using up and down arrows.
DataHubTable - displays multiple DataHub data points in a single applet.
DataHubTable Cell Classes - assign identical arguments to many table cells.
DataHubTable Cell Specification - specifies the position and contents of a table cell.
DataHubTable Fonts - specify the fonts for a table cell.
DataHubTable Value Maps - change cell formatting or text based on a DataHub point value.
DataHubToggleButton - toggles a DataHub point between two values.
DataHubTrend - a dynamically updating graphical display of DataHub values.
DataHubViewer - makes a TCP connection to the DataHub, displaying all available data in a table.

4. The DataHubConnector Class
4.1. Overview
4.2. Categorized List of Methods
4.3. Making Callbacks

5. The DataHubPoint Class
5.1. Overview
5.2. Categorized List of Methods

A. GNU General Public License
B. GNU Lesser General Public License

I. DataHubConnector Methods
DataHubConnector - creates a DataHubConnector object.
~DataHubConnector - destroys a DataHubConnector object.
activeHeartbeatTimers - determines if both heartbeat timers are active.
addPointValue - adds a specified amount to a Cascade DataHub point value.
appendPointValue - appends a string to a Cascade DataHub point.
cancelHeartbeatTimers - cancels the heartbeat and timeout timers.
cancelReconnectionTimer - stops the delay timer for reconnection attempts.
closeConnection - closes the connection to the Cascade DataHub.
createPoint - creates a Cascade DataHub point.
dividePointValue - divides the value of the named point by the specified value.
escapedString - prepares a string for use with writeCommand (Java and C# only).
getCnxState - retrieves the operational state of the connector object.
getCnxStateString - retrieves a string corresponding to the operational state.
getCnxSubStateString - provides detailed information on the connection state (C++ only).
getDefaultDomain - returns the current default domain.
getErrString - retrieves the last error string (C++ only).
getHeartbeat - retrieves the heartbeat timer period.
getHostName - retrieves the host name connection parameter.
getPort - retrieves the port connection parameter.
getReconnectionDelay - retrieves the delay time between reconnection attempts.
getServiceName - retrieves the port service name connection parameter (C++ only).
getTimeout - retrieves the timeout timer period.
initializePointCache - initializes local point cache usage.
isConnected - indicates whether a connection has been established.
isConnecting - indicates whether a connection attempt is in progress.
lookupPoint - accesses a point from the point cache.
multiplyPointValue - multiplies a Cascade DataHub point value by a specified amount.
openConnection - attempts to establish a connection to the Cascade DataHub.
readPoint - gets the value of a Cascade DataHub point.
registerDomain - registers to receive updates from domain points.
registerPoint - registers to receive updates from a Cascade DataHub point.
retryConnection - opens a new connection to the Cascade DataHub (C++ only).
sendBinaryPointMessages - formats data in binary mode (C++ only).
sendLispMessage - sends a message to the Cascade DataHub (C++ only).
sendLogin - transmits the user name and password.
setConnectionParms - sets the connection parameters.
setDefaultDomain - sets the default domain.
setHeartbeatTimes - sets the period of the heartbeat timers.
setPointLock - sets the lock attributes of a Cascade DataHub point.
setPointSecurity - sets the security attributes of a Cascade DataHub point.
setReconnectionDelay - sets the delay time between reconnection attempts.
setUsername - stores a user name and password for this connection.
shutdown - prepares for an application shutdown or disconnect (Java and C# only).
startHeartbeatTimers - starts the heartbeat and timeout timers.
startReconnectionTimer - starts the delay timer for reconnection attempts.
unregisterPoint - stops receiving updates from a Cascade DataHub point.
writeCommand - sends a command to the Cascade DataHub (Java and C# only).
writePoint - writes a new value to a Cascade DataHub point.

II. Callback Methods
onAlive - a virtual method invoked on receipt of a heartbeat from the DataHub.
onAsyncMessage - a virtual method invoked on receipt of a Cascade DataHub message.
onConnectionFailure - a virtual method invoked when a connection or attempt to connect fails.
onConnectionSuccess - a virtual method invoked when a connection is established.
onError - a virtual method invoked on receipt of an error message.
onPointChange - a virtual method invoked on receipt of a point value change.
onPointEcho - a virtual method invoked on receipt of a locally changed point value.
onStatusChange - a virtual method invoked on change of status.
onSuccess - a virtual method invoked on receipt of a success message.

III. DataHubPoint Methods
DataHubPoint - constructs a DataHubPoint object.
~DataHubPoint - destroys a DataHubPoint object.
operator= - assigns a new value to a DataHubPoint object (C++ only).
clear - clears the point.
copy - copies the point data.
getConfidence - retrieves the user's point confidence.
getDateString - generates a 'standard' timestamp data/time representation.
getDoubleValue - retrieves the point data as a double-typed value.
getFlags - retrieves the flags property of the point.
getIntValue - retrieves the point data as an int-typed value.
getListeners - retrieves listeners on the point (Java only).
getLocked - retrieves the locked property of the point.
getName - retrieves the point name.
getNanoseconds - retrieves the timestamp nanoseconds component.
getQuality - retrieves the point quality.
getQualityString - generates a string representing the point quality.
getSeconds - retrieves the timestamp seconds component.
getSecurity - retrieves the security property of the point.
getStringValue - retrieves the point data as a string.
getType - retrieves the point data type.
getUserdata - retrieves the user object associated with the point.
qualifyName - creates a point name string qualified by a domain name.
removeListener - removes a listener from the point (Java only).
setConfidence - sets the user's confidence in a point.
setInfo - sets the information properties of a point.
setLocked - sets the locked property of the point.
setName - assigns a name to the point.
setQuality - sets the point quality.
setSecurity - sets the security property of the point.
setTimeStamp - sets the point timestamp in various ways.
setFlags - sets the flags property of the point.
setUserdata - associates the point with a user object.
setValue - sets the point data to the specified type and value.
setValueFromString - sets the point data to the value represented by a string.
unqualifyName - removes the domain name qualifier from a point name.
Index