YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
ImplementInteractionMode.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_IINTERACTIONMODEIMPL_H
7#define YARP_DEV_IINTERACTIONMODEIMPL_H
8
9#include <yarp/dev/api.h>
11#include <yarp/os/Log.h>
12#include <vector>
13
14namespace yarp::dev {
15class ImplementInteractionMode;
16class StubImplInteractionModeRaw;
17}
18
19namespace yarp::dev::impl {
20
21template <typename T>
22class FixedSizeBuffersManager;
23
24} // namespace yarp::dev::impl
25
33{
34protected:
36 void* m_helper=nullptr;
37 std::mutex m_imp_mutex;
38 std::vector<int> m_buffer_ints;
39 std::vector<double> m_buffer_doubles;
40 std::vector< yarp::dev::InteractionModeEnum> m_buffer_enums;
41
48 bool initialize (int size, const int *amap);
49
59 bool initialize (int size, const int *amap, const double *enc, const double *zos);
60
61
66 bool uninitialize ();
67
68
69public:
76
81
82 // Methods are documented in the <yarp/dev/IInteractionMode.h> file
84 yarp::dev::ReturnValue getInteractionModes(const std::vector<int>& joints, std::vector <yarp::dev::InteractionModeEnum>& modes) override;
85 yarp::dev::ReturnValue getInteractionModes(std::vector<yarp::dev::InteractionModeEnum>& modes) override;
86
88 yarp::dev::ReturnValue setInteractionModes(const std::vector<int>& joints, const std::vector< yarp::dev::InteractionModeEnum>& modes) override;
89 yarp::dev::ReturnValue setInteractionModes(const std::vector <InteractionModeEnum>& modes) override;
90};
91
92
108{
109public:
114
119
120 yarp::dev::ReturnValue getInteractionModesRaw(const std::vector<int>& joints, std::vector<yarp::dev::InteractionModeEnum>& modes) override
121 {
123 }
124
125 yarp::dev::ReturnValue getInteractionModesRaw(std::vector<yarp::dev::InteractionModeEnum>& modes) override
126 {
128 }
129
134
135 yarp::dev::ReturnValue setInteractionModesRaw(const std::vector<int>& joints, const std::vector<yarp::dev::InteractionModeEnum>& modes) override
136 {
138 }
139
140 yarp::dev::ReturnValue setInteractionModesRaw(const std::vector<yarp::dev::InteractionModeEnum>& modes) override
141 {
143 }
144};
145
146#endif // YARP_DEV_IINTERACTIONMODEIMPL_H
#define YARP_METHOD_NOT_YET_IMPLEMENTED()
Interface settings the way the robot interacts with the environment: basic interaction types are Stif...
Interface settings the way the robot interacts with the environment: basic interaction types are Stif...
Interface settings the way the robot interacts with the environment: basic interaction types are Stif...
yarp::dev::ReturnValue setInteractionModes(const std::vector< int > &joints, const std::vector< yarp::dev::InteractionModeEnum > &modes) override
Set the interaction mode of the robot for a set of joints, values can be stiff or compliant.
bool uninitialize()
Clean up internal data and memory.
yarp::dev::ReturnValue setInteractionMode(int axis, yarp::dev::InteractionModeEnum mode) override
Set the interaction mode of the robot, values can be stiff or compliant.
std::vector< yarp::dev::InteractionModeEnum > m_buffer_enums
yarp::dev::ReturnValue getInteractionMode(int axis, yarp::dev::InteractionModeEnum &mode) override
Get the current interaction mode of the robot, values can be stiff or compliant.
yarp::dev::ReturnValue getInteractionModes(const std::vector< int > &joints, std::vector< yarp::dev::InteractionModeEnum > &modes) override
Get the current interaction mode of the robot for a set of joints, values can be stiff or compliant.
bool initialize(int size, const int *amap)
Initialize the internal data and alloc memory, smaller version.
Stub implementation of IInteractionMode interface.
yarp::dev::ReturnValue getInteractionModeRaw(int axis, yarp::dev::InteractionModeEnum &mode) override
Get the current interaction mode of the robot, values can be stiff or compliant.
yarp::dev::ReturnValue getInteractionModesRaw(const std::vector< int > &joints, std::vector< yarp::dev::InteractionModeEnum > &modes) override
Get the current interaction mode of the robot for a set of joints, values can be stiff or compliant.
yarp::dev::ReturnValue getInteractionModesRaw(std::vector< yarp::dev::InteractionModeEnum > &modes) override
Get the current interaction mode of the robot for a all the joints, values can be stiff or compliant.
yarp::dev::ReturnValue setInteractionModeRaw(int axis, yarp::dev::InteractionModeEnum mode) override
Set the interaction mode of the robot, values can be stiff or compliant.
yarp::dev::ReturnValue setInteractionModesRaw(const std::vector< int > &joints, const std::vector< yarp::dev::InteractionModeEnum > &modes) override
Set the interaction mode of the robot for a set of joints, values can be stiff or compliant.
yarp::dev::ReturnValue setInteractionModesRaw(const std::vector< yarp::dev::InteractionModeEnum > &modes) override
Set the interaction mode of the robot for a all the joints, values can be stiff or compliant.
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