3.15.1.2 XML Element Description
The following paragraphs describe each element which may occur in the configuration file with its possible children and attributes.
- <masterclient> --- The <masterclient> element is the root element of the XML tree. It contains all elements which make up the the master client's configuration. Elements outside the <masterclient> element are ignored.
- <global> --- The <masterclient> element may contain zero or more <global> elements. These elements define global settings of the master client program. They don't have child elements but they each have two attributes which both are mandatory: key and value .The following keys are defined:
- fontSize --- The size (pixels) of the font used for the button labels.
- fontSizeParam --- The size (pixels) of the font used for parameters in M&C buttons.
- title --- The text to shown in the window title bar
- okColor --- The color of a button standing for a M&C or group which is in state OK .
- faultColor --- The color of a button standing for a M&C or group which is in state FAULT .
- warningColor --- The color of a button standing for a M&C or group which is in state WARNING .
- linkColor --- The color of a button which simply changes to another screen without showing a fault state
- unreachableColor --- The color of a button standing for a M&C or group which is in state UNREACHABLE .
- disabledColor --- The color of a button standing for a M&C or group which is actually disabled.
- autoTextColor --- One of true or false . With true the button text is drawn black bright background colors, white for dark background colors for better contrast. With false the text is always drawn black.
- showSymbols --- One of true or false . If set true , the state of a M&C or group button is not only symbolized by its color but also by an exclamation mark for FAULT/WARNING or a question mark for UNREACHABLE . These symbols are drawn large in a faded color as part of the button background.
- priorityScheme --- One of FAULT or UNREACHABLE . Defines the priority of states a group uses to combine the states of its children. When set to FAULT , the priority is FAULT (highest) - WARNING - UNREACHABLE - OK (lowest).When set to UNREACHABLE the priority is UNREACHABLE (highest) - FAULT - WARNING - OK (lowest).A group always shows the highest priorized state one of its children shows.
Examples and default values for all keys:
<global key="fontSize" value="14" />
<global key="title" value="sat-nms Master Client 2" />
<global key="okColor" value="#00FF00" />
<global key="faultColor" value="#FF0000" />
<global key="warningColor" value="#FFFF00" />
<global key="linkColor" value="#8080FF" />
<global key="unreachableColor" value="#808080" />
<global key="disabledColor" value="#808080" />
<global key="autoTextColor" value="true" />
<global key="showSymbols" value="true" />
<global key="priorityScheme" value="FAULT" />
- <peerlist> --- The <peerlist> element contains the definition of all peers, each connecting to one M&C system and watching its state.
- <peer> --- The <peer> element defines one peer connecting to a M&C system and watching its state. The <peer> element may contain zero or more <parameter> elements which define parameters to watch additionally to the M&C summary fault state.Each <peer> element has a number of attributes which identify the element and define how to connect to the M&C system:
- id --- A unique name identifying this peer. Groups and screen buttons use this identifier to refer to this peer / M&C. This attribute is mandatory.
- ip --- The IP address of the M&C in dotted quad notation. This attribute is mandatory.
- mode --- One of enabled or disabled This defines the the initial mode of this peer after program start. Enables peers operate normally and reflect their fault state as reported by the M&C. Disabled peers show a state disabled regardless of the fault state of the M&C. The mode attribute is optional, the program assumes enabled if the attribute is missing.
- clientpars --- Optional parameters added to the command line which launches the client program when the operator clicks to a button referring to this M&C. Typical contents for the clientpars attribute are user/password settings.
Examples:
<peer id="MNC1" ip="192.168.0.100" clientpars="-u satnms -p satnms -s default -q" />
<peer id="MNC2" ip="192.168.0.101" clientpars="-u satnms -p satnms -s default -q">
<parameter id="EIRP-2.on" label="TX" />
</peer>
- <parameter> --- The <parameter> element defines one parameter the peer shall watch at its M&C additionally to the summary fault. A <peer> element may contain an arbitrary number of <parameter> elements as children.A screen button referring to the peer shows the actual values of the defined parameters, starting with the first parameter near the bottom of the button rectangle, the second one above this and so on.Parameters are shown with a fixed font size, depending on the button size they may be covered by the button label or completely ourside the button area, invisible for this reason.A <parameter> element contains these two attributes:
- id --- The message ID of the parameter to watch.
- label --- A label drawn on the screen button left of the parameter value
Example:
<parameter id="SYSTEM.time" label="Time" />
- <grouplist> --- The <grouplist> element contains the definition of all groups.
- <group> --- The <group> element defines one group within the <grouplist> . The group is named by a identifier, the group members are defined by <member> child elements within the <group> . The <group> element knows one (mandatory) attribute:
- id --- A unique name identifying this group. Other groups and screen buttons use this identifier to refer to this group. Identifiers must be unique across <peers> and <groups> because both may appear as group members and state sources for screen buttons in the same way.
Example
<group id="GRP1">
<member id="MNC1" />
<member id="MNC2" />
</group>
- <member> --- The <member> element defines one group member within a <group> definition. The <member> element has one mandatory attribute selecting the <peer> or <group> as the group member:
- id --- The existing name / identifier of the peer or group which shall be a member of this group.
Example:
When defining group members, care should be taken not to create circular references between groups: if e.g. a group defines itself als member or group A has group B as member and at the same time group B defines group A as member, this creates a race condition in the software, the master client won't work.
- <screenlist> --- The <screenlist> element contains the definition of all screens. The <screenlist> element may contain one attribute:
- default --- The ID of the screen which shall be loaded when the program
Example:
<screenlist default="HOME"> ... </screenlist>
- <screen> --- The <screen> element defines one screen of the MasterClient program. The MasterClient always shows one grid of N x M buttons. A screen is one set of such buttons shown at a time. Buttons referring to groups or simple link buttons may be clicked to switch to another screen, another set of buttons.A screen is defines as a sequence of <row> elements each containing a sequence or <button> elements. Buttons appear from left to right in a row, rows appear from top to bottom in the screen. The program scans the screen definitions at startup and evaluates the maximum number of rows and columns defined. The MasterClient always shows a grid of this size, filling it up with empty buttons if a particular screen or row is smaller than the evaluated size.The <screen> element contain one mandatory attribute:
- id --- A unique name identifying this screen. The default attribute of the <screenlist> element and the <target> attribute of the <button> element refer to this identifiers to select this screen.
Example:
<screen id="HOME"> ... </screen>
- <row> --- The <row> element defines one row of buttons in the screen. It has no attributes, contains zero or more <button> elements.
- <button> --- The <button> element defines one button within the row / screen. It contains up to three attributes:
Depending on the presence of attributes a button behaves differently
- A button without any attributes behaves as a dummy button or spacer
- A button containing a target attribute but no src attribute behaves as a link button, it simply switches to the target screen when clicked
- A button containing a src attribute referring to a <peer> element is a M&C button. It shows the fault state of the M&C and launches the client program for this M&C when clicked. It should not contain a target attribute.
- A button containing a src attribute referring to a <group> element is a group button. It shows the fault state combined by this group It must contain a target attribute which denotes the screen to be shown when the button is clicked.