65 lines
1.0 KiB
Protocol Buffer
65 lines
1.0 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package ledd;
|
|
|
|
option optimize_for = SPEED;
|
|
|
|
import "rgb.proto";
|
|
import "led.proto";
|
|
import "backend.proto";
|
|
|
|
message Client {
|
|
string type = 1;
|
|
string version = 2;
|
|
}
|
|
|
|
message AddLED {
|
|
string name = 1;
|
|
string backend = 2;
|
|
repeated int32 channel = 3;
|
|
repeated float correction = 4;
|
|
}
|
|
|
|
message RemoveLED {
|
|
string name = 1;
|
|
}
|
|
|
|
message SetLED {
|
|
RGB colour = 2;
|
|
}
|
|
|
|
message GetLED {
|
|
string name = 1;
|
|
}
|
|
|
|
message SetDirect {
|
|
string backend = 1;
|
|
int32 channel = 2;
|
|
int32 value = 3;
|
|
}
|
|
|
|
message RPCResponse {
|
|
enum ResponseType {
|
|
OK = 0;
|
|
ERROR = 1;
|
|
INVALID_REQUEST = 2;
|
|
}
|
|
|
|
ResponseType status = 1;
|
|
string err_msg = 2;
|
|
}
|
|
|
|
message ClientWrapperMessage {
|
|
repeated LED leds = 1;
|
|
repeated Backend backends = 2;
|
|
oneof msg {
|
|
Client m_client = 3;
|
|
AddLED m_add_led = 4;
|
|
RemoveLED m_remove_led = 5;
|
|
SetLED m_set_led = 6;
|
|
GetLED m_get_led = 7;
|
|
SetDirect m_set_direct = 8;
|
|
LedD m_ledd = 9;
|
|
}
|
|
}
|