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
Parameter | Type | Description |
---|---|---|
id | ID | The ID for which to get the suffix. |
Returns
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
Parameter | 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.
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
Parameter | 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.