/******************************************************* * * DESCRIPTION: QBG resistor class (effort input) * * AUTHOR: Mariana C. D'Abreu * * EMAIL: mdabreu@dc.uba.ar * ********************************************************/ #ifndef _QBG_RESISTANCE_EI_H #define _QBG_RESISTANCE_EI_H using namespace std; #include "atomic.h" #include "fstream.h" #define QBG_RESISTANCE_EI_CLASS_NAME "QBGResistanceEffortIn" class QBGResistanceEffortIn : public Atomic { public: QBGResistanceEffortIn( const string &name = QBG_RESISTANCE_EI_CLASS_NAME ); ~QBGResistanceEffortIn(); virtual string className() const { return QBG_RESISTANCE_EI_CLASS_NAME;} static const RealValue DefaultResistance; protected: Model &initFunction() ; Model &externalFunction( const ExternalMessage & ); Model &internalFunction( const InternalMessage & ); Model &outputFunction( const InternalMessage & ); QBGResistanceEffortIn &calculateFlow(); private: const Port &e1p; Port &f1p; RealValue effort; // effort recibido RealValue flowSent; // flow enviado RealValue flow; // flow calculado RealValue R; // constante de resistencia ofstream outFile; // out file string outFileName; }; #endif