diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..1690023 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "protobuf"] + path = protobuf + url = git@github.com:LED-Freaks/LedD-protobuf.git diff --git a/protobuf b/protobuf new file mode 160000 index 0000000..2d846c1 --- /dev/null +++ b/protobuf @@ -0,0 +1 @@ +Subproject commit 2d846c167db7860a4791d92b55f41655ee5f8158 diff --git a/protobuf/client.proto b/protobuf/client.proto deleted file mode 100644 index 3776283..0000000 --- a/protobuf/client.proto +++ /dev/null @@ -1,34 +0,0 @@ -syntax = "proto3"; - -package ledd; - -message Client { - int32 id = 1; - string address = 2; - int32 max_led = 3; - string name = 4; - string version = 5; - int32 resolution = 6; - int32 port = 7; - - map options = 10; -} - -message Clients { - repeated Client clients = 1; -} - -message ClientSetPercentageAll { - float percentage = 1; - repeated int32 client_id = 2; -} - -message ClientSetLocalDirect { - int32 local_id = 1; - float percentage = 2; -} - -message ClientLEDOptions { - map options = 1; -} - diff --git a/protobuf/hsv.proto b/protobuf/hsv.proto deleted file mode 100644 index 75201a7..0000000 --- a/protobuf/hsv.proto +++ /dev/null @@ -1,9 +0,0 @@ -syntax = "proto3"; - -package ledd; - -message HSV { - float hue = 1; - float sat = 2; - float val = 3; -} \ No newline at end of file diff --git a/protobuf/led.proto b/protobuf/led.proto deleted file mode 100644 index fb8a8f1..0000000 --- a/protobuf/led.proto +++ /dev/null @@ -1,51 +0,0 @@ -syntax = "proto3"; - -package ledd; - -import "hsv.proto"; - -message LED { - string name = 1; - int32 id = 2; - int32 local_id = 3; - int32 client_id = 4; - - map options = 10; -} - -message LEDGroup { - enum GroupType { - RGB = 0; - USER = 1; - } - - string name = 1; - int32 id = 2; - GroupType type = 3; - int32 size = 4; - - repeated int32 led_ids = 10; -} - -message LEDs { - repeated LED leds = 1; -} - -message LEDGroups { - repeated LEDGroup led_groups = 1; -} - -message LEDPercentage { - int32 led = 1; - float percentage = 2; -} - -message LEDGroupColor { - int32 group = 1; - HSV color = 2; -} - -message LEDGroupPercentage { - int32 group = 1; - float perc = 2; -} \ No newline at end of file diff --git a/protobuf/ledd.proto b/protobuf/ledd.proto deleted file mode 100644 index 23a1e30..0000000 --- a/protobuf/ledd.proto +++ /dev/null @@ -1,50 +0,0 @@ -syntax = "proto3"; - -package ledd; - -import "led.proto"; -import "client.proto"; - -message LedD { - string hostname = 1; - string version = 2; -} - -message WrapperMsg { - enum Type { - LED_GET_ALL = 0; - LED_ADD = 1; - CLIENT_ADD = 2; - CLIENT_SET_PERC_ALL = 3; - LED_PERC_SET = 4; - LED_PERC_GET = 5; - CLIENT_LED_SET = 6; - DISCOVER = 7; - CLIENT_GET = 8; - CLIENT_GET_LED_OPTIONS = 9; - CLIENT_SET_LOCAL_DIRECT = 10; - LEDGROUP_GET = 11; - LEDGROUP_GET_ALL = 12; - LEDGROUP_SET_COLOR = 13; - LEDGROUP_ADD = 14; - } - - // Identifies which field is filled in. - Type type = 1; - - // One of the following will be filled in. - LED led = 2; - LEDs leds = 3; - LEDGroup led_group = 4; - LEDGroups led_groups = 5; - LEDPercentage led_perc = 6; - LEDGroupColor led_group_color = 7; - LedD ledd = 8; - Client client = 9; - Clients clients = 10; - ClientSetLocalDirect client_set_direct = 11; - ClientLEDOptions client_led_options = 12; - ClientSetPercentageAll client_set_perc_all = 13; - LEDGroupPercentage led_group_perc = 14; -} -