Package com.mouseviator.fsuipc.helpers

# Class SimHelper

java.lang.Object
com.mouseviator.fsuipc.helpers.SimHelper

    public class SimHelper
    extends java.lang.Object

This class provides methods that return data requests to gather various info about flight simulator. The returned requests are usually modified to return user-friendly data type, even thought the underlying data type may be different.

Author:
  Mouseviator

- ## Constructor Summary

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

- ## Method Summary

  Modifier and Type | Method | Description
  --- | --- | ---
  `IDataRequest<java.lang.Float>` | `getFrameRate()` | Returns request to get simulator actual frame rate.
  `IDataRequest<java.lang.Integer>` | `getFSUIPCAssignedMemorySize()` | Returns request to get the size of the memory currently assigned to FSUIPC.
  `IDataRequest<java.lang.String>` | `getFSXP3DVersion()` | This returns data request that returns FSX/P3D version that FSUIPC is connected to.
  `IDataRequest<java.lang.Double>` | `getGroundAltitude​(boolean bFeet)` | Returns request to get ground altitude.
  `IntRequest` | `getLocalTime()` | This will return request to read simulator local time.
  `IDataRequest<java.lang.Short>` | `getPauseIndicator()` | Return request to read sim pause indicator.
  `IDataRequest<java.lang.Short>` | `getSeason()` | Return request to read simulator season.
  `IDataRequest<java.lang.String>` | `getSituationFile()` | This will return request to read current simulator situation file.
  `IDataRequest<java.lang.Short>` | `setPause​(boolean bPause)` | Return request to pause / un-pause the sim.WRITE ONLY!

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

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

- ## Constructor Details

  - ### SimHelper

    public SimHelper()

- ## Method Details

  - ### getSituationFile

    public IDataRequest<java.lang.String> getSituationFile()
    This will return request to read current simulator situation file. Result will be a string, full or relative path. READ ONLY!
    Returns:
      Data request to get currently loaded situation file.

  - ### getLocalTime

    public IntRequest getLocalTime()
    This will return request to read simulator local time. Result will be as seconds since midnight. When using setValue method on returned object, again, pass value that is seconds from midnight. 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 simulator local time.

  - ### getPauseIndicator

    public IDataRequest<java.lang.Short> getPauseIndicator()
    Return request to read sim pause indicator. READ ONLY!
    Returns:
      Data request to get whether the sim is paused or not. The request will return 0 if sim is not paused, 1 if sim is paused.

  - ### setPause

    public IDataRequest<java.lang.Short> setPause​(boolean bPause)
    Return request to pause / un-pause the sim.WRITE ONLY!
    Parameters:
      `bPause` - True to pause, false to un-pause.
    Returns:
      Data request to set - pause/un-pause the flight simulator.

  - ### getSeason

    public IDataRequest<java.lang.Short> getSeason()
    Return request to read simulator season. READ ONLY!
    Returns:
      Data request to get flight simulator season. Return 0 = Winter, 1 = Spring, 2 = Summer, 3 = Fall

  - ### getGroundAltitude

    public IDataRequest<java.lang.Double> getGroundAltitude​(boolean bFeet)
    Returns request to get ground altitude. READ ONLY!
    Parameters:
      `bFeet` - True to get result in feet, False for meters.
    Returns:
      Data request to get ground altitude.

  - ### getFSUIPCAssignedMemorySize

    public IDataRequest<java.lang.Integer> getFSUIPCAssignedMemorySize()
    Returns request to get the size of the memory currently assigned to FSUIPC. In bytes. READ ONLY!
    Returns:
      Data request to get the size of memory currently assigned to FSUIPC.

  - ### getFrameRate

    public IDataRequest<java.lang.Float> getFrameRate()
    Returns request to get simulator actual frame rate. READ ONLY!
    Returns:
      Data request to get the actual frame rate.

  - ### getFSXP3DVersion

    public IDataRequest<java.lang.String> getFSXP3DVersion()

    This returns data request that returns FSX/P3D version that FSUIPC is connected to. Internally, offset 0x3124 is used. The returned data request will return some string as following:

    - N/A - If returned returned value does not match any documented value.
    - FSX RTM, FSX SP1, FSX SP2 or FSX Acceleration - For respective version of FSX.
    - FSX (Unknown version) - For FSX, but again, returned value does not match any documented value.
    - FSX Steam Edition, build <build number> - For FSX Steam Edition.
    - Prepar3D <version number> - For respective Prepar3D version.
    - Microsoft Flight Simulator (2020) - For Microsoft Flight Simulator , first released at 2020.
    Returns:
      Data request that returns string with FSX/P3D version.