controldev
GenericTask.hpp
Go to the documentation of this file.
1 #ifndef CONTROLDEV_GENERICTASK_TASK_HPP
2 #define CONTROLDEV_GENERICTASK_TASK_HPP
3 
4 #include "controldev/GenericTaskBase.hpp"
5 #include "ControlDevTypes.hpp"
6 #include <vector>
7 
8 namespace controldev {
9  class GenericTask : public GenericTaskBase
10  {
11  friend class GenericTaskBase;
12  protected:
13  virtual bool updateRawCommand(RawCommand& rcmd) = 0;
14 
15  virtual int getFileDescriptor() = 0;
16 
18  {
19  public:
21  RTT::OutputPort<double> *port;
22  };
23 
24  std::vector<AxisPortHandle> axisHandles;
25  std::vector<double> axisScales;
26  public:
27  GenericTask(std::string const& name = "controldev::GenericTask");
28  GenericTask(std::string const& name, RTT::ExecutionEngine* engine);
29 
30  virtual ~GenericTask();
31 
45  virtual bool configureHook();
46 
52  virtual bool startHook();
53 
70  virtual void updateHook();
71 
72 
79  // void errorHook();
80 
84  // void stopHook();
85  virtual void stopHook();
86 
91  // void cleanupHook();
92 
93 
94 
95 
96  };
97 }
98 
99 #endif
100 
friend class GenericTaskBase
Definition: GenericTask.hpp:11
Definition: ControlDevTypes.hpp:11
AxisPort portDesc
Definition: GenericTask.hpp:20
virtual bool startHook()
This hook is called by Orocos when the state machine transitions from Stopped to Running.
Definition: GenericTask.cpp:39
virtual bool updateRawCommand(RawCommand &rcmd)=0
virtual bool configureHook()
This hook is called by Orocos when the state machine transitions from PreOperational to Stopped...
Definition: GenericTask.cpp:18
RTT::OutputPort< double > * port
Definition: GenericTask.hpp:21
GenericTask(std::string const &name="controldev::GenericTask")
Definition: GenericTask.cpp:6
Definition: GenericTask.hpp:17
std::vector< double > axisScales
Definition: GenericTask.hpp:25
Definition: ControlDevTypes.hpp:8
virtual void updateHook()
This hook is called by Orocos when the component is in the Running state, at each activity step...
Definition: GenericTask.cpp:53
virtual int getFileDescriptor()=0
Definition: GenericTask.hpp:9
std::vector< AxisPortHandle > axisHandles
Definition: GenericTask.hpp:24
A data structure for raw data values of input devices.
Definition: ControlDevTypes.hpp:27
virtual ~GenericTask()
Definition: GenericTask.cpp:14
virtual void stopHook()
This hook is called by Orocos when the component is in the RunTimeError state, at each activity step...
Definition: GenericTask.cpp:90