|
@@ -531,7 +531,7 @@ void TBCore::check_framedata(QString data, QString etime, QString ip)
|
|
|
infoTopic.append(QString("/usky/ytDP0003/%1/%2/info").arg(QString(smokerList->sensors[i].Company_Code)).arg(QString(smokerList->sensors[i].Device_Code)));
|
|
|
alarmTopic.append(QString("/usky/ytDP0003/%1/%2/alarm").arg(QString(smokerList->sensors[i].Company_Code)).arg(QString(smokerList->sensors[i].Device_Code)));
|
|
|
|
|
|
- infoData.append(QString("{\"devId\":\"%1\",\"connType\":\"N\",\"deviceName\":\"%2\",\"devs\":[{\"dp\":[{\"property\":\"状态\",\"serial\":\"301\",\"value\":\"%3\"},{\"property\":\"剩余电量\",\"serial\":\"302\",\"value\":\"%4\"},{\"property\":\"无线信号\",\"serial\":\"303\",\"value\":\"%5\"},{\"property\":\"温度\",\"serial\":\"304\",\"value\":\"%6\"},{\"property\":\"浓度\",\"serial\":\"305\",\"value\":\"%7\"}],\"deviceName\":\"%8\",\"timeStamp\":\"%9\",\"deviceModel\":\"\",\"deviceType\":\"%10\",\"devId\":\"%11\"}],\"type\":\"INFO\",\"timeStamp\":\"%12\"}").arg(QString(smokerList->sensors[i].Device_Code)).arg(QString(smokerList->sensors[i].Device_Name)).arg(alarm==0x01?1:(alarm==0x02?2:(alarm==0x03?3:7))).arg(vbattery).arg(wsignal).arg(temp).arg(vsmoke).arg(QString(smokerList->sensors[i].Device_Name)).arg(stime.toTime_t()).arg(QString(smokerList->sensors[i].Device_Type)).arg(QString(smokerList->sensors[i].Device_Code)).arg(stime.toTime_t()));
|
|
|
+ infoData.append(QString("{\"devId\":\"%1\",\"connType\":\"N\",\"deviceName\":\"%2\",\"devs\":[{\"dp\":[{\"property\":\"状态\",\"serial\":\"301\",\"value\":\"%3\"},{\"property\":\"剩余电量\",\"serial\":\"302\",\"value\":\"%4\"},{\"property\":\"无线信号\",\"serial\":\"303\",\"value\":\"%5\"},{\"property\":\"温度\",\"serial\":\"304\",\"value\":\"%6\"},{\"property\":\"浓度\",\"serial\":\"305\",\"value\":\"%7\"}],\"deviceName\":\"%8\",\"timeStamp\":\"%9\",\"deviceModel\":\"\",\"deviceType\":\"%10\",\"devId\":\"%11\"}],\"type\":\"INFO\",\"timeStamp\":\"%12\"}").arg(QString(smokerList->sensors[i].Device_Code)).arg(QString(smokerList->sensors[i].Device_Name)).arg(alarm==0x01?1:(alarm==0x02?2:(alarm==0x03?3:0))).arg(vbattery).arg(wsignal).arg(temp).arg(vsmoke).arg(QString(smokerList->sensors[i].Device_Name)).arg(stime.toTime_t()).arg(QString(smokerList->sensors[i].Device_Type)).arg(QString(smokerList->sensors[i].Device_Code)).arg(stime.toTime_t()));
|
|
|
|
|
|
realtime_data(3,device_id, wsignal, vbattery,etime);
|
|
|
// if(alarm!=smokerList->sensors[i].UnUsed[0])
|
|
@@ -591,7 +591,7 @@ void TBCore::check_framedata(QString data, QString etime, QString ip)
|
|
|
infoTopic.append(QString("/usky/ytDP0003/%1/%2/info").arg(QString(diciList->sensors[i].Company_Code)).arg(QString(diciList->sensors[i].Device_Code)));
|
|
|
alarmTopic.append(QString("/usky/ytDP0003/%1/%2/alarm").arg(QString(diciList->sensors[i].Company_Code)).arg(QString(diciList->sensors[i].Device_Code)));
|
|
|
|
|
|
- infoData.append(QString("{\"devId\":\"%1\",\"connType\":\"N\",\"deviceName\":\"%2\",\"devs\":[{\"dp\":[{\"property\":\"状态\",\"serial\":\"321\",\"value\":\"%3\"},{\"property\":\"剩余电量\",\"serial\":\"322\",\"value\":\"%4\"},{\"property\":\"无线信号\",\"serial\":\"323\",\"value\":\"%5\"}],\"deviceName\":\"%6\",\"timeStamp\":\"%7\",\"deviceModel\":\"\",\"deviceType\":\"%8\",\"devId\":\"%9\"}],\"type\":\"INFO\",\"timeStamp\":\"%10\"}").arg(QString(diciList->sensors[i].Device_Code)).arg(QString(diciList->sensors[i].Device_Name)).arg(alarm).arg(vbattery).arg(wsignal).arg(QString(diciList->sensors[i].Device_Name)).arg(stime.toTime_t()).arg(QString(diciList->sensors[i].Device_Type)).arg(QString(diciList->sensors[i].Device_Code)).arg(stime.toTime_t()));
|
|
|
+ infoData.append(QString("{\"devId\":\"%1\",\"connType\":\"N\",\"deviceName\":\"%2\",\"devs\":[{\"dp\":[{\"property\":\"状态\",\"serial\":\"321\",\"value\":\"%3\"},{\"property\":\"剩余电量\",\"serial\":\"322\",\"value\":\"%4\"},{\"property\":\"无线信号\",\"serial\":\"323\",\"value\":\"%5\"}],\"deviceName\":\"%6\",\"timeStamp\":\"%7\",\"deviceModel\":\"\",\"deviceType\":\"%8\",\"devId\":\"%9\"}],\"type\":\"INFO\",\"timeStamp\":\"%10\"}").arg(QString(diciList->sensors[i].Device_Code)).arg(QString(diciList->sensors[i].Device_Name)).arg(alarm==0x01?1:(alarm==0x02?2:(alarm==0x03?3:0))).arg(vbattery).arg(wsignal).arg(QString(diciList->sensors[i].Device_Name)).arg(stime.toTime_t()).arg(QString(diciList->sensors[i].Device_Type)).arg(QString(diciList->sensors[i].Device_Code)).arg(stime.toTime_t()));
|
|
|
|
|
|
realtime_data(129,device_id, wsignal, vbattery,etime);
|
|
|
if(alarm==0x0b){
|
|
@@ -672,7 +672,7 @@ void TBCore::check_framedata(QString data, QString etime, QString ip)
|
|
|
infoTopic.append(QString("/usky/ytDP0003/%1/%2/info").arg(QString(doorList->sensors[i].Company_Code)).arg(QString(doorList->sensors[i].Device_Code)));
|
|
|
alarmTopic.append(QString("/usky/ytDP0003/%1/%2/alarm").arg(QString(doorList->sensors[i].Company_Code)).arg(QString(doorList->sensors[i].Device_Code)));
|
|
|
|
|
|
- infoData.append(QString("{\"devId\":\"%1\",\"connType\":\"N\",\"deviceName\":\"%2\",\"devs\":[{\"dp\":[{\"property\":\"状态\",\"serial\":\"341\",\"value\":\"%3\"},{\"property\":\"剩余电量\",\"serial\":\"342\",\"value\":\"%4\"},{\"property\":\"无线信号\",\"serial\":\"343\",\"value\":\"%5\"}],\"deviceName\":\"%6\",\"timeStamp\":\"%7\",\"deviceModel\":\"\",\"deviceType\":\"%8\",\"devId\":\"%9\"}],\"type\":\"INFO\",\"timeStamp\":\"%10\"}").arg(QString(doorList->sensors[i].Device_Code)).arg(QString(doorList->sensors[i].Device_Name)).arg(doorsta).arg(vbattery).arg(wsignal).arg(QString(doorList->sensors[i].Device_Name)).arg(stime.toTime_t()).arg(QString(doorList->sensors[i].Device_Type)).arg(QString(doorList->sensors[i].Device_Code)).arg(stime.toTime_t()));
|
|
|
+ infoData.append(QString("{\"devId\":\"%1\",\"connType\":\"N\",\"deviceName\":\"%2\",\"devs\":[{\"dp\":[{\"property\":\"状态\",\"serial\":\"341\",\"value\":\"%3\"},{\"property\":\"剩余电量\",\"serial\":\"342\",\"value\":\"%4\"},{\"property\":\"无线信号\",\"serial\":\"343\",\"value\":\"%5\"}],\"deviceName\":\"%6\",\"timeStamp\":\"%7\",\"deviceModel\":\"\",\"deviceType\":\"%8\",\"devId\":\"%9\"}],\"type\":\"INFO\",\"timeStamp\":\"%10\"}").arg(QString(doorList->sensors[i].Device_Code)).arg(QString(doorList->sensors[i].Device_Name)).arg(doorsta==0x01?1:(doorsta==0x02?2:(doorsta==0x03?3:0))).arg(vbattery).arg(wsignal).arg(QString(doorList->sensors[i].Device_Name)).arg(stime.toTime_t()).arg(QString(doorList->sensors[i].Device_Type)).arg(QString(doorList->sensors[i].Device_Code)).arg(stime.toTime_t()));
|
|
|
|
|
|
realtime_data(130,device_id, wsignal, vbattery,etime);
|
|
|
if((doorsta==0x01)&&(doorList->sensors[i].UnUsed[0]!=0x01)){
|
|
@@ -727,7 +727,7 @@ void TBCore::check_framedata(QString data, QString etime, QString ip)
|
|
|
infoTopic.append(QString("/usky/ytDP0003/%1/%2/info").arg(QString(gasList->sensors[i].Company_Code)).arg(QString(gasList->sensors[i].Device_Code)));
|
|
|
alarmTopic.append(QString("/usky/ytDP0003/%1/%2/alarm").arg(QString(gasList->sensors[i].Company_Code)).arg(QString(gasList->sensors[i].Device_Code)));
|
|
|
|
|
|
- infoData.append(QString("{\"devId\":\"%1\",\"connType\":\"N\",\"deviceName\":\"%2\",\"devs\":[{\"dp\":[{\"property\":\"状态\",\"serial\":\"361\",\"value\":\"%3\"},{\"property\":\"剩余电量\",\"serial\":\"362\",\"value\":\"%4\"},{\"property\":\"无线信号\",\"serial\":\"363\",\"value\":\"%5\"}],\"deviceName\":\"%6\",\"timeStamp\":\"%7\",\"deviceModel\":\"\",\"deviceType\":\"%8\",\"devId\":\"%9\"}],\"type\":\"INFO\",\"timeStamp\":\"%10\"}").arg(QString(gasList->sensors[i].Device_Code)).arg(QString(gasList->sensors[i].Device_Name)).arg(alarm).arg(vbattery).arg(wsignal).arg(QString(gasList->sensors[i].Device_Name)).arg(stime.toTime_t()).arg(QString(gasList->sensors[i].Device_Type)).arg(QString(gasList->sensors[i].Device_Code)).arg(stime.toTime_t()));
|
|
|
+ infoData.append(QString("{\"devId\":\"%1\",\"connType\":\"N\",\"deviceName\":\"%2\",\"devs\":[{\"dp\":[{\"property\":\"状态\",\"serial\":\"361\",\"value\":\"%3\"},{\"property\":\"剩余电量\",\"serial\":\"362\",\"value\":\"%4\"},{\"property\":\"无线信号\",\"serial\":\"363\",\"value\":\"%5\"}],\"deviceName\":\"%6\",\"timeStamp\":\"%7\",\"deviceModel\":\"\",\"deviceType\":\"%8\",\"devId\":\"%9\"}],\"type\":\"INFO\",\"timeStamp\":\"%10\"}").arg(QString(gasList->sensors[i].Device_Code)).arg(QString(gasList->sensors[i].Device_Name)).arg(alarm==0x01?1:(alarm==0x02?2:(alarm==0x03?3:0))).arg(vbattery).arg(wsignal).arg(QString(gasList->sensors[i].Device_Name)).arg(stime.toTime_t()).arg(QString(gasList->sensors[i].Device_Type)).arg(QString(gasList->sensors[i].Device_Code)).arg(stime.toTime_t()));
|
|
|
|
|
|
realtime_data(131,device_id, wsignal, vbattery,etime);
|
|
|
if(gasList->sensors[i].UnUsed[0]!=alarm)
|