Skip to main content

Class: TerrainSystemUtils

A utility class for working with Garmin terrain alerting systems.

Constructors

constructor

new TerrainSystemUtils(): TerrainSystemUtils

Returns

TerrainSystemUtils

Methods

getIdSuffix

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

Gets the event bus topic suffix for a terrain system ID.

Type parameters

NameType
IDextends string

Parameters

NameTypeDescription
idIDThe ID for which to get the suffix.

Returns

TerrainSystemEventSuffix<ID>

The event bus topic suffix for the specified terrain system ID.

Defined in

src/garminsdk/terrain/TerrainSystemUtils.ts:14


onEvent

onEvent<ID, K>(id, bus, baseTopic): Consumer<BaseTerrainSystemEvents[K]>

Subscribes to one of the event bus topics related to a terrain system with a given ID.

Type parameters

NameType
IDextends string
Kextends keyof BaseTerrainSystemEvents

Parameters

NameTypeDescription
idIDThe ID of the terrain system.
busEventBusThe event bus to which to subscribe.
baseTopicKThe base name of the topic to which to subscribe.

Returns

Consumer<BaseTerrainSystemEvents[K]>

A consumer for the specified event bus topic.

Defined in

src/garminsdk/terrain/TerrainSystemUtils.ts:25

onEvent<ID, K>(id, subscriber, baseTopic): Consumer<BaseTerrainSystemEvents[K]>

Subscribes to one of the event bus topics related to a terrain system with a given ID.

Type parameters

NameType
IDextends string
Kextends keyof BaseTerrainSystemEvents

Parameters

NameTypeDescription
idIDThe ID of the terrain system.
subscriberEventSubscriber<TerrainSystemEventsForId<ID>>The event subscriber to use to subscribe.
baseTopicKThe base name of the topic to which to subscribe.

Returns

Consumer<BaseTerrainSystemEvents[K]>

A consumer for the specified event bus topic.

Defined in

src/garminsdk/terrain/TerrainSystemUtils.ts:37