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