Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
|
ardiadminguide:lookup [2016/11/20 10:03] optrix created |
ardiadminguide:lookup [2018/12/11 02:17] (current) optrix |
||
|---|---|---|---|
| Line 3: | Line 3: | ||
| Lookups are very similar to [[enumeration|enumerations]] - they translate one value into something more human-readable. | Lookups are very similar to [[enumeration|enumerations]] - they translate one value into something more human-readable. | ||
| - | The major difference between the two is the //number// of different values they support. Enumerations are suited to smaller, simpler sets of values - for example, having less than 10 distinct values. | + | The major difference between the two is the //number// of different values they support. Enumerations are suited to smaller, simpler sets of values - for example, having less than 10 distinct types of output text. |
| Lookups are different. When you define a lookup, you upload a **lookup table** containing the lookup value and the translation. This can have //hundreds// or even //thousands// of values. | Lookups are different. When you define a lookup, you upload a **lookup table** containing the lookup value and the translation. This can have //hundreds// or even //thousands// of values. | ||
| - | This makes them very useful for looking up fault-codes and statuses. | + | This makes them very useful for looking up fault-codes and statuses in systems that share a single, large lookup table to translate those codes into meaningful messages. |
| + | |||
| + | ===Table Format=== | ||
| + | |||
| + | The lookup table should be in //tab-delimited// or //comma-separated// format, with the lookup value first and the displayed value second. The table should **not** include a header. | ||
| + | |||
| + | |0|OK| | ||
| + | |1|Starting| | ||
| + | |2|Running| | ||
| + | |3|Stopping| | ||
| + | |4|Stopped| | ||
| + | |10|No Air Pressure| | ||
| + | |11|No Power| | ||
| + | |12|Comms Lost| | ||
| + | |||
| + | ===Performance Warning=== | ||
| + | |||
| + | //Technical Section// | ||
| + | |||
| + | Why does ARDI have both an //enumeration// and a //lookup// type? The simple answer is **efficiency**. | ||
| + | |||
| + | When dealing with small numbers of options, it's quite easy to send the complete lookup table out to ARDI clients. When there are only a half-dozen options to choose from, the complete list is trivial to transmit. | ||
| + | |||
| + | However, when the list is significantly larger, it's puts a lot of load on the client and the network. Lookup properties instead push some of this additional work off to the driver, rather than loading-down the server and the client. | ||
| + | |||
| + | Please use enumerations where possible, as a large number of small lookup properties will cause additional server load that will negatively impact performance. | ||