12#ifndef SST_CORE_ONESHOT_H
13#define SST_CORE_ONESHOT_H
15#include "sst/core/action.h"
16#include "sst/core/sst_types.h"
17#include "sst/core/ssthandler.h"
24#define _ONESHOT_DBG(fmt, args...) __DBG(DBG_ONESHOT, OneShot, fmt, ##args)
61 template <
typename classT,
typename dataT =
void>
63 [[deprecated(
"Handler has been deprecated. Please use Handler2 instead as it supports checkpointing.")]] =
84 template <
typename classT, auto funcT,
typename dataT =
void>
105 void print(
const std::string& header,
Output& out)
const override;
110 using HandlerList_t = std::vector<OneShot::HandlerBase*>;
116 using HandlerVectorMap_t = std::deque<std::pair<SimTime_t, HandlerList_t*>>;
126 void scheduleOneShot();
127 SimTime_t computeDeliveryTime();
129 TimeConverter* m_timeDelay;
130 HandlerVectorMap_t m_HandlerVectorMap;
A OneShot Event class.
Definition oneshot.h:36
SSTHandler2< void, void, classT, dataT, funcT > Handler2
Used to create checkpointable handlers for OneShot.
Definition oneshot.h:85
OneShot(TimeConverter *timeDelay, int priority=ONESHOTPRIORITY)
Create a new One Shot for a specified time that will callback the handler function.
Definition oneshot.cc:21
void registerHandler(OneShot::HandlerBase *handler)
Add a handler to be called on this OneShot Event.
Definition oneshot.cc:52
void print(const std::string &header, Output &out) const override
Print details about the OneShot.
Definition oneshot.cc:143
bool isScheduled()
Is OneShot scheduled.
Definition oneshot.h:99
void execute() override
Function which will be called when the time for this Activity comes to pass.
Definition oneshot.cc:105
SSTHandlerBaseNoArgs< void > HandlerBase
Base handler for OneShot callbacks.
Definition oneshot.h:41
Output object provides consistent method for outputting data to stdout, stderr and/or sst debug file.
Definition output.h:54
Base template for the class.
Definition ssthandler.h:1274
Event Handler class with user-data argument.
Definition ssthandler.h:1202
A class to convert between a component's view of time and the core's view of time.
Definition timeConverter.h:28