Class SimValue

java.lang.Object
edu.wpi.first.hal.SimValue
Direct Known Subclasses:
SimBoolean, SimDouble, SimEnum, SimInt, SimLong

public class SimValue
extends Object
A wrapper around a simulator value handle.
  • Field Details

    • m_handle

      protected final int m_handle
  • Constructor Details

    • SimValue

      public SimValue​(int handle)
      Wraps a simulated value handle as returned by SimDeviceJNI.createSimValue().
      Parameters:
      handle - simulated value handle
  • Method Details

    • getNativeHandle

      public int getNativeHandle()
      Get the internal device handle.
      Returns:
      internal handle
    • getValue

      public HALValue getValue()
      Gets the simulated value.
      Returns:
      The current value
    • setValue

      public void setValue​(HALValue value)
      Sets the simulated value.
      Parameters:
      value - the value to set