tower.proto 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. syntax = "proto3";
  2. // package声明符,用来防止不同的消息类型有命名冲突
  3. package v1;
  4. // 用于生成指定语言go的包名称
  5. option go_package = "smart-government-management/pb/v1";
  6. message TowerMonitorData{
  7. string date = 1;
  8. // 回转角度值
  9. double back_turn = 2;
  10. // 幅度值
  11. double scope = 3;
  12. // 吊钩离地面的距离
  13. double hight = 4;
  14. // 吊钩所掉重物的重量
  15. double weight = 5;
  16. // 当前力矩所占最大力矩的百分比
  17. string moment = 6;
  18. // 电池电量
  19. string battery = 7;
  20. // 风速
  21. double wind_speed = 8;
  22. // 塔身倾斜度 X 向
  23. double angle_x = 9;
  24. // 塔身倾斜度 Y 向
  25. double angle_y = 10;
  26. }
  27. message LatestTowerMonitorDataRequest{
  28. string sn = 1;
  29. int32 type = 2;
  30. }
  31. message LatestTowerMonitorDataReply{
  32. TowerMonitorData data = 1;
  33. }
  34. message TowerMonitorHistoryRequest{
  35. string sn = 1;
  36. int64 start = 2;
  37. int64 end = 3;
  38. int32 page = 4;
  39. int32 page_size = 5;
  40. }
  41. message TowerMonitorHistoryReply{
  42. int64 total = 1;
  43. int32 page = 2;
  44. int32 page_size = 3;
  45. repeated TowerMonitorData list = 4;
  46. }