SST  14.1.0
StructuralSimulationToolkit
SST::RealTimeManager Class Reference

Class to manage real-time events (signals and alarms) More...

#include <realtime.h>

Inheritance diagram for SST::RealTimeManager:
SST::Core::Serialization::serializable SST::Core::Serialization::serializable_base

Public Member Functions

 RealTimeManager (RankInfo num_ranks)
 
void registerSignal (RealTimeAction *action, int signum)
 Register actions.
 
void registerInterval (uint32_t interval, RealTimeAction *action)
 
void begin ()
 Begin monitoring signals.
 
void notifySignal ()
 Simulation run loop calls this when a signal has been received from the OS. More...
 
void performSignal (int signum)
 This is a request to execute the handler in response to a particular signal.
 
bool getSignals (int &sig_end, int &sig_usr, int &sig_alrm)
 
bool canInitiateCheckpoint ()
 Check whether or not any of the Actions registered with the manager can initiate a checkpoint.
 
void serialize_order (SST::Core::Serialization::serializer &ser) override
 
- Public Member Functions inherited from SST::Core::Serialization::serializable_base
virtual const char * cls_name () const =0
 
virtual uint32_t cls_id () const =0
 
virtual std::string serialization_name () const =0
 

Static Public Member Functions

static void installSignalHandlers ()
 
static void SimulationSigEndHandler (int sig)
 
static void SimulationSigUsrHandler (int sig)
 
static void SimulationSigAlrmHandler (int sig)
 

Data Fields

ImplementSerializable(SST::RealTimeManager) private bool can_checkpoint_ = false
 
std::map< int, RealTimeAction * > signal_actions_
 
int sig_alrm_
 
int sig_usr_
 
int sig_end_
 

Static Public Attributes

static sig_atomic_t sig_alrm_from_os_ = 0
 
static sig_atomic_t sig_usr_from_os_ = 0
 
static sig_atomic_t sig_end_from_os_ = 0
 
- Static Public Attributes inherited from SST::Core::Serialization::serializable
static constexpr uint32_t NullClsId = std::numeric_limits<uint32_t>::max()
 
- Static Public Attributes inherited from SST::Core::Serialization::serializable_base
static constexpr uint32_t NullClsId = std::numeric_limits<uint32_t>::max()
 

Additional Inherited Members

- Protected Types inherited from SST::Core::Serialization::serializable_base
enum  cxn_flag_t { ConstructorFlag }
 
- Static Protected Member Functions inherited from SST::Core::Serialization::serializable_base
static void serializable_abort (uint32_t line, const char *file, const char *func, const char *obj)
 

Detailed Description

Class to manage real-time events (signals and alarms)

Member Function Documentation

◆ notifySignal()

void SST::RealTimeManager::notifySignal ( )

Simulation run loop calls this when a signal has been received from the OS.

One or more of the sig_X_from_os_ vars will be non-zero.

Serial - this executes the relevant signal handler(s) Parallel - this saves the signals until the next global sync


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