From 2ef5b69dd8c67b9d0be3dd07e84c3693a3cf1497 Mon Sep 17 00:00:00 2001 From: zw <3466561528@qq.com> Date: Wed, 10 Sep 2025 13:45:47 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E4=BA=86=E8=A1=A5=E6=8B=9B?= =?UTF-8?q?=E6=9A=82=E6=80=81=E6=B3=A2=E5=BD=A2=E6=96=87=E4=BB=B6=E5=92=8C?= =?UTF-8?q?=E8=A1=A5=E6=8B=9B=E7=A8=B3=E6=80=81=E6=95=B0=E6=8D=AE=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LFtid1056/client2.h | 2 ++ LFtid1056/main_thread.cpp | 28 ++++++++++++++-------------- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/LFtid1056/client2.h b/LFtid1056/client2.h index 3672eb3..688ad4f 100644 --- a/LFtid1056/client2.h +++ b/LFtid1056/client2.h @@ -62,6 +62,8 @@ enum class DeviceState { READING_DEVVERSION, // 读取装置版本配置信息 SET_RIGHTTIME, // 设置装置对时 READING_EVENTLOG, // 补招事件日志 + READING_EVENTFILE, // 补招暂态波形文件 + READING_STATSFILE, // 补招稳态数据文件 // 可根据需要添加更多状态 CUSTOM_ACTION // 自定义动作 }; diff --git a/LFtid1056/main_thread.cpp b/LFtid1056/main_thread.cpp index e873484..930f0c8 100644 --- a/LFtid1056/main_thread.cpp +++ b/LFtid1056/main_thread.cpp @@ -154,24 +154,24 @@ void* client_manager_thread(void* arg) { printf("Started client connections\n"); // 创建测点数据 - //std::vector points1 = { - // {"P001", "Main Voltage", "D001",1 ,1, 1, 1, 1,"0.38k",0}, - // {"P002", "Backup Voltage", "D001",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", - // 1, points1,true - // } - //}; + std::vector points1 = { + {"P001", "Main Voltage", "D001",1 ,1, 1, 1, 1,"0.38k",0}, + {"P002", "Backup Voltage", "D001",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", + 1, points1,true + } + }; // 生成100个测试装置 //std::vector test_devices = generate_test_devices(100); //lnk从台账读取设备 - std::vector devices = GenerateDeviceInfoFromLedger(terminal_devlist);//lnk添加 + //std::vector devices = GenerateDeviceInfoFromLedger(terminal_devlist);//lnk添加 //台账打印 PrintDevices(devices); @@ -302,7 +302,7 @@ int main(int argc ,char** argv) {// std::cerr << "process param error,exit" << std::endl; return 1; } - init_daemon(); + //init_daemon(); srand(time(NULL)); // 初始化随机数种子 // 初始化线程数组