|
parport
|
#include <Task.hpp>
Public Member Functions | |
| Task (std::string const &name="parport::Task") | |
| ~Task () | |
| bool | configureHook () |
| This hook is called by Orocos when the state machine transitions from PreOperational to Stopped. More... | |
| void | updateHook () |
| This hook is called by Orocos when the state machine transitions from Stopped to Running. More... | |
Protected Member Functions | |
| bool | watch_pin (std::string const &name, int pin) |
Protected Attributes | |
| ParportDriver * | m_driver |
Friends | |
| class | TaskBase |
| Task::Task | ( | std::string const & | name = "parport::Task" | ) |
| Task::~Task | ( | ) |
| bool Task::configureHook | ( | ) |
This hook is called by Orocos when the state machine transitions from PreOperational to Stopped.
If it returns false, then the component will stay in PreOperational. Otherwise, it goes into Stopped.
It is meaningful only if the #needs_configuration has been specified in the task context definition with (for example):
task_context "TaskName" do needs_configuration ... end
| void Task::updateHook | ( | ) |
This hook is called by Orocos when the state machine transitions from Stopped to Running.
If it returns false, then the component will stay in Stopped. Otherwise, it goes into Running and updateHook() will be called. This hook is called by Orocos when the component is in the Running state, at each activity step. Here, the activity gives the "ticks" when the hook should be called. See README.txt for different triggering options.
The warning(), error() and fatal() calls, when called in this hook, allow to get into the associated RunTimeWarning, RunTimeError and FatalError states.
In the first case, updateHook() is still called, and recovered() allows you to go back into the Running state. In the second case, the errorHook() will be called instead of updateHook() and in the third case the component is stopped and resetError() needs to be called before starting it again.
The updated_ports argument is the set of ports that have triggered this call. If the trigger is caused by something different (for instance, a periodic update), then this set is empty.
|
protected |
|
friend |
|
protected |
1.8.11