Reworked protocol to fit new simplified approch (first rough concept)
This commit is contained in:
60
client.proto
60
client.proto
@@ -2,28 +2,56 @@ syntax = "proto3";
|
||||
|
||||
package ledd;
|
||||
|
||||
import "hcl.proto";
|
||||
import "led.proto";
|
||||
|
||||
message Client {
|
||||
int32 max_led = 3;
|
||||
string name = 4;
|
||||
string platform = 5;
|
||||
string version = 6;
|
||||
int32 resolution = 7;
|
||||
int32 port = 8;
|
||||
|
||||
map<string, string> options = 10;
|
||||
string type = 1;
|
||||
}
|
||||
|
||||
message ClientSetPercentageAll {
|
||||
float percentage = 1;
|
||||
repeated int32 client_id = 2;
|
||||
message AddLED {
|
||||
string name = 1;
|
||||
string backend = 2;
|
||||
repeated int32 channel = 3;
|
||||
}
|
||||
|
||||
message ClientSetLocalDirect {
|
||||
int32 local_id = 1;
|
||||
float percentage = 2;
|
||||
message RemoveLED {
|
||||
string name = 1;
|
||||
}
|
||||
|
||||
message ClientLEDOptions {
|
||||
map<string, string> options = 1;
|
||||
message SetLED {
|
||||
string name = 1;
|
||||
HCL colour = 2;
|
||||
}
|
||||
|
||||
message GetLED {
|
||||
string name = 1;
|
||||
}
|
||||
|
||||
message SetDirect {
|
||||
string backend = 1;
|
||||
int32 channel = 2;
|
||||
}
|
||||
|
||||
message RPCResponse {
|
||||
enum ResponseType {
|
||||
OK = 0;
|
||||
ERROR = 1;
|
||||
INVALID_REQUEST = 2;
|
||||
}
|
||||
|
||||
ResponseType status = 1;
|
||||
string err_msg = 2;
|
||||
}
|
||||
|
||||
message ClientWrapperMessage {
|
||||
repeated LED leds = 1;
|
||||
oneof msg {
|
||||
Client m_client = 2;
|
||||
AddLED m_add_led = 3;
|
||||
RemoveLED m_remove_led = 4;
|
||||
SetLED m_set_led = 5;
|
||||
GetLED m_get_led = 6;
|
||||
SetDirect m_set_direct = 7;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user