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.

54 lines
942 B
Protocol Buffer

3 years ago
syntax = "proto3";
package grpc;
option go_package = "internal/pkg/grpc";
service monitoring {
rpc ReactorStatusHandler(ReactorStatusPing) returns (ReactorStatusResponse);
3 years ago
}
message ReactorStatusResponse {
int32 id = 1;
2 years ago
repeated DeviceResponse deviceresponse = 2;
repeated SensorResponse sensorresponse = 3;
3 years ago
}
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;
3 years ago
}
message Device {
3 years ago
int32 addr = 1;
string name = 2;
Status status = 3;
string data = 4;
3 years ago
}