Allows a reaction to schedule future events using a ProgrammableTimer. More...
#include <xronos/sdk/reaction.hh>
Public Member Functions | |
| ProgrammableTimerEffect (ProgrammableTimer< T > &timer, const ReactionContext &context) | |
| Constructor. | |
| template<class U> requires (!std::is_same_v<U, void> && std::is_same_v<T, U>) | |
| void | schedule (const U &value, Duration delay=Duration::zero()) |
| Schedule a future event. | |
| void | schedule (const Value< T > &value, Duration delay=Duration::zero()) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| void | schedule (const ValueView< T > &view, Duration delay=Duration::zero()) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| void | schedule (Duration delay=Duration::zero()) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| template<class U> requires (!std::is_same_v<U, void> && std::is_same_v<T, U>) | |
| void | schedule (U &&value, Duration delay=Duration::zero()) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
Allows a reaction to schedule future events using a ProgrammableTimer.
| T | The value type associated with the programmable timer. |
| xronos::sdk::BaseReaction::ProgrammableTimerEffect< T >::ProgrammableTimerEffect | ( | ProgrammableTimer< T > & | timer, |
| const ReactionContext & | context ) |
Constructor.
| timer | The ProgrammableTimer for which the reaction should have write access. |
| context | The context of the reaction the effect is declared for. Can be obtained using context(). |
| void xronos::sdk::BaseReaction::ProgrammableTimerEffect< T >::schedule | ( | const U & | value, |
| Duration | delay = Duration::zero() ) |
Schedule a future event.
| value | The value to be associated with the future event occurrence. Copy constructs the value from the given lvalue reference. |
| delay | The time to wait until the new event is processed. |
| ValidationError | If called before execution has started. |
| void xronos::sdk::BaseReaction::ProgrammableTimerEffect< T >::schedule | ( | const Value< T > & | value, |
| Duration | delay = Duration::zero() ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Schedules the given value without copying it. The value must not be empty (asserted in debug builds); nothing is scheduled otherwise.
| void xronos::sdk::BaseReaction::ProgrammableTimerEffect< T >::schedule | ( | const ValueView< T > & | view, |
| Duration | delay = Duration::zero() ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Schedules the viewed value without copying it. The view must not be absent (asserted in debug builds); nothing is scheduled otherwise.
| void xronos::sdk::BaseReaction::ProgrammableTimerEffect< T >::schedule | ( | Duration | delay = Duration::zero() | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Schedule an event without an associated value. This is only available if T is void.
| void xronos::sdk::BaseReaction::ProgrammableTimerEffect< T >::schedule | ( | U && | value, |
| Duration | delay = Duration::zero() ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Move constructs the value using the given rvalue reference.