|
| 1 | +/* Generated from orogen/lib/orogen/templates/tasks/Task.hpp */ |
| 2 | + |
| 3 | +#ifndef MESSAGE_CONSUMER_TASK_TASK_HPP |
| 4 | +#define MESSAGE_CONSUMER_TASK_TASK_HPP |
| 5 | + |
| 6 | +#include "message_consumer/TaskBase.hpp" |
| 7 | + |
| 8 | +namespace message_consumer { |
| 9 | + class Task : public TaskBase |
| 10 | + { |
| 11 | + friend class TaskBase; |
| 12 | + protected: |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | + public: |
| 17 | + Task(std::string const& name = "message_consumer::Task", TaskCore::TaskState initial_state = Stopped); |
| 18 | + Task(std::string const& name, RTT::ExecutionEngine* engine, TaskCore::TaskState initial_state = Stopped); |
| 19 | + |
| 20 | + ~Task(); |
| 21 | + |
| 22 | + /** This hook is called by Orocos when the state machine transitions |
| 23 | + * from PreOperational to Stopped. If it returns false, then the |
| 24 | + * component will stay in PreOperational. Otherwise, it goes into |
| 25 | + * Stopped. |
| 26 | + * |
| 27 | + * It is meaningful only if the #needs_configuration has been specified |
| 28 | + * in the task context definition with (for example): |
| 29 | + * |
| 30 | + * task_context "TaskName" do |
| 31 | + * needs_configuration |
| 32 | + * ... |
| 33 | + * end |
| 34 | + */ |
| 35 | + // bool configureHook(); |
| 36 | + |
| 37 | + /** This hook is called by Orocos when the state machine transitions |
| 38 | + * from Stopped to Running. If it returns false, then the component will |
| 39 | + * stay in Stopped. Otherwise, it goes into Running and updateHook() |
| 40 | + * will be called. |
| 41 | + */ |
| 42 | + // bool startHook(); |
| 43 | + |
| 44 | + /** This hook is called by Orocos when the component is in the Running |
| 45 | + * state, at each activity step. Here, the activity gives the "ticks" |
| 46 | + * when the hook should be called. |
| 47 | + * |
| 48 | + * The error(), exception() and fatal() calls, when called in this hook, |
| 49 | + * allow to get into the associated RunTimeError, Exception and |
| 50 | + * FatalError states. |
| 51 | + * |
| 52 | + * In the first case, updateHook() is still called, and recover() allows |
| 53 | + * you to go back into the Running state. In the second case, the |
| 54 | + * errorHook() will be called instead of updateHook(). In Exception, the |
| 55 | + * component is stopped and recover() needs to be called before starting |
| 56 | + * it again. Finally, FatalError cannot be recovered. |
| 57 | + */ |
| 58 | + // void updateHook(); |
| 59 | + |
| 60 | + /** This hook is called by Orocos when the component is in the |
| 61 | + * RunTimeError state, at each activity step. See the discussion in |
| 62 | + * updateHook() about triggering options. |
| 63 | + * |
| 64 | + * Call recover() to go back in the Runtime state. |
| 65 | + */ |
| 66 | + // void errorHook(); |
| 67 | + |
| 68 | + /** This hook is called by Orocos when the state machine transitions |
| 69 | + * from Running to Stopped after stop() has been called. |
| 70 | + */ |
| 71 | + // void stopHook(); |
| 72 | + |
| 73 | + /** This hook is called by Orocos when the state machine transitions |
| 74 | + * from Stopped to PreOperational, requiring the call to configureHook() |
| 75 | + * before calling start() again. |
| 76 | + */ |
| 77 | + // void cleanupHook(); |
| 78 | + }; |
| 79 | +} |
| 80 | + |
| 81 | +#endif |
| 82 | + |
0 commit comments