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:
32 IPositionDirectRaw* m_iraw=nullptr;
33 void* m_helper=nullptr;
34 std::vector<int> m_buffer_ints;
35 std::vector<double> m_buffer_doubles;
36 std::mutex m_imp_mutex;
37
47 bool initialize (int size, const int *amap, const double *enc, const double *zos);
48
53 bool uninitialize ();
54
55public:
62
67
68 yarp::dev::ReturnValue getAxes(size_t& axes) override;
69 yarp::dev::ReturnValue setPosition(int j, double ref) override;
70 yarp::dev::ReturnValue setPositions(const int n_joint, const int *joints, const double *refs) override;
71 yarp::dev::ReturnValue setPositions(const double *refs) override;
72 yarp::dev::ReturnValue getRefPosition(const int joint, double *ref) override;
73 yarp::dev::ReturnValue getRefPositions(double *refs) override;
74 yarp::dev::ReturnValue getRefPositions(const int n_joint, const int *joints, double *refs) override;
75};
76
77
93{
94public:
96
97 yarp::dev::ReturnValue getAxes(size_t& axis) override
99
100 yarp::dev::ReturnValue setPosition(int j, double ref) override
102
103 yarp::dev::ReturnValue setPositions(const int n_joint, const int *joints, const double *refs) override
105
106 yarp::dev::ReturnValue setPositions(const double *refs) override
108};
109
110#endif // YARP_IPOSITIONDIRECTIMPL_H
#define YARP_METHOD_NOT_YET_IMPLEMENTED()
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 uninitialize()
Clean up internal data and memory.
yarp::dev::ReturnValue getRefPosition(const int joint, double *ref) override
Get the last position reference for the specified axis.
yarp::dev::ReturnValue getRefPositions(double *refs) override
Get the last position reference for all axes.
yarp::dev::ReturnValue setPositions(const int n_joint, const int *joints, const double *refs) override
Set new reference point for all axes.
bool initialize(int size, const int *amap, const double *enc, const double *zos)
Initialize the internal data and alloc memory.
yarp::dev::ReturnValue getAxes(size_t &axes) override
Get the number of controlled axes.
yarp::dev::ReturnValue setPosition(int j, double ref) override
Set new position for a single axis.
Stub implementation of IPositionControl2Raw interface.
yarp::dev::ReturnValue setPosition(int j, double ref) override
Set new position for a single axis.
yarp::dev::ReturnValue setPositions(const double *refs) override
Set new position for a set of axis.
yarp::dev::ReturnValue setPositions(const int n_joint, const int *joints, const double *refs) override
Set new reference point for all axes.
yarp::dev::ReturnValue getAxes(size_t &axis) override
Get the number of controlled axes.
For streams capable of holding different kinds of content, check what they actually have.
The main, catch-all namespace for YARP.
Definition dirs.h:16
#define YARP_dev_API
Definition api.h:18