Status.proto 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. syntax = "proto3";
  2. package sys.status;
  3. import "Network.proto";
  4. import "nanopb.proto";
  5. option (nanopb_fileopt).enum_to_string = true;
  6. // Enum for APP_AV_STATE
  7. enum interfaces {
  8. IF_UNKNOWN = 0;
  9. IF_WIFI = 1;
  10. IF_ETHERNET = 2;
  11. }
  12. enum av_states {
  13. A_IDLE = 0;
  14. A_DISCOVERING = 1;
  15. A_DISCOVERED = 2;
  16. A_UNCONNECTED = 3;
  17. A_CONNECTING = 4;
  18. A_CONNECTED = 5;
  19. A_DISCONNECTING = 6;
  20. }
  21. enum media_states {
  22. M_IDLE = 0;
  23. M_STARTING = 1;
  24. M_STARTED = 2;
  25. M_STOPPING = 3;
  26. M_WAIT_DISCONNECT = 4;
  27. }
  28. enum reasons {
  29. R_UNKNOWN = 0;
  30. R_CONNECTION_OK = 1;
  31. R_FAILED_ATTEMPT = 2;
  32. R_USER_DISCONNECT = 3;
  33. R_LOST_CONNECTION = 4;
  34. R_FAILED_ATTEMPT_AND_RESTORE = 5;
  35. R_ETHERNET_CONNECTED = 6;
  36. }
  37. // Enum for ESP_AVRC_CT
  38. enum avrc_ct {
  39. ESP_AVRC_CT_CONNECTION_STATE_EVT = 0;
  40. ESP_AVRC_CT_PASSTHROUGH_RSP_EVT = 1;
  41. ESP_AVRC_CT_METADATA_RSP_EVT = 2;
  42. ESP_AVRC_CT_PLAY_STATUS_RSP_EVT = 3;
  43. ESP_AVRC_CT_CHANGE_NOTIFY_EVT = 4;
  44. ESP_AVRC_CT_REMOTE_FEATURES_EVT = 5;
  45. ESP_AVRC_CT_GET_RN_CAPABILITIES_RSP_EVT = 6;
  46. ESP_AVRC_CT_SET_ABSOLUTE_VOLUME_RSP_EVT = 7;
  47. }
  48. enum net_states {
  49. NET_UNKNOWN = 0;
  50. NET_INSTANTIATED = 1;
  51. NET_INITIALIZING = 2;
  52. NET_ETH_ACTIVE = 3;
  53. NET_WIFI_ACTIVE = 4;
  54. NET_WIFI_CONFIGURING_ACTIVE = 5;
  55. }
  56. enum eth_states {
  57. ETH_UNKNOWN = 0;
  58. ETH_STARTING = 1;
  59. ETH_ACTIVE_LINKUP = 2;
  60. ETH_ACTIVE_LINKDOWN = 3;
  61. ETH_ACTIVE_CONNECTED = 4;
  62. ETH_CONNECTING_NEW = 5;
  63. }
  64. enum wifi_States {
  65. WIFI_UNKNOWN = 0;
  66. WIFI_INITIALIZING = 1;
  67. WIFI_CONNECTING = 2;
  68. WIFI_CONNECTING_NEW = 3;
  69. WIFI_CONNECTING_NEW_FAILED = 4;
  70. WIFI_CONNECTED = 5;
  71. WIFI_USER_DISCONNECTED = 6;
  72. WIFI_LOST_CONNECTION = 7;
  73. }
  74. message wifi {
  75. option (nanopb_msgopt).packed_struct = true;
  76. option (nanopb_msgopt).msgid = 10052;
  77. sys.net.wifi_entry connected_sta = 1;
  78. int32 disconnect_count = 2;
  79. float avg_conn_time = 3;
  80. repeated sys.net.wifi_entry scan_result = 4 [(nanopb).type = FT_CALLBACK, (nanopb).callback_datatype = "sys_net_wifi_entry*"];
  81. wifi_States wifi_state = 5;
  82. }
  83. message net {
  84. option (nanopb_msgopt).packed_struct = true;
  85. option (nanopb_msgopt).msgid = 10053;
  86. wifi wifi = 1;
  87. sys.net.ip ip = 2;
  88. net_states network_state = 5;
  89. eth_states eth_state = 6;
  90. bool eth_up = 7;
  91. reasons updt_reason = 8;
  92. interfaces interface = 9;
  93. }
  94. message bt {
  95. option (nanopb_msgopt).packed_struct = true;
  96. option (nanopb_msgopt).msgid = 10054;
  97. av_states bt_status = 1;
  98. avrc_ct bt_sub_status = 2;
  99. media_states bt_media_state = 3;
  100. }
  101. message platform {
  102. option (nanopb_msgopt).packed_struct = true;
  103. option (nanopb_msgopt).msgid = 10055;
  104. string project = 1 [(nanopb).max_length = 128];
  105. string version = 2 [(nanopb).max_length = 25];
  106. bool recovery = 3;
  107. string target = 4 [(nanopb).type = FT_POINTER];
  108. int32 depth = 5;
  109. }
  110. message hw {
  111. option (nanopb_msgopt).packed_struct = true;
  112. option (nanopb_msgopt).msgid = 10056;
  113. bool jack_inserted = 1;
  114. float batt_voltage = 2;
  115. bool supports_jack_inserted = 3;
  116. bool spk_fault = 4;
  117. bool supports_spk_fault = 5;
  118. }
  119. message data {
  120. option (nanopb_msgopt).packed_struct = true;
  121. option (nanopb_msgopt).msgid = 10057;
  122. platform platform = 1;
  123. hw hw = 2;
  124. bt bt = 3;
  125. sys.net.server LMS = 4;
  126. net net = 5;
  127. }