Package com.marslib.faults
Class Alert
java.lang.Object
com.marslib.faults.Alert
Class for managing various alerts to be displayed on the driver station.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionAlert(String text, Alert.AlertType type) Alert(String group, String text, Alert.AlertType type) -
Method Summary
-
Constructor Details
-
Alert
-
Alert
-
-
Method Details
-
resetAll
public static void resetAll()Clears all alert groups. Required for JUnit test isolation to prevent state bleed. -
set
public void set(boolean active) Activates or deactivates this alert. When activated, the alert's timestamp is recorded and (for CRITICAL type) a critical fault is registered withMARSFaultManager.- Parameters:
active-trueto activate,falseto deactivate.
-
setText
Updates the displayed text of this alert. If the alert is currently active, the display is refreshed immediately.- Parameters:
text- The new alert message.
-
get
public boolean get()Returns whether this alert is currently active.- Returns:
trueif the alert is active.
-