Package edu.wpi.first.hal
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 Summary
Fields Modifier and Type Field Description protected int
m_handle
-
Constructor Summary
Constructors Constructor Description SimValue(int handle)
Wraps a simulated value handle as returned by SimDeviceJNI.createSimValue(). -
Method Summary
Modifier and Type Method Description int
getNativeHandle()
Get the internal device handle.HALValue
getValue()
Gets the simulated value.void
setValue(HALValue value)
Sets the simulated value.
-
Field Details
-
Constructor Details
-
SimValue
Wraps a simulated value handle as returned by SimDeviceJNI.createSimValue().- Parameters:
handle
- simulated value handle
-
-
Method Details
-
getNativeHandle
Get the internal device handle.- Returns:
- internal handle
-
getValue
Gets the simulated value.- Returns:
- The current value
-
setValue
Sets the simulated value.- Parameters:
value
- the value to set
-