This is the implementation of the PhysiologyEngine interface for the biogears engines. More...

#include <BioGearsEngine.h>

Inheritance diagram for biogears::BioGearsEngine:

Public Member Functions

 BioGearsEngine (Logger *logger)
 
 BioGearsEngine (const std::string &logFileName)
 
 BioGearsEngine (const char *logFileName)
 
 BioGearsEngine (Logger *logger, const std::string &working_dir)
 
 BioGearsEngine (Logger *logger, const char *working_dir)
 
 BioGearsEngine (const std::string &, const std::string &working_dir)
 
 BioGearsEngine (const char *, const char *)
 
virtual ~BioGearsEngine () override
 
virtual bool LoadState (const char *file, const SEScalarTime *simTime=nullptr) override
 Reset engine and set it to the state in the provided file. You may provided a Simulation Time to be used if desired. It will be reflected in the GetSimulationTime method. Return value indicates engine was able to load provided state file.

Engine will be in a cleared state if this method fails.

More...
 
virtual bool LoadState (const std::string &file, const SEScalarTime *simTime=nullptr) override
 
virtual bool LoadState (const CDM::PhysiologyEngineStateData &state, const SEScalarTime *simTime=nullptr) override
 Reset engine and set it to the state in the provided file. You may provided a Simulation Time to be used if desired. It will be reflected in the GetSimulationTime method. Return value indicates engine was able to load provided state file.

Engine will be in a cleared state if this method fails.

More...
 
virtual std::unique_ptr< CDM::PhysiologyEngineStateDataSaveState (const char *file) override
 Save the current state of the engine. State will be written to a file if provided. State object will be returned.

Engine will be in a cleared state if this method fails.

More...
 
virtual std::unique_ptr< CDM::PhysiologyEngineStateDataSaveState (const std::string &file="") override
 
virtual LoggerGetLogger () override
 

Retrieve the Logger associated with this engine

More...
 
virtual PhysiologyEngineTrackGetEngineTrack () override
 

Retrieve the PhysiologyEngineTrack associated with tracking data from this engine to a file

More...
 
virtual bool InitializeEngine (const char *patientFile, const std::vector< const SECondition * > *conditions=nullptr, const PhysiologyEngineConfiguration *config=nullptr) override
 locates the xml patient file and reads in the values. More...
 
virtual bool InitializeEngine (const std::string &patientFile, const std::vector< const SECondition * > *conditions=nullptr, const PhysiologyEngineConfiguration *config=nullptr) override
 
virtual bool InitializeEngine (const SEPatient &patient, const std::vector< const SECondition * > *conditions=nullptr, const PhysiologyEngineConfiguration *config=nullptr) override
 This will create an engine that you can send instructions (patient,actions,conditions) to dynamically. The return value will indicate success failure of the creation of the engine. Some combinations of patients and conditions may prevent the engine from stabilizing. More...
 
virtual const PhysiologyEngineConfigurationGetConfiguration () override
 

returns the engine configuration.

More...
 
virtual double GetTimeStep (const TimeUnit &unit) override
 returns the engine time step that is used when advancing time. More...
 
virtual double GetSimulationTime (const TimeUnit &unit) override
 

returns the current time of the simulation.

More...
 
virtual void AdvanceModelTime (bool appendDataTrack=false) override
 executes one pass through the time loop of the engine at the fixed timestep More...
 
virtual void AdvanceModelTime (double time, const TimeUnit &unit=TimeUnit::s, bool appendDataTrack=false) override
 executes time loop of the engine beginning at the current time and running for the duration specified in the call at the fixed timestep More...
 
virtual bool ProcessAction (const SEAction &action) override
 Execute the provided action. true will be returned if the engine supports the action false will be returned if the engine does not support the action. More...
 
virtual SESubstanceManagerGetSubstanceManager () override
 Retrieves the associated substance manager. More...
 
virtual void SetEventHandler (SEEventHandler *handler) override
 

Add a callback object that will be called whenever a pateint or anesthesia machine event changes state

