Compare commits
22 Commits
0.1
...
f7b2e5cb37
Author | SHA1 | Date | |
---|---|---|---|
f7b2e5cb37 | |||
0727e73f75 | |||
a032bc3f04 | |||
9d51646260 | |||
e5ff3716a7 | |||
3d928286b3 | |||
4392d14889 | |||
3ed8fd59ef | |||
f4d58fd05f | |||
238b0453f8 | |||
3870af9918 | |||
e3d48adb8d | |||
26d042eac3 | |||
e2c9e20ee9 | |||
2b430512e5 | |||
50621141bf | |||
be86c44846 | |||
8030843ed3 | |||
933c73dc04 | |||
790562783a | |||
1444d614f1 | |||
bb25d60c25 |
19
library.cpp
19
library.cpp
@ -1,19 +0,0 @@
|
|||||||
#include <QCoreApplication>
|
|
||||||
#include <iostream>
|
|
||||||
|
|
||||||
using namespace std;
|
|
||||||
|
|
||||||
extern int debugLevel;
|
|
||||||
|
|
||||||
void debug(QString text, int level)
|
|
||||||
{
|
|
||||||
if (level & debugLevel)
|
|
||||||
{
|
|
||||||
cout << text.toStdString() << endl;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void signal_handler(int signal)
|
|
||||||
{
|
|
||||||
cout << "Received signal " << signal << endl;
|
|
||||||
}
|
|
12
library.h
12
library.h
@ -1,12 +0,0 @@
|
|||||||
#ifndef LIBRARY_H
|
|
||||||
#define LIBRARY_H
|
|
||||||
|
|
||||||
#define DEBUG 1
|
|
||||||
#define INFO 2
|
|
||||||
#define WARNING 3
|
|
||||||
#define ERROR 4
|
|
||||||
|
|
||||||
void debug(QString text, int level);
|
|
||||||
void signal_handler(int signal);
|
|
||||||
|
|
||||||
#endif // LIBRARY_H
|
|
22
main.cpp
22
main.cpp
@ -1,22 +0,0 @@
|
|||||||
#include "main.h"
|
|
||||||
|
|
||||||
using namespace std;
|
|
||||||
|
|
||||||
int debugLevel = DEBUG | INFO | WARNING | ERROR;
|
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
|
||||||
{
|
|
||||||
QCoreApplication a(argc, argv);
|
|
||||||
QCoreApplication::setOrganizationName("zigbeemanager");
|
|
||||||
QCoreApplication::setApplicationName("zigbeemanager");
|
|
||||||
|
|
||||||
ZigateBackend zigateBkd;
|
|
||||||
// zigbeemgr();
|
|
||||||
|
|
||||||
//QObject::connect(&zigbeemgr, SIGNAL(readyRead()), &zigbeemgr, SLOT(getData()));
|
|
||||||
//QObject::connect(&zigbeemgr, SIGNAL(bytesWritten(qint64)), &zigbeemgr, SLOT(confirmWrite(qint64)));
|
|
||||||
|
|
||||||
zigateBkd.sendCmd(zigateBkd.getVersion.at(0), zigateBkd.getVersion.at(1), zigateBkd.getVersion.at(2));
|
|
||||||
|
|
||||||
return a.exec();
|
|
||||||
}
|
|
21
main.h
21
main.h
@ -1,21 +0,0 @@
|
|||||||
#ifndef MAIN_H
|
|
||||||
#define MAIN_H
|
|
||||||
|
|
||||||
#include <QSettings>
|
|
||||||
#include <cstring>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <cstdio>
|
|
||||||
#include <QGuiApplication>
|
|
||||||
#include <QStringBuilder>
|
|
||||||
#include <QString>
|
|
||||||
#include <QCoreApplication>
|
|
||||||
#include <csignal>
|
|
||||||
#include <iostream>
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <string>
|
|
||||||
#include <QtEndian>
|
|
||||||
#include <QDebug>
|
|
||||||
#include "library.h"
|
|
||||||
#include "zigateBackend.h"
|
|
||||||
|
|
||||||
#endif // MAIN_H
|
|
@ -1,65 +0,0 @@
|
|||||||
#include "serial.inc.h"
|
|
||||||
|
|
||||||
extern QApplication a;
|
|
||||||
using namespace std;
|
|
||||||
|
|
||||||
ZigbeeMgr::ZigbeeMgr()
|
|
||||||
{
|
|
||||||
//QMessageBox::StandardButton reply;
|
|
||||||
bool test;
|
|
||||||
|
|
||||||
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);
|
|
||||||
if (!test)
|
|
||||||
{
|
|
||||||
cout << this->errorString().toStdString() << "=>" << this->serialDevicePath.toStdString() << endl;
|
|
||||||
/*QString str = "Device can not be openened : " + errorString() + "=>" + this->device;
|
|
||||||
reply = QMessageBox::question(
|
|
||||||
nullptr,
|
|
||||||
a.applicationName(),
|
|
||||||
str,
|
|
||||||
QMessageBox::Retry|QMessageBox::Abort,
|
|
||||||
QMessageBox::Retry
|
|
||||||
);
|
|
||||||
if (reply == QMessageBox::Abort)
|
|
||||||
{
|
|
||||||
exit(1);
|
|
||||||
}*/
|
|
||||||
sleep(5);
|
|
||||||
}
|
|
||||||
}while(!test);
|
|
||||||
}
|
|
||||||
|
|
||||||
ZigbeeMgr::~ZigbeeMgr()
|
|
||||||
{
|
|
||||||
this->close();
|
|
||||||
}
|
|
||||||
|
|
||||||
void ZigbeeMgr::getData()
|
|
||||||
{
|
|
||||||
dataRead = this->readAll();
|
|
||||||
cout << dataRead.toHex().toStdString() << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
void ZigbeeMgr::confirmWrite(qint16 byte)
|
|
||||||
{
|
|
||||||
QString str;
|
|
||||||
if (byte != dataWriteSize)
|
|
||||||
{
|
|
||||||
str = "Bytes written not egal to bytes sent : " + QString::number(byte) + " written for " + dataWriteSize + " sent";
|
|
||||||
cout << str.toStdString() << endl;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void ZigbeeMgr::write(QString datas)
|
|
||||||
{
|
|
||||||
dataWriteSize = datas.count();
|
|
||||||
this->writeData(datas.toStdString().c_str(), datas.count());
|
|
||||||
}
|
|
||||||
|
|
35
serial.inc.h
35
serial.inc.h
@ -1,35 +0,0 @@
|
|||||||
#ifndef SERIAL_INC_H
|
|
||||||
#define SERIAL_INC_H
|
|
||||||
|
|
||||||
#include <QDebug>
|
|
||||||
#include <sys/wait.h>
|
|
||||||
#include <QSerialPort>
|
|
||||||
#include <QApplication>
|
|
||||||
#include <iostream>
|
|
||||||
|
|
||||||
class ZigbeeMgr : public QSerialPort
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
|
||||||
//QSerialPort * sp;
|
|
||||||
QByteArray dataRead;
|
|
||||||
QByteArray dataWrite;
|
|
||||||
qint64 dataWriteSize;
|
|
||||||
QString serialDevicePath;
|
|
||||||
|
|
||||||
//QAbstractButton * reply;
|
|
||||||
//QString serialDevicePath;
|
|
||||||
|
|
||||||
void write(QString datas);
|
|
||||||
ZigbeeMgr();
|
|
||||||
~ZigbeeMgr();
|
|
||||||
|
|
||||||
private slots:
|
|
||||||
void getData();
|
|
||||||
void confirmWrite(qint16 byte);
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif // SERIAL_INC_H
|
|
@ -1,114 +0,0 @@
|
|||||||
#include "main.h"
|
|
||||||
#include <unistd.h>
|
|
||||||
|
|
||||||
using namespace std;
|
|
||||||
|
|
||||||
ZigateBackend::ZigateBackend()
|
|
||||||
{
|
|
||||||
bool result;
|
|
||||||
|
|
||||||
this->resultCodes.insert(0x8000, "Status");
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//resultCodes.insert();
|
|
||||||
}
|
|
||||||
|
|
||||||
ZigateBackend::~ZigateBackend()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
QByteArray ZigateBackend::checksum(QByteArray msgType, QByteArray length, QByteArray datas)
|
|
||||||
{
|
|
||||||
quint16 temp = 0;
|
|
||||||
int i;
|
|
||||||
|
|
||||||
QString str = msgType.mid(0,2);
|
|
||||||
cout << str.toStdString() << endl;
|
|
||||||
temp ^= qFromLittleEndian<quint16>(msgType[0] + msgType[1]);
|
|
||||||
temp ^= qFromLittleEndian<quint16>(msgType[2] + msgType[3]);
|
|
||||||
temp ^= qFromLittleEndian<quint16>(length[0] + length[1]);
|
|
||||||
temp ^= qFromLittleEndian<quint16>(length[2] + length[3]);
|
|
||||||
for (i=0;i<=(datas.count());i+=2)
|
|
||||||
{
|
|
||||||
temp ^= qFromLittleEndian<quint16>(datas[i] + datas[i+1]);
|
|
||||||
}
|
|
||||||
return QByteArray::number(temp, 16);
|
|
||||||
}
|
|
||||||
|
|
||||||
QByteArray ZigateBackend::transcode(QByteArray datas)
|
|
||||||
{
|
|
||||||
QByteArray msg = "";
|
|
||||||
int i;
|
|
||||||
QByteArray byte;
|
|
||||||
|
|
||||||
if (datas.count()%2 != 0)
|
|
||||||
{
|
|
||||||
return "-1";
|
|
||||||
}
|
|
||||||
for (i=0;i<datas.count();i+=2)
|
|
||||||
{
|
|
||||||
byte = datas.mid(i,2);
|
|
||||||
cout << byte.toStdString() << " => " << byte.toUInt(nullptr, 16) << endl;
|
|
||||||
if (byte.toUInt(nullptr, 16)>0x10)
|
|
||||||
{
|
|
||||||
msg += byte;
|
|
||||||
|
|
||||||
}else
|
|
||||||
{
|
|
||||||
msg.append("02");
|
|
||||||
msg.append(QByteArray::number(byte.toUInt(nullptr, 16) ^ 0x10, 16));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return msg;
|
|
||||||
}
|
|
||||||
|
|
||||||
void ZigateBackend::sendCmd(QByteArray cmd, QByteArray len, QByteArray datas)
|
|
||||||
{
|
|
||||||
QByteArray msg;
|
|
||||||
|
|
||||||
msg = QByteArray::fromHex("01");
|
|
||||||
msg += QByteArray::fromHex(transcode(cmd));
|
|
||||||
msg += QByteArray::fromHex(transcode(len));
|
|
||||||
if (!datas.isEmpty())
|
|
||||||
{
|
|
||||||
msg += QByteArray::fromHex(checksum(cmd, len, datas));
|
|
||||||
msg += QByteArray::fromHex(transcode(datas));
|
|
||||||
}else{
|
|
||||||
msg += QByteArray::fromHex(checksum(cmd, len, "0"));
|
|
||||||
}
|
|
||||||
msg += QByteArray::fromHex("03");
|
|
||||||
cout << msg.toStdString() << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool ZigateBackend::findSerialDevice()
|
|
||||||
{
|
|
||||||
const auto serialPortInfos = QSerialPortInfo::availablePorts();
|
|
||||||
for (const QSerialPortInfo &portInfo : serialPortInfos)
|
|
||||||
{
|
|
||||||
if (portInfo.serialNumber() == "ZIGATE+")
|
|
||||||
{
|
|
||||||
this->portName = portInfo.portName();
|
|
||||||
this->serialDevicePath = portInfo.systemLocation();
|
|
||||||
this->serialDeviceDescription = portInfo.description();
|
|
||||||
this->serialDeviceManufacturer = portInfo.manufacturer();
|
|
||||||
this->serialDeviceNumber = portInfo.serialNumber();
|
|
||||||
this->serialDeviceVendor = portInfo.vendorIdentifier();
|
|
||||||
this->serialDeviceProduct = portInfo.productIdentifier();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
378
zigateBackend.h
378
zigateBackend.h
@ -1,378 +0,0 @@
|
|||||||
#ifndef ZIGATEBACKEND_H
|
|
||||||
#define ZIGATEBACKEND_H
|
|
||||||
|
|
||||||
#include "serial.inc.h"
|
|
||||||
#include <QMap>
|
|
||||||
#include <QSerialPortInfo>
|
|
||||||
#include <QSerialPort>
|
|
||||||
//#include <QArray>
|
|
||||||
|
|
||||||
class ZigbeeMgr;
|
|
||||||
|
|
||||||
class ZigateBackend : public ZigbeeMgr
|
|
||||||
{
|
|
||||||
|
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
|
||||||
QMap <int, QString> resultCodes;
|
|
||||||
QString portName;
|
|
||||||
QString serialDeviceDescription;
|
|
||||||
QString serialDeviceManufacturer;
|
|
||||||
QString serialDeviceNumber;
|
|
||||||
QString serialDeviceVendor;
|
|
||||||
QString serialDeviceProduct;
|
|
||||||
quint32 baudRate = 115200;
|
|
||||||
//ZigbeeMgr serial;
|
|
||||||
|
|
||||||
ZigateBackend();
|
|
||||||
~ZigateBackend();
|
|
||||||
|
|
||||||
QByteArray checksum(QByteArray msgType, QByteArray length, QByteArray datas);
|
|
||||||
QByteArray transcode(QByteArray datas);
|
|
||||||
void sendCmd(QByteArray cmd, QByteArray len, QByteArray datas);
|
|
||||||
bool findSerialDevice();
|
|
||||||
|
|
||||||
QMap <QString, QString> clusters
|
|
||||||
{
|
|
||||||
{"0000", " (General: Basic)"},
|
|
||||||
{"0001", " (General: Power Config)"},
|
|
||||||
{"0002", " (General: Temperature Config)"},
|
|
||||||
{"0003", " (General: Identify)"},
|
|
||||||
{"0004", " (General: Groups)"},
|
|
||||||
{"0005", " (General: Scenes)"},
|
|
||||||
{"0006", " (General: On/Off)"},
|
|
||||||
{"0007", " (General: On/Off Config)"},
|
|
||||||
{"0008", " (General: Level Control)"},
|
|
||||||
{"0009", " (General: Alarms)"},
|
|
||||||
{"000A", " (General: Time)"},
|
|
||||||
{"000F", " (General: Binary Input Basic)"},
|
|
||||||
{"0020", " (General: Poll Control)"},
|
|
||||||
{"0019", " (General: OTA)"},
|
|
||||||
{"0101", " (General: Door Lock"},
|
|
||||||
{"0201", " (HVAC: Thermostat)"},
|
|
||||||
{"0202", " (HVAC: Fan Control)"},
|
|
||||||
{"0300", " (Lighting: Color Control)"},
|
|
||||||
{"0400", " (Measurement: Illuminance)"},
|
|
||||||
{"0402", " (Measurement: Temperature)"},
|
|
||||||
{"0405", " (Measurement: Humidity)"},
|
|
||||||
{"0406", " (Measurement: Occupancy Sensing)"},
|
|
||||||
{"0500", " (Security & Safety: IAS Zone)"},
|
|
||||||
{"0702", " (Smart Energy: Metering)"},
|
|
||||||
{"0B05", " (Misc: Diagnostics)"},
|
|
||||||
{"1000", " (ZLL: Commissioning)"},
|
|
||||||
{"FF01", " Xiaomi private"},
|
|
||||||
{"FF02", " Xiaomi private"},
|
|
||||||
{"1234", " Xiaomi private"}
|
|
||||||
};
|
|
||||||
|
|
||||||
/*Zigate -> Obj 0x0008 Set heartBeat enable/disable (ZiGatev2 Firm v3.20) <enable/disable : uint8_t >
|
|
||||||
0 – disable (by default)
|
|
||||||
1 – enable
|
|
||||||
Status
|
|
||||||
*/
|
|
||||||
QList <QByteArray> heartbeatEnable = {"0008", "0001", "0210"};
|
|
||||||
|
|
||||||
/*Zigate -> Obj 0x0009 Get Network State (Firm v3.0d) Status
|
|
||||||
Network State Response
|
|
||||||
*/
|
|
||||||
QByteArray networkState = "0009";
|
|
||||||
|
|
||||||
/*
|
|
||||||
Zigate -> Obj 0x0010 Get Version Status
|
|
||||||
Version List
|
|
||||||
*/
|
|
||||||
QList <QByteArray> getVersion = {"0010", "0000", ""};
|
|
||||||
/*
|
|
||||||
Zigate -> Obj 0x0011 Reset Status, followed by chip reset
|
|
||||||
*/
|
|
||||||
QByteArray reset = "0011";
|
|
||||||
|
|
||||||
/*
|
|
||||||
Zigate -> Obj 0x0012 Erase Persistent Data Status
|
|
||||||
*/
|
|
||||||
QByteArray erasePersistentData = "0012";
|
|
||||||
|
|
||||||
/*
|
|
||||||
Zigate -> Obj 0x0013 ZLO/ZLL “Factory New” Reset No payload Status, followed by chip reset
|
|
||||||
Resets (“Factory New”) the Control Bridge but persists the frame counters.
|
|
||||||
*/
|
|
||||||
QByteArray factoryReset = "0013";
|
|
||||||
/*
|
|
||||||
Zigate -> Obj 0x0014 Permit Join Status, followed by “Permit join” status response
|
|
||||||
*/
|
|
||||||
QByteArray permitJoin = "0014";
|
|
||||||
|
|
||||||
/*
|
|
||||||
Zigate -> Obj 0x0015 Get devices list Get devices authentified in the ZiGate’s PDM. Status, followed by “Get devices list” response
|
|
||||||
*/
|
|
||||||
QByteArray getDevicesList = "0015";
|
|
||||||
|
|
||||||
/*
|
|
||||||
Zigate -> Obj 0x0016 Set Time server (v3.0f) <timestamp UTC: uQByteArray32_t> from 2000-01-01 00:00:00 Status
|
|
||||||
*/
|
|
||||||
QByteArray setTimeServer = "0016";
|
|
||||||
|
|
||||||
/*
|
|
||||||
Zigate -> Obj 0x0017 GetTime server (v3.0f) Status
|
|
||||||
Get_timer_server_response
|
|
||||||
*/
|
|
||||||
QByteArray getTimerServerResponse = "0017";
|
|
||||||
|
|
||||||
/*
|
|
||||||
Zigate -> Obj 0x0018 SetLed (v3.0f) <on/off : uint8_t >
|
|
||||||
0 – Off
|
|
||||||
1- On
|
|
||||||
Status
|
|
||||||
*/
|
|
||||||
QByteArray setLed = "0018";
|
|
||||||
|
|
||||||
/*
|
|
||||||
Zigate -> Obj 0x0019 Set Certification (v3.0f) <type : uint8_t >
|
|
||||||
1- CE
|
|
||||||
2- FCC
|
|
||||||
Status
|
|
||||||
*/
|
|
||||||
QByteArray setCertification = "0019";
|
|
||||||
|
|
||||||
/*
|
|
||||||
Zigate -> Obj 0x0020 Set Expended PANID <64-bit Extended PAN ID:uint64_t> Status
|
|
||||||
*/
|
|
||||||
QByteArray setExpended = "0020";
|
|
||||||
|
|
||||||
/*
|
|
||||||
Zigate -> Obj 0x0021 Set Channel Mask <channel mask:uint32_t> Status
|
|
||||||
*/
|
|
||||||
QByteArray setChannelMask = "0021";
|
|
||||||
|
|
||||||
/*
|
|
||||||
Zigate -> Obj 0x0022 Set Security State + Key <key type: uint8_t> Status
|
|
||||||
<key: data>
|
|
||||||
*/
|
|
||||||
QByteArray setSecurityState = "0022";
|
|
||||||
|
|
||||||
/*
|
|
||||||
Zigate -> Obj 0x0023 Set device Type <device type: uint8_t> Status
|
|
||||||
Device Types:
|
|
||||||
0 = Coordinator
|
|
||||||
1 = Router
|
|
||||||
*/
|
|
||||||
QByteArray setDeviceType = "0023";
|
|
||||||
|
|
||||||
/*
|
|
||||||
Zigate -> Obj 0x0024 Start Network Status
|
|
||||||
Network Joined / Formed
|
|
||||||
*/
|
|
||||||
QByteArray startNetwork = "0024";
|
|
||||||
|
|
||||||
/*
|
|
||||||
Zigate -> Obj 0x0025 Start Network Scan Status
|
|
||||||
Network Joined / Formed
|
|
||||||
*/
|
|
||||||
QByteArray StartNetworkScan = "0025";
|
|
||||||
|
|
||||||
/*
|
|
||||||
Zigate -> Obj 0x0026 Remove Device <Parent IEEE address: uint64_t> Status
|
|
||||||
<Child IEEE address: uint64_t> Leave indication
|
|
||||||
*/
|
|
||||||
QByteArray removeDevice = "0026";
|
|
||||||
|
|
||||||
/*
|
|
||||||
Zigate -> Obj 0x0027 Enable Permissions Controlled Joins <Enable/Disable : uint8_t> Status
|
|
||||||
1 – Enable
|
|
||||||
2 – Disable
|
|
||||||
*/
|
|
||||||
QByteArray enablePermControlledJoins = "0027";
|
|
||||||
|
|
||||||
/*
|
|
||||||
Zigate -> Obj 0x0028 Authenticate Device <IEEE address "; uint64_t> Status
|
|
||||||
<Key : 16 elements byte each> Authenticate response
|
|
||||||
*/
|
|
||||||
QByteArray authenticateDevice = "0028";
|
|
||||||
|
|
||||||
/*
|
|
||||||
Zigate -> Obj 0x0029 Out of Band Commissioning Data Request <Address of interest : uint64_t> Status
|
|
||||||
<Key : 16 elements byte each> Out of Band Commissioning Data Response
|
|
||||||
*/
|
|
||||||
QByteArray outOfBandCDR = "0029";
|
|
||||||
|
|
||||||
/*
|
|
||||||
Zigate -> Obj 0x002B User Descriptor Set < target short address: uint16_t> Status
|
|
||||||
< Address of interest: uint16_t> User descriptor notify response
|
|
||||||
< string length: uint8_t>
|
|
||||||
<data: uint8_t stream >
|
|
||||||
*/
|
|
||||||
QByteArray userDescriptorSet = "002B";
|
|
||||||
|
|
||||||
/*
|
|
||||||
Zigate -> Obj 0x002C User Descritpor Request < target short address: uint16_t> Status
|
|
||||||
< Address of interest: uint16_t> User Descriptor response
|
|
||||||
*/
|
|
||||||
QByteArray userDescriptorRequest = "002C";
|
|
||||||
|
|
||||||
/*
|
|
||||||
Zigate -> Obj 0x0531 Complex Descriptor request < target short address: uint16_t> Status
|
|
||||||
< Address of interest: uint16_t> Complex Descriptor Response
|
|
||||||
*/
|
|
||||||
QByteArray complexDescriptorRequest = "0531";
|
|
||||||
|
|
||||||
/*Zigate -> Obj 0x0030 Bind <target extended address: uint64_t> Status
|
|
||||||
<target endpoint: uint8_t> Bind response
|
|
||||||
<cluster ID: uint16_t>
|
|
||||||
<destination address mode: uint8_t>
|
|
||||||
<destination address:uint16_t or uint64_t>
|
|
||||||
<destination endpoint (value ignored for group address): uint8_t>
|
|
||||||
*/
|
|
||||||
QByteArray bind = "0030";
|
|
||||||
|
|
||||||
/*
|
|
||||||
Zigate -> Obj 0x0031 Unbind <target extended address: uint64_t> Status
|
|
||||||
<target endpoint: uint8_t> Unbind response
|
|
||||||
<cluster ID: uint16_t>
|
|
||||||
<destination address mode: uint8_t>
|
|
||||||
<destination address: uint16_t or uint64_t>
|
|
||||||
<destination endpoint(value ignored for group address): uint8_t>
|
|
||||||
*/
|
|
||||||
QByteArray unBind = "0031";
|
|
||||||
|
|
||||||
/*
|
|
||||||
Zigate -> Obj 0x0040 Network Address request <target short address: uint16_t> <extended address:uint64_t> Status
|
|
||||||
<request type: uint8_t> Network Address response
|
|
||||||
<start index: uint8_t>
|
|
||||||
Request Type:
|
|
||||||
0 = Single Request
|
|
||||||
1 = Extended Request
|
|
||||||
*/
|
|
||||||
QByteArray networkAddressRequest = "0040";
|
|
||||||
|
|
||||||
/*
|
|
||||||
Zigate -> Obj 0x0041 IEEE Address request <target short address: uint16_t> Status
|
|
||||||
<short address: uint16_t> IEEE Address response
|
|
||||||
<request type: uint8_t>
|
|
||||||
<start index: uint8_t>
|
|
||||||
Request Type:
|
|
||||||
0 = Single
|
|
||||||
1 = Extended
|
|
||||||
*/
|
|
||||||
QByteArray ieeeAddressRequest = "0041";
|
|
||||||
|
|
||||||
/*
|
|
||||||
Zigate -> Obj 0x0042 Node Descriptor request <target short address: uint16_t> Status
|
|
||||||
Node Descriptor response
|
|
||||||
*/
|
|
||||||
QByteArray nodeDescriptorRequest = "0042";
|
|
||||||
|
|
||||||
/*
|
|
||||||
Zigate -> Obj 0x0043 Simple Descriptor request <target short address: uint16_t> Status
|
|
||||||
<endpoint: uint8_t> Simple Descriptor response
|
|
||||||
*/
|
|
||||||
QByteArray simpleDescriptorRequest = "0043";
|
|
||||||
|
|
||||||
/*
|
|
||||||
Zigate -> Obj 0x0044 Power Descriptor request <target short address: uint16_t> Status
|
|
||||||
Power Descriptor response
|
|
||||||
*/
|
|
||||||
QByteArray powerDescriptorRequest = "0044";
|
|
||||||
|
|
||||||
/*
|
|
||||||
Zigate -> Obj 0x0045 Active Endpoint request <target short address: uint16_t> Status
|
|
||||||
Active Endpoint response
|
|
||||||
*/
|
|
||||||
QByteArray activeEndpointRequest = "0045";
|
|
||||||
|
|
||||||
/*
|
|
||||||
Zigate -> Obj 0x0046 Match Descriptor request <target short address: uint16_t> Status
|
|
||||||
<profile id: uint16_t> Match Descriptor response
|
|
||||||
<number of input clusters: uint8_t>
|
|
||||||
<input cluster list:data: each entry is uint16_t >
|
|
||||||
<number of output clusters: uint8_t>
|
|
||||||
<output cluster list:data: each entry is uint16_t>
|
|
||||||
*/
|
|
||||||
QByteArray matchDescriptorRequest = "0046";
|
|
||||||
|
|
||||||
/*
|
|
||||||
Zigate -> Obj 0x0047 Management Leave request <target short address: uint16_t> Status
|
|
||||||
<extended address: uint64_t> Management Leave response
|
|
||||||
<Rejoin: uint8_t> Leave indication
|
|
||||||
<Remove Children: uint8_t>
|
|
||||||
Rejoin,
|
|
||||||
0 = Do not rejoin
|
|
||||||
1 = Rejoin
|
|
||||||
Remove Children
|
|
||||||
0 = Leave, do not remove children
|
|
||||||
1 = Leave, removing children
|
|
||||||
*/
|
|
||||||
QByteArray managementLeaveRequest = "0047";
|
|
||||||
|
|
||||||
/*
|
|
||||||
Zigate -> Obj 0x0049 Permit Joining request <target short address: uint16_t> Status
|
|
||||||
<interval: uint8_t>
|
|
||||||
<TCsignificance: uint8_t>
|
|
||||||
Target address: May be address of gateway node or broadcast (0xfffc)
|
|
||||||
Interval:
|
|
||||||
0 = Disable Joining
|
|
||||||
1 – 254 = Time in seconds to allow joins
|
|
||||||
255 = Allow all joins
|
|
||||||
TCsignificance:
|
|
||||||
0 = No change in authentication
|
|
||||||
1 = Authentication policy as spec
|
|
||||||
*/
|
|
||||||
QByteArray permitJoiningRequest = "0049";
|
|
||||||
|
|
||||||
/*
|
|
||||||
Zigate -> Obj 0x004A Management Network Update request <target short address: uint16_t> Status
|
|
||||||
<channel mask: uint32_t> Management Network Update response
|
|
||||||
<scan duration: uint8_t>
|
|
||||||
<scan count: uint8_t>
|
|
||||||
<network update ID: uint8_t>
|
|
||||||
<network manager short address: uint16_t>
|
|
||||||
Channel Mask:
|
|
||||||
Mask of channels to scan
|
|
||||||
Scan Duration:
|
|
||||||
0 – 0xFF Multiple of superframe duration.
|
|
||||||
Scan count:
|
|
||||||
Scan repeats 0 – 5
|
|
||||||
Network Update ID:
|
|
||||||
0 – 0xFF Transaction ID for scan
|
|
||||||
*/
|
|
||||||
QByteArray manaementNetworkUpdateRequest = "004A";
|
|
||||||
|
|
||||||
/*
|
|
||||||
Zigate -> Obj 0x004B System Server Discovery request <target short address: uint16_t> Status
|
|
||||||
<Server mask: uint16_t> System Server Discovery response
|
|
||||||
Bitmask according to spec.
|
|
||||||
*/
|
|
||||||
QByteArray systemServerDiscoveryRequest = "004B";
|
|
||||||
|
|
||||||
/*
|
|
||||||
Zigate -> Obj 0x004C Leave Request <extended address: uint64_t> Status
|
|
||||||
<Rejoin: uint8_t> Leave indication Leave indication (0x8048)
|
|
||||||
<Remove Children: uint8_t>
|
|
||||||
Rejoin,
|
|
||||||
0 = Do not rejoin
|
|
||||||
1 = Rejoin
|
|
||||||
Remove Children
|
|
||||||
0 = Leave, do not remove children
|
|
||||||
1 = Leave, removing children
|
|
||||||
*/
|
|
||||||
QByteArray leaveRequest = "004C";
|
|
||||||
|
|
||||||
/*
|
|
||||||
Zigate -> Obj 0x004E Management LQI request <Target Address : uint16_t> Status
|
|
||||||
<Start Index : uint8_t> Management LQI response
|
|
||||||
*/
|
|
||||||
QByteArray managementLqiRequest = "004E";
|
|
||||||
|
|
||||||
/*
|
|
||||||
Zigate -> Obj 0x0051 Free PDM internal address map table (From v.322 ZiGate+) Status
|
|
||||||
*/
|
|
||||||
QByteArray freePdmTable = "0051";
|
|
||||||
|
|
||||||
/*
|
|
||||||
Zigate -> Obj 0x0052 Get PDM child table size (From v.322 ZiGate+) Status
|
|
||||||
PDM child table size response
|
|
||||||
*/
|
|
||||||
QByteArray getPdmChildTableSize = "0052";
|
|
||||||
|
|
||||||
};
|
|
||||||
#endif // ZIGATEBACKEND_H
|
|
73
zigateplugin/responseClasses.h
Normal file
73
zigateplugin/responseClasses.h
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
#ifndef RESPONSECLASSES_H
|
||||||
|
#define RESPONSECLASSES_H
|
||||||
|
#include <QByteArray>
|
||||||
|
#include <QString>
|
||||||
|
#include <QVariant>
|
||||||
|
#include <QMap>
|
||||||
|
#include <QList>
|
||||||
|
#include <QHash>
|
||||||
|
//#include "zigateplugin.h"
|
||||||
|
|
||||||
|
//void (*propertyManager)(QByteArray);
|
||||||
|
class ZigatePlugin;
|
||||||
|
class Response
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
QByteArray code;
|
||||||
|
QByteArray datas;
|
||||||
|
QString description;
|
||||||
|
void manager(Response *);
|
||||||
|
};
|
||||||
|
|
||||||
|
class ResponseProperties
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
QByteArray code;
|
||||||
|
QByteArray datas;
|
||||||
|
QString description;
|
||||||
|
QMap <uint, QList<QVariant>> properties;
|
||||||
|
QMap <uint, QMap<uint,QString>> propertyDetail;
|
||||||
|
QHash <uint, void (*)(QByteArray)> propertyManagerList;
|
||||||
|
void (*manager)(ResponseProperties *);
|
||||||
|
};
|
||||||
|
|
||||||
|
void infoOutput(ResponseProperties *);
|
||||||
|
void defaultManager(ResponseProperties *);
|
||||||
|
//void (*manager)(Response *);
|
||||||
|
void macCapabilityManager(QByteArray);
|
||||||
|
//void deviceAnnounceManager(ResponseProperties *);
|
||||||
|
//void commandReturnStatusManager(ResponseProperties *);
|
||||||
|
//void logMessageManager(ResponseProperties *);
|
||||||
|
//void dataIndicationManager(ResponseProperties *);
|
||||||
|
void clustersListManager(ResponseProperties *);
|
||||||
|
//void attributesListManager(ResponseProperties *);
|
||||||
|
//void commandsListManager(ResponseProperties *);
|
||||||
|
//void statusManager(ResponseProperties *);
|
||||||
|
//void status2Manager(ResponseProperties *);
|
||||||
|
//void versionListManager(ResponseProperties *);
|
||||||
|
//void permitJoinManager(ResponseProperties *);
|
||||||
|
//void networkJoinedFormedManager(ResponseProperties *);
|
||||||
|
//void bindResponseManager(ResponseProperties *);
|
||||||
|
//void unbindResponseManager(ResponseProperties *);
|
||||||
|
//void networkAddressManager(ResponseProperties *);
|
||||||
|
void iEEEAddressManager(ResponseProperties *);
|
||||||
|
void nodeDescriptorManager(ResponseProperties *);
|
||||||
|
void simpleDescriptorManager(ResponseProperties *);
|
||||||
|
//void powerDescriptorManager(ResponseProperties *);
|
||||||
|
//void activeEndpointManager(ResponseProperties *);
|
||||||
|
//void matchDescriptorManager(ResponseProperties *);
|
||||||
|
//void userDescriptorNotifyManager(ResponseProperties *);
|
||||||
|
//void userDescriptorManager(ResponseProperties *);
|
||||||
|
//void complexDescriptorManager(ResponseProperties *);
|
||||||
|
//void managementLeaveManager(ResponseProperties *);
|
||||||
|
//void leaveIndicationManager(ResponseProperties *);
|
||||||
|
//void managementNetworkUpdateManager(ResponseProperties *);
|
||||||
|
//void systemServerDiscoveryManager(ResponseProperties *);
|
||||||
|
//void managementLQIManager(ResponseProperties *);
|
||||||
|
//void attributeDiscoveryManager(ResponseProperties *);
|
||||||
|
void deviceListManager(ResponseProperties *);
|
||||||
|
void networkAddressManager(ResponseProperties *);
|
||||||
|
void dataIndicationManager(ResponseProperties *);
|
||||||
|
void macCapabilityManager(QByteArray mac);
|
||||||
|
|
||||||
|
#endif // RESPONSECLASSES_H
|
124
zigateplugin/serial.cpp
Normal file
124
zigateplugin/serial.cpp
Normal file
@ -0,0 +1,124 @@
|
|||||||
|
#include "serial.h"
|
||||||
|
#include <unistd.h>
|
||||||
|
#include "zigateplugin.h"
|
||||||
|
#include <QtCore>
|
||||||
|
|
||||||
|
//extern QApplication a;
|
||||||
|
extern ZigatePlugin zigatePlugin;
|
||||||
|
extern SerialManager serialManager;
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
SerialManager::SerialManager()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
SerialManager::~SerialManager()
|
||||||
|
{
|
||||||
|
this->close();
|
||||||
|
}
|
||||||
|
|
||||||
|
void SerialManager::initSerial()
|
||||||
|
{
|
||||||
|
|
||||||
|
this->setBaudRate(115200);
|
||||||
|
this->setDataBits(QSerialPort::Data8);
|
||||||
|
this->setStopBits(QSerialPort::OneStop);
|
||||||
|
this->setParity(QSerialPort::NoParity);
|
||||||
|
|
||||||
|
openSerialPort();
|
||||||
|
}
|
||||||
|
|
||||||
|
// open serial port and return true when it is available
|
||||||
|
bool SerialManager::openSerialPort()
|
||||||
|
{
|
||||||
|
bool result;
|
||||||
|
bool test = false;
|
||||||
|
|
||||||
|
while (1)
|
||||||
|
{
|
||||||
|
result = this->findSerialDevice();
|
||||||
|
this->setPortName(this->serialDevicePath);
|
||||||
|
if (result)
|
||||||
|
{
|
||||||
|
cout << "Device found :" + this->serialDevicePath.toStdString() << endl;
|
||||||
|
break;
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
cout << "Device not found, waiting 10 seconds before retrying" << endl;
|
||||||
|
sleep(10);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
while(!test or !this->isOpen())
|
||||||
|
{
|
||||||
|
test = this->open(QIODevice::ReadWrite);
|
||||||
|
if (!test)
|
||||||
|
{
|
||||||
|
cout << "opening device: " << this->errorString().toStdString() << "=>" << this->serialDevicePath.toStdString() << endl;
|
||||||
|
sleep(5);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// launch the thread which read datas on serial port
|
||||||
|
void ZigatePlugin::readDatas()
|
||||||
|
{
|
||||||
|
|
||||||
|
serialManager.dataRead = serialManager.readAll();
|
||||||
|
//cout << "reading datas" << serialManager.dataRead.toHex(' ').toStdString() << endl;
|
||||||
|
zigatePlugin.interpretResult(serialManager.dataRead);
|
||||||
|
}
|
||||||
|
|
||||||
|
void SerialManager::write2serial(QByteArray msg)
|
||||||
|
{
|
||||||
|
cout << "writing to serial" << endl;
|
||||||
|
dataWriteSize = msg.count();
|
||||||
|
cout << "size = " << dataWriteSize << endl;
|
||||||
|
this->write((const QByteArray)msg);
|
||||||
|
cout << msg.toHex().toStdString() << endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool SerialManager::findSerialDevice()
|
||||||
|
{
|
||||||
|
const auto serialPortInfos = QSerialPortInfo::availablePorts();
|
||||||
|
for (const QSerialPortInfo &portInfo : serialPortInfos)
|
||||||
|
{
|
||||||
|
cout << portInfo.serialNumber().toStdString() << this->deviceName.toStdString() << endl;
|
||||||
|
if (portInfo.serialNumber().contains(this->deviceName))
|
||||||
|
{
|
||||||
|
this->portName = portInfo.portName();
|
||||||
|
this->serialDevicePath = portInfo.systemLocation();
|
||||||
|
this->serialDeviceDescription = portInfo.description();
|
||||||
|
this->serialDeviceManufacturer = portInfo.manufacturer();
|
||||||
|
this->serialDeviceNumber = portInfo.serialNumber();
|
||||||
|
this->serialDeviceVendor = portInfo.vendorIdentifier();
|
||||||
|
this->serialDeviceProduct = portInfo.productIdentifier();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
void SerialManager::serialError(QSerialPort::SerialPortError error)
|
||||||
|
{
|
||||||
|
cout << "error code : " << error << this->errorString().toStdString() << "=>" << this->serialDevicePath.toStdString() << endl;
|
||||||
|
|
||||||
|
switch (error)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
case 3:
|
||||||
|
return;
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
case 9:
|
||||||
|
cout << "error code : " << error << this->errorString().toStdString() << "=>" << this->serialDevicePath.toStdString() << endl;
|
||||||
|
this->close();
|
||||||
|
openSerialPort();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
cout << "error code : " << error << this->errorString().toStdString() << "=>" << this->serialDevicePath.toStdString() << endl;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
48
zigateplugin/serial.h
Normal file
48
zigateplugin/serial.h
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
#ifndef SERIAL_INC_H
|
||||||
|
#define SERIAL_INC_H
|
||||||
|
|
||||||
|
//#include <QDebug>
|
||||||
|
#include <sys/wait.h>
|
||||||
|
#include <QSerialPort>
|
||||||
|
#include <QSerialPortInfo>
|
||||||
|
//#include <QApplication>
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
|
class SerialManager : public QSerialPort
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
//QSerialPort * sp;
|
||||||
|
QByteArray dataRead;
|
||||||
|
QByteArray dataWrite;
|
||||||
|
qint64 dataWriteSize;
|
||||||
|
QString serialDevicePath;
|
||||||
|
QString deviceName;
|
||||||
|
QString portName;
|
||||||
|
QString serialDeviceDescription;
|
||||||
|
QString serialDeviceManufacturer;
|
||||||
|
QString serialDeviceNumber;
|
||||||
|
QString serialDeviceVendor;
|
||||||
|
QString serialDeviceProduct;
|
||||||
|
quint32 baudRate = 115200;
|
||||||
|
|
||||||
|
SerialManager();
|
||||||
|
~SerialManager();
|
||||||
|
|
||||||
|
void initSerial();
|
||||||
|
bool findSerialDevice();
|
||||||
|
bool openSerialPort();
|
||||||
|
void write2serial(QByteArray);
|
||||||
|
|
||||||
|
//void getData();
|
||||||
|
|
||||||
|
signals:
|
||||||
|
void datasReady(QByteArray);
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
void serialError(QSerialPort::SerialPortError);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif // SERIAL_INC_H
|
8
zigateplugin/version.h
Normal file
8
zigateplugin/version.h
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#ifndef VERSION_H
|
||||||
|
#define VERSION_H
|
||||||
|
|
||||||
|
QString version = "0.1";
|
||||||
|
|
||||||
|
|
||||||
|
#endif // VERSION_H
|
||||||
|
|
720
zigateplugin/zigateInit.cpp
Normal file
720
zigateplugin/zigateInit.cpp
Normal file
@ -0,0 +1,720 @@
|
|||||||
|
#include "zigateplugin.h"
|
||||||
|
#include "serial.h"
|
||||||
|
#include "interface.h"
|
||||||
|
#include <QByteArray>
|
||||||
|
|
||||||
|
extern ZigatePlugin zigatePlugin;
|
||||||
|
extern SerialManager serialManager;
|
||||||
|
|
||||||
|
//extern QHash <QString, ResponseProperties *> responseListIndex;
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
extern QHash <QString, ResponseProperties*> responseListIndex;
|
||||||
|
|
||||||
|
bool ZigatePlugin::initPlugin()
|
||||||
|
{
|
||||||
|
bool returnCode = false;
|
||||||
|
ResponseProperties * temp;
|
||||||
|
QHash<QString, ResponseProperties*>::iterator i;
|
||||||
|
|
||||||
|
for (i = responseListIndex.begin(); i != responseListIndex.end(); ++i)
|
||||||
|
// init lists
|
||||||
|
//for(i=0;i=responseListIndex.count;i++)
|
||||||
|
{
|
||||||
|
temp = new ResponseProperties();
|
||||||
|
temp->manager = defaultManager;
|
||||||
|
i.value() = temp;
|
||||||
|
}
|
||||||
|
|
||||||
|
temp = responseListIndex["004D"];
|
||||||
|
temp->code = QByteArray::fromHex("004D");
|
||||||
|
temp->description = "Device announce";
|
||||||
|
temp->properties =
|
||||||
|
{
|
||||||
|
// {rang, {designation, nbyte, isvalue}}
|
||||||
|
// isvalue = 0 => display value
|
||||||
|
// = 1 => is array of bits
|
||||||
|
// = 2 => is index of string in list
|
||||||
|
// = 3 => launch a subroutine pointed by propertyManagerList
|
||||||
|
// = 4 => is a list of objects
|
||||||
|
{0, {"Short address", 2, 0}}, // uint16_t
|
||||||
|
{1, {"IEEE address", 4, 0}}, // uint64_t
|
||||||
|
{2, {"MAC capability", 1, 3}}
|
||||||
|
};
|
||||||
|
temp->propertyManagerList[2] = &macCapabilityManager;
|
||||||
|
temp->manager = &defaultManager;
|
||||||
|
temp->propertyDetail[2] =
|
||||||
|
{
|
||||||
|
{1, "Alternate PAN Coordinator"},
|
||||||
|
{2, "Device Type"},
|
||||||
|
{4, "Power source"},
|
||||||
|
{8, "Receiver On when Idle"},
|
||||||
|
{64, "Security capability"},
|
||||||
|
{128, "Allocate Address"}
|
||||||
|
};
|
||||||
|
// *****************************************************************************
|
||||||
|
// MAC capability
|
||||||
|
// Bit 0 - Alternate PAN Coordinator
|
||||||
|
// Bit 1 - Device Type
|
||||||
|
// Bit 2 - Power source
|
||||||
|
// Bit 3 - Receiver On when Idle
|
||||||
|
// Bit 4,5 - Reserved
|
||||||
|
// Bit 6 - Security capability
|
||||||
|
// Bit 7 - Allocate Address
|
||||||
|
// ******************************************************************************
|
||||||
|
|
||||||
|
temp = responseListIndex["8000"];
|
||||||
|
temp->code = QByteArray::fromHex("8000");
|
||||||
|
temp->description = "Status returned by command";
|
||||||
|
temp->properties =
|
||||||
|
{
|
||||||
|
{0, {"Status", 1, 2}}, // <uint8_t>
|
||||||
|
{1, {"Sequence number", 1, 0}}, // <uint8_t>
|
||||||
|
{2, {"Packet Type", 2, 0}}, // <uint16_t>
|
||||||
|
{3, {"Optional additional error information", -1, 5}} // <string>
|
||||||
|
};
|
||||||
|
temp->manager = &defaultManager;
|
||||||
|
temp->propertyDetail[0] =
|
||||||
|
{
|
||||||
|
{0, "Success"},
|
||||||
|
{1, "Incorrect parameters"},
|
||||||
|
{2, "Unhandled command"},
|
||||||
|
{3, "Command failed"},
|
||||||
|
{4, "Busy (Node is carrying out a lengthy operation and is currently unable to handle the incoming command)"},
|
||||||
|
{5, "Stack already started (no new configuration accepted)"},
|
||||||
|
{-1, "Failed"}
|
||||||
|
};
|
||||||
|
// *****************************************************************************
|
||||||
|
// // Status :
|
||||||
|
// // 0 = Success
|
||||||
|
// // 1 = Incorrect parameters
|
||||||
|
// // 2 = Unhandled command
|
||||||
|
// // 3 = Command failed
|
||||||
|
// // 4 = Busy (Node is carrying out a lengthy operation and is currently unable to handle the incoming command)
|
||||||
|
// // 5 = Stack already started (no new configuration accepted)
|
||||||
|
// // 128 – 244 = Failed (ZigBee event codes)
|
||||||
|
// // Packet Type: The value of the initiating command request.
|
||||||
|
// ******************************************************************************
|
||||||
|
|
||||||
|
temp = responseListIndex["8001"];
|
||||||
|
temp->code = QByteArray::fromHex("8001");
|
||||||
|
temp->description = "Log message";
|
||||||
|
temp->properties =
|
||||||
|
{
|
||||||
|
{0, {"Log level", 1, 2}}, // uint8_t
|
||||||
|
{1, {"Log message", -1, 5}} // string
|
||||||
|
};
|
||||||
|
temp->manager = &defaultManager;
|
||||||
|
temp->propertyDetail[0] =
|
||||||
|
{
|
||||||
|
{0, "Emergency"},
|
||||||
|
{1, "Alert"},
|
||||||
|
{2, "Critical"},
|
||||||
|
{3, "Error"},
|
||||||
|
{4, "Warning"},
|
||||||
|
{5, "Notice"},
|
||||||
|
{6, "Information"},
|
||||||
|
{7, "Debug"}
|
||||||
|
};
|
||||||
|
// *********************************************************************************
|
||||||
|
// 0 = Emergency
|
||||||
|
// 1 = Alert
|
||||||
|
// 2 = Critical
|
||||||
|
// 3 = Error
|
||||||
|
// 4 = Warning
|
||||||
|
// 5 = Notice
|
||||||
|
// 6 = Information
|
||||||
|
// 7 = Debug
|
||||||
|
// *********************************************************************************
|
||||||
|
temp = responseListIndex["8002"];
|
||||||
|
temp->code = QByteArray::fromHex("8002");
|
||||||
|
temp->description = "Data indication";
|
||||||
|
temp->properties =
|
||||||
|
{
|
||||||
|
{0, {"status", 1, 1}}, // uint8_t
|
||||||
|
{1, {"Profile ID", 2, 0}}, // uint16_t
|
||||||
|
{2, {"Cluster ID", 2, 0}}, // uint16_t
|
||||||
|
{3, {"Source endpoint", 1, 0}}, // uint8_t
|
||||||
|
{4, {"Destination endpoint", 1, 0}}, // uint8_t
|
||||||
|
{5, {"Source address mode", 1, 0}}, // uint8_t TODO
|
||||||
|
{6, {"Source address", 2, 0}}, // uint16_t or uint64_t
|
||||||
|
{7, {"Destination address mode", 0, 0}}, // uint8_t TODO
|
||||||
|
{8, {"Destination address", 2, 0}}, // uint16_t or uint64_t
|
||||||
|
{9, {"Payload size", 1, 0}}, // uint8_t
|
||||||
|
{10, {"Payload", -1, 0}} // data each element is uint8_t
|
||||||
|
};
|
||||||
|
temp->manager = &defaultManager; //dataIndicationManager
|
||||||
|
|
||||||
|
temp = responseListIndex["8003"];
|
||||||
|
temp->code = QByteArray::fromHex("8003");
|
||||||
|
temp->description = "list of object's clusters";
|
||||||
|
temp->properties =
|
||||||
|
{
|
||||||
|
{0, {"Source endpoint", 1, 0}}, // uint8_t
|
||||||
|
{1, {"Profile ID", 2, 0}}, // uint16_t
|
||||||
|
{2, {"Cluster list", 0, 0}}, // data each entry is uint16_t
|
||||||
|
{3, {"Source endpoint", 1, 0}}, // uint8_t
|
||||||
|
{4, {"Profile ID", 2, 0}}, // uint16_t
|
||||||
|
{5, {"Cluster ID", 2, 0}}, // uint16_t
|
||||||
|
{6, {"Attribute list", 2, 0}} // data each entry is uint16_t
|
||||||
|
};
|
||||||
|
temp->manager = &clustersListManager;
|
||||||
|
|
||||||
|
temp = responseListIndex["8004"];
|
||||||
|
temp->code = QByteArray::fromHex("8004");
|
||||||
|
temp->description = "list of object's attributes";
|
||||||
|
temp->properties =
|
||||||
|
{
|
||||||
|
{0, {"Source endpoint", 1, 0}}, // uint8_t
|
||||||
|
{1, {"Profile ID", 2, 0}}, // uint16_t
|
||||||
|
{2, {"Cluster ID", 2, 0}}, // uint16_t
|
||||||
|
{3, {"Attribute list", 2, 0}} // data each entry is uint16_t>
|
||||||
|
};
|
||||||
|
temp->manager = &defaultManager; //TODO
|
||||||
|
|
||||||
|
temp = responseListIndex["8005"];
|
||||||
|
temp->code = QByteArray::fromHex("8005");
|
||||||
|
temp->description = "List of object's commands";
|
||||||
|
temp->properties =
|
||||||
|
{
|
||||||
|
{0, {"Source endpoint", 1, 0}}, // uint8_t
|
||||||
|
{1, {"Profile ID", 1, 0}}, // uint16_t
|
||||||
|
{2, {"Cluster ID", 1, 0}}, // uint16_t
|
||||||
|
{3, {"Command ID list", -1, 0}} // data each entry is uint8_t
|
||||||
|
};
|
||||||
|
temp->manager = &defaultManager; //TODO
|
||||||
|
|
||||||
|
temp = responseListIndex["8006"];
|
||||||
|
temp->code = QByteArray::fromHex("8006");
|
||||||
|
temp->description = "Status after restart";
|
||||||
|
temp->properties =
|
||||||
|
{
|
||||||
|
{0, {"Status after restart: ", 1, 2}}
|
||||||
|
};
|
||||||
|
temp->manager = &defaultManager;
|
||||||
|
temp->propertyDetail[0] =
|
||||||
|
{
|
||||||
|
{0, "Startup"},
|
||||||
|
{1, "NFN_START"},
|
||||||
|
{2, "RUNNING"},
|
||||||
|
};
|
||||||
|
// *****************************************************************************
|
||||||
|
// 0 - STARTUP
|
||||||
|
// 2 - NFN_START
|
||||||
|
// 6 - RUNNING
|
||||||
|
// The node is provisioned from previous restart.
|
||||||
|
// *****************************************************************************
|
||||||
|
|
||||||
|
temp = responseListIndex["8007"];
|
||||||
|
temp->code = QByteArray::fromHex("8007");
|
||||||
|
temp->description = "Status after start";
|
||||||
|
temp->properties =
|
||||||
|
{
|
||||||
|
{0, {"Status after start: ", 1, 2}}
|
||||||
|
};
|
||||||
|
temp->manager = &defaultManager;
|
||||||
|
temp->propertyDetail[0] =
|
||||||
|
{
|
||||||
|
{0, "Startup"},
|
||||||
|
{1, "NFN_START"},
|
||||||
|
{2, "RUNNING"},
|
||||||
|
};
|
||||||
|
temp = responseListIndex["8008"];
|
||||||
|
temp->code = QByteArray::fromHex("8008");
|
||||||
|
temp->description = "HeartBeat";
|
||||||
|
temp->properties =
|
||||||
|
{
|
||||||
|
{0, {"UTC time :", 4, 0}}
|
||||||
|
};
|
||||||
|
temp->manager = &defaultManager;
|
||||||
|
|
||||||
|
temp = responseListIndex["8009"];
|
||||||
|
temp->code = QByteArray::fromHex("8009");
|
||||||
|
temp->description = "Network state";
|
||||||
|
temp->properties =
|
||||||
|
{
|
||||||
|
{0, {"Short Address: ", 2, 0}},
|
||||||
|
{1, {"Extended Address: ", 8, 0}},
|
||||||
|
{2, {"PAN ID: ", 2, 0}},
|
||||||
|
{3, {"Extended PAN ID: ", 8, 0}},
|
||||||
|
{4, {"Channel: ", 8, 0}}
|
||||||
|
};
|
||||||
|
temp->manager = &defaultManager;
|
||||||
|
|
||||||
|
temp = responseListIndex["8010"];
|
||||||
|
temp->code = QByteArray::fromHex("8010");
|
||||||
|
temp->description = "Version List";
|
||||||
|
temp->properties =
|
||||||
|
{
|
||||||
|
{0, {"Major version number", 2, 0}}, // uint16_t
|
||||||
|
{1, {"Installer version number", 2, 0}} // uint16_t
|
||||||
|
};
|
||||||
|
temp->manager = &defaultManager;
|
||||||
|
|
||||||
|
temp = responseListIndex["8011"];
|
||||||
|
temp->code = QByteArray::fromHex("8011");
|
||||||
|
temp->description = "Ack Data";
|
||||||
|
temp->properties =
|
||||||
|
{
|
||||||
|
{0, {"Status: ", 1, 0}},
|
||||||
|
{1, {"Destination address: ", 2, 0}},
|
||||||
|
{2, {"Destination endpoint: ", 1, 0}},
|
||||||
|
{3, {"Cluster ID :", 2, 0}}
|
||||||
|
};
|
||||||
|
temp->manager = &defaultManager;
|
||||||
|
|
||||||
|
temp = responseListIndex["8012"];
|
||||||
|
temp->code = QByteArray::fromHex("8012");
|
||||||
|
temp->description = "DATA_CONFIRM";
|
||||||
|
temp->properties =
|
||||||
|
{
|
||||||
|
{0, {"Status: ", 1, 0}},
|
||||||
|
{1, {"Source Endpoint: ", 1, 0}},
|
||||||
|
{2, {"Destination endpoint: ", 1, 0}},
|
||||||
|
{3, {"Destination Address mode:", 1, 0}},
|
||||||
|
{4, {"Destination IEEE address: ", 8, 0}},
|
||||||
|
{5, {"APS Sequence number: ", 1, 0}}
|
||||||
|
};
|
||||||
|
temp->manager = &defaultManager;
|
||||||
|
|
||||||
|
temp = responseListIndex["8014"];
|
||||||
|
temp->code = QByteArray::fromHex("8014");
|
||||||
|
temp->description = "Permit join status response";
|
||||||
|
temp->properties =
|
||||||
|
{
|
||||||
|
{0, {"Status", 1, 2}} // bool_t
|
||||||
|
};
|
||||||
|
temp->manager = &defaultManager;
|
||||||
|
temp->propertyDetail[0] =
|
||||||
|
{
|
||||||
|
{0, "Off"},
|
||||||
|
{1, "On"}
|
||||||
|
};
|
||||||
|
|
||||||
|
temp = responseListIndex["8015"];
|
||||||
|
temp->code = QByteArray::fromHex("8015");
|
||||||
|
temp->description = "Device list";
|
||||||
|
temp->properties =
|
||||||
|
{
|
||||||
|
{0, {"Device List", 1, 4}} // bool_t
|
||||||
|
};
|
||||||
|
temp->manager = &deviceListManager;
|
||||||
|
|
||||||
|
temp = responseListIndex["8017"];
|
||||||
|
temp->code = QByteArray::fromHex("8017");
|
||||||
|
temp->description = "Time server";
|
||||||
|
temp->properties =
|
||||||
|
{
|
||||||
|
{0, {"UTC Time: ", 1, 0}} // <Timestamp UTC: uint32_t> from 2000-01-01 00:00:00
|
||||||
|
};
|
||||||
|
temp->manager = &defaultManager;
|
||||||
|
|
||||||
|
temp = responseListIndex["8024"];
|
||||||
|
temp->code = QByteArray::fromHex("8024");
|
||||||
|
temp->description = "Network joined/formed";
|
||||||
|
temp->properties =
|
||||||
|
{
|
||||||
|
{0, {"Status", 1, 2}}, // uint8_t
|
||||||
|
{1, {"Short address", 2, 0}}, // uint16_t
|
||||||
|
{2, {"Extended address", 4, 0}}, // uint64_t
|
||||||
|
{3, {"Channel", 1, 0}} // uint8_t
|
||||||
|
};
|
||||||
|
temp->manager = &defaultManager;
|
||||||
|
temp->propertyDetail[0] =
|
||||||
|
{
|
||||||
|
{0, "Joined"},
|
||||||
|
{1, "Formed new network"},
|
||||||
|
{-1, "Failed"}
|
||||||
|
};
|
||||||
|
|
||||||
|
temp = responseListIndex["8028"];
|
||||||
|
temp->code = QByteArray::fromHex("8028");
|
||||||
|
temp->description = "Authenticate response";
|
||||||
|
temp->properties =
|
||||||
|
{
|
||||||
|
{0, {"IEEE address of the Gateway: ", 8, 0}},
|
||||||
|
{1, {"Encrypted Key: ", 16, 0}},
|
||||||
|
{2, {"MIC: ", 4, 0}},
|
||||||
|
{3, {"IEEE address of the initiating node: ", 8, 0}},
|
||||||
|
{4, {"Active Key Sequence number: ", 1, 0}},
|
||||||
|
{5, {"Channel: ", 1, 0}},
|
||||||
|
{6, {"Short PAN Id: ", 2, 0}},
|
||||||
|
{7, {"Extended PAN ID: ", 8, 0}},
|
||||||
|
};
|
||||||
|
temp->manager = &defaultManager;
|
||||||
|
|
||||||
|
temp = responseListIndex["802B"];
|
||||||
|
temp->code = QByteArray::fromHex("802B");
|
||||||
|
temp->description = "User Descriptor Notify";
|
||||||
|
temp->properties =
|
||||||
|
{
|
||||||
|
{0, {"Sequence number", 1, 0}}, // uin8_t
|
||||||
|
{1, {"Status", 1, 0}}, // uint8_t
|
||||||
|
{2, {"Network address of interest", 2, 0}} // uint16_t
|
||||||
|
};
|
||||||
|
temp->manager = &defaultManager;
|
||||||
|
|
||||||
|
temp = responseListIndex["802C"];
|
||||||
|
temp->code = QByteArray::fromHex("802C");
|
||||||
|
temp->description = "User Descriptor Response";
|
||||||
|
temp->properties =
|
||||||
|
{
|
||||||
|
{0, {"Sequence number", 1, 0}}, // uin8_t
|
||||||
|
{1, {"Status", 1, 0}}, // uint8_t
|
||||||
|
{2, {"Network address of interest", 2, 0}}, // uint16_6
|
||||||
|
{3, {"Length", 1, 0}}, // uint8_t
|
||||||
|
{4, {"Data", -1, 0}} // uint8_t stream
|
||||||
|
};
|
||||||
|
temp->manager = &defaultManager;
|
||||||
|
|
||||||
|
temp = responseListIndex["8030"];
|
||||||
|
temp->code = QByteArray::fromHex("8030");
|
||||||
|
temp->description = "Bind response";
|
||||||
|
temp->properties =
|
||||||
|
{
|
||||||
|
{0, {"Sequence number", 1, 0}}, // uint8_t
|
||||||
|
{1, {"Status", 1, 0}}, // uint8_t
|
||||||
|
{2, {"Source address mode: ", 1, 0}}, // uint8_t> (only from v3.1a)
|
||||||
|
{3, {"Source Address: ", 2, 0}} // uint16_t> (only from v3.1a)
|
||||||
|
};
|
||||||
|
temp->manager = &defaultManager;
|
||||||
|
|
||||||
|
temp = responseListIndex["8031"];
|
||||||
|
temp->code = QByteArray::fromHex("8031");
|
||||||
|
temp->description = "Unbind response";
|
||||||
|
temp->properties =
|
||||||
|
{
|
||||||
|
{0, {"Sequence number", 1, 0}}, // uint8_t
|
||||||
|
{1, {"Status", 1, 0}}, // uint8_t
|
||||||
|
{2, {"Source address mode: ", 1, 0}}, // uint8_t (only from v3.1a)
|
||||||
|
{3, {"Source Address: ", 2, 0}} // uint16_t (only from v3.1a)
|
||||||
|
|
||||||
|
};
|
||||||
|
temp->manager = &defaultManager;
|
||||||
|
|
||||||
|
temp = responseListIndex["8035"];
|
||||||
|
temp->code = QByteArray::fromHex("8035");
|
||||||
|
temp->description = "PDM event";
|
||||||
|
temp->properties =
|
||||||
|
{
|
||||||
|
{0, {"Event status: ", 1, 2}}, // uint8_t
|
||||||
|
{1, {"record ID: ", 4, 0}} // uint8_t
|
||||||
|
};
|
||||||
|
temp->manager = &defaultManager;
|
||||||
|
temp->propertyDetail[0] =
|
||||||
|
{
|
||||||
|
{0, "E_PDM_SYSTEM_EVENT_WEAR_COUNT_TRIGGER_VALUE_REACHED"},
|
||||||
|
{1, "E_PDM_SYSTEM_EVENT_DESCRIPTOR_SAVE_FAILED"},
|
||||||
|
{1, "E_PDM_SYSTEM_EVENT_PDM_NOT_ENOUGH_SPACE"},
|
||||||
|
{1, "E_PDM_SYSTEM_EVENT_LARGEST_RECORD_FULL_SAVE_NO_LONGER_POSSIBLE"},
|
||||||
|
{1, "E_PDM_SYSTEM_EVENT_SEGMENT_DATA_CHECKSUM_FAIL"},
|
||||||
|
{1, "E_PDM_SYSTEM_EVENT_SEGMENT_SAVE_OK"},
|
||||||
|
{1, "E_PDM_SYSTEM_EVENT_EEPROM_SEGMENT_HEADER_REPAIRED"},
|
||||||
|
{1, "E_PDM_SYSTEM_EVENT_SYSTEM_INTERNAL_BUFFER_WEAR_COUNT_SWAP"},
|
||||||
|
{1, "E_PDM_SYSTEM_EVENT_SYSTEM_DUPLICATE_FILE_SEGMENT_DETECTED"},
|
||||||
|
{1, "E_PDM_SYSTEM_EVENT_SYSTEM_ERROR"},
|
||||||
|
{1, "E_PDM_SYSTEM_EVENT_SEGMENT_PREWRITE"},
|
||||||
|
{1, "E_PDM_SYSTEM_EVENT_SEGMENT_POSTWRITE"},
|
||||||
|
{1, "E_PDM_SYSTEM_EVENT_SEQUENCE_DUPLICATE_DETECTED"},
|
||||||
|
{1, "E_PDM_SYSTEM_EVENT_SEQUENCE_VERIFY_FAIL"},
|
||||||
|
{1, "E_PDM_SYSTEM_EVENT_PDM_SMART_SAVE"},
|
||||||
|
{1, "E_PDM_SYSTEM_EVENT_PDM_FULL_SAVE"}
|
||||||
|
};
|
||||||
|
|
||||||
|
temp = responseListIndex["8040"];
|
||||||
|
temp->code = QByteArray::fromHex("8040");
|
||||||
|
temp->description = "Network Address response";
|
||||||
|
temp->properties =
|
||||||
|
{
|
||||||
|
{0, {"Sequence number", 1, 0}}, // uin8_t
|
||||||
|
{1, {"Status", 1, 0}}, // uint8_t
|
||||||
|
{2, {"IEEE address", 4, 0}}, // uint64_t
|
||||||
|
{3, {"Short address", 2, 0}}, // uint16_t
|
||||||
|
{4, {"Number of associated devices", 1, 0}}, // uint8_t
|
||||||
|
{5, {"Start index", 1, 0}}, // uint8_t
|
||||||
|
{6, {"Device list", -1, 4}} // data each entry is uint16_t>
|
||||||
|
};
|
||||||
|
temp->manager = &networkAddressManager;
|
||||||
|
|
||||||
|
temp = responseListIndex["8041"];
|
||||||
|
temp->code = QByteArray::fromHex("8041");
|
||||||
|
temp->description = "IEEE Address response";
|
||||||
|
temp->properties =
|
||||||
|
{
|
||||||
|
{0, {"Sequence number", 1, 0}}, // uin8_t
|
||||||
|
{1, {"Status", 1, 0}}, // uint8_t
|
||||||
|
{2, {"IEEE address", 4, 0}}, // uint64_t
|
||||||
|
{3, {"Short address", 2, 0}}, // uint16_t
|
||||||
|
{4, {"Number of associated devices", 1, 0}}, // uint8_t
|
||||||
|
{5, {"Start index", 1, 0}}, // uint8_t
|
||||||
|
{6, {"Device list", -1, 4}} // data each entry is uint16_t
|
||||||
|
};
|
||||||
|
temp->manager = &iEEEAddressManager;
|
||||||
|
|
||||||
|
temp = responseListIndex["8042"];
|
||||||
|
temp->code = QByteArray::fromHex("8042");
|
||||||
|
temp->description = "Node Descriptor response";
|
||||||
|
temp->properties =
|
||||||
|
{
|
||||||
|
{0, {"Sequence number", 1, 0}}, // uint8_t
|
||||||
|
{1, {"Network address", 2, 0}}, // uint16_t
|
||||||
|
{2, {"Manufacturer code", 2, 0}}, // uint16_t
|
||||||
|
{3, {"Max Rx Size", 2, 0}}, // uint16_t
|
||||||
|
{4, {"Max Tx Size", 2, 0}}, // uint16_t
|
||||||
|
{5, {"Server mask", 2, 0}}, // uint16_t
|
||||||
|
{6, {"Descriptor capability", 1, 0}}, // uint8_t
|
||||||
|
{7, {"Mac flags", 1, 0}}, // uint8_t
|
||||||
|
{8, {"Max buffer size", 1, 0}}, // uint8_t
|
||||||
|
{9, {"Bit fields", 2, -1}} // uint16_t
|
||||||
|
};
|
||||||
|
temp->manager = &nodeDescriptorManager;
|
||||||
|
|
||||||
|
temp = responseListIndex["8043"];
|
||||||
|
temp->code = QByteArray::fromHex("8043");
|
||||||
|
temp->description = "Simple Descriptor response";
|
||||||
|
temp->properties =
|
||||||
|
{
|
||||||
|
{0, {"Sequence number", 1, 0}}, // uint8_t
|
||||||
|
{1, {"Status", 1, 0}}, // uint8_t
|
||||||
|
{2, {"NwkAddress", 2, 0}}, // uint16_t
|
||||||
|
{3, {"Length", 1, 0}}, // uint8_t
|
||||||
|
{4, {"Endpoint", 1, 0}}, // uint8_t
|
||||||
|
{5, {"Profile", 2, 0}}, // uint16_t
|
||||||
|
{6, {"Device id", 2, 0}}, // uint16_t
|
||||||
|
{7, {"Bit fields", 1, 0}}, // uint8_t
|
||||||
|
{8, {"InClusterCount", 1, 0}}, // uint8_t
|
||||||
|
{9, {"In cluster list", 0, 0}}, // data each entry is uint16_t>
|
||||||
|
{10, {"Out Cluster Count", 1, 0}}, // uint8_t
|
||||||
|
{11, {"Out cluster list", -1, 0}} // data each entry is uint16_t
|
||||||
|
};
|
||||||
|
temp->manager = &defaultManager; //TODO
|
||||||
|
|
||||||
|
temp = responseListIndex["8044"];
|
||||||
|
temp->code = QByteArray::fromHex("8044");
|
||||||
|
temp->description = "Power Descriptor response";
|
||||||
|
temp->properties =
|
||||||
|
{
|
||||||
|
{0, {"Sequence number", 1, 0}}, // uin8_t
|
||||||
|
{1, {"Status", 1, 0}}, // uint8_t
|
||||||
|
{2, {"bit field", 2, 0}} // uint16_t
|
||||||
|
};
|
||||||
|
temp->manager = &defaultManager;
|
||||||
|
// ******************************************
|
||||||
|
// 0 to 3: current power mode
|
||||||
|
// 4 to 7: available power source
|
||||||
|
// 8 to 11: current power source
|
||||||
|
// 12 to 15: current power source level
|
||||||
|
// ******************************************
|
||||||
|
|
||||||
|
temp = responseListIndex["8045"];
|
||||||
|
temp->code = QByteArray::fromHex("8045");
|
||||||
|
temp->description = "Active Endpoint response";
|
||||||
|
temp->properties =
|
||||||
|
{
|
||||||
|
{0, {"Sequence number", 1, 0}}, // uint8_t
|
||||||
|
{1, {"Status", 1, 0}}, // uint8_t
|
||||||
|
{2, {"Address", 2, 0}}, // uint16_t
|
||||||
|
{3, {"Endpoint count", 1, 0}}, // uint8_t
|
||||||
|
{4, {"Active endpoint list", -1, 0}} // each data element of the type uint8_t
|
||||||
|
};
|
||||||
|
temp->manager = &defaultManager;
|
||||||
|
|
||||||
|
temp = responseListIndex["8046"];
|
||||||
|
temp->code = QByteArray::fromHex("8046");
|
||||||
|
temp->description = "Match Descriptor response";
|
||||||
|
temp->properties =
|
||||||
|
{
|
||||||
|
{0, {"Sequence number", 1, 0}}, // uint8_t
|
||||||
|
{1, {"Status", 1, 0}}, // uint8_t
|
||||||
|
{2, {"Network address", 2, 0}}, // uint16_t
|
||||||
|
{3, {"Length of list", 1, 0}}, // uint8_t
|
||||||
|
{4, {"Match list", -1, 0}} // data each entry is uint8_t
|
||||||
|
};
|
||||||
|
temp->manager = &defaultManager;
|
||||||
|
|
||||||
|
temp = responseListIndex["8047"];
|
||||||
|
temp->code = QByteArray::fromHex("8047");
|
||||||
|
temp->description = "Management Leave response";
|
||||||
|
temp->properties =
|
||||||
|
{
|
||||||
|
{0, {"Sequence number", 1, 0}}, // uint8_t
|
||||||
|
{1, {"Status", 1, 0}} // uint8_t
|
||||||
|
};
|
||||||
|
temp->manager = &defaultManager;
|
||||||
|
|
||||||
|
temp = responseListIndex["8048"];
|
||||||
|
temp->code = QByteArray::fromHex("8048");
|
||||||
|
temp->description = "Leave indication";
|
||||||
|
temp->properties =
|
||||||
|
{
|
||||||
|
{0, {"Extended address", 4, 0}}, // uint64_t
|
||||||
|
{1, {"Rejoin status", 1, 0}} // uint8_t
|
||||||
|
};
|
||||||
|
temp->manager = &defaultManager;
|
||||||
|
|
||||||
|
temp = responseListIndex["8049"];
|
||||||
|
temp->code = QByteArray::fromHex("8049");
|
||||||
|
temp->description = "PDM child table size";
|
||||||
|
temp->properties =
|
||||||
|
{
|
||||||
|
{0, {"Number of child: ", 1, 0}} // data each entry is uint8_t
|
||||||
|
};
|
||||||
|
temp->manager = &defaultManager;
|
||||||
|
|
||||||
|
temp = responseListIndex["804A"];
|
||||||
|
temp->code = QByteArray::fromHex("804A");
|
||||||
|
temp->description = "Management Network Update response";
|
||||||
|
temp->properties =
|
||||||
|
{
|
||||||
|
{0, {"Sequence number", 1, 0}}, // uint8_t
|
||||||
|
{1, {"Status", 1, 0}}, // uint8_t
|
||||||
|
{2, {"Total transmission", 2, 0}}, // uint16_t
|
||||||
|
{3, {"Transmission failures", 2, 0}}, // uint16_t
|
||||||
|
{4, {"Scanned channels", 4, 0}}, // uint32_t
|
||||||
|
{5, {"Scanned channel list count", 1, 0}}, // uint8_t
|
||||||
|
{6, {"Channel list", -1, 0}} // list each element is uint8_t
|
||||||
|
};
|
||||||
|
temp->manager = &defaultManager;
|
||||||
|
|
||||||
|
temp = responseListIndex["804B"];
|
||||||
|
temp->code = QByteArray::fromHex("804B");
|
||||||
|
temp->description = "System Server Discovery response";
|
||||||
|
temp->properties =
|
||||||
|
{
|
||||||
|
{0, {"Sequence number", 1, 0}}, // uint8_t
|
||||||
|
{1, {"status", 1, 0}}, // uint8_t
|
||||||
|
{2, {"Server mask", 2, 0}} // uint16_t
|
||||||
|
};
|
||||||
|
temp->manager = &defaultManager;
|
||||||
|
|
||||||
|
temp = responseListIndex["804E"];
|
||||||
|
temp->code = QByteArray::fromHex("804E");
|
||||||
|
temp->description = "Management LQI response";
|
||||||
|
temp->properties =
|
||||||
|
{
|
||||||
|
{0, {"Sequence number", 1, 0}}, // uint8_t
|
||||||
|
{1, {"status", 1, 0}}, // uint8_t
|
||||||
|
{2, {"Neighbour Table Entries ", 1, 0}}, // uint8_t
|
||||||
|
{3, {"Neighbour Table List Count ", 1, 0}}, // uint8_t
|
||||||
|
{4, {"Start Index ", 1, 0}}, // uint8_t
|
||||||
|
{5, {"List of Entries elements described below", -1, 0}}
|
||||||
|
};
|
||||||
|
temp->manager = &defaultManager;
|
||||||
|
|
||||||
|
temp = responseListIndex["8060"];
|
||||||
|
temp->code = QByteArray::fromHex("8060");
|
||||||
|
temp->description = "Add group";
|
||||||
|
temp->properties =
|
||||||
|
{
|
||||||
|
{0, {"Sequence number: ", 1, 0}},
|
||||||
|
{1, {"Endpoint: ", 1, 0}},
|
||||||
|
{2, {"Cluster id: ", 2, 0}},
|
||||||
|
{3, {"Status: ", 1, 0}}, //(added only from 3.0f version)
|
||||||
|
{4, {"Group id :", 2, 0}}, //(added only from 3.0f version)
|
||||||
|
{5, {"Source Address: ", 2, 0}}, //(added only from 3.0f version)
|
||||||
|
{6, {"Number of child: ", 1, 0}} // data each entry is uint8_t
|
||||||
|
};
|
||||||
|
temp->manager = &defaultManager;
|
||||||
|
|
||||||
|
temp = responseListIndex["8061"];
|
||||||
|
temp->code = QByteArray::fromHex("8061");
|
||||||
|
temp->description = "View group";
|
||||||
|
temp->properties =
|
||||||
|
{
|
||||||
|
{0, {"Sequence number: ", 1, 0}},
|
||||||
|
{1, {"Endpoint: ", 1, 0}},
|
||||||
|
{2, {"Cluster id: ", 2, 0}},
|
||||||
|
{3, {"Status: ", 1, 0}}, //(added only from 3.0f version)
|
||||||
|
{4, {"Group id :", 2, 0}}, //(added only from 3.0f version)
|
||||||
|
{5, {"Source Address: ", 2, 0}} //(added only from 3.0f version)
|
||||||
|
};
|
||||||
|
temp->manager = &defaultManager;
|
||||||
|
|
||||||
|
temp = responseListIndex["8062"];
|
||||||
|
temp->code = QByteArray::fromHex("8062");
|
||||||
|
temp->description = "Group membership";
|
||||||
|
temp->properties =
|
||||||
|
{
|
||||||
|
{0, {"Sequence number: ", 1, 0}},
|
||||||
|
{1, {"Endpoint: ", 1, 0}},
|
||||||
|
{2, {"Cluster id: ", 2, 0}},
|
||||||
|
{3, {"Source Address:", 2, 0}}, //(added only from 3.0d version)
|
||||||
|
{4, {"Capacity: ", 1, 0}},
|
||||||
|
{5, {"Group count: ", 1, 0}},
|
||||||
|
{6, {"List of Group id: ", 2, 0}}, //list each data item uint16_t>
|
||||||
|
{7, {"Source Addr: ", 2, 0}} //(added only from 3.0f version)
|
||||||
|
};
|
||||||
|
temp->manager = &defaultManager;
|
||||||
|
|
||||||
|
temp = responseListIndex["8063"];
|
||||||
|
temp->code = QByteArray::fromHex("8063");
|
||||||
|
temp->description = "Remove group";
|
||||||
|
temp->properties =
|
||||||
|
{
|
||||||
|
{0, {"Sequence number: ", 1, 0}},
|
||||||
|
{1, {"Endpoint: ", 1, 0}},
|
||||||
|
{2, {"Cluster id: ", 2, 0}},
|
||||||
|
{3, {"Source Address:", 2, 0}}, //(added only from 3.0d version)
|
||||||
|
{4, {"Status: ", 1, 0}},
|
||||||
|
{5, {"Group ID: ", 2, 0}}
|
||||||
|
};
|
||||||
|
temp->manager = &defaultManager;
|
||||||
|
|
||||||
|
temp = responseListIndex["8085"];
|
||||||
|
temp->code = QByteArray::fromHex("8085");
|
||||||
|
temp->description = "Level update";
|
||||||
|
temp->properties =
|
||||||
|
{
|
||||||
|
{0, {"Sequence number: ", 1, 0}},
|
||||||
|
{1, {"Endpoint: ", 1, 0}},
|
||||||
|
{2, {"Cluster id: ", 2, 0}},
|
||||||
|
{3, {"Source Address mode:", 1, 0}}, //(added only from 3.0d version)
|
||||||
|
{4, {"Source Address:", 2, 0}}, //(added only from 3.0d version)
|
||||||
|
{5, {"Status: ", 1, 0}}
|
||||||
|
};
|
||||||
|
temp->manager = &defaultManager;
|
||||||
|
|
||||||
|
temp = responseListIndex["8095"];
|
||||||
|
temp->code = QByteArray::fromHex("8095");
|
||||||
|
temp->description = "On/Off";
|
||||||
|
temp->properties =
|
||||||
|
{
|
||||||
|
{0, {"Sequence number: ", 1, 0}},
|
||||||
|
{1, {"Endpoint: ", 1, 0}},
|
||||||
|
{2, {"Cluster id: ", 2, 0}},
|
||||||
|
{3, {"Source Address mode:", 1, 0}}, //(added only from 3.0d version)
|
||||||
|
{4, {"Source Address:", 2, 0}}, //(added only from 3.0d version)
|
||||||
|
{5, {"Status: ", 1, 0}}
|
||||||
|
};
|
||||||
|
temp->manager = &defaultManager;
|
||||||
|
|
||||||
|
temp = responseListIndex["8140"];
|
||||||
|
temp->code = QByteArray::fromHex("8140");
|
||||||
|
temp->description = "Attribute Discovery response";
|
||||||
|
temp->properties =
|
||||||
|
{
|
||||||
|
{0, {"Complete", 1, 0}}, // uint8_t
|
||||||
|
{1, {"Attribute type", 1, 0}}, // uint8_t
|
||||||
|
{2, {"Attribute id", 2, 0}} // uint16_t
|
||||||
|
};
|
||||||
|
temp->manager = &defaultManager;
|
||||||
|
|
||||||
|
|
||||||
|
qRegisterMetaType<QSerialPort::SerialPortError>("serialManager");
|
||||||
|
serialManager.initSerial();
|
||||||
|
connect(&serialManager, SIGNAL(readyRead()), &zigatePlugin, SLOT(readDatas()));
|
||||||
|
connect(&serialManager, SIGNAL(errorOccurred(QSerialPort::SerialPortError)), &serialManager, SLOT(serialError(QSerialPort::SerialPortError)), Qt::QueuedConnection);
|
||||||
|
|
||||||
|
//sending reset and getting version of zigate
|
||||||
|
resetCoordinator();
|
||||||
|
getVersion();
|
||||||
|
|
||||||
|
return returnCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
void infoOutput(ResponseProperties *object)
|
||||||
|
{
|
||||||
|
cout << object->code.toHex().toStdString() << " : " << object->description.toStdString() << endl;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
468
zigateplugin/zigatecmd.cpp
Normal file
468
zigateplugin/zigatecmd.cpp
Normal file
@ -0,0 +1,468 @@
|
|||||||
|
#include "zigateplugin.h"
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
class ZigatePugin;
|
||||||
|
|
||||||
|
bool ZigatePlugin::resetCoordinator()
|
||||||
|
{
|
||||||
|
bool returnCode = false;
|
||||||
|
|
||||||
|
cout << "Sending reset to coordinator" << endl;
|
||||||
|
sendCmd("0011", "");
|
||||||
|
cout << "***************************************************" << endl;
|
||||||
|
//sleep(5);
|
||||||
|
return returnCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ZigatePlugin::getVersion()
|
||||||
|
{
|
||||||
|
sendCmd("0010", "");
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
bool ZigatePlugin::setHeartBeat()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::getNetworkState()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::erasePersistentData()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::factoryNewReset()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::permitJoin()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::setExpendedPANID()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::setChannelMask()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::setSecurityStateKey()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::setDeviceType()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::startNetwork()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::startNetworkScan()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::removeDevice()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::enablePermissionsControlledJoins()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::authenticateDevice()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::outOfBandCommissioningDataRequest()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::userDescriptorSet()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::userDescriptorRequest()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::bind()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::unbind()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::complexDescriptorRequest()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::networkAddressRequest()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::iEEEAddressRequest()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::nodeDescriptorRequest()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::simpleDescriptorRequest()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::powerDescriptorRequest()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::activeEndpointRequest()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::matchDescriptorRequest()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::managementLeaveRequest()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::permitJoiningRequest()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::managementNetworkUpdateRequest()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::systemServerDiscoveryRequest()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::managementLQIRequest()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::addGroup()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::viewGroup()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::getGroupMembership()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::removeGroup()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::removeAllGroups()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::addGroupIfIdentify()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::identifySend()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::identifyQuery()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::moveToLevel()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::moveToLevelWithWithoutOnOoff()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::moveStep()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::moveStopMove()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::moveStopWithOnOff()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::onOffWithNEffects()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::onOffWithEffects()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::onOffTimedSend()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::onOffTimed()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::onOffWithEffectsSend()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::viewScene()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::addScene()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::removeScene()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::removeAllScenes()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::storeScene()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::recallScene()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::sceneMembershipRequest()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::addEnhancedScene()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::viewEnhancedHostToNodeScene()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::copyScene()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::moveToHue()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::moveHue()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::stepHue()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::moveToSaturation()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::moveSaturation()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::stepSaturation()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::moveToHueAndSaturation()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::moveToColour()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::moveColour()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::stepColour()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::enhancedMoveToHue()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::enhancedMoveHue()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::enhancedStepHue()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::enhancedMoveToHueAndSaturation()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::colourLoopSet()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::stopMoveStep()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::moveToColourTemperature()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::moveColourTemperature()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::stepColourTemperature()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::initiateTouchlink()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::touchLinkFactoryResetTarget()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::identifyTriggerEffect()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::lockUnlockDoor()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::readAttributerequest()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::writeAttributeRequest()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::configureReportingRequest()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::attributeDiscoveryRequest()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::iASZoneEnrollResponse()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::rawAPSDataRequest()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
*/
|
467
zigateplugin/zigatecmd.cpp.autosave
Normal file
467
zigateplugin/zigatecmd.cpp.autosave
Normal file
@ -0,0 +1,467 @@
|
|||||||
|
#include "zigateplugin.h"
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
class ZigatePugin;
|
||||||
|
|
||||||
|
bool ZigatePlugin::resetCoordinator()
|
||||||
|
{
|
||||||
|
bool returnCode = false;
|
||||||
|
|
||||||
|
cout << "Sending reset to coordinator" << endl;
|
||||||
|
sendCmd("0011", "");
|
||||||
|
return returnCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ZigatePlugin::getVersion()
|
||||||
|
{
|
||||||
|
cout << "Getting o coordinator" << endl;
|
||||||
|
sendCmd("0010", "");
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
bool ZigatePlugin::setHeartBeat()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::getNetworkState()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::erasePersistentData()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::factoryNewReset()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::permitJoin()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::setExpendedPANID()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::setChannelMask()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::setSecurityStateKey()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::setDeviceType()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::startNetwork()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::startNetworkScan()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::removeDevice()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::enablePermissionsControlledJoins()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::authenticateDevice()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::outOfBandCommissioningDataRequest()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::userDescriptorSet()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::userDescriptorRequest()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::bind()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::unbind()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::complexDescriptorRequest()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::networkAddressRequest()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::iEEEAddressRequest()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::nodeDescriptorRequest()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::simpleDescriptorRequest()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::powerDescriptorRequest()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::activeEndpointRequest()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::matchDescriptorRequest()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::managementLeaveRequest()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::permitJoiningRequest()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::managementNetworkUpdateRequest()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::systemServerDiscoveryRequest()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::managementLQIRequest()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::addGroup()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::viewGroup()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::getGroupMembership()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::removeGroup()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::removeAllGroups()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::addGroupIfIdentify()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::identifySend()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::identifyQuery()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::moveToLevel()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::moveToLevelWithWithoutOnOoff()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::moveStep()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::moveStopMove()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::moveStopWithOnOff()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::onOffWithNEffects()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::onOffWithEffects()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::onOffTimedSend()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::onOffTimed()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::onOffWithEffectsSend()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::viewScene()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::addScene()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::removeScene()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::removeAllScenes()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::storeScene()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::recallScene()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::sceneMembershipRequest()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::addEnhancedScene()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::viewEnhancedHostToNodeScene()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::copyScene()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::moveToHue()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::moveHue()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::stepHue()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::moveToSaturation()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::moveSaturation()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::stepSaturation()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::moveToHueAndSaturation()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::moveToColour()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::moveColour()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::stepColour()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::enhancedMoveToHue()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::enhancedMoveHue()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::enhancedStepHue()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::enhancedMoveToHueAndSaturation()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::colourLoopSet()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::stopMoveStep()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::moveToColourTemperature()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::moveColourTemperature()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::stepColourTemperature()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::initiateTouchlink()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::touchLinkFactoryResetTarget()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::identifyTriggerEffect()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::lockUnlockDoor()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::readAttributerequest()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::writeAttributeRequest()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::configureReportingRequest()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::attributeDiscoveryRequest()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::iASZoneEnrollResponse()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigatePlugin::rawAPSDataRequest()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
*/
|
509
zigateplugin/zigateplugin.cpp
Normal file
509
zigateplugin/zigateplugin.cpp
Normal file
@ -0,0 +1,509 @@
|
|||||||
|
#include "zigateplugin.h"
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
ZigatePlugin zigatePlugin;
|
||||||
|
SerialManager serialManager;
|
||||||
|
|
||||||
|
QHash <QString, ResponseProperties*> responseListIndex
|
||||||
|
{
|
||||||
|
{"004D", nullptr},
|
||||||
|
{"8000", nullptr},
|
||||||
|
{"8001", nullptr},
|
||||||
|
{"8002", nullptr},
|
||||||
|
{"8003", nullptr},
|
||||||
|
{"8004", nullptr},
|
||||||
|
{"8005", nullptr},
|
||||||
|
{"8006", nullptr},
|
||||||
|
{"8007", nullptr},
|
||||||
|
{"8010", nullptr},
|
||||||
|
{"8014", nullptr},
|
||||||
|
{"8024", nullptr},
|
||||||
|
{"8030", nullptr},
|
||||||
|
{"8031", nullptr},
|
||||||
|
{"8040", nullptr},
|
||||||
|
{"8041", nullptr},
|
||||||
|
{"8042", nullptr},
|
||||||
|
{"8043", nullptr},
|
||||||
|
{"8044", nullptr},
|
||||||
|
{"8045", nullptr},
|
||||||
|
{"8046", nullptr},
|
||||||
|
{"802B", nullptr},
|
||||||
|
{"802C", nullptr},
|
||||||
|
{"8047", nullptr},
|
||||||
|
{"8048", nullptr},
|
||||||
|
{"804A", nullptr},
|
||||||
|
{"804B", nullptr},
|
||||||
|
{"804E", nullptr},
|
||||||
|
{"8140", nullptr},
|
||||||
|
{"8008", nullptr},
|
||||||
|
{"8009", nullptr},
|
||||||
|
{"8011", nullptr},
|
||||||
|
{"8012", nullptr},
|
||||||
|
{"8015", nullptr},
|
||||||
|
{"8017", nullptr},
|
||||||
|
{"8028", nullptr},
|
||||||
|
{"8035", nullptr},
|
||||||
|
{"8049", nullptr},
|
||||||
|
{"8052", nullptr},
|
||||||
|
{"8060", nullptr},
|
||||||
|
{"8061", nullptr},
|
||||||
|
{"8062", nullptr},
|
||||||
|
{"8063", nullptr},
|
||||||
|
{"8085", nullptr},
|
||||||
|
{"8095", nullptr},
|
||||||
|
{"80A0", nullptr},
|
||||||
|
{"80A1", nullptr},
|
||||||
|
{"80A2", nullptr},
|
||||||
|
{"80A3", nullptr},
|
||||||
|
{"80A4", nullptr},
|
||||||
|
{"80A6", nullptr},
|
||||||
|
{"80A7", nullptr},
|
||||||
|
{"8100", nullptr},
|
||||||
|
{"8101", nullptr},
|
||||||
|
{"8102", nullptr},
|
||||||
|
{"8110", nullptr},
|
||||||
|
{"8120", nullptr},
|
||||||
|
{"8122", nullptr},
|
||||||
|
{"8531", nullptr},
|
||||||
|
{"8701", nullptr},
|
||||||
|
{"8702", nullptr},
|
||||||
|
{"9999", nullptr}
|
||||||
|
};
|
||||||
|
|
||||||
|
QByteArray ZigatePlugin::checksum(QByteArray msgType, QByteArray length, QByteArray datas)
|
||||||
|
{
|
||||||
|
quint16 temp = 0;
|
||||||
|
int i;
|
||||||
|
QString str;
|
||||||
|
|
||||||
|
str = msgType.mid(0,2);
|
||||||
|
temp ^= str.toInt(nullptr, 16);
|
||||||
|
str = msgType.mid(2,2);
|
||||||
|
temp ^= str.toInt(nullptr, 16);
|
||||||
|
str = length.mid(0,2);
|
||||||
|
temp ^= str.toInt(nullptr, 16);
|
||||||
|
str = length.mid(2,2);
|
||||||
|
temp ^= str.toInt(nullptr, 16);
|
||||||
|
for (i=0;i<=(datas.count());i+=2)
|
||||||
|
{
|
||||||
|
str = datas.mid(i,2);
|
||||||
|
temp ^= str.toInt(nullptr, 16);
|
||||||
|
}
|
||||||
|
return QByteArray::number(temp, 16);
|
||||||
|
}
|
||||||
|
|
||||||
|
QByteArray ZigatePlugin::transcode(QByteArray datas)
|
||||||
|
{
|
||||||
|
QByteArray msg = "";
|
||||||
|
int i;
|
||||||
|
QByteArray byte;
|
||||||
|
if (datas.count()%2 != 0)
|
||||||
|
{
|
||||||
|
return "-1";
|
||||||
|
}
|
||||||
|
for (i=0;i<datas.count();i+=2)
|
||||||
|
{
|
||||||
|
byte = datas.mid(i,2);
|
||||||
|
if (byte.toUInt(nullptr, 16) > 15)
|
||||||
|
{
|
||||||
|
msg += byte;
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
msg.append("02");
|
||||||
|
msg.append(QByteArray::number(byte.toUInt(nullptr, 16) ^ 16, 16));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return msg;
|
||||||
|
}
|
||||||
|
|
||||||
|
QByteArray ZigatePlugin::unTranscode(QByteArray datas)
|
||||||
|
{
|
||||||
|
QByteArray result;
|
||||||
|
int i;
|
||||||
|
char tmp;
|
||||||
|
|
||||||
|
if (datas.isEmpty())
|
||||||
|
{
|
||||||
|
return "-1";
|
||||||
|
}
|
||||||
|
|
||||||
|
for (i=0;i<=datas.count()-1;i++)
|
||||||
|
{
|
||||||
|
tmp = datas.at(i);
|
||||||
|
if (tmp == 0x02)
|
||||||
|
{
|
||||||
|
i++;
|
||||||
|
result.append(datas[i] ^ 16);
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
//if (tmp != 0 and tmp != 1)
|
||||||
|
//{
|
||||||
|
result += tmp;
|
||||||
|
//}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
cout << result.toHex(' ').toStdString() << endl;
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ZigatePlugin::sendCmd(QByteArray cmd, QByteArray datas)
|
||||||
|
{
|
||||||
|
QByteArray msg;
|
||||||
|
QByteArray len;
|
||||||
|
|
||||||
|
len = QByteArray::number(datas.count()/2, 16).insert(0,"000").right(4);
|
||||||
|
msg = QByteArray::fromHex("01");
|
||||||
|
msg += QByteArray::fromHex(transcode(cmd));
|
||||||
|
msg += QByteArray::fromHex(transcode(len));
|
||||||
|
if (!datas.isEmpty())
|
||||||
|
{
|
||||||
|
msg += QByteArray::fromHex(checksum(cmd, len, datas));
|
||||||
|
msg += QByteArray::fromHex(transcode(datas));
|
||||||
|
}else{
|
||||||
|
msg += QByteArray::fromHex(checksum(cmd, len, ""));
|
||||||
|
}
|
||||||
|
msg += QByteArray::fromHex("03");
|
||||||
|
serialManager.write2serial(msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ZigatePlugin::interpretResult(QByteArray payload)
|
||||||
|
{
|
||||||
|
//uint tab = 0;
|
||||||
|
uint length = 0;
|
||||||
|
quint8 crctmp = 0;
|
||||||
|
uint i = 0;
|
||||||
|
//int datasResultLength = 0;
|
||||||
|
ResponseProperties * responseObject;
|
||||||
|
QByteArray type;
|
||||||
|
uint ln;
|
||||||
|
quint8 crc;
|
||||||
|
QByteArray datas;
|
||||||
|
QByteArray quality;
|
||||||
|
QByteArray payloadD;
|
||||||
|
payloadD = unTranscode(payload);
|
||||||
|
if (this->datas.count() >= 1)
|
||||||
|
{
|
||||||
|
cout << "inserting: " << this->datas.toHex(' ').toStdString() << endl;
|
||||||
|
payloadD.insert(0, this->datas);
|
||||||
|
}
|
||||||
|
length = payloadD.count();
|
||||||
|
|
||||||
|
while(length > 5)
|
||||||
|
{
|
||||||
|
cout << "Interpreting datas =>" << payload.left(1).toHex(' ').toStdString() << endl;
|
||||||
|
cout << "PayloadD : " << payloadD.toHex(' ').toStdString() << endl;
|
||||||
|
while(payloadD.left(1).toHex() != "01")
|
||||||
|
{
|
||||||
|
payloadD.remove(0,1);
|
||||||
|
}
|
||||||
|
payloadD.remove(0,1);crctmp = 0;
|
||||||
|
//type de message
|
||||||
|
type = payloadD.mid(0, 2);
|
||||||
|
ln = payloadD.mid(2, 2).toHex().toUInt(nullptr, 16);
|
||||||
|
if (ln + 6 > length)
|
||||||
|
{
|
||||||
|
cout << "storing payloadD: " << payloadD.toHex(' ').toStdString() << endl;
|
||||||
|
this->datas = payloadD;
|
||||||
|
break;
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
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);
|
||||||
|
//acquisition du CRC
|
||||||
|
crc = payloadD.at(4);
|
||||||
|
//datasResult
|
||||||
|
datas = "";
|
||||||
|
|
||||||
|
for(i=0;i<ln;i+=1)
|
||||||
|
{
|
||||||
|
datas += payloadD.at(5+i);
|
||||||
|
crctmp ^= payloadD.at(5+i);
|
||||||
|
}
|
||||||
|
quality = payloadD.right(1);
|
||||||
|
|
||||||
|
//datasResultLength = datasResult.count();
|
||||||
|
|
||||||
|
//verification du CRC
|
||||||
|
if (crc == crctmp)
|
||||||
|
{
|
||||||
|
responseObject = responseListIndex[type.toHex()];
|
||||||
|
if (responseObject->manager != nullptr)
|
||||||
|
{
|
||||||
|
responseObject->code = type;
|
||||||
|
responseObject->datas = datas;
|
||||||
|
//responseObject.properties = responseListIndex[type]->properties
|
||||||
|
responseObject->manager(responseObject);
|
||||||
|
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
cout << "unknown command or command not implemented :" << type.toHex().toStdString() << endl;
|
||||||
|
}
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
//tab = -2;
|
||||||
|
}
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
cout << "unknown type of datagram type: " << type.toHex().toStdString() << endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
payloadD.remove(0,ln+6);
|
||||||
|
length = payloadD.count();
|
||||||
|
cout << "---------------" << endl;
|
||||||
|
}
|
||||||
|
//return tab;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void defaultManager(ResponseProperties *responseObject)
|
||||||
|
{
|
||||||
|
int nbyte;
|
||||||
|
int isValue;
|
||||||
|
int offset = 0;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
QByteArray datas = responseObject->datas;
|
||||||
|
QByteArray result;
|
||||||
|
//QByteArray code = responseObject->code.toHex();
|
||||||
|
|
||||||
|
//cout << responseObject->code.toHex().toStdString() << endl;
|
||||||
|
int n = responseObject->properties.count();
|
||||||
|
QMap<uint, QList<QVariant>> propertyList;
|
||||||
|
QMap<uint, QString> propertyDetail;
|
||||||
|
QMap<uint,QString> var;
|
||||||
|
QList<QVariant> property;
|
||||||
|
QMap<uint,QString>::iterator j;
|
||||||
|
//int propertyListKey;
|
||||||
|
|
||||||
|
propertyList = responseObject->properties;
|
||||||
|
infoOutput(responseObject);
|
||||||
|
for(i=0;i<n;i+=1)
|
||||||
|
//while (i != zigatePlugin.responseListIndex[code].properties.end())
|
||||||
|
{
|
||||||
|
property = propertyList.value(i);
|
||||||
|
cout << property.at(0).toString().toStdString() << ": ";
|
||||||
|
nbyte = property.at(1).toInt();
|
||||||
|
isValue = property.at(2).toInt();
|
||||||
|
result = datas.mid(offset, nbyte);
|
||||||
|
offset += nbyte;
|
||||||
|
propertyDetail = responseObject->propertyDetail.value(i);
|
||||||
|
|
||||||
|
switch (isValue)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
cout << result.toHex().toStdString() << endl;
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
cout << result.toHex().toStdString() << endl;
|
||||||
|
j = propertyDetail.begin();
|
||||||
|
while(j != propertyDetail.end())
|
||||||
|
{
|
||||||
|
if (result.toUInt(nullptr,16) & var[0].toUInt(nullptr,16))
|
||||||
|
{
|
||||||
|
cout << var[1].toStdString() << endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
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:
|
||||||
|
responseObject->propertyManagerList[i](result);
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
cout << "Liste" << endl;
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
cout << result.toStdString() << endl;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void macCapabilityManager(QByteArray mac)
|
||||||
|
{
|
||||||
|
cout << "macCapabilityManger" << mac.toStdString() << endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* void deviceAnnounceManager()
|
||||||
|
{
|
||||||
|
infoOutput(responseListIndex(""));
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
void dataIndicationManager(ResponseProperties * response)
|
||||||
|
{
|
||||||
|
infoOutput(response);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void clustersListManager(ResponseProperties * 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(ResponseProperties * response)
|
||||||
|
{
|
||||||
|
infoOutput(response);
|
||||||
|
// **************************************************************
|
||||||
|
// <device list – data each entry is 13 bytes>
|
||||||
|
// <ID: uint8_t>
|
||||||
|
// <Short address: uint16_t>
|
||||||
|
// <IEEE address: uint64_t>
|
||||||
|
// <Power source: bool_t> 0 – battery 1- AC power
|
||||||
|
// <LinkQuality : uint8_t> 1-255
|
||||||
|
// **************************************************************
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
void bindResponseManager()
|
||||||
|
{
|
||||||
|
infoOutput(bindResponse);
|
||||||
|
}
|
||||||
|
|
||||||
|
void unbindResponseManager()
|
||||||
|
{
|
||||||
|
infoOutput(unbindResponse);
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
void networkAddressManager(ResponseProperties * response)
|
||||||
|
{
|
||||||
|
infoOutput(response);
|
||||||
|
}
|
||||||
|
|
||||||
|
void iEEEAddressManager(ResponseProperties * response)
|
||||||
|
{
|
||||||
|
infoOutput(response);
|
||||||
|
}
|
||||||
|
|
||||||
|
void nodeDescriptorManager(ResponseProperties * response)
|
||||||
|
{
|
||||||
|
infoOutput(response);
|
||||||
|
}
|
||||||
|
|
||||||
|
void simpleDescriptorManager(ResponseProperties * 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);
|
||||||
|
}
|
||||||
|
*/
|
312
zigateplugin/zigateplugin.h
Normal file
312
zigateplugin/zigateplugin.h
Normal file
@ -0,0 +1,312 @@
|
|||||||
|
#ifndef ZIGATEPLUGIN_H
|
||||||
|
#define ZIGATEPLUGIN_H
|
||||||
|
|
||||||
|
#include <QObject>
|
||||||
|
#include <QtPlugin>
|
||||||
|
#include <iostream>
|
||||||
|
#include "interface.h"
|
||||||
|
//#include "library.h"
|
||||||
|
#include "serial.h"
|
||||||
|
#include <QMap>
|
||||||
|
#include <QHash>
|
||||||
|
#include <QSerialPort>
|
||||||
|
#include "responseClasses.h"
|
||||||
|
#include <QtConcurrent/QtConcurrent>
|
||||||
|
#include <QObject>
|
||||||
|
#include <QtPlugin>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <QFutureWatcher>
|
||||||
|
|
||||||
|
#define DEVICE_ANNOUNCE "004D"
|
||||||
|
#define STATUS_RETURNED "8000"
|
||||||
|
#define LOG_MESSAGE "8001"
|
||||||
|
#define DATA_INDICATION "8002"
|
||||||
|
#define CLUSTERS_LIST "8003"
|
||||||
|
#define ATTRIBUTES_LIST "8004"
|
||||||
|
#define COMMANDS_LIST "8005"
|
||||||
|
#define STATUS "8006"
|
||||||
|
#define STATUS2 "8007"
|
||||||
|
#define VERSION_LIST "8010"
|
||||||
|
#define PERMIT_JOIN "8014"
|
||||||
|
#define NETWORK_JOINED_FORMED "8024"
|
||||||
|
#define BIND_RESPONSE "8030"
|
||||||
|
#define UNBIND_RESPONSE "8031"
|
||||||
|
#define NETWORK_ADDRESS "8040"
|
||||||
|
#define IEEE_ADDRESS "8041"
|
||||||
|
#define NODE_DESCRIPTOR "8042"
|
||||||
|
#define SIMPLE_DESCRIPTOR "8043"
|
||||||
|
#define POWER_DESCRIPTOR "8044"
|
||||||
|
#define ACTIVE_ENDPOINT "8045"
|
||||||
|
#define MATCH_DESCRIPTOR "8046"
|
||||||
|
#define USER_DESCRIPTOR_NOTIFY "802B"
|
||||||
|
#define USER_DESCRIPTOR "802C"
|
||||||
|
#define MANAGEMENT_LEAVE "8047"
|
||||||
|
#define LEAVE_INDICATION "8048"
|
||||||
|
#define MANAGEMENT_NETWORK_UPDATE "804A"
|
||||||
|
#define SYSTEM_SERVER_DISCOVERY "804B"
|
||||||
|
#define MANAGEMENT_LQI "804E"
|
||||||
|
#define ATTRIBUTE_DISCOVERY "8140"
|
||||||
|
#define HEARTBEAT "8008"
|
||||||
|
#define NETWORK_STATE "8009"
|
||||||
|
#define ACK_DATA "8011"
|
||||||
|
#define DATA_CONFIRM "8012"
|
||||||
|
#define DEVICES_LIST "8015"
|
||||||
|
#define TIME_SERVER "8017"
|
||||||
|
#define AUTHENTICATE_RESPONSE "8028"
|
||||||
|
#define PDM_EVENT "8035"
|
||||||
|
#define PERMIT_JOINING "8049"
|
||||||
|
#define PDM_CHILD_TABLE_SIZE "8052"
|
||||||
|
#define ADD_GROUP "8060"
|
||||||
|
#define VIEW_GROUP "8061"
|
||||||
|
#define GROUP_MEMBERSHIP "8062"
|
||||||
|
#define REMOVE_GROUP "8063"
|
||||||
|
#define LEVEL_UPDATE "8085"
|
||||||
|
#define ON_OFF "8095"
|
||||||
|
#define VIEW_SCENE "80A0"
|
||||||
|
#define ADD_SCENE "80A1"
|
||||||
|
#define REMOVE_SCENE "80A2"
|
||||||
|
#define REMOVE_ALL_SCENE "80A3"
|
||||||
|
#define STORE_SCENE "80A4"
|
||||||
|
#define SCENE_MEMBERSHIP "80A6"
|
||||||
|
#define SCENES_UPDATE "80A7"
|
||||||
|
#define READ_INDIVIDUAL_ATTRIBUTE "8100"
|
||||||
|
#define DEFAULT_RESPONSE "8101"
|
||||||
|
#define REPORT_INDIVIDUAL_ATTRIBUTE "8102"
|
||||||
|
#define WRITE_ATTRIBUTE "8110"
|
||||||
|
#define CONFIGURE_REPORTING "8120"
|
||||||
|
#define READ_REPORT_CONFIG "8122"
|
||||||
|
#define COMPLEX_DESCRIPTOR "8531"
|
||||||
|
#define ROUTER_DISCOVERY "8701"
|
||||||
|
#define APS_DATA_CONFIRM_FAIL "8702"
|
||||||
|
#define EXTENDED_ERROR "9999"
|
||||||
|
|
||||||
|
class ZigatePlugin : public QObject, public ZigbeeManagerInterface
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
Q_PLUGIN_METADATA(IID "org.zigbeeManagerInterface" FILE "zigateplugin.json")
|
||||||
|
Q_INTERFACES(ZigbeeManagerInterface)
|
||||||
|
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
void interpretResult(QByteArray);
|
||||||
|
void readDatas();
|
||||||
|
|
||||||
|
signals:
|
||||||
|
|
||||||
|
public:
|
||||||
|
bool initPlugin() override;
|
||||||
|
QByteArray checksum(QByteArray msgType, QByteArray length, QByteArray datas);
|
||||||
|
QByteArray transcode(QByteArray datas);
|
||||||
|
QByteArray unTranscode(QByteArray datas);
|
||||||
|
void sendCmd(QByteArray cmd, QByteArray datas);
|
||||||
|
//int interpretResult(QByteArray datas);
|
||||||
|
//void getResponse();
|
||||||
|
bool resetCoordinator();
|
||||||
|
void interpretResult();
|
||||||
|
void infoOutput(ResponseProperties *);
|
||||||
|
void debug(QString text, int level);
|
||||||
|
void signal_handler(int signal);
|
||||||
|
|
||||||
|
// commands
|
||||||
|
void getVersion();
|
||||||
|
|
||||||
|
QByteArray datas; //datas not complete waiting reading new datas
|
||||||
|
QMap <int, QString> resultCodes;
|
||||||
|
QMap <QString, QList <QByteArray>> cmdList =
|
||||||
|
{
|
||||||
|
{"setHeartBeat", {"0008", "0000", ""}},
|
||||||
|
{"getNetWorkState", {"0009", "0000", ""}},
|
||||||
|
{"getVersion", {"0010", "0000", ""}},
|
||||||
|
{"reset", {"0011", "0000", ""}},
|
||||||
|
{"erasePersistentData", {"0012", "0000", ""}},
|
||||||
|
{"factoryReset", {"0013", "0000", ""}},
|
||||||
|
{"permitJoin", {"0014", "0000", ""}},
|
||||||
|
{"setExpendedPANID", {"0020", "0008", ""}},
|
||||||
|
{"setChannelMask", {"0021", "0004", ""}},
|
||||||
|
{"setSecurityStateandKey", {"0022", "0000", ""}},
|
||||||
|
{"setDeviceType", {"0023", "0001", ""}},
|
||||||
|
{"startNetwork", {"0024", "0000", ""}},
|
||||||
|
{"startNetworkScan", {"0025", "0000", ""}},
|
||||||
|
{"removeDevice", {"0026", "0010", ""}},
|
||||||
|
{"enablePermissionsControlledJoins", {"0027", "0001", ""}},
|
||||||
|
{"authenticateDevice", {"0028", "0018", ""}},
|
||||||
|
{"outOfBandCommissioningDataRequest", {"0029", "0018", ""}},
|
||||||
|
{"userDescriptorSet", {"002B", "0000", ""}},
|
||||||
|
{"userDescritporRequest", {"002C", "0000", ""}},
|
||||||
|
{"bind", {"0030", "", ""}},
|
||||||
|
{"unbind", {"0031", "", ""}},
|
||||||
|
{"complexDescriptorRequest", {"0034", "0004", ""}},
|
||||||
|
{"networkAddressRequest", {"0040", "0012", ""}},
|
||||||
|
{"ieeeAddressRequest", {"0041", "0006", ""}},
|
||||||
|
{"nodeDescriptorRequest", {"0042", "0002", ""}},
|
||||||
|
{"simpleDescriptorRequest", {"0043", "0003", ""}},
|
||||||
|
{"powerDescriptorRequest", {"0044", "0002", ""}},
|
||||||
|
{"activeEndpointRequest", {"0045", "0002", ""}},
|
||||||
|
{"matchDescriptorRequest", {"0046", "", ""}},
|
||||||
|
{"managementLeaveRequest", {"0047", "001C", ""}},
|
||||||
|
{"permitJoiningRequest", {"0049", "0004", ""}},
|
||||||
|
{"managementNetworkUpdateRequest", {"004A", "000B", ""}},
|
||||||
|
{"systemServerDiscoveryRequest", {"004B", "0004", ""}},
|
||||||
|
{"managementLQIRequest", {"004E", "0003", ""}},
|
||||||
|
{"addGroup", {"0060", "0007", ""}},
|
||||||
|
{"viewGroup", {"0061", "0007", ""}},
|
||||||
|
{"getGroupMembership", {"0062", "", ""}},
|
||||||
|
{"removeGroup", {"0063", "0007", ""}},
|
||||||
|
{"removeAllGroups", {"0064", "0005", ""}},
|
||||||
|
{"addGroupIfIdentify", {"0065", "0007", ""}},
|
||||||
|
{"identifySend", {"0070", "0007", ""}},
|
||||||
|
{"identifyQuery", {"0071", "0005", ""}},
|
||||||
|
{"moveToLevel", {"0080", "0008", ""}},
|
||||||
|
{"moveToLevelWithWithoutOnOff", {"0081", "0009", ""}},
|
||||||
|
{"moveStep", {"0082", "000A", "0000"}},
|
||||||
|
{"moveStopMove", {"0083", "0005", ""}},
|
||||||
|
{"moveStopWithOnOff", {"0084", "0005", ""}},
|
||||||
|
{"onOffWithNoEffects", {"0092", "0006", ""}},
|
||||||
|
{"onOffTimedSend", {"0093", "000A", ""}},
|
||||||
|
{"onOffWithEffectsSend", {"0094", "0007", ""}},
|
||||||
|
{"viewScene", {"00A0", "0008", ""}},
|
||||||
|
{"addScene", {"00A1", "000D", ""}},
|
||||||
|
{"removeScene", {"00A2", "0008", ""}},
|
||||||
|
{"removeAllScenes", {"00A3", "0007", ""}},
|
||||||
|
{"storeScene", {"00A4", "0008", ""}},
|
||||||
|
{"recallScene", {"00A5", "0008", ""}},
|
||||||
|
{"sceneMembershipRequest", {"00A6", "0007", ""}},
|
||||||
|
{"addEnhancedScene", {"00A7", "", ""}},
|
||||||
|
{"viewEnhancedHostToNodeScene", {"00A8", "0008", ""}},
|
||||||
|
{"copyScene", {"00A9", "000C", ""}},
|
||||||
|
{"moveToHue", {"00B0", "0009", ""}},
|
||||||
|
{"moveHue", {"00B1", "0007", ""}},
|
||||||
|
{"stepHue", {"00B2", "0008", ""}},
|
||||||
|
{"moveToSaturation", {"00B3", "0008", ""}},
|
||||||
|
{"moveSaturation", {"00B4", "0006", ""}},
|
||||||
|
{"stepSaturation", {"00B5", "0008", ""}},
|
||||||
|
{"moveToHueAndSaturation", {"00B6", "0008", ""}},
|
||||||
|
{"moveToColour", {"00B7", "000B", ""}},
|
||||||
|
{"moveColour", {"00B8", "0009", ""}},
|
||||||
|
{"stepColour", {"00B9", "000B", ""}},
|
||||||
|
{"enhancedMoveToHue", {"00BA", "000A", ""}},
|
||||||
|
{"enhancedMoveHue", {"00BB", "0007", ""}},
|
||||||
|
{"enhancedStepHue", {"00BC", "0008", ""}},
|
||||||
|
{"enhancedMoveToHueAndSaturation", {"00BD", "000E", ""}},
|
||||||
|
{"colourLoopSet", {"00BE", "000D", ""}},
|
||||||
|
{"stopMoveStep", {"00BF", "0005", ""}},
|
||||||
|
{"moveToColourTemperature", {"00C0", "0009", ""}},
|
||||||
|
{"moveColourTemperature", {"00C1", "000D", ""}},
|
||||||
|
{"stepColourTemperature", {"00C2", "000E", ""}},
|
||||||
|
{"Initiate Touchlink", {"00D0", "0000", ""}},
|
||||||
|
{"touchLinkFactoryResetTarget", {"00D2", "0000", ""}},
|
||||||
|
{"identifyTriggerEffect", {"00E0", "0007", ""}},
|
||||||
|
{"lockUnlockDoor", {"00F0", "0006", ""}},
|
||||||
|
{"readAttributeRequest", {"0100", "", ""}},
|
||||||
|
{"writeAttributeRequest", {"0110", "000", ""}},
|
||||||
|
{"configureReportingRequest", {"0120", "", ""}},
|
||||||
|
{"attributeDiscoveryRequest", {"0140", "000E", ""}},
|
||||||
|
{"iASZoneEnrollResponse", {"0400", "0007", ""}},
|
||||||
|
{"rawApsDataRequest", {"0530", "000D", ""}}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/* QList <QString> responseListCode
|
||||||
|
{
|
||||||
|
"004D",
|
||||||
|
"8000",
|
||||||
|
"8001",
|
||||||
|
"8002",
|
||||||
|
"8003",
|
||||||
|
"8004",
|
||||||
|
"8005",
|
||||||
|
"8006",
|
||||||
|
"8007",
|
||||||
|
"8010",
|
||||||
|
"8014",
|
||||||
|
"8024",
|
||||||
|
"8030",
|
||||||
|
"8031",
|
||||||
|
"8040",
|
||||||
|
"8041",
|
||||||
|
"8042",
|
||||||
|
"8043",
|
||||||
|
"8044",
|
||||||
|
"8045",
|
||||||
|
"8046",
|
||||||
|
"802B",
|
||||||
|
"802C",
|
||||||
|
"8047",
|
||||||
|
"8048",
|
||||||
|
"804A",
|
||||||
|
"804B",
|
||||||
|
"804E",
|
||||||
|
"8140",
|
||||||
|
"8008",
|
||||||
|
"8009",
|
||||||
|
"8011",
|
||||||
|
"8012",
|
||||||
|
"8015",
|
||||||
|
"8017",
|
||||||
|
"8028",
|
||||||
|
"8035",
|
||||||
|
"8049",
|
||||||
|
"8052",
|
||||||
|
"8060",
|
||||||
|
"8061",
|
||||||
|
"8062",
|
||||||
|
"8063",
|
||||||
|
"8085",
|
||||||
|
"8095",
|
||||||
|
"80A0",
|
||||||
|
"80A1",
|
||||||
|
"80A2",
|
||||||
|
"80A3",
|
||||||
|
"80A4",
|
||||||
|
"80A6",
|
||||||
|
"80A7",
|
||||||
|
"8100",
|
||||||
|
"8101",
|
||||||
|
"8102",
|
||||||
|
"8110",
|
||||||
|
"8120",
|
||||||
|
"8122",
|
||||||
|
"8531",
|
||||||
|
"8701",
|
||||||
|
"8702",
|
||||||
|
"9999"
|
||||||
|
};
|
||||||
|
*/
|
||||||
|
//ZigbeeMgr serial;
|
||||||
|
QMap <QByteArray, QString> clusters
|
||||||
|
{
|
||||||
|
{"0000", " (General: Basic)"},
|
||||||
|
{"0001", " (General: Power Config)"},
|
||||||
|
{"0002", " (General: Temperature Config)"},
|
||||||
|
{"0003", " (General: Identify)"},
|
||||||
|
{"0004", " (General: Groups)"},
|
||||||
|
{"0005", " (General: Scenes)"},
|
||||||
|
{"0006", " (General: On/Off)"},
|
||||||
|
{"0007", " (General: On/Off Config)"},
|
||||||
|
{"0008", " (General: Level Control)"},
|
||||||
|
{"0009", " (General: Alarms)"},
|
||||||
|
{"000A", " (General: Time)"},
|
||||||
|
{"000F", " (General: Binary Input Basic)"},
|
||||||
|
{"0020", " (General: Poll Control)"},
|
||||||
|
{"0019", " (General: OTA)"},
|
||||||
|
{"0101", " (General: Door Lock"},
|
||||||
|
{"0201", " (HVAC: Thermostat)"},
|
||||||
|
{"0202", " (HVAC: Fan Control)"},
|
||||||
|
{"0300", " (Lighting: Color Control)"},
|
||||||
|
{"0400", " (Measurement: Illuminance)"},
|
||||||
|
{"0402", " (Measurement: Temperature)"},
|
||||||
|
{"0405", " (Measurement: Humidity)"},
|
||||||
|
{"0406", " (Measurement: Occupancy Sensing)"},
|
||||||
|
{"0500", " (Security & Safety: IAS Zone)"},
|
||||||
|
{"0702", " (Smart Energy: Metering)"},
|
||||||
|
{"0B05", " (Misc: Diagnostics)"},
|
||||||
|
{"1000", " (ZLL: Commissioning)"},
|
||||||
|
{"FF01", " Xiaomi private"},
|
||||||
|
{"FF02", " Xiaomi private"},
|
||||||
|
{"1234", " Xiaomi private"}
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
1
zigateplugin/zigateplugin.json
Normal file
1
zigateplugin/zigateplugin.json
Normal file
@ -0,0 +1 @@
|
|||||||
|
{}
|
37
zigateplugin/zigateplugin.pro
Normal file
37
zigateplugin/zigateplugin.pro
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
TEMPLATE = lib
|
||||||
|
CONFIG += plugin
|
||||||
|
#QT += widgets
|
||||||
|
|
||||||
|
QT += core
|
||||||
|
QT -= gui
|
||||||
|
QT += serialport
|
||||||
|
QT += concurrent
|
||||||
|
|
||||||
|
INCLUDEPATH += ../zigbeemanager
|
||||||
|
|
||||||
|
HEADERS = zigateplugin.h \
|
||||||
|
interface.h \
|
||||||
|
version.h \
|
||||||
|
responseClasses.h \
|
||||||
|
# library.h \
|
||||||
|
serial.h \
|
||||||
|
../../zigbeemanager/zigbeeManagerinterface.h
|
||||||
|
|
||||||
|
|
||||||
|
SOURCES = zigateplugin.cpp \
|
||||||
|
zigatecmd.cpp \
|
||||||
|
zigateInit.cpp \
|
||||||
|
# library.cpp \
|
||||||
|
serial.cpp \
|
||||||
|
|
||||||
|
|
||||||
|
TARGET = $$qtLibraryTarget(zigateplugin)
|
||||||
|
DESTDIR = ../zigbeemanager/plugins
|
||||||
|
|
||||||
|
EXAMPLE_FILES = zigateplugin.json
|
||||||
|
|
||||||
|
# install
|
||||||
|
target.path = ../zigbeemanager/plugins
|
||||||
|
INSTALLS += target
|
||||||
|
|
||||||
|
CONFIG += install_ok # Do not cargo-cult this!
|
424
zigateplugin/zigateplugin.pro.user
Normal file
424
zigateplugin/zigateplugin.pro.user
Normal file
@ -0,0 +1,424 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE QtCreatorProject>
|
||||||
|
<!-- Written by QtCreator 9.0.1, 2023-05-13T14:15:25. -->
|
||||||
|
<qtcreator>
|
||||||
|
<data>
|
||||||
|
<variable>EnvironmentId</variable>
|
||||||
|
<value type="QByteArray">{a3117c94-e673-4dca-aa4c-050bbea034fe}</value>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>ProjectExplorer.Project.ActiveTarget</variable>
|
||||||
|
<value type="qlonglong">0</value>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>ProjectExplorer.Project.EditorSettings</variable>
|
||||||
|
<valuemap type="QVariantMap">
|
||||||
|
<value type="bool" key="EditorConfiguration.AutoIndent">true</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value>
|
||||||
|
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0">
|
||||||
|
<value type="QString" key="language">Cpp</value>
|
||||||
|
<valuemap type="QVariantMap" key="value">
|
||||||
|
<value type="QByteArray" key="CurrentPreferences">CppGlobal</value>
|
||||||
|
</valuemap>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1">
|
||||||
|
<value type="QString" key="language">QmlJS</value>
|
||||||
|
<valuemap type="QVariantMap" key="value">
|
||||||
|
<value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value>
|
||||||
|
</valuemap>
|
||||||
|
</valuemap>
|
||||||
|
<value type="qlonglong" key="EditorConfiguration.CodeStyle.Count">2</value>
|
||||||
|
<value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
|
||||||
|
<value type="int" key="EditorConfiguration.IndentSize">4</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value>
|
||||||
|
<value type="int" key="EditorConfiguration.MarginColumn">80</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.MouseHiding">true</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
|
||||||
|
<value type="int" key="EditorConfiguration.PaddingMode">1</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.PreferSingleLineComments">false</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.ShowMargin">false</value>
|
||||||
|
<value type="int" key="EditorConfiguration.SmartBackspaceBehavior">1</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.SmartSelectionChanging">true</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
|
||||||
|
<value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
|
||||||
|
<value type="int" key="EditorConfiguration.TabSize">8</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.UseGlobal">true</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.UseIndenter">false</value>
|
||||||
|
<value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.addFinalNewLine">true</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.cleanIndentation">true</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.cleanWhitespace">true</value>
|
||||||
|
<value type="QString" key="EditorConfiguration.ignoreFileTypes">*.md, *.MD, Makefile</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.inEntireDocument">true</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.skipTrailingWhitespace">true</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.tintMarginArea">true</value>
|
||||||
|
</valuemap>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>ProjectExplorer.Project.PluginSettings</variable>
|
||||||
|
<valuemap type="QVariantMap">
|
||||||
|
<valuemap type="QVariantMap" key="AutoTest.ActiveFrameworks">
|
||||||
|
<value type="bool" key="AutoTest.Framework.Boost">true</value>
|
||||||
|
<value type="bool" key="AutoTest.Framework.CTest">false</value>
|
||||||
|
<value type="bool" key="AutoTest.Framework.Catch">true</value>
|
||||||
|
<value type="bool" key="AutoTest.Framework.GTest">true</value>
|
||||||
|
<value type="bool" key="AutoTest.Framework.QtQuickTest">true</value>
|
||||||
|
<value type="bool" key="AutoTest.Framework.QtTest">true</value>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap type="QVariantMap" key="AutoTest.CheckStates"/>
|
||||||
|
<value type="int" key="AutoTest.RunAfterBuild">0</value>
|
||||||
|
<value type="bool" key="AutoTest.UseGlobal">true</value>
|
||||||
|
<valuemap type="QVariantMap" key="ClangTools">
|
||||||
|
<value type="bool" key="ClangTools.AnalyzeOpenFiles">true</value>
|
||||||
|
<value type="bool" key="ClangTools.BuildBeforeAnalysis">true</value>
|
||||||
|
<value type="QString" key="ClangTools.DiagnosticConfig">Builtin.DefaultTidyAndClazy</value>
|
||||||
|
<value type="int" key="ClangTools.ParallelJobs">2</value>
|
||||||
|
<valuelist type="QVariantList" key="ClangTools.SelectedDirs"/>
|
||||||
|
<valuelist type="QVariantList" key="ClangTools.SelectedFiles"/>
|
||||||
|
<valuelist type="QVariantList" key="ClangTools.SuppressedDiagnostics"/>
|
||||||
|
<value type="bool" key="ClangTools.UseGlobalSettings">true</value>
|
||||||
|
</valuemap>
|
||||||
|
</valuemap>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>ProjectExplorer.Project.Target.0</variable>
|
||||||
|
<valuemap type="QVariantMap">
|
||||||
|
<value type="QString" key="DeviceType">Desktop</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Qt 5.15.7 (qt5)</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Qt 5.15.7 (qt5)</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{a8a6d767-5e05-45c7-b70b-532f99112b6a}</value>
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
|
||||||
|
<value type="int" key="EnableQmlDebugging">0</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/daniel/develope/zigateplugin/plugin/../build-plugin-Qt_5_15_7_qt5-Debug</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">/home/daniel/develope/zigateplugin/build-plugin-Qt_5_15_7_qt5-Debug</value>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||||
|
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||||
|
<valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis"/>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||||
|
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||||
|
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
|
||||||
|
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Debug</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||||
|
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
|
||||||
|
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/daniel/develope/zigateplugin/plugin/../build-plugin-Qt_5_15_7_qt5-Release</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">/home/daniel/develope/zigateplugin/build-plugin-Qt_5_15_7_qt5-Release</value>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||||
|
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||||
|
<valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis"/>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||||
|
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||||
|
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
|
||||||
|
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Release</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||||
|
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
|
||||||
|
<value type="int" key="QtQuickCompiler">0</value>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.2">
|
||||||
|
<value type="int" key="EnableQmlDebugging">0</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/daniel/develope/zigateplugin/plugin/../build-plugin-Qt_5_15_7_qt5-Profile</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">/home/daniel/develope/zigateplugin/build-plugin-Qt_5_15_7_qt5-Profile</value>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||||
|
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||||
|
<valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis"/>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||||
|
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||||
|
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
|
||||||
|
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Profile</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||||
|
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
|
||||||
|
<value type="int" key="QtQuickCompiler">0</value>
|
||||||
|
<value type="int" key="SeparateDebugInfo">0</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.Target.BuildConfigurationCount">3</value>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Deploy</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.DeployConfiguration.CustomData"/>
|
||||||
|
<value type="bool" key="ProjectExplorer.DeployConfiguration.CustomDataEnabled">false</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
|
||||||
|
<value type="bool" key="Analyzer.Perf.Settings.UseGlobalSettings">true</value>
|
||||||
|
<value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
|
||||||
|
<value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
|
||||||
|
<valuelist type="QVariantList" key="CustomOutputParsers"/>
|
||||||
|
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
|
||||||
|
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.CustomExecutableRunConfiguration</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey"></value>
|
||||||
|
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
|
||||||
|
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
|
||||||
|
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
|
||||||
|
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
|
||||||
|
</valuemap>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>ProjectExplorer.Project.Target.1</variable>
|
||||||
|
<valuemap type="QVariantMap">
|
||||||
|
<value type="QString" key="DeviceType">Desktop</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{893f9ca6-0efa-4c08-a4a6-5a818f60a8a0}</value>
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
|
||||||
|
<value type="int" key="EnableQmlDebugging">0</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/daniel/develope/zigateplugin/plugin/../build-plugin-Desktop-Debug</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">/home/daniel/develope/zigateplugin/build-plugin-Desktop-Debug</value>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||||
|
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||||
|
<valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis"/>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||||
|
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||||
|
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
|
||||||
|
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Debug</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||||
|
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
|
||||||
|
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/daniel/develope/zigateplugin/plugin/../build-plugin-Desktop-Release</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">/home/daniel/develope/zigateplugin/build-plugin-Desktop-Release</value>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||||
|
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||||
|
<valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis"/>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||||
|
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||||
|
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
|
||||||
|
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Release</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||||
|
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
|
||||||
|
<value type="int" key="QtQuickCompiler">0</value>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.2">
|
||||||
|
<value type="int" key="EnableQmlDebugging">0</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/daniel/develope/zigateplugin/plugin/../build-plugin-Desktop-Profile</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">/home/daniel/develope/zigateplugin/build-plugin-Desktop-Profile</value>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||||
|
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||||
|
<valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis"/>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||||
|
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||||
|
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
|
||||||
|
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Profile</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||||
|
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
|
||||||
|
<value type="int" key="QtQuickCompiler">0</value>
|
||||||
|
<value type="int" key="SeparateDebugInfo">0</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.Target.BuildConfigurationCount">3</value>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Deploy</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.DeployConfiguration.CustomData"/>
|
||||||
|
<value type="bool" key="ProjectExplorer.DeployConfiguration.CustomDataEnabled">false</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
|
||||||
|
<value type="bool" key="Analyzer.Perf.Settings.UseGlobalSettings">true</value>
|
||||||
|
<value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
|
||||||
|
<value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
|
||||||
|
<valuelist type="QVariantList" key="CustomOutputParsers"/>
|
||||||
|
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
|
||||||
|
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.CustomExecutableRunConfiguration</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey"></value>
|
||||||
|
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
|
||||||
|
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
|
||||||
|
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
|
||||||
|
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
|
||||||
|
</valuemap>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>ProjectExplorer.Project.TargetCount</variable>
|
||||||
|
<value type="qlonglong">2</value>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>
|
||||||
|
<value type="int">22</value>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>Version</variable>
|
||||||
|
<value type="int">22</value>
|
||||||
|
</data>
|
||||||
|
</qtcreator>
|
@ -1,28 +1,5 @@
|
|||||||
QT += core gui
|
#! [0]
|
||||||
QT += serialport
|
TEMPLATE = subdirs
|
||||||
QT += widgets
|
SUBDIRS = zigbeemanager \
|
||||||
QT += KConfigCore KConfigGui
|
zigateplugin
|
||||||
QT += KCoreAddons
|
#! [0]
|
||||||
CONFIG += c++17 console
|
|
||||||
CONFIG -= app_bundle
|
|
||||||
|
|
||||||
# You can make your code fail to compile if it uses deprecated APIs.
|
|
||||||
# In order to do so, uncomment the following line.
|
|
||||||
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
|
|
||||||
|
|
||||||
SOURCES += \
|
|
||||||
library.cpp \
|
|
||||||
main.cpp \
|
|
||||||
serial.inc.cpp \
|
|
||||||
zigateBackend.cpp
|
|
||||||
|
|
||||||
# Default rules for deployment.
|
|
||||||
qnx: target.path = /tmp/$${TARGET}/bin
|
|
||||||
else: unix:!android: target.path = /opt/$${TARGET}/bin
|
|
||||||
!isEmpty(target.path): INSTALLS += target
|
|
||||||
|
|
||||||
HEADERS += \
|
|
||||||
library.h \
|
|
||||||
main.h \
|
|
||||||
serial.inc.h \
|
|
||||||
zigateBackend.h
|
|
||||||
|
Binary file not shown.
BIN
zigbeemanager/docs/Stack_zigbee_3.ods
Normal file
BIN
zigbeemanager/docs/Stack_zigbee_3.ods
Normal file
Binary file not shown.
BIN
zigbeemanager/docs/ZiGate_API_Developper.ods
Normal file
BIN
zigbeemanager/docs/ZiGate_API_Developper.ods
Normal file
Binary file not shown.
BIN
zigbeemanager/docs/docs-05-3474-21-0csg-zigbee-specification.pdf
Normal file
BIN
zigbeemanager/docs/docs-05-3474-21-0csg-zigbee-specification.pdf
Normal file
Binary file not shown.
115
zigbeemanager/docs/properties.txt
Normal file
115
zigbeemanager/docs/properties.txt
Normal file
@ -0,0 +1,115 @@
|
|||||||
|
MAC capability
|
||||||
|
Packet Type
|
||||||
|
Optional additional error information
|
||||||
|
Log level
|
||||||
|
Power source
|
||||||
|
Battery
|
||||||
|
AC Power
|
||||||
|
MIC
|
||||||
|
Event status
|
||||||
|
Server mask
|
||||||
|
Descriptor capability
|
||||||
|
Mac flags
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
startStatus
|
||||||
|
restartStatus
|
||||||
|
// *****************************************************************************
|
||||||
|
* 0 - STARTUP
|
||||||
|
* 2 - NFN_START
|
||||||
|
* 6 - RUNNING
|
||||||
|
* The node is not yet provisioned.
|
||||||
|
// ******************************************************************************
|
||||||
|
|
||||||
|
networkJoinedStatus
|
||||||
|
// ****************************************************************************
|
||||||
|
// Status:
|
||||||
|
// 0 = Joined existing network
|
||||||
|
// 1 = Formed new network
|
||||||
|
// 128 – 244 = Failed (ZigBee event codes)
|
||||||
|
// *******************************************************************************
|
||||||
|
|
||||||
|
permitJoinStatus
|
||||||
|
// ****************************************************************************
|
||||||
|
// 0 - Off
|
||||||
|
// 1 - On
|
||||||
|
// *******************************************************************************
|
||||||
|
|
||||||
|
Bit fields (8042, 8043, 8044)
|
||||||
|
/*
|
||||||
|
// ****************************************************************************
|
||||||
|
// Bitfields:
|
||||||
|
// Logical type (bits 0-2
|
||||||
|
// 0 - Coordinator
|
||||||
|
// 1 - Router
|
||||||
|
// 2 - End Device)
|
||||||
|
// Complex descriptor available (bit 3)
|
||||||
|
// User descriptor available (bit 4)
|
||||||
|
// Reserved (bit 5-7)
|
||||||
|
// APS flags (bit 8-10 – currently 0)
|
||||||
|
// Frequency band(11-15 set to 3 (2.4Ghz))
|
||||||
|
// Server mask bits:
|
||||||
|
// 0 - Primary trust center
|
||||||
|
// 1 - Back up trust center
|
||||||
|
// 2 - Primary binding cache
|
||||||
|
// 3 - Backup binding cache
|
||||||
|
// 4 - Primary discovery cache
|
||||||
|
// 5 - Backup discovery cache
|
||||||
|
// 6 - Network manager
|
||||||
|
// 7 to15 - Reserved
|
||||||
|
// MAC capability
|
||||||
|
// Bit 0 - Alternate PAN Coordinator
|
||||||
|
// Bit 1 - Device Type
|
||||||
|
// Bit 2 - Power source
|
||||||
|
// Bit 3 - Receiver On when Idle
|
||||||
|
// Bit 4-5 - Reserved
|
||||||
|
// Bit 6 - Security capability
|
||||||
|
// Bit 7 - Allocate Address
|
||||||
|
// Descriptor capability:
|
||||||
|
// 0 - extended Active endpoint list available
|
||||||
|
// 1 - Extended simple descriptor list available
|
||||||
|
// 2 to 7 - Reserved
|
||||||
|
// *******************************************************************************
|
||||||
|
|
||||||
|
8043
|
||||||
|
// ****************************************************************************
|
||||||
|
// Bit fields:
|
||||||
|
// Device version: 4 bits (bits 0-4)
|
||||||
|
// Reserved: 4 bits (bits4-7)
|
||||||
|
// *******************************************************************************
|
||||||
|
|
||||||
|
8044
|
||||||
|
// ****************************************************************************
|
||||||
|
// Bit fields
|
||||||
|
// 0 to 3: current power mode
|
||||||
|
// 4 to 7: available power source
|
||||||
|
// 8 to 11: current power source
|
||||||
|
// 12 to 15: current power source level
|
||||||
|
// *******************************************************************************
|
||||||
|
|
||||||
|
804E
|
||||||
|
// ****************************************************************************
|
||||||
|
// Note: If Neighbour Table list count is 0, there are no elements in the list.
|
||||||
|
// NWK Address : uint16_t
|
||||||
|
// Extended PAN ID : uint64_t
|
||||||
|
// IEEE Address : uint64_t
|
||||||
|
// Depth : uint_t
|
||||||
|
// Link Quality : uint8_t
|
||||||
|
// Bit map of attributes Described below: uint8_t
|
||||||
|
// bit 0-1 Device Type
|
||||||
|
// (0-Coordinator 1-Router 2-End Device)
|
||||||
|
// bit 2-3 Permit Join status
|
||||||
|
// (1- On 0-Off)
|
||||||
|
// bit 4-5 Relationship
|
||||||
|
// (0-Parent 1-Child 2-Sibling)
|
||||||
|
// bit 6-7 Rx On When Idle status
|
||||||
|
// (1-On 0-Off)
|
||||||
|
// *******************************************************************************
|
||||||
|
|
||||||
|
8140
|
||||||
|
// ****************************************************************************
|
||||||
|
// Complete:
|
||||||
|
// 0 – more attributes to follow
|
||||||
|
// 1 – this was the last attribute
|
||||||
|
//*******************************************************************************
|
21
zigbeemanager/interface.h
Normal file
21
zigbeemanager/interface.h
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
#ifndef INTERFACE_H
|
||||||
|
#define INTERFACE_H
|
||||||
|
|
||||||
|
#include <QObject>
|
||||||
|
|
||||||
|
class ZigbeeManagerInterface
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual ~ZigbeeManagerInterface() = default;
|
||||||
|
virtual bool initPlugin() = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
|
#define ZigbeeManagerInterface_iid "org.zigbeeManagerInterface"
|
||||||
|
|
||||||
|
Q_DECLARE_INTERFACE(ZigbeeManagerInterface, ZigbeeManagerInterface_iid)
|
||||||
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
|
#endif
|
13
zigbeemanager/main.cpp
Normal file
13
zigbeemanager/main.cpp
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
#include <QCoreApplication>
|
||||||
|
|
||||||
|
#include "zigbeemanager.h"
|
||||||
|
#include "interface.h"
|
||||||
|
|
||||||
|
int main(int argv, char *args[])
|
||||||
|
{
|
||||||
|
QCoreApplication app(argv, args);
|
||||||
|
|
||||||
|
ZigbeeManager zigbeeManager;
|
||||||
|
|
||||||
|
return app.exec();
|
||||||
|
}
|
45
zigbeemanager/zigbeemanager.cpp
Normal file
45
zigbeemanager/zigbeemanager.cpp
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
#include "zigbeemanager.h"
|
||||||
|
|
||||||
|
#include <QCoreApplication>
|
||||||
|
#include <QDir>
|
||||||
|
#include <QPluginLoader>
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
ZigbeeManager::ZigbeeManager()
|
||||||
|
{
|
||||||
|
if (!loadPlugin()) {
|
||||||
|
cout << "Error" << "Could not load the plugin" << endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ZigbeeManager::loadPlugin()
|
||||||
|
{
|
||||||
|
uint i = 0;
|
||||||
|
|
||||||
|
QDir pluginsDir(QCoreApplication::applicationDirPath());
|
||||||
|
pluginsDir.cd("plugins");
|
||||||
|
const QStringList entries = pluginsDir.entryList(QDir::Files);
|
||||||
|
|
||||||
|
for (const QString &fileName : entries)
|
||||||
|
{
|
||||||
|
QPluginLoader pluginLoader(pluginsDir.absoluteFilePath(fileName));
|
||||||
|
QObject *plugin = pluginLoader.instance();
|
||||||
|
if (plugin)
|
||||||
|
{
|
||||||
|
zigbeeManagerInterface.insert(i, qobject_cast<ZigbeeManagerInterface *>(plugin));
|
||||||
|
if (zigbeeManagerInterface[i])
|
||||||
|
{
|
||||||
|
zigbeeManagerInterface[i]->initPlugin();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
pluginLoader.unload();
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
cout << pluginLoader.errorString().toStdString() << endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
28
zigbeemanager/zigbeemanager.h
Normal file
28
zigbeemanager/zigbeemanager.h
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
#ifndef ZIGBEEMANAGER_H
|
||||||
|
#define ZIGBEEMANAGER_H
|
||||||
|
|
||||||
|
#include "interface.h"
|
||||||
|
#include <QObject>
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
|
QT_BEGIN_NAMESPACE
|
||||||
|
class QString;
|
||||||
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
|
class ZigbeeManager : public QObject
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
ZigbeeManager();
|
||||||
|
|
||||||
|
/*private slots:
|
||||||
|
void sendEcho();
|
||||||
|
*/
|
||||||
|
private:
|
||||||
|
bool loadPlugin();
|
||||||
|
|
||||||
|
QList<ZigbeeManagerInterface *> zigbeeManagerInterface;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
21
zigbeemanager/zigbeemanager.pro
Normal file
21
zigbeemanager/zigbeemanager.pro
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
QT += core
|
||||||
|
|
||||||
|
HEADERS = zigbeemanager.h \
|
||||||
|
interface.h
|
||||||
|
SOURCES = zigbeemanager.cpp \
|
||||||
|
main.cpp
|
||||||
|
|
||||||
|
TARGET = zigbeemanager
|
||||||
|
QMAKE_PROJECT_NAME = zigbeemanager
|
||||||
|
win32 {
|
||||||
|
CONFIG(debug, release|debug):DESTDIR = ../debug/
|
||||||
|
CONFIG(release, release|debug):DESTDIR = ../release/
|
||||||
|
} else {
|
||||||
|
DESTDIR = ./
|
||||||
|
}
|
||||||
|
|
||||||
|
# install
|
||||||
|
target.path = ./
|
||||||
|
INSTALLS += target
|
||||||
|
|
||||||
|
CONFIG += install_ok # Do not cargo-cult this!
|
@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE QtCreatorProject>
|
<!DOCTYPE QtCreatorProject>
|
||||||
<!-- Written by QtCreator 9.0.1, 2023-04-08T05:18:14. -->
|
<!-- Written by QtCreator 9.0.1, 2023-05-13T14:15:20. -->
|
||||||
<qtcreator>
|
<qtcreator>
|
||||||
<data>
|
<data>
|
||||||
<variable>EnvironmentId</variable>
|
<variable>EnvironmentId</variable>
|
||||||
@ -81,25 +81,22 @@
|
|||||||
<valuelist type="QVariantList" key="ClangTools.SuppressedDiagnostics"/>
|
<valuelist type="QVariantList" key="ClangTools.SuppressedDiagnostics"/>
|
||||||
<value type="bool" key="ClangTools.UseGlobalSettings">true</value>
|
<value type="bool" key="ClangTools.UseGlobalSettings">true</value>
|
||||||
</valuemap>
|
</valuemap>
|
||||||
<valuemap type="QVariantMap" key="CppEditor.QuickFix">
|
|
||||||
<value type="bool" key="UseGlobalSettings">true</value>
|
|
||||||
</valuemap>
|
|
||||||
</valuemap>
|
</valuemap>
|
||||||
</data>
|
</data>
|
||||||
<data>
|
<data>
|
||||||
<variable>ProjectExplorer.Project.Target.0</variable>
|
<variable>ProjectExplorer.Project.Target.0</variable>
|
||||||
<valuemap type="QVariantMap">
|
<valuemap type="QVariantMap">
|
||||||
<value type="QString" key="DeviceType">Desktop</value>
|
<value type="QString" key="DeviceType">Desktop</value>
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Qt 5.15.7 (qt5)</value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop</value>
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Qt 5.15.7 (qt5)</value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop</value>
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{a8a6d767-5e05-45c7-b70b-532f99112b6a}</value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{893f9ca6-0efa-4c08-a4a6-5a818f60a8a0}</value>
|
||||||
<value type="qlonglong" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
|
<value type="qlonglong" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
|
||||||
<value type="qlonglong" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
|
<value type="qlonglong" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
|
||||||
<value type="qlonglong" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
|
<value type="qlonglong" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
|
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
|
||||||
<value type="int" key="EnableQmlDebugging">0</value>
|
<value type="int" key="EnableQmlDebugging">0</value>
|
||||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/daniel/develop/zigbeemanager/../build-zigbeemanager-Qt_5_15_7_qt5-Debug</value>
|
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/daniel/develope/echoplugin/echowindow/../build-echowindow-Desktop-Debug</value>
|
||||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">/home/daniel/develop/build-zigbeemanager-Qt_5_15_7_qt5-Debug</value>
|
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">/home/daniel/develope/echoplugin/build-echowindow-Desktop-Debug</value>
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
@ -137,8 +134,8 @@
|
|||||||
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
|
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
|
||||||
</valuemap>
|
</valuemap>
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
|
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
|
||||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/daniel/develop/zigbeemanager/../build-zigbeemanager-Qt_5_15_7_qt5-Release</value>
|
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/daniel/develope/echoplugin/echowindow/../build-echowindow-Desktop-Release</value>
|
||||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">/home/daniel/develop/build-zigbeemanager-Qt_5_15_7_qt5-Release</value>
|
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">/home/daniel/develope/echoplugin/build-echowindow-Desktop-Release</value>
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
@ -178,8 +175,8 @@
|
|||||||
</valuemap>
|
</valuemap>
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.2">
|
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.2">
|
||||||
<value type="int" key="EnableQmlDebugging">0</value>
|
<value type="int" key="EnableQmlDebugging">0</value>
|
||||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/daniel/develop/zigbeemanager/../build-zigbeemanager-Qt_5_15_7_qt5-Profile</value>
|
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/daniel/develope/echoplugin/echowindow/../build-echowindow-Desktop-Profile</value>
|
||||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">/home/daniel/develop/build-zigbeemanager-Qt_5_15_7_qt5-Profile</value>
|
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">/home/daniel/develope/echoplugin/build-echowindow-Desktop-Profile</value>
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
@ -239,15 +236,14 @@
|
|||||||
<valuelist type="QVariantList" key="CustomOutputParsers"/>
|
<valuelist type="QVariantList" key="CustomOutputParsers"/>
|
||||||
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
|
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
|
||||||
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
|
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">zigbeemanager</value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:/home/daniel/develope/echoplugin/echowindow/echowindow.pro</value>
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:/home/daniel/develop/zigbeemanager/zigbeemanager.pro</value>
|
<value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey">/home/daniel/develope/echoplugin/echowindow/echowindow.pro</value>
|
||||||
<value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey">/home/daniel/develop/zigbeemanager/zigbeemanager.pro</value>
|
|
||||||
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
|
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
|
||||||
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
|
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
|
||||||
<value type="bool" key="RunConfiguration.UseLibrarySearchPath">true</value>
|
<value type="bool" key="RunConfiguration.UseLibrarySearchPath">true</value>
|
||||||
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
|
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
|
||||||
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
|
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
|
||||||
<value type="QString" key="RunConfiguration.WorkingDirectory.default">/home/daniel/develop/build-zigbeemanager-Qt_5_15_7_qt5-Debug</value>
|
<value type="QString" key="RunConfiguration.WorkingDirectory.default">/home/daniel/develope/echoplugin/build-echowindow-Desktop-Debug/../</value>
|
||||||
</valuemap>
|
</valuemap>
|
||||||
<value type="qlonglong" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
|
<value type="qlonglong" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
|
||||||
</valuemap>
|
</valuemap>
|
||||||
@ -256,16 +252,16 @@
|
|||||||
<variable>ProjectExplorer.Project.Target.1</variable>
|
<variable>ProjectExplorer.Project.Target.1</variable>
|
||||||
<valuemap type="QVariantMap">
|
<valuemap type="QVariantMap">
|
||||||
<value type="QString" key="DeviceType">Desktop</value>
|
<value type="QString" key="DeviceType">Desktop</value>
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop</value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Qt 5.15.7 (qt5)</value>
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop</value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Qt 5.15.7 (qt5)</value>
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{893f9ca6-0efa-4c08-a4a6-5a818f60a8a0}</value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{a8a6d767-5e05-45c7-b70b-532f99112b6a}</value>
|
||||||
<value type="qlonglong" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
|
<value type="qlonglong" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
|
||||||
<value type="qlonglong" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
|
<value type="qlonglong" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
|
||||||
<value type="qlonglong" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
|
<value type="qlonglong" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
|
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
|
||||||
<value type="int" key="EnableQmlDebugging">0</value>
|
<value type="int" key="EnableQmlDebugging">0</value>
|
||||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/daniel/develop/zigbeemanager/../build-zigbeemanager-Desktop-Debug</value>
|
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/daniel/develope/echoplugin/echowindow/../build-echowindow-Qt_5_15_7_qt5-Debug</value>
|
||||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">/home/daniel/develop/build-zigbeemanager-Desktop-Debug</value>
|
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">/home/daniel/develope/echoplugin/build-echowindow-Qt_5_15_7_qt5-Debug</value>
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
@ -303,8 +299,8 @@
|
|||||||
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
|
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
|
||||||
</valuemap>
|
</valuemap>
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
|
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
|
||||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/daniel/develop/zigbeemanager/../build-zigbeemanager-Desktop-Release</value>
|
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/daniel/develope/echoplugin/echowindow/../build-echowindow-Qt_5_15_7_qt5-Release</value>
|
||||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">/home/daniel/develop/build-zigbeemanager-Desktop-Release</value>
|
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">/home/daniel/develope/echoplugin/build-echowindow-Qt_5_15_7_qt5-Release</value>
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
@ -344,8 +340,8 @@
|
|||||||
</valuemap>
|
</valuemap>
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.2">
|
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.2">
|
||||||
<value type="int" key="EnableQmlDebugging">0</value>
|
<value type="int" key="EnableQmlDebugging">0</value>
|
||||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/daniel/develop/zigbeemanager/../build-zigbeemanager-Desktop-Profile</value>
|
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/daniel/develope/echoplugin/echowindow/../build-echowindow-Qt_5_15_7_qt5-Profile</value>
|
||||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">/home/daniel/develop/build-zigbeemanager-Desktop-Profile</value>
|
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">/home/daniel/develope/echoplugin/build-echowindow-Qt_5_15_7_qt5-Profile</value>
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
@ -1,6 +1,6 @@
|
|||||||
Name: zigbeemanager
|
Name: zigbeemanager
|
||||||
Summary: Zigbee gateway manager
|
Summary: Zigbee gateway manager
|
||||||
Version: 0.1
|
Version: 0.1.3
|
||||||
Release: %mkrel 1
|
Release: %mkrel 1
|
||||||
License: GPLv3
|
License: GPLv3
|
||||||
Group: Networking/Other
|
Group: Networking/Other
|
||||||
@ -14,8 +14,8 @@ BuildRequires: make
|
|||||||
BuildRequires: pkgconfig(Qt5Core)
|
BuildRequires: pkgconfig(Qt5Core)
|
||||||
BuildRequires: pkgconfig(Qt5SerialPort)
|
BuildRequires: pkgconfig(Qt5SerialPort)
|
||||||
BuildRequires: pkgconfig(Qt5Widgets)
|
BuildRequires: pkgconfig(Qt5Widgets)
|
||||||
#BuildRequires: pkgconfig(Qt5Xml)
|
BuildRequires: pkgconfig(Qt5Xml)
|
||||||
#BuildRequires: pkgconfig(libmagic)
|
BuildRequires: pkgconfig(Qt5Concurrent)
|
||||||
#BuildRequires: cmake(KF5Completion)
|
#BuildRequires: cmake(KF5Completion)
|
||||||
BuildRequires: cmake(KF5CoreAddons)
|
BuildRequires: cmake(KF5CoreAddons)
|
||||||
#BuildRequires: cmake(KF5I18n)
|
#BuildRequires: cmake(KF5I18n)
|
||||||
@ -26,7 +26,7 @@ BuildRequires: cmake(KF5Config)
|
|||||||
#BuildRequires: boost-devel
|
#BuildRequires: boost-devel
|
||||||
#BuildRequires: qt5keychain-devel
|
#BuildRequires: qt5keychain-devel
|
||||||
#Requires: kitemviews
|
#Requires: kitemviews
|
||||||
#Requires: kcompletion
|
#Requires: kcompletions
|
||||||
#Requires: kcoreaddons
|
#Requires: kcoreaddons
|
||||||
#Requires: kdbusaddons
|
#Requires: kdbusaddons
|
||||||
#Requires: rsync
|
#Requires: rsync
|
||||||
@ -47,8 +47,9 @@ qmake-qt5 .
|
|||||||
%install
|
%install
|
||||||
INSTALL_ROOT=%{buildroot} make install
|
INSTALL_ROOT=%{buildroot} make install
|
||||||
|
|
||||||
#%find_lang %{name} --with-qt
|
##find_lang %{name} --with-qt
|
||||||
|
|
||||||
#%files -f %{name}.lang
|
%files
|
||||||
|
##-f {name}.lang
|
||||||
%{_bindir}/%{name}
|
%{_bindir}/%{name}
|
||||||
%{_docdir}/%{name}/README*
|
##{_docdir}/{name}/README*
|
Reference in New Issue
Block a user