Skip to main content

Class: CasAlertTransporter

Transports an alert state to the CAS via the event bus.

Methods

bind

bind<T>(toWatch, predicate): this

Binds an alert state to a subscribable value.

Type parameters

Name
T

Parameters

NameTypeDescription
toWatchSubscribable<T>The subscribable value to watch.
predicate(value: T) => booleanThe predicate that transforms the value into a boolean alert activity state.

Returns

this

The modified alert transporter.

Throws

Error if this transporter has been destroyed.

Defined in

src/sdk/cas/CasAlertTransporter.ts:97


bindStateUpdate

bindStateUpdate<T>(predicate, state): this

Binds the alert state to an update loop.

Type parameters

Name
T

Parameters

NameTypeDescription
predicate(deltaTime: number, state: T) => booleanThe predicate that transforms the value into a boolean alert activity state.
stateTThe optional state to pass into the predicate.

Returns

this

The modified alert transporter.

Throws

Error if this transporter has been destroyed.

Defined in

src/sdk/cas/CasAlertTransporter.ts:138


bindUpdate

bindUpdate(predicate): this

Binds the alert state to an update loop.

Parameters

NameTypeDescription
predicate(deltaTime: number) => booleanThe predicate that transforms the value into a boolean alert activity state.

Returns

this

The modified alert transporter.

Throws

Error if this transporter has been destroyed.

Defined in

src/sdk/cas/CasAlertTransporter.ts:112


destroy

destroy(): void

Destroys this transporter. This will destroy any subscribables or update loops used to bind the state of this transporter's alert. Once this transporter has been destroyed, it cannot be used to change the state of its alert, bind the state of its alert, or be paused or resumed.

Returns

void

Defined in

src/sdk/cas/CasAlertTransporter.ts:219


pause

pause(): this

Pauses this transporter. When this transporter is paused, any subscribables or update loops used to bind the state of this transporter's alert are also paused.

Returns

this

This transporter, after it has been paused.

Throws

Error if this transporter has been destroyed.

Defined in

src/sdk/cas/CasAlertTransporter.ts:188


resume

resume(): this

Resumes this transporter. When this transporter is paused, any subscribables or update loops used to bind the state of this transporter's alert are also resumed. On resumption, the values of bound subscribables are evaluated immediately, while the values of bound update loops will be evaluated during the next update cycle.

Returns

this

This transporter, after it has been resumed.

Throws

Error if this transporter has been destroyed.

Defined in

src/sdk/cas/CasAlertTransporter.ts:165


set

set(active): void

Sets whether or not the alert is active.

Parameters

NameTypeDescription
activebooleanWhether or not the alert is active.

Returns

void

Throws

Error if this transporter has been destroyed.

Defined in

src/sdk/cas/CasAlertTransporter.ts:74


create

create(bus, uuid, priority, suffix?): CasAlertTransporter

Creates an instance of an AlertTransporter.

Parameters

NameTypeDescription
busEventBusThe event bus to use with this instance.
uuidstringThe alert UUID.
priorityAnnunciationTypeThe alert priority.
suffix?stringThe alert suffix.

Returns

CasAlertTransporter

The created AlertTransporter.

Defined in

src/sdk/cas/CasAlertTransporter.ts:234