Torc
0.1
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
outputs
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:
30
uint
m_resolution
;
31
uint
m_maxResolution
;
32
};
33
34
#endif // TORCPWMOUTPUT_H
TorcPWMOutput::GetType
TorcOutput::Type GetType(void) override
Definition:
torcpwmoutput.cpp:79
TorcPWMOutput::GetMaxResolution
uint GetMaxResolution(void)
Definition:
torcpwmoutput.cpp:89
TorcPWMOutput::GetDescription
QStringList GetDescription(void) override
Definition:
torcpwmoutput.cpp:74
TorcPWMOutput::ValueIsDifferent
bool ValueIsDifferent(double &NewValue)
Definition:
torcpwmoutput.cpp:94
TorcPWMOutput::GetResolution
uint GetResolution(void)
Definition:
torcpwmoutput.cpp:84
TorcOutput::Type
Type
Definition:
torcoutput.h:23
TorcPWMOutput::Resolution
uint Resolution
Definition:
torcpwmoutput.h:12
TorcPWMOutput::maxResolution
uint maxResolution
Definition:
torcpwmoutput.h:13
TorcPWMOutput
Definition:
torcpwmoutput.h:9
TorcOutput
Definition:
torcoutput.h:15
TorcPWMOutput::m_resolution
uint m_resolution
Definition:
torcpwmoutput.h:30
torcoutput.h
DEFAULT_PWM_RESOLUTION
#define DEFAULT_PWM_RESOLUTION
Definition:
torcpwmoutput.h:7
TorcPWMOutput::m_maxResolution
uint m_maxResolution
Definition:
torcpwmoutput.h:31
Generated on Sat Jan 5 2019 21:54:03 for Torc by
1.8.11