Sub
The Sub function is part of the HMITTPanel class used to connect to live ARDI data.
It adds a single point of data to the subscription, and provides a function that is called whenever the value of that point changes.
Parameters
Name | Type/Default | Use |
---|---|---|
Point | String | The name of the data point, made up of the asset name/identifier, a period (.) and the name of the property. |
Callback | Function | A function to be called when the value changes. The function is called with one parameter - the new value |
Discrete | Boolean | True if this value is treated as a discrete value (ie. not animated) |
Example
var connection = new HMITTPanel(); connection.Sub("Asset Name.Property Name",function(v) { console.log("New Value: " + v); }); //Connect to the server here...
Notes
This function should be called before you call connect.