14 #include "connector.h"
15 #include "qalphacloud.h"
20 class LastPowerDataPrivate;
36 Q_PROPERTY(
QAlphaCloud::Connector *connector READ connector WRITE setConnector NOTIFY connectorChanged REQUIRED)
43 Q_PROPERTY(QString serialNumber READ serialNumber WRITE setSerialNumber NOTIFY serialNumberChanged REQUIRED)
48 Q_PROPERTY(
int photovoltaicPower READ photovoltaicPower NOTIFY photovoltaicPowerChanged)
52 Q_PROPERTY(
int currentLoad READ currentLoad NOTIFY currentLoadChanged)
61 Q_PROPERTY(
int gridPower READ gridPower NOTIFY gridPowerChanged)
66 Q_PROPERTY(
int batteryPower READ batteryPower NOTIFY batteryPowerChanged)
72 Q_PROPERTY(qreal batterySoc READ batterySoc NOTIFY batterySocChanged)
80 Q_PROPERTY(QJsonObject rawJson READ rawJson NOTIFY rawJsonChanged)
89 Q_PROPERTY(
bool valid READ valid NOTIFY validChanged STORED
false)
108 Q_PROPERTY(QString errorString READ errorString NOTIFY errorStringChanged)
131 Q_REQUIRED_RESULT QString serialNumber()
const;
132 void setSerialNumber(
const QString &serialNumber);
133 Q_SIGNAL
void serialNumberChanged(
const QString &serialNumber);
135 Q_REQUIRED_RESULT
int photovoltaicPower()
const;
136 Q_SIGNAL
void photovoltaicPowerChanged(
int photovoltaicPower);
138 Q_REQUIRED_RESULT
int currentLoad()
const;
139 Q_SIGNAL
void currentLoadChanged(
int currentLoad);
141 Q_REQUIRED_RESULT
int gridPower()
const;
142 Q_SIGNAL
void gridPowerChanged(
int gridPower);
144 Q_REQUIRED_RESULT
int batteryPower()
const;
145 Q_SIGNAL
void batteryPowerChanged(
int batteryPower);
147 Q_REQUIRED_RESULT qreal batterySoc()
const;
148 Q_SIGNAL
void batterySocChanged(qreal batterySoc);
150 Q_REQUIRED_RESULT QJsonObject rawJson()
const;
151 Q_SIGNAL
void rawJsonChanged();
153 Q_REQUIRED_RESULT
bool valid()
const;
154 Q_SIGNAL
void validChanged(
bool valid);
162 QString errorString()
const;
163 Q_SIGNAL
void errorStringChanged(
const QString &errorString);
187 std::unique_ptr<LastPowerDataPrivate>
const d;
API Connection.
Definition: connector.h:39
Live Power Data.
Definition: lastpowerdata.h:30
Utility namespace.
Definition: apirequest.cpp:24
RequestStatus
Request status.
Definition: qalphacloud.h:28
ErrorCode
Error codes.
Definition: qalphacloud.h:45