Class: G3000RadioUtils
A utility class for working with G3000 radios.
Constructors
constructor
• new G3000RadioUtils(): G3000RadioUtils
Returns
Methods
changeRadioFrequency
▸ changeRadioFrequency(radio
, freqComponent
, dir
): Promise
<void
>
Increments or decrements a radio's frequency.
Parameters
Name | Type | Description |
---|---|---|
radio | TunableRadio | The 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
Name | Type | Description |
---|---|---|
radio | Radio | The 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
Name | Type |
---|---|
R | extends Radio |
Parameters
Name | Type | Description |
---|---|---|
radio | R | A radio. |
Returns
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
Name | Type | Description |
---|---|---|
radio | Radio | A 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
Name | Type |
---|---|
Type | extends G3000RadioType |
Parameters
Name | Type | Description |
---|---|---|
radio | Radio | The radio to check. |
type | Type | The 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
Name | Type | Description |
---|---|---|
adfCount | number | The number of ADF radios supported by the airplane. |
dmeCount | number | The number of DME radios supported by the airplane. |
Returns
fn
A function which formats radio names.
▸ (radio
): string
Parameters
Name | Type |
---|---|
radio | Radio |
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
Name | Type | Description |
---|---|---|
radio | ComRadio | The radio to set the receiving state of. |
receive | boolean | The 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
Name | Type | Description |
---|---|---|
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
Name | Type | Description |
---|---|---|
radio | TunableRadio | The radio for which to set the frequency. |
frequencyHz | number | The 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
Name | Type | Description |
---|---|---|
radio | TunableRadio | The 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