This is an old revision of the document!


Creating a Web Interface

The last step of building a driver is to create a web interface.

All in all, we need two of them - one to set up a connection to the data source itself (ie. the address of the server, login details etc) and one to bind a single ARDI property to data from that source (ie. choosing a column from a database, tag from a historian etc.).

At its simplest, it will require a little working knowledge of HTML.

Firstly, copy one of the existing drivers user interfaces by copying /opt/ardi/web/data/live/text to /opt/ardi/web/data/live/text2 (the folder name must match the name of the driver folder & file).

There are several PHP files in this folder. Click on them for examples and documentation on what they do.

FilePurpose
info.incProvides details on the driver
configure-source.phpThe user interface for setting up the data source
saveconfig-source.phpConvert the properties set in configure-source.php to a machine-readable address string
friendlyname.phpConvert the address from saveconfig-source.php to a human-readable text string
link.phpThe user interface for setting up a data link between the source and an asset property
encode.phpConvert the properties set in link.php to a machine-readable address string
decode.phpConvert the address from encode.php to a human-readable description