Skip to main content

Class: UiKnobUtils

A utility class for working with G3X Touch bezel rotary knobs.

Constructors

constructor

new UiKnobUtils(): UiKnobUtils

Returns

UiKnobUtils

Properties

ALL_KNOB_IDS

Static Readonly ALL_KNOB_IDS: readonly [SingleOuter, SingleInner, SingleInnerPush, LeftOuter, LeftInner, LeftInnerPush, RightOuter, RightInner, RightInnerPush]

An array of all bezel rotary knob IDs.

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/UiSystem/UiKnobUtils.ts:13


INNER_KNOB_IDS

Static Readonly INNER_KNOB_IDS: readonly [SingleInner, SingleInnerPush, LeftInner, LeftInnerPush, RightInner, RightInnerPush]

An array of inner bezel rotary knob IDs.

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/UiSystem/UiKnobUtils.ts:33


KNOB_ID_TO_KNOB_GROUP

Static Readonly KNOB_ID_TO_KNOB_GROUP: UiKnobIdGroupMap

Mappings from G3X Touch bezel rotary knob IDs to the groups to which they belong.

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/UiSystem/UiKnobUtils.ts:60


OUTER_KNOB_IDS

Static Readonly OUTER_KNOB_IDS: readonly [SingleOuter, LeftOuter, RightOuter]

An array of outer bezel rotary knob IDs.

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/UiSystem/UiKnobUtils.ts:26


PUSH_KNOB_IDS

Static Readonly PUSH_KNOB_IDS: readonly [SingleInnerPush, LeftInnerPush, RightInnerPush]

An array of IDs of bezel rotary knobs that can be pushed.

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/UiSystem/UiKnobUtils.ts:53


TURN_KNOB_IDS

Static Readonly TURN_KNOB_IDS: readonly [SingleOuter, SingleInner, LeftOuter, LeftInner, RightOuter, RightInner]

An array of IDs of bezel rotary knobs that can be turned.

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/UiSystem/UiKnobUtils.ts:43

Methods

isInnerKnobId

isInnerKnobId(knobId): knobId is UiInnerKnobId

Checks if a bezel rotary knob ID belongs to an inner knob.

Parameters

NameTypeDescription
knobIdUiKnobIdThe bezel rotary knob ID to check.

Returns

knobId is UiInnerKnobId

Whether the specified bezel rotary ID belongs to an inner knob.

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/UiSystem/UiKnobUtils.ts:86


isOuterKnobId

isOuterKnobId(knobId): knobId is UiOuterKnobId

Checks if a bezel rotary knob ID belongs to an outer knob.

Parameters

NameTypeDescription
knobIdUiKnobIdThe bezel rotary knob ID to check.

Returns

knobId is UiOuterKnobId

Whether the specified bezel rotary ID belongs to an outer knob.

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/UiSystem/UiKnobUtils.ts:77


isPushKnobId

isPushKnobId(knobId): knobId is UiPushKnobId

Checks if a bezel rotary knob ID belongs to a knob that can be pushed.

Parameters

NameTypeDescription
knobIdUiKnobIdThe bezel rotary knob ID to check.

Returns

knobId is UiPushKnobId

Whether the specified bezel rotary ID belongs to a knob that can be pushed.

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/UiSystem/UiKnobUtils.ts:104


isTurnKnobId

isTurnKnobId(knobId): knobId is UiTurnKnobId

Checks if a bezel rotary knob ID belongs to a knob that can be turned.

Parameters

NameTypeDescription
knobIdUiKnobIdThe bezel rotary knob ID to check.

Returns

knobId is UiTurnKnobId

Whether the specified bezel rotary ID belongs to a knob that can be turned.

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/UiSystem/UiKnobUtils.ts:95


reconcileRequestedLabelStates

reconcileRequestedLabelStates(knobIds, pipeTo, paused, ...requestedStates): Subscription

Reconciles one or more requested knob label states and pipes the result into a MutableSubscribableMap of knob label states.

Parameters

NameTypeDescription
knobIdsreadonly UiKnobId[]The IDs of the knobs for which to reconcile label states.
pipeToMutableSubscribableMap<UiKnobId, string>The map to which to pipe the reconciled requested label states.
pausedbooleanWhether to initialize the label state pipe as paused.
...requestedStatesSubscribable<UiKnobRequestedLabelState>[]The requested knob label states to reconcile. Requested states that appear earlier in the array have a higher priority. In other words, for each knob, the reconciled state will be selected from one of the requested states if and only if no requested state with a lower index has requested a label for the same knob.

Returns

Subscription

A Subscription representing the created reconciled knob label state pipe.

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/UiSystem/UiKnobUtils.ts:119