Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
ardisdk:creating_an_event_ardi_driver [2024/09/24 06:29] optrix created |
ardisdk:creating_an_event_ardi_driver [2024/09/24 23:46] (current) optrix [Creating a Web Interface] |
||
---|---|---|---|
Line 54: | Line 54: | ||
Your class has access to some important functions and variables. | Your class has access to some important functions and variables. | ||
- | ===Query.AddLine()=== | + | ===Query.AddLineFromDictionary()=== |
- | This function is responsible for outputting | + | This function is responsible for outputting |
^Parameter^Purpose^ | ^Parameter^Purpose^ | ||
- | |Address|The address that this value was read from| | + | |Dictionary|A dictionary describing |
- | |Date Stamp|The date that the measurement was made (as a datetime)| | + | |
- | |Value|The value read from your data source| | + | |
- | Note that if your historical data link has a transform attached, this function will automatically apply the transform | + | Data from the dictionary is used to create an Event. Each event needs - as an absolute minimum - a **start** element (containing the UTC date/time of the event) and a **name** element (used to identify the event). |
+ | |||
+ | They may also include **end** or **duration** properties. //End// is the UTC date/time when the event is complete, and // | ||
+ | |||
+ | Any other properties you include are displayed as **metadata** | ||
===self.core.logger=== | ===self.core.logger=== | ||
Line 200: | Line 202: | ||
This will require some basic HTML & PHP. | This will require some basic HTML & PHP. | ||
- | Firstly, copy one of the existing drivers user interfaces by copying **/ | + | Firstly, copy one of the existing drivers user interfaces by copying **/ |
There are several PHP files in this folder. Click on them for examples and documentation on what they do. | There are several PHP files in this folder. Click on them for examples and documentation on what they do. | ||
Line 209: | Line 211: | ||
|[[saveconfig-source_php|saveconfig-source.php]]|Convert the properties set in // | |[[saveconfig-source_php|saveconfig-source.php]]|Convert the properties set in // | ||
|[[friendlyname_php|friendlyname.php]]|Convert the address from // | |[[friendlyname_php|friendlyname.php]]|Convert the address from // | ||
- | |[[link_php|link.php]]|The user interface for setting up a data link between the source and an asset property| | ||
- | |[[encode_php|encode.php]]|Convert the properties set in // | ||
- | |[[decode_php|decode.php]]|Convert the address from // | ||