00001 #ifndef _BusPhaseAngleListener_h_ 00002 #define _BusPhaseAngleListener_h_ 00003 #include <fstream> 00004 #include "adevs.h" 00005 #include "ElectricalModel.h" 00006 00010 class BusPhaseAngleListener: 00011 public adevs::EventListener<adevs::PortValue<BasicEvent*> > 00012 { 00013 public: 00020 BusPhaseAngleListener(ElectricalModel* model, 00021 double cint = 1E-1, std::string model_name = ""); 00022 void outputEvent(adevs::Event<adevs::PortValue<BasicEvent*> >, double){} 00023 void stateChange(adevs::Atomic<adevs::PortValue<BasicEvent*> >* model, double t); 00024 ~BusPhaseAngleListener(); 00025 private: 00026 const double cint; 00027 std::ofstream fout; 00028 double t_last_record; 00029 ElectricalModel* src; 00030 }; 00031 00032 #endif 00033