EpuckInterface Class Reference

Base class for all concrete interfaces of e-puck. More...

#include <epuckInterface.hpp>

Inheritance diagram for EpuckInterface:
Inheritance graph
Collaboration diagram for EpuckInterface:
Collaboration graph

Detailed Description

Base class for all concrete interfaces of e-puck.

This class must be inherited by every class which implement a concrete e-puck interface. It's a abstract class only, and can't be instanced.

Author
Renato Florentino Garcia
Date
August 2008

Classes

struct  Triple
 Struct which represents a triple (x,y,theta). More...
 

Protected Types

enum  Request {
  CONFIG_CAMERA = 0x02, SET_VEL = 0x13, GET_STEPS = 0x14, STOP_MOTORS = 0x15,
  GET_IR_PROX = 0x16, GET_CAMERA_IMG = 0x17, SET_LED_POWER = 0x18
}
 Request codes acceptable by e-puck. More...
 

Protected Member Functions

 EpuckInterface (const SerialPort *const serialPort)
 The EpuckInterface class constructor. More...
 
void SendRequest (Request request) const
 

Protected Attributes

const SerialPort *const serialPort
 A SerialPort class instance shared among the device interfaces. More...
 

Static Protected Attributes

static const float EPUCK_DIAMETER = 0.07
 Diameter of e-puck body [m].
 

Member Enumeration Documentation

◆ Request

enum EpuckInterface::Request
protected

Request codes acceptable by e-puck.

Enumerator
CONFIG_CAMERA 

Send configurations for camera initialization.

SET_VEL 

Send motors steps per second velocity.

GET_STEPS 

Receive the steps made and reset the stepp counter.

STOP_MOTORS 

Stop the motors.

GET_IR_PROX 

Receive the IR sensors readings.

GET_CAMERA_IMG 

Receive an image from camera.

SET_LED_POWER 

Send the state of all LEDs.

Constructor & Destructor Documentation

◆ EpuckInterface()

EpuckInterface::EpuckInterface ( const SerialPort *const  serialPort)
protected

The EpuckInterface class constructor.

Parameters
serialPortPointer for a SerialPort class already created and connected with an e-puck.

References SerialPort::sendChar(), and serialPort.

Here is the call graph for this function:

Member Data Documentation

◆ serialPort

const SerialPort* const EpuckInterface::serialPort
protected

A SerialPort class instance shared among the device interfaces.

This pointer points to the only instance of SerialPort Class. Each interface will be this pointer pointed to the same instance.

Referenced by EpuckInterface(), EpuckLEDs::EpuckLEDs(), EpuckCamera::GetImage(), EpuckIR::GetIRData(), EpuckCamera::Initialize(), EpuckPosition2d::SetOdometry(), EpuckPosition2d::SetVel(), EpuckPosition2d::StopMotors(), and EpuckPosition2d::UpdateOdometry().


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