5.5.44 GaugeElement

The GaugeElement shows a numeric parameter value as a horizontal bar in an entry field like frame. The gauge element is capable to adjust the scale factor for the gauge automatically from the parameter's range definition. Alternatively the scale parameters may set explicitely.

Data Model (extends ScreenElement)

Key Type Value
type String Always "GaugeElement".
xpos Number see ScreenElement
ypos Number see ScreenElement
width Number see ScreenElement
height Number see ScreenElement
id String The message ID this element listens to. This should point to a numeric parameter to make sense.
label String The label shown above the strip chart
font String The font to be used for the label
color String The bar color. If thresholds are defined, this color is used while the value is inside the thresholds.
useMinMax Boolean If true, the min/max values for the gauge are defined in minValue, maxValue_. If false, the GaugeElement takes the limits from the watches parameter's range definition.
minValue double The value corresponding the left edge of the widget
maxValue double The value corresponding the right edge of the widget
useThresholds Boolean If true, the GaugeElement checks the value against the thresholds defined in minThreshold, maxThreshold and changes the color of the bar to belowColor or above_Color accordingly.
minThreshold double Values below this threshold cause the widget to display a fault
maxThreshold double Values above this threshold cause the widget to display a fault
belowColor String The bar color to be used if useThresholds is true and the actual value is below minThreshold
aboveColor String The bar color to be used if useThresholds is true and the actual value is above maxThreshold
tickMode String One of 'NONE', 'TICKS', 'TICKS-LABELS'. 'TICKS' makes the element show ticks below the bar graph to indicate the bar position for the minValue, minThreshold, maxThreshold and maxValue values. The ticks are to be drawn outside the rectangle defining the element bounds. 'TICKS-LABELS' adds labels below the tick marks, showing the numeric values of the four limit parameters. The number of precision digits shown is taken from the subscribed value's range definition.

Restrictions for colors with useThresholds ###

Actually the colors to be used with useThresholds set are not freely definable. This is a restriction of how the sat-nms M&C software stores the screen definition, it uses a fixed set of color combinations when thresholds are enabled. These are the valid combinations:

belowColor color aboveColor sat-nms mode
#ff0000 #00ff00 #ff0000 red - green - red
#ff0000 #ffff00 #00ff00 red - yellow - green
#00ff00 #ffff00 #ff0000 green - yellow - red

Using other color combinations than those from the table above will cause unpredictable results.

Special Behavior With Level-Adjust/Level-Control Devices

Normally the GaugeElement expects a numeric value to display in the bar graph. When used with the 'gauge' or the 'gauge2' parameter of the Level-Adjust/Level-Control devices, the GaugeElement must implement a special behavior:

The gauge/gauge2 parameters contain a comma separated string with a list of numeric and textual values. The GaugeElement must parse this string and update its display from the values parsed. The content of the gauge/gauge2 comma separated list is defined as follows:

Pos. Name Remark
0 val The gauge value (numeric)
1 minLabel The label to be shown for the min value below the graph (textual). Overwrites the label derived from the minValue field described above.
2 min The value corresponding the left edge of the widget (numeric). Overwrites the value defined in the minValue field described above.
3 maxLabel The label to be shown for the max value below the graph (textual). Overwrites the label derived from the maxValue field described above.
4 max The value corresponding the right edge of the widget (numeric). Overwrites the value defined in the maxValue field described above.
5 minTLabel The label to be shown for the minThreshold value below the graph (textual). Overwrites the label derived from the minThreshold field described above.
6 minThreshold The value lower threshold value (numeric). Overwrites the value defined in the minThreshold field described above.
7 maxTLabel The label to be shown for the maxThreshold value below the graph (textual). Overwrites the label derived from the maxThreshold field described above.
8 maxThreshold The upper threshold value (numeric). Overwrites the value defined in the maxThreshold field described above.

In order to maintain compatibility to future level control devices, the GaugeElement should not use the parameter names or the driver type of the device to decide if this special behavior applies. Instead, the GaugeElement should make this decision from the data message it receives:

Contains the message a 9-element comma separated list?

If yes, the element should behave as with useMinMax=true and useThresholds=true, but with the settings contained in this list instead of the ones contained in the GaugeElement data.

Contains the message a 5-element comma separated list?

If yes, the element should behave as with useMinMax=true and useThresholds=false, but with the settings contained in this list instead of the ones contained in the GaugeElement data.

In all other cases the element should try to parse the message value to floating point value and display it with the settings given in the GaugeElement data object.