Package com.mouseviator.fsuipc.helpers.avionics

# Class RadioHelper

java.lang.Object
com.mouseviator.fsuipc.helpers.avionics.RadioHelper

Direct Known Subclasses:
  `COM1Helper`, `COM2Helper`, `NavRadioHelper`

    public abstract class RadioHelper
    extends java.lang.Object

This class implements an abstract class with functionality common to COM and NAV radios. Classes implementing helpers for the COM/NAV radios should use it as a base for the common functionality, as to read/write frequencies...

Author:
  Murdock

- ## Field Summary

  Fields
  Modifier and Type | Field | Description
  --- | --- | ---
  `protected int` | `frequencyOffset` |
  `protected byte` | `frequencySwapValue` |
  `protected int` | `standbyFrequencyOffset` |

- ## Constructor Summary

  Constructors
  Constructor | Description
  --- | ---
  `RadioHelper()` |

- ## Method Summary

  Modifier and Type | Method | Description
  --- | --- | ---
  `FloatRequest` | `getFrequency()` | Returns data request to get/set active radio frequency.
  `FloatRequest` | `getStandByFrequency()` | Returns data request to get/set standby radio frequency.
  `IDataRequest<java.lang.Byte>` | `swapFrequencies()` | Returns request to swap active/standby radio frequency.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### frequencyOffset

    protected int frequencyOffset

  - ### standbyFrequencyOffset

    protected int standbyFrequencyOffset

  - ### frequencySwapValue

    protected byte frequencySwapValue

- ## Constructor Details

  - ### RadioHelper

    public RadioHelper()

- ## Method Details

  - ### getFrequency

    public FloatRequest getFrequency()
    Returns data request to get/set active radio frequency. Note that this request will not support 8.33 Khz range - so the resulting frequency will have 3 digits in units and 2 digits in decimals, like 123.45 frequency. This is important when writing the frequency! The data request will not check for the validity of the frequency value, it expects it will be like this. And if not, unexpected behavior may occur. You can get/set the frequency with this data request. Note that the returned object will be READ request by default. To make it write request, call its `IDataRequest.setType(com.mouseviator.fsuipc.datarequest.IDataRequest.RequestType)` method with parameter `IDataRequest.RequestType.WRITE`.
    Returns:
      Data request to get/set active radio frequency.

  - ### getStandByFrequency

    public FloatRequest getStandByFrequency()
    Returns data request to get/set standby radio frequency. Note that this request will not support 8.33 Khz range - so the resulting frequency will have 3 digits in units and 2 digits in decimals, like 123.45 frequency. This is important when writing the frequency! The data request will not check for the validity of the frequency value, it expects it will be like this. And if not, unexpected behavior may occur. You can get/set the frequency with this data request. Note that the returned object will be READ request by default. To make it write request, call its `IDataRequest.setType(com.mouseviator.fsuipc.datarequest.IDataRequest.RequestType)` method with parameter `IDataRequest.RequestType.WRITE`.
    Returns:
      Data request to get/set standby radio frequency.

  - ### swapFrequencies

    public IDataRequest<java.lang.Byte> swapFrequencies()
    Returns request to swap active/standby radio frequency. The request will be WRITE ONLY!
    Returns:
      Data request to toggle between active and standby frequency.