Skip to main content

Class: WT21FmcScreen

Defined in: workingtitle-instruments-wt21/instruments/html_ui/Pages/VCockpit/Instruments/WT21v2/FMC/WT21FmcScreen.ts:25

WT21 FMC screen

Extends​

Constructors​

Constructor​

new WT21FmcScreen(bus, baseInstrument, fms, fmcIndex, targetElement): WT21FmcScreen

Defined in: workingtitle-instruments-wt21/instruments/html_ui/Pages/VCockpit/Instruments/WT21v2/FMC/WT21FmcScreen.ts:59

Ctor

Parameters​

ParameterTypeDescription
busEventBusthe event bus
baseInstrumentWT21_FMC_Instrumentthe FMC base instrument
fmsWT21Fmsthe fms
fmcIndex1 | 2the fmc index
targetElementHTMLDivElementthe cdu render target element

Returns​

WT21FmcScreen

Overrides​

FmcScreen.constructor

Properties​

bus​

protected readonly bus: EventBus

Defined in: sdk/fmc/FmcScreen.ts:125

the event bus

Inherited from​

FmcScreen.bus


currentlyDisplayedPage​

protected currentlyDisplayedPage: WT21FmcPage<any> | null = null

Defined in: sdk/fmc/FmcScreen.ts:108

Inherited from​

FmcScreen.currentlyDisplayedPage


fmcIndex​

readonly fmcIndex: 1 | 2

Defined in: workingtitle-instruments-wt21/instruments/html_ui/Pages/VCockpit/Instruments/WT21v2/FMC/WT21FmcScreen.ts:59

the fmc index


options​

readonly options: Required<FmcScreenOptions>

Defined in: sdk/fmc/FmcScreen.ts:96

Inherited from​

FmcScreen.options


scratchpad​

readonly scratchpad: FmcScratchpad

Defined in: sdk/fmc/FmcScreen.ts:129

the scratchpad to use for this screen

Inherited from​

FmcScreen.scratchpad

Accessors​

currentRoute​

Get Signature​

get currentRoute(): Subject<string>

Defined in: sdk/fmc/FmcScreen.ts:163

Gets the current route

Returns​

Subject<string>

a string subject

Inherited from​

FmcScreen.currentRoute


currentSubpageCount​

Get Signature​

get currentSubpageCount(): Subject<number>

Defined in: sdk/fmc/FmcScreen.ts:181

Gets the current number of subpages for the current displayed page

Returns​

Subject<number>

a number

Inherited from​

FmcScreen.currentSubpageCount


currentSubpageIndex​

Get Signature​

get currentSubpageIndex(): Subject<number>

Defined in: sdk/fmc/FmcScreen.ts:172

Gets the current subpage index for the current displayed page, 1-indexed

Returns​

Subject<number>

a number

Inherited from​

FmcScreen.currentSubpageIndex

Methods​

acceptPageOutput()​

protected acceptPageOutput(output, template, atRowIndex): void

Defined in: sdk/fmc/FmcScreen.ts:429

Method called when a page is rendered to the screen. This can be overridden to intercept the page data and act upon it.

Parameters​

ParameterTypeDescription
outputFmcOutputTemplatethe output template, displayed on the screen
templateFmcRenderTemplatethe render template, rendered by the page
atRowIndexnumberthe row index at which the render occurred

Returns​

void

Inherited from​

FmcScreen.acceptPageOutput


addLskEvents()​

addLskEvents(array): void

Defined in: sdk/fmc/FmcScreen.ts:358

Adds a list of LSK events bound to certain positions on the rendering grid

Parameters​

