#include <abstractwiring.h>
Inherits Inspectable.
Inherited by DerivativeWiring, and One2OneWiring.
Inheritance diagram for AbstractWiring:


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 std::list< iparamkey > | getInternalParamNames () const |
| Returns the list of the names of all internal parameters. | |
| virtual std::list< iparamval > | getInternalParams () 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 | |
| NoiseGenerator * | noiseGenerator |
Implements wiring of robot sensors to inputs of the controller and controller outputs to robot motors.
integration/main.cpp, and main.cpp.
| AbstractWiring | ( | NoiseGenerator * | noise | ) | [inline] |
| virtual ~AbstractWiring | ( | ) | [inline, virtual] |
destructor
| virtual int getControllerMotornumber | ( | ) | [inline, virtual] |
Returns the number of motors on controller side.
| virtual int getControllerSensornumber | ( | ) | [inline, virtual] |
Returns the number of sensors on controller side.
| virtual std::list<iparamkey> getInternalParamNames | ( | ) | const [inline, virtual] |
Returns the list of the names of all internal parameters.
Implements Inspectable.
Reimplemented in One2OneWiring.
| virtual std::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.
| virtual int getRobotMotornumber | ( | ) | [inline, virtual] |
Returns the number of motors on robot side.
| virtual int getRobotSensornumber | ( | ) | [inline, virtual] |
Returns the number of sensors on robot side.
| 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),
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.
| 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 |
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.
| 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 |
Implemented in DerivativeWiring, One2OneWiring, and SelectiveOne2OneWiring.
int cmotornumber [protected] |
number of motors at controller side
int csensornumber [protected] |
number of sensors at controller side
NoiseGenerator* noiseGenerator [protected] |
int rmotornumber [protected] |
number of motors at robot side
int rsensornumber [protected] |
number of sensors at robot side
1.4.7