Class HALValue
java.lang.Object
org.wpilib.hardware.hal.HALValue
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic HALValuefromNative(int type, long value1, double value2) Build a HAL value from its native components.booleanGet the value as a boolean.doubleGet the value as a double.longgetLong()Get the value as a long.doubleGet the native double value.longGet the native long value.intgetType()Get the type of the value.static HALValuemakeBoolean(boolean value) Build a HAL boolean value.static HALValuemakeDouble(double value) Build a HAL double value.static HALValuemakeEnum(int value) Build a HAL enum value.static HALValuemakeInt(int value) Build a HAL integer value.static HALValuemakeLong(long value) Build a HAL long value.static HALValueBuild a HAL unassigned value.
-
Field Details
-
kUnassigned
-
kBoolean
-
kDouble
-
kEnum
-
kInt
-
kLong
-
-
Method Details
-
getType
-
getBoolean
Get the value as a boolean. Does not perform type checking.- Returns:
- value contents
-
getLong
Get the value as a long. Does not perform type checking.- Returns:
- value contents
-
getDouble
Get the value as a double. Does not perform type checking.- Returns:
- value contents
-
getNativeLong
Get the native long value. Does not perform type checking.- Returns:
- value contents
-
getNativeDouble
Get the native double value. Does not perform type checking.- Returns:
- value contents
-
makeBoolean
Build a HAL boolean value.- Parameters:
value- value- Returns:
- HAL value
-
makeEnum
-
makeInt
-
makeLong
-
makeDouble
Build a HAL double value.- Parameters:
value- value- Returns:
- HAL value
-
makeUnassigned
-
fromNative
Build a HAL value from its native components.- Parameters:
type- typevalue1- long value (all except double)value2- double value (for double only)- Returns:
- HAL value
-