graspit_dbase_tasks::DBTask Class Reference

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

#include <dbTask.h>

Inheritance diagram for graspit_dbase_tasks::DBTask:
Inheritance graph
[legend]

List of all members.

Public Types

enum  Status { RUNNING, ERROR, DONE }

Public Member Functions

 DBTask (DBTaskDispatcher *disp, db_planner::DatabaseManager *mgr, db_planner::TaskRecord rec)
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 mainLoop ()
virtual void start ()=0
virtual ~DBTask ()

Protected Attributes

db_planner::DatabaseManager * mDBMgr
 A database mgr that can be used to access the dbase.
DBTaskDispatchermDispatcher
 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 a 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 DBTaskDispatcher.

A DBTask 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 DBTask must implement the following interface:

Definition at line 70 of file dbTask.h.


Member Enumeration Documentation

Enumerator:
RUNNING 
ERROR 
DONE 

Definition at line 72 of file dbTask.h.


Constructor & Destructor Documentation

graspit_dbase_tasks::DBTask::DBTask ( DBTaskDispatcher disp,
db_planner::DatabaseManager *  mgr,
db_planner::TaskRecord  rec 
) [inline]

Definition at line 88 of file dbTask.h.

virtual graspit_dbase_tasks::DBTask::~DBTask (  )  [inline, virtual]

Definition at line 91 of file dbTask.h.


Member Function Documentation

db_planner::TaskRecord graspit_dbase_tasks::DBTask::getRecord (  )  [inline]

Returns a copy of the dbase record of this task.

Definition at line 101 of file dbTask.h.

Status graspit_dbase_tasks::DBTask::getStatus (  )  [inline]

Returns the current status of this task.

Definition at line 98 of file dbTask.h.

virtual void graspit_dbase_tasks::DBTask::mainLoop (  )  [inline, virtual]

Reimplemented in graspit_dbase_tasks::DBEmptyTask.

Definition at line 95 of file dbTask.h.

virtual void graspit_dbase_tasks::DBTask::start (  )  [pure virtual]

Member Data Documentation

db_planner::DatabaseManager* graspit_dbase_tasks::DBTask::mDBMgr [protected]

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

Acquired from the DBTaskDispatcher

Definition at line 82 of file dbTask.h.

The Dispatcher that started this task.

Definition at line 78 of file dbTask.h.

db_planner::TaskRecord graspit_dbase_tasks::DBTask::mRecord [protected]

The dbase record of the task being executed.

Definition at line 85 of file dbTask.h.

The current status of this task.

Definition at line 75 of file dbTask.h.


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


graspit_dbase_tasks
Author(s): Matei Ciocarlie
autogenerated on Wed Jan 25 11:05:55 2012