What’s New in the Pulse Physiology Engine 4.4.0
×

#include <PhysiologyEngineThunk.h>

Inherits LoggerForward.

Inherited by PulseEngineThunk.

Public Member Functions

 PhysiologyEngineThunk (const std::string &dataDir="./")
 
virtual ~PhysiologyEngineThunk ()
 
virtual void Clear ()
 
virtual bool IsValidPatient (std::string const &patient, 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)
 
std::string PullEventChanges (eSerializationFormat format)
 
std::string PullActiveEvents (eSerializationFormat format)
 
std::string GetPatientAssessment (int type, eSerializationFormat format)
 
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
 
- 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 &)
 

Protected Member Functions

virtual void AllocateEngine ()=0
 
virtual void SetupDefaultDataRequests (SEDataRequestManager &drMgr)
 

Protected Attributes

std::unique_ptr< PhysiologyEngine > m_Engine
 
SESubstanceManager * m_SubMgr = nullptr
 
std::string m_DataDir ="./"
 
std::vector< SEEventChange > m_EventChanges
 
std::vector< SEEventChange > m_ActiveEvents
 
bool m_KeepLogMsgs = false
 
LoggerForward * m_ForwardLogs =nullptr
 
LogMessages m_LogMsgs
 
size_t m_RequestedDataLength =0
 
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 ( )
virtual

Member Function Documentation

◆ AdvanceTimeStep()

bool PhysiologyEngineThunk::AdvanceTimeStep ( )

◆ AllocateEngine()

virtual void PhysiologyEngineThunk::AllocateEngine ( )
protectedpure virtual

Implemented in PulseEngineThunk.

◆ Clear()

void PhysiologyEngineThunk::Clear ( )
virtual

◆ DataLength()

size_t PhysiologyEngineThunk::DataLength ( ) const

◆ ForwardDebug()

void PhysiologyEngineThunk::ForwardDebug ( const std::string &  msg)
overridevirtual

Reimplemented from LoggerForward.

◆ ForwardError()

void PhysiologyEngineThunk::ForwardError ( const std::string &  msg)
overridevirtual

Reimplemented from LoggerForward.

◆ ForwardFatal()

void PhysiologyEngineThunk::ForwardFatal ( const std::string &  msg)
overridevirtual

Reimplemented from LoggerForward.

◆ ForwardInfo()

void PhysiologyEngineThunk::ForwardInfo ( const std::string &  msg)
overridevirtual

Reimplemented from LoggerForward.

◆ ForwardWarning()

void PhysiologyEngineThunk::ForwardWarning ( const std::string &  msg)
overridevirtual

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)

◆ InitializeEngine()

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

◆ IsValidPatient()

virtual bool PhysiologyEngineThunk::IsValidPatient ( std::string const &  patient,
eSerializationFormat  format 
)
pure virtual

Implemented in PulseEngineThunk.

◆ 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 ( )

◆ PullEventChanges()

std::string PhysiologyEngineThunk::PullEventChanges ( 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)

◆ SetLogFilename()

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

◆ SetLoggerForward()

void PhysiologyEngineThunk::SetLoggerForward ( LoggerForward *  lf)
inline

◆ SetupDefaultDataRequests()

void PhysiologyEngineThunk::SetupDefaultDataRequests ( SEDataRequestManager &  drMgr)
protectedvirtual

Member Data Documentation

◆ m_ActiveEvents

std::vector<SEEventChange> PhysiologyEngineThunk::m_ActiveEvents
protected

◆ m_DataDir

std::string PhysiologyEngineThunk::m_DataDir ="./"
protected

◆ m_Engine

std::unique_ptr<PhysiologyEngine> PhysiologyEngineThunk::m_Engine
protected

◆ m_EventChanges

std::vector<SEEventChange> PhysiologyEngineThunk::m_EventChanges
protected

◆ m_ForwardLogs

LoggerForward* PhysiologyEngineThunk::m_ForwardLogs =nullptr
protected

◆ m_KeepLogMsgs

bool PhysiologyEngineThunk::m_KeepLogMsgs = false
protected

◆ m_LogMsgs

LogMessages PhysiologyEngineThunk::m_LogMsgs
protected

◆ m_RequestedData

double* PhysiologyEngineThunk::m_RequestedData = nullptr
protected

◆ m_RequestedDataLength

size_t PhysiologyEngineThunk::m_RequestedDataLength =0
protected

◆ m_RequestedValues

std::vector<double> PhysiologyEngineThunk::m_RequestedValues
protected

◆ m_SubMgr

SESubstanceManager* PhysiologyEngineThunk::m_SubMgr = nullptr
protected

Distributed under the Apache License, Version 2.0.

See accompanying NOTICE file for details.