Package edu.wpi.first.hal
Class SimValue
java.lang.Object
edu.wpi.first.hal.SimValue
- Direct Known Subclasses:
SimBoolean
,SimDouble
,SimEnum
,SimInt
,SimLong
A wrapper around a simulator value handle.
-
Field Summary
Modifier and TypeFieldDescriptionprotected final int
The native handle for this SimValue. -
Constructor Summary
ConstructorDescriptionSimValue
(int handle) Wraps a simulated value handle as returned by SimDeviceJNI.createSimValue(). -
Method Summary
Modifier and TypeMethodDescriptionint
Get the internal device handle.getValue()
Gets the simulated value.void
Sets the simulated value.
-
Field Details
-
m_handle
The native handle for this SimValue.
-
-
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
-