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.

55 lines
1.3 KiB
Protocol Buffer

syntax = "proto3";
package grpc;
option go_package = "internal/pkg/grpc";
service management {
rpc GetDevices(GetDevicesRequest) returns (GetDevicesResponse);
rpc DeleteReactor(DeleteReactorRequest) returns (DeleteReactorResponse);
rpc DeleteReactorDevice(DeleteReactorDeviceRequest) returns (DeleteReactorDeviceResponse);
}
message GetDevicesRequest {
uint32 clientId = 1;
uint32 reactorId = 2; // if unspecified, don't return any devs
bool refresh = 3;
}
message GetDevicesResponse {
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 Dev {
uint32 id = 1; // either reactor id or dev addr
string type = 2; // ["reactor","__ sensor",...]
string status = 3; // set by RLC/SM
string data = 4; // set by RLC/SM
uint32 index = 5; // set by infostream to keep consistency
}