saas-smartAi通信协议标准库
gongshangguo
2022-03-02 cb8a046f1d84198b6bbddb1481667b905ea522bf
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: aiot_business.proto
 
package aiot
 
import (
    fmt "fmt"
    proto "github.com/golang/protobuf/proto"
    math "math"
)
 
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
 
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
 
// 请求类型
type RequestType int32
 
const (
    // 同步请求 默认
    RequestType_sync RequestType = 0
    // 异步请求
    RequestType_Async RequestType = 1
)
 
var RequestType_name = map[int32]string{
    0: "sync",
    1: "Async",
}
 
var RequestType_value = map[string]int32{
    "sync":  0,
    "Async": 1,
}
 
func (x RequestType) String() string {
    return proto.EnumName(RequestType_name, int32(x))
}
 
func (RequestType) EnumDescriptor() ([]byte, []int) {
    return fileDescriptor_29eca6d4b33e7fd8, []int{0}
}
 
// 请求的body体
type NodeReq struct {
    // 请求的topic url
    Topic string `protobuf:"bytes,1,opt,name=topic,proto3" json:"topic,omitempty"`
    // token
    Authorization string `protobuf:"bytes,2,opt,name=authorization,proto3" json:"authorization,omitempty"`
    // 请求指向的ip
    Ip string `protobuf:"bytes,3,opt,name=ip,proto3" json:"ip,omitempty"`
    // 请求的端口 保留字段
    Port string `protobuf:"bytes,4,opt,name=port,proto3" json:"port,omitempty"`
    // 请求的同步/异步类型
    SyncType RequestType `protobuf:"varint,5,opt,name=syncType,proto3,enum=aiot.RequestType" json:"syncType,omitempty"`
    // 请求业务参数
    Req                  []byte   `protobuf:"bytes,6,opt,name=req,proto3" json:"req,omitempty"`
    XXX_NoUnkeyedLiteral struct{} `json:"-"`
    XXX_unrecognized     []byte   `json:"-"`
    XXX_sizecache        int32    `json:"-"`
}
 
func (m *NodeReq) Reset()         { *m = NodeReq{} }
func (m *NodeReq) String() string { return proto.CompactTextString(m) }
func (*NodeReq) ProtoMessage()    {}
func (*NodeReq) Descriptor() ([]byte, []int) {
    return fileDescriptor_29eca6d4b33e7fd8, []int{0}
}
 
func (m *NodeReq) XXX_Unmarshal(b []byte) error {
    return xxx_messageInfo_NodeReq.Unmarshal(m, b)
}
func (m *NodeReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    return xxx_messageInfo_NodeReq.Marshal(b, m, deterministic)
}
func (m *NodeReq) XXX_Merge(src proto.Message) {
    xxx_messageInfo_NodeReq.Merge(m, src)
}
func (m *NodeReq) XXX_Size() int {
    return xxx_messageInfo_NodeReq.Size(m)
}
func (m *NodeReq) XXX_DiscardUnknown() {
    xxx_messageInfo_NodeReq.DiscardUnknown(m)
}
 
var xxx_messageInfo_NodeReq proto.InternalMessageInfo
 
func (m *NodeReq) GetTopic() string {
    if m != nil {
        return m.Topic
    }
    return ""
}
 
func (m *NodeReq) GetAuthorization() string {
    if m != nil {
        return m.Authorization
    }
    return ""
}
 
func (m *NodeReq) GetIp() string {
    if m != nil {
        return m.Ip
    }
    return ""
}
 
func (m *NodeReq) GetPort() string {
    if m != nil {
        return m.Port
    }
    return ""
}
 
func (m *NodeReq) GetSyncType() RequestType {
    if m != nil {
        return m.SyncType
    }
    return RequestType_sync
}
 
func (m *NodeReq) GetReq() []byte {
    if m != nil {
        return m.Req
    }
    return nil
}
 
// 集群请求参数
type ClusterReq struct {
    // 集群ID
    ClusterId string `protobuf:"bytes,1,opt,name=ClusterId,proto3" json:"ClusterId,omitempty"`
    // token
    Authorization string `protobuf:"bytes,2,opt,name=authorization,proto3" json:"authorization,omitempty"`
    // 请求的同步/异步类型
    SyncType RequestType `protobuf:"varint,3,opt,name=syncType,proto3,enum=aiot.RequestType" json:"syncType,omitempty"`
    // 请求业务参数
    Req                  []byte   `protobuf:"bytes,4,opt,name=req,proto3" json:"req,omitempty"`
    XXX_NoUnkeyedLiteral struct{} `json:"-"`
    XXX_unrecognized     []byte   `json:"-"`
    XXX_sizecache        int32    `json:"-"`
}
 
