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
24
qt-ozwdaemon/mqttcommands/cancelControllerCommand.cpp
Normal file
24
qt-ozwdaemon/mqttcommands/cancelControllerCommand.cpp
Normal file
|
@ -0,0 +1,24 @@
|
|||
#include "mqttcommands/cancelControllerCommand.h"
|
||||
|
||||
MqttCommand_CancelControllerCommand::MqttCommand_CancelControllerCommand(QObject *parent) :
|
||||
MqttCommand(parent)
|
||||
{
|
||||
}
|
||||
MqttCommand* MqttCommand_CancelControllerCommand::Create(QObject *parent) {
|
||||
return new MqttCommand_CancelControllerCommand(parent);
|
||||
}
|
||||
|
||||
bool MqttCommand_CancelControllerCommand::processMessage(QJsonDocument msg) {
|
||||
Q_UNUSED(msg);
|
||||
QTOZWManager *mgr = getOZWManager();
|
||||
if (mgr->cancelControllerCommand()) {
|
||||
QJsonObject js;
|
||||
js["status"] = "ok";
|
||||
emit sendCommandUpdate(GetCommand(), js);
|
||||
return true;
|
||||
}
|
||||
QJsonObject js;
|
||||
js["status"] = "failed";
|
||||
emit sendCommandUpdate(GetCommand(), js);
|
||||
return false;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue