mirror of
https://github.com/Fishwaldo/qt-openzwave.git
synced 2025-07-23 05:28:27 +00:00
Add some additional manager methods etc
This commit is contained in:
parent
8c8da7fc03
commit
e0f7cb9410
18 changed files with 225 additions and 4 deletions
19
qt-ozwdaemon/mqttcommands/refreshValue.cpp
Normal file
19
qt-ozwdaemon/mqttcommands/refreshValue.cpp
Normal file
|
@ -0,0 +1,19 @@
|
|||
#include "mqttcommands/refreshValue.h"
|
||||
|
||||
MqttCommand_RefreshValue::MqttCommand_RefreshValue(QObject *parent) :
|
||||
MqttCommand(parent)
|
||||
{
|
||||
this->m_requiredIntFields << "ValueIDKey";
|
||||
}
|
||||
MqttCommand* MqttCommand_RefreshValue::Create(QObject *parent) {
|
||||
return new MqttCommand_RefreshValue(parent);
|
||||
}
|
||||
|
||||
bool MqttCommand_RefreshValue::processMessage(rapidjson::Document &msg) {
|
||||
if (!this->checkValue(msg, "ValueIDKey")) {
|
||||
return this->sendSimpleStatus(false, "Invalid ValueIDKey Number");
|
||||
}
|
||||
|
||||
QTOZWManager *mgr = getOZWManager();
|
||||
return this->sendSimpleStatus(mgr->refreshValue(msg["ValueIDKey"].GetUint64()));
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue