Robotsystem from Robot Group Leipzig: One2OneWiring Class Reference

- Main Page
- Modules
- Namespaces
- Classes
- Files
- Directories
- Examples

- Class List
- Alphabetical List
- Class Hierarchy
- Class Members

# One2OneWiring Class Reference

`#include <one2onewiring.h>`

Inheritance diagram for One2OneWiring:

[legend]
Collaboration diagram for One2OneWiring:

[legend]
List of all members.

## Detailed Description

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

Examples:

  main.cpp.

Definition at line 63 of file one2onewiring.h.

## Public Member Functions
| One2OneWiring (NoiseGenerator *noise, bool plotNoise=false)
| constructor
virtual | ~One2OneWiring ()
| destructor
virtual bool | init (int robotsensornumber, int robotmotornumber)
| initializes the number of sensors and motors on robot side, calculate number of sensors and motors on controller side
virtual bool | wireSensors (const sensor *rsensors, int rsensornumber, sensor *csensors, int csensornumber, double noise)
| Realizes one to one wiring from robot sensors to controller sensors.
virtual bool | wireMotors (motor *rmotors, int rmotornumber, const motor *cmotors, int cmotornumber)
| Realizes one to one wiring from controller motor outputs to robot motors.
virtual list< iparamkey > | getInternalParamNames () const
| Returns the list of the names of all internal parameters.
virtual list< iparamval > | getInternalParams () const
| The list of the values of all internal parameters given by getInternalParams().
## Protected Attributes
bool | plotNoise
| TRUE for plotting noise values, FALSE for not plotting.
sensor * | noisevals
| for storing the noise values

## Constructor & Destructor Documentation

One2OneWiring | ( | NoiseGenerator * | noise,
|  | bool | plotNoise = `false`
| ) |

  | constructor Parameters:
  | noise | NoiseGenerator that is used for adding noise to sensor values
  | plotNoise | for plotting the noise values (to observe it from outside via getInternalParams() and guilogger) set it TRUE, for not plotting the noise set it to FALSE.
Definition at line 60 of file one2onewiring.cpp.

~One2OneWiring | ( |  | ) | `[virtual]`

| destructor Definition at line 65 of file one2onewiring.cpp.

## Member Function Documentation

list< Inspectable::iparamkey > getInternalParamNames | ( |  | ) | const`[virtual]`

| Returns the list of the names of all internal parameters. Reimplemented from AbstractWiring. Definition at line 124 of file one2onewiring.cpp.

list< Inspectable::iparamval > getInternalParams | ( |  | ) | const`[virtual]`

| The list of the values of all internal parameters given by getInternalParams(). (in the order given by getInternalParamNames()) Reimplemented from AbstractWiring. Definition at line 139 of file one2onewiring.cpp.

bool init | ( | int | robotsensornumber,
|  | int | robotmotornumber
| ) | `[virtual]`

| initializes the number of sensors and motors on robot side, calculate number of sensors and motors on controller side Implements AbstractWiring. Reimplemented in SelectiveOne2OneWiring. Definition at line 72 of file one2onewiring.cpp.

bool wireMotors | ( | motor * | rmotors,
|  | int | rmotornumber,
|  | const motor * | cmotors,
|  | int | cmotornumber
| ) | `[virtual]`

  | Realizes one to one wiring from controller motor outputs to robot motors. 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
Implements AbstractWiring. Definition at line 112 of file one2onewiring.cpp.

bool wireSensors | ( | const sensor * | rsensors,
|  | int | rsensornumber,
|  | sensor * | csensors,
|  | int | csensornumber,
|  | double | noise
| ) | `[virtual]`

  | Realizes one to one wiring from robot sensors to controller sensors. 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
Implements AbstractWiring. Reimplemented in SelectiveOne2OneWiring. Definition at line 91 of file one2onewiring.cpp.

## Member Data Documentation

sensor* noisevals`[protected]`

| for storing the noise values Definition at line 115 of file one2onewiring.h.

bool plotNoise`[protected]`

| TRUE for plotting noise values, FALSE for not plotting. Definition at line 113 of file one2onewiring.h.