zhangzengfei
2023-01-11 c4d21b97b8a9eedd485efd026395a1007342c3da
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#include <stdio.h>
 
#include <vector>
#include <string>
#include <thread>
#include <memory>
using namespace std;
 
#include "3rdparty/bus_client/cbhomeclient.h"
#include "3rdparty/bus_client/message.h"
 
#include "sysset.h"
#include "proto/x86_64/sysset.pb.h"
 
 
int main(int argc, char const *argv[])
{
    // 初始化bus
    creg* reg = make_creg_from_cproc(make_cproc("request", "requestid"));
 
    printf("make_creg_from_cproc\n");
 
    void* handle = bus_client_init(NULL, 0, reg);
    creg_free(reg);
 
    printf("bus_client_init end\n");
 
 
    // 接口测试
    protomsg::LocalConfig node;
    if (dbapi_get_server_info(handle, node)) {
        printf("LocalConfig: %s\n", node.alarm_ip().c_str());
    }
 
    printf("bus_dbapi_get_server_info end\n");
 
    return 0;
}