Package swervelib.telemetry
Class Alert
java.lang.Object
swervelib.telemetry.Alert
Class for managing persistent alerts to be sent over NetworkTables.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumRepresents an alert's level of urgency.private static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate doubleprivate static Map<String,Alert.SendableAlerts> private Stringprivate final Alert.AlertType -
Constructor Summary
ConstructorsConstructorDescriptionAlert(String group, String text, Alert.AlertType type) Creates a new Alert.Alert(String text, Alert.AlertType type) Creates a new Alert in the default group - "Alerts". -
Method Summary
-
Field Details
-
groups
-
type
-
active
private boolean active -
activeStartTime
private double activeStartTime -
text
-
-
Constructor Details
-
Alert
Creates a new Alert in the default group - "Alerts". If this is the first to be instantiated, the appropriate entries will be added to NetworkTables.- Parameters:
text- Text to be displayed when the alert is active.type- Alert level specifying urgency.
-
Alert
Creates a new Alert. If this is the first to be instantiated in its group, the appropriate entries will be added to NetworkTables.- Parameters:
group- Group identifier, also used as NetworkTables titletext- Text to be displayed when the alert is active.type- Alert level specifying urgency.
-
-
Method Details
-
set
public void set(boolean active) Sets whether the alert should currently be displayed. When activated, the alert text will also be sent to the console. -
setText
Updates current alert text.
-