xronos-sdk 0.2.0
Xronos C++ SDK
 
Loading...
Searching...
No Matches
xronos::sdk::ProgrammableTimer< T > Class Template Reference

A reactor element for scheduling new events. More...

#include <xronos/sdk/programmable_timer.hh>

Inheritance diagram for xronos::sdk::ProgrammableTimer< T >:
[legend]

Public Member Functions

 ProgrammableTimer (std::string_view name, ReactorContext context)
 Construct a new ProgrammableTimer.
 
- Public Member Functions inherited from xronos::sdk::Element
auto name () const noexcept -> const std::string &
 The name of the current element.
 
auto fqn () const noexcept -> const std::string &
 The fully qualified name of the current element.
 
- Public Member Functions inherited from xronos::sdk::EventSource< T >
virtual ~EventSource ()=default
 Correct deletion of an instance of a derived class is permitted.
 

Detailed Description

template<class T>
class xronos::sdk::ProgrammableTimer< T >

A reactor element for scheduling new events.

Programmable timers may be used by reactions to schedule new events in the future. Events are not scheduled or read directly. Instead, reactions may declare a BaseReaction::ProgrammableTimerEffect to schedule new events, or a BaseReaction::Trigger or BaseReaction::Source to access the value associated with an active event.

Template Parameters
TThe type of values carried by the programmable timer.

Constructor & Destructor Documentation

◆ ProgrammableTimer()

template<class T>
xronos::sdk::ProgrammableTimer< T >::ProgrammableTimer ( std::string_view name,
ReactorContext context )

Construct a new ProgrammableTimer.

Parameters
nameThe name of the ProgrammableTimer.
contextThe context object obtained from the ProgrammableTimer's containing reactor.

The documentation for this class was generated from the following files: