YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
ImplementEncoders.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_IMPLEMENTENCODERS_H
7#define YARP_DEV_IMPLEMENTENCODERS_H
8
10#include <yarp/dev/api.h>
11
12namespace yarp::dev {
13class ImplementEncoders;
14}
15
17{
18protected:
20 void *helper;
21 double *temp;
22
31 bool initialize (int size, const int *amap, const double *enc, const double *zos);
32
37 bool uninitialize ();
38
39public:
40 /* Constructor.
41 * @param y is the pointer to the class instance inheriting from this
42 * implementation.
43 */
45
49 virtual ~ImplementEncoders();
50
51
57 bool getAxes(int *ax) override;
58
64 bool resetEncoder(int j) override;
65
70 bool resetEncoders() override;
71
78 bool setEncoder(int j, double val) override;
79
85 bool setEncoders(const double *vals) override;
86
93 bool getEncoder(int j, double *v) override;
94
100 bool getEncoders(double *encs) override;
101
108 bool getEncoderSpeed(int j, double *spds) override;
109
115 bool getEncoderSpeeds(double *spds) override;
116
122 bool getEncoderAcceleration(int j, double *spds) override;
123
129 bool getEncoderAccelerations(double *accs) override;
130};
131
132#endif // YARP_DEV_IMPLEMENTENCODERS_H
define control board standard interfaces
Control board, encoder interface.
Definition IEncoders.h:23
Control board, encoder interface.
Definition IEncoders.h:116
bool getAxes(int *ax) override
Get the number of controlled axes.
bool getEncoders(double *encs) override
Read the position of all axes.
bool getEncoder(int j, double *v) override
Read the value of an encoder.
bool getEncoderAccelerations(double *accs) override
Read the instantaneous acceleration of all axes.
bool resetEncoders() override
Reset encoders.
bool initialize(int size, const int *amap, const double *enc, const double *zos)
Initialize the internal data and alloc memory.
bool resetEncoder(int j) override
Reset encoder, single joint.
bool setEncoders(const double *vals) override
Set the value of all encoders.
bool getEncoderSpeed(int j, double *spds) override
Read the instantaneous speed of an axis.
virtual ~ImplementEncoders()
Destructor.
bool getEncoderAcceleration(int j, double *spds) override
Read the instantaneous acceleration of an axis.
bool uninitialize()
Clean up internal data and memory.
bool setEncoder(int j, double val) override
Set the value of the encoder for a given joint.
bool getEncoderSpeeds(double *spds) override
Read the instantaneous speed of all axes.
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