Class: WT21FmcScreen
Defined in: workingtitle-instruments-wt21/instruments/html_ui/Pages/VCockpit/Instruments/WT21v2/FMC/WT21FmcScreen.ts:25
WT21 FMC screen
Extends
FmcScreen<WT21FmcPage<any>,WT21FmcEvents>
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
| Parameter | Type | Description |
|---|---|---|
bus | EventBus | the event bus |
baseInstrument | WT21_FMC_Instrument | the FMC base instrument |
fms | WT21Fms | the fms |
fmcIndex | 1 | 2 | the fmc index |
targetElement | HTMLDivElement | the cdu render target element |
Returns
WT21FmcScreen
Overrides
Properties
bus
protectedreadonlybus:EventBus
Defined in: sdk/fmc/FmcScreen.ts:125
the event bus
Inherited from
currentlyDisplayedPage
protectedcurrentlyDisplayedPage:WT21FmcPage<any> |null=null
Defined in: sdk/fmc/FmcScreen.ts:108
Inherited from
FmcScreen.currentlyDisplayedPage
fmcIndex
readonlyfmcIndex:1|2
Defined in: workingtitle-instruments-wt21/instruments/html_ui/Pages/VCockpit/Instruments/WT21v2/FMC/WT21FmcScreen.ts:59
the fmc index
options
readonlyoptions:Required<FmcScreenOptions>
Defined in: sdk/fmc/FmcScreen.ts:96
Inherited from
scratchpad
readonlyscratchpad:FmcScratchpad
Defined in: sdk/fmc/FmcScreen.ts:129
the scratchpad to use for this screen
Inherited from
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
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
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
Methods
acceptPageOutput()
protectedacceptPageOutput(output,template,atRowIndex):void
Defined in: sdk/fmc/FmcScreen.ts:425
Method called when a page is rendered to the screen. This can be overridden to intercept the page data and act upon it.
Parameters
| Parameter | Type | Description |
|---|---|---|
output | FmcOutputTemplate | the output template, displayed on the screen |
template | FmcRenderTemplate | the render template, rendered by the page |
atRowIndex | number | the row index at which the render occurred |
Returns
void
Inherited from
addLskEvents()
addLskEvents(
array):void
Defined in: sdk/fmc/FmcScreen.ts:354
Adds a list of LSK events bound to certain positions on the rendering grid
Parameters
Returns
void
Inherited from
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:276
Declares a route for a page class
Type Parameters
| Type Parameter |
|---|
T extends null |
Parameters
Returns
void
Inherited from
Call Signature
addPageRoute<
U>(route,page,routeEvent,defaultProps):void
Defined in: sdk/fmc/FmcScreen.ts:289
Declares a route for a page class
Type Parameters
| Type Parameter |
|---|
U extends PageConstructor<WT21FmcPage<any>, null> |
Parameters
Returns
void
Inherited from
addPagingEvents()
addPagingEvents(
events):void
Defined in: sdk/fmc/FmcScreen.ts:367
Adds paging events bound the page slewing
Parameters
| Parameter | Type | Description |
|---|---|---|
events | FmcPagingEvents<WT21FmcEvents> | the events to bind |
Returns
void
Inherited from
addPluginPageRoute()
addPluginPageRoute<
T>(route,page,routeEvent?,defaultTypedParameters?):void
Defined in: sdk/fmc/FmcScreen.ts:324
Type Parameters
| Type Parameter |
|---|
T extends object |
Parameters
Returns
void
Inherit Doc
Inherited from
attachPageExtension()
attachPageExtension(
pageClass,extensionCtor):void
Defined in: sdk/fmc/FmcScreen.ts:344
Attaches a FmcPageExtension to a specific page class
Parameters
| Parameter | Type | Description |
|---|---|---|
pageClass | PageConstructor<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
clearScratchpad()
clearScratchpad():
void
Defined in: sdk/fmc/FmcScreen.ts:265
Clears the scratchpad, if applicable
Returns
void
Inherited from
editOutputTemplate()
editOutputTemplate(
rowIndex,output):void
Defined in: sdk/fmc/FmcScreen.ts:393
Edits part of the screen output
Parameters
| Parameter | Type | Description |
|---|---|---|
rowIndex | number | the row index to insert at |
output | FmcOutputTemplate | the output to insert |
Returns
void
Throws
if rowIndex is too high
Inherited from
navigateTo()
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
| Parameter | Type | Description |
|---|---|---|
route | string | the route |
params? | Record<string, unknown> | the parameters to pass to the page |
Returns
void
Inherited from
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
| Parameter | Type | Description |
|---|---|---|
pageClass | U | the page's class |
props | U extends PageConstructor<AbstractFmcPage<V>, V> ? V : never | props to pass in to the page |
Returns
void
Inherited from
onLineSelectKeyError()
protectedonLineSelectKeyError(error):void
Defined in: sdk/fmc/FmcScreen.ts:491
Called when an LSK error is thrown. Sets this.scratchpad.errorContents (if error is a string; otherwise throws) by default.
Parameters
| Parameter | Type | Description |
|---|---|---|
error | any | the LSK error |
Returns
void
Inherited from
FmcScreen.onLineSelectKeyError
onLineSelectKeyUnhandled()
protectedonLineSelectKeyUnhandled(selectKeyEvent):void
Defined in: sdk/fmc/FmcScreen.ts:481
Called when an LSK event is not handled by any code.
Parameters
| Parameter | Type | Description |
|---|---|---|
selectKeyEvent | LineSelectKeyEvent | the 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:381
Returns a consumer for an event prefixed for this particular screen.
Type Parameters
Parameters
| Parameter | Type | Description |
|---|---|---|
event | k | The event to subscribe to. |
Returns
A consumer for an event prefixed for this particular screen.
Inherited from
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:334
Adds a page route to the FMC screen. Has priority over routes added by the avionics.
Type Parameters
| Type Parameter |
|---|
T extends object |
Parameters
Returns
void
Inherited from
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
| Parameter | Type | Description |
|---|---|---|
entries | PilotWaypointResult[] | 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 Parameter | Default type |
|---|---|
F extends All | Airport | Intersection | Vor | Ndb | User | Visual | AllExceptVisual | All |
Parameters
| Parameter | Type | Description |
|---|---|---|
ident | string | The ident to search for. |
referencePos | GeoPointInterface | The reference position to use to sort multiple matching facilities. Facilities are sorted in order of increasing distance from the reference position. |
filter? | F | the filter to apply to the facility search. |
Returns
Promise<SearchTypeMap[F] | null>
The selected facility or null.