From db57152615104b4634c42946a912200a58bc5f93 Mon Sep 17 00:00:00 2001 From: cheliequan <liequanche@126.com> Date: 星期五, 13 一月 2023 17:58:49 +0800 Subject: [PATCH] 1.重构代码,将模板函数分成两个函数 2.增加get_value_by_key函数 --- main.cpp | 19 ++++++++++++++----- 1 files changed, 14 insertions(+), 5 deletions(-) diff --git a/main.cpp b/main.cpp index bdc8578..58e57bc 100644 --- a/main.cpp +++ b/main.cpp @@ -9,8 +9,7 @@ #include "3rdparty/bus_client/cbhomeclient.h" #include "3rdparty/bus_client/message.h" -#include "sysset.h" -#include "rule.h" +#include "dbapi.h" #include "proto/x86_64/sysset.pb.h" #include "proto/x86_64/fileanalysis.pb.h" #include "proto/x86_64/protomsg.pb.h" @@ -42,10 +41,20 @@ // } // 鏁版嵁鏍堥厤缃� fileanalysis.pb.h - protomsg::FileAnalysisSetting node; - if (dbapi_get_stack_config(handle, node)) { - printf("StackConfig: %s\n", node.filedirectory().c_str()); + // protomsg::FileAnalysisSetting node; + // if (dbapi_get_stack_config(handle, node)) { + // printf("StackConfig: %s\n", node.filedirectory().c_str()); + // } + + // 鏃堕棿瑙勫垯 + std::vector<protomsg::CameraTimerule> list; + if (dbapi_get_time_rules(handle, list)) { + printf("CameraTimerule:\n"); } + //绯荤粺鎺堟潈淇℃伅 + + printf("isExpired:%d\n", dbapi_get_server_get_is_sys_expired(handle)); + return 0; } -- Gitblit v1.8.0