Skip to main content

Class: ToldUserSettings

Utility class for retrieving and working with TOLD (takeoff/landing) performance calculation user settings managers.

Hierarchy

Constructors

constructor

new ToldUserSettings(bus, settingDefs, keepLocal?): ToldUserSettings

Constructor.

Parameters

NameTypeDefault valueDescription
busEventBusundefinedThe bus used by this manager to publish setting change events.
settingDefsreadonly UserSettingDefinition<string | number | boolean>[]undefinedThe setting definitions used to initialize this manager's settings.
keepLocalbooleanfalseIf present and true, values will be kept local to the instrument on which they're set.

Returns

ToldUserSettings

Inherited from

DefaultUserSettingManager<ToldUserSettingTypes>.constructor

Defined in

src/sdk/settings/UserSetting.ts:191

Properties

bus

Protected Readonly bus: EventBus

The bus used by this manager to publish setting change events.

Inherited from

DefaultUserSettingManager.bus

Defined in

src/sdk/settings/UserSetting.ts:192


publisher

Protected Readonly publisher: Publisher<ToldUserSettingTypes>

Inherited from

DefaultUserSettingManager.publisher

Defined in

src/sdk/settings/UserSetting.ts:177


settings

Protected Readonly settings: Map<string, UserSettingManagerEntry<string | number | boolean>>

Inherited from

DefaultUserSettingManager.settings

Defined in

src/sdk/settings/UserSetting.ts:175


subscriber

Protected Readonly subscriber: EventSubscriber<ToldUserSettingTypes>

Inherited from

DefaultUserSettingManager.subscriber

Defined in

src/sdk/settings/UserSetting.ts:178


syncPublisher

Protected Readonly syncPublisher: Publisher<UserSettingManagerSyncEvents>

Inherited from

DefaultUserSettingManager.syncPublisher

Defined in

src/sdk/settings/UserSetting.ts:180


syncSubscriber

Protected Readonly syncSubscriber: EventSubscriber<UserSettingManagerSyncEvents>

Inherited from

DefaultUserSettingManager.syncSubscriber

Defined in

src/sdk/settings/UserSetting.ts:181

Methods

getAllSettings

getAllSettings(): UserSetting<UserSettingValue>[]

Returns

UserSetting<UserSettingValue>[]

Inherit Doc

Inherited from

DefaultUserSettingManager.getAllSettings

Defined in

src/sdk/settings/UserSetting.ts:270


getSetting

getSetting<K>(name): UserSetting<NonNullable<ToldUserSettingTypes[K]>>

Type parameters

NameType
Kextends "toldDatabaseVersion" | "toldEnabled" | "toldOriginIcao" | "toldTakeoffWeight" | "toldTakeoffRunwaySurface" | "toldTakeoffWindDirection" | "toldTakeoffWindSpeed" | "toldTakeoffTemperature" | "toldTakeoffCanUseRat" | "toldTakeoffUseRat" | "toldTakeoffPressure" | "toldTakeoffRunwayLength" | "toldTakeoffRunwayElevation" | "toldTakeoffRunwayHeading" | "toldTakeoffRunwayGradient" | "toldTakeoffPressureAltitude" | "toldTakeoffFlapsIndex" | "toldTakeoffFlapsIndexDefault" | "toldTakeoffAntiIceOn" | "toldTakeoffThrustReversers" | "toldTakeoffFactor" | "toldTakeoffRolling" | "toldTakeoffRollingDefault" | "toldTakeoffCalcResult" | "toldTakeoffVSpeedsAccepted" | "toldDestinationDefaultApplied" | "toldDestinationIcao" | "toldLandingCanUsePredictedWeight" | "toldLandingUsePredictedWeight" | "toldLandingWeight" | "toldLandingRunwaySurface" | "toldLandingWindDirection" | "toldLandingWindSpeed" | "toldLandingTemperature" | "toldLandingPressure" | "toldLandingRunwayLength" | "toldLandingRunwayElevation" | "toldLandingRunwayHeading" | "toldLandingRunwayGradient" | "toldLandingPressureAltitude" | "toldLandingFlapsIndex" | "toldLandingFlapsIndexDefault" | "toldLandingAntiIceOn" | "toldLandingThrustReversers" | "toldLandingFactor" | "toldLandingFactorDefault" | "toldLandingAutothrottleOn" | "toldLandingCalcResult" | "toldLandingVSpeedsAccepted"

Parameters

NameType
nameK

Returns

UserSetting<NonNullable<ToldUserSettingTypes[K]>>

Inherit Doc

Inherited from

DefaultUserSettingManager.getSetting

Defined in

src/sdk/settings/UserSetting.ts:260


mapTo

mapTo<M>(map): MappedUserSettingManager<M, ToldUserSettingTypes>

Type parameters

NameType
Mextends UserSettingRecord

Parameters

NameType
mapUserSettingMap<M, ToldUserSettingTypes>

Returns

MappedUserSettingManager<M, ToldUserSettingTypes>

Inherit Doc

Inherited from

DefaultUserSettingManager.mapTo

Defined in

src/sdk/settings/UserSetting.ts:285


onSettingValueChanged

onSettingValueChanged<K>(entry, value): void

A callback which is called when one of this manager's settings has its value changed locally.

Type parameters

NameType
Kextends keyof ToldUserSettingTypes

Parameters

NameTypeDescription
entryUserSettingManagerEntry<ToldUserSettingTypes[K]>The entry for the setting that was changed.
valueToldUserSettingTypes[K]The new value of the setting.