func (m *ClusterReq) Reset()         { *m = ClusterReq{} }
func (m *ClusterReq) String() string { return proto.CompactTextString(m) }
func (*ClusterReq) ProtoMessage()    {}
func (*ClusterReq) Descriptor() ([]byte, []int) {
    return fileDescriptor_29eca6d4b33e7fd8, []int{1}
}
 
func (m *ClusterReq) XXX_Unmarshal(b []byte) error {
    return xxx_messageInfo_ClusterReq.Unmarshal(m, b)
}
func (m *ClusterReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    return xxx_messageInfo_ClusterReq.Marshal(b, m, deterministic)
}
func (m *ClusterReq) XXX_Merge(src proto.Message) {
    xxx_messageInfo_ClusterReq.Merge(m, src)
}
func (m *ClusterReq) XXX_Size() int {
    return xxx_messageInfo_ClusterReq.Size(m)
}
func (m *ClusterReq) XXX_DiscardUnknown() {
    xxx_messageInfo_ClusterReq.DiscardUnknown(m)
}
 
var xxx_messageInfo_ClusterReq proto.InternalMessageInfo
 
func (m *ClusterReq) GetClusterId() string {
    if m != nil {
        return m.ClusterId
    }
    return ""
}
 
func (m *ClusterReq) GetAuthorization() string {
    if m != nil {
        return m.Authorization
    }
    return ""
}
 
func (m *ClusterReq) GetSyncType() RequestType {
    if m != nil {
        return m.SyncType
    }
    return RequestType_sync
}
 
func (m *ClusterReq) GetReq() []byte {
    if m != nil {
        return m.Req
    }
    return nil
}
 
// 设备列表请求参数
type NodesReq struct {
    // 设备列表ID
    NodeIds []string `protobuf:"bytes,1,rep,name=NodeIds,proto3" json:"NodeIds,omitempty"`
    // token
    Authorization string `protobuf:"bytes,2,opt,name=authorization,proto3" json:"authorization,omitempty"`
    // 请求的同步/异步类型
    SyncType RequestType `protobuf:"varint,3,opt,name=syncType,proto3,enum=aiot.RequestType" json:"syncType,omitempty"`
    // 请求业务参数
    Req                  []byte   `protobuf:"bytes,4,opt,name=req,proto3" json:"req,omitempty"`
    XXX_NoUnkeyedLiteral struct{} `json:"-"`
    XXX_unrecognized     []byte   `json:"-"`
    XXX_sizecache        int32    `json:"-"`
}
 
func (m *NodesReq) Reset()         { *m = NodesReq{} }
func (m *NodesReq) String() string { return proto.CompactTextString(m) }
func (*NodesReq) ProtoMessage()    {}
func (*NodesReq) Descriptor() ([]byte, []int) {
    return fileDescriptor_29eca6d4b33e7fd8, []int{2}
}
 
func (m *NodesReq) XXX_Unmarshal(b []byte) error {
    return xxx_messageInfo_NodesReq.Unmarshal(m, b)
}
func (m *NodesReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    return xxx_messageInfo_NodesReq.Marshal(b, m, deterministic)
}
func (m *NodesReq) XXX_Merge(src proto.Message) {
    xxx_messageInfo_NodesReq.Merge(m, src)
}
func (m *NodesReq) XXX_Size() int {
    return xxx_messageInfo_NodesReq.Size(m)
}
func (m *NodesReq) XXX_DiscardUnknown() {
    xxx_messageInfo_NodesReq.DiscardUnknown(m)
}
 
var xxx_messageInfo_NodesReq proto.InternalMessageInfo
 
func (m *NodesReq) GetNodeIds() []string {
    if m != nil {
        return m.NodeIds
    }
    return nil
}
 
func (m *NodesReq) GetAuthorization() string {
    if m != nil {
        return m.Authorization
    }
    return ""
}
 
