Package yams.telemetry
Class BooleanTelemetry
java.lang.Object
yams.telemetry.BooleanTelemetry
Boolean Telemetry for SmartMotorControllers.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionBooleanTelemetry(String keyString, boolean defaultVal, SmartMotorControllerTelemetry.BooleanTelemetryField field, boolean tunable) Setup boolean telemetry for a field. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close the telemetry field.voiddisable()Disable the telemetry.voiddisplay(boolean state) Display the telemetry.voidenable()Enable the telemetry.booleanget()Get the value.getField()Get the field.booleanset(boolean value) Set the value of the publisher, checking to see if the value is the same as the subscriber.voidsetDefaultValue(boolean value) Set the default value.voidsetupNetworkTable(NetworkTable dataTable) Setup network tables.voidsetupNetworkTables(NetworkTable dataTable, NetworkTable tuningTable) Setup network tables.booleantunable()Check to see if the value has changed.
-
Field Details
-
enabled
protected boolean enabledEnabled?
-
-
Constructor Details
-
BooleanTelemetry
public BooleanTelemetry(String keyString, boolean defaultVal, SmartMotorControllerTelemetry.BooleanTelemetryField field, boolean tunable) Setup boolean telemetry for a field.- Parameters:
keyString- Networks table key.defaultVal- Default value.field- Field representing.tunable- Tunable?
-
-
Method Details
-
setupNetworkTables
Setup network tables.- Parameters:
dataTable- Data tables.tuningTable- Tuning table.
-
setupNetworkTable
Setup network tables.- Parameters:
dataTable- Data tables.
-
set
public boolean set(boolean value) Set the value of the publisher, checking to see if the value is the same as the subscriber.- Parameters:
value- Value to set.- Returns:
- True if value was able to be set.
-
get
public boolean get()Get the value.- Returns:
- Value.
-
tunable
public boolean tunable()Check to see if the value has changed.- Returns:
- True if the value has changed.
-
enable
public void enable()Enable the telemetry. -
disable
public void disable()Disable the telemetry. -
display
public void display(boolean state) Display the telemetry.- Parameters:
state- Enable or disable.
-
getField
Get the field.- Returns:
- field.
-
setDefaultValue
public void setDefaultValue(boolean value) Set the default value.- Parameters:
value- Default value.
-
close
public void close()Close the telemetry field.
-