Class: FlightTimerUtils
A utility class for working with flight timers.
Constructors
constructor
• new FlightTimerUtils(): FlightTimerUtils
Returns
Methods
getIdSuffix
▸ getIdSuffix<ID
>(id
): FlightTimerEventSuffix
<ID
>
Gets the event bus topic suffix for a flight timer ID.
Type parameters
Name | Type |
---|---|
ID | extends string |
Parameters
Name | Type | Description |
---|---|---|
id | ID | The ID for which to get the suffix. |
Returns
The event bus topic suffix for the specified flight timer ID.
Defined in
src/sdk/instruments/FlightTimer.ts:111
onEvent
▸ onEvent<ID
, K
>(id
, index
, bus
, baseTopic
): Consumer
<BaseFlightTimerEvents
[K
]>
Subscribes to one of the event bus topics related to a flight timer with a given ID.
Type parameters
Name | Type |
---|---|
ID | extends string |
K | extends keyof BaseFlightTimerEvents |
Parameters
Name | 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.
Defined in
src/sdk/instruments/FlightTimer.ts:123
▸ onEvent<ID
, K
>(id
, index
, subscriber
, baseTopic
): Consumer
<BaseFlightTimerEvents
[K
]>
Subscribes to one of the event bus topics related to a flight timer with a given ID.
Type parameters
Name | Type |
---|---|
ID | extends string |
K | extends keyof BaseFlightTimerEvents |
Parameters
Name | 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.
Defined in
src/sdk/instruments/FlightTimer.ts:137