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.

68 lines
1.4 KiB
Protocol Buffer

syntax = "proto3";
package grpc;
option go_package = "internal/pkg/grpc";
service management {
rpc GetReactors(GetReactorsRequest) returns (GetReactorsResponse);
rpc GetReactorDevices(GetReactorDevicesRequest) returns (GetReactorDevicesResponse);
rpc DeleteReactor(DeleteReactorRequest) returns (DeleteReactorResponse);
rpc DeleteReactorDevice(DeleteReactorDeviceRequest) returns (DeleteReactorDeviceResponse);
}
message GetReactorsRequest {
uint32 clientId = 1;
}
message GetReactorsResponse {
uint32 clientId = 1;
repeated Reactor reactors = 2;
}
message GetReactorDevicesRequest {
uint32 clientId = 1;
uint32 reactorId = 2;
}
message GetReactorDevicesResponse {
uint32 clientId = 1;
uint32 reactorId = 2;
repeated Dev devices = 3;
}
message DeleteReactorRequest {
uint32 clientId = 1;
uint32 reactorId = 2;
}
message DeleteReactorResponse {
uint32 clientId = 1;
uint32 reactorId = 2;
bool success = 3;
}
message DeleteReactorDeviceRequest {
uint32 clientId = 1;
uint32 reactorId = 2;
int32 devAddr = 3;
}
message DeleteReactorDeviceResponse {
uint32 clientId = 1;
uint32 reactorId = 2;
int32 devAddr = 3;
bool success = 4;
}
message Reactor {
uint32 id = 1;
bool status = 2;
}
message Dev {
int32 addr = 1;
string type = 2;
string status = 3;
string data = 4;
}