MipResources::Resource Class Reference

abstract Resource class More...

#include <Resource.h>

Inheritance diagram for MipResources::Resource:

MIPObject MipResources::Camera MipResources::CommModule MipResources::DraWin MipResources::ExternScanMatch MipResources::GroundSens MipResources::Imu MipResources::Imu_sensor MipResources::Keyboard MipResources::MobileRob MipResources::MobileRob3D MipResources::MotionModule MipResources::MotionModule3D MipResources::PositionDetector MipResources::PositionDetector3D MipResources::RangeSens MipResources::RemoteDevice MipResources::ROSNode MipResources::SharedMem MipResources::Uav

List of all members.

Public Member Functions

virtual ResourcePlate getPlate () const =0
 get resource id (mandatory), it must be defined for all implemented resource
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 id and name


Detailed Description

abstract Resource class

Note:
how to create a new Resource:
  1. declare the new resource as derived of Resource: class newResource : public Resource...
  2. add an id and a name in the ResouceDict.h header file (see other resources to undrstand the mechanism)
  3. define the pure virtual method getPlate() that return the correct plate
  4. add a case in the switch of the method Scheduler::loadResources in which the plate is checked and your resource constructor is passed to the template method Scheduler::resourceLoader
  5. include the header file in Tasks-Resources-386.h
Author:
Antonio Franchi antonio.franchi@tuebingen.mpg.de

Member Function Documentation

virtual ResourcePlate MipResources::Resource::getPlate (  )  const [pure virtual]

string MipResources::Resource::getName ( void   )  const [inline]

get name

virtual string MipResources::Resource::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 MipResources::Resource::print (  )  [inline]

print id and name

Reimplemented in MipResources::CommModule.


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