Torc  0.1
torcpwmoutput.h
Go to the documentation of this file.
1 #ifndef TORCPWMOUTPUT_H
2 #define TORCPWMOUTPUT_H
3 
4 // Torc
5 #include "torcoutput.h"
6 
7 #define DEFAULT_PWM_RESOLUTION 1024 // 10bits
8 
9 class TorcPWMOutput : public TorcOutput
10 {
11  Q_OBJECT
12  Q_PROPERTY(uint Resolution MEMBER m_resolution READ GetResolution CONSTANT)
13  Q_PROPERTY(uint maxResolution MEMBER m_maxResolution READ GetMaxResolution CONSTANT)
14 
15  public:
16  TorcPWMOutput(double Value, const QString &ModelId, const QVariantMap &Details, uint MaxResolution = DEFAULT_PWM_RESOLUTION);
17  virtual ~TorcPWMOutput() = default;
18 
19  QStringList GetDescription (void) override;
20  TorcOutput::Type GetType (void) override;
21 
22  public slots:
23  uint GetResolution (void);
24  uint GetMaxResolution (void);
25 
26  protected:
27  bool ValueIsDifferent (double &NewValue);
28 
29  protected:
32 };
33 
34 #endif // TORCPWMOUTPUT_H
TorcOutput::Type GetType(void) override
uint GetMaxResolution(void)
QStringList GetDescription(void) override
bool ValueIsDifferent(double &NewValue)
uint GetResolution(void)
#define DEFAULT_PWM_RESOLUTION
Definition: torcpwmoutput.h:7
uint m_maxResolution
Definition: torcpwmoutput.h:31