func (m *NodesReq) GetSyncType() RequestType {
    if m != nil {
        return m.SyncType
    }
    return RequestType_sync
}
 
func (m *NodesReq) GetReq() []byte {
    if m != nil {
        return m.Req
    }
    return nil
}
 
// 响应的body体
type BusinessReply struct {
    // 返回的错误码
    Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
    // 错误信息
    Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"`
    // 是否success
    Success bool `protobuf:"varint,3,opt,name=success,proto3" json:"success,omitempty"`
    // 返回结果
    Data                 []byte   `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"`
    XXX_NoUnkeyedLiteral struct{} `json:"-"`
    XXX_unrecognized     []byte   `json:"-"`
    XXX_sizecache        int32    `json:"-"`
}
 
func (m *BusinessReply) Reset()         { *m = BusinessReply{} }
func (m *BusinessReply) String() string { return proto.CompactTextString(m) }
func (*BusinessReply) ProtoMessage()    {}
func (*BusinessReply) Descriptor() ([]byte, []int) {
    return fileDescriptor_29eca6d4b33e7fd8, []int{3}
}
 
func (m *BusinessReply) XXX_Unmarshal(b []byte) error {
    return xxx_messageInfo_BusinessReply.Unmarshal(m, b)
}
func (m *BusinessReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    return xxx_messageInfo_BusinessReply.Marshal(b, m, deterministic)
}
func (m *BusinessReply) XXX_Merge(src proto.Message) {
    xxx_messageInfo_BusinessReply.Merge(m, src)
}
func (m *BusinessReply) XXX_Size() int {
    return xxx_messageInfo_BusinessReply.Size(m)
}
func (m *BusinessReply) XXX_DiscardUnknown() {
    xxx_messageInfo_BusinessReply.DiscardUnknown(m)
}
 
var xxx_messageInfo_BusinessReply proto.InternalMessageInfo
 
func (m *BusinessReply) GetCode() int32 {
    if m != nil {
        return m.Code
    }
    return 0
}
 
func (m *BusinessReply) GetMsg() string {
    if m != nil {
        return m.Msg
    }
    return ""
}
 
func (m *BusinessReply) GetSuccess() bool {
    if m != nil {
        return m.Success
    }
    return false
}
 
func (m *BusinessReply) GetData() []byte {
    if m != nil {
        return m.Data
    }
    return nil
}
 
func init() {
    proto.RegisterEnum("aiot.RequestType", RequestType_name, RequestType_value)
    proto.RegisterType((*NodeReq)(nil), "aiot.NodeReq")
    proto.RegisterType((*ClusterReq)(nil), "aiot.ClusterReq")
    proto.RegisterType((*NodesReq)(nil), "aiot.NodesReq")
    proto.RegisterType((*BusinessReply)(nil), "aiot.BusinessReply")
}
 
func init() {
    proto.RegisterFile("aiot_business.proto", fileDescriptor_29eca6d4b33e7fd8)
}
 
