Access to a programmable timer that this reaction may schedule events with. More...
#include <xronos/sdk/reaction.hh>
Public Member Functions | |
ProgrammableTimerEffect (ProgrammableTimer< T > &timer, ReactionContext context) | |
Construct a new ProgrammableTimerEffect object. | |
void | schedule (const ImmutableValuePtr< T > &value_ptr, Duration delay=Duration::zero()) |
Schedule a future timer event. | |
void | schedule (MutableValuePtr< T > &&value_ptr, Duration delay=Duration::zero()) |
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()) |
template<class U> requires (!std::is_same_v<U, void> && std::is_same_v<T, U>) | |
void | schedule (U &&value, Duration delay=Duration::zero()) |
void | schedule (Duration delay=Duration::zero()) |
Schedule a future timer event. | |
Access to a programmable timer that this reaction may schedule events with.
T | The type of value carried by the programmable timer. |
xronos::sdk::BaseReaction::ProgrammableTimerEffect< T >::ProgrammableTimerEffect | ( | ProgrammableTimer< T > & | timer, |
ReactionContext | context ) |
Construct a new ProgrammableTimerEffect
object.
timer | A programmable timer of the containing reactor, which can be obtained using the Reaction::self method. |
context | The current reaction's initialization context, which can be obtained using the BaseReaction::context method. |
void xronos::sdk::BaseReaction::ProgrammableTimerEffect< T >::schedule | ( | const ImmutableValuePtr< T > & | value_ptr, |
Duration | delay = Duration::zero() ) |
Schedule a future timer event.
value_ptr | The value to be associated with the event occurrence. |
delay | The time to wait until the new event is processed. |
void xronos::sdk::BaseReaction::ProgrammableTimerEffect< T >::schedule | ( | MutableValuePtr< T > && | value_ptr, |
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 xronos::sdk::BaseReaction::ProgrammableTimerEffect< T >::schedule | ( | const 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.
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.
void xronos::sdk::BaseReaction::ProgrammableTimerEffect< T >::schedule | ( | Duration | delay = Duration::zero() | ) |
Schedule a future timer event.
delay | The time to wait until the new event is processed. |