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