-
Notifications
You must be signed in to change notification settings - Fork 561
/
Copy pathdata_acquisition_store.proto
337 lines (255 loc) · 8.95 KB
/
data_acquisition_store.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
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
// Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
//
// Downloading, reproducing, distributing or otherwise using the SDK Software
// is subject to the terms and conditions of the Boston Dynamics Software
// Development Kit License (20191101-BDSDK-SL).
syntax = "proto3";
package bosdyn.api;
option java_outer_classname = "DataAcquisitionStoreProto";
import "bosdyn/api/data_chunk.proto";
import "google/protobuf/timestamp.proto";
import "bosdyn/api/header.proto";
import "bosdyn/api/image.proto";
import "bosdyn/api/data_acquisition.proto";
// A query parameter which filters the possible set of data identifiers to those
// which contain the same action/group names matching any of the names in the
// set of CaptureActionIds.
message ActionIdQuery {
// The action ids to filter with.
repeated CaptureActionId action_ids = 1;
}
// A query parameter which filters the possible set of data identifiers to
// those with timestamps within the specified range.
message TimeRangeQuery {
// Start of the time range to query.
google.protobuf.Timestamp from_timestamp = 1;
// End of the time range to query.
google.protobuf.Timestamp to_timestamp = 2;
}
// The message containing the different query parameters which can be applied to
// the ListData requests.
message DataQueryParams {
oneof query {
// Time range to query.
TimeRangeQuery time_range = 1;
// List of action ids to query.
ActionIdQuery action_ids = 2;
}
}
message QueryParameters {
// Time range to query.
TimeRangeQuery time_range = 1;
// List of action ids to query. The constructed query statement will have an OR relation
// between the action_ids specified in this list, with an AND relation for the fields inside
// each action_id. For example, specifying
// [{action_name="action1", group_name="group1"}, {action_name="action2", group_name="group2"}]
// will insert the following in the WHERE part of the query:
// (action_name="action1" AND group_name="group1") OR (action_name="action2" AND
// group_name="group2").
repeated CaptureActionId action_ids = 2;
// Channels to include in the query results. The constructed query statement will have an OR
// relation for all the channel values listed in this field.
repeated string channels = 3;
// Query for captures with id higher or equal to this value. Specifying 0 means that the
// Data Acquisition Store will return all captured data it has. Otherwise, it will return new
// captures stored with an id greater than the value specified in this field.
uint64 captures_from_id = 4;
// Setting this field to true only returns the DataIdentifiers in the response and not the
// actual captures.
bool only_include_identifiers = 5;
// The following fields specify which capture types to include in the results. If none of the
// following fields is specified, then all capture types will be included in the results.
bool include_images = 6;
bool include_data = 7;
bool include_metadata = 8;
bool include_alerts = 9;
// Setting this value will return results that are classified as large data. If this value is
// not set these captures will not be returned even when none of the other captures types are
// set.
bool include_large = 11;
// Boolean that specifies how to order the query results based on capture id field, ascending
// (default) or descending.
// Ascending: Captures with lowest id are first, meaning oldest stored captures are ordered
// first.
// Descending: Captures with highest id are first, meaning newest stored captures are
// ordered first.
bool order_descending = 10;
}
message StoreImageRequest {
// Common request header.
RequestHeader header = 1;
// Image to store.
ImageCapture image = 2;
// Data identifier of the image.
DataIdentifier data_id = 3;
}
message StoreImageResponse {
// Common response header.
ResponseHeader header = 1;
uint64 id = 2;
}
message StoreMetadataRequest {
// Common request header.
RequestHeader header = 1;
// Metadata to store.
AssociatedMetadata metadata = 2;
// Data identifier of the metadata.
DataIdentifier data_id = 3;
}
message StoreMetadataResponse {
// Common response header.
ResponseHeader header = 1;
uint64 id = 2;
}
message StoreAlertDataRequest {
// Common request header.
RequestHeader header = 1;
// AlertData to store.
AssociatedAlertData alert_data = 2;
// Data identifier of the alert.
DataIdentifier data_id = 3;
}
message StoreAlertDataResponse {
// Common response header.
ResponseHeader header = 1;
uint64 id = 2;
}
message StoreDataRequest {
// Common request header.
RequestHeader header = 1;
// Data to store.
bytes data = 2;
// Data identifier of the data.
DataIdentifier data_id = 3;
// File extension to use when writing the data to file.
string file_extension = 4;
}
message StoreDataResponse {
// Common response header.
ResponseHeader header = 1;
uint64 id = 2;
}
message StoreStreamRequest {
// Common request header.
RequestHeader header = 1;
// Data identifier of the data.
DataIdentifier data_id = 2;
// File extension to use when writing the data to file.
string file_extension = 4;
// The piece of the data to store.
DataChunk chunk = 3;
}
message StoreStreamResponse {
// Common response header.
ResponseHeader header = 1;
uint64 id = 2;
}
message ListCaptureActionsRequest {
// Common request header.
RequestHeader header = 1;
// Query parameters for finding action ids.
DataQueryParams query = 2;
}
message ListCaptureActionsResponse {
// Common response header.
ResponseHeader header = 1;
// List of action ids that satisfied the query parameters.
repeated CaptureActionId action_ids = 2;
}
message ListStoredImagesRequest {
// Common request header.
RequestHeader header = 1;
// Query parameters for finding images.
DataQueryParams query = 2;
}
message ListStoredImagesResponse {
// Common response header.
ResponseHeader header = 1;
// List of image data identifiers that satisfied the query parameters.
repeated DataIdentifier data_ids = 2;
}
message ListStoredMetadataRequest {
// Common request header.
RequestHeader header = 1;
// Query parameters for finding metadata.
DataQueryParams query = 2;
}
message ListStoredMetadataResponse {
// Common response header.
ResponseHeader header = 1;
// List of metadata data identifiers that satisfied the query parameters.
repeated DataIdentifier data_ids = 2;
}
message ListStoredAlertDataRequest {
// Common request header.
RequestHeader header = 1;
// Query parameters for finding AlertData.
DataQueryParams query = 2;
}
message ListStoredAlertDataResponse {
// Common response header.
ResponseHeader header = 1;
// List of AlertData data identifiers that satisfied the query parameters.
repeated DataIdentifier data_ids = 2;
}
message ListStoredDataRequest {
// Common request header.
RequestHeader header = 1;
// Query parameters for finding data.
DataQueryParams query = 2;
}
message ListStoredDataResponse {
// Common response header.
ResponseHeader header = 1;
// List of data identifiers that satisfied the query parameters.
repeated DataIdentifier data_ids = 2;
}
message QueryStoredCapturesRequest {
// Common request header.
RequestHeader header = 1;
// Query parameters for finding data.
QueryParameters query = 2;
}
message StoredCapturedData {
bytes data = 1;
// File extension to use for writing the data to a file.
string file_extension = 2;
}
message StoredLargeCapturedData {
// Data related to capture.
DataChunk chunk = 1;
// Start index of resulting bytes.
uint64 offset = 2;
// File extension to use for writing the data to a file.
string file_extension = 3;
}
message QueryStoredCaptureResult {
DataIdentifier data_id = 1;
oneof result {
ImageCapture image = 3;
AssociatedMetadata metadata = 4;
AssociatedAlertData alert_data = 5;
StoredCapturedData data = 6;
StoredLargeCapturedData large_data = 7;
}
}
message QueryStoredCapturesResponse {
// Common response header.
ResponseHeader header = 1;
// CaptureActionIds that match the query parameters and are included in the results.
repeated CaptureActionId action_ids = 2;
// Results that match the query parameters.
repeated QueryStoredCaptureResult results = 3;
// Max capture_id in the database matching the query parameters.
uint64 max_capture_id = 4;
}
message QueryMaxCaptureIdRequest {
// Common request header.
RequestHeader header = 1;
// Query parameters for finding data.
QueryParameters query = 2;
}
message QueryMaxCaptureIdResponse {
ResponseHeader header = 1;
uint64 max_capture_id = 2;
}