| | |
| | | // } |
| | | |
| | | // 数据栈配置 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"); |
| | | } |
| | | |
| | | return 0; |
| | |
| | | |
| | | using namespace protomsg; |
| | | |
| | | bool dbapi_get_time_rules(void *handle, protomsg::CameraTimerule & message) { |
| | | bool dbapi_get_time_rules(void *handle, vector<protomsg::CameraTimerule> & list) { |
| | | const char *topic = DATA_URL_PREFIX("/cameraTimerule/findAll"); |
| | | |
| | | return bus_dbapi_get(handle, topic, message); |
| | | return true; |
| | | } |
| | |
| | | #ifndef C_BHOME_BUS_DBAPI_RULE_H |
| | | #define C_BHOME_BUS_DBAPI_RULE_H |
| | | |
| | | #include <vector> |
| | | #include "proto/x86_64/protomsg.pb.h" |
| | | using namespace std; |
| | | |
| | | bool dbapi_get_time_rules(void *handle, protomsg::CameraTimerule & message); |
| | | bool dbapi_get_time_rules(void *handle, std::vector<protomsg::CameraTimerule> & list); |
| | | |
| | | #endif |