More...
 
virtual const SEPatientGetPatient () override
 Returns the patient object used by the engine. More...
 
virtual bool GetPatientAssessment (SEPatientAssessment &assessment) override
 Determines the assessment type and fills the data object with current data. More...
 
virtual const SEEnvironmentGetEnvironment () override
 Returns the environment object used by the engine. More...
 
virtual const SEBloodChemistrySystemGetBloodChemistrySystem () override
 Returns the current state of the Blood Chemistry System. More...
 
virtual const SECardiovascularSystemGetCardiovascularSystem () override
 Returns the current state of the Cardiovascular System. More...
 
virtual const SEDrugSystemGetDrugSystem () override
 Returns the current state of the drug system. More...
 
virtual const SEEndocrineSystemGetEndocrineSystem () override
 Returns the current state of the Endocrine System. More...
 
virtual const SEEnergySystemGetEnergySystem () override
 Returns the current state of the Energy System. More...
 
virtual const SEGastrointestinalSystemGetGastrointestinalSystem () override
 Returns the current state of the Gastrointestinal System. More...
 
virtual const SEHepaticSystemGetHepaticSystem () override
 Returns the current state of the Hepatic System. More...
 
virtual const SENervousSystemGetNervousSystem () override
 Returns the current state of the Nervous System. More...
 
virtual const SERenalSystemGetRenalSystem () override
 Returns the current state of the Renal System. More...
 
virtual const SERespiratorySystemGetRespiratorySystem () override
 Returns the current state of the Respiratory System. More...
 
virtual const SETissueSystemGetTissueSystem () override
 Returns the current state of the tissue system. More...
 
virtual const SEAnesthesiaMachineGetAnesthesiaMachine () override
 Returns the current state of the Anesthesia machine. More...
 
virtual const SEElectroCardioGramGetElectroCardioGram () override
 Returns the current state of the Electrocardiogram machine. More...
 
virtual const SEInhalerGetInhaler () override
 Returns the current state of the Inhaler. More...
 
virtual const SECompartmentManagerGetCompartments () override
 Retrieves the engine compartments, providing such data as: flows, pressure, volume as well as substance volumes and volume fractions. More...
 
virtual Tree< const char * > GetDataRequestGraph () const override
 

Return a Graph of DataRequest that the current PhysiologyEngine Supports.

More...
 
virtual bool IsAutoTracking () const override
 Returns the current state of the AutoTracking Property. True implies for each time advance All DataRequest will be tracked if the current simulation time is a multiple of

GetDataRequestManager().GetSamplesPerSecond();

More...
 
virtual void SetAutoTrackFlag (bool flag) override
 

Return Allows the toggling of the SetAutoTrackFlag to On/Off

More...
 
virtual bool IsTrackingStabilization () const override
 Returns the current state of the Track Stabilization Property. When true the user expects the Results file to include engine values during stabilization routines

When false the user expects the 0 time index to be the first engine readout post stabilization.

More...
 
virtual void SetTrackStabilizationFlag (bool flag) override
 This value will be overridden if TrackingStabilizationCriteria is loaded by any means After it is set. But can be used as a shortcut to modify m_Config->GetStabilizationCriteria()->TrackStabilization()

After stabiliztion criteira has been loaded.

More...
 
- Public Member Functions inherited from biogears::PhysiologyEngine
virtual ~PhysiologyEngine ()
 
- Public Member Functions inherited from biogears::BioGears
 BioGears (Logger *logger)
 
 BioGears (const std::string &logfileName)
 
 BioGears (Logger *logger, const std::string &working_dir)
 
 BioGears (const std::string &logfileName, const std::string &working_dir)
 
virtual ~BioGears ()
 
EngineState GetState ()
 
const EngineState GetState () const
 
DataTrackGetDataTrack ()
 
SaturationCalculatorGetSaturationCalculator ()
 
const SaturationCalculatorGetSaturationCalculator () const
 
DiffusionCalculatorGetDiffusionCalculator ()
 
const DiffusionCalculatorGetDiffusionCalculator () const
 
BioGearsSubstancesGetSubstances ()
 
const BioGearsSubstancesGetSubstances () const
 
SEPatientGetPatient ()
 
const SEPatientGetPatient () const
 
bool GetPatientAssessment (SEPatientAssessment &assessment)
 
SEBloodChemistrySystemGetBloodChemistry ()
 
SECardiovascularSystemGetCardiovascular ()
 
SEDrugSystemGetDrugs ()
 
SEEndocrineSystemGetEndocrine ()
 
SEEnergySystemGetEnergy ()
 
SEGastrointestinalSystemGetGastrointestinal ()
 
SEHepaticSystemGetHepatic ()
 
SENervousSystemGetNervous ()
 
SERenalSystemGetRenal ()
 
SERespiratorySystemGetRespiratory ()
 
SETissueSystemGetTissue ()
 
SEEnvironmentGetEnvironment ()
 
SEAnesthesiaMachineGetAnesthesiaMachine ()
 
SEElectroCardioGramGetECG ()
 
SEInhalerGetInhaler ()
 
SEActionManagerGetActions ()
 
SEConditionManagerGetConditions ()
 
BioGearsCircuitsGetCircuits ()
 
BioGearsCompartmentsGetCompartments ()
 
const BioGearsConfigurationGetConfiguration ()
 
const SEScalarTimeGetEngineTime ()
 
const SEScalarTimeGetSimulationTime ()
 
const SEScalarTimeGetTimeStep ()
 
CDM::enumBioGearsAirwayMode::value GetAirwayMode ()
 
CDM::enumOnOff::value GetIntubation ()
 
const SEBloodChemistrySystemGetBloodChemistry () const
 
const SECardiovascularSystemGetCardiovascular () const
 
const SEDrugSystemGetDrugs () const
 
const SEEndocrineSystemGetEndocrine () const
 
const SEEnergySystemGetEnergy () const
 
const SEGastrointestinalSystemGetGastrointestinal () const
 
const SEHepaticSystemGetHepatic () const
 
const SENervousSystemGetNervous () const
 
const SERenalSystemGetRenal () const
 
const SERespiratorySystemGetRespiratory () const
 
const SETissueSystemGetTissue () const
 
const SEEnvironmentGetEnvironment () const
 
const SEAnesthesiaMachineGetAnesthesiaMachine () const
 
const SEElectroCardioGramGetECG () const
 
const SEInhalerGetInhaler () const
 
const SEActionManagerGetActions () const
 
const SEConditionManagerGetConditions () const
 
const BioGearsCircuitsGetCircuits () const
 
const BioGearsCompartmentsGetCompartments () const
 
const BioGearsConfigurationGetConfiguration () const
 
const SEScalarTimeGetEngineTime () const
 
const SEScalarTimeGetSimulationTime () const
 
const SEScalarTimeGetTimeStep () const
 
const CDM::enumBioGearsAirwayMode::value GetAirwayMode () const
 
const CDM::enumOnOff::value GetIntubation () const
 
bool CreateCircuitsAndCompartments ()
 
void SetIntubation (CDM::enumOnOff::value s)
 
void SetAirwayMode (CDM::enumBioGearsAirwayMode::value mode)
 
LoggerGetLogger () const
 

Protected Member Functions

virtual bool IsReady ()
 
virtual bool InitializeEngine (const std::vector< const SECondition * > *conditions=nullptr, const PhysiologyEngineConfiguration *config=nullptr)
 
- Protected Member Functions inherited from biogears::BioGears
void SetupCardiovascular ()
 
void SetupCerebral ()
 
void SetupRenal ()
 
void SetupTissue ()
 
void SetupGastrointestinal ()
 
void SetupRespiratory ()
 
void SetupAnesthesiaMachine ()
 
void SetupInhaler ()
 
void SetupMechanicalVentilator ()
 
void SetupExternalTemperature ()
 
void SetupInternalTemperature ()
 
