diff --git a/LFtid1056/PQSMsg.h b/LFtid1056/PQSMsg.h index 93909d7..f4c87aa 100644 --- a/LFtid1056/PQSMsg.h +++ b/LFtid1056/PQSMsg.h @@ -752,7 +752,7 @@ public: // 9-11位置位3.1415表示空置 for (int i = 0; i < 3; ++i) { - float_buffer.push_back(-9999.0f); + float_buffer.push_back(3.14159f); } // 12-14位从UU_Deviation和UL_Deviation各自取前三个,取不为0的值 @@ -777,7 +777,7 @@ public: // 再后49*3位置位3.1415表示空置 for (int i = 0; i < 49 * 3; ++i) { - float_buffer.push_back(-9999.0f); + float_buffer.push_back(3.14159f); } // 再后49位从FuHarm的3中取1-49位 @@ -804,7 +804,7 @@ public: // 再后49*3位置位3.1415表示空置 for (int i = 0; i < 49 * 3; ++i) { - float_buffer.push_back(-9999.0f); + float_buffer.push_back(3.14159f); } // 再后49*3位依次从FuHarmPhase的3-5中取1-49位 @@ -823,7 +823,7 @@ public: // 再后50*3位置位3.1415表示空置 for (int i = 0; i < 50 * 3; ++i) { - float_buffer.push_back(-9999.0f); + float_buffer.push_back(3.14159f); } // 再后50*3位依次从InHarm的3-5中取0-49位中的val指标 @@ -909,7 +909,7 @@ public: // 再后49*3位置位3.1415表示空置 for (int i = 0; i < 49 * 3; ++i) { - float_buffer.push_back(-9999.0f); + float_buffer.push_back(3.14159f); } // 再后49*3位从Harm_Contain中的3-5中取1-49位 @@ -928,7 +928,7 @@ public: // 再后3位置位3.1415表示空置 for (int i = 0; i < 3; ++i) { - float_buffer.push_back(-9999.0f); + float_buffer.push_back(3.14159f); } // 再后3位从Harm_Aberrance中的3-5中取值 @@ -953,7 +953,7 @@ public: // 再后3位置位3.1415表示空置 for (int i = 0; i < 3; ++i) { - float_buffer.push_back(-9999.0f); + float_buffer.push_back(3.14159f); } // 再后3位从U_Fluctuation中取0-2 @@ -963,7 +963,7 @@ public: // 再后3位置位3.1415表示空置 for (int i = 0; i < 3; ++i) { - float_buffer.push_back(-9999.0f); + float_buffer.push_back(3.14159f); } // 再后3位从U_Flicker中取0-2 @@ -973,7 +973,7 @@ public: // 再后3位置位3.1415表示空置 for (int i = 0; i < 3; ++i) { - float_buffer.push_back(-9999.0f); + float_buffer.push_back(3.14159f); } // 再后3位从UL_Flicker中取0-2 @@ -1004,7 +1004,7 @@ public: // 12-14位置位3.1415表示空置 for (int i = 0; i < 3; ++i) { - float_buffer.push_back(-9999.0f); + float_buffer.push_back(3.14159f); } // 15-16位从F_Deviation中取0-1 @@ -1047,7 +1047,7 @@ public: } // 再后49*3位置位3.1415表示空置 for (int i = 0; i < 49 * 3; ++i) { - float_buffer.push_back(-9999.0f); + float_buffer.push_back(3.14159f); } // 再后49*3位依次从FuHarmPhase的0-2中取1-49位 @@ -1064,7 +1064,7 @@ public: } // 再后49*3位置位3.1415表示空置 for (int i = 0; i < 49 * 3; ++i) { - float_buffer.push_back(-9999.0f); + float_buffer.push_back(3.14159f); } // 再后50*6位依次从InHarm的0-5中取0-49位中的val指标 @@ -1075,7 +1075,7 @@ public: } // 再后50*3位置位3.1415表示空置 for (int i = 0; i < 50 * 3; ++i) { - float_buffer.push_back(-9999.0f); + float_buffer.push_back(3.14159f); } // 再后12位依次从Total_Power的0-3中取0-2位 @@ -1142,7 +1142,7 @@ public: } // 再后49*3位置位3.1415表示空置 for (int i = 0; i < 49 * 3; ++i) { - float_buffer.push_back(-9999.0f); + float_buffer.push_back(3.14159f); } // 再后6位从Harm_Aberrance中的0-5中取值 @@ -1151,7 +1151,7 @@ public: } // 再后3位置位3.1415表示空置 for (int i = 0; i < 3; ++i) { - float_buffer.push_back(-9999.0f); + float_buffer.push_back(3.14159f); } // 再后4位从Cos_PF中取0-3 @@ -1169,7 +1169,7 @@ public: } // 再后3位置位3.1415表示空置 for (int i = 0; i < 3; ++i) { - float_buffer.push_back(-9999.0f); + float_buffer.push_back(3.14159f); } // 再后3位从U_Flicker中取0-2 @@ -1178,7 +1178,7 @@ public: } // 再后3位置位3.1415表示空置 for (int i = 0; i < 3; ++i) { - float_buffer.push_back(-9999.0f); + float_buffer.push_back(3.14159f); } // 再后3位从UL_Flicker中取0-2 @@ -1187,7 +1187,7 @@ public: } // 再后3位置位3.1415表示空置 for (int i = 0; i < 3; ++i) { - float_buffer.push_back(-9999.0f); + float_buffer.push_back(3.14159f); } // 转换为Base64 @@ -1747,7 +1747,7 @@ public: // 12-14: 空置(线电压位置) for (int i = 0; i < 3; ++i) { - float_buffer.push_back(-9999.0f); + float_buffer.push_back(3.14159f); } // 15-20: THD总畸变率(0-5) @@ -1757,7 +1757,7 @@ public: // 21-23: 空置(线电压THD) for (int i = 0; i < 3; ++i) { - float_buffer.push_back(-9999.0f); + float_buffer.push_back(3.14159f); } // 24-25: 频率及偏差 @@ -1800,7 +1800,7 @@ public: // 201-347: 空置(线电压谐波) for (int i = 0; i < 3 * 49; ++i) { - float_buffer.push_back(-9999.0f); + float_buffer.push_back(3.14159f); } // 348-494: 电流谐波幅值(1-49次) @@ -1819,7 +1819,7 @@ public: // 642-788: 空置(线电压谐波相位) for (int i = 0; i < 3 * 49; ++i) { - float_buffer.push_back(-9999.0f); + float_buffer.push_back(3.14159f); } // 789-935: 电流谐波相位(1-49次) @@ -1838,7 +1838,7 @@ public: // 1086-1235: 空置(线电压间谐波) for (int i = 0; i < 3 * 50; ++i) { - float_buffer.push_back(-9999.0f); + float_buffer.push_back(3.14159f); } // 转换为Base64 @@ -1856,7 +1856,7 @@ public: // 9-11: 空置(相电压位置) for (int i = 0; i < 3; ++i) { - float_buffer.push_back(-9999.0f); + float_buffer.push_back(3.14159f); } // 12-14: 电压偏差(取不为0的值) @@ -1867,7 +1867,7 @@ public: // 15-17: 空置(相电压THD) for (int i = 0; i < 3; ++i) { - float_buffer.push_back(-9999.0f); + float_buffer.push_back(3.14159f); } // 18-20: THD线电压畸变率(3-5) @@ -1913,7 +1913,7 @@ public: // 54-200: 空置(相电压谐波) for (int i = 0; i < 3 * 49; ++i) { - float_buffer.push_back(-9999.0f); + float_buffer.push_back(3.14159f); } // 201-347: 电压谐波含有率(1-49次) @@ -1932,7 +1932,7 @@ public: // 495-641: 空置(相电压谐波相位) for (int i = 0; i < 3 * 49; ++i) { - float_buffer.push_back(-9999.0f); + float_buffer.push_back(3.14159f); } // 642-788: 电压谐波相位(1-49次) @@ -1951,7 +1951,7 @@ public: // 936-1085: 空置(线电压间谐波) for (int i = 0; i < 3 * 50; ++i) { - float_buffer.push_back(-9999.0f); + float_buffer.push_back(3.14159f); } // 1086-1235: 电压间谐波幅值(0-49次) diff --git a/LFtid1056/dealMsg.cpp b/LFtid1056/dealMsg.cpp index 0075091..e2a1aa5 100644 --- a/LFtid1056/dealMsg.cpp +++ b/LFtid1056/dealMsg.cpp @@ -438,7 +438,8 @@ void process_received_message(string mac, string id,const char* data, size_t len std::lock_guard lock(queue_data_list_mutex); queue_data_list.push_back(data); - + std::cout << "Successfully assembled tagPqData for line: " + << avg_data.name << std::endl; // 输出结果 //std::cout << "Base64 Encoded Data (" << max_data.CalculateFloatCount() // << " floats): " << base64Str << std::endl; diff --git a/LFtid1056/main_thread.cpp b/LFtid1056/main_thread.cpp index 930f0c8..cf42326 100644 --- a/LFtid1056/main_thread.cpp +++ b/LFtid1056/main_thread.cpp @@ -158,12 +158,20 @@ void* client_manager_thread(void* arg) { {"P001", "Main Voltage", "D001",1 ,1, 1, 1, 1,"0.38k",0}, {"P002", "Backup Voltage", "D001",2 ,1, 1, 1, 1,"0.38k",0} }; + std::vector points2 = { + {"P003", "Main Voltage", "D002",1 ,1, 1, 1, 1,"0.38k",0}, + {"P004", "Backup Voltage", "D002",2 ,1, 1, 1, 1,"0.38k",0} + }; //00B78DA800D6 00-B7-8D-01-79-06 00-B7-8D-A8-00-D6 00-B7-8D-01-71-09 00-B7-8D-01-88-7f // 创建装置列表 std::vector devices = { { - "D001", "Primary Device", "Model-X", "00-B7-8D-01-79-06", + "D001", "Primary Device", "Model-X", "00-B7-8D-01-88-7f", 1, points1,true + }, + { + "D002", "Primary Device1", "Model-X1", "00-B7-8D-01-71-09", + 1, points2,true } };