Class: GarminAPStateManager
Defined in: src/garminsdk/autopilot/GarminAPStateManager.ts:9
A Garmin autopilot state manager.
Extends
Constructors
Constructor
new GarminAPStateManager(
bus,apConfig):GarminAPStateManager
Defined in: src/sdk/autopilot/managers/APStateManager.ts:96
Creates an instance of the APStateManager.
Parameters
| Parameter | Type | Description |
|---|---|---|
bus | EventBus | An instance of the event bus. |
apConfig | APConfig | This autopilot's configuration. |
Returns
GarminAPStateManager
Inherited from
Properties
_isFlightDirectorCoPilotOn
protected_isFlightDirectorCoPilotOn:Subject<boolean>
Defined in: src/sdk/autopilot/managers/APStateManager.ts:81
Inherited from
APStateManager._isFlightDirectorCoPilotOn
_isFlightDirectorOn
protected_isFlightDirectorOn:Subject<boolean>
Defined in: src/sdk/autopilot/managers/APStateManager.ts:78
Inherited from
APStateManager._isFlightDirectorOn
apConfig
protectedreadonlyapConfig:APConfig
Defined in: src/sdk/autopilot/managers/APStateManager.ts:96
This autopilot's configuration.
Inherited from
apListenerRegistered
protectedapListenerRegistered:boolean=false
Defined in: src/sdk/autopilot/managers/APStateManager.ts:40
Inherited from
APStateManager.apListenerRegistered
apMasterOn
apMasterOn:
Subject<boolean>
Defined in: src/sdk/autopilot/managers/APStateManager.ts:76
Inherited from
approachPressed
approachPressed:
SubEventInterface<GarminAPStateManager,boolean|undefined>
Defined in: src/sdk/autopilot/managers/APStateManager.ts:73
Inherited from
APStateManager.approachPressed
bus
protectedreadonlybus:EventBus
Defined in: src/sdk/autopilot/managers/APStateManager.ts:96
An instance of the event bus.
Inherited from
flightDirectorCount
protectedreadonlyflightDirectorCount:1|2
Defined in: src/sdk/autopilot/managers/APStateManager.ts:44
Inherited from
APStateManager.flightDirectorCount
flightDirectorStateRegisteredSimVars
protectedreadonlyflightDirectorStateRegisteredSimVars:object
Defined in: src/sdk/autopilot/managers/APStateManager.ts:49
1
1:
RegisteredSimVar<boolean>
2
2:
RegisteredSimVar<boolean>
Inherited from
APStateManager.flightDirectorStateRegisteredSimVars
flightDirectorStateSimVars
protectedreadonlyflightDirectorStateSimVars:object
Defined in: src/sdk/autopilot/managers/APStateManager.ts:45
1
1:
string='AUTOPILOT FLIGHT DIRECTOR ACTIVE:1'
2
2:
string='AUTOPILOT FLIGHT DIRECTOR ACTIVE:2'
Inherited from
APStateManager.flightDirectorStateSimVars
isAnyFlightDirectorOn
readonlyisAnyFlightDirectorOn:MappedSubject<[boolean,boolean],boolean>
Defined in: src/sdk/autopilot/managers/APStateManager.ts:85
Whether any flight director is switched on.
Inherited from
APStateManager.isAnyFlightDirectorOn
isFlightDirectorCoPilotOn
isFlightDirectorCoPilotOn:
Subscribable<boolean>
Defined in: src/sdk/autopilot/managers/APStateManager.ts:82
Inherited from
APStateManager.isFlightDirectorCoPilotOn
isFlightDirectorOn
isFlightDirectorOn:
Subscribable<boolean>
Defined in: src/sdk/autopilot/managers/APStateManager.ts:79
Inherited from
APStateManager.isFlightDirectorOn
keyEventManager?
protectedoptionalkeyEventManager:KeyEventManager
Defined in: src/sdk/autopilot/managers/APStateManager.ts:42
Inherited from
APStateManager.keyEventManager
lateralPressed
lateralPressed:
SubEventInterface<GarminAPStateManager,APModePressEvent>
Defined in: src/sdk/autopilot/managers/APStateManager.ts:71
Inherited from
stateManagerInitialized
readonlystateManagerInitialized:Subscribable<boolean>
Defined in: src/sdk/autopilot/managers/APStateManager.ts:69
Whether this manager has been initialized.
Inherited from
APStateManager.stateManagerInitialized
verticalPressed
verticalPressed:
SubEventInterface<GarminAPStateManager,APModePressEvent>
Defined in: src/sdk/autopilot/managers/APStateManager.ts:72
Inherited from
APStateManager.verticalPressed
vnavPressed
vnavPressed:
SubEventInterface<GarminAPStateManager,boolean>
Defined in: src/sdk/autopilot/managers/APStateManager.ts:74
Inherited from
Methods
awaitApListenerRegistered()
protectedawaitApListenerRegistered():Promise<void>
Defined in: src/sdk/autopilot/managers/APStateManager.ts:137
Waits until the Coherent autopilot listener has been registered and this.onAPListenerRegistered() has finished
executing.
Returns
Promise<void>
A Promise which is fulfilled when the Coherent autopilot listener has been registered and
this.onAPListenerRegistered() has finished executing.
Inherited from
APStateManager.awaitApListenerRegistered
awaitKeyEventManagerAvailable()
protectedawaitKeyEventManagerAvailable():Promise<KeyEventManager>
Defined in: src/sdk/autopilot/managers/APStateManager.ts:145
Waits until the key event manager has been retrieved.
Returns
Promise<KeyEventManager>
A Promise which is fulfilled when the key event manager has been retrieved.
Inherited from
APStateManager.awaitKeyEventManagerAvailable
awaitKeyEventManagerReady()
protectedawaitKeyEventManagerReady():Promise<KeyEventManager>
Defined in: src/sdk/autopilot/managers/APStateManager.ts:154
Waits until the key event manager has been retrieved and this.onKeyEventManagerReady() has finished executing.
Returns
Promise<KeyEventManager>
A Promise which is fulfilled when the key event manager has been retrieved and
this.onKeyEventManagerReady() has finished executing.
Inherited from
APStateManager.awaitKeyEventManagerReady
handleKeyIntercepted()
protectedhandleKeyIntercepted(__namedParameters):void
Defined in: src/garminsdk/autopilot/GarminAPStateManager.ts:110
Handles an intercepted key event.
Parameters
| Parameter | Type | Description |
|---|---|---|
__namedParameters | KeyEventData | The event data. |
Returns
void
Overrides
APStateManager.handleKeyIntercepted
initFlightDirector()
protectedinitFlightDirector():void
Defined in: src/garminsdk/autopilot/GarminAPStateManager.ts:282
Initializes the flight director(s) to a default value.
Returns
void
Overrides
APStateManager.initFlightDirector
initialize()
initialize():
Promise<void>
Defined in: src/sdk/autopilot/managers/APStateManager.ts:213
Initializes this manager. If this manager has already been initialized, then this method does nothing.
Returns
Promise<void>
A Promise which will be fulfilled when the manager has been initialized. If the manager has already been initialized, then the Promise will be fulfilled immediately.
Inherited from
onAfterUpdate()
onAfterUpdate():
void
Defined in: src/sdk/autopilot/managers/APStateManager.ts:377
A method that is called on every autopilot update cycle after the autopilot directors are updated.
Returns
void
Inherited from
onAPListenerRegistered()
protectedonAPListenerRegistered():void
Defined in: src/garminsdk/autopilot/GarminAPStateManager.ts:15
A callback which is called when the Coherent autopilot listener has been registered.
Returns
void
Overrides
APStateManager.onAPListenerRegistered
onBeforeInitialize()
protectedonBeforeInitialize():void
Defined in: src/garminsdk/autopilot/GarminAPStateManager.ts:245
Method to override with steps to run before initialze method is run.
Returns
void
Overrides
APStateManager.onBeforeInitialize
onBeforeUpdate()
onBeforeUpdate():
void
Defined in: src/garminsdk/autopilot/GarminAPStateManager.ts:288
A method that is called on every autopilot update cycle before the autopilot directors are updated.
Returns
void
Overrides
onFlightDirectorSimStateChanged()
protectedonFlightDirectorSimStateChanged(index,state):void
Defined in: src/sdk/autopilot/managers/APStateManager.ts:362
Responds to when the sim state of a flight director changes.
Parameters
| Parameter | Type | Description |
|---|---|---|
index | 1 | 2 | The index of the flight director whose state changed. |
state | boolean | The flight director's new state. |
Returns
void
Inherited from
APStateManager.onFlightDirectorSimStateChanged
onInitialAutopilotModes()
protectedonInitialAutopilotModes(modeFlags):void
Defined in: src/garminsdk/autopilot/GarminAPStateManager.ts:250
A method that is called during initialization, after avionics managed mode has been enabled and
this.onKeyEventManagerReady() has finished executing, which allows this state manager to handle the initial
state of native sim autopilot modes.
Parameters
| Parameter | Type | Description |
|---|---|---|
modeFlags | number | Bitflags representing the state of all native sim autopilot modes. MSFSAPStates enumerates all native sim autopilot mode flags. |
Returns
void
Overrides
APStateManager.onInitialAutopilotModes
onKeyEventManagerReady()
protectedonKeyEventManagerReady(manager):void
Defined in: src/sdk/autopilot/managers/APStateManager.ts:183
A callback which is called when the key event manager has been retrieved.
Parameters
| Parameter | Type | Description |
|---|---|---|
manager | KeyEventManager | The key event manager. |
Returns
void
Inherited from
APStateManager.onKeyEventManagerReady
pendSimFlightDirectorState()
protectedpendSimFlightDirectorState(index,state):void
Defined in: src/sdk/autopilot/managers/APStateManager.ts:329
Pends a flight director state to push to the sim.
Parameters
| Parameter | Type | Description |
|---|---|---|
index | 1 | 2 | The index of the flight director for which to pend the state. |
state | boolean | The state to pend. |
Returns
void
Inherited from
APStateManager.pendSimFlightDirectorState
pushPendingFlightDirectorStateToSim()
protectedpushPendingFlightDirectorStateToSim(index):void
Defined in: src/sdk/autopilot/managers/APStateManager.ts:388
Pushes the pending state of a flight director to the sim.
Parameters
| Parameter | Type | Description |
|---|---|---|
index | 1 | 2 | The index of the flight director for which to push the pending state. |
Returns
void
Inherited from
APStateManager.pushPendingFlightDirectorStateToSim
reconcileFromSimModes()
protectedreconcileFromSimModes(modeFlags):void
Defined in: src/garminsdk/autopilot/GarminAPStateManager.ts:305
Reconciles the flight director mode state of this manager's parent autopilot with native sim autopilot modes.
Parameters
| Parameter | Type | Description |
|---|---|---|
modeFlags | number | Bitflags representing the state of native sim autopilot modes with which to reconcile the flight director mode state. |
Returns
void
sendApModeEvent()
protectedsendApModeEvent(type,mode?,set?):void
Defined in: src/sdk/autopilot/managers/APStateManager.ts:409
Sends AP Mode Events from the Intercept to the Autopilot.
Parameters
| Parameter | Type | Description |
|---|---|---|
type | APModeType | is the AP Mode Type for this event |
mode? | number | is the mode to set/unset. |
set? | boolean | is whether to actively set or unset this mode. |
Returns
void
Inherited from
APStateManager.sendApModeEvent
setFlightDirector()
setFlightDirector(
state,index?):void
Defined in: src/sdk/autopilot/managers/APStateManager.ts:299
Sets the flight director state.
Parameters
| Parameter | Type | Description |
|---|---|---|
state | boolean | The state to set: true = on, false = off. |
index? | 2 | 1 | The index of the flight director to set. If not defined, then the state of all supported flight directors will be set. If an index is defined and the specified flight director is not supported, then no action will be taken. This parameter is ignored if the autopilot is not configured with independent flight directors, in which case the state of all supported flight directors will always be set. |
Returns
void
Inherited from
APStateManager.setFlightDirector
setFlightDirectorState()
protectedsetFlightDirectorState(index,state):void
Defined in: src/sdk/autopilot/managers/APStateManager.ts:320
Sets the state of a flight director.
Parameters
| Parameter | Type | Description |
|---|---|---|
index | 1 | 2 | The index of the flight director to set. |
state | boolean | The state to set. |
Returns
void
Inherited from
APStateManager.setFlightDirectorState
setupFlightDirectorKeyIntercepts()
protectedsetupFlightDirectorKeyIntercepts(manager):void
Defined in: src/sdk/autopilot/managers/APStateManager.ts:192
Sets up key intercepts necessary for managing the sim's flight director state.
Parameters
| Parameter | Type | Description |
|---|---|---|
manager | KeyEventManager | The key event manager. |
Returns
void
Inherited from
APStateManager.setupFlightDirectorKeyIntercepts
setupKeyIntercepts()
protectedsetupKeyIntercepts(manager):void
Defined in: src/garminsdk/autopilot/GarminAPStateManager.ts:27
Sets up key intercepts for the simulation autopilot key events.
Parameters
| Parameter | Type | Description |
|---|---|---|
manager | KeyEventManager | The key event manager. |
Returns
void
Overrides
APStateManager.setupKeyIntercepts
toggleVnav()
protectedtoggleVnav():void
Defined in: src/sdk/autopilot/managers/APStateManager.ts:398
Toggles VNAV L Var value.
Returns
void
Inherited from
updateFlightDirectorStateFromSim()
protectedupdateFlightDirectorStateFromSim(index):void
Defined in: src/sdk/autopilot/managers/APStateManager.ts:347
Updates this manager's tracked flight director state from the sim.
Parameters
| Parameter | Type | Description |
|---|---|---|
index | 1 | 2 | The index of the flight director to update. |
Returns
void