YARP
Yet Another Robot Platform
IInteractionMode.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2006-2020 Istituto Italiano di Tecnologia (IIT)
3  * All rights reserved.
4  *
5  * This software may be modified and distributed under the terms of the
6  * BSD-3-Clause license. See the accompanying LICENSE file for details.
7  */
8 
9 #ifndef YARP_DEV_IINTERACTIONMODE_H
10 #define YARP_DEV_IINTERACTIONMODE_H
11 
12 #include <yarp/os/Vocab.h>
13 #include <yarp/dev/api.h>
14 
15 namespace yarp {
16  namespace dev {
17  class IInteractionMode;
18  class IInteractionModeRaw;
19 
21  {
24  VOCAB_IM_UNKNOWN = yarp::os::createVocab('u','n','k','n')
25  };
26  }
27 }
28 
33 
34 
35 
43 {
44 public:
48  virtual ~IInteractionMode() {}
49 
56  virtual bool getInteractionMode(int axis, yarp::dev::InteractionModeEnum* mode)=0;
57 
58 
70  virtual bool getInteractionModes(int n_joints, int *joints, yarp::dev::InteractionModeEnum* modes)=0;
71 
72 
79 
80 
88  virtual bool setInteractionMode(int axis, yarp::dev::InteractionModeEnum mode)=0;
89 
90 
103  virtual bool setInteractionModes(int n_joints, int *joints, yarp::dev::InteractionModeEnum* modes)=0;
104 
112 };
113 
114 
122 {
123 public:
127  virtual ~IInteractionModeRaw() {}
128 
129 
136  virtual bool getInteractionModeRaw(int axis, yarp::dev::InteractionModeEnum* mode)=0;
137 
138 
150  virtual bool getInteractionModesRaw(int n_joints, int *joints, yarp::dev::InteractionModeEnum* modes)=0;
151 
152 
159 
160 
169 
170 
183  virtual bool setInteractionModesRaw(int n_joints, int *joints, yarp::dev::InteractionModeEnum* modes)=0;
184 
192 };
193 
194 #endif // YARP_DEV_IINTERACTIONMODE_H
yarp::os::createVocab
constexpr yarp::conf::vocab32_t createVocab(char a, char b=0, char c=0, char d=0)
Definition: Vocab.h:22
VOCAB_INTERACTION_MODES
constexpr yarp::conf::vocab32_t VOCAB_INTERACTION_MODES
Definition: IInteractionMode.h:32
yarp::dev::IInteractionMode::setInteractionModes
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.
yarp::dev::VOCAB_IM_COMPLIANT
@ VOCAB_IM_COMPLIANT
Definition: IInteractionMode.h:23
VOCAB_INTERACTION_MODE
constexpr yarp::conf::vocab32_t VOCAB_INTERACTION_MODE
Definition: IInteractionMode.h:30
yarp::dev::IInteractionModeRaw::setInteractionModesRaw
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.
yarp::dev::IInteractionMode::getInteractionModes
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.
yarp::dev::IInteractionModeRaw::getInteractionModesRaw
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.
yarp::dev::IInteractionMode
Interface settings the way the robot interacts with the environment: basic interaction types are Stif...
Definition: IInteractionMode.h:43
yarp::dev::IInteractionModeRaw
Interface settings the way the robot interacts with the environment: basic interaction types are Stif...
Definition: IInteractionMode.h:122
VOCAB_INTERFACE_INTERACTION_MODE
constexpr yarp::conf::vocab32_t VOCAB_INTERFACE_INTERACTION_MODE
Definition: IInteractionMode.h:29
VOCAB_INTERACTION_MODE_GROUP
constexpr yarp::conf::vocab32_t VOCAB_INTERACTION_MODE_GROUP
Definition: IInteractionMode.h:31
yarp::dev::IInteractionModeRaw::getInteractionModesRaw
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.
yarp::dev::IInteractionMode::getInteractionMode
virtual bool getInteractionMode(int axis, yarp::dev::InteractionModeEnum *mode)=0
Get the current interaction mode of the robot, values can be stiff or compliant.
yarp::dev::IInteractionModeRaw::setInteractionModeRaw
virtual bool setInteractionModeRaw(int axis, yarp::dev::InteractionModeEnum mode)=0
Set the interaction mode of the robot, values can be stiff or compliant.
yarp::dev::InteractionModeEnum
InteractionModeEnum
Definition: IInteractionMode.h:21
yarp::dev::IInteractionMode::setInteractionModes
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.
yarp::dev::IInteractionMode::~IInteractionMode
virtual ~IInteractionMode()
Destructor.
Definition: IInteractionMode.h:48
YARP_dev_API
#define YARP_dev_API
Definition: api.h:19
yarp::dev::VOCAB_IM_STIFF
@ VOCAB_IM_STIFF
Definition: IInteractionMode.h:22
yarp
The main, catch-all namespace for YARP.
Definition: environment.h:18
yarp::conf::vocab32_t
std::int32_t vocab32_t
Definition: numeric.h:52
Vocab.h
yarp::dev::IInteractionMode::getInteractionModes
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.
yarp::dev::IInteractionMode::setInteractionMode
virtual bool setInteractionMode(int axis, yarp::dev::InteractionModeEnum mode)=0
Set the interaction mode of the robot, values can be stiff or compliant.
yarp::dev::IInteractionModeRaw::getInteractionModeRaw
virtual bool getInteractionModeRaw(int axis, yarp::dev::InteractionModeEnum *mode)=0
Get the current interaction mode of the robot, values can be stiff or compliant.
api.h
yarp::dev::IInteractionModeRaw::setInteractionModesRaw
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.
yarp::dev::VOCAB_IM_UNKNOWN
@ VOCAB_IM_UNKNOWN
Definition: IInteractionMode.h:24
yarp::dev::IInteractionModeRaw::~IInteractionModeRaw
virtual ~IInteractionModeRaw()
Destructor.
Definition: IInteractionMode.h:127