106 bool Get()
const {
return m_active; }
120 std::string
GetText()
const {
return m_text; }
129 class PublishedAlert;
130 class SendableAlerts;
134 std::set<PublishedAlert>* m_activeAlerts;
135 bool m_active =
false;
136 uint64_t m_activeStartTime;
Persistent alert to be sent via NetworkTables.
Definition Alert.h:38
void SetText(std::string_view text)
Updates current alert text.
Alert & operator=(const Alert &)=default
Alert & operator=(Alert &&)
Alert(const Alert &)=default
bool Get() const
Gets whether the alert is active.
Definition Alert.h:106
void Set(bool active)
Sets whether the alert should currently be displayed.
AlertType
Represents an alert's level of urgency.
Definition Alert.h:43
@ kInfo
Low priority alert - displayed last on the dashboard with a green "i" symbol.
@ kError
High priority alert - displayed first on the dashboard with a red "X" symbol.
@ kWarning
Medium priority alert - displayed second on the dashboard with a yellow "!" symbol.
Alert(std::string_view group, std::string_view text, AlertType type)
Creates a new alert.
std::string GetText() const
Gets the current alert text.
Definition Alert.h:120
AlertType GetType() const
Get the type of this alert.
Definition Alert.h:126
Alert(std::string_view text, AlertType type)
Creates a new alert in the default group - "Alerts".
std::string format_as(Alert::AlertType type)