message.proto 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. syntax = "proto2";
  2. package proto;
  3. message HyperionRequest {
  4. enum Command {
  5. COLOR = 1;
  6. IMAGE = 2;
  7. CLEAR = 3;
  8. CLEARALL = 4;
  9. }
  10. // command specification
  11. required Command command = 1;
  12. // extensions to define all specific requests
  13. extensions 10 to 100;
  14. }
  15. message ColorRequest {
  16. extend HyperionRequest {
  17. optional ColorRequest colorRequest = 10;
  18. }
  19. // priority to use when setting the color
  20. required int32 priority = 1;
  21. // integer value containing the rgb color (0x00RRGGBB)
  22. required int32 RgbColor = 2;
  23. // duration of the request (negative results in infinite)
  24. optional int32 duration = 3;
  25. }
  26. message ImageRequest {
  27. extend HyperionRequest {
  28. optional ImageRequest imageRequest = 11;
  29. }
  30. // priority to use when setting the image
  31. required int32 priority = 1;
  32. // width of the image
  33. required int32 imagewidth = 2;
  34. // height of the image
  35. required int32 imageheight = 3;
  36. // image data (either RGB or RGBA data can be transferred)
  37. required bytes imagedata = 4;
  38. // duration of the request (negative results in infinite)
  39. optional int32 duration = 5;
  40. }
  41. message ClearRequest {
  42. extend HyperionRequest {
  43. optional ClearRequest clearRequest = 12;
  44. }
  45. // priority which need to be cleared
  46. required int32 priority = 1;
  47. }
  48. message HyperionReply {
  49. enum Type {
  50. REPLY = 1;
  51. VIDEO = 2;
  52. }
  53. // Identifies which field is filled in.
  54. required Type type = 1;
  55. // flag indication success or failure
  56. optional bool success = 2;
  57. // string indicating the reason for failure (if applicable)
  58. optional string error = 3;
  59. // Proto Messages for video mode
  60. optional int32 video = 4;
  61. }