ParameterTypeDescription
array[BTN_A | BTN_B | BTN_C | BTN_D | BTN_E | BTN_F | BTN_G | BTN_H | BTN_I | BTN_J | BTN_K | BTN_L | BTN_M | BTN_N | BTN_O | BTN_P | BTN_Q | BTN_R | BTN_S | BTN_T | BTN_U | BTN_V | BTN_W | BTN_X | BTN_Y | BTN_Z | BTN_1 | BTN_2 | BTN_3 | BTN_4 | BTN_5 | BTN_6 | BTN_7 | BTN_8 | BTN_9 | BTN_0 | BTN_PLUSMINUS | BTN_SP | BTN_DIV | BTN_DOT | BTN_CLR_DEL | BTN_CLR_DEL_LONG | BTN_PLUS_MINUS | BTN_EXEC | PAGE_INDEX | PAGE_STATUS | PAGE_LEGS | PAGE_MCDUMENU | PAGE_DSPLMENU1 | PAGE_MFDADV | PAGE_MFDDATA | PAGE_DIR | PAGE_FPLN | PAGE_POSINIT | PAGE_PERF | PAGE_PERFINIT | PAGE_TAKEOFFREF | PAGE_APPROACHREF1 | PAGE_VNAVSETUP | PAGE_FUELMGMT1 | PAGE_FUELMGMT2 | PAGE_FUELMGMT3 | PAGE_FLTLOG | PAGE_DEPARRIDX | PAGE_DEPART | PAGE_ARRIVAL | PAGE_DATALINKMENU | PAGE_WEATHER | PAGE_TERMWX_REQ | PAGE_TERMWX_VIEW | PAGE_VORDMECTL | PAGE_GNSSCTL | PAGE_GNSS1POS | PAGE_FREQ | PAGE_FIX | PAGE_PROG | PAGE_MSG | PAGE_TUNE | PAGE_DEFAULTS | PAGE_USERSETTINGS | LSK_1 | LSK_2 | LSK_3 | LSK_4 | LSK_5 | LSK_6 | RSK_1 | RSK_2 | RSK_3 | RSK_4 | RSK_5 | RSK_6 | BTN_PREV | BTN_NEXT | "scratchpad_plus_minus" | "scratchpad_type" | "clear_del" | "clear_del_long", number, number][]the LSK events and their positions

Returns​

void

Inherited from​

FmcScreen.addLskEvents


addPageRoute()​

Declares a route for a page class

Param​

the route to set

Param​

the page to associate with it

Param​

the event to associate with it

Param​

default typed parameters to pass in to the page

Call Signature​

addPageRoute<T>(route, page, routeEvent?): void

Defined in: sdk/fmc/FmcScreen.ts:280

Declares a route for a page class

Type Parameters​
Type Parameter
T extends object | null
Parameters​
ParameterTypeDescription
routestringthe route to set
pagePageConstructor<WT21FmcPage<any> & AbstractFmcPage<T>>the page to associate with it
routeEvent?BTN_A | BTN_B | BTN_C | BTN_D | BTN_E | BTN_F | BTN_G | BTN_H | BTN_I | BTN_J | BTN_K | BTN_L | BTN_M | BTN_N | BTN_O | BTN_P | BTN_Q | BTN_R | BTN_S | BTN_T | BTN_U | BTN_V | BTN_W | BTN_X | BTN_Y | BTN_Z | BTN_1 | BTN_2 | BTN_3 | BTN_4 | BTN_5 | BTN_6 | BTN_7 | BTN_8 | BTN_9 | BTN_0 | BTN_PLUSMINUS | BTN_SP | BTN_DIV | BTN_DOT | BTN_CLR_DEL | BTN_CLR_DEL_LONG | BTN_PLUS_MINUS | BTN_EXEC | PAGE_INDEX | PAGE_STATUS | PAGE_LEGS | PAGE_MCDUMENU | PAGE_DSPLMENU1 | PAGE_MFDADV | PAGE_MFDDATA | PAGE_DIR | PAGE_FPLN | PAGE_POSINIT | PAGE_PERF | PAGE_PERFINIT | PAGE_TAKEOFFREF | PAGE_APPROACHREF1 | PAGE_VNAVSETUP | PAGE_FUELMGMT1 | PAGE_FUELMGMT2 | PAGE_FUELMGMT3 | PAGE_FLTLOG | PAGE_DEPARRIDX | PAGE_DEPART | PAGE_ARRIVAL | PAGE_DATALINKMENU | PAGE_WEATHER | PAGE_TERMWX_REQ | PAGE_TERMWX_VIEW | PAGE_VORDMECTL | PAGE_GNSSCTL | PAGE_GNSS1POS | PAGE_FREQ | PAGE_FIX | PAGE_PROG | PAGE_MSG | PAGE_TUNE | PAGE_DEFAULTS | PAGE_USERSETTINGS | LSK_1 | LSK_2 | LSK_3 | LSK_4 | LSK_5 | LSK_6 | RSK_1 | RSK_2 | RSK_3 | RSK_4 | RSK_5 | RSK_6 | BTN_PREV | BTN_NEXT | "scratchpad_plus_minus" | "scratchpad_type" | "clear_del" | "clear_del_long"the event to associate with it
Returns​

