zhangmeng
2020-08-06 c3d4d0f6ad26e7291d581d24fd64ae55e8f0c1fe
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
syntax = "proto3";
 
package softbus;
 
// 进程基本信息
message ProcInfo{
    string serverID = 1;// 机器ID
    string boardID = 2;// 板卡ID
    string serverIP = 3;// 机器IP
    string procName = 4;// 进程名称
    string procID = 5;// 进程唯一标识
    string procLabel = 6;// 进程的描述信息,用于区分同一进程名称下多个进程
}
 
message RegisterInfo{
    ProcInfo procInfo = 1;// 进程的信息
    repeated string channel = 2;// 新增频道,对应一个新的共享内存队列
    repeated string pubTopic = 3;// 进程对外发布的服务主题
    repeated string subTopic = 4;// 进程订阅的服务主题
}
 
message RegisterInfoReply{
    ProcInfo procInfo = 1;//进程信息
    map<string, int32> channelKey = 2;
    int32 heartbeatKey = 3;
    int32 subTopicKey = 4;
    int32 updateTopicKey = 5;
    int32 replyKey = 6;
    int32 getTopicKey = 7;
}
 
message TopicInfo{
    string topic = 1;
    string topicType = 2;
}
 
message TopicInfoReply{
    TopicInfo info = 1;
    int32 key = 2;
}
 
message HeartbeatInfo {
    string healthLevel = 1;// 健康等级
    int32 fps = 2;// 处理帧率(dec解码帧率、sdk处理帧率)
    string warnInfo = 3;// 报警信息
    string errorInfo = 4;// 错误信息
    bytes otherInfo = 5;// 其他特有信息,如有需要就用这个
    int32 otherInfoSize = 6;// 其他特有信息长度
    ProcInfo procInfo = 7; //进程信息
}
 
message MsgInfo{
    ProcInfo srcProc = 1;// 源进程基本信息
    string msgType = 2;// 数据类型,可为请求、发布、订阅、应答等
    string topic = 3;// 服务主题
    int32 shmKey = 4;// 请求应答数据使用的key,其他数据不用,待确认
    bytes body = 5;// 数据内容,二进制编码后的,需要确定编码类型并解码
    int32 bodyLen = 6;// 数据长度
}