bool Initialize (const PhysiologyEngineConfiguration *config)
 
bool SetupPatient ()
 
void SetUp ()
 
virtual void AtSteadyState (EngineState state)
 
void PreProcess ()
 
void Process ()
 
void PostProcess ()
 
void ForwardFatal (const std::string &msg, const std::string &origin)
 

Protected Attributes

double m_timeStep_remainder = 0.0
 
double m_timeSinceLastDataTrack = 0.0
 
SEEventHandlerm_EventHandler
 
PhysiologyEngineTrack m_EngineTrack
 
std::stringstream m_ss
 
bool m_isAutoTracking = true
 
bool m_areTrackingStabilization = false
 
- Protected Attributes inherited from biogears::BioGears
EngineState m_State
 
DataTrackm_DataTrack
 
std::unique_ptr< SEScalarTimem_CurrentTime
 
std::unique_ptr< SEScalarTimem_SimulationTime
 
CDM::enumBioGearsAirwayMode::value m_AirwayMode
 
CDM::enumOnOff::value m_Intubation
 
std::unique_ptr< BioGearsConfigurationm_Config
 
std::unique_ptr< SaturationCalculatorm_SaturationCalculator
 
std::unique_ptr< DiffusionCalculatorm_DiffusionCalculator
 
std::unique_ptr< BioGearsSubstancesm_Substances
 
std::unique_ptr< SEActionManagerm_Actions
 
std::unique_ptr< SEConditionManagerm_Conditions
 
std::unique_ptr< BioGearsCircuitsm_Circuits
 
std::unique_ptr< BioGearsCompartmentsm_Compartments
 
std::unique_ptr< Environmentm_Environment
 
std::unique_ptr< BloodChemistrym_BloodChemistrySystem
 
std::unique_ptr< Cardiovascularm_CardiovascularSystem
 
std::unique_ptr< Endocrinem_EndocrineSystem
 
std::unique_ptr< Energym_EnergySystem
 
std::unique_ptr< Gastrointestinalm_GastrointestinalSystem
 
std::unique_ptr< Hepaticm_HepaticSystem
 
std::unique_ptr< Nervousm_NervousSystem
 
std::unique_ptr< Renalm_RenalSystem
 
std::unique_ptr< Respiratorym_RespiratorySystem
 
std::unique_ptr< Drugsm_DrugSystem
 
std::unique_ptr< Tissuem_TissueSystem
 
std::unique_ptr< ECGm_ECG
 
std::unique_ptr< AnesthesiaMachinem_AnesthesiaMachine
 
std::unique_ptr< Inhalerm_Inhaler
 
std::unique_ptr< SEPatientm_Patient
 
bool m_logger_self_managed
 
Loggerm_Logger
 

Detailed Description

This is the implementation of the PhysiologyEngine interface for the biogears engines.

It contains the necessary execution calls, patient customization calls, insult and intervention calls as well as assessment calls for obtaining the results. During engine execution a log files is generated containing information, warning and error data.

Constructor & Destructor Documentation

biogears::BioGearsEngine::BioGearsEngine ( Logger logger)
biogears::BioGearsEngine::BioGearsEngine ( const std::string &  logFileName)
biogears::BioGearsEngine::BioGearsEngine ( const char *  logFileName)
biogears::BioGearsEngine::BioGearsEngine ( Logger logger,
const std::string &  working_dir 
)
biogears::BioGearsEngine::BioGearsEngine ( Logger logger,
const char *  working_dir 
)
biogears::BioGearsEngine::BioGearsEngine ( const std::string &  logFileName,
const std::string &  working_dir 
)
biogears::BioGearsEngine::BioGearsEngine ( const char *  logFileName,
const char *  working_dir 
)
biogears::BioGearsEngine::~BioGearsEngine ( )
overridevirtual

Member Function Documentation

void biogears::BioGearsEngine::AdvanceModelTime ( bool  appendDataTrack = false)
overridevirtual

executes one pass through the time loop of the engine at the fixed timestep


