Dynamixel  2.9.5
RoadNarrows Robotics Dynamixel Package
DynaServoAX12.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////////////
2 //
3 // Package: Dynamixel
4 //
5 // Library: librnr_dynamixel
6 //
7 // File: DynaServoAX12.h
8 //
9 /*! \file
10  *
11  * $LastChangedDate: 2015-01-12 10:56:06 -0700 (Mon, 12 Jan 2015) $
12  * $Rev: 3845 $
13  *
14  * \ingroup dyna_lib_hdrs
15  *
16  * \brief RoadNarrows AX-12, AX-12+, AX-12A Dynamixel Servo Class Interface.
17  *
18  * \author Robin Knight (robin.knight@roadnarrows.com)
19  *
20  * \copyright
21  * \h_copy 2011-2017. RoadNarrows LLC.\n
22  * http://www.roadnarrows.com\n
23  * All Rights Reserved
24  */
25 /*
26  * @EulaBegin@
27  *
28  * Unless otherwise stated explicitly, all materials contained are copyrighted
29  * and may not be used without RoadNarrows LLC's written consent,
30  * except as provided in these terms and conditions or in the copyright
31  * notice (documents and software) or other proprietary notice provided with
32  * the relevant materials.
33  *
34  * IN NO EVENT SHALL THE AUTHOR, ROADNARROWS LLC, OR ANY
35  * MEMBERS/EMPLOYEES/CONTRACTORS OF ROADNARROWS OR DISTRIBUTORS OF THIS SOFTWARE
36  * BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR
37  * CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS
38  * DOCUMENTATION, EVEN IF THE AUTHORS OR ANY OF THE ABOVE PARTIES HAVE BEEN
39  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
40  *
41  * THE AUTHORS AND ROADNARROWS LLC SPECIFICALLY DISCLAIM ANY WARRANTIES,
42  * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
43  * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN
44  * "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE NO OBLIGATION TO
45  * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
46  *
47  * @EulaEnd@
48  */
49 ////////////////////////////////////////////////////////////////////////////////
50 
51 #ifndef _DYNA_SERVO_AX12_H
52 #define _DYNA_SERVO_AX12_H
53 
54 #include "rnr/rnrconfig.h"
55 #include "rnr/log.h"
56 
57 #include "Dynamixel/Dynamixel.h"
58 #include "Dynamixel/AX.h"
59 #include "Dynamixel/DynaError.h"
60 #include "Dynamixel/DynaComm.h"
61 #include "Dynamixel/DynaServo.h"
63 
64 
65 // ---------------------------------------------------------------------------
66 // AX-12 Dynamixel Servo Base Class
67 // ---------------------------------------------------------------------------
68 
69 /*!
70  * \ingroup dyna_lib_classes
71  *
72  * \brief AX-12, AX-12+, AX-12A Dynamixel Servo Class.
73  *
74  * The DynaServoAX12 class provides the specific interface to the AX-12
75  * (and AX-12+ and AX-12A) Dynamixel servos
76  */
78 {
79 public:
80  static const int DYNA_MODEL_NUM = DYNA_MODEL_NUM_AX12;
81 
82  /*!
83  * \brief Bare-bones initialization constructor.
84  *
85  * May be used be derived classes to avoid undue communication and
86  * initializaton overhead.
87  *
88  * \param comm Dynamixel bus communication instance.
89  *
90  */
92  {
93  }
94 
95  /*!
96  * \brief Initialization constructor.
97  *
98  * \param comm Dynamixel bus communication instance.
99  * \param nServoId Servo Id.
100  * \param uModelNum Servo model number.
101  * \param uFwVer Servo firmware version.
102  */
103  DynaServoAX12(DynaComm &comm,
104  int nServoId,
105  uint_t uModelNum = DYNA_MODEL_NUM,
106  uint_t uFwVer = DYNA_FWVER_NA);
107 
108  /*!
109  * \brief Destructor.
110  */
111  virtual ~DynaServoAX12();
112 
113 
114  // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
115  // Attribute Functions
116  // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
117 
118  // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
119  // Servo Move Functions
120  // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
121 
122  // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
123  // Servo Read/Write Functions
124  // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
125 
126 protected:
127  /*!
128  * \brief Initialize servo class instance.
129  *
130  * \param nServoId Servo Id.
131  * \param uFwVer Servo firmware version.
132  */
133  void Init(int nServoid, uint_t uFwVer);
134 
135  /*!
136  * \brief Initialize servo fixed specification data.
137  */
138  void InitSpec();
139 
140  // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
141  // Linking Fuctions
142  // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
143 
144  // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
145  // Field Packing Functions
146  // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
147 };
148 
149 
150 #endif // _DYNA_SERVO_AX12_H
DynaServoAX12(DynaComm &comm)
Bare-bones initialization constructor.
Definition: DynaServoAX12.h:91
RoadNarrows Dynamixel Bus Communications Abstract Base Class Interface.
RoadNarrows AX Series Dynamixel Declarations.
AX-12, AX-12+, AX-12A Dynamixel Servo Class.
Definition: DynaServoAX12.h:77
#define DYNA_FWVER_NA
firmware version not available
Definition: Dynamixel.h:136
Generic Dynamixel Servo Base Class Interface.
virtual ~DynaServoAX12()
Destructor.
void Init()
Initialize servo class instance.
Generic Dynamixel Servo Base Class.
RoadNarrows Dynamixel Archetype Servo Abstract Base Class.
#define DYNA_MODEL_NUM_AX12
AX-12, AX-12+, AX-12A.
Definition: AX.h:73
RoadNarrows Dynamixel Top-Level Package Header File.
void InitSpec()
Initialize servo fixed specification data.
RoadNarrows Dynamixel Library Error and Logging Routines.
Dynamixel Bus Communications Abstract Base Class.
Definition: DynaComm.h:80