Class: CasAlertTransporter
Defined in: src/sdk/cas/CasAlertTransporter.ts:65
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:160
Binds an alert state to a subscribable value.
Type Parameters
Type Parameter |
---|
T |
Parameters
Parameter | Type | Description |
---|---|---|
toWatch | Subscribable <T > | The subscribable value to watch. |
predicate | (value ) => boolean | The 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:201
Binds the alert state to an update loop.
Type Parameters
Type Parameter |
---|
T |
Parameters
Parameter | Type | Description |
---|---|---|
predicate | (deltaTime , state ) => boolean | The predicate that transforms the value into a boolean alert activity state. |
state | T | The 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:175
Binds the alert state to an update loop.
Parameters
Parameter | Type | Description |
---|---|---|
predicate | (deltaTime ) => boolean | The 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:282
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:251
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:228
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:127
Sets whether or not the alert is active.
Parameters
Parameter | Type | Description |
---|---|---|
active | boolean | Whether or not the alert is active. |
Returns
void
Throws
Error if this transporter has been destroyed.
create()
Call Signature
static
create(bus
,options
):CasAlertTransporter
Defined in: src/sdk/cas/CasAlertTransporter.ts:102
Creates an instance of CasAlertTransporter.
Parameters
Parameter | Type | Description |
---|---|---|
bus | EventBus | The event bus to use with this instance. |
options | Readonly <CasAlertTransporterOptions > | Configuration options for the transporter. |
Returns
CasAlertTransporter
A new CasAlertTransporter.
Call Signature
static
create(bus
,uuid
,priority
,suffix?
):CasAlertTransporter
Defined in: src/sdk/cas/CasAlertTransporter.ts:112
Creates an instance of CasAlertTransporter.
Parameters
Parameter | Type | Description |
---|---|---|
bus | EventBus | The event bus to use with this instance. |
uuid | string | The alert UUID. |
priority | AnnunciationType | The alert priority. |
suffix? | string | The alert suffix. |
Returns
CasAlertTransporter
A new CasAlertTransporter.
Deprecated
Please use the overload that takes an options object instead.