Torc
0.1
|
A device to output PWM signals on the Raspberry Pi. More...
#include <torcpipwmoutput.h>
Public Slots | |
void | SetValue (double Value) |
![]() | |
uint | GetResolution (void) |
uint | GetMaxResolution (void) |
![]() | |
void | SubscriberDeleted (QObject *Subscriber) |
![]() | |
virtual void | SetValue (double Value) |
virtual void | SetValid (bool Valid) |
bool | GetValid (void) |
double | GetValue (void) |
double | GetDefaultValue (void) |
QString | GetModelId (void) |
QString | GetUniqueId (void) |
QString | GetUserName (void) |
QString | GetUserDescription (void) |
Public Member Functions | |
TorcPiPWMOutput (int Pin, const QVariantMap &Details) | |
~TorcPiPWMOutput () | |
QStringList | GetDescription (void) |
![]() | |
TorcPWMOutput (double Value, const QString &ModelId, const QVariantMap &Details, uint MaxResolution=DEFAULT_PWM_RESOLUTION) | |
virtual | ~TorcPWMOutput ()=default |
QStringList | GetDescription (void) override |
TorcOutput::Type | GetType (void) override |
![]() | |
TorcOutput (TorcOutput::Type Type, double Value, const QString &ModelId, const QVariantMap &Details) | |
TorcOutput (TorcOutput::Type Type, double Value, const QString &ModelId, const QVariantMap &Details, QObject *Output, const QMetaObject &MetaObject, const QString &Blacklist=QStringLiteral("")) | |
virtual | ~TorcOutput ()=default |
bool | HasOwner (void) |
bool | SetOwner (QObject *Owner) |
QString | GetUIName (void) override |
![]() | |
TorcReferenceCounter (void) | |
virtual | ~TorcReferenceCounter (void)=default |
void | UpRef (void) |
virtual bool | DownRef (void) |
bool | IsShared (void) |
![]() | |
TorcHTTPService (QObject *Parent, const QString &Signature, const QString &Name, const QMetaObject &MetaObject, const QString &Blacklist=QStringLiteral("")) | |
virtual | ~TorcHTTPService () |
void | ProcessHTTPRequest (const QString &PeerAddress, int PeerPort, const QString &LocalAddress, int LocalPort, TorcHTTPRequest &Request) override |
QVariantMap | ProcessRequest (const QString &Method, const QVariant &Parameters, QObject *Connection, bool Authenticated) override |
QString | GetMethod (int Index) |
QVariant | GetProperty (int Index) |
Get the value of a given property. More... | |
QVariantMap | GetServiceDetails (void) |
Return a QVariantMap describing the services methods and properties. More... | |
virtual QString | GetPresentationURL (void) |
![]() | |
TorcHTTPHandler (const QString &Signature, const QString &Name) | |
virtual | ~TorcHTTPHandler () |
QString | Signature (void) const |
bool | GetRecursive (void) const |
QString | Name (void) const |
Additional Inherited Members | |
![]() | |
enum | Type { Unknown = 0, Temperature, pH, Switch, PWM, Button, Camera, Integer, MaxType } |
![]() | |
void | ValidChanged (bool Valid) |
void | ValueChanged (double Value) |
![]() | |
static void | EventLoopEnding (bool Ending) |
![]() | |
bool | ValueIsDifferent (double &NewValue) |
![]() | |
virtual void | Graph (QByteArray *Data) |
![]() | |
virtual | ~TorcDevice () |
![]() | |
void | HandleSubscriberDeleted (QObject *Subscriber) |
![]() | |
static bool | MethodIsAuthorised (TorcHTTPRequest &Request, int Allowed) |
Check the current request is authorised and set the authentication header if not. More... | |
static void | HandleOptions (TorcHTTPRequest &Request, int Allowed) |
static void | HandleFile (TorcHTTPRequest &Request, const QString &Filename, int Cache) |
![]() | |
uint | m_resolution |
uint | m_maxResolution |
![]() | |
double | value |
double | defaultValue |
QString | modelId |
QString | uniqueId |
QString | userName |
QString | userDescription |
QMutex | lock |
bool | wasInvalid |
![]() | |
QAtomicInt | m_refCount |
![]() | |
QReadWriteLock | m_httpServiceLock |
![]() | |
QString | m_signature |
bool | m_recursive |
QString | m_name |
![]() | |
static QHash< QString, TorcDevice * > * | gDeviceList = new QHash<QString,TorcDevice*>() |
static QMutex * | gDeviceListLock = new QMutex(QMutex::Recursive) |
![]() | |
static bool | m_eventLoopEnding = false |
![]() | |
uint | Resolution |
uint | maxResolution |
![]() | |
bool | valid |
A device to output PWM signals on the Raspberry Pi.
The Raspberry Pi supports 1 hardware PWM output on pin 1 (BCM_GPIPO 18). For other pins, we use wiringPi's software PWM support and warn about its usage (software PWM may utilise relatively large amounts of CPU and may be subject to jitter under load - and nobody wants flickering LEDs!).
Definition at line 9 of file torcpipwmoutput.h.
TorcPiPWMOutput::TorcPiPWMOutput | ( | int | Pin, |
const QVariantMap & | Details | ||
) |
Definition at line 46 of file torcpipwmoutput.cpp.
TorcPiPWMOutput::~TorcPiPWMOutput | ( | ) |
Definition at line 77 of file torcpipwmoutput.cpp.
|
virtual |
Reimplemented from TorcDevice.
Definition at line 89 of file torcpipwmoutput.cpp.
|
slot |
Definition at line 94 of file torcpipwmoutput.cpp.