YouBotGripperParameter.hpp

Go to the documentation of this file.
00001 #ifndef YOUBOT_YOUBOTGRIPPERPARAMETER_H
00002 #define YOUBOT_YOUBOTGRIPPERPARAMETER_H
00003 
00004 /****************************************************************
00005  *
00006  * Copyright (c) 2011
00007  * All rights reserved.
00008  *
00009  * Hochschule Bonn-Rhein-Sieg
00010  * University of Applied Sciences
00011  * Computer Science Department
00012  *
00013  * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
00014  *
00015  * Author:
00016  * Jan Paulus, Nico Hochgeschwender, Michael Reckhaus, Azamat Shakhimardanov
00017  * Supervised by:
00018  * Gerhard K. Kraetzschmar
00019  *
00020  * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
00021  *
00022  * This sofware is published under a dual-license: GNU Lesser General Public 
00023  * License LGPL 2.1 and BSD license. The dual-license implies that users of this
00024  * code may choose which terms they prefer.
00025  *
00026  * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
00027  *
00028  * Redistribution and use in source and binary forms, with or without
00029  * modification, are permitted provided that the following conditions are met:
00030  *
00031  *     * Redistributions of source code must retain the above copyright
00032  *       notice, this list of conditions and the following disclaimer.
00033  *     * Redistributions in binary form must reproduce the above copyright
00034  *       notice, this list of conditions and the following disclaimer in the
00035  *       documentation and/or other materials provided with the distribution.
00036  *     * Neither the name of the Hochschule Bonn-Rhein-Sieg nor the names of its
00037  *       contributors may be used to endorse or promote products derived from
00038  *       this software without specific prior written permission.
00039  *
00040  * This program is free software: you can redistribute it and/or modify
00041  * it under the terms of the GNU Lesser General Public License LGPL as
00042  * published by the Free Software Foundation, either version 2.1 of the
00043  * License, or (at your option) any later version or the BSD license.
00044  *
00045  * This program is distributed in the hope that it will be useful,
00046  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00047  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00048  * GNU Lesser General Public License LGPL and the BSD license for more details.
00049  *
00050  * You should have received a copy of the GNU Lesser General Public
00051  * License LGPL and BSD license along with this program.
00052  *
00053  ****************************************************************/
00054 #include <vector>
00055 #include <sstream>
00056 #include "generic/Logger.hpp"
00057 #include "generic/Units.hpp"
00058 #include "generic/Time.hpp"
00059 #include "generic/Exceptions.hpp"
00060 #include "generic-joint/JointParameter.hpp"
00061 #include "generic-gripper/GripperParameter.hpp"
00062 #include "youbot/ProtocolDefinitions.hpp"
00063 #include "youbot/YouBotSlaveMsg.hpp"
00064 #include "youbot/YouBotSlaveMailboxMsg.hpp"
00065 namespace youbot {
00066 
00067 ///////////////////////////////////////////////////////////////////////////////
00068 /// abstract youBot gripper parameter
00069 ///////////////////////////////////////////////////////////////////////////////
00070 class YouBotGripperParameter : public GripperParameter {
00071 friend class YouBotGripper;
00072 friend class YouBotGripperBar;
00073   protected:
00074     YouBotGripperParameter();
00075 
00076 
00077   public:
00078     virtual ~YouBotGripperParameter();
00079 
00080     virtual void toString(std::string& value) const = 0;
00081 
00082 
00083   protected:
00084     virtual ParameterType getType() const = 0;
00085 
00086     virtual std::string getName() const = 0;
00087 
00088     virtual void getYouBotMailboxMsg(YouBotSlaveMailboxMsg& message) const = 0;
00089 
00090     virtual void setYouBotMailboxMsg(const YouBotSlaveMailboxMsg& message) = 0;
00091 
00092     std::string name;
00093 
00094 
00095   private:
00096     ParameterType parameterType;
00097 
00098 };
00099 ///////////////////////////////////////////////////////////////////////////////
00100 /// the firmware version of the gripper
00101 ///////////////////////////////////////////////////////////////////////////////
00102 class GripperFirmwareVersion : public YouBotGripperParameter {
00103 friend class YouBotGripper;
00104 friend class YouBotGripperBar;
00105   public:
00106     GripperFirmwareVersion();
00107 
00108     virtual ~GripperFirmwareVersion();
00109 
00110     void getParameter(int& controllerType, double& firmwareVersion) const;
00111 
00112     void setParameter(const int controllerType, const double firmwareVersion);
00113 
00114     void toString(std::string& value) const;
00115 
00116 
00117   private:
00118     void getYouBotMailboxMsg(YouBotSlaveMailboxMsg& message) const;
00119 
00120     void setYouBotMailboxMsg(const YouBotSlaveMailboxMsg& message);
00121 
00122     std::string getName() const {return this->name;};
00123 
00124     ParameterType getType() const {return this->parameterType;};
00125 
00126     int controllerType;
00127 
00128     double firmwareVersion;
00129 
00130     std::string name;
00131 
00132     ParameterType parameterType;
00133 
00134 };
00135 ///////////////////////////////////////////////////////////////////////////////
00136 /// The name for a gripper bar or finger
00137 ///////////////////////////////////////////////////////////////////////////////
00138 class GripperBarName : public YouBotGripperParameter {
00139 friend class YouBotGripper;
00140 friend class YouBotGripperBar;
00141 
00142 
00143   public:
00144     GripperBarName();
00145 
00146     virtual ~GripperBarName();
00147 
00148     void getParameter(std::string& parameter) const;
00149 
00150     void setParameter(const std::string parameter);
00151 
00152     void toString(std::string& value) const;
00153 
00154 
00155   private:
00156     void getYouBotMailboxMsg(YouBotSlaveMailboxMsg& message) const;
00157 
00158     void setYouBotMailboxMsg(const YouBotSlaveMailboxMsg& message);
00159 
00160     std::string getName() const {return this->name;};
00161 
00162     ParameterType getType() const {return this->parameterType;};
00163 
00164     std::string value;
00165 
00166     std::string name;
00167 
00168     ParameterType parameterType;
00169 
00170 };
00171 ///////////////////////////////////////////////////////////////////////////////
00172 /// Calibrate the gripper
00173 ///////////////////////////////////////////////////////////////////////////////
00174 class CalibrateGripper : public YouBotGripperParameter {
00175 friend class YouBotGripper;
00176 friend class YouBotGripperBar;
00177   public:
00178     CalibrateGripper();
00179 
00180     virtual ~CalibrateGripper();
00181 
00182     void getParameter(bool& parameter) const;
00183 
00184     void setParameter(const bool parameter);
00185 
00186     void toString(std::string& value) const;
00187 
00188 
00189   private:
00190     virtual void getYouBotMailboxMsg(YouBotSlaveMailboxMsg& message) const;
00191 
00192     virtual void setYouBotMailboxMsg(const YouBotSlaveMailboxMsg& message);
00193 
00194     ParameterType getType() const {return this->parameterType;};
00195 
00196     std::string getName() const {return this->name;};
00197 
00198     bool value;
00199 
00200     std::string name;
00201 
00202     ParameterType parameterType;
00203 
00204 };
00205 ///////////////////////////////////////////////////////////////////////////////
00206 /// Represents a bar spacing offset. It could be useful if the gripper can not be totally closed.
00207 ///////////////////////////////////////////////////////////////////////////////
00208 class BarSpacingOffset : public YouBotGripperParameter {
00209 friend class YouBotGripper;
00210 friend class YouBotGripperBar;
00211   public:
00212     BarSpacingOffset();
00213 
00214     virtual ~BarSpacingOffset();
00215 
00216     void getParameter(quantity<si::length>& parameter) const;
00217 
00218     void setParameter(const quantity<si::length>& parameter);
00219 
00220     void toString(std::string& value) const;
00221 
00222 
00223   private:
00224     virtual void getYouBotMailboxMsg(YouBotSlaveMailboxMsg& message) const;
00225 
00226     virtual void setYouBotMailboxMsg(const YouBotSlaveMailboxMsg& message);
00227 
00228     ParameterType getType() const {return this->parameterType;};
00229 
00230     std::string getName() const {return this->name;};
00231 
00232     quantity<si::length> value;
00233 
00234     std::string name;
00235 
00236     ParameterType parameterType;
00237 
00238 };
00239 ///////////////////////////////////////////////////////////////////////////////
00240 /// The encoder value when the gripper has reached it's maximum bar spacing position
00241 ///////////////////////////////////////////////////////////////////////////////
00242 class MaxEncoderValue : public YouBotGripperParameter {
00243 friend class YouBotGripper;
00244 friend class YouBotGripperBar;
00245   public:
00246     MaxEncoderValue();
00247 
00248     virtual ~MaxEncoderValue();
00249 
00250     void getParameter(unsigned int& parameter) const;
00251 
00252     void setParameter(const unsigned int parameter);
00253 
00254     void toString(std::string& value) const;
00255 
00256 
00257   private:
00258     virtual void getYouBotMailboxMsg(YouBotSlaveMailboxMsg& message) const;
00259 
00260     virtual void setYouBotMailboxMsg(const YouBotSlaveMailboxMsg& message);
00261 
00262     ParameterType getType() const {return this->parameterType;};
00263 
00264     std::string getName() const {return this->name;};
00265 
00266     unsigned int value;
00267 
00268     std::string name;
00269 
00270     ParameterType parameterType;
00271 
00272 };
00273 ///////////////////////////////////////////////////////////////////////////////
00274 /// The maximum bar spacing distance of the gripper
00275 ///////////////////////////////////////////////////////////////////////////////
00276 class MaxTravelDistance : public YouBotGripperParameter {
00277 friend class YouBotGripper;
00278 friend class YouBotGripperBar;
00279   public:
00280     MaxTravelDistance();
00281 
00282     virtual ~MaxTravelDistance();
00283 
00284     void getParameter(quantity<si::length>& parameter) const;
00285 
00286     void setParameter(const quantity<si::length>& parameter);
00287 
00288     void toString(std::string& value) const;
00289 
00290 
00291   private:
00292     virtual void getYouBotMailboxMsg(YouBotSlaveMailboxMsg& message) const;
00293 
00294     virtual void setYouBotMailboxMsg(const YouBotSlaveMailboxMsg& message);
00295 
00296     ParameterType getType() const {return this->parameterType;};
00297 
00298     std::string getName() const {return this->name;};
00299 
00300     quantity<si::length> value;
00301 
00302     std::string name;
00303 
00304     ParameterType parameterType;
00305 
00306 };
00307 ///////////////////////////////////////////////////////////////////////////////
00308 /// Actual position of one gripper bar
00309 ///////////////////////////////////////////////////////////////////////////////
00310 class ActualPosition : public YouBotGripperParameter {
00311 friend class YouBotGripper;
00312 friend class YouBotGripperBar;
00313   public:
00314     ActualPosition();
00315 
00316     virtual ~ActualPosition();
00317 
00318     void getParameter(int& parameter) const;
00319 
00320     void setParameter(const int parameter);
00321 
00322     void toString(std::string& value) const;
00323 
00324 
00325   private:
00326     void getYouBotMailboxMsg(YouBotSlaveMailboxMsg& message) const;
00327 
00328     void setYouBotMailboxMsg(const YouBotSlaveMailboxMsg& message);
00329 
00330     std::string getName() const {return this->name;};
00331 
00332     ParameterType getType() const {return this->parameterType;};
00333 
00334     int upperLimit;
00335 
00336     int lowerLimit;
00337 
00338     int value;
00339 
00340     std::string name;
00341 
00342     ParameterType parameterType;
00343 
00344 };
00345 ///////////////////////////////////////////////////////////////////////////////
00346 /// Position setpoint for one gripper bar
00347 ///////////////////////////////////////////////////////////////////////////////
00348 class PositionSetpoint : public YouBotGripperParameter {
00349 friend class YouBotGripper;
00350 friend class YouBotGripperBar;
00351   public:
00352     PositionSetpoint();
00353 
00354     virtual ~PositionSetpoint();
00355 
00356     void getParameter(int& parameter) const;
00357 
00358     void setParameter(const int parameter);
00359 
00360     void toString(std::string& value) const;
00361 
00362 
00363   private:
00364     void getYouBotMailboxMsg(YouBotSlaveMailboxMsg& message) const;
00365 
00366     void setYouBotMailboxMsg(const YouBotSlaveMailboxMsg& message);
00367 
00368     std::string getName() const {return this->name;};
00369 
00370     ParameterType getType() const {return this->parameterType;};
00371 
00372     int upperLimit;
00373 
00374     int lowerLimit;
00375 
00376     int value;
00377 
00378     std::string name;
00379 
00380     ParameterType parameterType;
00381 
00382 };
00383 ///////////////////////////////////////////////////////////////////////////////
00384 /// Indicates that the actual position equals the target position. 
00385 ///////////////////////////////////////////////////////////////////////////////
00386 class TargetPositionReached : public YouBotGripperParameter {
00387 friend class YouBotGripper;
00388 friend class YouBotGripperBar;
00389   public:
00390     TargetPositionReached();
00391 
00392     virtual ~TargetPositionReached();
00393 
00394     void getParameter(bool& parameter) const;
00395 
00396     void toString(std::string& value) const;
00397 
00398 
00399   private:
00400     void getYouBotMailboxMsg(YouBotSlaveMailboxMsg& message) const;
00401 
00402     void setYouBotMailboxMsg(const YouBotSlaveMailboxMsg& message);
00403 
00404     std::string getName() const {return this->name;};
00405 
00406     ParameterType getType() const {return this->parameterType;};
00407 
00408     bool value;
00409 
00410     std::string name;
00411 
00412     ParameterType parameterType;
00413 
00414 };
00415 ///////////////////////////////////////////////////////////////////////////////
00416 /// Actual velocity of one gripper bar
00417 ///////////////////////////////////////////////////////////////////////////////
00418 class ActualVelocity : public YouBotGripperParameter {
00419 friend class YouBotGripper;
00420 friend class YouBotGripperBar;
00421   public:
00422     ActualVelocity();
00423 
00424     virtual ~ActualVelocity();
00425 
00426     void getParameter(int& parameter) const;
00427 
00428     void setParameter(const int parameter);
00429 
00430     void toString(std::string& value) const;
00431 
00432 
00433   private:
00434     void getYouBotMailboxMsg(YouBotSlaveMailboxMsg& message) const;
00435 
00436     void setYouBotMailboxMsg(const YouBotSlaveMailboxMsg& message);
00437 
00438     std::string getName() const {return this->name;};
00439 
00440     ParameterType getType() const {return this->parameterType;};
00441 
00442     int upperLimit;
00443 
00444     int lowerLimit;
00445 
00446     int value;
00447 
00448     std::string name;
00449 
00450     ParameterType parameterType;
00451 
00452 };
00453 ///////////////////////////////////////////////////////////////////////////////
00454 /// Velocity setpoint for one gripper bar
00455 ///////////////////////////////////////////////////////////////////////////////
00456 class VelocitySetpoint : public YouBotGripperParameter {
00457 friend class YouBotGripper;
00458 friend class YouBotGripperBar;
00459   public:
00460     VelocitySetpoint();
00461 
00462     virtual ~VelocitySetpoint();
00463 
00464     void getParameter(int& parameter) const;
00465 
00466     void setParameter(const int parameter);
00467 
00468     void toString(std::string& value) const;
00469 
00470 
00471   private:
00472     void getYouBotMailboxMsg(YouBotSlaveMailboxMsg& message) const;
00473 
00474     void setYouBotMailboxMsg(const YouBotSlaveMailboxMsg& message);
00475 
00476     std::string getName() const {return this->name;};
00477 
00478     ParameterType getType() const {return this->parameterType;};
00479 
00480     int upperLimit;
00481 
00482     int lowerLimit;
00483 
00484     int value;
00485 
00486     std::string name;
00487 
00488     ParameterType parameterType;
00489 
00490 };
00491 ///////////////////////////////////////////////////////////////////////////////
00492 /// Readout of the actual load value with used for stall detection (stallGuard2).
00493 
00494 
00495 ///////////////////////////////////////////////////////////////////////////////
00496 class ActualLoadValue : public YouBotGripperParameter {
00497 friend class YouBotGripper;
00498 friend class YouBotGripperBar;
00499   public:
00500     ActualLoadValue();
00501 
00502     virtual ~ActualLoadValue();
00503 
00504     void getParameter(unsigned int& parameter) const;
00505 
00506     void setParameter(const unsigned int& parameter);
00507 
00508     void toString(std::string& value) const;
00509 
00510 
00511   private:
00512     void getYouBotMailboxMsg(YouBotSlaveMailboxMsg& message) const;
00513 
00514     void setYouBotMailboxMsg(const YouBotSlaveMailboxMsg& message);
00515 
00516     std::string getName() const {return this->name;};
00517 
00518     ParameterType getType() const {return this->parameterType;};
00519 
00520     unsigned int upperLimit;
00521 
00522     unsigned int lowerLimit;
00523 
00524     unsigned int value;
00525 
00526     std::string name;
00527 
00528     ParameterType parameterType;
00529 
00530 };
00531 ///////////////////////////////////////////////////////////////////////////////
00532 /// Selects the comparator blank time. This time needs to safely cover the switching event and the duration of the ringing on the sense resistor. For low current drivers, a setting of 1 or 2 is good.
00533 
00534 ///////////////////////////////////////////////////////////////////////////////
00535 class ChopperBlankTime : public YouBotGripperParameter {
00536 friend class YouBotGripper;
00537 friend class YouBotGripperBar;
00538   public:
00539     ChopperBlankTime();
00540 
00541     virtual ~ChopperBlankTime();
00542 
00543     void getParameter(unsigned int& parameter) const;
00544 
00545     void setParameter(const unsigned int& parameter);
00546 
00547     void toString(std::string& value) const;
00548 
00549 
00550   private:
00551     void getYouBotMailboxMsg(YouBotSlaveMailboxMsg& message) const;
00552 
00553     void setYouBotMailboxMsg(const YouBotSlaveMailboxMsg& message);
00554 
00555     std::string getName() const {return this->name;};
00556 
00557     ParameterType getType() const {return this->parameterType;};
00558 
00559     unsigned int upperLimit;
00560 
00561     unsigned int lowerLimit;
00562 
00563     unsigned int value;
00564 
00565     std::string name;
00566 
00567     ParameterType parameterType;
00568 
00569 };
00570 ///////////////////////////////////////////////////////////////////////////////
00571 /// Hysteresis decrement setting. This setting determines the slope of the hysteresis during on time and during fast decay time.
00572 /// 0   fast decrement
00573 /// 3   very slow decrement
00574 
00575 ///////////////////////////////////////////////////////////////////////////////
00576 class ChopperHysteresisDecrement : public YouBotGripperParameter {
00577 friend class YouBotGripper;
00578 friend class YouBotGripperBar;
00579   public:
00580     ChopperHysteresisDecrement();
00581 
00582     virtual ~ChopperHysteresisDecrement();
00583 
00584     void getParameter(unsigned int& parameter) const;
00585 
00586     void setParameter(const unsigned int& parameter);
00587 
00588     void toString(std::string& value) const;
00589 
00590 
00591   private:
00592     void getYouBotMailboxMsg(YouBotSlaveMailboxMsg& message) const;
00593 
00594     void setYouBotMailboxMsg(const YouBotSlaveMailboxMsg& message);
00595 
00596     std::string getName() const {return this->name;};
00597 
00598     ParameterType getType() const {return this->parameterType;};
00599 
00600     unsigned int upperLimit;
00601 
00602     unsigned int lowerLimit;
00603 
00604     unsigned int value;
00605 
00606     std::string name;
00607 
00608     ParameterType parameterType;
00609 
00610 };
00611 ///////////////////////////////////////////////////////////////////////////////
00612 ///  Hysteresis end setting. Sets the hysteresis end value after a number of decrements. Decrement interval time is controlled by axis parameter 164.
00613 ///  -3... -1 negative hysteresis end setting
00614 ///  0   zero hysteresis end setting
00615 ///  1... 12 positive hysteresis end setting
00616 ///////////////////////////////////////////////////////////////////////////////
00617 class ChopperHysteresisEnd : public YouBotGripperParameter {
00618 friend class YouBotGripper;
00619 friend class YouBotGripperBar;
00620   public:
00621     ChopperHysteresisEnd();
00622 
00623     virtual ~ChopperHysteresisEnd();
00624 
00625     void getParameter(int& parameter) const;
00626 
00627     void setParameter(const int parameter);
00628 
00629     void toString(std::string& value) const;
00630 
00631 
00632   private:
00633     void getYouBotMailboxMsg(YouBotSlaveMailboxMsg& message) const;
00634 
00635     void setYouBotMailboxMsg(const YouBotSlaveMailboxMsg& message);
00636 
00637     std::string getName() const {return this->name;};
00638 
00639     ParameterType getType() const {return this->parameterType;};
00640 
00641     int upperLimit;
00642 
00643     int lowerLimit;
00644 
00645     int value;
00646 
00647     std::string name;
00648 
00649     ParameterType parameterType;
00650 
00651 };
00652 ///////////////////////////////////////////////////////////////////////////////
00653 ///  Hysteresis start setting. Please remark, that this  value is an offset to the hysteresis end value.
00654 ///////////////////////////////////////////////////////////////////////////////
00655 class ChopperHysteresisStart : public YouBotGripperParameter {
00656 friend class YouBotGripper;
00657 friend class YouBotGripperBar;
00658   public:
00659     ChopperHysteresisStart();
00660 
00661     virtual ~ChopperHysteresisStart();
00662 
00663     void getParameter(int& parameter) const;
00664 
00665     void setParameter(const int parameter);
00666 
00667     void toString(std::string& value) const;
00668 
00669 
00670   private:
00671     void getYouBotMailboxMsg(YouBotSlaveMailboxMsg& message) const;
00672 
00673     void setYouBotMailboxMsg(const YouBotSlaveMailboxMsg& message);
00674 
00675     std::string getName() const {return this->name;};
00676 
00677     ParameterType getType() const {return this->parameterType;};
00678 
00679     int upperLimit;
00680 
00681     int lowerLimit;
00682 
00683     int value;
00684 
00685     std::string name;
00686 
00687     ParameterType parameterType;
00688 
00689 };
00690 ///////////////////////////////////////////////////////////////////////////////
00691 /// Selection of the chopper mode:
00692 /// 0   spread cycle
00693 /// 1   classic const. off time
00694 
00695 ///////////////////////////////////////////////////////////////////////////////
00696 class ChopperMode : public YouBotGripperParameter {
00697 friend class YouBotGripper;
00698 friend class YouBotGripperBar;
00699   public:
00700     ChopperMode();
00701 
00702     virtual ~ChopperMode();
00703 
00704     void getParameter(bool& parameter) const;
00705 
00706     void setParameter(const bool parameter);
00707 
00708     void toString(std::string& value) const;
00709 
00710 
00711   private:
00712     void getYouBotMailboxMsg(YouBotSlaveMailboxMsg& message) const;
00713 
00714     void setYouBotMailboxMsg(const YouBotSlaveMailboxMsg& message);
00715 
00716     std::string getName() const {return this->name;};
00717 
00718     ParameterType getType() const {return this->parameterType;};
00719 
00720     bool value;
00721 
00722     std::string name;
00723 
00724     ParameterType parameterType;
00725 
00726 };
00727 ///////////////////////////////////////////////////////////////////////////////
00728 /// The off time setting controls the minimum chopper frequency. An off time within the range of 5 s to 20 s will fit. 
00729 /// Off time setting for constant tOFF chopper:
00730 /// NCLK= 12 + 32*tOFF (Minimum is 64 clocks)
00731 //// Setting this parameter to zero completely disables all driver transistors and the motor can free-wheel.
00732 
00733 ///////////////////////////////////////////////////////////////////////////////
00734 class ChopperOffTime : public YouBotGripperParameter {
00735 friend class YouBotGripper;
00736 friend class YouBotGripperBar;
00737   public:
00738     ChopperOffTime();
00739 
00740     virtual ~ChopperOffTime();
00741 
00742     void getParameter(unsigned int& parameter) const;
00743 
00744     void setParameter(const unsigned int& parameter);
00745 
00746     void toString(std::string& value) const;
00747 
00748 
00749   private:
00750     void getYouBotMailboxMsg(YouBotSlaveMailboxMsg& message) const;
00751 
00752     void setYouBotMailboxMsg(const YouBotSlaveMailboxMsg& message);
00753 
00754     std::string getName() const {return this->name;};
00755 
00756     ParameterType getType() const {return this->parameterType;};
00757 
00758     unsigned int upperLimit;
00759 
00760     unsigned int lowerLimit;
00761 
00762     unsigned int value;
00763 
00764     std::string name;
00765 
00766     ParameterType parameterType;
00767 
00768 };
00769 ///////////////////////////////////////////////////////////////////////////////
00770 ///  Every edge of the cycle releases a step/microstep. It does not make sense to activate this parameter for internal use. Double step enable can be used with Step/Dir interface.
00771 /// 0   double step off
00772 /// 1   double step on
00773 
00774 ///////////////////////////////////////////////////////////////////////////////
00775 class DoubleStepEnable : public YouBotGripperParameter {
00776 friend class YouBotGripper;
00777 friend class YouBotGripperBar;
00778 
00779 
00780   public:
00781     DoubleStepEnable();
00782 
00783     virtual ~DoubleStepEnable();
00784 
00785     void getParameter(bool& parameter) const;
00786 
00787     void setParameter(const bool parameter);
00788 
00789     void toString(std::string& value) const;
00790 
00791 
00792   private:
00793     void getYouBotMailboxMsg(YouBotSlaveMailboxMsg& message) const;
00794 
00795     void setYouBotMailboxMsg(const YouBotSlaveMailboxMsg& message);
00796 
00797     std::string getName() const {return this->name;};
00798 
00799     ParameterType getType() const {return this->parameterType;};
00800 
00801     bool value;
00802 
00803     std::string name;
00804 
00805     ParameterType parameterType;
00806 
00807 };
00808 ///////////////////////////////////////////////////////////////////////////////
00809 /// Bit 0: stallGuardTM status
00810 /// (1: threshold reached)
00811 /// Bit 1: Overtemperature
00812 /// (1: driver is shut down due to overtemperature)
00813 /// Bit 2: Pre-warning overtemperature
00814 /// (1: Threshold is exceeded)
00815 /// Bit 3: Short to ground A
00816 /// (1: Short condition etected, driver currently shut down)
00817 /// Bit 4: Short to ground B
00818 /// (1: Short condition detected, driver currently shut down)
00819 /// Bit 5: Open load A
00820 /// (1: no chopper event has happened during the last period with constant coil polarity)
00821 /// Bit 6: Open load B
00822 /// (1: no chopper event has happened during the last period with constant coil polarity)
00823 /// Bit 7: Stand still
00824 /// (1: No step impulse occurred on the step input during the last 2^20 clock cycles)
00825 ///////////////////////////////////////////////////////////////////////////////
00826 class ErrorFlags : public YouBotGripperParameter {
00827 friend class YouBotGripper;
00828 friend class YouBotGripperBar;
00829   public:
00830     ErrorFlags();
00831 
00832     virtual ~ErrorFlags();
00833 
00834     void getParameter(unsigned int& parameter) const;
00835 
00836     void setParameter(const unsigned int& parameter);
00837 
00838     void toString(std::string& value) const;
00839 
00840 
00841   private:
00842     void getYouBotMailboxMsg(YouBotSlaveMailboxMsg& message) const;
00843 
00844     void setYouBotMailboxMsg(const YouBotSlaveMailboxMsg& message);
00845 
00846     std::string getName() const {return this->name;};
00847 
00848     ParameterType getType() const {return this->parameterType;};
00849 
00850     unsigned int upperLimit;
00851 
00852     unsigned int lowerLimit;
00853 
00854     unsigned int value;
00855 
00856     std::string name;
00857 
00858     ParameterType parameterType;
00859 
00860 };
00861 ///////////////////////////////////////////////////////////////////////////////
00862 /// Time after which the power to the motor will be cut when its velocity has reached zero.
00863 /// 0... 65535
00864 /// 0 = never
00865 /// [msec]
00866 
00867 
00868 ///////////////////////////////////////////////////////////////////////////////
00869 class Freewheeling : public YouBotGripperParameter {
00870 friend class YouBotGripper;
00871 friend class YouBotGripperBar;
00872   public:
00873     Freewheeling();
00874 
00875     virtual ~Freewheeling();
00876 
00877     void getParameter(unsigned int& parameter) const;
00878 
00879     void setParameter(const unsigned int& parameter);
00880 
00881     void toString(std::string& value) const;
00882 
00883 
00884   private:
00885     void getYouBotMailboxMsg(YouBotSlaveMailboxMsg& message) const;
00886 
00887     void setYouBotMailboxMsg(const YouBotSlaveMailboxMsg& message);
00888 
00889     std::string getName() const {return this->name;};
00890 
00891     ParameterType getType() const {return this->parameterType;};
00892 
00893     unsigned int upperLimit;
00894 
00895     unsigned int lowerLimit;
00896 
00897     unsigned int value;
00898 
00899     std::string name;
00900 
00901     ParameterType parameterType;
00902 
00903 };
00904 ///////////////////////////////////////////////////////////////////////////////
00905 /// Acceleration parameter for velocity control and position control
00906 ///////////////////////////////////////////////////////////////////////////////
00907 class MaximumAcceleration : public YouBotGripperParameter {
00908 friend class YouBotGripper;
00909 friend class YouBotGripperBar;
00910   public:
00911     MaximumAcceleration();
00912 
00913     virtual ~MaximumAcceleration();
00914 
00915     void getParameter(int& parameter) const;
00916 
00917     void setParameter(const int parameter);
00918 
00919     void toString(std::string& value) const;
00920 
00921 
00922   private:
00923     void getYouBotMailboxMsg(YouBotSlaveMailboxMsg& message) const;
00924 
00925     void setYouBotMailboxMsg(const YouBotSlaveMailboxMsg& message);
00926 
00927     std::string getName() const {return this->name;};
00928 
00929     ParameterType getType() const {return this->parameterType;};
00930 
00931     int upperLimit;
00932 
00933     int lowerLimit;
00934 
00935     int value;
00936 
00937     std::string name;
00938 
00939     ParameterType parameterType;
00940 
00941 };
00942 ///////////////////////////////////////////////////////////////////////////////
00943 /// The most important motor setting, since too high values might cause motor damage! The maximum value is 255. This value means 100% of the maximum current of the module. The current adjustment is within the range 0... 255 and can be adjusted in 32 steps (0... 255 divided by eight; e.g. step 0 = 0... 7, step 1 = 8... 15 and so on).
00944 
00945 ///////////////////////////////////////////////////////////////////////////////
00946 class MaximumCurrent : public YouBotGripperParameter {
00947 friend class YouBotGripper;
00948 friend class YouBotGripperBar;
00949   public:
00950     MaximumCurrent();
00951 
00952     virtual ~MaximumCurrent();
00953 
00954     void getParameter(int& parameter) const;
00955 
00956     void setParameter(const int parameter);
00957 
00958     void toString(std::string& value) const;
00959 
00960 
00961   private:
00962     void getYouBotMailboxMsg(YouBotSlaveMailboxMsg& message) const;
00963 
00964     void setYouBotMailboxMsg(const YouBotSlaveMailboxMsg& message);
00965 
00966     std::string getName() const {return this->name;};
00967 
00968     ParameterType getType() const {return this->parameterType;};
00969 
00970     int upperLimit;
00971 
00972     int lowerLimit;
00973 
00974     int value;
00975 
00976     std::string name;
00977 
00978     ParameterType parameterType;
00979 
00980 };
00981 ///////////////////////////////////////////////////////////////////////////////
00982 /// The limit for acceleration (and deceleration). Changing this parameter requires re-calculation of the acceleration factor (no. 146) and the acceleration divisor (no. 137), which is done automatically.
00983 ///////////////////////////////////////////////////////////////////////////////
00984 class MaximumPositioningSpeed : public YouBotGripperParameter {
00985 friend class YouBotGripper;
00986 friend class YouBotGripperBar;
00987   public:
00988     MaximumPositioningSpeed();
00989 
00990     virtual ~MaximumPositioningSpeed();
00991 
00992     void getParameter(int& parameter) const;
00993 
00994     void setParameter(const int parameter);
00995 
00996     void toString(std::string& value) const;
00997 
00998 
00999   private:
01000     void getYouBotMailboxMsg(YouBotSlaveMailboxMsg& message) const;
01001 
01002     void setYouBotMailboxMsg(const YouBotSlaveMailboxMsg& message);
01003 
01004     std::string getName() const {return this->name;};
01005 
01006     ParameterType getType() const {return this->parameterType;};
01007 
01008     int upperLimit;
01009 
01010     int lowerLimit;
01011 
01012     int value;
01013 
01014     std::string name;
01015 
01016     ParameterType parameterType;
01017 
01018 };
01019 ///////////////////////////////////////////////////////////////////////////////
01020 /// 0: full step
01021 /// 1: half step
01022 /// 2: 4 microsteps
01023 /// 3: 8 microsteps
01024 /// 4: 16 microsteps
01025 /// 5: 32 microsteps
01026 /// 6: 64 microsteps
01027 /// 7: 128 microsteps
01028 /// 8: 256 microsteps
01029 ///////////////////////////////////////////////////////////////////////////////
01030 class MicrostepResolution : public YouBotGripperParameter {
01031 friend class YouBotGripper;
01032 friend class YouBotGripperBar;
01033 
01034   public:
01035     MicrostepResolution();
01036 
01037     virtual ~MicrostepResolution();
01038 
01039     void getParameter(unsigned int& parameter) const;
01040 
01041     void setParameter(const unsigned int& parameter);
01042 
01043     void toString(std::string& value) const;
01044 
01045 
01046   private:
01047     void getYouBotMailboxMsg(YouBotSlaveMailboxMsg& message) const;
01048 
01049     void setYouBotMailboxMsg(const YouBotSlaveMailboxMsg& message);
01050 
01051     std::string getName() const {return this->name;};
01052 
01053     ParameterType getType() const {return this->parameterType;};
01054 
01055     unsigned int upperLimit;
01056 
01057     unsigned int lowerLimit;
01058 
01059     unsigned int value;
01060 
01061     std::string name;
01062 
01063     ParameterType parameterType;
01064 
01065 };
01066 ///////////////////////////////////////////////////////////////////////////////
01067 /// Standstill period before the current is changed down to standby current. The standard value is 200 (value equates 2000msec).
01068 ///////////////////////////////////////////////////////////////////////////////
01069 class PowerDownDelay : public YouBotGripperParameter {
01070 friend class YouBotGripper;
01071 friend class YouBotGripperBar;
01072   public:
01073     PowerDownDelay();
01074 
01075     virtual ~PowerDownDelay();
01076 
01077     void getParameter(unsigned int& parameter) const;
01078 
01079     void setParameter(const unsigned int& parameter);
01080 
01081     void toString(std::string& value) const;
01082 
01083 
01084   private:
01085     void getYouBotMailboxMsg(YouBotSlaveMailboxMsg& message) const;
01086 
01087     void setYouBotMailboxMsg(const YouBotSlaveMailboxMsg& message);
01088 
01089     std::string getName() const {return this->name;};
01090 
01091     ParameterType getType() const {return this->parameterType;};
01092 
01093     unsigned int upperLimit;
01094 
01095     unsigned int lowerLimit;
01096 
01097     unsigned int value;
01098 
01099     std::string name;
01100 
01101     ParameterType parameterType;
01102 
01103 };
01104 ///////////////////////////////////////////////////////////////////////////////
01105 /// The exponent of the scaling factor for the pulse (step) generator   should be de/incremented carefully (in steps of one).
01106 ///////////////////////////////////////////////////////////////////////////////
01107 class PulseDivisor : public YouBotGripperParameter {
01108 friend class YouBotGripper;
01109 friend class YouBotGripperBar;
01110 
01111 
01112   public:
01113     PulseDivisor();
01114 
01115     virtual ~PulseDivisor();
01116 
01117     void getParameter(unsigned int& parameter) const;
01118 
01119     void setParameter(const unsigned int& parameter);
01120 
01121     void toString(std::string& value) const;
01122 
01123 
01124   private:
01125     void getYouBotMailboxMsg(YouBotSlaveMailboxMsg& message) const;
01126 
01127     void setYouBotMailboxMsg(const YouBotSlaveMailboxMsg& message);
01128 
01129     std::string getName() const {return this->name;};
01130 
01131     ParameterType getType() const {return this->parameterType;};
01132 
01133     unsigned int upperLimit;
01134 
01135     unsigned int lowerLimit;
01136 
01137     unsigned int value;
01138 
01139     std::string name;
01140 
01141     ParameterType parameterType;
01142 
01143 };
01144 ///////////////////////////////////////////////////////////////////////////////
01145 /// The exponent of the scaling factor for the ramp generator- should be de/incremented carefully (in steps of one).
01146 ///////////////////////////////////////////////////////////////////////////////
01147 class RampDivisor : public YouBotGripperParameter {
01148 friend class YouBotGripper;
01149 friend class YouBotGripperBar;
01150 
01151   public:
01152     RampDivisor();
01153 
01154     virtual ~RampDivisor();
01155 
01156     void getParameter(unsigned int& parameter) const;
01157 
01158     void setParameter(const unsigned int& parameter);
01159 
01160     void toString(std::string& value) const;
01161 
01162 
01163   private:
01164     void getYouBotMailboxMsg(YouBotSlaveMailboxMsg& message) const;
01165 
01166     void setYouBotMailboxMsg(const YouBotSlaveMailboxMsg& message);
01167 
01168     std::string getName() const {return this->name;};
01169 
01170     ParameterType getType() const {return this->parameterType;};
01171 
01172     unsigned int upperLimit;
01173 
01174     unsigned int lowerLimit;
01175 
01176     unsigned int value;
01177 
01178     std::string name;
01179 
01180     ParameterType parameterType;
01181 
01182 };
01183 ///////////////////////////////////////////////////////////////////////////////
01184 /// Automatically set when using ROR, ROL, MST and MVP.
01185 /// 0: position mode. Steps are generated, when the parameters actual position and target position differ. Trapezoidal speed ramps are provided.
01186 /// 2: velocity mode. The motor will run continuously and the speed will be changed with constant (maximum) acceleration, if the parameter target speed is changed. For special purposes, the soft mode (value 1) with exponential decrease of speed can be selected.
01187 ///////////////////////////////////////////////////////////////////////////////
01188 class RampMode : public YouBotGripperParameter {
01189 friend class YouBotGripper;
01190 friend class YouBotGripperBar;
01191 
01192   public:
01193     RampMode();
01194 
01195     virtual ~RampMode();
01196 
01197     void getParameter(unsigned int& parameter) const;
01198 
01199     void setParameter(const unsigned int& parameter);
01200 
01201     void toString(std::string& value) const;
01202 
01203 
01204   private:
01205     void getYouBotMailboxMsg(YouBotSlaveMailboxMsg& message) const;
01206 
01207     void setYouBotMailboxMsg(const YouBotSlaveMailboxMsg& message);
01208 
01209     std::string getName() const {return this->name;};
01210 
01211     ParameterType getType() const {return this->parameterType;};
01212 
01213     unsigned int upperLimit;
01214 
01215     unsigned int lowerLimit;
01216 
01217     unsigned int value;
01218 
01219     std::string name;
01220 
01221     ParameterType parameterType;
01222 
01223 };
01224 ///////////////////////////////////////////////////////////////////////////////
01225 /// 0: 3.2 s
01226 /// 1: 1.6 s
01227 /// 2: 1.2 s
01228 /// 3: 0.8 s
01229 /// Use default value!
01230 
01231 
01232 ///////////////////////////////////////////////////////////////////////////////
01233 class ShortDetectionTimer : public YouBotGripperParameter {
01234 friend class YouBotGripper;
01235 friend class YouBotGripperBar;
01236   public:
01237     ShortDetectionTimer();
01238 
01239     virtual ~ShortDetectionTimer();
01240 
01241     void getParameter(unsigned int& parameter) const;
01242 
01243     void setParameter(const unsigned int& parameter);
01244 
01245     void toString(std::string& value) const;
01246 
01247 
01248   private:
01249     void getYouBotMailboxMsg(YouBotSlaveMailboxMsg& message) const;
01250 
01251     void setYouBotMailboxMsg(const YouBotSlaveMailboxMsg& message);
01252 
01253     std::string getName() const {return this->name;};
01254 
01255     ParameterType getType() const {return this->parameterType;};
01256 
01257     unsigned int upperLimit;
01258 
01259     unsigned int lowerLimit;
01260 
01261     unsigned int value;
01262 
01263     std::string name;
01264 
01265     ParameterType parameterType;
01266 
01267 };
01268 ///////////////////////////////////////////////////////////////////////////////
01269 /// 0: Short to GND protection is on
01270 /// 1: Short to GND protection is disabled
01271 /// Use default value!
01272 
01273 ///////////////////////////////////////////////////////////////////////////////
01274 class ShortProtectionDisable : public YouBotGripperParameter {
01275 friend class YouBotGripper;
01276 friend class YouBotGripperBar;
01277   public:
01278     ShortProtectionDisable();
01279 
01280     virtual ~ShortProtectionDisable();
01281 
01282     void getParameter(bool& parameter) const;
01283 
01284     void setParameter(const bool parameter);
01285 
01286     void toString(std::string& value) const;
01287 
01288 
01289   private:
01290     void getYouBotMailboxMsg(YouBotSlaveMailboxMsg& message) const;
01291 
01292     void setYouBotMailboxMsg(const YouBotSlaveMailboxMsg& message);
01293 
01294     std::string getName() const {return this->name;};
01295 
01296     ParameterType getType() const {return this->parameterType;};
01297 
01298     bool value;
01299 
01300     std::string name;
01301 
01302     ParameterType parameterType;
01303 
01304 };
01305 ///////////////////////////////////////////////////////////////////////////////
01306 /// Determines the slope of the motor driver outputs. Set to 2 or 3 for this module or rather use the default value.
01307 /// 0: lowest slope
01308 /// 3: fastest slope
01309 
01310 ///////////////////////////////////////////////////////////////////////////////
01311 class SlopeControlHighSide : public YouBotGripperParameter {
01312 friend class YouBotGripper;
01313 friend class YouBotGripperBar;
01314   public:
01315     SlopeControlHighSide();
01316 
01317     virtual ~SlopeControlHighSide();
01318 
01319     void getParameter(unsigned int& parameter) const;
01320 
01321     void setParameter(const unsigned int& parameter);
01322 
01323     void toString(std::string& value) const;
01324 
01325 
01326   private:
01327     void getYouBotMailboxMsg(YouBotSlaveMailboxMsg& message) const;
01328 
01329     void setYouBotMailboxMsg(const YouBotSlaveMailboxMsg& message);
01330 
01331     std::string getName() const {return this->name;};
01332 
01333     ParameterType getType() const {return this->parameterType;};
01334 
01335     unsigned int upperLimit;
01336 
01337     unsigned int lowerLimit;
01338 
01339     unsigned int value;
01340 
01341     std::string name;
01342 
01343     ParameterType parameterType;
01344 
01345 };
01346 ///////////////////////////////////////////////////////////////////////////////
01347 /// Determines the slope of the motor driver outputs. Set identical to slope control high side.
01348 
01349 ///////////////////////////////////////////////////////////////////////////////
01350 class SlopeControlLowSide : public YouBotGripperParameter {
01351 friend class YouBotGripper;
01352 friend class YouBotGripperBar;
01353   public:
01354     SlopeControlLowSide();
01355 
01356     virtual ~SlopeControlLowSide();
01357 
01358     void getParameter(unsigned int& parameter) const;
01359 
01360     void setParameter(const unsigned int& parameter);
01361 
01362     void toString(std::string& value) const;
01363 
01364 
01365   private:
01366     void getYouBotMailboxMsg(YouBotSlaveMailboxMsg& message) const;
01367 
01368     void setYouBotMailboxMsg(const YouBotSlaveMailboxMsg& message);
01369 
01370     std::string getName() const {return this->name;};
01371 
01372     ParameterType getType() const {return this->parameterType;};
01373 
01374     unsigned int upperLimit;
01375 
01376     unsigned int lowerLimit;
01377 
01378     unsigned int value;
01379 
01380     std::string name;
01381 
01382     ParameterType parameterType;
01383 
01384 };
01385 ///////////////////////////////////////////////////////////////////////////////
01386 /// This status value provides the actual motor current setting as controlled by coolStepTM. The value goes up to the CS value and down to the portion of CS as specified by SEIMIN.
01387 /// actual motor current scaling factor:
01388 /// 0 ... 31: 1/32, 2/32, ... 32/32
01389 
01390 
01391 ///////////////////////////////////////////////////////////////////////////////
01392 class SmartEnergyActualCurrent : public YouBotGripperParameter {
01393 friend class YouBotGripper;
01394 friend class YouBotGripperBar;
01395   public:
01396     SmartEnergyActualCurrent();
01397 
01398     virtual ~SmartEnergyActualCurrent();
01399 
01400     void getParameter(unsigned int& parameter) const;
01401 
01402     void setParameter(const unsigned int& parameter);
01403 
01404     void toString(std::string& value) const;
01405 
01406 
01407   private:
01408     void getYouBotMailboxMsg(YouBotSlaveMailboxMsg& message) const;
01409 
01410     void setYouBotMailboxMsg(const YouBotSlaveMailboxMsg& message);
01411 
01412     std::string getName() const {return this->name;};
01413 
01414     ParameterType getType() const {return this->parameterType;};
01415 
01416     unsigned int upperLimit;
01417 
01418     unsigned int lowerLimit;
01419 
01420     unsigned int value;
01421 
01422     std::string name;
01423 
01424     ParameterType parameterType;
01425 
01426 };
01427 ///////////////////////////////////////////////////////////////////////////////
01428 /// Sets the number of stallGuard2 readings current down above the upper threshold necessary for each step current decrement of the motor current.
01429 /// Number of stallGuard2 measurements per decrement:
01430 /// Scaling: 0... 3: 32, 8, 2, 1
01431 /// 0: slow decrement
01432 /// 3: fast decrement
01433 ///////////////////////////////////////////////////////////////////////////////
01434 class SmartEnergyCurrentDownStep : public YouBotGripperParameter {
01435 friend class YouBotGripper;
01436 friend class YouBotGripperBar;
01437   public:
01438     SmartEnergyCurrentDownStep();
01439 
01440     virtual ~SmartEnergyCurrentDownStep();
01441 
01442     void getParameter(unsigned int& parameter) const;
01443 
01444     void setParameter(const unsigned int& parameter);
01445 
01446     void toString(std::string& value) const;
01447 
01448 
01449   private:
01450     void getYouBotMailboxMsg(YouBotSlaveMailboxMsg& message) const;
01451 
01452     void setYouBotMailboxMsg(const YouBotSlaveMailboxMsg& message);
01453 
01454     std::string getName() const {return this->name;};
01455 
01456     ParameterType getType() const {return this->parameterType;};
01457 
01458     unsigned int upperLimit;
01459 
01460     unsigned int lowerLimit;
01461 
01462     unsigned int value;
01463 
01464     std::string name;
01465 
01466     ParameterType parameterType;
01467 
01468 };
01469 ///////////////////////////////////////////////////////////////////////////////
01470 /// Sets the lower motor current limit for current minimum coolStep operation by scaling the CS (Current Scale, see axis parameter 6) value.
01471 /// minimum motor current:
01472 /// 0   1/2 of CS
01473 /// 1   1/4 of CS
01474 ///////////////////////////////////////////////////////////////////////////////
01475 class SmartEnergyCurrentMinimum : public YouBotGripperParameter {
01476 friend class YouBotGripper;
01477 friend class YouBotGripperBar;
01478   public:
01479     SmartEnergyCurrentMinimum();
01480 
01481     virtual ~SmartEnergyCurrentMinimum();
01482 
01483     void getParameter(unsigned int& parameter) const;
01484 
01485     void setParameter(const unsigned int& parameter);
01486 
01487     void toString(std::string& value) const;
01488 
01489 
01490   private:
01491     void getYouBotMailboxMsg(YouBotSlaveMailboxMsg& message) const;
01492 
01493     void setYouBotMailboxMsg(const YouBotSlaveMailboxMsg& message);
01494 
01495     std::string getName() const {return this->name;};
01496 
01497     ParameterType getType() const {return this->parameterType;};
01498 
01499     unsigned int upperLimit;
01500 
01501     unsigned int lowerLimit;
01502 
01503     unsigned int value;
01504 
01505     std::string name;
01506 
01507     ParameterType parameterType;
01508 
01509 };
01510 ///////////////////////////////////////////////////////////////////////////////
01511 /// Sets the current increment step. The current becomes incremented for each measured stallGuard2 value below the lower threshold (see smartEnergy hysteresis start). current increment step size:
01512 /// Scaling: 0... 3: 1, 2, 4, 8
01513 /// 0: slow increment
01514 /// 3: fast increment / fast reaction to rising load
01515 
01516 ///////////////////////////////////////////////////////////////////////////////
01517 class SmartEnergyCurrentUpStep : public YouBotGripperParameter {
01518 friend class YouBotGripper;
01519 friend class YouBotGripperBar;
01520   public:
01521     SmartEnergyCurrentUpStep();
01522 
01523     virtual ~SmartEnergyCurrentUpStep();
01524 
01525     void getParameter(unsigned int& parameter) const;
01526 
01527     void setParameter(const unsigned int& parameter);
01528 
01529     void toString(std::string& value) const;
01530 
01531 
01532   private:
01533     void getYouBotMailboxMsg(YouBotSlaveMailboxMsg& message) const;
01534 
01535     void setYouBotMailboxMsg(const YouBotSlaveMailboxMsg& message);
01536 
01537     std::string getName() const {return this->name;};
01538 
01539     ParameterType getType() const {return this->parameterType;};
01540 
01541     unsigned int upperLimit;
01542 
01543     unsigned int lowerLimit;
01544 
01545     unsigned int value;
01546 
01547     std::string name;
01548 
01549     ParameterType parameterType;
01550 
01551 };
01552 ///////////////////////////////////////////////////////////////////////////////
01553 /// Sets the distance between the lower and the upper threshold for stallGuard2TM reading. Above the upper threshold the motor current becomes decreased.
01554 /// Hysteresis: (smartEnergy hysteresis value + 1) * 32
01555 /// Upper stallGuard2 threshold: (smartEnergy hysteresis start + smartEnergy hysteresis + 1) * 32
01556 ///////////////////////////////////////////////////////////////////////////////
01557 class SmartEnergyHysteresis : public YouBotGripperParameter {
01558 friend class YouBotGripper;
01559 friend class YouBotGripperBar;
01560   public:
01561     SmartEnergyHysteresis();
01562 
01563     virtual ~SmartEnergyHysteresis();
01564 
01565     void getParameter(unsigned int& parameter) const;
01566 
01567     void setParameter(const unsigned int& parameter);
01568 
01569     void toString(std::string& value) const;
01570 
01571 
01572   private:
01573     void getYouBotMailboxMsg(YouBotSlaveMailboxMsg& message) const;
01574 
01575     void setYouBotMailboxMsg(const YouBotSlaveMailboxMsg& message);
01576 
01577     std::string getName() const {return this->name;};
01578 
01579     ParameterType getType() const {return this->parameterType;};
01580 
01581     unsigned int upperLimit;
01582 
01583     unsigned int lowerLimit;
01584 
01585     unsigned int value;
01586 
01587     std::string name;
01588 
01589     ParameterType parameterType;
01590 
01591 };
01592 ///////////////////////////////////////////////////////////////////////////////
01593 /// The lower threshold for the stallGuard2 value (see smart Energy current up step).
01594 
01595 ///////////////////////////////////////////////////////////////////////////////
01596 class SmartEnergyHysteresisStart : public YouBotGripperParameter {
01597 friend class YouBotGripper;
01598 friend class YouBotGripperBar;
01599   public:
01600     SmartEnergyHysteresisStart();
01601 
01602     virtual ~SmartEnergyHysteresisStart();
01603 
01604     void getParameter(unsigned int& parameter) const;
01605 
01606     void setParameter(const unsigned int& parameter);
01607 
01608     void toString(std::string& value) const;
01609 
01610 
01611   private:
01612     void getYouBotMailboxMsg(YouBotSlaveMailboxMsg& message) const;
01613 
01614     void setYouBotMailboxMsg(const YouBotSlaveMailboxMsg& message);
01615 
01616     std::string getName() const {return this->name;};
01617 
01618     ParameterType getType() const {return this->parameterType;};
01619 
01620     unsigned int upperLimit;
01621 
01622     unsigned int lowerLimit;
01623 
01624     unsigned int value;
01625 
01626     std::string name;
01627 
01628     ParameterType parameterType;
01629 
01630 };
01631 ///////////////////////////////////////////////////////////////////////////////
01632 /// Sets the motor current which is used below the threshold speed.
01633 
01634 ///////////////////////////////////////////////////////////////////////////////
01635 class SmartEnergySlowRunCurrent : public YouBotGripperParameter {
01636 friend class YouBotGripper;
01637 friend class YouBotGripperBar;
01638   public:
01639     SmartEnergySlowRunCurrent();
01640 
01641     virtual ~SmartEnergySlowRunCurrent();
01642 
01643     void getParameter(unsigned int& parameter) const;
01644 
01645     void setParameter(const unsigned int& parameter);
01646 
01647     void toString(std::string& value) const;
01648 
01649 
01650   private:
01651     void getYouBotMailboxMsg(YouBotSlaveMailboxMsg& message) const;
01652 
01653     void setYouBotMailboxMsg(const YouBotSlaveMailboxMsg& message);
01654 
01655     std::string getName() const {return this->name;};
01656 
01657     ParameterType getType() const {return this->parameterType;};
01658 
01659     unsigned int upperLimit;
01660 
01661     unsigned int lowerLimit;
01662 
01663     unsigned int value;
01664 
01665     std::string name;
01666 
01667     ParameterType parameterType;
01668 
01669 };
01670 ///////////////////////////////////////////////////////////////////////////////
01671 /// Above this speed coolStep becomes enabled.
01672 
01673 ///////////////////////////////////////////////////////////////////////////////
01674 class SmartEnergyThresholdSpeed : public YouBotGripperParameter {
01675 friend class YouBotGripper;
01676 friend class YouBotGripperBar;
01677   public:
01678     SmartEnergyThresholdSpeed();
01679 
01680     virtual ~SmartEnergyThresholdSpeed();
01681 
01682     void getParameter(unsigned int& parameter) const;
01683 
01684     void setParameter(const unsigned int& parameter);
01685 
01686     void toString(std::string& value) const;
01687 
01688 
01689   private:
01690     void getYouBotMailboxMsg(YouBotSlaveMailboxMsg& message) const;
01691 
01692     void setYouBotMailboxMsg(const YouBotSlaveMailboxMsg& message);
01693 
01694     std::string getName() const {return this->name;};
01695 
01696     ParameterType getType() const {return this->parameterType;};
01697 
01698     unsigned int upperLimit;
01699 
01700     unsigned int lowerLimit;
01701 
01702     unsigned int value;
01703 
01704     std::string name;
01705 
01706     ParameterType parameterType;
01707 
01708 };
01709 ///////////////////////////////////////////////////////////////////////////////
01710 /// Enables the stallGuard2 filter for more precision of the measurement. If set, reduces the measurement frequency to one measurement per four fullsteps. In most cases it is expedient to set the filtered mode before using coolStep. Use the standard mode for step loss detection.
01711 /// 0   standard mode
01712 /// 1   filtered mode
01713 ///////////////////////////////////////////////////////////////////////////////
01714 class StallGuard2FilterEnable : public YouBotGripperParameter {
01715 friend class YouBotGripper;
01716 friend class YouBotGripperBar;
01717   public:
01718     StallGuard2FilterEnable();
01719 
01720     virtual ~StallGuard2FilterEnable();
01721 
01722     void getParameter(bool& parameter) const;
01723 
01724     void setParameter(const bool parameter);
01725 
01726     void toString(std::string& value) const;
01727 
01728 
01729   private:
01730     void getYouBotMailboxMsg(YouBotSlaveMailboxMsg& message) const;
01731 
01732     void setYouBotMailboxMsg(const YouBotSlaveMailboxMsg& message);
01733 
01734     std::string getName() const {return this->name;};
01735 
01736     ParameterType getType() const {return this->parameterType;};
01737 
01738     bool value;
01739 
01740     std::string name;
01741 
01742     ParameterType parameterType;
01743 
01744 };
01745 ///////////////////////////////////////////////////////////////////////////////
01746 /// This signed value controls stallGuard2 threshold level for stall output and sets the optimum measurement range for readout. A lower value gives a higher sensitivity. Zero is the starting value. A higher value makes stallGuard2 less sensitive and requires more torque to indicate a stall. 
01747 /// 0 Indifferent value
01748 /// 1... 63 less sensitivity
01749 /// -1... -64 higher sensitivity
01750 ///////////////////////////////////////////////////////////////////////////////
01751 class StallGuard2Threshold : public YouBotGripperParameter {
01752 friend class YouBotGripper;
01753 friend class YouBotGripperBar;
01754   public:
01755     StallGuard2Threshold();
01756 
01757     virtual ~StallGuard2Threshold();
01758 
01759     void getParameter(int& parameter) const;
01760 
01761     void setParameter(const int parameter);
01762 
01763     void toString(std::string& value) const;
01764 
01765 
01766   private:
01767     void getYouBotMailboxMsg(YouBotSlaveMailboxMsg& message) const;
01768 
01769     void setYouBotMailboxMsg(const YouBotSlaveMailboxMsg& message);
01770 
01771     std::string getName() const {return this->name;};
01772 
01773     ParameterType getType() const {return this->parameterType;};
01774 
01775     int upperLimit;
01776 
01777     int lowerLimit;
01778 
01779     int value;
01780 
01781     std::string name;
01782 
01783     ParameterType parameterType;
01784 
01785 };
01786 ///////////////////////////////////////////////////////////////////////////////
01787 /// The current limit two seconds after the motor has stopped.
01788 
01789 ///////////////////////////////////////////////////////////////////////////////
01790 class StandbyCurrent : public YouBotGripperParameter {
01791 friend class YouBotGripper;
01792 friend class YouBotGripperBar;
01793 
01794   public:
01795     StandbyCurrent();
01796 
01797     virtual ~StandbyCurrent();
01798 
01799     void getParameter(int& parameter) const;
01800 
01801     void setParameter(const int parameter);
01802 
01803     void toString(std::string& value) const;
01804 
01805 
01806   private:
01807     void getYouBotMailboxMsg(YouBotSlaveMailboxMsg& message) const;
01808 
01809     void setYouBotMailboxMsg(const YouBotSlaveMailboxMsg& message);
01810 
01811     std::string getName() const {return this->name;};
01812 
01813     ParameterType getType() const {return this->parameterType;};
01814 
01815     int upperLimit;
01816 
01817     int lowerLimit;
01818 
01819     int value;
01820 
01821     std::string name;
01822 
01823     ParameterType parameterType;
01824 
01825 };
01826 ///////////////////////////////////////////////////////////////////////////////
01827 /// Step interpolation is supported with a 16 microstep setting only. In this setting, each step impulse at the input causes the execution of 16 times 1/256 microsteps. This way, a smooth motor movement like in 256 microstep resolution is achieved.
01828 /// 0   step interpolation off
01829 /// 1   step interpolation on
01830 
01831 ///////////////////////////////////////////////////////////////////////////////
01832 class StepInterpolationEnable : public YouBotGripperParameter {
01833 friend class YouBotGripper;
01834 friend class YouBotGripperBar;
01835 
01836 
01837   public:
01838     StepInterpolationEnable();
01839 
01840     virtual ~StepInterpolationEnable();
01841 
01842     void getParameter(bool& parameter) const;
01843 
01844     void setParameter(const bool parameter);
01845 
01846     void toString(std::string& value) const;
01847 
01848 
01849   private:
01850     void getYouBotMailboxMsg(YouBotSlaveMailboxMsg& message) const;
01851 
01852     void setYouBotMailboxMsg(const YouBotSlaveMailboxMsg& message);
01853 
01854     std::string getName() const {return this->name;};
01855 
01856     ParameterType getType() const {return this->parameterType;};
01857 
01858     bool value;
01859 
01860     std::string name;
01861 
01862     ParameterType parameterType;
01863 
01864 };
01865 ///////////////////////////////////////////////////////////////////////////////
01866 /// Motor stop in case of stall.
01867 ///////////////////////////////////////////////////////////////////////////////
01868 class StopOnStall : public YouBotGripperParameter {
01869 friend class YouBotGripper;
01870 friend class YouBotGripperBar;
01871   public:
01872     StopOnStall();
01873 
01874     virtual ~StopOnStall();
01875 
01876     void getParameter(bool& parameter) const;
01877 
01878     void setParameter(const bool parameter);
01879 
01880     void toString(std::string& value) const;
01881 
01882 
01883   private:
01884     void getYouBotMailboxMsg(YouBotSlaveMailboxMsg& message) const;
01885 
01886     void setYouBotMailboxMsg(const YouBotSlaveMailboxMsg& message);
01887 
01888     std::string getName() const {return this->name;};
01889 
01890     ParameterType getType() const {return this->parameterType;};
01891 
01892     bool value;
01893 
01894     std::string name;
01895 
01896     ParameterType parameterType;
01897 
01898 };
01899 ///////////////////////////////////////////////////////////////////////////////
01900 /// sense resistor voltage based current scaling
01901 /// 0: Full scale sense resistor voltage is 1/18 VDD
01902 /// 1: Full scale sense resistor voltage is 1/36 VDD
01903 /// (refers to a current setting of 31 and DAC value 255)
01904 /// Use default value. Do not change!
01905 
01906 ///////////////////////////////////////////////////////////////////////////////
01907 class Vsense : public YouBotGripperParameter {
01908 friend class YouBotGripper;
01909 friend class YouBotGripperBar;
01910   public:
01911     Vsense();
01912 
01913     virtual ~Vsense();
01914 
01915     void getParameter(unsigned int& parameter) const;
01916 
01917     void setParameter(const unsigned int& parameter);
01918 
01919     void toString(std::string& value) const;
01920 
01921 
01922   private:
01923     void getYouBotMailboxMsg(YouBotSlaveMailboxMsg& message) const;
01924 
01925     void setYouBotMailboxMsg(const YouBotSlaveMailboxMsg& message);
01926 
01927     std::string getName() const {return this->name;};
01928 
01929     ParameterType getType() const {return this->parameterType;};
01930 
01931     unsigned int upperLimit;
01932 
01933     unsigned int lowerLimit;
01934 
01935     unsigned int value;
01936 
01937     std::string name;
01938 
01939     ParameterType parameterType;
01940 
01941 };
01942 ///////////////////////////////////////////////////////////////////////////////
01943 /// The current acceleration (read only).
01944 ///////////////////////////////////////////////////////////////////////////////
01945 class ActualAcceleration : public YouBotGripperParameter {
01946 friend class YouBotGripper;
01947 friend class YouBotGripperBar;
01948   public:
01949     ActualAcceleration();
01950 
01951     virtual ~ActualAcceleration();
01952 
01953     void getParameter(int& parameter) const;
01954 
01955     void toString(std::string& value) const;
01956 
01957 
01958   private:
01959     void getYouBotMailboxMsg(YouBotSlaveMailboxMsg& message) const;
01960 
01961     void setYouBotMailboxMsg(const YouBotSlaveMailboxMsg& message);
01962 
01963     std::string getName() const {return this->name;};
01964 
01965     ParameterType getType() const {return this->parameterType;};
01966 
01967     int upperLimit;
01968 
01969     int lowerLimit;
01970 
01971     int value;
01972 
01973     std::string name;
01974 
01975     ParameterType parameterType;
01976 
01977 };
01978 ///////////////////////////////////////////////////////////////////////////////
01979 /// Should  always  be  set  1  to  ensure  exact reaching  of  the  target  position.  Do  not change!
01980 ///////////////////////////////////////////////////////////////////////////////
01981 class MinimumSpeed : public YouBotGripperParameter {
01982 friend class YouBotGripper;
01983 friend class YouBotGripperBar;
01984   public:
01985     MinimumSpeed();
01986 
01987     virtual ~MinimumSpeed();
01988 
01989     void getParameter(int& parameter) const;
01990 
01991     void setParameter(const int parameter);
01992 
01993     void toString(std::string& value) const;
01994 
01995 
01996   private:
01997     void getYouBotMailboxMsg(YouBotSlaveMailboxMsg& message) const;
01998 
01999     void setYouBotMailboxMsg(const YouBotSlaveMailboxMsg& message);
02000 
02001     std::string getName() const {return this->name;};
02002 
02003     ParameterType getType() const {return this->parameterType;};
02004 
02005     int upperLimit;
02006 
02007     int lowerLimit;
02008 
02009     int value;
02010 
02011     std::string name;
02012 
02013     ParameterType parameterType;
02014 
02015 };
02016 
02017 } // namespace youbot
02018 #endif
Generated by  doxygen 1.6.3