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