Returns

void

Inherited from

DefaultUserSettingManager.onSettingValueChanged

Defined in

src/sdk/settings/UserSetting.ts:294


onSettingValueSynced

onSettingValueSynced<K>(entry, data): void

A callback which is called when a setting changed event is received over the event bus.

Type parameters

NameType
Kextends keyof ToldUserSettingTypes

Parameters

NameTypeDescription
entryUserSettingManagerEntry<ToldUserSettingTypes[K]>The entry for the setting that was changed.
dataUserSettingManagerSyncData<ToldUserSettingTypes[K]>The sync data.

Returns

void

Inherited from

DefaultUserSettingManager.onSettingValueSynced

Defined in

src/sdk/settings/UserSetting.ts:304


syncSettingFromEvent

syncSettingFromEvent<K>(entry, data): void

Syncs a setting using data received from a sync event.

Type parameters

NameType
Kextends keyof ToldUserSettingTypes

Parameters

NameTypeDescription
entryUserSettingManagerEntry<ToldUserSettingTypes[K]>The entry for the setting to sync.
dataUserSettingManagerSyncData<ToldUserSettingTypes[K]>The sync event data.

Returns

void

Inherited from

DefaultUserSettingManager.syncSettingFromEvent

Defined in

src/sdk/settings/UserSetting.ts:323


tryGetSetting

tryGetSetting<K>(name): undefined | UserSetting<NonNullable<ToldUserSettingTypes[K]>>

Type parameters

NameType
Kextends string

Parameters

NameType
nameK

Returns

undefined | UserSetting<NonNullable<ToldUserSettingTypes[K]>>

Inherit Doc

Inherited from

DefaultUserSettingManager.tryGetSetting

Defined in

src/sdk/settings/UserSetting.ts:255


whenSettingChanged

whenSettingChanged<K>(name): Consumer<NonNullable<ToldUserSettingTypes[K]>>

Type parameters

NameType
Kextends "toldDatabaseVersion" | "toldEnabled" | "toldOriginIcao" | "toldTakeoffWeight" | "toldTakeoffRunwaySurface" | "toldTakeoffWindDirection" | "toldTakeoffWindSpeed" | "toldTakeoffTemperature" | "toldTakeoffCanUseRat" | "toldTakeoffUseRat" | "toldTakeoffPressure" | "toldTakeoffRunwayLength" | "toldTakeoffRunwayElevation" | "toldTakeoffRunwayHeading" | "toldTakeoffRunwayGradient" | "toldTakeoffPressureAltitude" | "toldTakeoffFlapsIndex" | "toldTakeoffFlapsIndexDefault" | "toldTakeoffAntiIceOn" | "toldTakeoffThrustReversers" | "toldTakeoffFactor" | "toldTakeoffRolling" | "toldTakeoffRollingDefault" | "toldTakeoffCalcResult" | "toldTakeoffVSpeedsAccepted" | "toldDestinationDefaultApplied" | "toldDestinationIcao" | "toldLandingCanUsePredictedWeight" | "toldLandingUsePredictedWeight" | "toldLandingWeight" | "toldLandingRunwaySurface" | "toldLandingWindDirection" | "toldLandingWindSpeed" | "toldLandingTemperature" | "toldLandingPressure" | "toldLandingRunwayLength" | "toldLandingRunwayElevation" | "toldLandingRunwayHeading" | "toldLandingRunwayGradient" | "toldLandingPressureAltitude" | "toldLandingFlapsIndex" | "toldLandingFlapsIndexDefault" | "toldLandingAntiIceOn" | "toldLandingThrustReversers" | "toldLandingFactor" | "toldLandingFactorDefault" | "toldLandingAutothrottleOn" | "toldLandingCalcResult" | "toldLandingVSpeedsAccepted"

Parameters

NameType
nameK

Returns

Consumer<NonNullable<ToldUserSettingTypes[K]>>

Inherit Doc

Inherited from

DefaultUserSettingManager.whenSettingChanged

Defined in

src/sdk/settings/UserSetting.ts:275


getManager

getManager(bus): DefaultUserSettingManager<ToldUserSettingTypes>

Gets an instance of the TOLD (takeoff/landing) performance calculation user settings manager.

Parameters

NameTypeDescription
busEventBusThe event bus.

Returns

DefaultUserSettingManager<ToldUserSettingTypes>

An instance of the TOLD (takeoff/landing) performance calculation user settings manager.

Defined in

src/workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/Shared/Settings/ToldUserSettings.ts:201


parseLandingResultString

parseLandingResultString(resultString): undefined | ToldLandingPerformanceResult

Parses a landing performance result object from a string.

Parameters

NameTypeDescription
resultStringstringThe stringified result object.

Returns

undefined | ToldLandingPerformanceResult

The landing performance result object parsed from the specified string, or undefined if the string does not define such an object.

Defined in

src/workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/Shared/Settings/ToldUserSettings.ts:450


parseTakeoffResultString

parseTakeoffResultString(resultString): undefined | ToldTakeoffPerformanceResult

Parses a takeoff performance result object from a string.

Parameters

NameTypeDescription
resultStringstringThe stringified result object.

Returns

undefined | ToldTakeoffPerformanceResult

The takeoff performance result object parsed from the specified string, or undefined if the string does not define such an object.

Defined in

src/workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/Shared/Settings/ToldUserSettings.ts:414