Skip to main content

Class: BasicAvionicsSystem<T>

A basic avionics system with a fixed initialization time and logic.

Type parameters

NameType
Textends Record<string, any>

Hierarchy

Implements

Constructors

constructor

new BasicAvionicsSystem<T>(index, bus, stateEvent): BasicAvionicsSystem<T>

Creates an instance of a BasicAvionicsSystem.

Type parameters

NameType
Textends Record<string, any>

Parameters

NameTypeDescription
indexnumberThe index of the system.
busEventBusThe instance of the event bus for the system to use.
stateEventkeyof StateEventsOnly<T>The key of the state update event to send on state update.

Returns

BasicAvionicsSystem<T>

Defined in

workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/Systems/BasicAvionicsSystem.ts:38

Properties

bus

Protected Readonly bus: EventBus

The instance of the event bus for the system to use.

Defined in

workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/Systems/BasicAvionicsSystem.ts:38


index

Readonly index: number

The index of the system.

Implementation of

G1000AvionicsSystem.index

Defined in

workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/Systems/BasicAvionicsSystem.ts:38


initializationTime

Protected initializationTime: number = 0

The time it takes in milliseconds for the system to initialize.

Defined in

workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/Systems/BasicAvionicsSystem.ts:24


initializationTimeout

Protected initializationTimeout: undefined | number

A timeout after which initialization will be complete.

Defined in

workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/Systems/BasicAvionicsSystem.ts:27


isPowered

Protected isPowered: undefined | boolean

Whether or not the system is powered.

Defined in

workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/Systems/BasicAvionicsSystem.ts:30


state

state: undefined | AvionicsSystemState

The state of the avionics system.

Implementation of

G1000AvionicsSystem.state

Defined in

workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/Systems/BasicAvionicsSystem.ts:21


stateEvent

Protected Readonly stateEvent: keyof StateEventsOnly<T>

The key of the state update event to send on state update.

Defined in

workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/Systems/BasicAvionicsSystem.ts:38

Methods

connectToPower

connectToPower(key): void

Connects the system to the first avionics power bus.

Parameters

NameTypeDescription
keykeyof BaseElectricalEvents | `elec_bus_main_v_${number}` | `elec_bus_main_a_${number}` | `elec_master_battery_${number}` | `elec_circuit_avionics_on_${number}` | `elec_bat_v_${number}` | `elec_bat_a_${number}` | `elec_ext_power_available_${number}` | `elec_ext_power_on_${number}` | `elec_apu_gen_active_${number}` | `elec_apu_gen_switch_${number}` | `elec_eng_gen_switch_${number}` | `elec_circuit_on_${number}` | `elec_circuit_switch_on_${number}`The electrical event key to connect to.

Returns

void

Defined in

workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/Systems/BasicAvionicsSystem.ts:47


onPowerChanged

onPowerChanged(isPowered): void

A callback called when the connected power state of the avionics system changes.

Parameters

NameTypeDescription
isPoweredbooleanWhether or not the system is powered.

Returns

void

Defined in

workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/Systems/BasicAvionicsSystem.ts:69


onUpdate

onUpdate(): void

A callback to call to update the state of the avionics system.

Returns

void

Implementation of

G1000AvionicsSystem.onUpdate

Defined in

workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/Systems/BasicAvionicsSystem.ts:41


setState

setState(state): void

Sets the state of the avionics system and publishes the change.

Parameters

NameTypeDescription
stateAvionicsSystemStateThe new state to change to.

Returns

void

Defined in

workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/Systems/BasicAvionicsSystem.ts:58