YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
IEncoders.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_IENCODERS_H
7#define YARP_DEV_IENCODERS_H
8
9#include <yarp/os/Vocab.h>
10#include <yarp/dev/api.h>
12
13namespace yarp::dev {
14class IEncodersRaw;
15class IEncoders;
16}
17
24{
25public:
29 virtual ~IEncodersRaw() {}
30
36 virtual yarp::dev::ReturnValue getAxes(size_t& ax) = 0;
37
44
50
57 virtual yarp::dev::ReturnValue setEncoderRaw(int j, double val)=0;
58
64 virtual yarp::dev::ReturnValue setEncodersRaw(const double *vals)=0;
65
72 virtual yarp::dev::ReturnValue getEncoderRaw(int j, double *v)=0;
73
79 virtual yarp::dev::ReturnValue getEncodersRaw(double *encs)=0;
80
87 virtual yarp::dev::ReturnValue getEncoderSpeedRaw(int j, double *sp)=0;
88
95
101 virtual yarp::dev::ReturnValue getEncoderAccelerationRaw(int j, double *spds)=0;
102
109};
110
117{
118public:
122 virtual ~IEncoders() {}
123
129 virtual yarp::dev::ReturnValue getAxes(size_t& ax) = 0;
130
137
143
150 virtual yarp::dev::ReturnValue setEncoder(int j, double val)=0;
151
157 virtual yarp::dev::ReturnValue setEncoders(const double *vals)=0;
158
165 virtual yarp::dev::ReturnValue getEncoder(int j, double *v)=0;
166
172 virtual yarp::dev::ReturnValue getEncoders(double *encs)=0;
173
180 virtual yarp::dev::ReturnValue getEncoderSpeed(int j, double *sp)=0;
181
188
194 virtual yarp::dev::ReturnValue getEncoderAcceleration(int j, double *spds)=0;
195
202};
203
204// interface IEncoders sets
209
210// interface IEncoders gets
215
216#endif // YARP_DEV_IENCODERS_H
constexpr yarp::conf::vocab32_t VOCAB_E_RESET
Definition IEncoders.h:205
constexpr yarp::conf::vocab32_t VOCAB_ENCODER_ACCELERATIONS
Definition IEncoders.h:214
constexpr yarp::conf::vocab32_t VOCAB_ENCODER
Definition IEncoders.h:207
constexpr yarp::conf::vocab32_t VOCAB_ENCODER_SPEEDS
Definition IEncoders.h:212
constexpr yarp::conf::vocab32_t VOCAB_E_RESETS
Definition IEncoders.h:206
constexpr yarp::conf::vocab32_t VOCAB_ENCODER_SPEED
Definition IEncoders.h:211
constexpr yarp::conf::vocab32_t VOCAB_ENCODER_ACCELERATION
Definition IEncoders.h:213
constexpr yarp::conf::vocab32_t VOCAB_ENCODERS
Definition IEncoders.h:208
Control board, encoder interface.
Definition IEncoders.h:24
virtual yarp::dev::ReturnValue getEncoderSpeedsRaw(double *spds)=0
Read the instantaneous acceleration of an axis.
virtual yarp::dev::ReturnValue getEncodersRaw(double *encs)=0
Read the position of all axes.
virtual yarp::dev::ReturnValue getEncoderRaw(int j, double *v)=0
Read the value of an encoder.
virtual yarp::dev::ReturnValue setEncoderRaw(int j, double val)=0
Set the value of the encoder for a given joint.
virtual yarp::dev::ReturnValue getEncoderAccelerationsRaw(double *accs)=0
Read the instantaneous acceleration of all axes.
virtual yarp::dev::ReturnValue setEncodersRaw(const double *vals)=0
Set the value of all encoders.
virtual yarp::dev::ReturnValue getAxes(size_t &ax)=0
Get the number of controlled axes.
virtual yarp::dev::ReturnValue getEncoderSpeedRaw(int j, double *sp)=0
Read the instantaneous speed of an axis.
virtual yarp::dev::ReturnValue getEncoderAccelerationRaw(int j, double *spds)=0
Read the instantaneous acceleration of an axis.
virtual yarp::dev::ReturnValue resetEncoderRaw(int j)=0
Reset encoder, single joint.
virtual ~IEncodersRaw()
Destructor.
Definition IEncoders.h:29
virtual yarp::dev::ReturnValue resetEncodersRaw()=0
Reset encoders.
Control board, encoder interface.
Definition IEncoders.h:117
virtual yarp::dev::ReturnValue getEncoderAcceleration(int j, double *spds)=0
Read the instantaneous acceleration of an axis.
virtual yarp::dev::ReturnValue getEncoderAccelerations(double *accs)=0
Read the instantaneous acceleration of all axes.
virtual yarp::dev::ReturnValue getEncoderSpeeds(double *spds)=0
Read the instantaneous speed of all axes.
virtual yarp::dev::ReturnValue getEncoders(double *encs)=0
Read the position of all axes.
virtual yarp::dev::ReturnValue setEncoders(const double *vals)=0
Set the value of all encoders.
virtual ~IEncoders()
Destructor.
Definition IEncoders.h:122
virtual yarp::dev::ReturnValue getEncoderSpeed(int j, double *sp)=0
Read the istantaneous speed of an axis.
virtual yarp::dev::ReturnValue getEncoder(int j, double *v)=0
Read the value of an encoder.
virtual yarp::dev::ReturnValue resetEncoder(int j)=0
Reset encoder, single joint.
virtual yarp::dev::ReturnValue resetEncoders()=0
Reset encoders.
virtual yarp::dev::ReturnValue setEncoder(int j, double val)=0
Set the value of the encoder for a given joint.
virtual yarp::dev::ReturnValue getAxes(size_t &ax)=0
Get the number of controlled axes.
std::int32_t vocab32_t
Definition numeric.h:78
For streams capable of holding different kinds of content, check what they actually have.
constexpr yarp::conf::vocab32_t createVocab32(char a, char b=0, char c=0, char d=0)
Create a vocab from chars.
Definition Vocab32.h:27
The main, catch-all namespace for YARP.
Definition dirs.h:16
#define YARP_dev_API
Definition api.h:18