YARP
Yet Another Robot Platform
ImplementEncodersTimed.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_IMPLEMENTENCODERSTIMED_H
7 #define YARP_DEV_IMPLEMENTENCODERSTIMED_H
8 
10 
11 namespace yarp::dev {
12 class ImplementEncodersTimed;
13 }
14 
15 namespace yarp::dev::impl {
16 
17 template <typename T>
18 class FixedSizeBuffersManager;
19 
20 } // namespace yarp::dev::impl
21 
23 {
24 protected:
26  void *helper;
28 
29 
38  bool initialize (int size, const int *amap, const double *enc, const double *zos);
39 
44  bool uninitialize ();
45 
46 public:
47  /* Constructor.
48  * @param y is the pointer to the class instance inheriting from this
49  * implementation.
50  */
52 
53 
54  virtual ~ImplementEncodersTimed();
55 
56  bool getAxes(int *ax) override;
57 
58  bool resetEncoder(int j) override;
59  bool resetEncoders() override;
60  bool setEncoder(int j, double val) override;
61  bool setEncoders(const double *vals) override;
62  bool getEncoder(int j, double *v) override;
63  bool getEncodersTimed(double *encs, double *time) override;
64  bool getEncoderTimed(int j, double *v, double *t) override;
65  bool getEncoders(double *encs) override;
66  bool getEncoderSpeed(int j, double *spds) override;
67  bool getEncoderSpeeds(double *spds) override;
68  bool getEncoderAcceleration(int j, double *spds) override;
69  bool getEncoderAccelerations(double *accs) override;
70 };
71 
72 #endif // YARP_DEV_IMPLEMENTENCODERSTIMED_H
float t
Control board, extend encoder raw interface adding timestamps.
Control board, extend encoder interface with timestamps.
virtual bool getEncodersTimed(double *encs, double *time)=0
Read the instantaneous acceleration of all axes.
virtual bool getEncoderTimed(int j, double *encs, double *time)=0
Read the instantaneous acceleration of all axes.
virtual bool getEncoderSpeed(int j, double *sp)=0
Read the istantaneous speed of an axis.
virtual bool getEncoderAccelerations(double *accs)=0
Read the instantaneous acceleration of all axes.
virtual bool setEncoder(int j, double val)=0
Set the value of the encoder for a given joint.
virtual bool getEncoder(int j, double *v)=0
Read the value of an encoder.
virtual bool resetEncoder(int j)=0
Reset encoder, single joint.
virtual bool getAxes(int *ax)=0
Get the number of controlled axes.
virtual bool setEncoders(const double *vals)=0
Set the value of all encoders.
virtual bool getEncoders(double *encs)=0
Read the position of all axes.
virtual bool getEncoderSpeeds(double *spds)=0
Read the instantaneous speed of all axes.
virtual bool getEncoderAcceleration(int j, double *spds)=0
Read the instantaneous acceleration of an axis.
virtual bool resetEncoders()=0
Reset encoders.
ImplementEncodersTimed(yarp::dev::IEncodersTimedRaw *y)
bool initialize(int size, const int *amap, const double *enc, const double *zos)
Initialize the internal data and alloc memory.
bool uninitialize()
Clean up internal data and memory.
yarp::dev::impl::FixedSizeBuffersManager< double > * buffManager
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