YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
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
14namespace yarp::dev {
15
25{
26protected:
27 IControlLimitsRaw* m_iraw=nullptr;
28 void* m_helper=nullptr;
29 std::vector<int> m_buffer_ints;
30 std::vector<double> m_buffer_doubles;
31 std::mutex m_imp_mutex;
32
42 bool initialize (int size, const int *amap, const double *enc, const double *zos);
43
48 bool uninitialize ();
49
50
51public:
58
63 yarp::dev::ReturnValue setPosLimits(int axis, double min, double max) override;
64 yarp::dev::ReturnValue getPosLimits(int axis, double *min, double *max) override;
65 yarp::dev::ReturnValue setVelLimits(int axis, double min, double max) override;
66 yarp::dev::ReturnValue getVelLimits(int axis, double *min, double *max) override;
67};
68
69
85{
86private:
91 yarp::dev::ReturnValue NOT_YET_IMPLEMENTED(const char *func=0)
92 {
93 if (func) {
94 yError("%s: not yet implemented\n", func);
95 } else {
96 yError("Function not yet implemented\n");
97 }
98
100 }
101
102
103public:
108
109 yarp::dev::ReturnValue setPosLimitsRaw(int axis, double min, double max) override
110 {
111 return NOT_YET_IMPLEMENTED("setPosLimitsRaw");
112 }
113
114 yarp::dev::ReturnValue getPosLimitsRaw(int axis, double *min, double *max) override
115 {
116 return NOT_YET_IMPLEMENTED("getPosLimitsRaw");
117 }
118
119 yarp::dev::ReturnValue setVelLimitsRaw(int axis, double min, double max) override
120 {
121 return NOT_YET_IMPLEMENTED("setVelLimitsRaw");
122 }
123
124 yarp::dev::ReturnValue getVelLimitsRaw(int axis, double *min, double *max) override
125 {
126 return NOT_YET_IMPLEMENTED("getVelLimitsRaw");
127 }
128
129};
130
131} // namespace yarp::dev
132
133#endif // YARP_DEV_ICONTROLLIMITSIMPL_H
define control board standard interfaces
#define yError(...)
Definition Log.h:361
Interface for control devices.
Interface for control devices, commands to get/set position and velocity limits.
class ImplementControlLimits; class StubImplControlLimitsRaw;
Stub implementation of IControlLimitRaw interface.
yarp::dev::ReturnValue 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...
yarp::dev::ReturnValue getVelLimitsRaw(int axis, double *min, double *max) override
Get the software speed limits for a particular axis.
yarp::dev::ReturnValue setPosLimitsRaw(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...
yarp::dev::ReturnValue getPosLimitsRaw(int axis, double *min, double *max) override
Get the software limits for a particular axis.
For streams capable of holding different kinds of content, check what they actually have.
#define YARP_dev_API
Definition api.h:18