Task Class Reference

A task is an database record of some experiment that we want to run. More...

#include <taskDispatcher.h>

Inheritance diagram for Task:
Inheritance graph
[legend]

List of all members.

Public Types

enum  Status { RUNNING, ERROR, DONE }

Public Member Functions

db_planner::TaskRecord getRecord ()
 Returns a copy of the dbase record of this task.
Status getStatus ()
 Returns the current status of this task.
virtual void start ()=0
 Task (TaskDispatcher *disp, db_planner::DatabaseManager *mgr, db_planner::TaskRecord rec)
virtual ~Task ()

Protected Attributes

db_planner::DatabaseManagermDBMgr
 A database mgr that can be used to access the dbase.
TaskDispatchermDispatcher
 The Dispatcher that started this task.
db_planner::TaskRecord mRecord
 The dbase record of the task being executed.
Status mStatus
 The current status of this task.

Detailed Description

A task is an database record of some experiment that we want to run.

Usually, a task will involve an object, a hand, and some sort of experiment, such as planning grasps and recording them in the database. This class encapsulates a task, plus it offers some connections so that the task can be run automatically by a TaskDispatcher.

A Task is responsible for its own event management. It can use a callback system (i.e. surrender control and then get it back later via its own timers or callbacks). For example, this can be achieved by using one of the EGPlanners, which do that natively.

A Task must implement the following interface:

Definition at line 73 of file taskDispatcher.h.


Member Enumeration Documentation

Enumerator:
RUNNING 
ERROR 
DONE 

Definition at line 75 of file taskDispatcher.h.


Constructor & Destructor Documentation

Task::Task ( TaskDispatcher disp,
db_planner::DatabaseManager mgr,
db_planner::TaskRecord  rec 
) [inline]

Definition at line 88 of file taskDispatcher.h.

virtual Task::~Task (  )  [inline, virtual]

Definition at line 90 of file taskDispatcher.h.


Member Function Documentation

db_planner::TaskRecord Task::getRecord (  )  [inline]

Returns a copy of the dbase record of this task.

Definition at line 95 of file taskDispatcher.h.

Status Task::getStatus (  )  [inline]

Returns the current status of this task.

Definition at line 93 of file taskDispatcher.h.

virtual void Task::start (  )  [pure virtual]

Member Data Documentation

A database mgr that can be used to access the dbase.

Acquired from the TaskDispatcher

Definition at line 83 of file taskDispatcher.h.

The Dispatcher that started this task.

Definition at line 80 of file taskDispatcher.h.

The dbase record of the task being executed.

Definition at line 85 of file taskDispatcher.h.

Status Task::mStatus [protected]

The current status of this task.

Definition at line 78 of file taskDispatcher.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


graspit
Author(s):
autogenerated on Wed Jan 25 11:00:25 2012