mirror of
https://github.com/Fishwaldo/qt-openzwave.git
synced 2025-07-13 16:48:25 +00:00
26 lines
No EOL
841 B
C++
26 lines
No EOL
841 B
C++
#include "mqttcommands/requestAllConfigParam.h"
|
|
|
|
MqttCommand_RequestAllConfigParam::MqttCommand_RequestAllConfigParam(QObject *parent) :
|
|
MqttCommand(parent)
|
|
{
|
|
this->m_requiredIntFields << "node";
|
|
}
|
|
MqttCommand* MqttCommand_RequestAllConfigParam::Create(QObject *parent) {
|
|
return new MqttCommand_RequestAllConfigParam(parent);
|
|
}
|
|
|
|
bool MqttCommand_RequestAllConfigParam::processMessage(QJsonDocument msg) {
|
|
if (!this->checkNode(msg, "node")) {
|
|
QJsonObject js;
|
|
js["status"] = "failed";
|
|
js["Error"] = "Invalid Node Number";
|
|
emit sendCommandUpdate(GetCommand(), js);
|
|
return false;
|
|
}
|
|
QTOZWManager *mgr = getOZWManager();
|
|
mgr->requestAllConfigParam(msg["node"].toInt());
|
|
QJsonObject js;
|
|
js["status"] = "ok";
|
|
emit sendCommandUpdate(GetCommand(), js);
|
|
return true;
|
|
} |