The Sparta Modeling Framework
Loading...
Searching...
No Matches
UniqueEvent.hpp
Go to the documentation of this file.
1// <UniqueEvent.h> -*- C++ -*-
2
3
10#pragma once
11
12#include <set>
13#include <memory>
16
17namespace sparta
18{
19
71 template<SchedulingPhase sched_phase_T = SchedulingPhase::Tick>
73 {
74 public:
75 // The phase this Event was defined with
76 static constexpr SchedulingPhase event_phase = sched_phase_T;
77
78 // Bring in the Scheduleable's schedule methods
80
92 UniqueEvent(TreeNode * event_set,
93 const std::string & name,
94 const SpartaHandler & consumer_event_handler,
95 Clock::Cycle delay = 0) :
96 PhasedUniqueEvent(event_set, name, sched_phase_T, consumer_event_handler, delay)
97 { }
98
100 virtual ~UniqueEvent() = default;
101
104
106 UniqueEvent(const UniqueEvent &) = delete;
107
110 };
111
112}
113
114
File that defines the PhasedUniqueEvent class.
File that defines the Scheduleable class.
A type of Event that uniquely schedules itself on the schedule within a single time quantum....
void schedule()
Schedule this event with its pre-set delay using the pre-set Clock.
Node in a composite tree representing a sparta Tree item.
Definition TreeNode.hpp:205
A type of Event that uniquely schedules itself on the schedule within a single time quantum....
UniqueEvent(UniqueEvent &&)=delete
Disallow moves.
UniqueEvent & operator=(const UniqueEvent &)=delete
Disallow the assignment of the UniqueEvent.
UniqueEvent(TreeNode *event_set, const std::string &name, const SpartaHandler &consumer_event_handler, Clock::Cycle delay=0)
Create a UniqueEvent.
UniqueEvent(const UniqueEvent &)=delete
Disallow the copying of the UniqueEvent.
virtual ~UniqueEvent()=default
Uniquely destroy.
Macros for handling exponential backoff.
SchedulingPhase
The SchedulingPhases used for events (Tick, Update, PortUpdate, etc)