Skip to main content

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

ParameterTypeDescription
idIDThe ID for which to get the suffix.

Returns

FlightTimerEventSuffix<ID>

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
ParameterTypeDescription
idIDThe ID of the timer.
indexnumberThe index of the timer.
busEventBusThe event bus to which to subscribe.
baseTopicKThe 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
ParameterTypeDescription
idIDThe ID of the timer.
indexnumberThe index of the timer.
subscriberEventSubscriber<FlightTimerEventsForId<ID>>The event subscriber to use to subscribe.
baseTopicKThe base name of the topic to which to subscribe.
Returns

Consumer<BaseFlightTimerEvents[K]>

A consumer for the specified event bus topic.