Differences

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

Link to this comparison view

Next revision
Previous revision
ardisdk:javascript_digital_signage_api [2016/08/01 12:35]
optrix created
ardisdk:javascript_digital_signage_api [2016/11/30 01:04] (current)
optrix
Line 6: Line 6:
  
 You can find the javascript include file at **/​plugins/​optrix/​ardiclient.js**. You can find the javascript include file at **/​plugins/​optrix/​ardiclient.js**.
 +
 +===Model===
 +
 +The Javascript API provides the **ARDIHMI** class, which is used to subscribe to updates from an ARDI server.
 +
 +The process consists of...
 +
 +  * Creating the ARDIHMI object,
 +  * Subscribing to Change Events
 +  * Connecting to the Server
 +
 +<code javascript>​
 +//Prepare the new object
 +var connection = new ARDIHMI();
 +
 +//Subscribe To Each Dynamic Property
 +connection.Subscribe("//​Dynamic Property//",​function (val) {
 +    //Update HTML/SVG
 +});
 +
 +//Connect to the server
 +connection.ConnectTo("//​address//"​);​
 +
 +</​code>​
 +
 +Where **address** is the IP address of the ARDI database (this includes the //site// or //​database//​ code when an ARDI server supports multiple databases - for example, the PowerGen Demo on http://​ademo.optrix.com.au has a code of **pd**, so the full address is **http://​ademo.optrix.com.au/​s/​pd**)
 +
 +You'll need to know the **[[data points|data point name]]** for every asset property you'd like to display in your image or web page.
 +
 +For example, "​23:​20:​measurement"​ is the code for the measured pressure on asset 23.
  
 ===Examples=== ===Examples===
  
 [[Basic Digital Signage Examples]] [[Basic Digital Signage Examples]]
-[[Basic Realtime HTML Display]]+