SEAnesthesiaMachine Class Reference

#include <SEAnesthesiaMachine.h>

Inherits SESystem.

Inherited by AnesthesiaMachine.

Public Member Functions

 SEAnesthesiaMachine (SESubstanceManager &substances)
 
virtual ~SEAnesthesiaMachine ()
 
virtual void Clear ()
 
bool SerializeToString (std::string &output, SerializationFormat m) const
 
bool SerializeToFile (const std::string &filename, SerializationFormat m) const
 
bool SerializeFromString (const std::string &src, SerializationFormat m)
 
bool SerializeFromFile (const std::string &filename, SerializationFormat m)
 
- Public Member Functions inherited from SESystem
 SESystem (Logger *logger)
 
virtual ~SESystem ()
 
- Public Member Functions inherited from Loggable
 Loggable ()
 
 Loggable (Logger *log)
 
virtual ~Loggable ()
 
virtual LoggerGetLogger () const
 
virtual void Debug (std::string const &msg, std::string const &origin=empty) const
 
virtual void Debug (std::stringstream &msg, std::string const &origin=empty) const
 
virtual void Debug (std::ostream &msg, std::string const &origin=empty) const
 
virtual void Info (std::string const &msg, std::string const &origin=empty) const
 
virtual void Info (std::stringstream &msg, std::string const &origin=empty) const
 
virtual void Info (const std::stringstream &msg, std::string const &origin=empty) const
 
virtual void Info (std::ostream &msg, std::string const &origin=empty) const
 
virtual void Warning (std::string const &msg, std::string const &origin=empty) const
 
virtual void Warning (std::stringstream &msg, std::string const &origin=empty) const
 
virtual void Warning (std::ostream &msg, std::string const &origin=empty) const
 
virtual void Error (std::string const &msg, std::string const &origin=empty) const
 
virtual void Error (std::stringstream &msg, std::string const &origin=empty) const
 
virtual void Error (std::ostream &msg, std::string const &origin=empty) const
 
virtual void Fatal (std::string const &msg, std::string const &origin=empty) const
 
virtual void Fatal (std::stringstream &msg, std::string const &origin=empty) const
 
virtual void Fatal (std::ostream &msg, std::string const &origin=empty) const
 

Protected Attributes

friend SEAnesthesiaMachineConfiguration
 
- Protected Attributes inherited from SESystem
std::stringstream m_ss
 
- Protected Attributes inherited from Loggable
Loggerm_Logger
 

Friends

class PBAnesthesiaMachine
 

StateChange

- This method is called when ever there is a state change Specically a new file has been loaded, configuration action, or the system reset Engine specific methodology can then update their logic.

virtual const SEScalarGetScalar (const std::string &name)
 
virtual const std::map< eAnesthesiaMachine_Event, bool > & GetEventStates () const
 
virtual void SetEvent (eAnesthesiaMachine_Event state, bool active, const SEScalarTime &time)
 
virtual bool IsEventActive (eAnesthesiaMachine_Event state) const
 
virtual double GetEventDuration (eAnesthesiaMachine_Event type, const TimeUnit &unit) const
 
virtual void UpdateEvents (const SEScalarTime &timeStep)
 
virtual void StateChange ()
 
virtual void Merge (const SEAnesthesiaMachine &from)
 
virtual void ProcessConfiguration (const SEAnesthesiaMachineConfiguration &config)
 

ForwardEvents

- Set a callback class to invoke when any event changes

  • Note that the handler callback can and will be called in the middle of a time step So system and compartment objects may not be completely up to date when called. Use the PhysiologyEngineInterface::SetEventHandler to ensure that all engine data is up to date at the time the callback is invoked
SEEventHandlerm_EventHandler
 
std::map< eAnesthesiaMachine_Event, bool > m_EventState
 
std::map< eAnesthesiaMachine_Event, double > m_EventDuration_s
 
eAnesthesiaMachine_Connection m_Connection
 
SEScalarVolumePerTimem_InletFlow
 
SEScalarm_InspiratoryExpiratoryRatio
 
SEScalar0To1m_OxygenFraction
 
eAnesthesiaMachine_OxygenSource m_OxygenSource
 
SEScalarPressurem_PositiveEndExpiredPressure
 
eAnesthesiaMachine_PrimaryGas m_PrimaryGas
 
SEScalarFrequencym_RespiratoryRate
 
SEScalarPressurem_ReliefValvePressure
 
SEScalarPressurem_VentilatorPressure
 
SEAnesthesiaMachineChamberm_LeftChamber
 
SEAnesthesiaMachineChamberm_RightChamber
 
SEAnesthesiaMachineOxygenBottlem_OxygenBottleOne
 
SEAnesthesiaMachineOxygenBottlem_OxygenBottleTwo
 
SESubstanceManagerm_Substances
 
virtual void ForwardEvents (SEEventHandler *handler)
 
virtual eAnesthesiaMachine_Connection GetConnection () const
 
virtual void SetConnection (eAnesthesiaMachine_Connection c)
 
virtual bool HasInletFlow () const
 
virtual SEScalarVolumePerTimeGetInletFlow ()
 
virtual double GetInletFlow (const VolumePerTimeUnit &unit) const
 
virtual bool HasInspiratoryExpiratoryRatio () const
 
virtual SEScalarGetInspiratoryExpiratoryRatio ()
 
virtual double GetInspiratoryExpiratoryRatio () const
 
virtual bool HasOxygenFraction () const
 
virtual SEScalar0To1GetOxygenFraction ()
 
virtual double GetOxygenFraction () const
 
virtual eAnesthesiaMachine_OxygenSource GetOxygenSource () const
 
virtual void SetOxygenSource (eAnesthesiaMachine_OxygenSource name)
 
virtual bool HasPositiveEndExpiredPressure () const
 
virtual SEScalarPressureGetPositiveEndExpiredPressure ()
 
virtual double GetPositiveEndExpiredPressure (const PressureUnit &unit) const
 
virtual eAnesthesiaMachine_PrimaryGas GetPrimaryGas () const
 
virtual void SetPrimaryGas (eAnesthesiaMachine_PrimaryGas name)
 
virtual bool HasRespiratoryRate () const
 
virtual SEScalarFrequencyGetRespiratoryRate ()
 
virtual double GetRespiratoryRate (const FrequencyUnit &unit) const
 
virtual bool HasReliefValvePressure () const
 
virtual SEScalarPressureGetReliefValvePressure ()
 
virtual double GetReliefValvePressure (const PressureUnit &unit) const
 
virtual bool HasVentilatorPressure () const
 
virtual SEScalarPressureGetVentilatorPressure ()
 
virtual double GetVentilatorPressure (const PressureUnit &unit) const
 
virtual bool HasLeftChamber () const
 
virtual SEAnesthesiaMachineChamberGetLeftChamber ()
 
virtual const SEAnesthesiaMachineChamberGetLeftChamber () const
 
virtual void RemoveLeftChamber ()
 
virtual bool HasRightChamber () const
 
virtual SEAnesthesiaMachineChamberGetRightChamber ()
 
virtual const SEAnesthesiaMachineChamberGetRightChamber () const
 
virtual void RemoveRightChamber ()
 
virtual bool HasOxygenBottleOne () const
 
virtual SEAnesthesiaMachineOxygenBottleGetOxygenBottleOne ()
 
virtual const SEAnesthesiaMachineOxygenBottleGetOxygenBottleOne () const
 
virtual void RemoveOxygenBottleOne ()
 
virtual bool HasOxygenBottleTwo () const
 
virtual SEAnesthesiaMachineOxygenBottleGetOxygenBottleTwo ()
 
virtual const SEAnesthesiaMachineOxygenBottleGetOxygenBottleTwo () const
 
virtual void RemoveOxygenBottleTwo ()
 

Additional Inherited Members

- Static Public Member Functions inherited from SESystem
static const SEScalarGetScalar (const std::string &name, std::vector< SESystem *> *systems)
 
- Static Public Attributes inherited from Loggable
static const std::string empty
 

Constructor & Destructor Documentation

◆ SEAnesthesiaMachine()

SEAnesthesiaMachine::SEAnesthesiaMachine ( SESubstanceManager substances)

◆ ~SEAnesthesiaMachine()

SEAnesthesiaMachine::~SEAnesthesiaMachine ( )
virtual

Member Function Documentation

◆ Clear()

void SEAnesthesiaMachine::Clear ( )
virtual

Reimplemented from SESystem.

Reimplemented in AnesthesiaMachine.

◆ ForwardEvents()

void SEAnesthesiaMachine::ForwardEvents ( SEEventHandler handler)
virtual

◆ GetConnection()

eAnesthesiaMachine_Connection SEAnesthesiaMachine::GetConnection ( ) const
virtual

◆ GetEventDuration()

double SEAnesthesiaMachine::GetEventDuration ( eAnesthesiaMachine_Event  type,
const TimeUnit unit 
) const
virtual

◆ GetEventStates()

virtual const std::map<eAnesthesiaMachine_Event, bool>& SEAnesthesiaMachine::GetEventStates ( ) const
inlinevirtual

◆ GetInletFlow() [1/2]

SEScalarVolumePerTime & SEAnesthesiaMachine::GetInletFlow ( )
virtual

◆ GetInletFlow() [2/2]

double SEAnesthesiaMachine::GetInletFlow ( const VolumePerTimeUnit unit) const
virtual

◆ GetInspiratoryExpiratoryRatio() [1/2]

SEScalar & SEAnesthesiaMachine::GetInspiratoryExpiratoryRatio ( )
virtual

◆ GetInspiratoryExpiratoryRatio() [2/2]

double SEAnesthesiaMachine::GetInspiratoryExpiratoryRatio ( ) const
virtual

◆ GetLeftChamber() [1/2]

SEAnesthesiaMachineChamber & SEAnesthesiaMachine::GetLeftChamber ( )
virtual

◆ GetLeftChamber() [2/2]

const SEAnesthesiaMachineChamber * SEAnesthesiaMachine::GetLeftChamber ( ) const
virtual

◆ GetOxygenBottleOne() [1/2]

SEAnesthesiaMachineOxygenBottle & SEAnesthesiaMachine::GetOxygenBottleOne ( )
virtual

◆ GetOxygenBottleOne() [2/2]

const SEAnesthesiaMachineOxygenBottle * SEAnesthesiaMachine::GetOxygenBottleOne ( ) const
virtual

◆ GetOxygenBottleTwo() [1/2]

SEAnesthesiaMachineOxygenBottle & SEAnesthesiaMachine::GetOxygenBottleTwo ( )
virtual

◆ GetOxygenBottleTwo() [2/2]

const SEAnesthesiaMachineOxygenBottle * SEAnesthesiaMachine::GetOxygenBottleTwo ( ) const
virtual

◆ GetOxygenFraction() [1/2]

SEScalar0To1 & SEAnesthesiaMachine::GetOxygenFraction ( )
virtual

◆ GetOxygenFraction() [2/2]

double SEAnesthesiaMachine::GetOxygenFraction ( ) const
virtual

◆ GetOxygenSource()

eAnesthesiaMachine_OxygenSource SEAnesthesiaMachine::GetOxygenSource ( ) const
virtual

◆ GetPositiveEndExpiredPressure() [1/2]

SEScalarPressure & SEAnesthesiaMachine::GetPositiveEndExpiredPressure ( )
virtual

◆ GetPositiveEndExpiredPressure() [2/2]

double SEAnesthesiaMachine::GetPositiveEndExpiredPressure ( const PressureUnit unit) const
virtual

◆ GetPrimaryGas()

eAnesthesiaMachine_PrimaryGas SEAnesthesiaMachine::GetPrimaryGas ( ) const
virtual

◆ GetReliefValvePressure() [1/2]

