YARP
Yet Another Robot Platform
ImplementPWMControl.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2006-2020 Istituto Italiano di Tecnologia (IIT)
3  * Copyright (C) 2006-2010 RobotCub Consortium
4  * All rights reserved.
5  *
6  * This software may be modified and distributed under the terms of the
7  * BSD-3-Clause license. See the accompanying LICENSE file for details.
8  */
9 
10 #ifndef YARP_DEV_IMPLEMENTPWMCONTROL_H
11 #define YARP_DEV_IMPLEMENTPWMCONTROL_H
12 
13 #include <yarp/dev/IPWMControl.h>
14 #include <yarp/dev/api.h>
15 #include <yarp/conf/system.h>
16 
17 namespace yarp {
18  namespace dev {
19  class ImplementPWMControl;
20  }
21 }
22 
23 namespace yarp {
24 namespace dev {
25 namespace impl {
26 
27 template <typename T>
28 class FixedSizeBuffersManager;
29 
30 } // namespace impl
31 } // namespace dev
32 } // namespace yarp
33 
35 {
36  void *helper;
39 public:
40  bool initialize(int k, const int *amap, const double* dutyToPWM);
41  bool uninitialize();
44  bool getNumberOfMotors(int *ax) override;
45  bool setRefDutyCycle(int j, double v) override;
46  bool setRefDutyCycles(const double *v) override;
47  bool getRefDutyCycle(int j, double *v) override;
48  bool getRefDutyCycles(double *v) override;
49  bool getDutyCycle(int j, double *v) override;
50  bool getDutyCycles(double *v) override;
51 
52 };
53 
54 #endif // YARP_DEV_IMPLEMENTPWMCONTROL_H
Interface for controlling an axis, by sending directly a PWM reference signal to a motor.
Definition: IPWMControl.h:88
Interface for controlling an axis, by sending directly a PWM reference signal to a motor.
Definition: IPWMControl.h:28
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: environment.h:18
#define YARP_dev_API
Definition: api.h:19