Events, errors, and warning as are logged to file not errors are returned through the API at this time.


Implements biogears::PhysiologyEngine.

void biogears::BioGearsEngine::AdvanceModelTime ( double  time,
const TimeUnit unit = TimeUnit::s,
bool  appendDataTrack = false 
)
overridevirtual

executes time loop of the engine beginning at the current time and running for the duration specified in the call at the fixed timestep


Events, errors, and warning as are logged to file not errors are returned through the API at this time.


Implements biogears::PhysiologyEngine.

const SEAnesthesiaMachine * biogears::BioGearsEngine::GetAnesthesiaMachine ( )
overridevirtual

Returns the current state of the Anesthesia machine.

----------------------------------------------------------------------------------------------—

Implements biogears::PhysiologyEngine.

const SEBloodChemistrySystem * biogears::BioGearsEngine::GetBloodChemistrySystem ( )
overridevirtual

Returns the current state of the Blood Chemistry System.

----------------------------------------------------------------------------------------------—

Implements biogears::PhysiologyEngine.

const SECardiovascularSystem * biogears::BioGearsEngine::GetCardiovascularSystem ( )
overridevirtual

Returns the current state of the Cardiovascular System.

----------------------------------------------------------------------------------------------—

Implements biogears::PhysiologyEngine.

const SECompartmentManager & biogears::BioGearsEngine::GetCompartments ( )
overridevirtual

Retrieves the engine compartments, providing such data as: flows, pressure, volume as well as substance volumes and volume fractions.

----------------------------------------------------------------------------------------------—

Implements biogears::PhysiologyEngine.

const PhysiologyEngineConfiguration * biogears::BioGearsEngine::GetConfiguration ( )
overridevirtual

returns the engine configuration.


Implements biogears::PhysiologyEngine.

Tree< const char * > biogears::BioGearsEngine::GetDataRequestGraph ( ) const
overridevirtual

Return a Graph of DataRequest that the current PhysiologyEngine Supports.


Implements biogears::PhysiologyEngine.

const SEDrugSystem * biogears::BioGearsEngine::GetDrugSystem ( )
overridevirtual

Returns the current state of the drug system.

----------------------------------------------------------------------------------------------—

Implements biogears::PhysiologyEngine.

const SEElectroCardioGram * biogears::BioGearsEngine::GetElectroCardioGram ( )
overridevirtual

Returns the current state of the Electrocardiogram machine.

----------------------------------------------------------------------------------------------—

Implements biogears::PhysiologyEngine.

const SEEndocrineSystem * biogears::BioGearsEngine::GetEndocrineSystem ( )
overridevirtual

Returns the current state of the Endocrine System.

----------------------------------------------------------------------------------------------—

Implements biogears::PhysiologyEngine.

const SEEnergySystem * biogears::BioGearsEngine::GetEnergySystem ( )
overridevirtual

Returns the current state of the Energy System.

----------------------------------------------------------------------------------------------—

Implements biogears::PhysiologyEngine.

PhysiologyEngineTrack * biogears::BioGearsEngine::GetEngineTrack ( )
overridevirtual

Retrieve the PhysiologyEngineTrack associated with tracking data from this engine to a file


Implements biogears::PhysiologyEngine.

const SEEnvironment * biogears::BioGearsEngine::GetEnvironment ( )
overridevirtual

Returns the environment object used by the engine.

----------------------------------------------------------------------------------------------—

Implements biogears::PhysiologyEngine.

const SEGastrointestinalSystem * biogears::BioGearsEngine::GetGastrointestinalSystem ( )
overridevirtual

Returns the current state of the Gastrointestinal System.

----------------------------------------------------------------------------------------------—

Implements biogears::PhysiologyEngine.

const SEHepaticSystem * biogears::BioGearsEngine::GetHepaticSystem ( )
overridevirtual

Returns the current state of the Hepatic System.

----------------------------------------------------------------------------------------------—

Implements biogears::PhysiologyEngine.

