Skip to content

Alarm sensitivity

Will Rogers edited this page Oct 12, 2020 · 8 revisions

If a widget has an associated PV, you may want to configure it to be alarm-sensitive - that is, change its appearance depending on the PV's alarm status.

Proposal

  • define CSS variables for the required colours
  • if a widget is disconnected, replace its border with 2px dotted
  • have one alarmSensitive property and allow the creator to define what happens
    • give string values to the AlarmQuality enum
    • use classes with these names in the .module.css file to define the appearance
    • if alarmSensitive is true, add the alarm quality as a class in the widget code
  • parse BOY properties handling alarm-sensitivity as additional rules

BOY

Colors for minor alarm, major alarm, **invalid **and **disconnected **are configured in colors.def.

Widgets with PVs typically have the following boolean properties, triggered if the alarm state is not 'valid':

  • border alarm sensitive: if alarm not valid, replace the configured border with a 2px solid border of the alarm colour
  • foreground colour alarm sensitive: replace the configured foreground colour with the alarm colour
  • background colour alarm sensitive: replace the configured background colour with the alarm colour

If none of these properties are set to true, alarm state will not affect the widget's appearance.

If the PV is disconnected, all components will display this in a different way (a block of the disconnected colour at the top of the widget); this is not configurable.

Clone this wiki locally