ChirpSim
 All Classes Namespaces Files Functions Variables Typedefs Friends Macros
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
Robot Class Referenceabstract

The Robot class is the abstract base class for robots, containing an implementation for setting a controller, id, and giving the interface for getting sensor values and setting the wheel speeds of the robot. More...

#include <robot.h>

Inheritance diagram for Robot:
Inheritance graph

Public Member Functions

virtual void setSpeed (QVector< float > wheelSpeeds)=0
 
virtual QVector< float > sensors () const =0
 
unsigned id () const
 
Controllercontroller ()
 

Protected Member Functions

void setId (unsigned id)
 
void setController (Controller *controller)
 

Private Attributes

unsigned _id
 
Controller_controller
 

Detailed Description

The Robot class is the abstract base class for robots, containing an implementation for setting a controller, id, and giving the interface for getting sensor values and setting the wheel speeds of the robot.

Member Function Documentation

Controller* Robot::controller ( )
inline
Returns
The controller attached to the robot.

References _controller.

Referenced by ControllerServer::incomingConnection(), and setController().

Here is the caller graph for this function:

unsigned Robot::id ( ) const
inline
Returns
ID of the robot.

References _id.

Referenced by RobotRepository::addRobot(), MainWindow::selectedItemChanged(), and setId().

Here is the caller graph for this function:

virtual QVector<float> Robot::sensors ( ) const
pure virtual
Returns
A list of all sensor values from the robot.

Implemented in Chirp.

void Robot::setController ( Controller controller)
inlineprotected

References _controller, and controller().

Referenced by Chirp::Chirp().

Here is the call graph for this function:

Here is the caller graph for this function:

void Robot::setId ( unsigned  id)
inlineprotected

References _id, and id().

Referenced by Chirp::Chirp().

Here is the call graph for this function:

Here is the caller graph for this function:

virtual void Robot::setSpeed ( QVector< float >  wheelSpeeds)
pure virtual
Parameters
wheelSpeedslist of wheel speeds for the robot.

Implemented in Chirp.

Member Data Documentation

Controller* Robot::_controller
private

Referenced by controller(), and setController().

unsigned Robot::_id
private

Referenced by id(), and setId().


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