Skip to main content

Class: WT21FmcScreen

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

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/WT21/FMC/WT21FmcScreen.ts:58

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<WT21FmcPage<any>, WT21FmcEvents>.constructor

Properties​

bus​

protected readonly bus: EventBus

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

the event bus

Inherited from​

FmcScreen.bus


currentlyDisplayedPage​

protected currentlyDisplayedPage: null | WT21FmcPage<any> = null

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

Inherited from​

FmcScreen.currentlyDisplayedPage


fmcIndex​

readonly fmcIndex: 1 | 2

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

the fmc index


options​

readonly options: Required<FmcScreenOptions>

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

Inherited from​

FmcScreen.options


scratchpad​

readonly scratchpad: FmcScratchpad

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

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:138

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:156

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:147

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:400

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:329

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_type" | "scratchpad_plus_minus" | "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:251

Declares a route for a page class

Type Parameters​
Type Parameter
T extends 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_type" | "scratchpad_plus_minus" | "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:264

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
routeEventundefined | 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_type" | "scratchpad_plus_minus" | "clear_del" | "clear_del_long"the 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:342

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:299

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_type" | "scratchpad_plus_minus" | "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:319

Parameters​

ParameterType
pageClassPageConstructor<WT21FmcPage<any>>
extensionCtor(...args) => AbstractFmcPageExtension<WT21FmcPage<any>>

Returns​

void

Inherit Doc​

Inherited from​

FmcScreen.attachPageExtension


clearScratchpad()​

clearScratchpad(): void

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

Clears the scratchpad, if applicable

Returns​

void

Inherited from​

FmcScreen.clearScratchpad


editOutputTemplate()​

editOutputTemplate(rowIndex, output): void

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

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:166

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:176

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:466

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:456

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:356

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_type" | "scratchpad_plus_minus" | "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:118

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:127

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:309

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_type" | "scratchpad_plus_minus" | "clear_del" | "clear_del_long"
defaultTypedParameters?T

Returns​

void

Inherit Doc​

Inherited from​

FmcScreen.replacePageRoute


selectWptFromIdent()​

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

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

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<null | SearchTypeMap[F]>

The selected facility or null.