void

Inherited from​

FmcScreen.addPageRoute

Call Signature​

addPageRoute<U>(route, page, routeEvent, defaultProps): void

Defined in: sdk/fmc/FmcScreen.ts:293

Declares a route for a page class

Type Parameters​
Type Parameter
U extends PageConstructor<WT21FmcPage<any>, null>
Parameters​
ParameterTypeDescription
routestringthe route to set
pageUthe page to associate with it
routeEventBTN_A | BTN_B | BTN_C | BTN_D | BTN_E | BTN_F | BTN_G | BTN_H | BTN_I | BTN_J | BTN_K | BTN_L | BTN_M | BTN_N | BTN_O | BTN_P | BTN_Q | BTN_R | BTN_S | BTN_T | BTN_U | BTN_V | BTN_W | BTN_X | BTN_Y | BTN_Z | BTN_1 | BTN_2 | BTN_3 | BTN_4 | BTN_5 | BTN_6 | BTN_7 | BTN_8 | BTN_9 | BTN_0 | BTN_PLUSMINUS | BTN_SP | BTN_DIV | BTN_DOT | BTN_CLR_DEL | BTN_CLR_DEL_LONG | BTN_PLUS_MINUS | BTN_EXEC | PAGE_INDEX | PAGE_STATUS | PAGE_LEGS | PAGE_MCDUMENU | PAGE_DSPLMENU1 | PAGE_MFDADV | PAGE_MFDDATA | PAGE_DIR | PAGE_FPLN | PAGE_POSINIT | PAGE_PERF | PAGE_PERFINIT | PAGE_TAKEOFFREF | PAGE_APPROACHREF1 | PAGE_VNAVSETUP | PAGE_FUELMGMT1 | PAGE_FUELMGMT2 | PAGE_FUELMGMT3 | PAGE_FLTLOG | PAGE_DEPARRIDX | PAGE_DEPART | PAGE_ARRIVAL | PAGE_DATALINKMENU | PAGE_WEATHER | PAGE_TERMWX_REQ | PAGE_TERMWX_VIEW | PAGE_VORDMECTL | PAGE_GNSSCTL | PAGE_GNSS1POS | PAGE_FREQ | PAGE_FIX | PAGE_PROG | PAGE_MSG | PAGE_TUNE | PAGE_DEFAULTS | PAGE_USERSETTINGS | LSK_1 | LSK_2 | LSK_3 | LSK_4 | LSK_5 | LSK_6 | RSK_1 | RSK_2 | RSK_3 | RSK_4 | RSK_5 | RSK_6 | BTN_PREV | BTN_NEXT | "scratchpad_plus_minus" | "scratchpad_type" | "clear_del" | "clear_del_long" | undefinedthe event to associate with it
defaultPropsU extends PageConstructor<AbstractFmcPage<V>, V> ? V : neverdefault props to pass in to the page
Returns​

void

Inherited from​

FmcScreen.addPageRoute


addPagingEvents()​

addPagingEvents(events): void

Defined in: sdk/fmc/FmcScreen.ts:371

Adds paging events bound the page slewing

Parameters​

ParameterTypeDescription
eventsFmcPagingEvents<WT21FmcEvents>the events to bind

Returns​

void

Inherited from​

FmcScreen.addPagingEvents


addPluginPageRoute()​

addPluginPageRoute<T>(route, page, routeEvent?, defaultTypedParameters?): void

Defined in: sdk/fmc/FmcScreen.ts:328

Type Parameters​

Type Parameter
T extends object

Parameters​

