Class SimInt

public class SimInt
extends SimValue
A wrapper around a simulator int value handle.
  • Constructor Details

    • SimInt

      public SimInt​(int handle)
      Wraps a simulated value handle as returned by SimDeviceJNI.createSimValueInt().
      handle - simulated value handle
  • Method Details

    • get

      public int get()
      Gets the simulated value.
      The current value
    • set

      public void set​(int value)
      Sets the simulated value.
      value - the value to set
    • reset

      public void reset()
      Resets the simulated value to 0. Use this instead of Set(0) for resetting incremental sensor values like encoder counts or gyro accumulated angle to ensure correct behavior in a distributed system (e.g. WebSockets).