Activity.hpp

00001 #ifndef ORO_ACTIVITY_HPP
00002 #define ORO_ACTIVITY_HPP
00003 
00004 #include "Time.hpp"
00005 #include "RunnableInterface.hpp"
00006 #include "ActivityInterface.hpp"
00007 #include "os/Thread.hpp"
00008 
00009 namespace RTT
00010 {
00011 
00025     class RTT_API Activity: public ActivityInterface, public OS::Thread
00026     {
00027     public:
00028         using OS::Thread::run;
00029         using ActivityInterface::run;
00030 
00038         Activity(RunnableInterface* r = 0, const std::string& name ="Activity" );
00039 
00052         Activity(int priority, Seconds period = 0.0,
00053                  RunnableInterface* r = 0, const std::string& name ="Activity");
00054 
00069         Activity(int scheduler, int priority, Seconds period,
00070                  RunnableInterface* r = 0, const std::string& name ="Activity");
00071 
00075         virtual ~Activity();
00076 
00077         virtual bool start();
00078 
00079         virtual bool execute();
00080 
00081         virtual bool trigger();
00082 
00083         virtual bool stop();
00084 
00085         virtual bool isRunning() const;
00086 
00087         virtual bool isActive() const;
00088 
00089         virtual bool isPeriodic() const;
00090 
00091         virtual Seconds getPeriod() const;
00092 
00093         virtual bool setPeriod(Seconds period);
00094 
00095         virtual OS::ThreadInterface* thread();
00096 
00100         virtual bool initialize();
00101 
00105         virtual void step();
00106 
00110         virtual void loop();
00111 
00115         virtual bool breakLoop();
00116 
00120         virtual void finalize();
00121 
00127         bool run( int ) { RunnableInterface* d(0); return ActivityInterface::run(d); }
00128 
00129     };
00130 
00131 }
00132 
00133 #endif
Generated on Thu Dec 23 13:22:36 2010 for Orocos Real-Time Toolkit by  doxygen 1.6.3