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 {
12  namespace dev {
13  class ImplementEncodersTimed;
14  }
15 }
16 
17 namespace yarp {
18 namespace dev {
19 namespace impl {
20 
21 template <typename T>
22 class FixedSizeBuffersManager;
23 
24 } // namespace impl
25 } // namespace dev
26 } // namespace yarp
27 
29 {
30 protected:
32  void *helper;
34 
35 
44  bool initialize (int size, const int *amap, const double *enc, const double *zos);
45 
50  bool uninitialize ();
51 
52 public:
53  /* Constructor.
54  * @param y is the pointer to the class instance inheriting from this
55  * implementation.
56  */
58 
59 
60  virtual ~ImplementEncodersTimed();
61 
62  bool getAxes(int *ax) override;
63 
64  bool resetEncoder(int j) override;
65  bool resetEncoders() override;
66  bool setEncoder(int j, double val) override;
67  bool setEncoders(const double *vals) override;
68  bool getEncoder(int j, double *v) override;
69  bool getEncodersTimed(double *encs, double *time) override;
70  bool getEncoderTimed(int j, double *v, double *t) override;
71  bool getEncoders(double *encs) override;
72  bool getEncoderSpeed(int j, double *spds) override;
73  bool getEncoderSpeeds(double *spds) override;
74  bool getEncoderAcceleration(int j, double *spds) override;
75  bool getEncoderAccelerations(double *accs) override;
76 };
77 
78 #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
The main, catch-all namespace for YARP.
Definition: dirs.h:16
#define YARP_dev_API
Definition: api.h:18