mirror of
https://github.com/Fishwaldo/qt-openzwave.git
synced 2025-07-18 19:18:21 +00:00
19 lines
No EOL
633 B
C++
19 lines
No EOL
633 B
C++
#include "mqttcommands/refreshValue.h"
|
|
|
|
MqttCommand_RefreshValue::MqttCommand_RefreshValue(QObject *parent) :
|
|
MqttCommand(parent)
|
|
{
|
|
this->m_requiredIntFields << "ValueIDKey";
|
|
}
|
|
MqttCommand* MqttCommand_RefreshValue::Create(QObject *parent) {
|
|
return new MqttCommand_RefreshValue(parent);
|
|
}
|
|
|
|
bool MqttCommand_RefreshValue::processMessage(rapidjson::Document &msg) {
|
|
if (!this->checkValue(msg, "ValueIDKey")) {
|
|
return this->sendSimpleStatus(false, "Invalid ValueIDKey Number");
|
|
}
|
|
|
|
QTOZWManager *mgr = getOZWManager();
|
|
return this->sendSimpleStatus(mgr->refreshValue(msg["ValueIDKey"].GetUint64()));
|
|
} |