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

NameType/DefaultUse
PointStringThe name of the data point, made up of the asset name/identifier, a period (.) and the name of the property.
CallbackFunctionA function to be called when the value changes. The function is called with one parameter - the new value
DiscreteBooleanTrue 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.