12 #ifndef SST_CORE_CLOCK_H 13 #define SST_CORE_CLOCK_H 15 #include "sst/core/action.h" 16 #include "sst/core/ssthandler.h" 22 #define _CLE_DBG(fmt, args...) __DBG(DBG_CLOCK, Clock, fmt, ##args) 68 template <
typename classT,
typename dataT =
void>
69 using Handler [[deprecated(
"Handler has been deprecated. Please use Handler2 as it supports checkpointing.")]] =
75 template <
typename classT, auto funcT,
typename dataT =
void>
104 std::string
toString()
const override;
108 using StaticHandlerMap_t = std::vector<Clock::HandlerBase*>;
115 void execute()
override;
117 Cycle_t currentCycle;
119 StaticHandlerMap_t staticHandlerMap;
131 const ComponentId_t comp_id;
132 const std::string comp_name;
133 const std::string comp_type;
147 #endif // SST_CORE_CLOCK_H An Action is a schedulable Activity which is not an Event.
Definition: action.h:26
This class is basically a wrapper for objects to declare the order in which their members should be s...
Definition: serializer.h:42
Base template for handlers which take a class defined argument.
Definition: ssthandler.h:109
Base template for the class.
Definition: ssthandler.h:1273
Handler class with user-data argument.
Definition: ssthandler.h:1136
A class to convert between a component's view of time and the core's view of time.
Definition: timeConverter.h:27
bool isHandlerRegistered(Clock::HandlerBase *handler)
Checks to see if a handler is registered with this clock.
Definition: clock.cc:68
Cycle_t getNextCycle()
Return the time of the next clock tick.
Definition: clock.cc:79
void updateCurrentCycle()
Update current cycle count - needed at simulation end if clock has run ahead of simulation end and to...
Definition: clock.cc:147
bool registerHandler(Clock::HandlerBase *handler)
Add a handler to be called on this clock's tick.
Definition: clock.cc:39
A Clock class.
Definition: clock.h:33
std::string toString() const override
Get a string represenation of the event.
Definition: clock.cc:155
bool unregisterHandler(Clock::HandlerBase *handler, bool &empty)
Remove a handler from the list of handlers to be called on the clock tick.
Definition: clock.cc:49
void schedule()
Activates this clock object, by inserting into the simulation's timeVortex for future execution...
Definition: clock.cc:121