saas-smartAi通信协议标准库
gongshangguo
2022-03-04 16e34995996fc5884de58b01286e34a4e3bc75d0
aiotProto/aiot/aiot_business.proto
@@ -12,44 +12,81 @@
    Async = 1;
}
// 请求方式
enum RequestMethod{
    // 默认
    MethodDefault = 0;
    // post请求
    Post = 1;
    // get请求
    Get = 2;
    // put请求
    Put = 3;
    // delete请求
    Delete = 4;
}
// 请求header
enum RequestContentType{
    ContentTypeDefault = 0;
    ApplicationJson = 1;
    ApplicationXWwwFormUrlencoded = 2;
    MultipartFormData = 3;
    ApplicationXml = 4;
}
// 请求的body体
message NodeReq {
    // 请求的topic url
    string topic = 1;
    // 节点ID
    string nodeId = 2;
    // token
    string authorization = 2;
    string authorization = 3;
    // 请求指向的ip
    string ip = 3;
    string ip = 4;
    // 请求的端口 保留字段
    string port = 4;
    string port = 5;
    // 请求的同步/异步类型
    RequestType syncType = 5;
    RequestType syncType = 6;
    // method
    RequestMethod method = 7;
    // content-type
    RequestContentType contentType = 8;
    // 请求业务参数
    bytes req = 6;
    bytes req = 9;
}
// 集群请求参数
message ClusterReq{
    // 集群ID
    string ClusterId = 1;
    string clusterId = 1;
    // token
    string authorization = 2;
    // 请求的同步/异步类型
    RequestType syncType = 3;
    // method
    RequestMethod method = 4;
    // content-type
    RequestContentType contentType = 5;
    // 请求业务参数
    bytes req = 4;
    bytes req = 6;
}
// 设备列表请求参数
message NodesReq{
    // 设备列表ID
    repeated string NodeIds = 1;
    repeated string nodeIds = 1;
    // token
    string authorization = 2;
    // 请求的同步/异步类型
    RequestType syncType = 3;
    // method
    RequestMethod method = 4;
    // content-type
    RequestContentType contentType = 5;
    // 请求业务参数
    bytes req = 4;
    bytes req = 6;
}
// 响应的body体