Skip to main content

Class: CasAlertTransporter

Defined in: src/sdk/cas/CasAlertTransporter.ts:48

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

Methods

bind()

bind<T>(toWatch, predicate): this

Defined in: src/sdk/cas/CasAlertTransporter.ts:97

Binds an alert state to a subscribable value.

Type Parameters

Type Parameter
T

Parameters

ParameterTypeDescription
toWatchSubscribable<T>The subscribable value to watch.
predicate(value) => 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.


bindStateUpdate()

bindStateUpdate<T>(predicate, state): this

Defined in: src/sdk/cas/CasAlertTransporter.ts:138

Binds the alert state to an update loop.

Type Parameters

Type Parameter
T

Parameters

ParameterTypeDescription
predicate(deltaTime, state) => 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.


bindUpdate()

bindUpdate(predicate): this

Defined in: src/sdk/cas/CasAlertTransporter.ts:112

Binds the alert state to an update loop.

Parameters

ParameterTypeDescription
predicate(deltaTime) => 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.


destroy()

destroy(): void

Defined in: src/sdk/cas/CasAlertTransporter.ts:219

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


pause()

pause(): this

Defined in: src/sdk/cas/CasAlertTransporter.ts:188

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.


resume()

resume(): this

Defined in: src/sdk/cas/CasAlertTransporter.ts:165

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.


set()

set(active): void

Defined in: src/sdk/cas/CasAlertTransporter.ts:74

Sets whether or not the alert is active.

Parameters

ParameterTypeDescription
activebooleanWhether or not the alert is active.

Returns

void

Throws

Error if this transporter has been destroyed.


create()

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

Defined in: src/sdk/cas/CasAlertTransporter.ts:234

Creates an instance of an AlertTransporter.

Parameters

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

Returns

CasAlertTransporter

The created AlertTransporter.