#include <PulseEngineThunk.h>

Inherits PhysiologyEngineThunk.

Public Member Functions

 PulseEngineThunk (eModelType t, const std::string &dataDir="./")
 
virtual ~PulseEngineThunk ()
 
bool SetConfigurationOverride (std::string const &cfg, eSerializationFormat format)
 
- Public Member Functions inherited from PhysiologyEngineThunk
 PhysiologyEngineThunk (const std::string &dataDir="./")
 
virtual ~PhysiologyEngineThunk ()
 
virtual void Clear ()
 
bool SerializeFromFile (std::string const &filename, std::string const &data_requests, eSerializationFormat data_requests_format)
 
bool SerializeToFile (std::string const &filename)
 
bool SerializeFromString (std::string const &state, std::string const &data_requests, eSerializationFormat format)
 
std::string SerializeToString (eSerializationFormat format)
 
bool InitializeEngine (std::string const &patient_configuration, std::string const &data_requests, eSerializationFormat format)
 
std::string GetInitialPatient (eSerializationFormat format)
 
std::string GetConditions (eSerializationFormat format)
 
void LogToConsole (bool b)
 
void KeepLogMessages (bool keep)
 
void SetLogFilename (std::string const &logfile)
 
std::string PullLogMessages (eSerializationFormat format)
 
void SetLoggerForward (LoggerForward *lf)
 
void KeepEventChanges (bool keep)
 
std::string PullEvents (eSerializationFormat format)
 
std::string PullActiveEvents (eSerializationFormat format)
 
std::string GetPatientAssessment (int type, eSerializationFormat format)
 
void SetEventHandler (SEEventHandler *eh)
 
bool ProcessActions (std::string const &actions, eSerializationFormat format)
 
std::string PullActiveActions (eSerializationFormat format)
 
bool AdvanceTimeStep ()
 
double GetTimeStep (std::string const &unit)
 
size_t DataLength () const
 
double * PullDataPtr ()
 
void PullData (std::vector< double > &data)
 
void ForwardDebug (const std::string &msg) override
 
void ForwardInfo (const std::string &msg) override
 
void ForwardWarning (const std::string &msg) override
 
void ForwardError (const std::string &msg) override
 
void ForwardFatal (const std::string &msg) override
 
void HandleEvent (eEvent type, bool active, const SEScalarTime *time=nullptr) override
 
- Public Member Functions inherited from LoggerForward
virtual ~LoggerForward ()=default
 
virtual void ForwardDebug (std::string const &)
 
virtual void ForwardInfo (std::string const &)
 
virtual void ForwardWarning (std::string const &)
 
virtual void ForwardError (std::string const &)
 
virtual void ForwardFatal (std::string const &)
 
- Public Member Functions inherited from SEEventHandler
 SEEventHandler ()
 
virtual ~SEEventHandler ()
 
virtual void HandleEvent (eEvent e, bool active, const SEScalarTime *simTime=nullptr)=0
 

Static Public Member Functions

static bool ExecuteScenario (std::string const &sceExecOpts, eSerializationFormat format, Logger *logger=nullptr)
 

Protected Member Functions

virtual void AllocateEngine () override
 
- Protected Member Functions inherited from PhysiologyEngineThunk
virtual void AllocateEngine ()=0
 
virtual void SetupDefaultDataRequests ()
 
virtual bool SetupRequests ()
 

Protected Attributes

eModelType m_type
 
PulseConfigurationm_cfg
 
- Protected Attributes inherited from PhysiologyEngineThunk
std::unique_ptr< PhysiologyEnginem_engine
 
SESubstanceManagerm_subMgr = nullptr
 
bool m_keepLogMsgs = false
 
bool m_keepEventChanges = false
 
LoggerForwardm_ForwardLogs =nullptr
 
SEEventHandlerm_ForwardEvents =nullptr
 
LogMessages m_logMsgs
 
std::string m_dataDir
 
std::vector< const SEEventChange * > m_events
 
std::vector< const SEActiveEvent * > m_activeEvents
 
size_t m_length
 
double * m_requestedData = nullptr
 
std::vector< double > m_requestedValues
 

Constructor & Destructor Documentation

◆ PulseEngineThunk()

PulseEngineThunk::PulseEngineThunk ( eModelType  t,
const std::string &  dataDir = "./" 
)

◆ ~PulseEngineThunk()

PulseEngineThunk::~PulseEngineThunk ( )
virtual

Member Function Documentation

◆ AllocateEngine()

void PulseEngineThunk::AllocateEngine ( )
overrideprotectedvirtual

Implements PhysiologyEngineThunk.

◆ ExecuteScenario()

bool PulseEngineThunk::ExecuteScenario ( std::string const &  sceExecOpts,
eSerializationFormat  format,
Logger logger = nullptr 
)
static

◆ SetConfigurationOverride()

bool PulseEngineThunk::SetConfigurationOverride ( std::string const &  cfg,
eSerializationFormat  format 
)

Member Data Documentation

◆ m_cfg

PulseConfiguration* PulseEngineThunk::m_cfg
protected

◆ m_type

eModelType PulseEngineThunk::m_type
protected

Distributed under the Apache License, Version 2.0.

See accompanying NOTICE file for details.