From e2c9e20ee9df0bf9d33deb73476bbb6db991dd19 Mon Sep 17 00:00:00 2001 From: Daniel Tartavel Date: Sat, 29 Apr 2023 15:15:19 +0200 Subject: [PATCH] threaded functional --- main.cpp | 19 +- main.h | 9 + serial.inc.cpp | 68 ++++-- serial.inc.h | 19 +- zigateBackend.cpp | 286 ++++++++++++++++++++++--- zigateBackend.h | 14 +- zigateInit.cpp | 239 +-------------------- zigatecmd.cpp | 460 ++++++++++++++++++++++++++++++++++++++++- zigbeemanager.pro | 5 +- zigbeemanager.pro.user | 430 ++++++++++++++++++++++++++++++++++++++ 10 files changed, 1239 insertions(+), 310 deletions(-) create mode 100644 zigbeemanager.pro.user diff --git a/main.cpp b/main.cpp index 580b528..88749e5 100644 --- a/main.cpp +++ b/main.cpp @@ -5,22 +5,31 @@ using namespace std; extern ZigateBackend zigateBkd; int debugLevel = DEBUG | INFO | WARNING | ERROR; //ResponseList responseList; +SerialManager serialManager; +QMap backends; int main(int argc, char *argv[]) { - QCoreApplication a(argc, argv); + QApplication a(argc, argv); + QCoreApplication::setOrganizationName("zigbeemanager"); QCoreApplication::setApplicationName("zigbeemanager"); initBackends(); - cout << "sending command 0x0010" << endl; - zigateBkd.sendCmd("0010", ""); - zigateBkd.getResponse(); - //return a.exec(); + + //QObject::connect(&zigateBkd, SIGNAL(readyRead()), &zigateBkd, SLOT(getData())); + + return a.exec(); } bool initBackends() { + /* foreach (backend, backends) + { + temp = new ResponseProperties(); + temp->manager = &defaultManager; + responseListIndex.insert(var, temp) ; + }*/ zigateBkd.initBackend(); return false; } diff --git a/main.h b/main.h index 6e84f84..b098789 100644 --- a/main.h +++ b/main.h @@ -20,4 +20,13 @@ bool initBackends(); +class BackEnds +{ + public: + QString name; + QString device; + QVariant backend; +}; + + #endif // MAIN_H diff --git a/serial.inc.cpp b/serial.inc.cpp index f580aa1..203f564 100644 --- a/serial.inc.cpp +++ b/serial.inc.cpp @@ -1,28 +1,47 @@ #include "serial.inc.h" #include +#include "zigateBackend.h" extern QApplication a; +extern ZigateBackend zigateBkd; +//extern SerialManager serialManager; + using namespace std; -ZigbeeMgr::ZigbeeMgr() +SerialManager::SerialManager() { } -ZigbeeMgr::~ZigbeeMgr() +SerialManager::~SerialManager() { this->close(); } -void ZigbeeMgr::init() +void SerialManager::initSerial() { - //QMessageBox::StandardButton reply; bool test; + bool result; + + while (1) + { + result = this->findSerialDevice(); + if (result) + { + debug("Device found :" + this->serialDevicePath, INFO); + break; + }else + { + cout << "Device not found, waiting 10 seconds before retrying" << endl; + sleep(10); + } + } this->setBaudRate(115200); this->setDataBits(QSerialPort::Data8); this->setStopBits(QSerialPort::OneStop); this->setParity(QSerialPort::NoParity); this->setPortName(this->serialDevicePath); + do { test = this->open(QIODevice::ReadWrite); @@ -32,26 +51,34 @@ void ZigbeeMgr::init() sleep(5); } }while(!test); -} -void ZigbeeMgr::getData() -{ - cout << "getData()" << endl; - if (this->waitForReadyRead(20000)) + + QFutureWatcher watcher; + QFuture future = QtConcurrent::run([=]() { - while (!atEnd()) + do { - cout << "reading datas" << endl; - this->dataRead += this->readAll(); - cout << this->dataRead.toHex().toStdString() << endl; - } - }else - { - cout << "Reading datas has timed out" << endl; - } + this->dataRead.clear(); + //cout << "getData()" << endl; + if (this->waitForReadyRead()) + { + while (!this->atEnd()) + { + cout << "reading datas" << endl; + this->dataRead += this->readAll(); + //cout << this->dataRead.toHex().toStdString() << endl; + } + } + emit this->datasReady(this->dataRead); + //zigateBkd.interpretResult(this->dataRead); + }while(1); + }); + watcher.setFuture(future); } -void ZigbeeMgr::write(QByteArray msg) + + +void SerialManager::write(QByteArray msg) { cout << "writing to serial" << endl; dataWriteSize = msg.count(); @@ -60,7 +87,7 @@ void ZigbeeMgr::write(QByteArray msg) cout << msg.toHex().toStdString() << endl; } -bool ZigbeeMgr::findSerialDevice() +bool SerialManager::findSerialDevice() { const auto serialPortInfos = QSerialPortInfo::availablePorts(); for (const QSerialPortInfo &portInfo : serialPortInfos) @@ -80,3 +107,4 @@ bool ZigbeeMgr::findSerialDevice() } return false; } + diff --git a/serial.inc.h b/serial.inc.h index 396e830..955d59b 100644 --- a/serial.inc.h +++ b/serial.inc.h @@ -1,14 +1,14 @@ #ifndef SERIAL_INC_H #define SERIAL_INC_H -#include +//#include #include #include #include #include #include -class ZigbeeMgr : public QSerialPort +class SerialManager : public QSerialPort { Q_OBJECT @@ -27,15 +27,18 @@ class ZigbeeMgr : public QSerialPort QString serialDeviceProduct; quint32 baudRate = 115200; void write(QByteArray datas); - ZigbeeMgr(); - ~ZigbeeMgr(); - void init(); - void getData(); + SerialManager(); + ~SerialManager(); + void initSerial(); bool findSerialDevice(); + //void getData(); + + signals: + void datasReady(QByteArray); + + public slots: - private slots: }; - #endif // SERIAL_INC_H diff --git a/zigateBackend.cpp b/zigateBackend.cpp index 16fd212..24cb4a7 100644 --- a/zigateBackend.cpp +++ b/zigateBackend.cpp @@ -1,41 +1,27 @@ -#include "zigateBackend.h" +#include "main.h" #include +#include +#include "serial.inc.h" +class BackEnds; +extern SerialManager serialManager; +extern QMap backends; using namespace std; ZigateBackend zigateBkd; ZigateBackend::ZigateBackend() { - bool result; -// cmdList["heartbeatEnable"].append({"0008", "0001", "0210"}); - - this->deviceName = "ZIGATE"; - while (1) - { - result = this->findSerialDevice(); - if (result) - { - debug("Device found :" + this->serialDevicePath, INFO); - break; - }else - { - cout << "Device not found, waiting 10 seconds before retrying" << endl; - sleep(10); - } - } - this->init(); - // this->resultCodes.insert(0x8000, "Status"); - // resultCodes.insert(); - + BackEnds zigate; + backends["Zigate"] = zigate; + backends["zigate"].name = "Zigate"; + backends["zigate"].device = "ZIGATE"; } ZigateBackend::~ZigateBackend() { } - - QByteArray ZigateBackend::checksum(QByteArray msgType, QByteArray length, QByteArray datas) { quint16 temp = 0; @@ -129,22 +115,22 @@ void ZigateBackend::sendCmd(QByteArray cmd, QByteArray datas) msg += QByteArray::fromHex(checksum(cmd, len, "")); } msg += QByteArray::fromHex("03"); - this->write(msg); - if (!this->waitForBytesWritten(10000)) + serialManager.write(msg); + if (!serialManager.waitForBytesWritten(10000)) { cout << "error : no acknoledge of bytes written" << endl; } //this->interpretResult(this->dataRead); } -void ZigateBackend::getResponse() +/*void ZigateBackend::getResponse() { - this->getData(); + //this->getData(); this->interpretResult(this->dataRead); -} + this->dataRead.clear(); +}*/ - -int ZigateBackend::interpretResult(QByteArray payload) +void ZigateBackend::interpretResult(QByteArray payload) { uint tab = 0; int length = 0; @@ -158,7 +144,6 @@ int ZigateBackend::interpretResult(QByteArray payload) QByteArray datasResult; QByteArray quality; QByteArray payloadD; - uint typeA; payloadD = unTranscode(payload); length = payloadD.count(); @@ -168,7 +153,7 @@ int ZigateBackend::interpretResult(QByteArray payload) //type de message type = payloadD.mid(0, 2); ln = payloadD.mid(2, 2).toHex().toUInt(nullptr, 16); - if (type[0] == 0x80 or type[0] == 0X00 or type[0] == 0X99) + if ((unsigned char)type[0] == 128 or (unsigned char)type[0] == 0 or (unsigned char)type[0] == 153) { crctmp = crctmp ^ payloadD.at(0) ^ payloadD.at(1); crctmp = crctmp ^ payloadD.at(2) ^ payloadD.at(3); @@ -207,5 +192,238 @@ int ZigateBackend::interpretResult(QByteArray payload) payloadD.remove(0,ln+6); length = payloadD.count(); } - return tab; + //return tab; } + +void defaultManager(Response *responseObject) +{ + int nbyte; + int isValue; + int offset = 0; + QByteArray datas = responseObject->datas; + QByteArray result; + QByteArray code = responseObject->code.toHex(); + + cout << responseObject->code.toStdString() << endl; + QMap >::iterator i = zigateBkd.responseListIndex[code]->properties.begin(); + QList propertyList; + QMap propertyDetail; + QMap var; + + infoOutput(responseObject); + while (i != zigateBkd.responseListIndex[code]->properties.end()) + { + propertyList = i.value(); + propertyDetail = zigateBkd.responseListIndex[code]->propertyDetail.value(i.key()); + cout << propertyList.at(0).toString().toStdString() << ": "; + nbyte = propertyList.at(1).toInt(); + isValue = propertyList.at(2).toInt(); + result = datas.mid(offset, nbyte); + offset += nbyte; + + switch (isValue) + { + case 0: + cout << result.toHex().toStdString() << endl; + break; + case 1: + cout << result.toHex().toStdString() << endl; + //foreach (var, propertyDetail) + //{ + + //} + break; + case 2: + if (propertyDetail.contains(result.toUInt())) + { + cout << propertyDetail.value(result.toUInt()).toStdString() << endl; + }else if (propertyDetail.contains(-1)) + { + cout << propertyDetail.value(-1).toStdString() << endl; + } + break; + case 3: + zigateBkd.responseListIndex[responseObject->code]->propertyManagerList[i.key()](result); + break; + case 4: + cout << "Liste" << endl; + break; + case 5: + cout << result.toStdString() << endl; + break; + } + i++; + } +} + +void macCapabilityManager(QByteArray mac) +{ + cout << "macCapabilityManger" << mac.toStdString() << endl; +} +/* void deviceAnnounceManager() +{ + infoOutput(responseListIndex("")); +} +*/ + +void dataIndicationManager(Response * response) +{ + infoOutput(response); +} + +void clustersListManager(Response * response) +{ + infoOutput(response); +} + +/* +void attributesListManager() +{ + infoOutput(attributesList); +} + +void commandsListManager() +{ + infoOutput(commandsList); +} + +void statusManager() +{ + infoOutput(status); +} + +void status2Manager() +{ + +} + +void versionListManager() +{ + infoOutput(versionList); +} +// **************************************************************************** +// 0 - Off +// 1 - On +// ******************************************************************************* + +void permitJoinManager() +{ + infoOutput(permitJoin); +} + +void networkJoinedFormedManager() +{ + infoOutput(networkJoinedFormed); +} +*/ + +void deviceListManager(Response * response) +{ + infoOutput(response); + // ************************************************************** + // + // + // + // + // 0 – battery 1- AC power + // 1-255 + // ************************************************************** + } + +/* +void bindResponseManager() +{ + infoOutput(bindResponse); +} + +void unbindResponseManager() +{ + infoOutput(unbindResponse); +} +*/ + +void networkAddressManager(Response * response) +{ + infoOutput(response); +} + + +void iEEEAddressManager(Response * response) +{ + infoOutput(response); +} + +void nodeDescriptorManager(Response * response) +{ + infoOutput(response); +} + +void simpleDescriptorManager(Response * response) +{ + infoOutput(response); +} + +/* +void powerDescriptorManager() +{ + infoOutput(powerDescriptor); +} + +void activeEndpointManager() +{ + infoOutput(activeEndpoint); +} + +void matchDescriptorManager() +{ + infoOutput(matchDescriptor); +} + +void userDescriptorNotifyManager() +{ + infoOutput(userDescriptorNotify); +} + +void userDescriptorManager() +{ + infoOutput(userDescriptor); +} + +void complexDescriptorManager() +{ + infoOutput(complexDescriptor); +} + +void managementLeaveManager() +{ + infoOutput(managementLeave); +} + +void leaveIndicationManager() +{ + infoOutput(leaveIndication); +} + +void managementNetworkUpdateManager() +{ + infoOutput(managementNetworkUpdate); +} + +void systemServerDiscoveryManager() +{ + infoOutput(systemServerDiscovery); +} +// ********************************* // +// Bitmask according to spec". // +// ********************************* // + +void managementLQIManager() +{ + infoOutput(managementLQI); +} + +void attributeDiscoveryManager() +{ + infoOutput(attributeDiscovery); +} +*/ diff --git a/zigateBackend.h b/zigateBackend.h index 1a66d5f..3f07b8a 100644 --- a/zigateBackend.h +++ b/zigateBackend.h @@ -70,6 +70,7 @@ #include #include #include "responseClasses.h" +#include //void deviceAnnounceManager(Response *); //void commandReturnStatusManager(Response *); @@ -107,11 +108,14 @@ void dataIndicationManager(Response *); class ZigbeeMgr; -class ZigateBackend : public ZigbeeMgr +class ZigateBackend : QObject { Q_OBJECT + public slots: + void interpretResult(QByteArray); + public: ZigateBackend(); ~ZigateBackend(); @@ -121,10 +125,13 @@ class ZigateBackend : public ZigbeeMgr QByteArray transcode(QByteArray datas); QByteArray unTranscode(QByteArray datas); void sendCmd(QByteArray cmd, QByteArray datas); - int interpretResult(QByteArray datas); - void getResponse(); + //int interpretResult(QByteArray datas); + //void getResponse(); bool resetCoordinator(); + // commands + void getVersion(); + QMap resultCodes; QMap > cmdList = { @@ -319,6 +326,7 @@ class ZigateBackend : public ZigbeeMgr {"FF02", " Xiaomi private"}, {"1234", " Xiaomi private"} }; + }; diff --git a/zigateInit.cpp b/zigateInit.cpp index 618c615..4154cc0 100644 --- a/zigateInit.cpp +++ b/zigateInit.cpp @@ -1,7 +1,10 @@ #include "zigateBackend.h" +#include "serial.inc.h" + #include extern ZigateBackend zigateBkd; +extern SerialManager serialManager; extern QHash responseListIndex; using namespace std; @@ -692,7 +695,11 @@ bool ZigateBackend::initBackend() }; temp->manager = &defaultManager; + serialManager.initSerial(); + connect(&serialManager, SIGNAL(datasReady(QByteArray)), this, SLOT(interpretResult(QByteArray))); + resetCoordinator(); + getVersion(); return returnCode; } @@ -702,235 +709,3 @@ void infoOutput(Response *object) } -void defaultManager(Response *responseObject) -{ - int nbyte; - int isValue; - int offset = 0; - QByteArray datas = responseObject->datas; - QByteArray result; - QByteArray code = responseObject->code.toHex(); - - cout << responseObject->code.toStdString() << endl; - QMap >::iterator i = zigateBkd.responseListIndex[code]->properties.begin(); - QList propertyList; - QMap propertyDetail; - QMap var; - - infoOutput(responseObject); - while (i != zigateBkd.responseListIndex[code]->properties.end()) - { - propertyList = i.value(); - propertyDetail = zigateBkd.responseListIndex[code]->propertyDetail.value(i.key()); - cout << propertyList.at(0).toString().toStdString() << ": "; - nbyte = propertyList.at(1).toInt(); - isValue = propertyList.at(2).toInt(); - result = datas.mid(offset, nbyte); - offset += nbyte; - - switch (isValue) - { - case 0: - cout << result.toHex().toStdString() << endl; - break; - case 1: - cout << result.toHex().toStdString() << endl; - //foreach (var, propertyDetail) - //{ - - //} - break; - case 2: - if (propertyDetail.contains(result.toUInt())) - { - cout << propertyDetail.value(result.toUInt()).toStdString() << endl; - }else if (propertyDetail.contains(-1)) - { - cout << propertyDetail.value(-1).toStdString() << endl; - } - break; - case 3: - zigateBkd.responseListIndex[responseObject->code]->propertyManagerList[i.key()](result); - break; - case 4: - cout << "Liste" << endl; - break; - case 5: - cout << result.toStdString() << endl; - break; - } - i++; - } -} - -void macCapabilityManager(QByteArray mac) -{ - cout << "macCapabilityManger" << mac.toStdString() << endl; -} -/* void deviceAnnounceManager() -{ - infoOutput(responseListIndex("")); -} -*/ - -void dataIndicationManager(Response * response) -{ - infoOutput(response); -} - -void clustersListManager(Response * response) -{ - infoOutput(response); -} - -/* -void attributesListManager() -{ - infoOutput(attributesList); -} - -void commandsListManager() -{ - infoOutput(commandsList); -} - -void statusManager() -{ - infoOutput(status); -} - -void status2Manager() -{ - -} - -void versionListManager() -{ - infoOutput(versionList); -} -// **************************************************************************** -// 0 - Off -// 1 - On -// ******************************************************************************* - -void permitJoinManager() -{ - infoOutput(permitJoin); -} - -void networkJoinedFormedManager() -{ - infoOutput(networkJoinedFormed); -} -*/ - -void deviceListManager(Response * response) -{ - infoOutput(response); - // ************************************************************** - // - // - // - // - // 0 – battery 1- AC power - // 1-255 - // ************************************************************** - } - -/* -void bindResponseManager() -{ - infoOutput(bindResponse); -} - -void unbindResponseManager() -{ - infoOutput(unbindResponse); -} -*/ - -void networkAddressManager(Response * response) -{ - infoOutput(response); -} - - -void iEEEAddressManager(Response * response) -{ - infoOutput(response); -} - -void nodeDescriptorManager(Response * response) -{ - infoOutput(response); -} - -void simpleDescriptorManager(Response * response) -{ - infoOutput(response); -} - -/* -void powerDescriptorManager() -{ - infoOutput(powerDescriptor); -} - -void activeEndpointManager() -{ - infoOutput(activeEndpoint); -} - -void matchDescriptorManager() -{ - infoOutput(matchDescriptor); -} - -void userDescriptorNotifyManager() -{ - infoOutput(userDescriptorNotify); -} - -void userDescriptorManager() -{ - infoOutput(userDescriptor); -} - -void complexDescriptorManager() -{ - infoOutput(complexDescriptor); -} - -void managementLeaveManager() -{ - infoOutput(managementLeave); -} - -void leaveIndicationManager() -{ - infoOutput(leaveIndication); -} - -void managementNetworkUpdateManager() -{ - infoOutput(managementNetworkUpdate); -} - -void systemServerDiscoveryManager() -{ - infoOutput(systemServerDiscovery); -} -// ********************************* // -// Bitmask according to spec". // -// ********************************* // - -void managementLQIManager() -{ - infoOutput(managementLQI); -} - -void attributeDiscoveryManager() -{ - infoOutput(attributeDiscovery); -} -*/ diff --git a/zigatecmd.cpp b/zigatecmd.cpp index 62896a3..32ae4aa 100644 --- a/zigatecmd.cpp +++ b/zigatecmd.cpp @@ -4,16 +4,462 @@ using namespace std; bool ZigateBackend::resetCoordinator() { - bool returnCode; + bool returnCode = false; cout << "Sending reset to coordinator" << endl; sendCmd("0011", ""); - getResponse(); - getResponse(); - getResponse(); - getResponse(); - getResponse(); cout << "***************************************************" << endl; - sleep(10); + sleep(5); return returnCode; } + +void ZigateBackend::getVersion() +{ + sendCmd("0010", ""); +} +/* +bool ZigateBackend::setHeartBeat() +{ + +} + +bool ZigateBackend::getNetworkState() +{ + +} + +bool ZigateBackend::erasePersistentData() +{ + +} + +bool ZigateBackend::factoryNewReset() +{ + +} + +bool ZigateBackend::permitJoin() +{ + +} + +bool ZigateBackend::setExpendedPANID() +{ + +} + +bool ZigateBackend::setChannelMask() +{ + +} + +bool ZigateBackend::setSecurityStateKey() +{ + +} + +bool ZigateBackend::setDeviceType() +{ + +} + +bool ZigateBackend::startNetwork() +{ + +} + +bool ZigateBackend::startNetworkScan() +{ + +} + +bool ZigateBackend::removeDevice() +{ + +} + +bool ZigateBackend::enablePermissionsControlledJoins() +{ + +} + +bool ZigateBackend::authenticateDevice() +{ + +} + +bool ZigateBackend::outOfBandCommissioningDataRequest() +{ + +} + +bool ZigateBackend::userDescriptorSet() +{ + +} + +bool ZigateBackend::userDescriptorRequest() +{ + +} + +bool ZigateBackend::bind() +{ + +} + +bool ZigateBackend::unbind() +{ + +} + +bool ZigateBackend::complexDescriptorRequest() +{ + +} + +bool ZigateBackend::networkAddressRequest() +{ + +} + +bool ZigateBackend::iEEEAddressRequest() +{ + +} + +bool ZigateBackend::nodeDescriptorRequest() +{ + +} + +bool ZigateBackend::simpleDescriptorRequest() +{ + +} + +bool ZigateBackend::powerDescriptorRequest() +{ + +} + +bool ZigateBackend::activeEndpointRequest() +{ + +} + +bool ZigateBackend::matchDescriptorRequest() +{ + +} + +bool ZigateBackend::managementLeaveRequest() +{ + +} + +bool ZigateBackend::permitJoiningRequest() +{ + +} + +bool ZigateBackend::managementNetworkUpdateRequest() +{ + +} + +bool ZigateBackend::systemServerDiscoveryRequest() +{ + +} + +bool ZigateBackend::managementLQIRequest() +{ + +} + +bool ZigateBackend::addGroup() +{ + +} + +bool ZigateBackend::viewGroup() +{ + +} + +bool ZigateBackend::getGroupMembership() +{ + +} + +bool ZigateBackend::removeGroup() +{ + +} + +bool ZigateBackend::removeAllGroups() +{ + +} + +bool ZigateBackend::addGroupIfIdentify() +{ + +} + +bool ZigateBackend::identifySend() +{ + +} + +bool ZigateBackend::identifyQuery() +{ + +} + +bool ZigateBackend::moveToLevel() +{ + +} + +bool ZigateBackend::moveToLevelWithWithoutOnOoff() +{ + +} + +bool ZigateBackend::moveStep() +{ + +} + +bool ZigateBackend::moveStopMove() +{ + +} + +bool ZigateBackend::moveStopWithOnOff() +{ + +} + +bool ZigateBackend::onOffWithNEffects() +{ + +} + +bool ZigateBackend::onOffWithEffects() +{ + +} + +bool ZigateBackend::onOffTimedSend() +{ + +} + +bool ZigateBackend::onOffTimed() +{ + +} + +bool ZigateBackend::onOffWithEffectsSend() +{ + +} + +bool ZigateBackend::viewScene() +{ + +} + +bool ZigateBackend::addScene() +{ + +} + +bool ZigateBackend::removeScene() +{ + +} + +bool ZigateBackend::removeAllScenes() +{ + +} + +bool ZigateBackend::storeScene() +{ + +} + +bool ZigateBackend::recallScene() +{ + +} + +bool ZigateBackend::sceneMembershipRequest() +{ + +} + +bool ZigateBackend::addEnhancedScene() +{ + +} + +bool ZigateBackend::viewEnhancedHostToNodeScene() +{ + +} + +bool ZigateBackend::copyScene() +{ + +} + +bool ZigateBackend::moveToHue() +{ + +} + +bool ZigateBackend::moveHue() +{ + +} + +bool ZigateBackend::stepHue() +{ + +} + +bool ZigateBackend::moveToSaturation() +{ + +} + +bool ZigateBackend::moveSaturation() +{ + +} + +bool ZigateBackend::stepSaturation() +{ + +} + +bool ZigateBackend::moveToHueAndSaturation() +{ + +} + +bool ZigateBackend::moveToColour() +{ + +} + +bool ZigateBackend::moveColour() +{ + +} + +bool ZigateBackend::stepColour() +{ + +} + +bool ZigateBackend::enhancedMoveToHue() +{ + +} + +bool ZigateBackend::enhancedMoveHue() +{ + +} + +bool ZigateBackend::enhancedStepHue() +{ + +} + +bool ZigateBackend::enhancedMoveToHueAndSaturation() +{ + +} + +bool ZigateBackend::colourLoopSet() +{ + +} + +bool ZigateBackend::stopMoveStep() +{ + +} + +bool ZigateBackend::moveToColourTemperature() +{ + +} + +bool ZigateBackend::moveColourTemperature() +{ + +} + +bool ZigateBackend::stepColourTemperature() +{ + +} + +bool ZigateBackend::initiateTouchlink() +{ + +} + +bool ZigateBackend::touchLinkFactoryResetTarget() +{ + +} + +bool ZigateBackend::identifyTriggerEffect() +{ + +} + +bool ZigateBackend::lockUnlockDoor() +{ + +} + +bool ZigateBackend::readAttributerequest() +{ + +} + +bool ZigateBackend::writeAttributeRequest() +{ + +} + +bool ZigateBackend::configureReportingRequest() +{ + +} + +bool ZigateBackend::attributeDiscoveryRequest() +{ + +} + +bool ZigateBackend::iASZoneEnrollResponse() +{ + +} + +bool ZigateBackend::rawAPSDataRequest() +{ + +} +*/ diff --git a/zigbeemanager.pro b/zigbeemanager.pro index 4edee0f..f72a1e1 100644 --- a/zigbeemanager.pro +++ b/zigbeemanager.pro @@ -1,8 +1,10 @@ -QT += core gui +QT += core QT += serialport QT += widgets QT += KConfigCore KConfigGui QT += KCoreAddons +QT += concurrent + CONFIG += c++17 console CONFIG -= app_bundle @@ -30,3 +32,4 @@ HEADERS += \ responseClasses.h \ serial.inc.h \ version.h + diff --git a/zigbeemanager.pro.user b/zigbeemanager.pro.user new file mode 100644 index 0000000..fd94d21 --- /dev/null +++ b/zigbeemanager.pro.user @@ -0,0 +1,430 @@ + + + + + + EnvironmentId + {a3117c94-e673-4dca-aa4c-050bbea034fe} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + false + true + false + 1 + true + true + 0 + 8 + true + false + 1 + true + true + true + *.md, *.MD, Makefile + true + true + true + + + + ProjectExplorer.Project.PluginSettings + + + true + false + true + true + true + true + + + 0 + true + + true + true + Builtin.DefaultTidyAndClazy + 2 + + + + true + + + true + + + + + ProjectExplorer.Project.Target.0 + + Desktop + Qt 5.15.7 (qt5) + Qt 5.15.7 (qt5) + {a8a6d767-5e05-45c7-b70b-532f99112b6a} + 0 + 0 + 0 + + 0 + /home/daniel/develop/zigbeemanager/../build-zigbeemanager-Qt_5_15_7_qt5-Debug + /home/daniel/develop/build-zigbeemanager-Qt_5_15_7_qt5-Debug + + + true + QtProjectManager.QMakeBuildStep + false + + + + true + Qt4ProjectManager.MakeStep + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + clean + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + /home/daniel/develop/zigbeemanager/../build-zigbeemanager-Qt_5_15_7_qt5-Release + /home/daniel/develop/build-zigbeemanager-Qt_5_15_7_qt5-Release + + + true + QtProjectManager.QMakeBuildStep + false + + + + true + Qt4ProjectManager.MakeStep + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + clean + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + 0 + + + 0 + /home/daniel/develop/zigbeemanager/../build-zigbeemanager-Qt_5_15_7_qt5-Profile + /home/daniel/develop/build-zigbeemanager-Qt_5_15_7_qt5-Profile + + + true + QtProjectManager.QMakeBuildStep + false + + + + true + Qt4ProjectManager.MakeStep + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + clean + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + 0 + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + + false + ProjectExplorer.DefaultDeployConfiguration + + 1 + + true + true + true + + 2 + + zigbeemanager + Qt4ProjectManager.Qt4RunConfiguration:/home/daniel/develop/zigbeemanager/zigbeemanager.pro + /home/daniel/develop/zigbeemanager/zigbeemanager.pro + false + true + true + false + true + /home/daniel/develop/build-zigbeemanager-Qt_5_15_7_qt5-Debug + + 1 + + + + ProjectExplorer.Project.Target.1 + + Desktop + Desktop + Desktop + {893f9ca6-0efa-4c08-a4a6-5a818f60a8a0} + 0 + 0 + 0 + + 0 + /home/daniel/develop/zigbeemanager/../build-zigbeemanager-Desktop-Debug + /home/daniel/develop/build-zigbeemanager-Desktop-Debug + + + true + QtProjectManager.QMakeBuildStep + false + + + + true + Qt4ProjectManager.MakeStep + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + clean + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + /home/daniel/develop/zigbeemanager/../build-zigbeemanager-Desktop-Release + /home/daniel/develop/build-zigbeemanager-Desktop-Release + + + true + QtProjectManager.QMakeBuildStep + false + + + + true + Qt4ProjectManager.MakeStep + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + clean + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + 0 + + + 0 + /home/daniel/develop/zigbeemanager/../build-zigbeemanager-Desktop-Profile + /home/daniel/develop/build-zigbeemanager-Desktop-Profile + + + true + QtProjectManager.QMakeBuildStep + false + + + + true + Qt4ProjectManager.MakeStep + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + clean + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + 0 + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + + false + ProjectExplorer.DefaultDeployConfiguration + + 1 + + true + true + true + + 2 + + ProjectExplorer.CustomExecutableRunConfiguration + + false + true + false + true + + 1 + + + + ProjectExplorer.Project.TargetCount + 2 + + + ProjectExplorer.Project.Updater.FileVersion + 22 + + + Version + 22 + +