Package edu.wpi.first.hal
Class SimLong
java.lang.Object
edu.wpi.first.hal.SimValue
edu.wpi.first.hal.SimLong
public class SimLong extends SimValue
A wrapper around a simulator long value handle.
-
Field Summary
-
Constructor Summary
Constructors Constructor Description SimLong(int handle)
Wraps a simulated value handle as returned by SimDeviceJNI.createSimValueLong(). -
Method Summary
-
Constructor Details
-
SimLong
Wraps a simulated value handle as returned by SimDeviceJNI.createSimValueLong().- Parameters:
handle
- simulated value handle
-
-
Method Details
-
get
Gets the simulated value.- Returns:
- The current value
-
set
Sets the simulated value.- Parameters:
value
- the value to set
-
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).
-