mirror of
https://github.com/Fishwaldo/qt-openzwave.git
synced 2025-07-11 23:58:20 +00:00
Add a bunch of Manager Methods for MQTT Commands
This commit is contained in:
parent
ea376a48cd
commit
6a088c931b
67 changed files with 1272 additions and 13 deletions
19
qt-ozwdaemon/mqttcommands/healNetworkNode.cpp
Normal file
19
qt-ozwdaemon/mqttcommands/healNetworkNode.cpp
Normal file
|
@ -0,0 +1,19 @@
|
|||
#include "mqttcommands/healNetworkNode.h"
|
||||
|
||||
MqttCommand_HealNetworkNode::MqttCommand_HealNetworkNode(QObject *parent) :
|
||||
MqttCommand(parent)
|
||||
{
|
||||
this->m_requiredFields << "node" << "doreturnroute";
|
||||
}
|
||||
MqttCommand* MqttCommand_HealNetworkNode::Create(QObject *parent) {
|
||||
return new MqttCommand_HealNetworkNode(parent);
|
||||
}
|
||||
|
||||
bool MqttCommand_HealNetworkNode::processMessage(QJsonDocument msg) {
|
||||
QTOZWManager *mgr = getOZWManager();
|
||||
mgr->healNetworkNode(msg["node"].toInt(), msg["doreturnroute"].toBool());
|
||||
QJsonObject js;
|
||||
js["status"] = "ok";
|
||||
emit sendCommandUpdate(GetCommand(), js);
|
||||
return true;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue