Pulse adds COVID-19 Simulation Support
×

Generic inhaler for substance administration. More...

#include <Inhaler.h>

Inherits PulseInhaler.

Public Member Functions

virtual ~Inhaler ()
 
void Clear ()
 
void Initialize ()
 Initializes system properties to valid homeostatic values. More...
 
void SetUp ()
 
void AtSteadyState ()
 Notify systems that steady state has been achieved. More...
 
void PreProcess ()
 Inhaler Action Preprocessor. More...
 
void Process (bool solve_and_transport=true)
 Inhaler system process function. More...
 
void PostProcess (bool solve_and_transport=true)
 Inhaler system postprocess function. More...
 
void StateChange ()
 
void Administer ()
 Administer Substance Using Inhaler. More...
 
- Public Member Functions inherited from PulseInhaler
 PulseInhaler (Logger *logger)
 
virtual ~PulseInhaler ()=default
 
virtual const SEScalarGetScalar (const std::string &name) override
 
- Public Member Functions inherited from SEInhaler
 SEInhaler (Logger *logger)
 
virtual ~SEInhaler ()
 
bool SerializeToString (std::string &output, SerializationFormat m) const
 
bool SerializeToFile (const std::string &filename) const
 
bool SerializeFromString (const std::string &src, SerializationFormat m, const SESubstanceManager &subMgr)
 
bool SerializeFromFile (const std::string &filename, const SESubstanceManager &subMgr)
 
virtual eSwitch GetState () const
 
virtual void SetState (eSwitch name)
 
virtual bool HasMeteredDose () const
 
virtual SEScalarMassGetMeteredDose ()
 
virtual double GetMeteredDose (const MassUnit &unit) const
 
virtual bool HasNozzleLoss () const
 
virtual SEScalar0To1GetNozzleLoss ()
 
virtual double GetNozzleLoss () const
 
virtual bool HasSpacerVolume () const
 
virtual SEScalarVolumeGetSpacerVolume ()
 
virtual double GetSpacerVolume (const VolumeUnit &unit) const
 
virtual bool HasSubstance () const
 
virtual void SetSubstance (const SESubstance *sub)
 
virtual SESubstanceGetSubstance () const
 
- Public Member Functions inherited from SEEquipment
 SEEquipment (Logger *logger)
 
virtual ~SEEquipment ()
 
- Public Member Functions inherited from SESystem
 SESystem (Logger *logger)
 
virtual ~SESystem ()
 
- Public Member Functions inherited from Loggable
 Loggable (Logger *logger=nullptr)
 
 Loggable (std::string const &logfile)
 
virtual ~Loggable ()
 
virtual LoggerGetLogger () const
 
virtual void SetLogger (Logger &logger)
 
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
 
std::string to_string (int i)
 
std::string to_string (unsigned int i)
 
std::string to_string (size_t t)
 
std::string to_string (float f)
 
std::string to_string (double d)
 

Protected Member Functions

 Inhaler (PulseData &pc)
 
void ComputeExposedModelParameters () override
 
- Protected Member Functions inherited from SEInhaler
virtual void Merge (const SEInhaler &from, SESubstanceManager &subMgr)
 
virtual void ProcessConfiguration (SEInhalerConfiguration &config, SESubstanceManager &subMgr)
 

Protected Attributes

PulseDatam_data
 
double m_dt_s
 
SEGasCompartmentm_Mouthpiece
 
SELiquidCompartmentm_AerosolMouthpiece
 
SEGasCompartmentm_AmbientEnv
 
SELiquidSubstanceQuantitym_InhalerDrug
 
- Protected Attributes inherited from SEInhaler
eSwitch m_State
 
SEScalarMassm_MeteredDose
 
SEScalar0To1m_NozzleLoss
 
SEScalarVolumem_SpacerVolume
 
const SESubstancem_Substance
 
- Protected Attributes inherited from SESystem
std::stringstream m_ss
 
- Protected Attributes inherited from Loggable
bool myLogger
 
Loggerm_Logger
 

Friends

class PulseData
 
class PBPulseEquipment
 
class PulseEngineTest
 

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
 

Detailed Description

Generic inhaler for substance administration.

Constructor & Destructor Documentation

◆ Inhaler()

Inhaler::Inhaler ( PulseData pc)
protected

◆ ~Inhaler()

Inhaler::~Inhaler ( )
virtual

Member Function Documentation

◆ Administer()

void Inhaler::Administer ( )

Administer Substance Using Inhaler.

Parameters
None
Returns
void

This method initializes substance values in the inhaler when actuated. It is called once per actuation.

Error:
: Already processing a Substance Inhalation, ignoring this command.
Error:
Fatal: Inhaled substance does not have a density value.

◆ AtSteadyState()

void Inhaler::AtSteadyState ( )
inlinevirtual

Notify systems that steady state has been achieved.

Implements PulseSystem.

◆ Clear()

void Inhaler::Clear ( )
virtual

Reimplemented from SEInhaler.

◆ ComputeExposedModelParameters()

void Inhaler::ComputeExposedModelParameters ( )
overrideprotectedvirtual

Implements PulseInhaler.

◆ Initialize()

void Inhaler::Initialize ( )
virtual

Initializes system properties to valid homeostatic values.

Reimplemented from PulseSystem.

◆ PostProcess()

void Inhaler::PostProcess ( bool  solve_and_transport = true)
virtual

Inhaler system postprocess function.

Currently not used.

Implements PulseSystem.

◆ PreProcess()

void Inhaler::PreProcess ( )
virtual

Inhaler Action Preprocessor.

Parameters
None
Returns
void

This method:

  • Determines when to activate the inhaler given an inhaler command.
  • Starts and stops the inhaler.
  • Models deposition of inhaled substance in the orthopharynx

Implements PulseSystem.

◆ Process()

void Inhaler::Process ( bool  solve_and_transport = true)
virtual

Inhaler system process function.

Currently not used.

Implements PulseSystem.

◆ SetUp()

void Inhaler::SetUp ( )
virtual

Implements PulseSystem.

◆ StateChange()

void Inhaler::StateChange ( )
virtual

Reimplemented from SEInhaler.

Friends And Related Function Documentation

◆ PBPulseEquipment

friend class PBPulseEquipment
friend

◆ PulseData

friend class PulseData
friend

◆ PulseEngineTest

friend class PulseEngineTest
friend

Member Data Documentation

◆ m_AerosolMouthpiece

SELiquidCompartment* Inhaler::m_AerosolMouthpiece
protected

◆ m_AmbientEnv

SEGasCompartment* Inhaler::m_AmbientEnv
protected

◆ m_data

PulseData& Inhaler::m_data
protected

◆ m_dt_s

double Inhaler::m_dt_s
protected

◆ m_InhalerDrug

SELiquidSubstanceQuantity* Inhaler::m_InhalerDrug
protected

◆ m_Mouthpiece

SEGasCompartment* Inhaler::m_Mouthpiece
protected

Distributed under the Apache License, Version 2.0.

See accompanying NOTICE file for details.