Alarms and status

Annunciator <smart-annunciator>

Annunciator displays a wall of tiles, one per monitored condition, following the ISA-18.1 alarm sequence: normal, alarm (unacknowledged, blinking fast), acknowledged (steady) and ringback (cleared but not reset, blinking slowly).

<smart-annunciator> · 3 properties, 3 methods, 3 events · source/modules/smart.annunciator.js

Usage in Blazor

The Razor component is <Annunciator> in Smart.Blazor.Industrial: every property is a parameter in PascalCase, every event an EventCallback<Event> named On<Event> whose ev["Detail"] is the typed detail class, and the methods are called on the @ref. String choices are enums. In a Blazor Web App (.NET 8 and later) the page needs an interactive render mode, for example @rendermode InteractiveServer; a statically rendered component stays empty.

@using Smart.Blazor.Industrial
@* .NET 8 and later: an interactive render mode, on the page or for the whole app *@
@rendermode InteractiveServer

<Annunciator @ref="annunciator" Columns="42"
    OnAcknowledge="OnAcknowledge" />

@code {
    Annunciator annunciator;

    void OnAcknowledge(Event ev)
    {
        AnnunciatorAcknowledgeEventDetail detail = ev["Detail"];
    }

    // void AcknowledgeAll()
    void Call() => annunciator.AcknowledgeAll();
}

Properties

ParameterType, defaultDescription
Columns
columns
int
4
Sets or retrieves how many tiles are laid out per row.
TileHeight
tileHeight
int
64
Sets or retrieves the minimum height of a tile in pixels.
Tiles
tiles
IEnumerable<object>Sets or retrieves the monitored conditions. Each entry is an object with: id - the identifier of the tile, returned in the events; label - the tile legend; detail - an optional second line, typically the tag; state - one of normal, alarm, ack or ringback, in any case. A tile without a state is normal; any other word is shown as an unknown state (dashed and hatched, read out as 'Unknown state') rather than as a normal tile, cannot be acknowledged, and makes the panel's state attribute 'unknown' unless a tile is in alarm. Assign a new array to update the component, or call redraw after modifying the array in place; an array that is deep-equal to the current one does not trigger a redraw. The keyboard stays on the same tile across an update.

Methods

MethodDescription
void AcknowledgeAll()Raises the acknowledge event once for every tile in the alarm state. Nothing is raised while the panel is disabled. The component does not change the tiles.
Task<object> StateCounts()Returns how many tiles are in each state, as { normal, alarm, ack, ringback, unknown }. A state word the panel does not know is counted as unknown.
Task<string> StateOf(object tile)Returns the state of a tile as the panel reads it: normal, alarm, ack or ringback in any case, normal when the tile has no state, and unknown for any other word.
tile object A tile record.

Events

Every event is an EventCallback<Event>; Event is a dictionary and ev["Detail"] converts to the detail class named under the event.

EventDescription and detail
OnAcknowledge
acknowledge
AnnunciatorAcknowledgeEventDetail
This event is triggered when an operator presses a tile that is in the alarm state, or through acknowledgeAll. One press raises one event: the repeats of a held Enter or Space are ignored, and the same tile pressed again within 600 ms (a double click) is not acknowledged twice.
Tile dynamic The tile being acknowledged.
OnReset
reset
AnnunciatorResetEventDetail
This event is triggered when an operator presses a tile that is in the ringback state, the condition has cleared and the operator is resetting it. As with acknowledge, one press raises one event.
Tile dynamic The tile being reset.
OnTileClick
tileClick
AnnunciatorTileClickEventDetail
This event is triggered when a tile is pressed, in any state. It follows the acknowledge or reset event when one of those applies.
Tile dynamic The tile that was pressed.

CSS variables

The component declares 5 CSS variables; the CSS page shows how to set them.

--smart-annunciator-columns --smart-annunciator-tile-height --smart-annunciator-gap --smart-annunciator-alarm-blink --smart-annunciator-ringback-blink