Class: TerrainSystemUtils
A utility class for working with Garmin terrain alerting systems.
Constructors
constructor
• new TerrainSystemUtils(): TerrainSystemUtils
Returns
Methods
getIdSuffix
▸ getIdSuffix<ID
>(id
): TerrainSystemEventSuffix
<ID
>
Gets the event bus topic suffix for a terrain system 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 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
Name | Type |
---|---|
ID | extends string |
K | extends keyof BaseTerrainSystemEvents |
Parameters
Name | Type | Description |
---|---|---|
id | ID | The ID of the terrain system. |
bus | EventBus | The event bus to which to subscribe. |
baseTopic | K | The 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
Name | Type |
---|---|
ID | extends string |
K | extends keyof BaseTerrainSystemEvents |
Parameters
Name | Type | Description |
---|---|---|
id | ID | The ID of the terrain system. |
subscriber | EventSubscriber <TerrainSystemEventsForId <ID >> | The event subscriber to use to subscribe. |
baseTopic | K | The 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