YARP
Yet Another Robot Platform
ImplementControlLimits.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2006-2020 Istituto Italiano di Tecnologia (IIT)
3  * All rights reserved.
4  *
5  * This software may be modified and distributed under the terms of the
6  * BSD-3-Clause license. See the accompanying LICENSE file for details.
7  */
8 
9 #ifndef YARP_DEV_ICONTROLLIMITSIMPL_H
10 #define YARP_DEV_ICONTROLLIMITSIMPL_H
11 
12 
14 #include <yarp/dev/api.h>
15 #include <yarp/os/Log.h>
16 
17 namespace yarp {
18 namespace dev {
19 
29 {
30 protected:
32  void *helper;
33 
43  bool initialize (int size, const int *amap, const double *enc, const double *zos);
44 
49  bool uninitialize ();
50 
51 
52 public:
59 
63  virtual ~ImplementControlLimits();
64  bool setLimits(int axis, double min, double max) override;
65  bool getLimits(int axis, double *min, double *max) override;
66  bool setVelLimits(int axis, double min, double max) override;
67  bool getVelLimits(int axis, double *min, double *max) override;
68 };
69 
70 
86 {
87 private:
92  bool NOT_YET_IMPLEMENTED(const char *func=0)
93  {
94  if (func)
95  yError("%s: not yet implemented\n", func);
96  else
97  yError("Function not yet implemented\n");
98 
99  return false;
100  }
101 
102 
103 public:
108 
109  bool setLimitsRaw(int axis, double min, double max) override
110  {
111  return NOT_YET_IMPLEMENTED("setLimitsRaw");
112  }
113 
114  bool getLimitsRaw(int axis, double *min, double *max) override
115  {
116  return NOT_YET_IMPLEMENTED("getLimitsRaw");
117  }
118 
119  bool setVelLimitsRaw(int axis, double min, double max) override
120  {
121  return NOT_YET_IMPLEMENTED("setVelLimitsRaw");
122  }
123 
124  bool getVelLimitsRaw(int axis, double *min, double *max) override
125  {
126  return NOT_YET_IMPLEMENTED("getVelLimitsRaw");
127  }
128 
129 };
130 
131 } // namespace dev
132 } // namespace yarp
133 
134 #endif // YARP_DEV_ICONTROLLIMITSIMPL_H
yarp::dev::StubImplControlLimitsRaw
Stub implementation of IControlLimitRaw interface.
Definition: ImplementControlLimits.h:86
ControlBoardInterfaces.h
define control board standard interfaces
yError
#define yError(...)
Definition: Log.h:282
yarp::dev::StubImplControlLimitsRaw::setVelLimitsRaw
bool setVelLimitsRaw(int axis, double min, double max) override
Set the software speed limits for a particular axis, the behavior of the control card when these limi...
Definition: ImplementControlLimits.h:119
Log.h
yarp::dev::StubImplControlLimitsRaw::~StubImplControlLimitsRaw
virtual ~StubImplControlLimitsRaw()
Destructor.
Definition: ImplementControlLimits.h:107
yarp::dev::IControlLimits
Interface for control devices, commands to get/set position and veloity limits.
Definition: IControlLimits.h:33
YARP_dev_API
#define YARP_dev_API
Definition: api.h:19
yarp::dev::IControlLimitsRaw
Interface for control devices.
Definition: IControlLimits.h:83
yarp::dev::ImplementControlLimits::iLimits2
IControlLimitsRaw * iLimits2
Definition: ImplementControlLimits.h:31
yarp
The main, catch-all namespace for YARP.
Definition: environment.h:18
yarp::dev::ImplementControlLimits
class ImplementControlLimits; class StubImplControlLimitsRaw;
Definition: ImplementControlLimits.h:29
yarp::dev::StubImplControlLimitsRaw::getLimitsRaw
bool getLimitsRaw(int axis, double *min, double *max) override
Get the software limits for a particular axis.
Definition: ImplementControlLimits.h:114
yarp::dev::StubImplControlLimitsRaw::setLimitsRaw
bool setLimitsRaw(int axis, double min, double max) override
Set the software limits for a particular axis, the behavior of the control card when these limits are...
Definition: ImplementControlLimits.h:109
api.h
yarp::dev::ImplementControlLimits::helper
void * helper
Definition: ImplementControlLimits.h:32
yarp::dev::StubImplControlLimitsRaw::getVelLimitsRaw
bool getVelLimitsRaw(int axis, double *min, double *max) override
Get the software speed limits for a particular axis.
Definition: ImplementControlLimits.h:124