Skip to main content

Class: G3000RadioUtils

A utility class for working with G3000 radios.

Constructors

constructor

new G3000RadioUtils(): G3000RadioUtils

Returns

G3000RadioUtils

Methods

changeRadioFrequency

changeRadioFrequency(radio, freqComponent, dir): Promise<void>

Increments or decrements a radio's frequency.

Parameters

NameTypeDescription
radioTunableRadioThe radio to adjust the frequency of.
freqComponent"WHOLE" | "FRACT"Whether to adjust the MHz (WHOLE) or kHz (FRACT) component of the frequency.
dir"INC" | "DEC"Whether to increment or decrement the frequency.

Returns

Promise<void>

A Promise which is fulfilled when the command to change the frequency has been sent.

Defined in

src/workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/Shared/Radio/G3000RadioUtils.ts:175


changeRadioVolume

changeRadioVolume(radio, dir): Promise<void>

Increments or decrements a radio's volume.

Parameters

NameTypeDescription
radioRadioThe radio to adjust the volume of.
dir"INC" | "DEC"Whether to increment or decrement the volume.

Returns

Promise<void>

A Promise which is fulfilled when the command to change the volume has been sent.

Defined in

src/workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/Shared/Radio/G3000RadioUtils.ts:149


getRadioType

getRadioType<R>(radio): G3000RadioTypeMapReverse[R]

Gets the type of a radio.

Type parameters

NameType
Rextends Radio

Parameters

NameTypeDescription
radioRA radio.

Returns

G3000RadioTypeMapReverse[R]

The type of the specified radio.

Throws

Error if radio is not a valid radio.

Defined in

src/workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/Shared/Radio/G3000RadioUtils.ts:14


getSimRadioType

getSimRadioType(radio): RadioType

Gets the sim radio type of a radio.

Parameters

NameTypeDescription
radioRadioA radio.

Returns

RadioType

The sim radio type of the specified radio.

Throws

Error if radio is not a valid radio.

Defined in

src/workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/Shared/Radio/G3000RadioUtils.ts:51


isRadioType

isRadioType<Type>(radio, type): radio is G3000RadioTypeMap[Type]

Checks if a radio is of a certain type.

Type parameters

NameType
Typeextends G3000RadioType

Parameters

NameTypeDescription
radioRadioThe radio to check.
typeTypeThe radio type to check.

Returns

radio is G3000RadioTypeMap[Type]

Whether the specified radio is of the specified type.

Throws

Error if radio is not a valid radio.

Defined in

src/workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/Shared/Radio/G3000RadioUtils.ts:41


radioNameFormatter

radioNameFormatter(adfCount, dmeCount): (radio: Radio) => string

Creates a function which formats radio names.

Parameters

NameTypeDescription
adfCountnumberThe number of ADF radios supported by the airplane.
dmeCountnumberThe number of DME radios supported by the airplane.

Returns

fn

A function which formats radio names.

▸ (radio): string

Parameters
NameType
radioRadio
Returns

string

Defined in

src/workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/Shared/Radio/G3000RadioUtils.ts:77


setComRadioReceiveState

setComRadioReceiveState(radio, receive): Promise<void>

Sets the receiving state of a COM radio.

Parameters

NameTypeDescription
radioComRadioThe radio to set the receiving state of.
receivebooleanThe receiving state to set.

Returns

Promise<void>

A Promise which is fulfilled when the command to set the receiving state has been sent.

Defined in

src/workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/Shared/Radio/G3000RadioUtils.ts:105


setComRadioTransmitting

setComRadioTransmitting(radio): Promise<void>

Sets the transmitting COM radio.

Parameters

NameTypeDescription
radio"COM1" | "COM2"The com radio to set as transmitting.

Returns

Promise<void>

A Promise which is fulfilled when the command to set the transmitting radio has been sent.

Defined in

src/workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/Shared/Radio/G3000RadioUtils.ts:95


setStandbyRadioFrequency

setStandbyRadioFrequency(radio, frequencyHz): Promise<void>

Sets a standby radio frequency.

Parameters

NameTypeDescription
radioTunableRadioThe radio for which to set the frequency.
frequencyHznumberThe frequency to set, in hertz.

Returns

Promise<void>

A Promise which is fulfilled when the command to set the frequency has been sent.

Defined in

src/workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/Shared/Radio/G3000RadioUtils.ts:115


swapRadioFrequency

swapRadioFrequency(radio): Promise<void>

Swaps active and standby radio frequencies.

Parameters

NameTypeDescription
radioTunableRadioThe radio whose frequencies are to be swapped.

Returns

Promise<void>

A Promise which is fulfilled when the command to swap frequencies has been sent.

Defined in

src/workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/Shared/Radio/G3000RadioUtils.ts:139