const SEInhaler * biogears::BioGearsEngine::GetInhaler ( )
overridevirtual

Returns the current state of the Inhaler.

----------------------------------------------------------------------------------------------—

Implements biogears::PhysiologyEngine.

Logger * biogears::BioGearsEngine::GetLogger ( )
overridevirtual

Retrieve the Logger associated with this engine


Implements biogears::PhysiologyEngine.

const SENervousSystem * biogears::BioGearsEngine::GetNervousSystem ( )
overridevirtual

Returns the current state of the Nervous System.

----------------------------------------------------------------------------------------------—

Implements biogears::PhysiologyEngine.

const SEPatient & biogears::BioGearsEngine::GetPatient ( )
overridevirtual

Returns the patient object used by the engine.

----------------------------------------------------------------------------------------------—

Implements biogears::PhysiologyEngine.

bool biogears::BioGearsEngine::GetPatientAssessment ( SEPatientAssessment assessment)
overridevirtual

Determines the assessment type and fills the data object with current data.


Assessments can be queried at any point in the calculation and as many times are desired.


Implements biogears::PhysiologyEngine.

const SERenalSystem * biogears::BioGearsEngine::GetRenalSystem ( )
overridevirtual

Returns the current state of the Renal System.

----------------------------------------------------------------------------------------------—

Implements biogears::PhysiologyEngine.

const SERespiratorySystem * biogears::BioGearsEngine::GetRespiratorySystem ( )
overridevirtual

Returns the current state of the Respiratory System.

----------------------------------------------------------------------------------------------—

Implements biogears::PhysiologyEngine.

double biogears::BioGearsEngine::GetSimulationTime ( const TimeUnit unit)
overridevirtual

returns the current time of the simulation.


Implements biogears::PhysiologyEngine.

SESubstanceManager & biogears::BioGearsEngine::GetSubstanceManager ( )
overridevirtual

Retrieves the associated substance manager.

----------------------------------------------------------------------------------------------—

Implements biogears::PhysiologyEngine.

double biogears::BioGearsEngine::GetTimeStep ( const TimeUnit unit)
overridevirtual

returns the engine time step that is used when advancing time.

----------------------------------------------------------------------------------------------—

Implements biogears::PhysiologyEngine.

const SETissueSystem * biogears::BioGearsEngine::GetTissueSystem ( )
overridevirtual

Returns the current state of the tissue system.

----------------------------------------------------------------------------------------------—

Implements biogears::PhysiologyEngine.

bool biogears::BioGearsEngine::InitializeEngine ( const char *  patientFile,
const std::vector< const SECondition * > *  conditions = nullptr,
const PhysiologyEngineConfiguration config = nullptr 
)
overridevirtual

locates the xml patient file and reads in the values.


This will create an engine that you can send instructions (patient,actions,conditions) to dynamically. The return value will indicate success failure of the creation of the engine. Some combinations of patients and conditions may prevent the engine from stabilizing


Implements biogears::PhysiologyEngine.

bool biogears::BioGearsEngine::InitializeEngine ( const std::string &  patientFile,
const std::vector< const SECondition * > *  conditions = nullptr,
const PhysiologyEngineConfiguration config = nullptr 
)
overridevirtual
bool biogears::BioGearsEngine::InitializeEngine ( const SEPatient patient,
const std::vector< const SECondition * > *  conditions = nullptr,
const PhysiologyEngineConfiguration config = nullptr 
)
overridevirtual

This will create an engine that you can send instructions (patient,actions,conditions) to dynamically. The return value will indicate success failure of the creation of the engine. Some combinations of patients and conditions may prevent the engine from stabilizing.

----------------------------------------------------------------------------------------------—

Implements biogears::PhysiologyEngine.

bool biogears::BioGearsEngine::InitializeEngine ( const std::vector< const SECondition * > *  conditions = nullptr,
const PhysiologyEngineConfiguration config = nullptr 
)
protectedvirtual

