Skip to main content

Class: FlightTimerUtils

A utility class for working with flight timers.

Constructors

constructor

new FlightTimerUtils(): FlightTimerUtils

Returns

FlightTimerUtils

Methods

getIdSuffix

getIdSuffix<ID>(id): FlightTimerEventSuffix<ID>

Gets the event bus topic suffix for a flight timer ID.

Type parameters

NameType
IDextends string

Parameters

NameTypeDescription
idIDThe ID for which to get the suffix.

Returns

FlightTimerEventSuffix<ID>

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

NameType
IDextends string
Kextends keyof BaseFlightTimerEvents

Parameters

NameTypeDescription
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.

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

NameType
IDextends string
Kextends keyof BaseFlightTimerEvents

Parameters

NameTypeDescription
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.

Defined in

src/sdk/instruments/FlightTimer.ts:137