Class: ToldUserSettings
Utility class for retrieving and working with TOLD (takeoff/landing) performance calculation user settings managers.
Hierarchy
DefaultUserSettingManager
<ToldUserSettingTypes
>↳
ToldUserSettings
Constructors
constructor
• new ToldUserSettings(bus
, settingDefs
, keepLocal?
): ToldUserSettings
Constructor.
Parameters
Name | Type | Default value | Description |
---|---|---|---|
bus | EventBus | undefined | The bus used by this manager to publish setting change events. |
settingDefs | readonly UserSettingDefinition <string | number | boolean >[] | undefined | The setting definitions used to initialize this manager's settings. |
keepLocal | boolean | false | If present and true, values will be kept local to the instrument on which they're set. |
Returns
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
Name | Type |
---|---|
K | extends "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
Name | Type |
---|---|
name | K |
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
Name | Type |
---|---|
M | extends UserSettingRecord |
Parameters
Name | Type |
---|---|
map | UserSettingMap <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
Name | Type |
---|---|
K | extends keyof ToldUserSettingTypes |
Parameters
Name | Type | Description |
---|---|---|
entry | UserSettingManagerEntry <ToldUserSettingTypes [K ]> | The entry for the setting that was changed. |
value | ToldUserSettingTypes [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
Name | Type |
---|---|
K | extends keyof ToldUserSettingTypes |
Parameters
Name | Type | Description |
---|---|---|
entry | UserSettingManagerEntry <ToldUserSettingTypes [K ]> | The entry for the setting that was changed. |
data | UserSettingManagerSyncData <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
Name | Type |
---|---|
K | extends keyof ToldUserSettingTypes |
Parameters
Name | Type | Description |
---|---|---|
entry | UserSettingManagerEntry <ToldUserSettingTypes [K ]> | The entry for the setting to sync. |
data | UserSettingManagerSyncData <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
Name | Type |
---|---|
K | extends string |
Parameters
Name | Type |
---|---|
name | K |
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
Name | Type |
---|---|
K | extends "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
Name | Type |
---|---|
name | K |
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
Name | Type | Description |
---|---|---|
bus | EventBus | The 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
Name | Type | Description |
---|---|---|
resultString | string | The 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
Name | Type | Description |
---|---|---|
resultString | string | The 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