Skip to main content

Class: WT21FmcScreen

WT21 FMC screen

Hierarchy

Constructors

constructor

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

Ctor

Parameters

NameTypeDescription
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

Defined in

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

Properties

bus

Protected Readonly bus: EventBus

the event bus

Inherited from

FmcScreen.bus

Defined in

sdk/fmc/FmcScreen.ts:100


currentlyDisplayedPage

Protected currentlyDisplayedPage: null | WT21FmcPage<any> = null

Inherited from

FmcScreen.currentlyDisplayedPage

Defined in

sdk/fmc/FmcScreen.ts:83


fmcIndex

Readonly fmcIndex: 1 | 2

the fmc index

Defined in

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


options

Readonly options: Required<FmcScreenOptions>

Inherited from

FmcScreen.options

Defined in

sdk/fmc/FmcScreen.ts:71


scratchpad

Readonly scratchpad: FmcScratchpad

the scratchpad to use for this screen

Inherited from

FmcScreen.scratchpad

Defined in

sdk/fmc/FmcScreen.ts:104

Accessors

currentRoute

get currentRoute(): Subject<string>

Gets the current route

Returns

Subject<string>

a string subject

Inherited from

FmcScreen.currentRoute

Defined in

sdk/fmc/FmcScreen.ts:138


currentSubpageCount

get currentSubpageCount(): Subject<number>

Gets the current number of subpages for the current displayed page

Returns

Subject<number>

a number

Inherited from

FmcScreen.currentSubpageCount

Defined in

sdk/fmc/FmcScreen.ts:156


currentSubpageIndex

get currentSubpageIndex(): Subject<number>

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

Returns

Subject<number>

a number

Inherited from

FmcScreen.currentSubpageIndex

Defined in

sdk/fmc/FmcScreen.ts:147

Methods

acceptPageOutput

acceptPageOutput(output, template, atRowIndex): void

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

Parameters

NameTypeDescription
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

Defined in

sdk/fmc/FmcScreen.ts:400


addLskEvents

addLskEvents(array): void

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

Parameters

NameTypeDescription
array[event: 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", row: number, col: number][]the LSK events and their positions

Returns

void

Inherited from

FmcScreen.addLskEvents

Defined in

sdk/fmc/FmcScreen.ts:329


addPageRoute

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

Declares a route for a page class

Type parameters

NameType
Textends null

Parameters

NameTypeDescription
routestringthe route to set
pagePageConstructor<WT21FmcPage<any> & AbstractFmcPage<T>, null>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

Defined in

sdk/fmc/FmcScreen.ts:251

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

Declares a route for a page class

Type parameters

NameType
Uextends PageConstructor<WT21FmcPage<any>, null>

Parameters

NameTypeDescription
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

Defined in

sdk/fmc/FmcScreen.ts:264


addPagingEvents

addPagingEvents(events): void

Adds paging events bound the page slewing

Parameters

NameTypeDescription
eventsFmcPagingEvents<WT21FmcEvents>the events to bind

Returns

void

Inherited from

FmcScreen.addPagingEvents

Defined in

sdk/fmc/FmcScreen.ts:342


addPluginPageRoute

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

Type parameters

NameType
Textends object

Parameters

NameType
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

Defined in

sdk/fmc/FmcScreen.ts:299


attachPageExtension

attachPageExtension(pageClass, extensionCtor): void

Parameters

NameType
pageClassPageConstructor<WT21FmcPage<any>, null>
extensionCtor(...args: any[]) => AbstractFmcPageExtension<WT21FmcPage<any>>

Returns

void

Inherit Doc

Inherited from

FmcScreen.attachPageExtension

Defined in

sdk/fmc/FmcScreen.ts:319


clearScratchpad

clearScratchpad(): void

Clears the scratchpad, if applicable

Returns

void

Inherited from

FmcScreen.clearScratchpad

Defined in

sdk/fmc/FmcScreen.ts:240


editOutputTemplate

editOutputTemplate(rowIndex, output): void

Edits part of the screen output

Parameters

NameTypeDescription
rowIndexnumberthe row index to insert at
outputFmcOutputTemplatethe output to insert

Returns

void

Throws

if rowIndex is too high

Inherited from

FmcScreen.editOutputTemplate

Defined in

sdk/fmc/FmcScreen.ts:368


navigateTo(route, params?): void

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

Parameters

NameTypeDescription
routestringthe route
params?Record<string, unknown>the parameters to pass to the page

Returns

void

Inherited from

FmcScreen.navigateTo

Defined in

sdk/fmc/FmcScreen.ts:166

navigateTo<U>(pageClass, props): void

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

Type parameters

NameType
Uextends PageConstructor<WT21FmcPage<any>, null>

Parameters

NameTypeDescription
pageClassUthe page's class
propsU extends PageConstructor<AbstractFmcPage<V>, V> ? V : neverprops to pass in to the page

Returns

void

Inherited from

FmcScreen.navigateTo

Defined in

sdk/fmc/FmcScreen.ts:176


onLineSelectKeyError

onLineSelectKeyError(error): void

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

Parameters

NameTypeDescription
erroranythe LSK error

Returns

void

Inherited from

FmcScreen.onLineSelectKeyError

Defined in

sdk/fmc/FmcScreen.ts:466


onLineSelectKeyUnhandled

onLineSelectKeyUnhandled(selectKeyEvent): void

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

Parameters

NameTypeDescription
selectKeyEventLineSelectKeyEventthe LSK event

Returns

void

Throws

the value of options.lskNotHandledThrowValue by default

Inherited from

FmcScreen.onLineSelectKeyUnhandled

Defined in

sdk/fmc/FmcScreen.ts:456


onPrefixedEvent

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

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

Type parameters

NameType
kextends 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

NameTypeDescription
eventkThe event to subscribe to.

Returns

Consumer<WT21FmcEvents[k]>

A consumer for an event prefixed for this particular screen.

Inherited from

FmcScreen.onPrefixedEvent

Defined in

sdk/fmc/FmcScreen.ts:356


processPluginPageAdditions

processPluginPageAdditions(): void

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

Defined in

sdk/fmc/FmcScreen.ts:118


processPluginPageReplacements

processPluginPageReplacements(): void

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

Defined in

sdk/fmc/FmcScreen.ts:127


replacePageRoute

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

Type parameters

NameType
Textends object

Parameters

NameType
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

Defined in

sdk/fmc/FmcScreen.ts:309


selectWptFromIdent

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

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

Type parameters

NameType
Fextends All | Airport | Intersection | Vor | Ndb | User | Visual | AllExceptVisual = All

Parameters

NameTypeDescription
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.

Defined in

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