Robot Simulator of the Robotics Group for Self-Organization of Control  0.8.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
wiringsequence.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (C) 2005-2011 LpzRobots development team *
3  * Georg Martius <georg dot martius at web dot de> *
4  * Frank Guettler <guettler at informatik dot uni-leipzig dot de *
5  * Frank Hesse <frank at nld dot ds dot mpg dot de> *
6  * Ralf Der <ralfder at mis dot mpg dot de> *
7  * *
8  * This program is free software; you can redistribute it and/or modify *
9  * it under the terms of the GNU General Public License as published by *
10  * the Free Software Foundation; either version 2 of the License, or *
11  * (at your option) any later version. *
12  * *
13  * This program is distributed in the hope that it will be useful, *
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
16  * GNU General Public License for more details. *
17  * *
18  * You should have received a copy of the GNU General Public License *
19  * along with this program; if not, write to the *
20  * Free Software Foundation, Inc., *
21  * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
22  * *
23  ***************************************************************************/
24 #ifndef __WIRINGSEQUENCE_H
25 #define __WIRINGSEQUENCE_H
26 
27 #include "abstractwiring.h"
28 #include <vector>
29 
30 /** Implements a sequence of wirings
31  */
33 public:
34 
35  /** constructor: The wirings given in the list
36  are applied in the sequence. For the sensors in normal order and
37  for the motors in reverse order*/
38  WiringSequence(std::list<AbstractWiring*>);
39  /** constructor provided for convinience, essentially calls addWiring(w1);addWiring(w2)
40  */
42 
43  virtual ~WiringSequence();
44 
45 protected:
46  virtual bool initIntern();
47 
48  virtual bool wireSensorsIntern(const sensor* rsensors, int rsensornumber,
49  sensor* csensors, int csensornumber,
50  double noise);
51 
52  virtual bool wireMotorsIntern(motor* rmotors, int rmotornumber,
53  const motor* cmotors, int cmotornumber);
54 
55 
56 public:
57 
58  /** adds a wiring to the list of wirings*/
59  virtual void addWiring(AbstractWiring* wiring);
60 
61 
62 protected:
63  std::vector<AbstractWiring*> wirings;
65 
66 };
67 
68 #endif
std::vector< AbstractWiring * > wirings
Definition: wiringsequence.h:63
int rmotornumber
number of motors at robot side
Definition: abstractwiring.h:182
int csensornumber
number of sensors at controller side
Definition: abstractwiring.h:187
virtual void addWiring(AbstractWiring *wiring)
adds a wiring to the list of wirings
Definition: wiringsequence.cpp:50
Abstract wiring-object between controller and robot.
Definition: abstractwiring.h:39
WiringSequence(std::list< AbstractWiring * >)
constructor: The wirings given in the list are applied in the sequence.
Definition: wiringsequence.cpp:32
virtual bool wireSensorsIntern(const sensor *rsensors, int rsensornumber, sensor *csensors, int csensornumber, double noise)
to be overloaded by subclasses
Definition: wiringsequence.cpp:75
virtual ~WiringSequence()
Definition: wiringsequence.cpp:44
virtual bool wireMotorsIntern(motor *rmotors, int rmotornumber, const motor *cmotors, int cmotornumber)
to be overloaded by subclasses
Definition: wiringsequence.cpp:101
double motor
Definition: abstractwiring.h:42
bool initialised
Definition: wiringsequence.h:64
virtual bool initIntern()
to be overloaded by subclasses The rsensornumber and rmotornumber are already stored in the member va...
Definition: wiringsequence.cpp:59
int cmotornumber
number of motors at controller side
Definition: abstractwiring.h:192
int rsensornumber
number of sensors at robot side
Definition: abstractwiring.h:177
double sensor
Definition: abstractwiring.h:41
Implements a sequence of wirings.
Definition: wiringsequence.h:32