|
| NetworkBooleanEvent (EventLoop *loop, nt::BooleanTopic topic) |
| Creates a new event with the given boolean topic determining whether it is active.
|
|
| NetworkBooleanEvent (EventLoop *loop, nt::BooleanSubscriber sub) |
| Creates a new event with the given boolean subscriber determining whether it is active.
|
|
| NetworkBooleanEvent (EventLoop *loop, std::shared_ptr< nt::NetworkTable > table, std::string_view topicName) |
| Creates a new event with the given boolean topic determining whether it is active.
|
|
| NetworkBooleanEvent (EventLoop *loop, std::string_view tableName, std::string_view topicName) |
| Creates a new event with the given boolean topic determining whether it is active.
|
|
| NetworkBooleanEvent (EventLoop *loop, nt::NetworkTableInstance inst, std::string_view tableName, std::string_view topicName) |
| Creates a new event with the given boolean topic determining whether it is active.
|
|
| BooleanEvent (EventLoop *loop, std::function< bool()> signal) |
| Creates a new event that is active when the condition is true.
|
|
bool | GetAsBoolean () const |
| Returns the state of this signal (high or low) as of the last loop poll.
|
|
| operator std::function< bool ()>() |
|
void | IfHigh (std::function< void()> action) |
| Bind an action to this event.
|
|
template<class T > |
T | CastTo (std::function< T(EventLoop *, std::function< bool()>)> ctor=[](EventLoop *loop, std::function< bool()> condition) { return T(loop, condition);}) |
| A method to "downcast" a BooleanEvent instance to a subclass (for example, to a command-based version of this class).
|
|
BooleanEvent | operator! () |
| Creates a new event that is active when this event is inactive.
|
|
BooleanEvent | operator&& (std::function< bool()> rhs) |
| Composes this event with another event, returning a new event that is active when both events are active.
|
|
BooleanEvent | operator|| (std::function< bool()> rhs) |
| Composes this event with another event, returning a new event that is active when either event is active.
|
|
BooleanEvent | Rising () |
| Creates a new event that triggers when this one changes from false to true.
|
|
BooleanEvent | Falling () |
| Creates a new event that triggers when this one changes from true to false.
|
|
BooleanEvent | Debounce (units::second_t debounceTime, frc::Debouncer::DebounceType type=frc::Debouncer::DebounceType::kRising) |
| Creates a new debounced event from this event - it will become active when this event has been active for longer than the specified period.
|
|
A Button that uses a NetworkTable boolean field.
This class is provided by the NewCommands VendorDep