YARP
Yet Another Robot Platform
ImplementPWMControl.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3  * SPDX-FileCopyrightText: 2006-2010 RobotCub Consortium
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
6 
7 #ifndef YARP_DEV_IMPLEMENTPWMCONTROL_H
8 #define YARP_DEV_IMPLEMENTPWMCONTROL_H
9 
10 #include <yarp/dev/IPWMControl.h>
11 #include <yarp/dev/api.h>
12 #include <yarp/conf/system.h>
13 
14 namespace yarp {
15  namespace dev {
16  class ImplementPWMControl;
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  void *helper;
36 public:
37  bool initialize(int k, const int *amap, const double* dutyToPWM);
38  bool uninitialize();
41  bool getNumberOfMotors(int *ax) override;
42  bool setRefDutyCycle(int j, double v) override;
43  bool setRefDutyCycles(const double *v) override;
44  bool getRefDutyCycle(int j, double *v) override;
45  bool getRefDutyCycles(double *v) override;
46  bool getDutyCycle(int j, double *v) override;
47  bool getDutyCycles(double *v) override;
48 
49 };
50 
51 #endif // YARP_DEV_IMPLEMENTPWMCONTROL_H
Interface for controlling an axis, by sending directly a PWM reference signal to a motor.
Definition: IPWMControl.h:85
Interface for controlling an axis, by sending directly a PWM reference signal to a motor.
Definition: IPWMControl.h:25
virtual bool getDutyCycle(int m, double *val)=0
Gets the current dutycycle of the output of the amplifier (i.e.
virtual bool getNumberOfMotors(int *number)=0
Retrieves the number of controlled motors from the current physical interface.
virtual bool getRefDutyCycles(double *refs)=0
Gets the last reference sent using the setRefDutyCycles function.
virtual bool setRefDutyCycle(int m, double ref)=0
Sets the reference dutycycle to a single motor.
virtual bool setRefDutyCycles(const double *refs)=0
Sets the reference dutycycle for all the motors.
virtual bool getRefDutyCycle(int m, double *ref)=0
Gets the last reference sent using the setRefDutyCycle function.
virtual bool getDutyCycles(double *vals)=0
Gets the current dutycycle of the output of the amplifier (i.e.
bool initialize(int k, const int *amap, const double *dutyToPWM)
The main, catch-all namespace for YARP.
Definition: dirs.h:16
#define YARP_dev_API
Definition: api.h:18