YARP
Yet Another Robot Platform
IInteractionMode.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_IINTERACTIONMODE_H
7 #define YARP_DEV_IINTERACTIONMODE_H
8 
9 #include <yarp/os/Vocab.h>
10 #include <yarp/dev/api.h>
11 
12 namespace yarp {
13  namespace dev {
14  class IInteractionMode;
15  class IInteractionModeRaw;
16 
18  {
21  VOCAB_IM_UNKNOWN = yarp::os::createVocab32('u','n','k','n')
22  };
23  }
24 }
25 
30 
31 
32 
40 {
41 public:
45  virtual ~IInteractionMode() {}
46 
53  virtual bool getInteractionMode(int axis, yarp::dev::InteractionModeEnum* mode)=0;
54 
55 
67  virtual bool getInteractionModes(int n_joints, int *joints, yarp::dev::InteractionModeEnum* modes)=0;
68 
69 
76 
77 
85  virtual bool setInteractionMode(int axis, yarp::dev::InteractionModeEnum mode)=0;
86 
87 
100  virtual bool setInteractionModes(int n_joints, int *joints, yarp::dev::InteractionModeEnum* modes)=0;
101 
109 };
110 
111 
119 {
120 public:
124  virtual ~IInteractionModeRaw() {}
125 
126 
133  virtual bool getInteractionModeRaw(int axis, yarp::dev::InteractionModeEnum* mode)=0;
134 
135 
147  virtual bool getInteractionModesRaw(int n_joints, int *joints, yarp::dev::InteractionModeEnum* modes)=0;
148 
149 
156 
157 
166 
167 
180  virtual bool setInteractionModesRaw(int n_joints, int *joints, yarp::dev::InteractionModeEnum* modes)=0;
181 
189 };
190 
191 #endif // YARP_DEV_IINTERACTIONMODE_H
constexpr yarp::conf::vocab32_t VOCAB_INTERACTION_MODES
constexpr yarp::conf::vocab32_t VOCAB_INTERACTION_MODE_GROUP
constexpr yarp::conf::vocab32_t VOCAB_INTERACTION_MODE
constexpr yarp::conf::vocab32_t VOCAB_INTERFACE_INTERACTION_MODE
Interface settings the way the robot interacts with the environment: basic interaction types are Stif...
virtual bool getInteractionModesRaw(yarp::dev::InteractionModeEnum *modes)=0
Get the current interaction mode of the robot for a all the joints, values can be stiff or compliant.
virtual bool getInteractionModesRaw(int n_joints, int *joints, yarp::dev::InteractionModeEnum *modes)=0
Get the current interaction mode of the robot for a set of joints, values can be stiff or compliant.
virtual bool setInteractionModeRaw(int axis, yarp::dev::InteractionModeEnum mode)=0
Set the interaction mode of the robot, values can be stiff or compliant.
virtual bool setInteractionModesRaw(yarp::dev::InteractionModeEnum *modes)=0
Set the interaction mode of the robot for a all the joints, values can be stiff or compliant.
virtual ~IInteractionModeRaw()
Destructor.
virtual bool setInteractionModesRaw(int n_joints, int *joints, yarp::dev::InteractionModeEnum *modes)=0
Set the interaction mode of the robot for a set of joints, values can be stiff or compliant.
virtual bool getInteractionModeRaw(int axis, yarp::dev::InteractionModeEnum *mode)=0
Get the current interaction mode of the robot, values can be stiff or compliant.
Interface settings the way the robot interacts with the environment: basic interaction types are Stif...
virtual bool getInteractionMode(int axis, yarp::dev::InteractionModeEnum *mode)=0
Get the current interaction mode of the robot, values can be stiff or compliant.
virtual bool getInteractionModes(int n_joints, int *joints, yarp::dev::InteractionModeEnum *modes)=0
Get the current interaction mode of the robot for a set of joints, values can be stiff or compliant.
virtual bool getInteractionModes(yarp::dev::InteractionModeEnum *modes)=0
Get the current interaction mode of the robot for a all the joints, values can be stiff or compliant.
virtual bool setInteractionModes(yarp::dev::InteractionModeEnum *modes)=0
Set the interaction mode of the robot for a all the joints, values can be stiff or compliant.
virtual bool setInteractionModes(int n_joints, int *joints, yarp::dev::InteractionModeEnum *modes)=0
Set the interaction mode of the robot for a set of joints, values can be stiff or compliant.
virtual ~IInteractionMode()
Destructor.
virtual bool setInteractionMode(int axis, yarp::dev::InteractionModeEnum mode)=0
Set the interaction mode of the robot, values can be stiff or compliant.
std::int32_t vocab32_t
Definition: numeric.h:78
constexpr yarp::conf::vocab32_t createVocab32(char a, char b=0, char c=0, char d=0)
Create a vocab from chars.
Definition: Vocab.h:28
The main, catch-all namespace for YARP.
Definition: dirs.h:16
#define YARP_dev_API
Definition: api.h:18