YARP
Yet Another Robot Platform
ImplementControlLimits.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3  * SPDX-License-Identifier: BSD-3-Clause
4  */
5 
6 #ifndef YARP_DEV_ICONTROLLIMITSIMPL_H
7 #define YARP_DEV_ICONTROLLIMITSIMPL_H
8 
9 
11 #include <yarp/dev/api.h>
12 #include <yarp/os/Log.h>
13 
14 namespace yarp {
15 namespace dev {
16 
26 {
27 protected:
29  void *helper;
30 
40  bool initialize (int size, const int *amap, const double *enc, const double *zos);
41 
46  bool uninitialize ();
47 
48 
49 public:
56 
60  virtual ~ImplementControlLimits();
61  bool setLimits(int axis, double min, double max) override;
62  bool getLimits(int axis, double *min, double *max) override;
63  bool setVelLimits(int axis, double min, double max) override;
64  bool getVelLimits(int axis, double *min, double *max) override;
65 };
66 
67 
83 {
84 private:
89  bool NOT_YET_IMPLEMENTED(const char *func=0)
90  {
91  if (func) {
92  yError("%s: not yet implemented\n", func);
93  } else {
94  yError("Function not yet implemented\n");
95  }
96 
97  return false;
98  }
99 
100 
101 public:
106 
107  bool setLimitsRaw(int axis, double min, double max) override
108  {
109  return NOT_YET_IMPLEMENTED("setLimitsRaw");
110  }
111 
112  bool getLimitsRaw(int axis, double *min, double *max) override
113  {
114  return NOT_YET_IMPLEMENTED("getLimitsRaw");
115  }
116 
117  bool setVelLimitsRaw(int axis, double min, double max) override
118  {
119  return NOT_YET_IMPLEMENTED("setVelLimitsRaw");
120  }
121 
122  bool getVelLimitsRaw(int axis, double *min, double *max) override
123  {
124  return NOT_YET_IMPLEMENTED("getVelLimitsRaw");
125  }
126 
127 };
128 
129 } // namespace dev
130 } // namespace yarp
131 
132 #endif // YARP_DEV_ICONTROLLIMITSIMPL_H
define control board standard interfaces
#define yError(...)
Definition: Log.h:279
Interface for control devices.
Interface for control devices, commands to get/set position and veloity limits.
class ImplementControlLimits; class StubImplControlLimitsRaw;
Stub implementation of IControlLimitRaw interface.
bool getVelLimitsRaw(int axis, double *min, double *max) override
Get the software speed limits for a particular axis.
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...
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...
bool getLimitsRaw(int axis, double *min, double *max) override
Get the software limits for a particular axis.
The main, catch-all namespace for YARP.
Definition: dirs.h:16
#define YARP_dev_API
Definition: api.h:18