rec::robotino::api2 C++ interface
Grappler.h
1 // Copyright (C) 2004-2010, Robotics Equipment Corporation GmbH
2 
3 //Copyright (c) ...
4 //
5 //REC Robotics Equipment Corporation GmbH, Planegg, Germany. All rights reserved.
6 //Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
7 //1) Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
8 //2) Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
9 //
10 //THIS SOFTWARE IS PROVIDED BY REC ROBOTICS EQUIPMENT CORPORATION GMBH �AS IS� AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
11 //THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL REC ROBOTICS EQUIPMENT CORPORATION GMBH
12 //BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
13 //GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
14 //LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
15 //
16 //Copyright (c) ...
17 //
18 //REC Robotics Equipment Corporation GmbH, Planegg, Germany. Alle Rechte vorbehalten.
19 //Weiterverbreitung und Verwendung in nichtkompilierter oder kompilierter Form, mit oder ohne Ver�nderung, sind unter den folgenden Bedingungen zul�ssig:
20 //1) Weiterverbreitete nichtkompilierte Exemplare m�ssen das obige Copyright, diese Liste der Bedingungen und den folgenden Haftungsausschluss im Quelltext enthalten.
21 //2) Weiterverbreitete kompilierte Exemplare m�ssen das obige Copyright, diese Liste der Bedingungen und den folgenden Haftungsausschluss in der Dokumentation und/oder anderen Materialien, die mit dem Exemplar verbreitet werden, enthalten.
22 //
23 //DIESE SOFTWARE WIRD VON REC ROBOTICS EQUIPMENT CORPORATION GMBH OHNE JEGLICHE SPEZIELLE ODER IMPLIZIERTE GARANTIEN ZUR VERF�GUNG GESTELLT, DIE UNTER
24 //ANDEREM EINSCHLIESSEN: DIE IMPLIZIERTE GARANTIE DER VERWENDBARKEIT DER SOFTWARE F�R EINEN BESTIMMTEN ZWECK. AUF KEINEN FALL IST REC ROBOTICS EQUIPMENT CORPORATION GMBH
25 //F�R IRGENDWELCHE DIREKTEN, INDIREKTEN, ZUF�LLIGEN, SPEZIELLEN, BEISPIELHAFTEN ODER FOLGESCH�DEN (UNTER ANDEREM VERSCHAFFEN VON ERSATZG�TERN ODER -DIENSTLEISTUNGEN;
26 //EINSCHR�NKUNG DER NUTZUNGSF�HIGKEIT; VERLUST VON NUTZUNGSF�HIGKEIT; DATEN; PROFIT ODER GESCH�FTSUNTERBRECHUNG), WIE AUCH IMMER VERURSACHT UND UNTER WELCHER VERPFLICHTUNG
27 //AUCH IMMER, OB IN VERTRAG, STRIKTER VERPFLICHTUNG ODER UNERLAUBTER HANDLUNG (INKLUSIVE FAHRL�SSIGKEIT) VERANTWORTLICH, AUF WELCHEM WEG SIE AUCH IMMER DURCH DIE BENUTZUNG
28 //DIESER SOFTWARE ENTSTANDEN SIND, SOGAR, WENN SIE AUF DIE M�GLICHKEIT EINES SOLCHEN SCHADENS HINGEWIESEN WORDEN SIND.
29 
30 #ifndef _REC_ROBOTINO_API2_Grappler_H_
31 #define _REC_ROBOTINO_API2_Grappler_H_
32 
33 #include "rec/robotino/api2/defines.h"
34 #include "rec/robotino/api2/ComObject.h"
35 #include "rec/robotino/api2/GrapplerReadings.h"
36 
37 namespace rec
38 {
39  namespace robotino
40  {
41  namespace api2
42  {
43  class GrapplerImpl;
44 
48  class
49 #ifdef REC_ROBOTINO_API2_CLASS_ATTRIBUTE
50  REC_ROBOTINO_API2_CLASS_ATTRIBUTE
51 #endif
52  Grappler : public ComObject
53  {
54  friend class GrapplerImpl;
55  public:
56  Grappler();
57 
58  virtual ~Grappler();
59 
67  void setComId( const ComId& id );
68 
74  void processEvents();
75 
85  bool setAxis( unsigned int axis, float angle, float speed );
86 
100  bool setAxes( const float* angles, unsigned int anglesSize, const float* speeds, unsigned int speedsSize );
101 
115  bool setPowerEnabled( unsigned int channel, bool enable );
116 
122  void toggleTorque();
123 
136  GrapplerReadings readings() const;
137 
149  GrapplerReadings info() const;
150 
157  virtual void servoInfoEvent( const rec::robotino::api2::GrapplerReadings& info );
158 
165  virtual void readingsEvent( const rec::robotino::api2::GrapplerReadings& readings );
166 
173  virtual void storePositionsEvent( const rec::robotino::api2::GrapplerReadings& readings );
174 
180  virtual void toggleTorqueEvent();
181 
182  private:
183  GrapplerImpl* _impl;
184  };
185  }
186  }
187 }
188 #endif
Sensor readings of Robotino's (optional) Grappler.
Definition: GrapplerReadings.h:44
Access to Robotino's (optional) Grappler.
Definition: Grappler.h:48
The base class for all Robotino objects.
Definition: ComObject.h:44
Definition: AnalogInput.h:36
The id of a Com object.
Definition: ComId.h:48