-
Notifications
You must be signed in to change notification settings - Fork 20
/
broker.proto
96 lines (81 loc) · 3.04 KB
/
broker.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
/********************************************************************************
* Copyright (c) 2022 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
*
* This program and the accompanying materials are made available under the
* terms of the Apache License 2.0 which is available at
* http://www.apache.org/licenses/LICENSE-2.0
*
* SPDX-License-Identifier: Apache-2.0
********************************************************************************/
syntax = "proto3";
package sdv.databroker.v1;
import "sdv/databroker/v1/types.proto";
service Broker {
// Request a set of datapoints (values)
//
// Returns a list of requested data points.
//
// InvalidArgument is returned if the request is malformed.
rpc GetDatapoints(GetDatapointsRequest) returns (GetDatapointsReply);
// Set a datapoint (values)
rpc SetDatapoints(SetDatapointsRequest) returns (SetDatapointsReply);
// Subscribe to a set of data points or conditional expressions
// using the Data Broker Query Syntax (described in QUERY.md)
//
// Returns a stream of replies.
//
// InvalidArgument is returned if the request is malformed.
rpc Subscribe(SubscribeRequest) returns (stream SubscribeReply);
// Request the metadata of a set of datapoints
//
// Returns metadata of the requested data points that exist.
rpc GetMetadata(GetMetadataRequest) returns (GetMetadataReply);
}
message GetDatapointsRequest {
// A list of requested data points.
repeated string datapoints = 1;
}
message GetDatapointsReply {
// Contains the values of the requested data points.
// If a requested data point is not available, the corresponding Datapoint
// will have the respective failure value set.
map<string, Datapoint> datapoints = 1;
}
message SetDatapointsRequest {
// A map of data points to set
map<string, Datapoint> datapoints = 1;
}
message SetDatapointsReply {
// A map of errors (if any)
map<string, DatapointError> errors = 1;
}
message SubscribeRequest {
// Subscribe to a set of data points (or expressions) described
// by the provided query.
// The query syntax is a subset of SQL and is described in more
// detail in the QUERY.md file.
string query = 2;
}
message SubscribeReply {
// Contains the fields specified by the query.
// If a requested data point value is not available, the corresponding
// Datapoint will have it's respective failure value set.
map<string, Datapoint> fields = 1;
}
message GetMetadataRequest {
// Request metadata for a list of data points referenced by their names.
// e.g. "Vehicle.Cabin.Seat.Row1.Pos1.Position" or "Vehicle.Speed".
//
// If no names are provided, metadata for all known data points will be
// returned.
repeated string names = 1;
}
message GetMetadataReply {
// Contains metadata of the requested data points. If a data point
// doesn't exist (i.e. not known to the Data Broker) the corresponding
// Metadata isn't part of the returned list.
repeated Metadata list = 1;
}