Skip to main content

Type Alias: SimVarPublisherEntry<T>

SimVarPublisherEntry<T> = SimVarDefinition & object

Defined in: src/sdk/instruments/BasePublishers.ts:98

An entry for a sim var publisher topic.

Type declaration

defaultIndex?

optional defaultIndex: number | null

The default simvar index to publish to the unsuffixed topic, or null if the unsuffixed topic should not be published. Ignored if the simvar is not indexed. Defaults to 1.

indexed?

optional indexed: boolean | Iterable<number>

Whether the simvar is indexed. Indexes are non-negative integers. To declare an indexed simvar, this value must be either (1) an iterable of valid indexes, or (2) true (in which case all non-negative indexes are considered valid). If the simvar is indexed, then the indexed simvars - with the index replacing the #index# macro in the simvar name - will published to topics suffixed with _[index]. If defaultIndex is not null, then that simvar index will also be published to the unsuffixed topic. Defaults to false.

map()?

optional map: (value) => T

A function which maps the raw simvar value to the value to be published to the event bus. If not defined, the raw simvar value will be published to the bus as-is.

Parameters

ParameterType
valueany

Returns

T

Type Parameters

Type Parameter
T