Skip to main content

Class: PfdSensorsUserSettingManager

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/Settings/PfdSensorsUserSettings.ts:32

A manager for PFD sensors user settings.

Implements​

Constructors​

Constructor​

new PfdSensorsUserSettingManager(bus, gduDefsConfig, sensorsConfig): PfdSensorsUserSettingManager

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/Settings/PfdSensorsUserSettings.ts:51

Creates a new instance of PfdSensorsUserSettingManager.

Parameters​

ParameterTypeDescription
busEventBusThe event bus.
gduDefsConfigGduDefsConfigA configuration object which defines GDU options.
sensorsConfigSensorsConfigA configuration object which defines sensors options.

Returns​

PfdSensorsUserSettingManager

Properties​

pfdCount​

readonly pfdCount: 1 | 2

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/Settings/PfdSensorsUserSettings.ts:39

The number of PFDs supported by this manager.

Methods​

getAliasedManager()​

getAliasedManager(index): UserSettingManager<PfdSensorsUserSettingTypes>

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/Settings/PfdSensorsUserSettings.ts:109

Gets a manager for aliased IAU user settings for an indexed IAU.

Parameters​

ParameterTypeDescription
indexPfdIndexThe index of the IAU for which to get an aliased setting manager.

Returns​

UserSettingManager<PfdSensorsUserSettingTypes>

A manager for aliased IAU user settings for the specified IAU.

Throws​

RangeError if index is less than 1 or greater than the number of IAUs supported by this manager.


getAllSettings()​

getAllSettings(): UserSetting<UserSettingValue>[]

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/Settings/PfdSensorsUserSettings.ts:94

Gets an array of all settings of this manager.

Returns​

UserSetting<UserSettingValue>[]

an array of all settings of this manager.

Implementation of​

UserSettingManager.getAllSettings


getSetting()​

getSetting<K>(name): UserSettingFromManager<PfdSensorsAllUserSettingTypes, K>

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/Settings/PfdSensorsUserSettings.ts:84

Gets a setting from this manager.

Type Parameters​

Type Parameter
K extends "pfdAdcIndex_1" | "pfdAhrsIndex_1" | "pfdAdcIndex_2" | "pfdAhrsIndex_2"

Parameters​

ParameterTypeDescription
nameKThe name of the setting to get.

Returns​

UserSettingFromManager<PfdSensorsAllUserSettingTypes, K>

The requested setting.

Throws​

Error if no setting with the specified name exists.

Implementation of​

UserSettingManager.getSetting


mapTo()​

mapTo<M>(map): UserSettingManager<M & PfdSensorsAllUserSettingTypes>

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/Settings/PfdSensorsUserSettings.ts:99

Maps a subset of this manager's settings to ones with aliased names, and creates a new setting manager which supports accessing the settings using their aliases.

Type Parameters​

Type Parameter
M extends UserSettingRecord

Parameters​

ParameterTypeDescription
mapUserSettingMap<M, PfdSensorsAllUserSettingTypes>A map defining the aliases of a subset of this manager's settings, with aliased setting names as keys and original setting names as values.

Returns​

UserSettingManager<M & PfdSensorsAllUserSettingTypes>

A new setting manager which supports accessing a subset of this manager's settings using aliased names.

Implementation of​

UserSettingManager.mapTo


tryGetSetting()​

tryGetSetting<K>(name): OptionalUserSettingFromManager<PfdSensorsAllUserSettingTypes, K>

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/Settings/PfdSensorsUserSettings.ts:79

Attempts to get a setting from this manager.

Type Parameters​

Type Parameter
K extends string

Parameters​

ParameterTypeDescription
nameKThe name of the setting to get.

Returns​

OptionalUserSettingFromManager<PfdSensorsAllUserSettingTypes, K>

The requested setting, or undefined if no such setting exists.

Implementation of​

UserSettingManager.tryGetSetting


whenSettingChanged()​

whenSettingChanged<K>(name): UserSettingConsumerFromManager<PfdSensorsAllUserSettingTypes, K>

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/Settings/PfdSensorsUserSettings.ts:89

Gets a consumer which notifies handlers when the value of a setting changes.

Type Parameters​

Type Parameter
K extends "pfdAdcIndex_1" | "pfdAhrsIndex_1" | "pfdAdcIndex_2" | "pfdAhrsIndex_2"

Parameters​

ParameterTypeDescription
nameKThe name of a setting.

Returns​

UserSettingConsumerFromManager<PfdSensorsAllUserSettingTypes, K>

a consumer which notifies handlers when the value of the setting changes.

Throws​

Error if no setting with the specified name exists.

Deprecated​

Please use getSetting(name).sub() instead.

Implementation of​

UserSettingManager.whenSettingChanged