AbstractWiring Class Reference

#include <abstractwiring.h>

Inheritance diagram for AbstractWiring:

Inheritance graph
[legend]
Collaboration diagram for AbstractWiring:

Collaboration graph
[legend]
List of all members.

Detailed Description

Abstract wiring-object between controller and robot.

Implements wiring of robot sensors to inputs of the controller and controller outputs to robot motors.

Definition at line 63 of file abstractwiring.h.

Public Member Functions

 AbstractWiring (NoiseGenerator *noise)
 constructor
virtual ~AbstractWiring ()
 destructor
virtual bool init (int robotsensornumber, int robotmotornumber)=0
 Initializes the number of sensors and motors from robot (to be precise the internal parameters rsensornumber and rmotornumber!), calculates the number of sensors and motors on controller side.
virtual bool wireSensors (const sensor *rsensors, int rsensornumber, sensor *csensors, int csensornumber, double noise)=0
 Realizes wiring from robot sensors to controller sensors.
virtual bool wireMotors (motor *rmotors, int rmotornumber, const motor *cmotors, int cmotornumber)=0
 Realizes wiring from controller motor outputs to robot motors.
virtual int getRobotSensornumber ()
 Returns the number of sensors on robot side.
virtual int getRobotMotornumber ()
 Returns the number of motors on robot side.
virtual int getControllerSensornumber ()
 Returns the number of sensors on controller side.
virtual int getControllerMotornumber ()
 Returns the number of motors on controller side.
virtual list< iparamkeygetInternalParamNames () const
 Returns the list of the names of all internal parameters.
virtual list< iparamvalgetInternalParams () const
 Returns a list of the values of all internal parameters (in the order given by getInternalParamNames()).

Protected Attributes

int rsensornumber
 number of sensors at robot side
int rmotornumber
 number of motors at robot side
int csensornumber
 number of sensors at controller side
int cmotornumber
 number of motors at controller side
NoiseGeneratornoiseGenerator


Constructor & Destructor Documentation

AbstractWiring NoiseGenerator noise  )  [inline]
 

constructor

Parameters:
noise NoiseGenerator that is used for adding noise to sensor values

Definition at line 68 of file abstractwiring.h.

virtual ~AbstractWiring  )  [inline, virtual]
 

destructor

Definition at line 78 of file abstractwiring.h.


Member Function Documentation

virtual int getControllerMotornumber  )  [inline, virtual]
 

Returns the number of motors on controller side.

Definition at line 132 of file abstractwiring.h.

virtual int getControllerSensornumber  )  [inline, virtual]
 

Returns the number of sensors on controller side.

Definition at line 128 of file abstractwiring.h.

virtual list<iparamkey> getInternalParamNames  )  const [inline, virtual]
 

Returns the list of the names of all internal parameters.

Implements Inspectable.

Reimplemented in One2OneWiring.

Definition at line 136 of file abstractwiring.h.

virtual list<iparamval> getInternalParams  )  const [inline, virtual]
 

Returns a list of the values of all internal parameters (in the order given by getInternalParamNames()).

Implements Inspectable.

Reimplemented in One2OneWiring.

Definition at line 141 of file abstractwiring.h.

virtual int getRobotMotornumber  )  [inline, virtual]
 

Returns the number of motors on robot side.

Definition at line 124 of file abstractwiring.h.

virtual int getRobotSensornumber  )  [inline, virtual]
 

Returns the number of sensors on robot side.

Definition at line 120 of file abstractwiring.h.

virtual bool init int  robotsensornumber,
int  robotmotornumber
[pure virtual]
 

Initializes the number of sensors and motors from robot (to be precise the internal parameters rsensornumber and rmotornumber!), calculates the number of sensors and motors on controller side.

Must be overloaded to calculate and provide the appropriate numbers controllersensornumber (csensornumber), controllermotornumber (cmotornumber), robotsensornumber (rsensornumber) and robotmotornumber (rmotornumber),

Returns:
returns false if error, else true

Implemented in DerivativeWiring, One2OneWiring, and SelectiveOne2OneWiring.

virtual bool wireMotors motor rmotors,
int  rmotornumber,
const motor cmotors,
int  cmotornumber
[pure virtual]
 

Realizes wiring from controller motor outputs to robot motors.

Must be overloaded in order to implement the appropriate mapping.

Parameters:
rmotors pointer to array of motorvalues for robot
rmotornumber number of robot motors
cmotors pointer to array of motorvalues from controller
cmotornumber number of motorvalues from controller
Returns:
returns false if error, else true

Implemented in DerivativeWiring, and One2OneWiring.

virtual bool wireSensors const sensor rsensors,
int  rsensornumber,
sensor csensors,
int  csensornumber,
double  noise
[pure virtual]
 

Realizes wiring from robot sensors to controller sensors.

Must be overloaded in order to implement the appropriate mapping.

Parameters:
rsensors pointer to array of sensorvalues from robot
rsensornumber number of sensors from robot
csensors pointer to array of sensorvalues for controller
csensornumber number of sensors to controller
noise size of the noise added to the sensors
Returns:
returns false if error, else true

Implemented in DerivativeWiring, One2OneWiring, and SelectiveOne2OneWiring.


Member Data Documentation

int cmotornumber [protected]
 

number of motors at controller side

Definition at line 155 of file abstractwiring.h.

int csensornumber [protected]
 

number of sensors at controller side

Definition at line 152 of file abstractwiring.h.

NoiseGenerator* noiseGenerator [protected]
 

Definition at line 157 of file abstractwiring.h.

int rmotornumber [protected]
 

number of motors at robot side

Definition at line 149 of file abstractwiring.h.

int rsensornumber [protected]
 

number of sensors at robot side

Definition at line 141 of file abstractwiring.h.


Generated on Tue Apr 4 19:05:05 2006 for Robotsystem from Robot Group Leipzig by  doxygen 1.4.5