Public Types | Public Member Functions | Protected Attributes
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 79 of file dbTask.h.


Member Enumeration Documentation

Enumerator:
RUNNING 
ERROR 
DONE 

Definition at line 81 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 97 of file dbTask.h.

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

Definition at line 100 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 110 of file dbTask.h.

Returns the current status of this task.

Definition at line 107 of file dbTask.h.

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

Reimplemented in graspit_dbase_tasks::DBEmptyTask.

Definition at line 104 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 91 of file dbTask.h.

The Dispatcher that started this task.

Definition at line 87 of file dbTask.h.

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

The dbase record of the task being executed.

Definition at line 94 of file dbTask.h.

The current status of this task.

Definition at line 84 of file dbTask.h.


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


graspit_dbase_tasks
Author(s): Matei Ciocarlie
autogenerated on Mon Jan 6 2014 11:20:09