saas-smartAi通信协议标准库
gongshangguo
2022-02-28 480b53ec4f00801e91b4c037457a43dd7da9acf3
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
syntax = "proto3";
 
package aiot;
 
import "aiot_common.proto";
 
// 请求的body体
message BusinessReq {
    string topic = 1;
    string authorization = 2;
    bytes req = 3;
}
 
// 响应的body体
message BusinessReply {
    int32 code = 1;
    string msg = 2;
    bool success = 3;
    bytes data = 4;
}
 
service AiotService {
    rpc GetBusiness(BusinessReq) returns (BusinessReply){}
    rpc SendAiotReq(Protocol) returns (Protocol){}
}