MipTasks::Task Class Reference

abstract Task class More...

#include <Task.h>

Inheritance diagram for MipTasks::Task:

MIPObject MipTasks::AntiSimmetryTask MipTasks::CentralizedPHDFilterTask MipTasks::ClearingTask MipTasks::Cloche MipTasks::DeployTask MipTasks::DriverTask MipTasks::EmergencyLock MipTasks::ExampleTask MipTasks::ExampleTask MipTasks::FeatExtrCam MipTasks::FeatExtrTask MipTasks::FormControlTask MipTasks::FormUpdate MipTasks::Joystick MipTasks::KbHitTask MipTasks::LaserNavigationTask MipTasks::LineFollowing MipTasks::Localization3D MipTasks::MutLocTask MipTasks::ObstacleAvoidance MipTasks::OfflinerTask MipTasks::ParticleMutLocCamOffTask MipTasks::ParticleMutLocCamTask MipTasks::ParticleMutLocTask MipTasks::ParticleMutLocTaskNoMR MipTasks::PHDCamFilterTask MipTasks::PHDFilterTask MipTasks::Pursuing MipTasks::Pursuing MipTasks::Pursuing MipTasks::RemoteRobTask MipTasks::ScanMatching MipTasks::Tracker MipTasks::UavHeiConOnboard MipTasks::UavHeightControl MipTasks::UAVPositioningSystem MipTasks::VisualHovering

List of all members.

Public Member Functions

 Task ()
virtual TaskPlate getPlate () const =0
 get task plate (mandatory), it ust be defined for all implemented task
virtual string getName () const
 get name
virtual string getObjectName () const
 Method that gives the name of the class as it will be displayed by the tracer.
string print ()
 print plate and name
virtual Time getMaxDuration ()=0
virtual Time getMaxSamplPeriod ()=0
virtual Time getMinSamplPeriod ()=0
virtual TaskOutputs run (void)=0
void fatalResourceNotPresent (uint resourcePlate)
 Fatal error, called when a certain resource is not found.
void warningResourceNotPresent (uint resourcePlate)
 Warning message, called when a certain resource is not found but is not fatal.

Public Attributes

Timer lastRunTimer
 used by the scheduler


Detailed Description

abstract Task class

Note:
how to create a new Task:
  1. declare the new task as derived of Task: class newTask : public Task...
    note that the constructor of a task must accept as parameter a ResourcePointers vector, in which look for the appropriate resources
  2. add a plate and a name in the TaskDict.h header file (see other tasks to understand the mechanism)
  3. define the pure virtual method getPlate() that returns the correct plate
  4. define the pure virtual methods that returns the correct times
  5. add a case in the switch of the method Scheduler::loadTasks in which the plate is checked and the newTask constructor is passed to the template method Scheduler::taskLoader
  6. include the header file in Tasks-Resources-386.h
Author:
Antonio Franchi antonio.franchi@tuebingen.mpg.de

Constructor & Destructor Documentation

MipTasks::Task::Task (  )  [inline]


Member Function Documentation

virtual TaskPlate MipTasks::Task::getPlate (  )  const [pure virtual]

virtual string MipTasks::Task::getName ( void   )  const [inline, virtual]

get name

virtual string MipTasks::Task::getObjectName (  )  const [inline, virtual]

Method that gives the name of the class as it will be displayed by the tracer.

Returns:
a string, which is the name of the current class
Note:
pure virtual, has to be redefined for each child class

Implements MIPObject.

string MipTasks::Task::print (  )  [inline]

print plate and name

virtual Time MipTasks::Task::getMaxDuration (  )  [pure virtual]

virtual Time MipTasks::Task::getMaxSamplPeriod (  )  [pure virtual]

virtual Time MipTasks::Task::getMinSamplPeriod (  )  [pure virtual]

virtual TaskOutputs MipTasks::Task::run ( void   )  [pure virtual]

void MipTasks::Task::fatalResourceNotPresent ( uint  resourcePlate  )  [inline]

Fatal error, called when a certain resource is not found.

Parameters:
[in] resurcePlate Not found resource plate (or init plate).

void MipTasks::Task::warningResourceNotPresent ( uint  resourcePlate  )  [inline]

Warning message, called when a certain resource is not found but is not fatal.

Parameters:
[in] resurcePlate Not found resource plate (or init plate).


Member Data Documentation

used by the scheduler


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

Generated on Mon Feb 20 07:01:13 2017 for MIP by  doxygen 1.5.6