Class: GtcService
A service to manage GTC views
Constructors
constructor
• new GtcService(bus
, instrumentIndex
, orientation
, controlSetup
, defaultControlMode
, pfdControlIndex
, displayPaneControlIndex
, isAdvancedVnav
): GtcService
Creates an instance of GtcService.
Parameters
Name | Type | Description |
---|---|---|
bus | EventBus | The event bus. |
instrumentIndex | number | The index of the GTC instrument to which this service belongs. |
orientation | GtcOrientation | The orientation (horizontal or vertical) of the GTC to which this service belongs. |
controlSetup | GtcControlSetup | The control mode setup supported by the GTC to which this service belongs. |
defaultControlMode | GtcControlMode | The nominal default control mode of the GTC to which this service belongs. |
pfdControlIndex | PfdIndex | The index of the PFD controlled by the GTC to which this service belongs. |
displayPaneControlIndex | DisplayPaneControlGtcIndex | The display pane controlling index of the GTC to which this service belongs. |
isAdvancedVnav | boolean | Whether advanced VNAV is enabled. |
Returns
Throws
Error if defaultControlMode is incompatible with controlSetup.
Defined in
workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/GTC/GtcService/GtcService.tsx:289
Properties
activeControlMode
• Readonly
activeControlMode: Subscribable
<GtcControlMode
>
The currently active control mode.
Defined in
workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/GTC/GtcService/GtcService.tsx:177
activeView
• Readonly
activeView: Subscribable
<GtcViewEntry
<GtcView
<GtcViewProps
>>>
The view that is currently at the top of the active view stack.
Defined in
workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/GTC/GtcService/GtcService.tsx:211
bus
• Readonly
bus: EventBus
The event bus.
Defined in
workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/GTC/GtcService/GtcService.tsx:290
controlSetup
• Readonly
controlSetup: GtcControlSetup
The control mode setup supported by the GTC to which this service belongs.
Defined in
workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/GTC/GtcService/GtcService.tsx:293
currentPage
• Readonly
currentPage: Subscribable
<null
| GtcViewEntry
<GtcView
<GtcViewProps
>>>
The page that is currently open in the active view stack.
Defined in
workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/GTC/GtcService/GtcService.tsx:215
displayPaneControlIndex
• Readonly
displayPaneControlIndex: DisplayPaneControlGtcIndex
The display pane controlling index of the GTC to which this service belongs.
Defined in
workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/GTC/GtcService/GtcService.tsx:296
displayPaneVisibleSettings
• Readonly
displayPaneVisibleSettings: Record
<ControllableDisplayPaneIndex
, UserSetting
<boolean
>>
The visibility setting for each display pane.
Defined in
workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/GTC/GtcService/GtcService.tsx:235
displayPanesSettings
• Readonly
displayPanesSettings: UserSettingManager
<DisplayPaneAllUserSettingTypes
>
The display panes settings master manager.
Defined in
workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/GTC/GtcService/GtcService.tsx:233
gtcKnobStates
• Readonly
gtcKnobStates: GtcKnobStates
The control states of the hardware knobs attached to this service's parent GTC.
Defined in
workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/GTC/GtcService/GtcService.tsx:269
gtcOtherSide
• Readonly
gtcOtherSide: "left"
| "right"
The string name for which side the other GTC is on.
Defined in
workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/GTC/GtcService/GtcService.tsx:220
gtcSettings
• Readonly
gtcSettings: UserSettingManager
<GtcAliasedUserSettingTypes
>
The GTC specific user settings for this GTC.
Defined in
workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/GTC/GtcService/GtcService.tsx:223
gtcThisSide
• Readonly
gtcThisSide: "left"
| "right"
The string name for which side this GTC is on.
Defined in
workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/GTC/GtcService/GtcService.tsx:218
hasMfdMode
• Readonly
hasMfdMode: boolean
Whether this GTC has an MFD mode and can control display panes.
Defined in
workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/GTC/GtcService/GtcService.tsx:167
hasNavComMode
• Readonly
hasNavComMode: boolean
Whether this GTC has a NAV_COM.
Defined in
workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/GTC/GtcService/GtcService.tsx:171
hasPfdMode
• Readonly
hasPfdMode: boolean
Whether this GTC has a PFD mode.
Defined in
workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/GTC/GtcService/GtcService.tsx:169
instrumentIndex
• Readonly
instrumentIndex: number
The index of the GTC instrument to which this service belongs.
Defined in
workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/GTC/GtcService/GtcService.tsx:291
isAdvancedVnav
• Readonly
isAdvancedVnav: boolean
Whether advanced VNAV is enabled.
Defined in
workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/GTC/GtcService/GtcService.tsx:297
isAwake
• Readonly
isAwake: Subscribable
<boolean
>
Whether this service is awake.
Defined in
workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/GTC/GtcService/GtcService.tsx:202
isHorizontal
• Readonly
isHorizontal: boolean
True when horizontal, false when vertical.
Defined in
workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/GTC/GtcService/GtcService.tsx:164
navComEventHandler
• Readonly
navComEventHandler: Subject
<null
| GtcInteractionHandler
>
Defined in
workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/GTC/GtcService/GtcService.tsx:266
orientation
• Readonly
orientation: GtcOrientation
The orientation (horizontal or vertical) of the GTC to which this service belongs.
Defined in
workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/GTC/GtcService/GtcService.tsx:292
otherGtcSelectedPane
• Readonly
otherGtcSelectedPane: ConsumerSubject
<-1
| ControllableDisplayPaneIndex
>
The selected pane for the other GTC.
Defined in
workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/GTC/GtcService/GtcService.tsx:229
pfdControlIndex
• Readonly
pfdControlIndex: PfdIndex
The index of the PFD controlled by the GTC to which this service belongs.
Defined in
workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/GTC/GtcService/GtcService.tsx:295
pfdInstrumentPaneIndex
• Readonly
pfdInstrumentPaneIndex: LeftPfdInstrument
| RightPfdInstrument
The index of the PFD instrument display pane on the side of this GTC.
Defined in
workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/GTC/GtcService/GtcService.tsx:254
pfdPaneIndex
• Readonly
pfdPaneIndex: LeftPfd
| RightPfd
The index of the PFD display pane on the side of this GTC.
Defined in
workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/GTC/GtcService/GtcService.tsx:257
pfdPaneSettings
• Readonly
pfdPaneSettings: DisplayPanesAliasedUserSettingManager
The display pane settings for this side's PFD display pane.
Defined in
workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/GTC/GtcService/GtcService.tsx:259
radioBeingTuned
• Readonly
radioBeingTuned: Subject
<ComRadio
>
Defined in
workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/GTC/GtcService/GtcService.tsx:265
selectedDisplayPane
• Readonly
selectedDisplayPane: Subscribable
<-1
| ControllableDisplayPaneIndex
>
The index of the currently selected display pane.
Defined in
workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/GTC/GtcService/GtcService.tsx:248
selectedPaneSettings
• Readonly
selectedPaneSettings: DisplayPanesAliasedUserSettingManager
The settings manager for the currently selected display pane.
Defined in
workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/GTC/GtcService/GtcService.tsx:251
thisGtcSelectedPane
• Readonly
thisGtcSelectedPane: ConsumerSubject
<-1
| ControllableDisplayPaneIndex
>
The selected pane for this GTC.
Defined in
workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/GTC/GtcService/GtcService.tsx:226
Accessors
activeViewIsNotAHomePage
• get
activeViewIsNotAHomePage(): Subscribable
<boolean
>
Returns whether the active view is a GTC Home Page or not
Returns
Subscribable
<boolean
>
A subscribable that returns whether the active view is a GTC Home Page or not
Defined in
workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/GTC/GtcService/GtcService.tsx:504
isVertNavComViewStackEmpty
• get
isVertNavComViewStackEmpty(): boolean
Whether the vertical GTC NAV/COM view stack has no open popups.
Returns
boolean
Defined in
workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/GTC/GtcService/GtcService.tsx:470
Methods
attachPluginInteractionhandler
▸ attachPluginInteractionhandler(handler
): void
Attaches an interaction event handler which executes event handling logic defined by plugins.
Parameters
Name | Type | Description |
---|---|---|
handler | GtcInteractionHandler | The interaction event handler to attach. |
Returns
void
Defined in
workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/GTC/GtcService/GtcService.tsx:540
attachPluginKnobStateOverrides
▸ attachPluginKnobStateOverrides(overrides
): void
Attaches plugin-defined knob control state overrides.
Parameters
Name | Type | Description |
---|---|---|
overrides | readonly Readonly <GtcKnobStatePluginOverrides >[] | An array of plugin-defined knob control state overrides. The array should be ordered such that the overrides appear in the order in which their parent plugins were loaded. |
Returns
void
Defined in
workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/GTC/GtcService/GtcService.tsx:532
changeControlModeTo
▸ changeControlModeTo(controlMode
): void
Changes the active control mode
Parameters
Name | Type | Description |
---|---|---|
controlMode | GtcControlMode | The control mode to change to |
Returns
void
Defined in
workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/GTC/GtcService/GtcService.tsx:919
changePageTo
▸ changePageTo<T
>(key
): GtcViewEntry
<T
>
Opens a view as a page and changes the current page to the opened view. This will close the current page and any open popups.
Type parameters
Name | Type |
---|---|
T | extends GtcView <GtcViewProps > = GtcView <GtcViewProps > |
Parameters
Name | Type | Description |
---|---|---|
key | string | The key of the view to open. |
Returns
GtcViewEntry
<T
>
The entry of the opened view.
Throws
Error if there is no view registered under the specified key.
Defined in
workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/GTC/GtcService/GtcService.tsx:1006
clearVerticalNavComViewStack
▸ clearVerticalNavComViewStack(): GtcViewEntry
<GtcView
<GtcViewProps
>>
Clears the vertical GTC NAV/COM view stack, closing all open popups in the stack and resetting its history.
Returns
GtcViewEntry
<GtcView
<GtcViewProps
>>
The active view entry after the operation is complete.
Throws
Error if this service's GTC is horizontal.
Defined in
workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/GTC/GtcService/GtcService.tsx:1358
getAvailablePanes
▸ getAvailablePanes(): readonly ControllableDisplayPaneIndex
[]
Gets the available panes.
Returns
readonly ControllableDisplayPaneIndex
[]
The available panes.
Defined in
workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/GTC/GtcService/GtcService.tsx:910
goBack
▸ goBack(): GtcViewEntry
<GtcView
<GtcViewProps
>>
Returns to the most recent previous history state of the active view stack.
Returns
GtcViewEntry
<GtcView
<GtcViewProps
>>
The active view entry after the operation is complete.
Throws
Error if the most recent previous history state of the active view stack is undefined.
Defined in
workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/GTC/GtcService/GtcService.tsx:1188
goBackTo
▸ goBackTo(selector
): GtcViewEntry
<GtcView
<GtcViewProps
>>
Attempts to return to a previous history state of the active view stack.
Parameters
Name | Type | Description |
---|---|---|
selector | (steps : number , stackPeeker : (depth : number ) => undefined | GtcViewEntry <GtcView <GtcViewProps >>) => boolean | A function which selects the history state to which to return. The function is called once for each history state in order of increasing age and takes two arguments: the number of steps from the present state to the selected state and a function which allows one to peek into the selected state's view stack. The function should return true if the operation should return to the selected state and false otherwise. If the function returns false for every selected state, then the operation is aborted. |
Returns
GtcViewEntry
<GtcView
<GtcViewProps
>>
The active view entry after the operation is complete.
Defined in
workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/GTC/GtcService/GtcService.tsx:1240
goBackToHomePage
▸ goBackToHomePage(): GtcViewEntry
<GtcView
<GtcViewProps
>>
Goes back to the home page of the currently selected control mode.
Returns
GtcViewEntry
<GtcView
<GtcViewProps
>>
The active view entry after the operation is complete.
Defined in
workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/GTC/GtcService/GtcService.tsx:1304
goToHomePage
▸ goToHomePage(): void
Closes all open popups and the open page, then opens the home page for the currently selected control mode. This also resets the history for the open view stack.
Returns
void
Defined in
workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/GTC/GtcService/GtcService.tsx:973
initialize
▸ initialize(): void
Initializes this service.
Returns
void
Defined in
workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/GTC/GtcService/GtcService.tsx:698
onGtcContainerRendered
▸ onGtcContainerRendered(viewStackRefs
): void
Called by GtcContainer to pass in the refs to all the view stacks. Should only be called once.
Parameters
Name | Type | Description |
---|---|---|
viewStackRefs | ViewStackRefs | The view stack refs. |
Returns
void
Defined in
workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/GTC/GtcService/GtcService.tsx:522
onInteractionEvent
▸ onInteractionEvent(event
): void
Called when an interaction event needs to be sent to the active view.
Parameters
Name | Type | Description |
---|---|---|
event | GtcInteractionEvent | The event. |
Returns
void
Defined in
workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/GTC/GtcService/GtcService.tsx:1392
openPopup
▸ openPopup<T
>(key
, popupType?
, backgroundOcclusion?
): GtcViewEntry
<T
>
Opens a view as a popup. The opened view will be brought to the top of the current view stack as the active view.
Type parameters
Name | Type |
---|---|
T | extends GtcView <GtcViewProps > = GtcView <GtcViewProps > |
Parameters
Name | Type | Default value | Description |
---|---|---|---|
key | string | undefined | The key of the view to open. |
popupType | GtcPopupType | 'normal' | The type of popup to open the view as. Defaults to 'normal' . |
backgroundOcclusion | GtcViewOcclusionType | 'darken' | The occlusion type applied to views beneath the popup. If 'none' is chosen, then the popup will not prevent mouse events from reaching views beneath it (unless the mouse event was triggered on an element in the popup). Defaults to 'darken' . |
Returns
GtcViewEntry
<T
>
The entry of the opened view.
Throws
Error if there is no view registered under the specified key.
Defined in
workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/GTC/GtcService/GtcService.tsx:1038
openVerticalNavComPopup
▸ openVerticalNavComPopup<T
>(key
, popupType?
, backgroundOcclusion?
): GtcViewEntry
<T
>
Opens a view as a vertical GTC NAV/COM popup. The opened view will be brought to the top of the vertical GTC NAV/COM view stack as the active view.
Type parameters
Name | Type |
---|---|
T | extends GtcView <GtcViewProps > = GtcView <GtcViewProps > |
Parameters
Name | Type | Default value | Description |
---|---|---|---|
key | string | undefined | The key of the view to open. |
popupType | GtcPopupType | 'normal' | The type of popup to open the view as. Defaults to 'normal' . |
backgroundOcclusion | GtcViewOcclusionType | 'darken' | The occlusion type applied to views beneath the popup. If 'none' is chosen, then the popup will not prevent mouse events from reaching views beneath it (unless the mouse event was triggered on an element in the popup). Defaults to 'darken' . |
Returns
GtcViewEntry
<T
>
The entry of the opened view.
Throws
Error if this service's GTC is horizontal or there is no view registered under the specified key.
Defined in
workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/GTC/GtcService/GtcService.tsx:1129
registerView
▸ registerView(lifecyclePolicy
, key
, controlMode
, factory
, displayPaneIndex?
): void
Registers and renders a view (page or popup) with this service. Once a view is registered, it may be opened by referencing its key.
Each view is registered with a specific view stack. There is one view stack for each of the PFD and NAV/COM control modes, and four view stacks for the MFD control mode (one for each controllable display pane). Views registered with different stacks may share the same key. Registering a view under the same key as an existing view in the same stack will replace the existing view.
Parameters
Name | Type | Description |
---|---|---|
lifecyclePolicy | GtcViewLifecyclePolicy | The lifecycle policy to apply to the view. If the view is registered under a home page key, then this value is ignored and the GtcViewLifecyclePolicy.Static policy will automatically be applied. |
key | string | The key to register the view under. |
controlMode | GtcControlMode | The control mode with which to register the view. |
factory | (gtcService : GtcService , controlMode : GtcControlMode , displayPaneIndex? : ControllableDisplayPaneIndex ) => VNode | A function that renders the view. |
displayPaneIndex? | ControllableDisplayPaneIndex | The index of the display pane with which to register the view. Ignored if controlMode is not 'MFD' . If not defined, the view will be registered once for each display pane. |
Returns
void
Defined in
workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/GTC/GtcService/GtcService.tsx:560
reset
▸ reset(): void
Resets this service, which does the following:
- Closes all open popups.
- Changes the open page to the home page of this service's default control mode.
- Clears all history.
- Sets the controlled display pane to this service's default, if applicable.
Has no effect if this service is not initialized.
Returns
void
Defined in
workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/GTC/GtcService/GtcService.tsx:789
sleep
▸ sleep(): void
Puts this service to sleep. Once asleep, this service will deselect any controlled display pane and will not respond to interaction events.
Returns
void
Defined in
workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/GTC/GtcService/GtcService.tsx:893
wake
▸ wake(): void
Wakes this service. Once awake, this service will attempt to select an appropriate display pane to control and will respond to interaction events.
Returns
void
Defined in
workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/GTC/GtcService/GtcService.tsx:879