SEScalarPressure & SEAnesthesiaMachine::GetReliefValvePressure ( )
virtual

◆ GetReliefValvePressure() [2/2]

double SEAnesthesiaMachine::GetReliefValvePressure ( const PressureUnit unit) const
virtual

◆ GetRespiratoryRate() [1/2]

SEScalarFrequency & SEAnesthesiaMachine::GetRespiratoryRate ( )
virtual

◆ GetRespiratoryRate() [2/2]

double SEAnesthesiaMachine::GetRespiratoryRate ( const FrequencyUnit unit) const
virtual

◆ GetRightChamber() [1/2]

SEAnesthesiaMachineChamber & SEAnesthesiaMachine::GetRightChamber ( )
virtual

◆ GetRightChamber() [2/2]

const SEAnesthesiaMachineChamber * SEAnesthesiaMachine::GetRightChamber ( ) const
virtual

◆ GetScalar()

const SEScalar * SEAnesthesiaMachine::GetScalar ( const std::string &  name)
virtual

Implements SESystem.

◆ GetVentilatorPressure() [1/2]

SEScalarPressure & SEAnesthesiaMachine::GetVentilatorPressure ( )
virtual

◆ GetVentilatorPressure() [2/2]

double SEAnesthesiaMachine::GetVentilatorPressure ( const PressureUnit unit) const
virtual

◆ HasInletFlow()

bool SEAnesthesiaMachine::HasInletFlow ( ) const
virtual

◆ HasInspiratoryExpiratoryRatio()

bool SEAnesthesiaMachine::HasInspiratoryExpiratoryRatio ( ) const
virtual

◆ HasLeftChamber()

bool SEAnesthesiaMachine::HasLeftChamber ( ) const
virtual

◆ HasOxygenBottleOne()

bool SEAnesthesiaMachine::HasOxygenBottleOne ( ) const
virtual

◆ HasOxygenBottleTwo()

bool SEAnesthesiaMachine::HasOxygenBottleTwo ( ) const
virtual

◆ HasOxygenFraction()

bool SEAnesthesiaMachine::HasOxygenFraction ( ) const
virtual

◆ HasPositiveEndExpiredPressure()

bool SEAnesthesiaMachine::HasPositiveEndExpiredPressure ( ) const
virtual

◆ HasReliefValvePressure()

bool SEAnesthesiaMachine::HasReliefValvePressure ( ) const
virtual

◆ HasRespiratoryRate()

bool SEAnesthesiaMachine::HasRespiratoryRate ( ) const
virtual

◆ HasRightChamber()

bool SEAnesthesiaMachine::HasRightChamber ( ) const
virtual

◆ HasVentilatorPressure()

bool SEAnesthesiaMachine::HasVentilatorPressure ( ) const
virtual

◆ IsEventActive()

bool SEAnesthesiaMachine::IsEventActive ( eAnesthesiaMachine_Event  state) const
virtual

◆ Merge()

void SEAnesthesiaMachine::Merge ( const SEAnesthesiaMachine from)
protectedvirtual

◆ ProcessConfiguration()

void SEAnesthesiaMachine::ProcessConfiguration ( const SEAnesthesiaMachineConfiguration config)
protectedvirtual

◆ RemoveLeftChamber()

void SEAnesthesiaMachine::RemoveLeftChamber ( )
virtual

◆ RemoveOxygenBottleOne()

void SEAnesthesiaMachine::RemoveOxygenBottleOne ( )
virtual

◆ RemoveOxygenBottleTwo()

void SEAnesthesiaMachine::RemoveOxygenBottleTwo ( )
virtual

◆ RemoveRightChamber()

void SEAnesthesiaMachine::RemoveRightChamber ( )
virtual

◆ SerializeFromFile()

bool SEAnesthesiaMachine::SerializeFromFile ( const std::string &  filename,
SerializationFormat  m 
)

◆ SerializeFromString()

bool SEAnesthesiaMachine::SerializeFromString ( const std::string &  src,
SerializationFormat  m 
)