var fileDescriptor_29eca6d4b33e7fd8 = []byte{
    // 412 bytes of a gzipped FileDescriptorProto
    0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x93, 0xb1, 0xce, 0xd3, 0x30,
    0x10, 0xc7, 0xeb, 0x26, 0xf9, 0x48, 0xae, 0xa4, 0xea, 0xe7, 0x8f, 0xc1, 0xaa, 0x18, 0xa2, 0x88,
    0x21, 0x42, 0xa2, 0x48, 0x85, 0x81, 0xf5, 0x83, 0xa9, 0x0b, 0x42, 0x6e, 0x77, 0x94, 0x3a, 0x16,
    0x58, 0x6a, 0xe3, 0x34, 0x76, 0x90, 0xca, 0x2b, 0x30, 0xf1, 0x1a, 0x3c, 0x16, 0x4f, 0x82, 0xce,
    0x4e, 0x68, 0x8b, 0x54, 0xa9, 0x13, 0xdb, 0xfd, 0xef, 0x7c, 0xfd, 0xff, 0x7a, 0x77, 0x81, 0x87,
    0x52, 0x69, 0xfb, 0x79, 0xdb, 0x19, 0x55, 0x4b, 0x63, 0x16, 0x4d, 0xab, 0xad, 0xa6, 0x21, 0x26,
    0xe7, 0xf7, 0xae, 0x24, 0xf4, 0x7e, 0xaf, 0x6b, 0x5f, 0xc8, 0x7f, 0x11, 0x78, 0xf2, 0x51, 0x57,
    0x92, 0xcb, 0x03, 0x7d, 0x06, 0x91, 0xd5, 0x8d, 0x12, 0x8c, 0x64, 0xa4, 0x48, 0xb8, 0x17, 0xf4,
    0x05, 0xa4, 0x65, 0x67, 0xbf, 0xea, 0x56, 0x7d, 0x2f, 0xad, 0xd2, 0x35, 0x1b, 0xbb, 0xea, 0x65,
    0x92, 0x4e, 0x61, 0xac, 0x1a, 0x16, 0xb8, 0xd2, 0x58, 0x35, 0x94, 0x42, 0xd8, 0xe8, 0xd6, 0xb2,
    0xd0, 0x65, 0x5c, 0x4c, 0x5f, 0x41, 0x6c, 0x8e, 0xb5, 0xd8, 0x1c, 0x1b, 0xc9, 0xa2, 0x8c, 0x14,
    0xd3, 0xe5, 0xfd, 0x02, 0x89, 0x16, 0x5c, 0x1e, 0x3a, 0x69, 0x2c, 0x16, 0xf8, 0xdf, 0x27, 0x74,
    0x06, 0x41, 0x2b, 0x0f, 0xec, 0x2e, 0x23, 0xc5, 0x53, 0x8e, 0x61, 0xfe, 0x93, 0x00, 0x7c, 0xd8,
    0x75, 0xc6, 0xca, 0x16, 0x79, 0x9f, 0x43, 0xd2, 0xab, 0x55, 0xd5, 0x33, 0x9f, 0x12, 0x37, 0x72,
    0x9f, 0x33, 0x05, 0x37, 0x33, 0x85, 0x27, 0xa6, 0x1f, 0x04, 0x62, 0x1c, 0xa0, 0x41, 0x22, 0xe6,
    0x87, 0xb9, 0xaa, 0x0c, 0x23, 0x59, 0x50, 0x24, 0x7c, 0x90, 0xff, 0x8b, 0x46, 0x40, 0xfa, 0xbe,
    0xdf, 0x3c, 0x97, 0xcd, 0xee, 0x88, 0x7b, 0x10, 0xba, 0x92, 0x6e, 0x3c, 0x11, 0x77, 0x31, 0xb6,
    0xed, 0xcd, 0x97, 0x9e, 0x00, 0x43, 0xe4, 0x36, 0x9d, 0x10, 0xd2, 0x18, 0x67, 0x1b, 0xf3, 0x41,
    0x62, 0x7f, 0x55, 0xda, 0xb2, 0xf7, 0x70, 0xf1, 0xcb, 0x1c, 0x26, 0x67, 0x3c, 0x34, 0x86, 0x10,
    0x89, 0x66, 0x23, 0x9a, 0x40, 0xf4, 0xe8, 0x42, 0xb2, 0xfc, 0x4d, 0x60, 0xf2, 0xa8, 0xb4, 0x5d,
    0xcb, 0xf6, 0x9b, 0x12, 0x92, 0x2e, 0x01, 0xd6, 0xb2, 0xae, 0x36, 0x1a, 0x07, 0x42, 0x53, 0xff,
    0xaf, 0xfa, 0xc3, 0x9b, 0x3f, 0x78, 0x79, 0x41, 0x9e, 0x8f, 0xe8, 0x6b, 0x98, 0x60, 0x0f, 0xfe,
    0x0c, 0x0e, 0x77, 0xea, 0x5f, 0x7d, 0xc2, 0xbb, 0x15, 0x7a, 0x37, 0xff, 0x47, 0xe7, 0x23, 0xfa,
    0x0e, 0x52, 0x6f, 0xd2, 0x5f, 0x01, 0x9d, 0xf9, 0x27, 0xa7, 0x9b, 0xb9, 0x66, 0xf5, 0xd6, 0x5b,
    0x79, 0x3c, 0x33, 0x58, 0x0d, 0x7b, 0xbd, 0xd2, 0xb5, 0xbd, 0x73, 0xdf, 0xd0, 0x9b, 0x3f, 0x01,
    0x00, 0x00, 0xff, 0xff, 0xe4, 0x20, 0xab, 0x58, 0x73, 0x03, 0x00, 0x00,
}