Javascript/Digital Signage API

Although it is still available, you may want to consider Data-Responsive SVG documentation for a more up-to-date and powerful version of this API.

ARDI includes a Javascript API to access live data in HTML pages and SVG images.

It's quite simple to use (particularly combined with JQuery) and requires only a few lines of code to get working.

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
//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//");

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 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