dust.proto 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. syntax = "proto3";
  2. // package声明符,用来防止不同的消息类型有命名冲突
  3. package v1;
  4. // 用于生成指定语言go的包名称
  5. option go_package = "smart-site-management-gateway/pb/v1";
  6. message DustMonitorData{
  7. string date = 1;
  8. double pm10= 2;
  9. double pm25 = 3;
  10. double tsp = 4;
  11. // 温度
  12. double t01 = 5;
  13. // 湿度
  14. double h01 = 6;
  15. // 风向
  16. double w01 = 7;
  17. // 风速
  18. double w02 = 8;
  19. // 雨量
  20. double r01 = 9;
  21. // 气压
  22. double p01 = 10;
  23. // 噪声
  24. double b03 = 11;
  25. }
  26. message LatestDustMonitorDataRequest{
  27. string sn = 1;
  28. int32 type = 2;
  29. int64 project_id = 3;
  30. }
  31. message LatestDustMonitorDataReply{
  32. DustMonitorData data = 1;
  33. }
  34. message DustMonitorHistoryRequest{
  35. string sn = 1;
  36. int32 type = 2;
  37. int64 time = 3;
  38. }
  39. message DustMonitorHistoryReply{
  40. repeated DustMonitorData list = 1;
  41. }
  42. message DustListRequest {
  43. int64 project_id = 1;
  44. int32 page = 2;
  45. int32 page_size = 3;
  46. }
  47. message DustListItem {
  48. int64 id = 1;
  49. string sn = 2;
  50. int32 state = 3;
  51. string name = 4;
  52. }
  53. message DustListReply {
  54. int64 online = 1;
  55. int64 offline = 2;
  56. int64 total = 3;
  57. int32 page = 4;
  58. int32 page_size = 5;
  59. repeated DustListItem list = 6;
  60. }
  61. message DustAqiRequest {
  62. string sn = 1;
  63. }
  64. message DustAqiReply {
  65. double aqi = 1;
  66. }