00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef CURRENTSIGNAL_H
00012 #define CURRENTSIGNAL_H
00013
00014 #include "reactive.h"
00015 #include "elementsignal.h"
00016
00021 class CurrentSignal : public Reactive, public ElementSignal
00022 {
00023 public:
00024 CurrentSignal( const double delta, const double current );
00025 virtual ~CurrentSignal();
00026
00027 virtual Element::Type type() const { return Element_CurrentSignal; }
00028 void setCurrent( const double current );
00029 double current() { return m_current; }
00030 virtual void time_step();
00031 virtual void add_map();
00032
00033 protected:
00034 virtual void updateCurrents();
00035 virtual void add_initial_dc();
00036
00037 private:
00038 double m_current;
00039 double m_oldCurrent;
00040 double m_newCurrent;
00041 };
00042
00043 #endif