mirror of
https://github.com/Fishwaldo/qt-openzwave.git
synced 2025-07-18 19:18:21 +00:00
17 lines
No EOL
623 B
C++
17 lines
No EOL
623 B
C++
#include "mqttcommands/setPollInterval.h"
|
|
|
|
MqttCommand_SetPollInterval::MqttCommand_SetPollInterval(QObject *parent) :
|
|
MqttCommand(parent)
|
|
{
|
|
this->m_requiredIntFields << "interval";
|
|
this->m_requiredBoolFields << "intervalBetweenPoll";
|
|
}
|
|
MqttCommand* MqttCommand_SetPollInterval::Create(QObject *parent) {
|
|
return new MqttCommand_SetPollInterval(parent);
|
|
}
|
|
|
|
bool MqttCommand_SetPollInterval::processMessage(rapidjson::Document &msg) {
|
|
QTOZWManager *mgr = getOZWManager();
|
|
mgr->setPollInterval(msg["interval"].GetUint(), msg["intervalBetweenPoll"].GetBool());
|
|
return this->sendSimpleStatus(true);
|
|
} |