Class: FlightTimerUtils
Defined in: src/sdk/instruments/FlightTimer.ts:105
A utility class for working with flight timers.
Constructors
Constructor
new FlightTimerUtils():
FlightTimerUtils
Returns
FlightTimerUtils
Methods
getIdSuffix()
static
getIdSuffix<ID
>(id
):FlightTimerEventSuffix
<ID
>
Defined in: src/sdk/instruments/FlightTimer.ts:111
Gets the event bus topic suffix for a flight timer ID.
Type Parameters
Type Parameter |
---|
ID extends string |
Parameters
Parameter | Type | Description |
---|---|---|
id | ID | The ID for which to get the suffix. |
Returns
The event bus topic suffix for the specified flight timer ID.
onEvent()
Call Signature
static
onEvent<ID
,K
>(id
,index
,bus
,baseTopic
):Consumer
<BaseFlightTimerEvents
[K
]>
Defined in: src/sdk/instruments/FlightTimer.ts:123
Subscribes to one of the event bus topics related to a flight timer with a given ID.
Type Parameters
Type Parameter |
---|
ID extends string |
K extends keyof BaseFlightTimerEvents |
Parameters
Parameter | Type | Description |
---|---|---|
id | ID | The ID of the timer. |
index | number | The index of the timer. |
bus | EventBus | The event bus to which to subscribe. |
baseTopic | K | The base name of the topic to which to subscribe. |
Returns
Consumer
<BaseFlightTimerEvents
[K
]>
A consumer for the specified event bus topic.
Call Signature
static
onEvent<ID
,K
>(id
,index
,subscriber
,baseTopic
):Consumer
<BaseFlightTimerEvents
[K
]>
Defined in: src/sdk/instruments/FlightTimer.ts:137
Subscribes to one of the event bus topics related to a flight timer with a given ID.
Type Parameters
Type Parameter |
---|
ID extends string |
K extends keyof BaseFlightTimerEvents |
Parameters
Parameter | Type | Description |
---|---|---|
id | ID | The ID of the timer. |
index | number | The index of the timer. |
subscriber | EventSubscriber <FlightTimerEventsForId <ID >> | The event subscriber to use to subscribe. |
baseTopic | K | The base name of the topic to which to subscribe. |
Returns
Consumer
<BaseFlightTimerEvents
[K
]>
A consumer for the specified event bus topic.