ParameterType
routestring
pagePageConstructor<WT21FmcPage<any> & AbstractFmcPage<T>, T>
routeEvent?BTN_A | BTN_B | BTN_C | BTN_D | BTN_E | BTN_F | BTN_G | BTN_H | BTN_I | BTN_J | BTN_K | BTN_L | BTN_M | BTN_N | BTN_O | BTN_P | BTN_Q | BTN_R | BTN_S | BTN_T | BTN_U | BTN_V | BTN_W | BTN_X | BTN_Y | BTN_Z | BTN_1 | BTN_2 | BTN_3 | BTN_4 | BTN_5 | BTN_6 | BTN_7 | BTN_8 | BTN_9 | BTN_0 | BTN_PLUSMINUS | BTN_SP | BTN_DIV | BTN_DOT | BTN_CLR_DEL | BTN_CLR_DEL_LONG | BTN_PLUS_MINUS | BTN_EXEC | PAGE_INDEX | PAGE_STATUS | PAGE_LEGS | PAGE_MCDUMENU | PAGE_DSPLMENU1 | PAGE_MFDADV | PAGE_MFDDATA | PAGE_DIR | PAGE_FPLN | PAGE_POSINIT | PAGE_PERF | PAGE_PERFINIT | PAGE_TAKEOFFREF | PAGE_APPROACHREF1 | PAGE_VNAVSETUP | PAGE_FUELMGMT1 | PAGE_FUELMGMT2 | PAGE_FUELMGMT3 | PAGE_FLTLOG | PAGE_DEPARRIDX | PAGE_DEPART | PAGE_ARRIVAL | PAGE_DATALINKMENU | PAGE_WEATHER | PAGE_TERMWX_REQ | PAGE_TERMWX_VIEW | PAGE_VORDMECTL | PAGE_GNSSCTL | PAGE_GNSS1POS | PAGE_FREQ | PAGE_FIX | PAGE_PROG | PAGE_MSG | PAGE_TUNE | PAGE_DEFAULTS | PAGE_USERSETTINGS | LSK_1 | LSK_2 | LSK_3 | LSK_4 | LSK_5 | LSK_6 | RSK_1 | RSK_2 | RSK_3 | RSK_4 | RSK_5 | RSK_6 | BTN_PREV | BTN_NEXT | "scratchpad_plus_minus" | "scratchpad_type" | "clear_del" | "clear_del_long"
defaultTypedParameters?T

Returns​

void

Inherit Doc​

Inherited from​

FmcScreen.addPluginPageRoute


attachPageExtension()​

attachPageExtension(pageClass, extensionCtor): void

Defined in: sdk/fmc/FmcScreen.ts:348

Attaches a FmcPageExtension to a specific page class

Parameters​

ParameterTypeDescription
pageClassPageConstructor<WT21FmcPage<any>>the page constructor (class) to attach the extension to
extensionCtor(...args) => AbstractFmcPageExtension<WT21FmcPage<any>>the extension class (will be instantiated whenever the page is created)

Returns​

void

Inherited from​

FmcScreen.attachPageExtension


clearScratchpad()​

clearScratchpad(): void

Defined in: sdk/fmc/FmcScreen.ts:269

Clears the scratchpad, if applicable

Returns​

void

Inherited from​

FmcScreen.clearScratchpad


editOutputTemplate()​

editOutputTemplate(rowIndex, output): void

Defined in: sdk/fmc/FmcScreen.ts:397

Edits part of the screen output

Parameters​

ParameterTypeDescription
rowIndexnumberthe row index to insert at
outputFmcOutputTemplatethe output to insert

Returns​

void

Throws​

if rowIndex is too high

Inherited from​

FmcScreen.editOutputTemplate


Navigates to a given route and displays the associated page, if available

Param​

the route

Param​

the parameters to pass to the page

Throws​

if a page class is passed in as the first argument and no associated route is found

Call Signature​

navigateTo(route, params?): void

Defined in: sdk/fmc/FmcScreen.ts:191

Navigates to a given route and displays the associated page, if available

Parameters​
ParameterTypeDescription
routestringthe route
params?Record<string, unknown>the parameters to pass to the page
Returns​

void

Inherited from​

FmcScreen.navigateTo

Call Signature​

navigateTo<U>(pageClass, props): void

Defined in: sdk/fmc/FmcScreen.ts:201

Navigates to a given route and displays the associated page, if available

Type Parameters​
Type Parameter
U extends PageConstructor<WT21FmcPage<any>, null>
Parameters​
ParameterTypeDescription
pageClassUthe page's class
propsU extends PageConstructor<AbstractFmcPage<V>, V> ? V : neverprops to pass in to the page
Returns​

void

Inherited from​

FmcScreen.navigateTo


