Generic inhaler for substance administration. More...

#include <Inhaler.h>

Inherits SEInhaler, PulseInhaler, and PulseSystem.

Public Member Functions

virtual ~Inhaler ()
 
void Clear ()
 
- Public Member Functions inherited from SEInhaler
 SEInhaler (SESubstanceManager &substances)
 
virtual ~SEInhaler ()
 
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)
 
virtual const SEScalarGetScalar (const std::string &name)
 
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 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 Member Functions

 Inhaler (PulseController &pc)
 
void Initialize ()
 Initializes system properties to valid homeostatic values. More...
 
void SetUp ()
 
void PreProcess ()
 Inhaler Action Preprocessor. More...
 
void Process ()
 Inhaler system process function. More...
 
void PostProcess ()
 Inhaler system postprocess function. More...
 
void StateChange ()
 
void Administer ()
 Administer Substance Using Inhaler. More...
 
- Protected Member Functions inherited from SEInhaler
virtual void Merge (const SEInhaler &from)
 
virtual void ProcessConfiguration (const SEInhalerConfiguration &config)
 
- Protected Member Functions inherited from PulseSystem
virtual void AtSteadyState ()
 Notify systems that steady state has been achieved. More...
 

Protected Attributes

PulseControllerm_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
 
SESubstanceManagerm_Substances
 
- Protected Attributes inherited from SESystem
std::stringstream m_ss
 
- Protected Attributes inherited from Loggable
Loggerm_Logger
 

Friends

class PBPulseEquipment
 
class PulseController
 
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 ( PulseController pc)
protected

◆ ~Inhaler()

Inhaler::~Inhaler ( )
virtual

Member Function Documentation

◆ Administer()

void Inhaler::Administer ( )
protected

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.

◆ Clear()

void Inhaler::Clear ( )
virtual

Reimplemented from SEInhaler.

◆ Initialize()

void Inhaler::Initialize ( )
protectedvirtual

Initializes system properties to valid homeostatic values.

Reimplemented from PulseSystem.

◆ PostProcess()

void Inhaler::PostProcess ( )
protectedvirtual

Inhaler system postprocess function.

Currently not used.

Implements PulseSystem.

◆ PreProcess()

void Inhaler::PreProcess ( )
protectedvirtual

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

Inhaler system process function.

Currently not used.

Implements PulseSystem.

◆ SetUp()

void Inhaler::SetUp ( )
protectedvirtual

Implements PulseSystem.

◆ StateChange()

void Inhaler::StateChange ( )
protectedvirtual

Reimplemented from SEInhaler.

Friends And Related Function Documentation

◆ PBPulseEquipment

friend class PBPulseEquipment
friend

◆ PulseController

friend class PulseController
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

PulseController& 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