$search
A task is a database record of some experiment that we want to run. More...
#include <dbTask.h>
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. | |
DBTaskDispatcher * | mDispatcher |
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. |
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.
graspit_dbase_tasks::DBTask::DBTask | ( | DBTaskDispatcher * | disp, | |
db_planner::DatabaseManager * | mgr, | |||
db_planner::TaskRecord | rec | |||
) | [inline] |
virtual graspit_dbase_tasks::DBTask::~DBTask | ( | ) | [inline, virtual] |
db_planner::TaskRecord graspit_dbase_tasks::DBTask::getRecord | ( | ) | [inline] |
Status graspit_dbase_tasks::DBTask::getStatus | ( | ) | [inline] |
virtual void graspit_dbase_tasks::DBTask::mainLoop | ( | ) | [inline, virtual] |
Reimplemented in graspit_dbase_tasks::DBEmptyTask.
virtual void graspit_dbase_tasks::DBTask::start | ( | ) | [pure virtual] |
Implemented in graspit_dbase_tasks::DBEmptyTask, and graspit_dbase_tasks::DBEmptyOneShotTask.
db_planner::DatabaseManager* graspit_dbase_tasks::DBTask::mDBMgr [protected] |
A database mgr that can be used to access the dbase.
Acquired from the DBTaskDispatcher
DBTaskDispatcher* graspit_dbase_tasks::DBTask::mDispatcher [protected] |
db_planner::TaskRecord graspit_dbase_tasks::DBTask::mRecord [protected] |
Status graspit_dbase_tasks::DBTask::mStatus [protected] |