Class: SystemAlertManager
A CAS alert manager.
Constructors
constructor
• new SystemAlertManager(bus
, annunciations
, logicHost
, warningSoundId?
, cautionSoundId?
): SystemAlertManager
Create a SystemAlertManager instance.
Parameters
Name | Type | Default value | Description |
---|---|---|---|
bus | EventBus | undefined | The event bus |
annunciations | Annunciation [] | undefined | An array of the system annunciations to monitor |
logicHost | CompositeLogicXMLHost | undefined | An actively updated composite logic host. |
warningSoundId | string | 'tone_warning' | The identifier of the warning sound, if other than default |
cautionSoundId | string | 'tone_caution' | The identifier of the caution sound, if other than default |
Returns
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
Name | Type | Description |
---|---|---|
idx | number | The 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
Name | Type | Description |
---|---|---|
type | AnnunciationType | The 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
Name | Type | Description |
---|---|---|
type | AnnunciationType | The 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
Name | Type | Description |
---|---|---|
idx | number | The 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
Name | Type | Description |
---|---|---|
idx | number | The 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
Name | Type | Description |
---|---|---|
idx | number | The 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