General
Properties
Property is used as an object in different places and for different purposes:
- Definition of property attributes
- Transmission of a concrete property value
- Both together (for dynamic PropertySets)
Accordingly, the actually existing attributes also differ. Only the “Id” is always present.
| Attribute | Type | Description | Default |
|---|---|---|---|
| id | string | Symbol. Uniquely identifies the property in the context of use. | Mandatory |
| name | string | Display-Name, can also be a LngId. | “[prop.<id>]” |
| type | string | Type specification (see below). | |
| kind | string | Explanation of type specification, for objects, e.g., its type (see below). | |
| minval | number | Smallest value for number types. | |
| maxval | number | Largest value for number types. | |
| maxlen | int | Maximum character length for string types. | |
| optional | bool | The property is only displayed for entry upon request. | false |
| <Option> | Option[] | Defines the selection for input and at the same time the display of the values. Only one option can be selected. | |
| <Flag> | Flag[] | (optional) Defines the selection of flags for input for integer types. Several flags can always be selected at the same time. | |
| available | string | Places a condition on the presence of the property. | |
| properties | Property[] | To implicitly define the contained properties for group types. | |
| defaultvalue | value | The value that is used when no concrete value is set. | |
| distinctnull | bool | Null differs from zero value. | false |
| desc | string | Semantic description of the property | “[prop.<id>.desc]” |
| <Param> | Param[] | Additional parameters as key value pairs to specify attributes, e.g., to describe a “kind”. |
Type
| type | Description |
|---|---|
| bool | Boolean |
| int | Integer |
| i8, u8, i16, u16, i32, u32, i64, u64 | Integer with size specification (currently only used for database objects) |
| double | Floating point |
| string | String |
| guid | 128 bit |
| time | 100 ns since 1970 / sec since 1970 (automatically detected) |
| object | A complex object that can contain further properties (see Nested properties). |
| <type>[] | Array - Addressed via consecutive index. If the value is defined explicitly, it is written as “[<item1>,<item2>]”. Note that quotation marks must be escaped, e.g., by using “"”. |
| <type>[#] | Indexed Array - The entries of this array are also addressed via an index, the indices are not continuously present. |
| <type>{} | Map - The entries of this array are identified via string keys. |
| group | Special property object for grouping properties. |
| data | Content is processed as a base64 string. Should only be used in combination with resources. |
Kind
Different kinds are possible for the different types. Several kinds can be specified separated by commas. If the specifications are contradictory, only the first specification will be used in this case.
| type | kind | Description |
|---|---|---|
| string | multiline | Multiline input possible |
| spellcheck | Spell check is enabled. | |
| localize | LNG IDs are resolved. | |
| tags | Show a selection of the available tags. | |
| phone | Text entry with phone number validation (format). | |
| Text entry with email validation (format). | ||
| url | Text entry with URL validation (format). | |
| uri ≥ext.common 0.2.2 | Text entry with URI validation (format). Params are defined here. | |
| password | Password input with hidden display and encrypted logging. | |
| file | Reference to a file and a file selection button (Startfolder, DialogFilter are defined by Params => Param). | |
| folder | Reference to a folder and a file selection button (Startfolder, DialogFilter are defined by Params => Param). | |
| guidtoken | Two buttons for generation and copy into clipboard plus a read-only text for GUID string. | |
| graphicfile | Reference to a file and a file selection button, whose DialogFilter is predefined for graphic files. | |
| textfile | Reference to a file and a file selection button, whose DialogFilter is predefined for text files. | |
| scriptfile | Reference to a file and a file selection button, whose DialogFilter is predefined for text files. | |
| textmacro | Reference to a file and a file selection button, whose DialogFilter is predefined for text files. | |
| regexvalidation | Text entry with RegEx based validation. | |
| int | timespan ≥ext.common 0.1.0 | Time picker for days, hours, minutes and seconds. Params for Format and Min/Max are defined here. |
| hex | The value is displayed and entered as hex values. | |
| byteadr | Four entry fields are displayed to enter and display each of the four bytes. | |
| wordadr | Two entry fields are displayed to enter and display each of the two shorts. | |
| flags | Requires definition of Flags. | |
| bool | togglebutton | Shows a toggle button. |
| radiobutton ≥ext.common 0.2.3 | Shows a radio button. Params are defined here. | |
| time (only display) | timeshort | Only time in short format as defined in the Settings. |
| timelong | Only time in long format as defined in the Settings. | |
| dateshort | Only date in short format as defined in the Settings. | |
| datelong | Only date in long format as defined in the Settings. | |
| dateverbose | Only date in verbose format as defined in the Settings. | |
| dateshorttimeshort | Date and time in short format as defined in the Settings. | |
| dateshorttimelong | Date in short format and time in long format as defined in the Settings. | |
| datelongtimeshort | Date in long format and time in short format as defined in the Settings. | |
| datelongtimelong | Date in long format and time in long format as defined in the Settings. | |
| object | keyvalue | An AdvObject with the following two entries. - key - value Only supported for backwards compatibility. Instead, nested properties can be used. |
| object[] | cam_preset | Marks the Object array as an array of presets. |
| data | (a MIME type) | Specification regarding the type of the resource. Use any MIME type, e.g., “image/jpeg”. |
Option
| Attribute | Type | Description | Default |
|---|---|---|---|
| id | string | Symbol. Uniquely identifies the option in the context of use, amongst others used for Default LngId of the display name. | |
| name | string | Display name, can also be a LngId. | “[<parenttype>.<parentid>.<id>]” |
| icon | string | Icon Id | |
| value | value | The value assigned to the option. | |
| kind | string | (optional) List of Kinds for special entries | |
| available | string | Places the availability of the option under a condition. | |
| desc | string | Semantic description of the option | “[<parenttype>.<parentid>.<id>.desc]” or if id empty “[<parenttype>.<parentid>.<value>.desc]” |
Option.Kind
| Kind | Description |
|---|---|
| all | Entry to select all |
| none | Entry to select nothing (implicit exclusive) |
| exclusive | Exclusive entry that removes other selections |
| separator | Optical separator |
| all,none | All = None. The complete selection is equivalent to the blank. |
| hidden ≥ext.common 0.2.4 | Hides the option from the selection. It’s only visible when it’s preselected |
Flag
| Attribute | Type | Description | Default |
|---|---|---|---|
| id | string | Symbol. Uniquely identifies the flag in the context of use, amongst others used for the Default LngId of the display name. | |
| name | string | Display name, can also be a LngId. | “[<parenttype>.<parentid>.<id>]” |
| icon | string | Icon Id | |
| value | int | The value assigned to the flag. Only one bit should be set here. | |
| available | string | Places the availability of the flag under a condition. | |
| desc | string | Semantic description of the option | “[<parenttype>.<parentid>.<id>.desc]” |
Param
Defines additional parameter of the Property.
| Attribute | Type | Description |
|---|---|---|
| key | string | Unique identifier of the parameter (The context of the parameter should be chosen as prefix, e.g., “file_”) |
| value | value | Value of the parameter |
General param values
| Param | Type | Description |
|---|---|---|
| hint | string | The hint text to be shown in the WinGuard property visualization |
Kind parameters
There are special parameters for several kinds of properties. The corresponding kind is used as context and therefor the prefix of parameter name.
In the following, all special parameters are listed corresponding to the property kind.
Property kind “file”
| Param | Type | Description |
|---|---|---|
| file_startfolder | string | Start directory for the selection dialog (e.g., “Graphics”, “D:\tmp”) |
| file_filter | string | Listing of the file filters to be offered in the selection dialog (e.g., “Video files (.avi,.mpg,.mov,.mp4) |
| file_filename | string | Path of the preselected file (e.g., “D:\tmp\test.txt”) |
| file_dialogtitle | string | Title of the selection dialog |
| file_dialogmode | string | One of the modes “Open”, “Save”. Default is “Open”. |
| file_dialogtype | EnumFileDialogType | Determines whether a WinGuard file dialog or a native Windows file dialog is used. Default is “Application”. |
Property kind “folder”
| Param | Type | Description |
|---|---|---|
| file_startfolder | string | Start directory for the selection dialog (e.g., “Graphics”, “D:\tmp”) |
| file_dialogtitle | string | Title of the selection dialog |
| file_dialogtype | EnumFileDialogType | Determines whether a WinGuard file dialog or a native Windows file dialog is used. Default is “Application”. |
EnumFileDialogType
| Value | Description |
|---|---|
| application | Only WinGuard filesystem is available. |
| windows | Only Windows filesystem is available. |
| applicationandwindows | WinGuard and Windows filesystem are available. |
| fileexplorer | WinGuard and, if enabled in settings, Windows filesystem are available. |
Property kind “uri” ≥ext.common 0.2.2
| Param | Type | Description |
|---|---|---|
| uri_severity | string | The validation severity for invalid URI. Default is “Warning”. The severities are defined here. |
| uri_allowedtypes | string | A comma separated string with allowed types (DNS, IPv4, IPv6). Default are all types. |
| uri_strictvalidation | bool | When strict validation is enabled, DNS hostnames are checked for RFC compliance. For IPv4 addresses, only fully specified addresses in the format x.x.x.x with decimal numbers and no leading zeros are allowed (e.g., 192.168.1 or 192.168.0.02 are not permitted). Default is true. |
Property kind “regexvalidation”
| Param | Type | Description |
|---|---|---|
| regexvalidation_regex | string | A regular expression used for validation. |
| regexvalidation_hint | string | Hint for a correct input |
Property kind “timespan” ≥ext.common 0.1.0
| Param | Type | Description |
|---|---|---|
| timespan_format | string | The time format which should be shown. Possible values are “dd:hh:mm:ss” and all combinations of these four time units. |
| timespan_min | string | The minimum value of the time span. It must have the format specified in the timespan_format parameter. |
| timespan_max | string | The maximum value of the time span. It must have the format specified in the timespan_format parameter. |
Property kind “keyvalue”
| Param | Type | Description |
|---|---|---|
| keyvalue_keylabel | string | Displayed label text the key field |
| keyvalue_valuelabel | string | Displayed label text for the value field |
Property kind “radio button” ≥ext.common 0.2.3
| Param | Type | Description |
|---|---|---|
| radiobutton_truename | string | Contains the localization key used to display the text for the “true” state of the radio button. |
| radiobutton_falsename | string | Contains the localization key used to display the text for the “false” state of the radio button. |
Validation severities
| Name | Description |
|---|---|
| Critical | Input is invalid and save is not allowed. |
| Warning | Input might be invalid and should be checked, but save is allowed. |
| Info | Input requires further information for the editor. |
Variables
In Module XML and App XML it is partially possible to reference variables.
This can be, for example, to define that an Operation is only available depending on a certain State:
<Object id="Barrier">
<State id="Opened" type="bool" />
<Operation id="OpenBarrier" available="state.Opened == false" />
</Object>Or for example to write contents of an Event into the text of the message to be created:
<!-- Objektdefinition -->
<Object id="Door">
<Property id="Number" type="int" />
<Event id="UnauthorizedAccess" notify="1">
<Property id="Name" type="string" />
<Property id="Number" type="int" />
</Event>
</Object>
<!-- Mapping des Objekts -->
<Mapping>
<Event id="UnauthorizedAccess" appevent="Alarm" appevent_text="${Name} tried to access door ${obj.Number}" />
</Mapping>In both examples the respective variable (“state.Opened”, “${Name}”, “${obj.Number}”) is replaced by the actual value that is valid at the time of the selection. In this resolution, the particular context plays a crucial role. For example, in the second example it is different whether “${Number}” is called in the context of the “Door” object or in the context of the “UnauthorizedAccess” Event. In the first case the property of the object is meant, in the second case the property of the Event with the same name.
There are four such contexts in total. The following table illustrates the possible variables/placeholders for the respective contexts.
ℹ️ Note that the term “event” in this context always stands for the object event, not a resulting App Event. App Event properties such as CallSourceNum are not accessible in this way.
| Context | Variables | Value |
|---|---|---|
| State (e.g., State Mapping) |
“value” | The value of the triggering State |
| Identifier with State prefix (e.g., “state.Number”) | The value of a specific State with the indicated Id | |
| Identifier with Event prefix (e.g., “event.FireAlarm”) | True, if the object currently has a pending Event of the indicated type. Otherwise false. | |
| Identifier with object prefix (e.g., “obj.Number”) | The value of a specific Object Property with the indicated Id | |
| Event (e.g., Event Mapping, Event Operation) |
Identifier without prefix (e.g., “Number”) | The value of a specific Event Property with the indicated Id |
| Identifier with State prefix (e.g., “state.Number”) | The value of a specific State with the indicated Id | |
| Identifier with Event prefix (e.g., “event.FireAlarm”) | True, if the object currently has a pending Event of the indicated type. Otherwise false. | |
| Identifier with object prefix (e.g., “obj.Number”) | The value of a specific Object Property with the indicated Id | |
| ObjectRole (e.g., ObjectRole Mapping) |
Identifier without prefix (e.g., “Number”) | The value of a specific ObjectRole Property with the indicated Id |
| Identifier with Activity prefix (e.g., “activity.CallType”) | The value of a specific Activity Property with the indicated Id | |
| Identifier with State prefix (e.g., “state.Number”) | The value of a specific State with the indicated Id | |
| Object (e.g., Object Operation) |
Identifier without prefix (e.g., “Number”) | The value of a specific Object Property with the indicated Id |
| Identifier with State prefix (e.g., “state.Number”) | The value of a specific State with the indicated Id | |
| Identifier with Event prefix (e.g., “event.FireAlarm”) | True, if the object currently has a pending Event of the indicated type. Otherwise false. |
The only difference in the notation of the variable is whether it is a condition or text.
In Expressions (e.g., conditions) the variables can be used exactly as described in the table.
In texts (e.g., “appevent_text” attributes for mappings or “text” attribute for AppLog entries) they need to be embedded in curly braces preceded by a dollar sign: ${value}