Run this again to clear out any bumps from systems resetting baselines in the last AtSteadyState call I would rather run Feedback stablization again, but... This does not work for a few patients, they will not stay stable (???)

bool biogears::BioGearsEngine::IsAutoTracking ( ) const
overridevirtual

Returns the current state of the AutoTracking Property. True implies for each time advance All DataRequest will be tracked if the current simulation time is a multiple of

GetDataRequestManager().GetSamplesPerSecond();


Implements biogears::PhysiologyEngine.

bool biogears::BioGearsEngine::IsReady ( )
protectedvirtual
bool biogears::BioGearsEngine::IsTrackingStabilization ( ) const
overridevirtual

Returns the current state of the Track Stabilization Property. When true the user expects the Results file to include engine values during stabilization routines

When false the user expects the 0 time index to be the first engine readout post stabilization.


Implements biogears::PhysiologyEngine.

bool biogears::BioGearsEngine::LoadState ( const char *  file,
const SEScalarTime simTime = nullptr 
)
overridevirtual

Reset engine and set it to the state in the provided file. You may provided a Simulation Time to be used if desired. It will be reflected in the GetSimulationTime method. Return value indicates engine was able to load provided state file.

Engine will be in a cleared state if this method fails.


Implements biogears::PhysiologyEngine.

bool biogears::BioGearsEngine::LoadState ( const std::string &  file,
const SEScalarTime simTime = nullptr 
)
overridevirtual
bool biogears::BioGearsEngine::LoadState ( const CDM::PhysiologyEngineStateData state,
const SEScalarTime simTime = nullptr 
)
overridevirtual

Reset engine and set it to the state in the provided file. You may provided a Simulation Time to be used if desired. It will be reflected in the GetSimulationTime method. Return value indicates engine was able to load provided state file.

Engine will be in a cleared state if this method fails.


Patient //

Implements biogears::PhysiologyEngine.

bool biogears::BioGearsEngine::ProcessAction ( const SEAction action)
overridevirtual

Execute the provided action. true will be returned if the engine supports the action false will be returned if the engine does not support the action.

----------------------------------------------------------------------------------------------—

Implements biogears::PhysiologyEngine.

std::unique_ptr< CDM::PhysiologyEngineStateData > biogears::BioGearsEngine::SaveState ( const char *  file)
overridevirtual

Save the current state of the engine. State will be written to a file if provided. State object will be returned.

Engine will be in a cleared state if this method fails.


Implements biogears::PhysiologyEngine.

std::unique_ptr< CDM::PhysiologyEngineStateData > biogears::BioGearsEngine::SaveState ( const std::string &  file = "")
overridevirtual
void biogears::BioGearsEngine::SetAutoTrackFlag ( bool  flag)
overridevirtual

Return Allows the toggling of the SetAutoTrackFlag to On/Off


Implements biogears::PhysiologyEngine.

void biogears::BioGearsEngine::SetEventHandler ( SEEventHandler handler)
overridevirtual

Add a callback object that will be called whenever a pateint or anesthesia machine event changes state


Implements biogears::PhysiologyEngine.

void biogears::BioGearsEngine::SetTrackStabilizationFlag ( bool  flag)
overridevirtual

This value will be overridden if TrackingStabilizationCriteria is loaded by any means After it is set. But can be used as a shortcut to modify m_Config->GetStabilizationCriteria()->TrackStabilization()

After stabiliztion criteira has been loaded.


Implements biogears::PhysiologyEngine.

Member Data Documentation

bool biogears::BioGearsEngine::m_areTrackingStabilization = false
protected
PhysiologyEngineTrack biogears::BioGearsEngine::m_EngineTrack
protected
SEEventHandler* biogears::BioGearsEngine::m_EventHandler
protected
bool biogears::BioGearsEngine::m_isAutoTracking = true
protected
std::stringstream biogears::BioGearsEngine::m_ss
protected
double biogears::BioGearsEngine::m_timeSinceLastDataTrack = 0.0
protected
double biogears::BioGearsEngine::m_timeStep_remainder = 0.0
protected