Skip to main content

Class: TerrainSystemUtils

Defined in: src/garminsdk/terrain/TerrainSystemUtils.ts:8

A utility class for working with Garmin terrain alerting systems.

Constructors

Constructor

new TerrainSystemUtils(): TerrainSystemUtils

Returns

TerrainSystemUtils

Methods

getIdSuffix()

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

Defined in: src/garminsdk/terrain/TerrainSystemUtils.ts:14

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

Type Parameters

Type Parameter
ID extends string

Parameters

ParameterTypeDescription
idIDThe ID for which to get the suffix.

Returns

TerrainSystemEventSuffix<ID>

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


onEvent()

Call Signature

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

Defined in: src/garminsdk/terrain/TerrainSystemUtils.ts:25

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

Type Parameters
Type Parameter
ID extends string
K extends keyof BaseTerrainSystemEvents
Parameters
ParameterTypeDescription
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.

Call Signature

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

Defined in: src/garminsdk/terrain/TerrainSystemUtils.ts:37

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

Type Parameters
Type Parameter
ID extends string
K extends keyof BaseTerrainSystemEvents
Parameters
ParameterTypeDescription
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.