parport
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
parport::Task Class Reference

#include <Task.hpp>

Inheritance diagram for parport::Task:

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
 

Constructor & Destructor Documentation

◆ Task()

Task::Task ( std::string const &  name = "parport::Task")

◆ ~Task()

Task::~Task ( )

Member Function Documentation

◆ configureHook()

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

◆ updateHook()

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.

◆ watch_pin()

bool Task::watch_pin ( std::string const &  name,
int  pin 
)
protected

Friends And Related Function Documentation

◆ TaskBase

friend class TaskBase
friend

Member Data Documentation

◆ m_driver

ParportDriver* parport::Task::m_driver
protected

The documentation for this class was generated from the following files: