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
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:138
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:112
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: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
Parameter | Type | Description |
---|---|---|
active | boolean | Whether 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
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
The created AlertTransporter.