You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
syntax = "proto3";
|
|
|
|
package grpc;
|
|
|
|
|
|
|
|
option go_package = "internal/pkg/grpc";
|
|
|
|
|
|
|
|
service monitoring {
|
|
|
|
rpc ReactorStatusHandler(ReactorStatusPing) returns (ReactorStatusResponse);
|
|
|
|
}
|
|
|
|
|
|
|
|
message ReactorStatusResponse {
|
|
|
|
int32 id = 1;
|
|
|
|
repeated DeviceResponse = 2;
|
|
|
|
repeated SensorResponse = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
message DeviceResponse {
|
|
|
|
int32 id = 1;
|
|
|
|
string name = 2;
|
|
|
|
map<string,string> updates = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
message SensorResponse {
|
|
|
|
int32 id = 1;
|
|
|
|
string name = 2;
|
|
|
|
int32 sampleRate = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
message ReactorStatusPing {
|
|
|
|
int32 id = 1;
|
|
|
|
repeated Sensor sensors = 2;
|
|
|
|
repeated Device devices = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
enum Status {
|
|
|
|
DEAD = 0;
|
|
|
|
ALIVE = 1;
|
|
|
|
UNKOWN = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Sensor {
|
|
|
|
int32 addr = 1;
|
|
|
|
string name = 2;
|
|
|
|
Status status = 3;
|
|
|
|
int32 sampleRate = 4;
|
|
|
|
string data = 5;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Device {
|
|
|
|
int32 addr = 1;
|
|
|
|
string name = 2;
|
|
|
|
Status status = 3;
|
|
|
|
string data = 4;
|
|
|
|
}
|