YARP
Yet Another Robot Platform
ImplementEncodersTimed.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2006-2020 Istituto Italiano di Tecnologia (IIT)
3  * All rights reserved.
4  *
5  * This software may be modified and distributed under the terms of the
6  * BSD-3-Clause license. See the accompanying LICENSE file for details.
7  */
8 
9 #ifndef YARP_DEV_IMPLEMENTENCODERSTIMED_H
10 #define YARP_DEV_IMPLEMENTENCODERSTIMED_H
11 
13 
14 namespace yarp {
15  namespace dev {
16  class ImplementEncodersTimed;
17  }
18 }
19 
20 namespace yarp {
21 namespace dev {
22 namespace impl {
23 
24 template <typename T>
25 class FixedSizeBuffersManager;
26 
27 } // namespace impl
28 } // namespace dev
29 } // namespace yarp
30 
32 {
33 protected:
35  void *helper;
37 
38 
47  bool initialize (int size, const int *amap, const double *enc, const double *zos);
48 
53  bool uninitialize ();
54 
55 public:
56  /* Constructor.
57  * @param y is the pointer to the class instance inheriting from this
58  * implementation.
59  */
61 
62 
63  virtual ~ImplementEncodersTimed();
64 
65  bool getAxes(int *ax) override;
66 
67  bool resetEncoder(int j) override;
68  bool resetEncoders() override;
69  bool setEncoder(int j, double val) override;
70  bool setEncoders(const double *vals) override;
71  bool getEncoder(int j, double *v) override;
72  bool getEncodersTimed(double *encs, double *time) override;
73  bool getEncoderTimed(int j, double *v, double *t) override;
74  bool getEncoders(double *encs) override;
75  bool getEncoderSpeed(int j, double *spds) override;
76  bool getEncoderSpeeds(double *spds) override;
77  bool getEncoderAcceleration(int j, double *spds) override;
78  bool getEncoderAccelerations(double *accs) override;
79 };
80 
81 #endif // YARP_DEV_IMPLEMENTENCODERSTIMED_H
t
float t
Definition: FfmpegWriter.cpp:74
yarp::dev::IEncodersTimed::getEncodersTimed
virtual bool getEncodersTimed(double *encs, double *time)=0
Read the instantaneous acceleration of all axes.
yarp::dev::IEncoders::setEncoders
virtual bool setEncoders(const double *vals)=0
Set the value of all encoders.
yarp::dev::impl::FixedSizeBuffersManager< double >
yarp::dev::ImplementEncodersTimed::ImplementEncodersTimed
ImplementEncodersTimed(yarp::dev::IEncodersTimedRaw *y)
Definition: ImplementEncodersTimed.cpp:20
yarp::dev::ImplementEncodersTimed::uninitialize
bool uninitialize()
Clean up internal data and memory.
Definition: ImplementEncodersTimed.cpp:48
yarp::dev::ImplementEncodersTimed::iEncoders
IEncodersTimedRaw * iEncoders
Definition: ImplementEncodersTimed.h:34
yarp::dev::ImplementEncodersTimed
Definition: ImplementEncodersTimed.h:32
yarp::dev::ImplementEncodersTimed::buffManager
yarp::dev::impl::FixedSizeBuffersManager< double > * buffManager
Definition: ImplementEncodersTimed.h:36
yarp::dev::IEncoders::resetEncoder
virtual bool resetEncoder(int j)=0
Reset encoder, single joint.
yarp::dev::ImplementEncodersTimed::~ImplementEncodersTimed
virtual ~ImplementEncodersTimed()
Definition: ImplementEncodersTimed.cpp:26
yarp::dev::IEncoders::getEncoderAcceleration
virtual bool getEncoderAcceleration(int j, double *spds)=0
Read the instantaneous acceleration of an axis.
YARP_dev_API
#define YARP_dev_API
Definition: api.h:19
IEncodersTimed.h
yarp::dev::IEncoders::getEncoderAccelerations
virtual bool getEncoderAccelerations(double *accs)=0
Read the instantaneous acceleration of all axes.
yarp::dev::IEncoders::getAxes
virtual bool getAxes(int *ax)=0
Get the number of controlled axes.
yarp::dev::IEncodersTimedRaw
Control board, extend encoder raw interface adding timestamps.
Definition: IEncodersTimed.h:28
yarp::dev::IEncoders::getEncoder
virtual bool getEncoder(int j, double *v)=0
Read the value of an encoder.
yarp::dev::IEncodersTimed
Control board, extend encoder interface with timestamps.
Definition: IEncodersTimed.h:59
yarp
The main, catch-all namespace for YARP.
Definition: environment.h:18
yarp::dev::IEncoders::setEncoder
virtual bool setEncoder(int j, double val)=0
Set the value of the encoder for a given joint.
yarp::dev::ImplementEncodersTimed::initialize
bool initialize(int size, const int *amap, const double *enc, const double *zos)
Initialize the internal data and alloc memory.
Definition: ImplementEncodersTimed.cpp:31
yarp::dev::IEncodersTimed::getEncoderTimed
virtual bool getEncoderTimed(int j, double *encs, double *time)=0
Read the instantaneous acceleration of all axes.
yarp::dev::IEncoders::getEncoderSpeeds
virtual bool getEncoderSpeeds(double *spds)=0
Read the instantaneous speed of all axes.
yarp::dev::IEncoders::getEncoderSpeed
virtual bool getEncoderSpeed(int j, double *sp)=0
Read the istantaneous speed of an axis.
yarp::dev::ImplementEncodersTimed::helper
void * helper
Definition: ImplementEncodersTimed.h:35
yarp::dev::IEncoders::resetEncoders
virtual bool resetEncoders()=0
Reset encoders.
yarp::dev::IEncoders::getEncoders
virtual bool getEncoders(double *encs)=0
Read the position of all axes.