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
Name | Type | Description |
---|---|---|
toWatch | Subscribable <T > | The subscribable value to watch. |
predicate | (value : T ) => 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.
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
Name | Type | Description |
---|---|---|
predicate | (deltaTime : number , state : T ) => 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.
Defined in
src/sdk/cas/CasAlertTransporter.ts:138
bindUpdate
▸ bindUpdate(predicate
): this
Binds the alert state to an update loop.
Parameters
Name | Type | Description |
---|---|---|
predicate | (deltaTime : number ) => 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.
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
Name | Type | Description |
---|---|---|
active | boolean | Whether 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
Name | 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
The created AlertTransporter.
Defined in
src/sdk/cas/CasAlertTransporter.ts:234