onLineSelectKeyError()​

protected onLineSelectKeyError(error): void

Defined in: sdk/fmc/FmcScreen.ts:495

Called when an LSK error is thrown. Sets this.scratchpad.errorContents (if error is a string; otherwise throws) by default.

Parameters​

ParameterTypeDescription
erroranythe LSK error

Returns​

void

Inherited from​

FmcScreen.onLineSelectKeyError


onLineSelectKeyUnhandled()​

protected onLineSelectKeyUnhandled(selectKeyEvent): void

Defined in: sdk/fmc/FmcScreen.ts:485

Called when an LSK event is not handled by any code.

Parameters​

ParameterTypeDescription
selectKeyEventLineSelectKeyEventthe LSK event

Returns​

void

Throws​

the value of options.lskNotHandledThrowValue by default

Inherited from​

FmcScreen.onLineSelectKeyUnhandled


onPrefixedEvent()​

onPrefixedEvent<k>(event): Consumer<WT21FmcEvents[k]>

Defined in: sdk/fmc/FmcScreen.ts:385

Returns a consumer for an event prefixed for this particular screen.

Type Parameters​

Type Parameter
k extends BTN_A | BTN_B | BTN_C | BTN_D | BTN_E | BTN_F | BTN_G | BTN_H | BTN_I | BTN_J | BTN_K | BTN_L | BTN_M | BTN_N | BTN_O | BTN_P | BTN_Q | BTN_R | BTN_S | BTN_T | BTN_U | BTN_V | BTN_W | BTN_X | BTN_Y | BTN_Z | BTN_1 | BTN_2 | BTN_3 | BTN_4 | BTN_5 | BTN_6 | BTN_7 | BTN_8 | BTN_9 | BTN_0 | BTN_PLUSMINUS | BTN_SP | BTN_DIV | BTN_DOT | BTN_CLR_DEL | BTN_CLR_DEL_LONG | BTN_PLUS_MINUS | BTN_EXEC | PAGE_INDEX | PAGE_STATUS | PAGE_LEGS | PAGE_MCDUMENU | PAGE_DSPLMENU1 | PAGE_MFDADV | PAGE_MFDDATA | PAGE_DIR | PAGE_FPLN | PAGE_POSINIT | PAGE_PERF | PAGE_PERFINIT | PAGE_TAKEOFFREF | PAGE_APPROACHREF1 | PAGE_VNAVSETUP | PAGE_FUELMGMT1 | PAGE_FUELMGMT2 | PAGE_FUELMGMT3 | PAGE_FLTLOG | PAGE_DEPARRIDX | PAGE_DEPART | PAGE_ARRIVAL | PAGE_DATALINKMENU | PAGE_WEATHER | PAGE_TERMWX_REQ | PAGE_TERMWX_VIEW | PAGE_VORDMECTL | PAGE_GNSSCTL | PAGE_GNSS1POS | PAGE_FREQ | PAGE_FIX | PAGE_PROG | PAGE_MSG | PAGE_TUNE | PAGE_DEFAULTS | PAGE_USERSETTINGS | LSK_1 | LSK_2 | LSK_3 | LSK_4 | LSK_5 | LSK_6 | RSK_1 | RSK_2 | RSK_3 | RSK_4 | RSK_5 | RSK_6 | BTN_PREV | BTN_NEXT | "scratchpad_plus_minus" | "scratchpad_type" | "clear_del" | "clear_del_long"

Parameters​

ParameterTypeDescription
eventkThe event to subscribe to.

Returns​

Consumer<WT21FmcEvents[k]>

A consumer for an event prefixed for this particular screen.

Inherited from​

FmcScreen.onPrefixedEvent


processPluginPageAdditions()​

processPluginPageAdditions(): void

Defined in: sdk/fmc/FmcScreen.ts:143

Processes page replacement calls made by plugins. Must be called after plugins are initialized, and before stock routes are added.

Returns​

void

Inherited from​

FmcScreen.processPluginPageAdditions


processPluginPageReplacements()​

processPluginPageReplacements(): void

Defined in: sdk/fmc/FmcScreen.ts:152

Processes page replacement calls made by plugins. Must be called after plugins are initialized, and after stock routes are added.

Returns​

void

Inherited from​

FmcScreen.processPluginPageReplacements


