Skip to main content

Class: SystemAlertManager

Defined in: src/sdk/alerts/SystemAlertManager.ts:23

A CAS alert manager.

Constructors

Constructor

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

Defined in: src/sdk/alerts/SystemAlertManager.ts:43

Create a SystemAlertManager instance.

Parameters

ParameterTypeDefault 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

Methods

addOrUpdateAnnunciation()

protected addOrUpdateAnnunciation(idx): number

Defined in: src/sdk/alerts/SystemAlertManager.ts:196

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

Parameters

ParameterTypeDescription
idxnumberThe index of the annunciations array for the annunciation.

Returns

number

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


checkForActiveType()

protected checkForActiveType(type): boolean

Defined in: src/sdk/alerts/SystemAlertManager.ts:182

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

Parameters

ParameterTypeDescription
typeAnnunciationTypeThe annunciation type to check for.

Returns

boolean

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


handleAcknowledgement()

protected handleAcknowledgement(type): void

Defined in: src/sdk/alerts/SystemAlertManager.ts:158

Handle a master warning or caution acknowledgement.

Parameters

ParameterTypeDescription
typeAnnunciationTypeThe type of alert to acknowledge.

Returns

void


handleAnnunciationActive()

protected handleAnnunciationActive(idx): void

Defined in: src/sdk/alerts/SystemAlertManager.ts:124

Handle an annunciation going active.

Parameters

ParameterTypeDescription
idxnumberThe index of the annunciations array for the annunciation.

Returns

void


handleAnnunciationInactive()

protected handleAnnunciationInactive(idx): void

Defined in: src/sdk/alerts/SystemAlertManager.ts:142

Handle an annunciation going inactive.

Parameters

ParameterTypeDescription
idxnumberThe index of the annunciations array for the annunciation.

Returns

void


removeAnnunciation()

protected removeAnnunciation(idx): boolean

Defined in: src/sdk/alerts/SystemAlertManager.ts:220

Remove an annunciation from the active list if present.

Parameters

ParameterTypeDescription
idxnumberThe index of the annunciations array for the annunciation.

Returns

boolean

True if the annunciation was removed, false otherwise.