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.
| File | Purpose |
|---|---|
| info.inc | Provides details on the driver |
| configure-source.php | The user interface for setting up the data source |
| saveconfig-source.php | Convert the properties set in configure-source.php to a machine-readable address string |
| friendlyname.php | Convert the address from saveconfig-source.php to a human-readable text string |
| link.php | The user interface for setting up a data link between the source and an asset property |
| encode.php | Convert the properties set in link.php to a machine-readable address string |
| decode.php | Convert the address from encode.php to a human-readable description |