Skip to main content

Class: SystemAlertManager

A CAS alert manager.

Constructors

constructor

new SystemAlertManager(bus, annunciations, logicHost, warningSoundId?, cautionSoundId?): SystemAlertManager

Create a SystemAlertManager instance.

Parameters

NameTypeDefault valueDescription
busEventBusundefinedThe event bus
annunciationsAnnunciation[]undefinedAn array of the system annunciations to monitor
logicHostCompositeLogicXMLHostundefinedAn actively updated composite logic host.
warningSoundIdstring'tone_warning'The identifier of the warning sound, if other than default
cautionSoundIdstring'tone_caution'The identifier of the caution sound, if other than default

Returns

SystemAlertManager

Defined in

src/sdk/alerts/SystemAlertManager.ts:43

Methods

addOrUpdateAnnunciation

addOrUpdateAnnunciation(idx): number

Add an annunciation to the active list if it's new, or update it if already there.

Parameters

NameTypeDescription
idxnumberThe index of the annunciations array for the annunciation.

Returns

number

The index of the added or updated annunciation in the active list.

Defined in

src/sdk/alerts/SystemAlertManager.ts:196


checkForActiveType

checkForActiveType(type): boolean

See if there is still an active, unacked annunciation of the given type.

Parameters

NameTypeDescription
typeAnnunciationTypeThe annunciation type to check for.

Returns

boolean

True if there is an active, unacked annunciation of the given type, false otherwise.

Defined in

src/sdk/alerts/SystemAlertManager.ts:182


handleAcknowledgement

handleAcknowledgement(type): void

Handle a master warning or caution acknowledgement.

Parameters

NameTypeDescription
typeAnnunciationTypeThe type of alert to acknowledge.

Returns

void

Defined in

src/sdk/alerts/SystemAlertManager.ts:158


handleAnnunciationActive

handleAnnunciationActive(idx): void

Handle an annunciation going active.

Parameters

NameTypeDescription
idxnumberThe index of the annunciations array for the annunciation.

Returns

void

Defined in

src/sdk/alerts/SystemAlertManager.ts:124


handleAnnunciationInactive

handleAnnunciationInactive(idx): void

Handle an annunciation going inactive.

Parameters

NameTypeDescription
idxnumberThe index of the annunciations array for the annunciation.

Returns

void

Defined in

src/sdk/alerts/SystemAlertManager.ts:142


removeAnnunciation

removeAnnunciation(idx): boolean

Remove an annunciation from the active list if present.

Parameters

NameTypeDescription
idxnumberThe index of the annunciations array for the annunciation.

Returns

boolean

True if the annunciation was removed, false otherwise.

Defined in

src/sdk/alerts/SystemAlertManager.ts:220