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
Parameter | 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
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
Parameter | 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.
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
Parameter | 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.
handleAcknowledgement()
protected
handleAcknowledgement(type
):void
Defined in: src/sdk/alerts/SystemAlertManager.ts:158
Handle a master warning or caution acknowledgement.
Parameters
Parameter | Type | Description |
---|---|---|
type | AnnunciationType | The 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
Parameter | Type | Description |
---|---|---|
idx | number | The 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
Parameter | Type | Description |
---|---|---|
idx | number | The 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
Parameter | Type | Description |
---|---|---|
idx | number | The index of the annunciations array for the annunciation. |
Returns
boolean
True if the annunciation was removed, false otherwise.