#include <torcinputs.h>
|
| TorcInputs () |
| TorcInputs contains the master record of known inputs. More...
|
|
| ~TorcInputs ()=default |
|
void | Graph (QByteArray *Data) |
|
QString | GetUIName (void) override |
|
void | Create (const QVariantMap &Details) override |
|
void | Destroy (void) override |
|
void | AddInput (TorcInput *Input) |
|
void | RemoveInput (TorcInput *Input) |
|
| 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) |
|
Public Member Functions inherited from TorcHTTPHandler |
| TorcHTTPHandler (const QString &Signature, const QString &Name) |
|
virtual | ~TorcHTTPHandler () |
|
QString | Signature (void) const |
|
bool | GetRecursive (void) const |
|
QString | Name (void) const |
|
Public Member Functions inherited from TorcDeviceHandler |
| TorcDeviceHandler () |
|
virtual | ~TorcDeviceHandler ()=default |
|
Definition at line 13 of file torcinputs.h.
TorcInputs::TorcInputs |
( |
| ) |
|
TorcInputs contains the master record of known inputs.
A static global TorcInputs object is created (this could alternatively be created as a TorcAdminObject). This object will list these inputs as an HTTP service.
Any subclass of TorcInput will automatically register itself on creation. Any class creating inputs must DownRef AND call RemoveInput when deleting them.
It also creates and manages known network (i.e. user set) and constant inputs.
<torc>
<inputs>
<network>
<switch/pwm/temperature/ph/button>
<name></name>
<default></default>
<username></username>
<userdescription></userdescription>
</switch etc>
</network>
<constant>
<switch/pwm/temperature/ph> -- NO BUTTON
<name></name>
<default></default>
<username></username>
<userdescription></userdescription>
</switch etc>
</constant>
</inputs>
</torc>
- Note
- This class is thread safe.
Definition at line 77 of file torcinputs.cpp.
TorcInputs::~TorcInputs |
( |
| ) |
|
|
default |
void TorcInputs::AddInput |
( |
TorcInput * |
Input | ) |
|
void TorcInputs::Create |
( |
const QVariantMap & |
Details | ) |
|
|
overridevirtual |
void TorcInputs::Destroy |
( |
void |
| ) |
|
|
overridevirtual |
QVariantMap TorcInputs::GetInputList |
( |
void |
| ) |
|
|
slot |
Return a map of known inputs.
To simplify javascript on the webclient side, the map is presented as a list of input paths by type, allowing a client to quickly filter and subscribe to the individual services for further detail.
Definition at line 136 of file torcinputs.cpp.
QStringList TorcInputs::GetInputTypes |
( |
void |
| ) |
|
|
slot |
QString TorcInputs::GetUIName |
( |
void |
| ) |
|
|
overridevirtual |
void TorcInputs::Graph |
( |
QByteArray * |
Data | ) |
|
void TorcInputs::InputsChanged |
( |
void |
| ) |
|
|
signal |
void TorcInputs::RemoveInput |
( |
TorcInput * |
Input | ) |
|
void TorcInputs::SubscriberDeleted |
( |
QObject * |
Subscriber | ) |
|
|
slot |
QVariantMap TorcInputs::inputList |
|
read |
The documentation for this class was generated from the following files: