The Pulse Team is excited to announce the Pulse Physiology Engine 4.1.0 release. Upgrade now to get the best in dynamic simulation.

#include <PhysiologyEngineThunk.h>

Inherits LoggerForward, and SEEventHandler.

Public Member Functions

 PhysiologyEngineThunk (const std::string &dataDir="./")
virtual ~PhysiologyEngineThunk ()
virtual bool ExecuteScenario (std::string const &sceExecOpts, eSerializationFormat format)=0
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)
virtual void ForwardDebug (const std::string &msg, const std::string &origin)
virtual void ForwardInfo (const std::string &msg, const std::string &origin)
virtual void ForwardWarning (const std::string &msg, const std::string &origin)
virtual void ForwardError (const std::string &msg, const std::string &origin)
virtual void ForwardFatal (const std::string &msg, const std::string &origin)
virtual void HandleEvent (eEvent type, bool active, const SEScalarTime *time=nullptr)
- Public Member Functions inherited from SEEventHandler
 SEEventHandler ()
virtual ~SEEventHandler ()

Protected Member Functions

virtual void AllocateEngine ()=0
virtual void SetupDefaultDataRequests ()

Protected Attributes

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

Detailed Description

An instance of an engine where the interface is define in stl and base data types. This interface is a thunk layer using serialized cdm objects to drive a Pulse engine.

Constructor & Destructor Documentation

◆ PhysiologyEngineThunk()

PhysiologyEngineThunk::PhysiologyEngineThunk ( const std::string &  dataDir = "./")

◆ ~PhysiologyEngineThunk()

PhysiologyEngineThunk::~PhysiologyEngineThunk ( )

Member Function Documentation

◆ AdvanceTimeStep()

bool PhysiologyEngineThunk::AdvanceTimeStep ( )

◆ AllocateEngine()

virtual void PhysiologyEngineThunk::AllocateEngine ( )
protectedpure virtual

◆ DataLength()

size_t PhysiologyEngineThunk::DataLength ( ) const

◆ ExecuteScenario()

virtual bool PhysiologyEngineThunk::ExecuteScenario ( std::string const &  sceExecOpts,
eSerializationFormat  format 
pure virtual

◆ ForwardDebug()

void PhysiologyEngineThunk::ForwardDebug ( const std::string &  msg,
const std::string &  origin 

Reimplemented from LoggerForward.

◆ ForwardError()

void PhysiologyEngineThunk::ForwardError ( const std::string &  msg,
const std::string &  origin 

Reimplemented from LoggerForward.

◆ ForwardFatal()

void PhysiologyEngineThunk::ForwardFatal ( const std::string &  msg,
const std::string &  origin 

Reimplemented from LoggerForward.

◆ ForwardInfo()

void PhysiologyEngineThunk::ForwardInfo ( const std::string &  msg,
const std::string &  origin 

Reimplemented from LoggerForward.

◆ ForwardWarning()

void PhysiologyEngineThunk::ForwardWarning ( const std::string &  msg,
const std::string &  origin 

Reimplemented from LoggerForward.

◆ GetConditions()

std::string PhysiologyEngineThunk::GetConditions ( eSerializationFormat  format)

◆ GetInitialPatient()

std::string PhysiologyEngineThunk::GetInitialPatient ( eSerializationFormat  format)

◆ GetPatientAssessment()

std::string PhysiologyEngineThunk::GetPatientAssessment ( int  type,
eSerializationFormat  format 

◆ GetTimeStep()

double PhysiologyEngineThunk::GetTimeStep ( std::string const &  unit)

◆ HandleEvent()

void PhysiologyEngineThunk::HandleEvent ( eEvent  type,
bool  active,
const SEScalarTime time = nullptr 

Implements SEEventHandler.

◆ InitializeEngine()

bool PhysiologyEngineThunk::InitializeEngine ( std::string const &  patient_configuration,
std::string const &  data_requests,
eSerializationFormat  format 

◆ KeepEventChanges()

void PhysiologyEngineThunk::KeepEventChanges ( bool  keep)

◆ KeepLogMessages()

void PhysiologyEngineThunk::KeepLogMessages ( bool  keep)

◆ LogToConsole()

void PhysiologyEngineThunk::LogToConsole ( bool  b)

◆ ProcessActions()

bool PhysiologyEngineThunk::ProcessActions ( std::string const &  actions,
eSerializationFormat  format 

◆ PullActiveActions()

std::string PhysiologyEngineThunk::PullActiveActions ( eSerializationFormat  format)

◆ PullActiveEvents()

std::string PhysiologyEngineThunk::PullActiveEvents ( eSerializationFormat  format)

◆ PullData()

void PhysiologyEngineThunk::PullData ( std::vector< double > &  data)

◆ PullDataPtr()

double * PhysiologyEngineThunk::PullDataPtr ( )

◆ PullEvents()

std::string PhysiologyEngineThunk::PullEvents ( eSerializationFormat  format)

◆ PullLogMessages()

std::string PhysiologyEngineThunk::PullLogMessages ( eSerializationFormat  format)

◆ SerializeFromFile()

bool PhysiologyEngineThunk::SerializeFromFile ( std::string const &  filename,
std::string const &  data_requests,
eSerializationFormat  data_requests_format 

◆ SerializeFromString()

bool PhysiologyEngineThunk::SerializeFromString ( std::string const &  state,
std::string const &  data_requests,
eSerializationFormat  format 

◆ SerializeToFile()

bool PhysiologyEngineThunk::SerializeToFile ( std::string const &  filename)

◆ SerializeToString()

std::string PhysiologyEngineThunk::SerializeToString ( eSerializationFormat  format)

◆ SetEventHandler()

void PhysiologyEngineThunk::SetEventHandler ( SEEventHandler eh)

◆ SetLogFilename()

void PhysiologyEngineThunk::SetLogFilename ( std::string const &  logfile)

◆ SetLoggerForward()

void PhysiologyEngineThunk::SetLoggerForward ( LoggerForward lf)

◆ SetupDefaultDataRequests()

void PhysiologyEngineThunk::SetupDefaultDataRequests ( )

Member Data Documentation

◆ m_activeEvents

std::vector<const SEActiveEvent*> PhysiologyEngineThunk::m_activeEvents

◆ m_dataDir

std::string PhysiologyEngineThunk::m_dataDir

◆ m_engine

std::unique_ptr<PhysiologyEngine> PhysiologyEngineThunk::m_engine

◆ m_events

std::vector<const SEEventChange*> PhysiologyEngineThunk::m_events

◆ m_ForwardEvents

SEEventHandler* PhysiologyEngineThunk::m_ForwardEvents =nullptr

◆ m_ForwardLogs

LoggerForward* PhysiologyEngineThunk::m_ForwardLogs =nullptr

◆ m_keepEventChanges

bool PhysiologyEngineThunk::m_keepEventChanges = false

◆ m_keepLogMsgs

bool PhysiologyEngineThunk::m_keepLogMsgs = false

◆ m_length

size_t PhysiologyEngineThunk::m_length

◆ m_logMsgs

LogMessages PhysiologyEngineThunk::m_logMsgs

◆ m_requestedData

double* PhysiologyEngineThunk::m_requestedData = nullptr

◆ m_requestedValues

std::vector<double> PhysiologyEngineThunk::m_requestedValues

◆ m_subMgr

SESubstanceManager* PhysiologyEngineThunk::m_subMgr = nullptr

Distributed under the Apache License, Version 2.0.

See accompanying NOTICE file for details.