-
Notifications
You must be signed in to change notification settings - Fork 0
/
mqtt-grpc-device.proto
59 lines (50 loc) · 1.25 KB
/
mqtt-grpc-device.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
syntax = "proto3";
option csharp_namespace = "mqtt_grpc_device_protos";
import "google/protobuf/timestamp.proto";
import "google/protobuf/any.proto";
// @topic: -> grpc/{clientId}/tel[/{telName}]
message Telemetries {
double temperature = 1;
double workingSet = 2;
}
// @topic: -> grpc/{clientId}/props[/{propName}]
message Properties {
string sdkInfo = 1;
google.protobuf.Timestamp started = 2;
int32 interval = 3;
}
// @topic: <- grpc/{clientId}/props[/{propName}]/set
// @topic: -> grpc/{clientId}/props[/{propName}]/ack
service PropertiesSetter {
rpc set_interval(Properties) returns (ack);
}
// @topic: <- grpc/{clientId}/cmd/{cmdName}
// @topic: -> grpc/{clientId}/cmd/{cmdName}/resp
service Commands {
rpc echo(echoRequest) returns (echoResponse);
rpc getRuntimeStats(getRuntimeStatsRequest) returns (getRuntimeStatsResponse);
}
message ack {
int32 status = 1;
string description = 2;
google.protobuf.Any value =3;
}
message echoRequest {
string inEcho = 1;
}
message echoResponse {
int32 status = 1;
string outEcho = 2;
}
enum getRuntimeStatsMode {
BASIC = 0;
NORMAL = 1;
FULL = 2;
}
message getRuntimeStatsRequest {
getRuntimeStatsMode mode = 1;
}
message getRuntimeStatsResponse {
int32 status = 1;
map<string,string> diagResults = 2;
}