YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
ImplementPositionDirect.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_IPOSITIONDIRECTIMPL_H
7#define YARP_IPOSITIONDIRECTIMPL_H
8
9
11
12namespace yarp::dev {
13class ImplementPositionDirect;
14class StubImplPositionDirectRaw;
15}
16
17namespace yarp::dev::impl {
18
19template <typename T>
20class FixedSizeBuffersManager;
21
22} // namespace yarp::dev::impl
23
30{
31protected:
33 void *helper;
36
46 bool initialize (int size, const int *amap, const double *enc, const double *zos);
47
52 bool uninitialize ();
53
54public:
61
66
67 bool getAxes(int *axes) override;
68 bool setPosition(int j, double ref) override;
69 bool setPositions(const int n_joint, const int *joints, const double *refs) override;
70 bool setPositions(const double *refs) override;
71 bool getRefPosition(const int joint, double *ref) override;
72 bool getRefPositions(double *refs) override;
73 bool getRefPositions(const int n_joint, const int *joints, double *refs) override;
74};
75
76
92{
93private:
98 bool NOT_YET_IMPLEMENTED(const char *func=0);
99
100public:
102
103 bool getAxes(int *axis) override
104 {return NOT_YET_IMPLEMENTED("getAxes");}
105
106 bool setPosition(int j, double ref) override
107 {return NOT_YET_IMPLEMENTED("setPosition");}
108
109 bool setPositions(const int n_joint, const int *joints, const double *refs) override
110 {return NOT_YET_IMPLEMENTED("setPositions");}
111
112 bool setPositions(const double *refs) override
113 {return NOT_YET_IMPLEMENTED("setPositions");}
114};
115
116#endif // YARP_IPOSITIONDIRECTIMPL_H
bool NOT_YET_IMPLEMENTED(const char *txt)
Interface for a generic control board device implementing position control in encoder coordinates.
Interface for a generic control board device implementing position control.
Default implementation of the IPositionDirect interface.
bool getRefPositions(double *refs) override
Get the last position reference for all axes.
bool setPositions(const int n_joint, const int *joints, const double *refs) override
Set new reference point for all axes.
bool getAxes(int *axes) override
Get the number of controlled axes.
bool uninitialize()
Clean up internal data and memory.
yarp::dev::impl::FixedSizeBuffersManager< double > * doubleBuffManager
bool setPosition(int j, double ref) override
Set new position for a single axis.
bool getRefPosition(const int joint, double *ref) override
Get the last position reference for the specified axis.
bool initialize(int size, const int *amap, const double *enc, const double *zos)
Initialize the internal data and alloc memory.
yarp::dev::impl::FixedSizeBuffersManager< int > * intBuffManager
Stub implementation of IPositionControl2Raw interface.
bool setPosition(int j, double ref) override
Set new position for a single axis.
bool setPositions(const int n_joint, const int *joints, const double *refs) override
Set new reference point for all axes.
bool getAxes(int *axis) override
Get the number of controlled axes.
bool setPositions(const double *refs) override
Set new position for a set of axis.
A manager of fixed size buffers in multi-thread environment.
For streams capable of holding different kinds of content, check what they actually have.
Definition jointData.cpp:13
The main, catch-all namespace for YARP.
Definition dirs.h:16
#define YARP_dev_API
Definition api.h:18