-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathTrafikVerketExample.proto
More file actions
45 lines (33 loc) · 1.02 KB
/
TrafikVerketExample.proto
File metadata and controls
45 lines (33 loc) · 1.02 KB
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
syntax = "proto3";
package trafikverket;
import "google/protobuf/timestamp.proto";
option csharp_namespace = "Grpcsample";
message WeatherMeasurepoint {
string name = 1;
int32 id = 2;
double Observation_Air_Temperature = 3;
google.protobuf.Timestamp last_update = 4;
}
message WeatherMeasurepointList {
repeated WeatherMeasurepoint points = 1;
}
message WeatherMeasurepointRequest {
repeated int32 ids = 1;
}
message AddWeatherMeasurepointResponse {
bool successful = 1;
}
message CameraRequest {
int32 id = 1;
}
message CameraResponse {
bytes image = 1;
}
service WeatherService {
// delivers WeatherMeasurePoints for given list of ids
rpc GetWeatherMeasurepoint(WeatherMeasurepointRequest) returns (WeatherMeasurepointList);
// adds a new set of measurements
rpc AddWeatherMeasurepoint(WeatherMeasurepointList) returns (AddWeatherMeasurepointResponse);
// gets details and latest image from camera with id
rpc GetCameraData(CameraRequest) returns (CameraResponse);
}