YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
ImplementMotorEncoders.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_IMPLEMENTMOTORENCODERS_H
7#define YARP_DEV_IMPLEMENTMOTORENCODERS_H
8
10
11namespace yarp::dev {
12class ImplementMotorEncoders;
13}
14
15namespace yarp::dev::impl {
16
17template <typename T>
18class FixedSizeBuffersManager;
19
20} // namespace yarp::dev::impl
21
23{
24protected:
26 void *helper;
28
29
38 bool initialize (int size, const int *amap, const double *enc, const double *zos);
39
44 bool uninitialize ();
45
46public:
47 /* Constructor.
48 * @param y is the pointer to the class instance inheriting from this
49 * implementation.
50 */
52
53
55
56 bool getNumberOfMotorEncoders(int *num) override;
57
58 bool resetMotorEncoder(int m) override;
59 bool resetMotorEncoders() override;
60 bool setMotorEncoder(int m, const double val) override;
61 bool setMotorEncoders(const double *vals) override;
62 bool setMotorEncoderCountsPerRevolution(int m, const double cpr) override;
63 bool getMotorEncoderCountsPerRevolution(int m, double *cpr) override;
64 bool getMotorEncoder(int m, double *v) override;
65 bool getMotorEncodersTimed(double *encs, double *time) override;
66 bool getMotorEncoderTimed(int m, double *v, double *t) override;
67 bool getMotorEncoders(double *encs) override;
68 bool getMotorEncoderSpeed(int m, double *spds) override;
69 bool getMotorEncoderSpeeds(double *spds) override;
70 bool getMotorEncoderAcceleration(int m, double *spds) override;
71 bool getMotorEncoderAccelerations(double *accs) override;
72};
73
74#endif // YARP_DEV_IMPLEMENTMOTORENCODERS_H
Control board, encoder interface.
Control board, encoder interface.
bool getMotorEncoderAccelerations(double *accs) override
Read the instantaneous acceleration of all motor encoders.
bool setMotorEncoderCountsPerRevolution(int m, const double cpr) override
Sets number of counts per revolution for motor encoder m.
bool getMotorEncodersTimed(double *encs, double *time) override
Read the instantaneous position of all motor encoders.
bool uninitialize()
Clean up internal data and memory.
bool getMotorEncoderSpeeds(double *spds) override
Read the instantaneous speed of all motor encoders.
bool getMotorEncoderTimed(int m, double *v, double *t) override
Read the instantaneous position of a motor encoder.
bool getMotorEncoder(int m, double *v) override
Read the value of a motor encoder.
bool getMotorEncoderSpeed(int m, double *spds) override
Read the istantaneous speed of a motor encoder.
bool setMotorEncoder(int m, const double val) override
Set the value of the motor encoder for a given motor.
yarp::dev::impl::FixedSizeBuffersManager< double > * buffManager
bool getMotorEncoderAcceleration(int m, double *spds) override
Read the instantaneous acceleration of a motor encoder.
bool setMotorEncoders(const double *vals) override
Set the value of all motor encoders.
bool getMotorEncoderCountsPerRevolution(int m, double *cpr) override
Gets number of counts per revolution for motor encoder m.
bool resetMotorEncoder(int m) override
Reset motor encoder, single motor.
bool resetMotorEncoders() override
Reset motor encoders.
bool getMotorEncoders(double *encs) override
Read the position of all motor encoders.
bool getNumberOfMotorEncoders(int *num) override
Get the number of available motor encoders.
bool initialize(int size, const int *amap, const double *enc, const double *zos)
Initialize the internal data and alloc memory.
A manager of fixed size buffers in multi-thread environment.
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