This repository has been archived by the owner on Mar 18, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
/
VISSv2messages.proto
215 lines (184 loc) · 5.25 KB
/
VISSv2messages.proto
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
syntax = "proto3";
package protobufMessages;
//import "google/protobuf/timestamp.proto";
option go_package = "./";
enum MessageMethod {
GET = 0;
SET = 1;
SUBSCRIBE = 2;
UNSUBSCRIBE = 3;
}
enum MessageType {
REQUEST = 0;
RESPONSE = 1;
NOTIFICATION = 2;
}
enum ResponseStatus {
SUCCESS = 0;
ERROR = 1;
}
message ErrorResponseMessage {
string Number = 1;
optional string Reason = 2;
optional string Message = 3;
}
message FilterExpressions {
message FilterExpression {
enum FilterType {
PATHS = 0;
TIMEBASED = 1;
RANGE = 2;
CHANGE = 3;
CURVELOG = 4;
HISTORY = 5;
STATIC_METADATA = 6;
DYNAMIC_METADATA = 7;
}
FilterType FType = 1;
message FilterValue {
message PathsValue {
repeated string RelativePath = 1;
}
optional PathsValue ValuePaths = 1;
message TimebasedValue {
string Period = 1;
}
optional TimebasedValue ValueTimebased = 2;
message RangeValue {
string LogicOperator = 1;
string Boundary = 2;
}
repeated RangeValue ValueRange = 3;
message ChangeValue {
string LogicOperator = 1;
string Diff = 2;
}
optional ChangeValue ValueChange = 4;
message CurvelogValue {
string MaxErr = 1;
string BufSize = 2;
}
optional CurvelogValue ValueCurvelog = 5;
message HistoryValue {
string TimePeriod = 1; //ISO8601 period expression
}
optional HistoryValue ValueHistory = 6;
message StaticMetadataValue {
string Tree = 1;
}
optional StaticMetadataValue ValueStaticMetadata = 7;
message DynamicMetadataValue {
string MetadataDomain = 1;
}
optional DynamicMetadataValue ValueDynamicMetadata = 8;
}
FilterValue Value = 2;
}
repeated FilterExpression FilterExp = 1;
}
message DataPackages {
message DataPackage {
optional string Path = 1;
optional int32 PathC = 2;
message DataPoint {
string Value = 1;
optional string Ts = 2;
optional int32 TsC = 3;
}
repeated DataPoint Dp = 3;
}
repeated DataPackage Data = 1;
}
message GetMessage {
MessageType MType = 1;
message RequestMessage {
string Path = 1;
optional FilterExpressions Filter = 2;
optional string Authorization = 3;
optional string RequestId = 4;
}
optional RequestMessage Request = 2;
message ResponseMessage {
ResponseStatus Status = 1;
message SuccessResponseMessage {
optional DataPackages DataPack = 1;
optional string Metadata = 2; // replaces DataPack in static metadata and one dynamic metadata variant
}
optional SuccessResponseMessage SuccessResponse = 2;
optional ErrorResponseMessage ErrorResponse = 3;
optional string RequestId = 4;
optional string Ts = 5;
optional int32 TsC = 6;
}
optional ResponseMessage Response = 3;
}
message SetMessage {
MessageType MType = 1;
message RequestMessage {
string Path = 1;
string Value = 2;
optional string Authorization = 3;
optional string RequestId = 4;
}
optional RequestMessage Request = 2;
message ResponseMessage {
ResponseStatus Status = 1;
optional ErrorResponseMessage ErrorResponse = 2;
optional string RequestId = 3;
string Ts = 4;
}
optional ResponseMessage Response = 3;
}
message SubscribeMessage {
MessageType MType = 1;
message RequestMessage {
string Path = 1;
optional FilterExpressions Filter = 2;
optional string Authorization = 3;
string RequestId = 4;
}
optional RequestMessage Request = 2;
message ResponseMessage {
ResponseStatus Status = 1;
optional ErrorResponseMessage ErrorResponse = 2;
string SubscriptionId = 3;
string RequestId = 4;
string Ts = 5;
}
optional ResponseMessage Response = 3;
message NotificationMessage {
string SubscriptionId = 1;
ResponseStatus Status = 2;
message SuccessResponseMessage {
DataPackages DataPack = 1;
}
optional SuccessResponseMessage SuccessResponse = 3;
optional ErrorResponseMessage ErrorResponse = 4;
optional string Ts = 5;
optional int32 TsC = 6;
}
optional NotificationMessage Notification = 4;
}
message UnSubscribeMessage {
MessageType MType = 1;
message RequestMessage {
string SubscriptionId = 1;
optional string RequestId = 2;
}
optional RequestMessage Request = 2;
message ResponseMessage {
string SubscriptionId = 1;
ResponseStatus Status = 2;
optional ErrorResponseMessage ErrorResponse = 3;
optional string RequestId = 4;
string Ts = 5;
}
optional ResponseMessage Response = 3;
}
message ProtobufMessage {
MessageMethod Method = 1;
optional GetMessage Get = 2;
optional SetMessage Set = 3;
optional SubscribeMessage Subscribe = 4;
optional UnSubscribeMessage UnSubscribe = 5;
}