◆ SerializeToFile()

bool SEAnesthesiaMachine::SerializeToFile ( const std::string &  filename,
SerializationFormat  m 
) const

◆ SerializeToString()

bool SEAnesthesiaMachine::SerializeToString ( std::string &  output,
SerializationFormat  m 
) const

◆ SetConnection()

void SEAnesthesiaMachine::SetConnection ( eAnesthesiaMachine_Connection  c)
virtual

Reimplemented in AnesthesiaMachine.

◆ SetEvent()

void SEAnesthesiaMachine::SetEvent ( eAnesthesiaMachine_Event  state,
bool  active,
const SEScalarTime time 
)
virtual

◆ SetOxygenSource()

void SEAnesthesiaMachine::SetOxygenSource ( eAnesthesiaMachine_OxygenSource  name)
virtual

◆ SetPrimaryGas()

void SEAnesthesiaMachine::SetPrimaryGas ( eAnesthesiaMachine_PrimaryGas  name)
virtual

◆ StateChange()

virtual void SEAnesthesiaMachine::StateChange ( )
inlineprotectedvirtual

Reimplemented in AnesthesiaMachine.

◆ UpdateEvents()

void SEAnesthesiaMachine::UpdateEvents ( const SEScalarTime timeStep)
virtual

Friends And Related Function Documentation

◆ PBAnesthesiaMachine

friend class PBAnesthesiaMachine
friend

Member Data Documentation

◆ m_Connection

eAnesthesiaMachine_Connection SEAnesthesiaMachine::m_Connection
protected

◆ m_EventDuration_s

std::map<eAnesthesiaMachine_Event, double> SEAnesthesiaMachine::m_EventDuration_s
protected

◆ m_EventHandler

SEEventHandler* SEAnesthesiaMachine::m_EventHandler
protected

◆ m_EventState

std::map<eAnesthesiaMachine_Event, bool> SEAnesthesiaMachine::m_EventState
protected

◆ m_InletFlow

SEScalarVolumePerTime* SEAnesthesiaMachine::m_InletFlow
protected

◆ m_InspiratoryExpiratoryRatio

SEScalar* SEAnesthesiaMachine::m_InspiratoryExpiratoryRatio
protected

◆ m_LeftChamber

SEAnesthesiaMachineChamber* SEAnesthesiaMachine::m_LeftChamber
protected

◆ m_OxygenBottleOne

SEAnesthesiaMachineOxygenBottle* SEAnesthesiaMachine::m_OxygenBottleOne
protected

◆ m_OxygenBottleTwo

SEAnesthesiaMachineOxygenBottle* SEAnesthesiaMachine::m_OxygenBottleTwo
protected

◆ m_OxygenFraction

SEScalar0To1* SEAnesthesiaMachine::m_OxygenFraction
protected

◆ m_OxygenSource

eAnesthesiaMachine_OxygenSource SEAnesthesiaMachine::m_OxygenSource
protected

◆ m_PositiveEndExpiredPressure

SEScalarPressure* SEAnesthesiaMachine::m_PositiveEndExpiredPressure
protected

◆ m_PrimaryGas

eAnesthesiaMachine_PrimaryGas SEAnesthesiaMachine::m_PrimaryGas
protected

◆ m_ReliefValvePressure

SEScalarPressure* SEAnesthesiaMachine::m_ReliefValvePressure
protected

◆ m_RespiratoryRate

SEScalarFrequency* SEAnesthesiaMachine::m_RespiratoryRate
protected

◆ m_RightChamber

SEAnesthesiaMachineChamber* SEAnesthesiaMachine::m_RightChamber
protected

◆ m_Substances

SESubstanceManager& SEAnesthesiaMachine::m_Substances
protected

◆ m_VentilatorPressure

SEScalarPressure* SEAnesthesiaMachine::m_VentilatorPressure
protected

◆ SEAnesthesiaMachineConfiguration

friend SEAnesthesiaMachine::SEAnesthesiaMachineConfiguration
protected