UniSet  1.4.0
include/TDelay.h
00001 #ifndef TDelay_H_
00002 #define TDelay_H_
00003 // --------------------------------------------------------------------------
00004 #include "PassiveTimer.h"
00005 #include "Element.h"
00006 // ---------------------------------------------------------------------------
00007 // add on delay, off delay
00008 
00009 class TDelay:
00010     public Element
00011 {
00012 
00013     public:
00014         TDelay( Element::ElementID id, int delayMS=0, int inCount=0 );
00015         virtual ~TDelay();
00016 
00017 
00018         virtual void tick();
00019         virtual void setIn( int num, bool state );
00020         virtual bool getOut();
00021         virtual std::string getType(){ return "Delay"; }
00022 
00023         virtual void setDelay(int timeMS);
00024         inline int getDelay(){ return delay; }
00025     
00026     protected:
00027         TDelay(){};
00028 
00029         bool myout;
00030         PassiveTimer pt;
00031         int delay;
00032 
00033     private:
00034 };
00035 // ---------------------------------------------------------------------------
00036 #endif
00037 // ---------------------------------------------------------------------------
00038