mirror of
https://github.com/Fishwaldo/qt-openzwave.git
synced 2025-07-22 21:18:22 +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/getPollInterval.cpp
Normal file
19
qt-ozwdaemon/mqttcommands/getPollInterval.cpp
Normal file
|
@ -0,0 +1,19 @@
|
|||
#include "mqttcommands/getPollInterval.h"
|
||||
|
||||
MqttCommand_GetPollInterval::MqttCommand_GetPollInterval(QObject *parent) :
|
||||
MqttCommand(parent)
|
||||
{
|
||||
}
|
||||
MqttCommand* MqttCommand_GetPollInterval::Create(QObject *parent) {
|
||||
return new MqttCommand_GetPollInterval(parent);
|
||||
}
|
||||
|
||||
bool MqttCommand_GetPollInterval::processMessage(rapidjson::Document &msg) {
|
||||
Q_UNUSED(msg);
|
||||
QTOZWManager *mgr = getOZWManager();
|
||||
rapidjson::Document js;
|
||||
QT2JS::SetString(js, "status", "ok");
|
||||
QT2JS::SetInt64(js, "pollInterval", mgr->getPollInterval());
|
||||
emit sendCommandUpdate(GetCommand(), js);
|
||||
return true;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue