Difference between revisions of "Global Object XML Files"
Jimhogenson (talk | contribs) |
Jimhogenson (talk | contribs) |
||
Line 60: | Line 60: | ||
'''defvalue="n.nn"''' – Default value to be applied upon startup if requested. | '''defvalue="n.nn"''' – Default value to be applied upon startup if requested. | ||
+ | |||
+ | '''defontimeout="1"''' - Flag set to "1" to indicate that this object should be set to the default value upon refresh timeout. | ||
'''defonstart="1"''' – Flag set to “1” to indicate that this object should be set to the default value at startup, or zero otherwise (zero assumed if omitted). | '''defonstart="1"''' – Flag set to “1” to indicate that this object should be set to the default value at startup, or zero otherwise (zero assumed if omitted). | ||
'''persistent="1"''' – Flag set to “1” to indicate this object is “persistent”, which means saved in non-volatile memory. This non-volatile memory is implemented as a database stored in Flash memory. Upon startup, the object will assume its last known value as found in the database. Any changes to the object’s value will be recorded in the database for future use. If not persistent, set flag to zero (zero assumed if omitted). | '''persistent="1"''' – Flag set to “1” to indicate this object is “persistent”, which means saved in non-volatile memory. This non-volatile memory is implemented as a database stored in Flash memory. Upon startup, the object will assume its last known value as found in the database. Any changes to the object’s value will be recorded in the database for future use. If not persistent, set flag to zero (zero assumed if omitted). |
Latest revision as of 14:07, 20 May 2019
Global Object XML Files
Example XML File
<?xml version="1.0" encoding="ISO-8859-1"?>
<configuration>
<data_objects>
<obj id="1">
<set type="int" name="Object 1" desc="First object"/>
<set location="Building 1" units="Degrees"/>
<set refresh="600"/>
<set defvalue="10" defonstart="1" persistent="1"/>
</obj>
<obj id="2">
<set type="int" name="Object 2" desc="Second object"/>
<set location="Building 2" units="Degrees"/>
<set refresh="600"/>
<set defvalue="20" defonstart="1" persistent="1"/>
</obj>
<obj id="3">
<set type="int64" name="Object 3" desc="Third object"/>
<set location="Building 3" units="Degrees"/>
<set refresh="600"/>
<set defvalue="0" defonstart="1" persistent="1"/>
</obj>
</data_objects>
</configuration>
Global Object <data_objects> Section
Each XML “paragraph” about an object starts with an ID number, which will be the object number that is universally accessible to all applications in the system.
For each object:
type="xxx" - Valid parameters for type, referring to native data type, are as follows:
Type label | Description |
---|---|
int | 32-bit integer |
int64 | 64-bit integer |
real | Floating point (double precision) |
char | ASCII character string |
length="n" – If type is “char”, then this specifies how many character long the string is. Not used for any type other than char. Length should be an integer.
name="ObjectName" – arbitrary name for the data object, generally visible in web UI’s.
desc="description" – arbitrary description of the object provided by the user.
location="location" – arbitrary location string further documenting the object.
units="unitsName" – arbitrary units string further documenting the object.
refresh="n" – A timeout in seconds, if nonzero. If the object is not updated within this amount of time, its state will be changed to “stale”. If zero, the timeout feature is disabled and the object will never become stale. Timeout should be an integer.
defvalue="n.nn" – Default value to be applied upon startup if requested.
defontimeout="1" - Flag set to "1" to indicate that this object should be set to the default value upon refresh timeout.
defonstart="1" – Flag set to “1” to indicate that this object should be set to the default value at startup, or zero otherwise (zero assumed if omitted).
persistent="1" – Flag set to “1” to indicate this object is “persistent”, which means saved in non-volatile memory. This non-volatile memory is implemented as a database stored in Flash memory. Upon startup, the object will assume its last known value as found in the database. Any changes to the object’s value will be recorded in the database for future use. If not persistent, set flag to zero (zero assumed if omitted).