replacePageRoute()​

replacePageRoute<T>(route, page, routeEvent?, defaultTypedParameters?): void

Defined in: sdk/fmc/FmcScreen.ts:338

Adds a page route to the FMC screen. Has priority over routes added by the avionics.

Type Parameters​

Type Parameter
T extends object

Parameters​

ParameterTypeDescription
routestringthe route
pagePageConstructor<WT21FmcPage<any> & AbstractFmcPage<T>, T>the page constructor
routeEvent?BTN_A | BTN_B | BTN_C | BTN_D | BTN_E | BTN_F | BTN_G | BTN_H | BTN_I | BTN_J | BTN_K | BTN_L | BTN_M | BTN_N | BTN_O | BTN_P | BTN_Q | BTN_R | BTN_S | BTN_T | BTN_U | BTN_V | BTN_W | BTN_X | BTN_Y | BTN_Z | BTN_1 | BTN_2 | BTN_3 | BTN_4 | BTN_5 | BTN_6 | BTN_7 | BTN_8 | BTN_9 | BTN_0 | BTN_PLUSMINUS | BTN_SP | BTN_DIV | BTN_DOT | BTN_CLR_DEL | BTN_CLR_DEL_LONG | BTN_PLUS_MINUS | BTN_EXEC | PAGE_INDEX | PAGE_STATUS | PAGE_LEGS | PAGE_MCDUMENU | PAGE_DSPLMENU1 | PAGE_MFDADV | PAGE_MFDDATA | PAGE_DIR | PAGE_FPLN | PAGE_POSINIT | PAGE_PERF | PAGE_PERFINIT | PAGE_TAKEOFFREF | PAGE_APPROACHREF1 | PAGE_VNAVSETUP | PAGE_FUELMGMT1 | PAGE_FUELMGMT2 | PAGE_FUELMGMT3 | PAGE_FLTLOG | PAGE_DEPARRIDX | PAGE_DEPART | PAGE_ARRIVAL | PAGE_DATALINKMENU | PAGE_WEATHER | PAGE_TERMWX_REQ | PAGE_TERMWX_VIEW | PAGE_VORDMECTL | PAGE_GNSSCTL | PAGE_GNSS1POS | PAGE_FREQ | PAGE_FIX | PAGE_PROG | PAGE_MSG | PAGE_TUNE | PAGE_DEFAULTS | PAGE_USERSETTINGS | LSK_1 | LSK_2 | LSK_3 | LSK_4 | LSK_5 | LSK_6 | RSK_1 | RSK_2 | RSK_3 | RSK_4 | RSK_5 | RSK_6 | BTN_PREV | BTN_NEXT | "scratchpad_plus_minus" | "scratchpad_type" | "clear_del" | "clear_del_long"the FMC event, optionally, to bind the route to
defaultTypedParameters?T-

Returns​

void

Inherited from​

FmcScreen.replacePageRoute


selectPilotWaypointEntry()​

selectPilotWaypointEntry(entries): Promise<PilotWaypointResult | null>

Defined in: workingtitle-instruments-wt21/instruments/html_ui/Pages/VCockpit/Instruments/WT21v2/FMC/WT21FmcScreen.ts:156

Runs the flow to select a pilot waypoint entry based on the given entries.

Parameters​

ParameterTypeDescription
entriesPilotWaypointResult[]The entries to choose from.

Returns​

Promise<PilotWaypointResult | null>

The selected entry or null.


selectWptFromIdent()​

selectWptFromIdent<F>(ident, referencePos, filter?): Promise<SearchTypeMap[F] | null>

Defined in: workingtitle-instruments-wt21/instruments/html_ui/Pages/VCockpit/Instruments/WT21v2/FMC/WT21FmcScreen.ts:114

Runs the flow to select a facility based on the given ident.

Type Parameters​

Type ParameterDefault type
F extends All | Airport | Intersection | Vor | Ndb | User | Visual | AllExceptVisualAll

Parameters​

ParameterTypeDescription
identstringThe ident to search for.
referencePosGeoPointInterfaceThe reference position to use to sort multiple matching facilities. Facilities are sorted in order of increasing distance from the reference position.
filter?Fthe filter to apply to the facility search.

Returns​

Promise<SearchTypeMap[F] | null>

The selected facility or null.