CTRE Phoenix 6 C++ 26.70.0-alpha-2
Loading...
Searching...
No Matches
ctre::phoenix6::AlertInfo Struct Referencefinal

Information about an alert. More...

#include <ctre/phoenix6/Alertable.hpp>

Static Public Member Functions

static AlertInfo Inactive ()
 Creates new information for an inactive alert.
template<std::convertible_to< std::optional< std::string > > S = std::optional<std::string>>
static AlertInfo Active (S &&text=std::nullopt)
 Creates new information for an active alert.

Public Attributes

bool isActive {}
 Whether the alert is active.
std::optional< std::string > text {}
 The new text to report in the alert, or nullopt to leave the text unchanged.

Detailed Description

Information about an alert.

Member Function Documentation

◆ Active()

template<std::convertible_to< std::optional< std::string > > S = std::optional<std::string>>
AlertInfo ctre::phoenix6::AlertInfo::Active ( S && text = std::nullopt)
inlinestatic

Creates new information for an active alert.

Template Parameters
SType of the text, convertible to std::optional<std::string>
Parameters
textNew text to report in the alert, or nullopt to leave the text unchanged
Returns
Information for an active alert

◆ Inactive()

AlertInfo ctre::phoenix6::AlertInfo::Inactive ( )
inlinestatic

Creates new information for an inactive alert.

Returns
Information for an inactive alert

Member Data Documentation

◆ isActive

bool ctre::phoenix6::AlertInfo::isActive {}

Whether the alert is active.

◆ text

std::optional<std::string> ctre::phoenix6::AlertInfo::text {}

The new text to report in the alert, or nullopt to leave the text unchanged.


The documentation for this struct was generated from the following file: