Differences

This shows you the differences between two versions of the page.

Link to this comparison view

jsapi:connect [2025/04/30 03:18] (current)
optrix created
Line 1: Line 1:
 +====Connect===
  
 +The **Connect** function is part of the [[HMITTPanel|HMITTPanel]] class used to connect to live ARDI data.
 +
 +Once you've subscribed to one or more points with the [[Sub]] function, you use //Connect// to connect to the ARDI server.
 +
 +===Parameters===
 +
 +^Name^Type/Default^Use^
 +|Server|String|The URL of the ARDI server, without any prefix/schema|
 +
 +===Example===
 +
 +<code javascript>
 +   var connection = new HMITTPanel();
 +
 +   connection.Sub("Asset Name.Property Name",function(v) {
 +      console.log("New Value: " + v);
 +   });
 +
 +   connection.Connect(Server);
 +</code>
 +
 +===Notes===
 +
 +This function should be called //after// you call [[Sub|Sub]] and (optionally) [[UseSSL|UseSSL]].