mirror of
https://github.com/Fishwaldo/qt-openzwave.git
synced 2025-07-11 07:38:21 +00:00
19 lines
No EOL
692 B
C++
19 lines
No EOL
692 B
C++
#include "mqttcommands/requestConfigParam.h"
|
|
|
|
MqttCommand_RequestConfigParam::MqttCommand_RequestConfigParam(QObject *parent) :
|
|
MqttCommand(parent)
|
|
{
|
|
this->m_requiredIntFields << "node" << "param";
|
|
}
|
|
MqttCommand* MqttCommand_RequestConfigParam::Create(QObject *parent) {
|
|
return new MqttCommand_RequestConfigParam(parent);
|
|
}
|
|
|
|
bool MqttCommand_RequestConfigParam::processMessage(rapidjson::Document &msg) {
|
|
if (!this->checkNode(msg, "node")) {
|
|
return this->sendSimpleStatus(false, "Invalid Node Number");
|
|
}
|
|
QTOZWManager *mgr = getOZWManager();
|
|
mgr->requestConfigParam(msg["node"].GetUint(), msg["param"].GetUint());
|
|
return this->sendSimpleStatus(true);
|
|
} |