pymammotion 0.2.62__py3-none-any.whl → 0.5.51__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of pymammotion might be problematic. Click here for more details.

Files changed (135) hide show
  1. pymammotion/__init__.py +9 -6
  2. pymammotion/aliyun/client.py +235 -0
  3. pymammotion/aliyun/cloud_gateway.py +320 -69
  4. pymammotion/aliyun/model/aep_response.py +1 -2
  5. pymammotion/aliyun/model/dev_by_account_response.py +170 -23
  6. pymammotion/aliyun/model/login_by_oauth_response.py +2 -3
  7. pymammotion/aliyun/model/regions_response.py +3 -3
  8. pymammotion/aliyun/model/session_by_authcode_response.py +2 -2
  9. pymammotion/aliyun/model/thing_response.py +12 -0
  10. pymammotion/aliyun/regions.py +62 -0
  11. pymammotion/aliyun/tea/core.py +297 -0
  12. pymammotion/bluetooth/ble.py +11 -15
  13. pymammotion/bluetooth/ble_message.py +389 -106
  14. pymammotion/bluetooth/model/atomic_integer.py +54 -0
  15. pymammotion/const.py +3 -0
  16. pymammotion/data/model/__init__.py +1 -2
  17. pymammotion/data/model/device.py +92 -240
  18. pymammotion/data/model/device_config.py +10 -24
  19. pymammotion/data/model/device_info.py +35 -0
  20. pymammotion/data/model/device_limits.py +49 -0
  21. pymammotion/data/model/enums.py +12 -2
  22. pymammotion/data/model/errors.py +12 -0
  23. pymammotion/data/model/events.py +14 -0
  24. pymammotion/data/model/generate_geojson.py +521 -0
  25. pymammotion/data/model/generate_route_information.py +3 -4
  26. pymammotion/data/model/hash_list.py +384 -48
  27. pymammotion/data/model/location.py +4 -4
  28. pymammotion/data/model/mowing_modes.py +24 -1
  29. pymammotion/data/model/raw_data.py +215 -0
  30. pymammotion/data/model/region_data.py +10 -11
  31. pymammotion/data/model/report_info.py +62 -6
  32. pymammotion/data/model/work.py +27 -0
  33. pymammotion/data/mower_state_manager.py +316 -0
  34. pymammotion/data/mqtt/event.py +73 -28
  35. pymammotion/data/mqtt/mammotion_properties.py +257 -0
  36. pymammotion/data/mqtt/properties.py +93 -78
  37. pymammotion/data/mqtt/status.py +18 -17
  38. pymammotion/event/event.py +32 -8
  39. pymammotion/homeassistant/__init__.py +3 -0
  40. pymammotion/homeassistant/mower_api.py +484 -0
  41. pymammotion/homeassistant/rtk_api.py +54 -0
  42. pymammotion/http/__init__.py +0 -0
  43. pymammotion/http/encryption.py +220 -0
  44. pymammotion/http/http.py +652 -44
  45. pymammotion/http/model/__init__.py +0 -0
  46. pymammotion/{aliyun/model/stream_subscription_response.py → http/model/camera_stream.py} +14 -2
  47. pymammotion/http/model/http.py +160 -9
  48. pymammotion/http/model/response_factory.py +61 -0
  49. pymammotion/http/model/rtk.py +16 -0
  50. pymammotion/mammotion/commands/abstract_message.py +7 -5
  51. pymammotion/mammotion/commands/mammotion_command.py +32 -3
  52. pymammotion/mammotion/commands/messages/basestation.py +43 -0
  53. pymammotion/mammotion/commands/messages/driver.py +61 -29
  54. pymammotion/mammotion/commands/messages/media.py +68 -15
  55. pymammotion/mammotion/commands/messages/navigation.py +61 -25
  56. pymammotion/mammotion/commands/messages/network.py +93 -100
  57. pymammotion/mammotion/commands/messages/ota.py +18 -18
  58. pymammotion/mammotion/commands/messages/system.py +97 -72
  59. pymammotion/mammotion/commands/messages/video.py +17 -12
  60. pymammotion/mammotion/devices/__init__.py +27 -3
  61. pymammotion/mammotion/devices/base.py +50 -127
  62. pymammotion/mammotion/devices/mammotion.py +447 -212
  63. pymammotion/mammotion/devices/mammotion_bluetooth.py +105 -60
  64. pymammotion/mammotion/devices/mammotion_cloud.py +157 -105
  65. pymammotion/mammotion/devices/mammotion_mower_ble.py +49 -0
  66. pymammotion/mammotion/devices/mammotion_mower_cloud.py +39 -0
  67. pymammotion/mammotion/devices/managers/managers.py +81 -0
  68. pymammotion/mammotion/devices/mower_device.py +124 -0
  69. pymammotion/mammotion/devices/mower_manager.py +107 -0
  70. pymammotion/mammotion/devices/rtk_ble.py +89 -0
  71. pymammotion/mammotion/devices/rtk_cloud.py +113 -0
  72. pymammotion/mammotion/devices/rtk_device.py +50 -0
  73. pymammotion/mammotion/devices/rtk_manager.py +122 -0
  74. pymammotion/mqtt/__init__.py +2 -1
  75. pymammotion/mqtt/aliyun_mqtt.py +232 -0
  76. pymammotion/mqtt/linkkit/__init__.py +5 -0
  77. pymammotion/mqtt/linkkit/h2client.py +585 -0
  78. pymammotion/mqtt/linkkit/linkkit.py +3023 -0
  79. pymammotion/mqtt/mammotion_mqtt.py +176 -169
  80. pymammotion/mqtt/mqtt_models.py +66 -0
  81. pymammotion/proto/__init__.py +4839 -4
  82. pymammotion/proto/basestation.proto +8 -0
  83. pymammotion/proto/basestation_pb2.py +11 -9
  84. pymammotion/proto/basestation_pb2.pyi +16 -2
  85. pymammotion/proto/dev_net.proto +79 -55
  86. pymammotion/proto/dev_net_pb2.py +60 -56
  87. pymammotion/proto/dev_net_pb2.pyi +49 -6
  88. pymammotion/proto/luba_msg.proto +2 -1
  89. pymammotion/proto/luba_msg_pb2.py +6 -6
  90. pymammotion/proto/luba_msg_pb2.pyi +1 -0
  91. pymammotion/proto/luba_mul.proto +62 -1
  92. pymammotion/proto/luba_mul_pb2.py +38 -22
  93. pymammotion/proto/luba_mul_pb2.pyi +94 -7
  94. pymammotion/proto/mctrl_driver.proto +44 -4
  95. pymammotion/proto/mctrl_driver_pb2.py +26 -14
  96. pymammotion/proto/mctrl_driver_pb2.pyi +66 -11
  97. pymammotion/proto/mctrl_nav.proto +97 -51
  98. pymammotion/proto/mctrl_nav_pb2.py +75 -67
  99. pymammotion/proto/mctrl_nav_pb2.pyi +142 -56
  100. pymammotion/proto/mctrl_ota.proto +40 -2
  101. pymammotion/proto/mctrl_ota_pb2.py +23 -13
  102. pymammotion/proto/mctrl_ota_pb2.pyi +67 -4
  103. pymammotion/proto/mctrl_pept.proto +8 -3
  104. pymammotion/proto/mctrl_pept_pb2.py +8 -6
  105. pymammotion/proto/mctrl_pept_pb2.pyi +14 -6
  106. pymammotion/proto/mctrl_sys.proto +325 -86
  107. pymammotion/proto/mctrl_sys_pb2.py +162 -98
  108. pymammotion/proto/mctrl_sys_pb2.pyi +451 -25
  109. pymammotion/proto/message_pool.py +3 -0
  110. pymammotion/proto/py.typed +0 -0
  111. pymammotion/utility/constant/device_constant.py +65 -21
  112. pymammotion/utility/datatype_converter.py +13 -12
  113. pymammotion/utility/device_config.py +755 -0
  114. pymammotion/utility/device_type.py +218 -21
  115. pymammotion/utility/map.py +238 -51
  116. pymammotion/utility/mur_mur_hash.py +159 -0
  117. {pymammotion-0.2.62.dist-info → pymammotion-0.5.51.dist-info}/METADATA +27 -31
  118. pymammotion-0.5.51.dist-info/RECORD +152 -0
  119. {pymammotion-0.2.62.dist-info → pymammotion-0.5.51.dist-info}/WHEEL +1 -1
  120. pymammotion/aliyun/cloud_service.py +0 -65
  121. pymammotion/data/model/plan.py +0 -58
  122. pymammotion/data/state_manager.py +0 -130
  123. pymammotion/proto/basestation.py +0 -59
  124. pymammotion/proto/common.py +0 -12
  125. pymammotion/proto/dev_net.py +0 -381
  126. pymammotion/proto/luba_msg.py +0 -81
  127. pymammotion/proto/luba_mul.py +0 -76
  128. pymammotion/proto/mctrl_driver.py +0 -100
  129. pymammotion/proto/mctrl_nav.py +0 -660
  130. pymammotion/proto/mctrl_ota.py +0 -48
  131. pymammotion/proto/mctrl_pept.py +0 -41
  132. pymammotion/proto/mctrl_sys.py +0 -574
  133. pymammotion-0.2.62.dist-info/RECORD +0 -125
  134. /pymammotion/{http/_init_.py → bluetooth/model/__init__.py} +0 -0
  135. {pymammotion-0.2.62.dist-info → pymammotion-0.5.51.dist-info/licenses}/LICENSE +0 -0
@@ -1,660 +0,0 @@
1
- # Generated by the protocol buffer compiler. DO NOT EDIT!
2
- # sources: pymammotion/proto/mctrl_nav.proto
3
- # plugin: python-betterproto
4
- from dataclasses import dataclass
5
- from .common import *
6
-
7
- import betterproto
8
-
9
-
10
- @dataclass
11
- class NavLatLonUp(betterproto.Message):
12
- lat: float = betterproto.double_field(1)
13
- lon: float = betterproto.double_field(2)
14
-
15
-
16
- @dataclass
17
- class NavBorderState(betterproto.Message):
18
- bdstate: int = betterproto.int32_field(1)
19
-
20
-
21
- @dataclass
22
- class NavPosUp(betterproto.Message):
23
- x: float = betterproto.float_field(1)
24
- y: float = betterproto.float_field(2)
25
- status: int = betterproto.int32_field(3)
26
- toward: int = betterproto.int32_field(4)
27
- stars: int = betterproto.int32_field(5)
28
- age: float = betterproto.float_field(6)
29
- lat_stddev: float = betterproto.float_field(7)
30
- lon_stddev: float = betterproto.float_field(8)
31
- l2df_stars: int = betterproto.int32_field(9)
32
- pos_type: int = betterproto.int32_field(10)
33
- c_hash_id: int = betterproto.int64_field(11)
34
- pos_level: int = betterproto.int32_field(12)
35
-
36
-
37
- @dataclass
38
- class NavBorderDataGetAck(betterproto.Message):
39
- job_id: int = betterproto.int32_field(1)
40
- current_frame: int = betterproto.int32_field(2)
41
-
42
-
43
- @dataclass
44
- class NavObstiBorderDataGet(betterproto.Message):
45
- obstacle_index: int = betterproto.int32_field(1)
46
- current_frame: int = betterproto.int32_field(2)
47
- obstacles_len: int = betterproto.int32_field(3)
48
-
49
-
50
- @dataclass
51
- class NavObstiBorderDataGetAck(betterproto.Message):
52
- obstacle_index: int = betterproto.int32_field(1)
53
- current_frame: int = betterproto.int32_field(2)
54
-
55
-
56
- @dataclass
57
- class NavCHlLineData(betterproto.Message):
58
- start_job_r_i: int = betterproto.int32_field(1)
59
- end_job_r_i: int = betterproto.int32_field(2)
60
- current_frame: int = betterproto.int32_field(3)
61
- channel_line_len: int = betterproto.int32_field(4)
62
-
63
-
64
- @dataclass
65
- class NavCHlLineDataAck(betterproto.Message):
66
- start_job_r_i: int = betterproto.int32_field(1)
67
- end_job_r_i: int = betterproto.int32_field(2)
68
- current_frame: int = betterproto.int32_field(3)
69
-
70
-
71
- @dataclass
72
- class NavTaskInfo(betterproto.Message):
73
- area: int = betterproto.int32_field(1)
74
- time: int = betterproto.int32_field(2)
75
- all_frame: int = betterproto.int32_field(3)
76
- current_frame: int = betterproto.int32_field(4)
77
- pathlen: int = betterproto.int32_field(5)
78
- dc: list["CommDataCouple"] = betterproto.message_field(6)
79
-
80
-
81
- @dataclass
82
- class NavBorderDataGet(betterproto.Message):
83
- job_id: int = betterproto.int32_field(1)
84
- current_frame: int = betterproto.int32_field(2)
85
- border_len: int = betterproto.int32_field(3)
86
-
87
-
88
- @dataclass
89
- class NavOptLineUp(betterproto.Message):
90
- start_job_r_i: int = betterproto.int32_field(1)
91
- end_job_r_i: int = betterproto.int32_field(2)
92
- all_frame: int = betterproto.int32_field(3)
93
- current_frame: int = betterproto.int32_field(4)
94
- channel_data_len: int = betterproto.int32_field(5)
95
- dc: list["CommDataCouple"] = betterproto.message_field(6)
96
-
97
-
98
- @dataclass
99
- class NavOptiBorderInfo(betterproto.Message):
100
- job_id: int = betterproto.int32_field(1)
101
- all_frame: int = betterproto.int32_field(2)
102
- current_frame: int = betterproto.int32_field(3)
103
- border_data_len: int = betterproto.int32_field(4)
104
- dc: list["CommDataCouple"] = betterproto.message_field(5)
105
-
106
-
107
- @dataclass
108
- class NavOptObsInfo(betterproto.Message):
109
- obstacle_id: int = betterproto.int32_field(1)
110
- all_frame: int = betterproto.int32_field(2)
111
- current_frame: int = betterproto.int32_field(3)
112
- obstacle_data_len: int = betterproto.int32_field(4)
113
- dc: list["CommDataCouple"] = betterproto.message_field(5)
114
-
115
-
116
- @dataclass
117
- class NavStartJob(betterproto.Message):
118
- job_id: int = betterproto.int64_field(1)
119
- job_ver: int = betterproto.int32_field(2)
120
- job_mode: int = betterproto.int32_field(3)
121
- rain_tactics: int = betterproto.int32_field(4)
122
- knife_height: int = betterproto.int32_field(5)
123
- speed: float = betterproto.float_field(6)
124
- channel_width: int = betterproto.int32_field(7)
125
- ultra_wave: int = betterproto.int32_field(8)
126
- channel_mode: int = betterproto.int32_field(9)
127
-
128
-
129
- @dataclass
130
- class NavTaskProgress(betterproto.Message):
131
- task_progress: int = betterproto.int32_field(1)
132
-
133
-
134
- @dataclass
135
- class NavResFrame(betterproto.Message):
136
- frameid: int = betterproto.int32_field(1)
137
-
138
-
139
- @dataclass
140
- class NavGetHashList(betterproto.Message):
141
- pver: int = betterproto.int32_field(1)
142
- sub_cmd: int = betterproto.int32_field(2)
143
- total_frame: int = betterproto.int32_field(3)
144
- current_frame: int = betterproto.int32_field(4)
145
- data_hash: int = betterproto.fixed64_field(5)
146
- reserved: str = betterproto.string_field(6)
147
-
148
-
149
- @dataclass
150
- class NavGetHashListAck(betterproto.Message):
151
- pver: int = betterproto.int32_field(1)
152
- sub_cmd: int = betterproto.int32_field(2)
153
- total_frame: int = betterproto.int32_field(3)
154
- current_frame: int = betterproto.int32_field(4)
155
- data_hash: int = betterproto.fixed64_field(5)
156
- hash_len: int = betterproto.int32_field(6)
157
- reserved: str = betterproto.string_field(7)
158
- result: int = betterproto.int32_field(8)
159
- data_couple: list[int] = betterproto.int64_field(13)
160
-
161
-
162
- @dataclass
163
- class NavGetCommData(betterproto.Message):
164
- pver: int = betterproto.int32_field(1)
165
- sub_cmd: int = betterproto.int32_field(2)
166
- action: int = betterproto.int32_field(3)
167
- type: int = betterproto.int32_field(4)
168
- hash: int = betterproto.int64_field(5)
169
- paternal_hash_a: int = betterproto.int64_field(6)
170
- paternal_hash_b: int = betterproto.int64_field(7)
171
- total_frame: int = betterproto.int32_field(8)
172
- current_frame: int = betterproto.int32_field(9)
173
- data_hash: int = betterproto.fixed64_field(10)
174
- reserved: str = betterproto.string_field(11)
175
-
176
-
177
- @dataclass
178
- class NavGetCommDataAck(betterproto.Message):
179
- pver: int = betterproto.int32_field(1)
180
- sub_cmd: int = betterproto.int32_field(2)
181
- result: int = betterproto.int32_field(3)
182
- action: int = betterproto.int32_field(4)
183
- type: int = betterproto.int32_field(5)
184
- hash: int = betterproto.fixed64_field(6)
185
- paternal_hash_a: int = betterproto.fixed64_field(7)
186
- paternal_hash_b: int = betterproto.fixed64_field(8)
187
- total_frame: int = betterproto.int32_field(9)
188
- current_frame: int = betterproto.int32_field(10)
189
- data_hash: int = betterproto.fixed64_field(11)
190
- data_len: int = betterproto.int32_field(12)
191
- data_couple: list["CommDataCouple"] = betterproto.message_field(13)
192
- reserved: str = betterproto.string_field(14)
193
-
194
-
195
- @dataclass
196
- class NavReqCoverPath(betterproto.Message):
197
- pver: int = betterproto.int32_field(1)
198
- job_id: int = betterproto.int64_field(2)
199
- job_ver: int = betterproto.int32_field(3)
200
- job_mode: int = betterproto.int32_field(4)
201
- sub_cmd: int = betterproto.int32_field(5)
202
- edge_mode: int = betterproto.int32_field(6)
203
- knife_height: int = betterproto.int32_field(7)
204
- channel_width: int = betterproto.int32_field(8)
205
- ultra_wave: int = betterproto.int32_field(9)
206
- channel_mode: int = betterproto.int32_field(10)
207
- toward: int = betterproto.int32_field(11)
208
- speed: float = betterproto.float_field(12)
209
- zone_hashs: list[int] = betterproto.fixed64_field(13)
210
- path_hash: int = betterproto.fixed64_field(14)
211
- reserved: str = betterproto.string_field(15)
212
- result: int = betterproto.int32_field(16)
213
- toward_mode: int = betterproto.int32_field(17)
214
- toward_included_angle: int = betterproto.int32_field(18)
215
-
216
-
217
- @dataclass
218
- class NavUploadZigZagResult(betterproto.Message):
219
- pver: int = betterproto.int32_field(1)
220
- job_id: int = betterproto.int64_field(2)
221
- job_ver: int = betterproto.int32_field(3)
222
- result: int = betterproto.int32_field(4)
223
- area: int = betterproto.int32_field(5)
224
- time: int = betterproto.int32_field(6)
225
- total_zone_num: int = betterproto.int32_field(7)
226
- current_zone_path_num: int = betterproto.int32_field(8)
227
- current_zone_path_id: int = betterproto.int32_field(9)
228
- current_zone: int = betterproto.int32_field(10)
229
- current_hash: int = betterproto.fixed64_field(11)
230
- total_frame: int = betterproto.int32_field(12)
231
- current_frame: int = betterproto.int32_field(13)
232
- channel_mode: int = betterproto.int32_field(14)
233
- channel_mode_id: int = betterproto.int32_field(15)
234
- data_hash: int = betterproto.fixed64_field(16)
235
- data_len: int = betterproto.int32_field(17)
236
- reserved: str = betterproto.string_field(18)
237
- data_couple: list["CommDataCouple"] = betterproto.message_field(19)
238
- sub_cmd: int = betterproto.int32_field(20)
239
-
240
-
241
- @dataclass
242
- class NavUploadZigZagResultAck(betterproto.Message):
243
- pver: int = betterproto.int32_field(1)
244
- current_zone: int = betterproto.int32_field(2)
245
- current_hash: int = betterproto.fixed64_field(3)
246
- total_frame: int = betterproto.int32_field(4)
247
- current_frame: int = betterproto.int32_field(5)
248
- data_hash: int = betterproto.fixed64_field(6)
249
- reserved: str = betterproto.string_field(7)
250
- sub_cmd: int = betterproto.int32_field(8)
251
-
252
-
253
- @dataclass
254
- class NavTaskCtrl(betterproto.Message):
255
- type: int = betterproto.int32_field(1)
256
- action: int = betterproto.int32_field(2)
257
- result: int = betterproto.int32_field(3)
258
- reserved: str = betterproto.string_field(4)
259
-
260
-
261
- @dataclass
262
- class NavTaskIdRw(betterproto.Message):
263
- pver: int = betterproto.int32_field(1)
264
- sub_cmd: int = betterproto.int32_field(2)
265
- task_name: str = betterproto.string_field(3)
266
- task_id: str = betterproto.string_field(4)
267
- result: int = betterproto.int32_field(5)
268
- reserved: str = betterproto.string_field(6)
269
-
270
-
271
- @dataclass
272
- class NavSysHashOverview(betterproto.Message):
273
- commonhash_overview: int = betterproto.fixed64_field(1)
274
- path_hash_overview: int = betterproto.fixed64_field(2)
275
-
276
-
277
- @dataclass
278
- class NavTaskBreakPoint(betterproto.Message):
279
- x: float = betterproto.float_field(1)
280
- y: float = betterproto.float_field(2)
281
- toward: int = betterproto.int32_field(3)
282
- flag: int = betterproto.int32_field(4)
283
- action: int = betterproto.int32_field(5)
284
- zone_hash: int = betterproto.fixed64_field(6)
285
-
286
-
287
- @dataclass
288
- class NavPlanJobSet(betterproto.Message):
289
- pver: int = betterproto.int32_field(1)
290
- sub_cmd: int = betterproto.int32_field(2)
291
- area: int = betterproto.int32_field(3)
292
- work_time: int = betterproto.int32_field(4)
293
- version: str = betterproto.string_field(5)
294
- id: str = betterproto.string_field(6)
295
- user_id: str = betterproto.string_field(7)
296
- device_id: str = betterproto.string_field(8)
297
- plan_id: str = betterproto.string_field(9)
298
- task_id: str = betterproto.string_field(10)
299
- job_id: str = betterproto.string_field(11)
300
- start_time: str = betterproto.string_field(12)
301
- end_time: str = betterproto.string_field(13)
302
- week: int = betterproto.int32_field(14)
303
- knife_height: int = betterproto.int32_field(15)
304
- model: int = betterproto.int32_field(16)
305
- edge_mode: int = betterproto.int32_field(17)
306
- required_time: int = betterproto.int32_field(18)
307
- route_angle: int = betterproto.int32_field(19)
308
- route_model: int = betterproto.int32_field(20)
309
- route_spacing: int = betterproto.int32_field(21)
310
- ultrasonic_barrier: int = betterproto.int32_field(22)
311
- total_plan_num: int = betterproto.int32_field(23)
312
- plan_index: int = betterproto.int32_field(24)
313
- result: int = betterproto.int32_field(25)
314
- speed: float = betterproto.float_field(26)
315
- task_name: str = betterproto.string_field(27)
316
- job_name: str = betterproto.string_field(28)
317
- zone_hashs: list[int] = betterproto.fixed64_field(29)
318
- reserved: str = betterproto.string_field(30)
319
- start_date: str = betterproto.string_field(31)
320
- end_date: str = betterproto.string_field(32)
321
- trigger_type: int = betterproto.int32_field(33)
322
- day: int = betterproto.int32_field(34)
323
- weeks: list[int] = betterproto.fixed32_field(35)
324
- remained_seconds: int = betterproto.int64_field(36)
325
- toward_mode: int = betterproto.int32_field(37)
326
- toward_included_angle: int = betterproto.int32_field(38)
327
-
328
-
329
- @dataclass
330
- class NavUnableTimeSet(betterproto.Message):
331
- sub_cmd: int = betterproto.int32_field(1)
332
- device_id: str = betterproto.string_field(2)
333
- unable_start_time: str = betterproto.string_field(3)
334
- unable_end_time: str = betterproto.string_field(4)
335
- result: int = betterproto.int32_field(5)
336
- reserved: str = betterproto.string_field(6)
337
-
338
-
339
- @dataclass
340
- class ChargePileType(betterproto.Message):
341
- toward: int = betterproto.int32_field(1)
342
- x: float = betterproto.float_field(2)
343
- y: float = betterproto.float_field(3)
344
-
345
-
346
- @dataclass
347
- class SimulationCmdData(betterproto.Message):
348
- sub_cmd: int = betterproto.int32_field(1)
349
- param_id: int = betterproto.int32_field(2)
350
- param_value: list[int] = betterproto.int32_field(3)
351
-
352
-
353
- @dataclass
354
- class WorkReportUpdateCmd(betterproto.Message):
355
- sub_cmd: int = betterproto.int32_field(1)
356
-
357
-
358
- @dataclass
359
- class WorkReportUpdateAck(betterproto.Message):
360
- update_flag: bool = betterproto.bool_field(1)
361
- info_num: int = betterproto.int32_field(2)
362
-
363
-
364
- @dataclass
365
- class WorkReportCmdData(betterproto.Message):
366
- sub_cmd: int = betterproto.int32_field(1)
367
- get_info_num: int = betterproto.int32_field(2)
368
-
369
-
370
- @dataclass
371
- class WorkReportInfoAck(betterproto.Message):
372
- interrupt_flag: bool = betterproto.bool_field(1)
373
- start_work_time: int = betterproto.int64_field(2)
374
- end_work_time: int = betterproto.int64_field(3)
375
- work_time_used: int = betterproto.int32_field(4)
376
- work_ares: float = betterproto.double_field(5)
377
- work_progress: int = betterproto.int32_field(6)
378
- height_of_knife: int = betterproto.int32_field(7)
379
- work_type: int = betterproto.int32_field(8)
380
- work_result: int = betterproto.int32_field(9)
381
- total_ack_num: int = betterproto.int32_field(10)
382
- current_ack_num: int = betterproto.int32_field(11)
383
-
384
-
385
- @dataclass
386
- class AppRequestCoverPathsT(betterproto.Message):
387
- pver: int = betterproto.int32_field(1)
388
- sub_cmd: int = betterproto.int32_field(2)
389
- total_frame: int = betterproto.int32_field(3)
390
- current_frame: int = betterproto.int32_field(4)
391
- data_hash: int = betterproto.fixed64_field(5)
392
- transaction_id: int = betterproto.int64_field(6)
393
- reserved: list[int] = betterproto.int64_field(7)
394
- hash_list: list[int] = betterproto.fixed64_field(8)
395
-
396
-
397
- @dataclass
398
- class CoverPathPacketT(betterproto.Message):
399
- path_hash: int = betterproto.fixed64_field(1)
400
- path_type: int = betterproto.int32_field(2)
401
- path_total: int = betterproto.int32_field(3)
402
- path_cur: int = betterproto.int32_field(4)
403
- zone_hash: int = betterproto.fixed64_field(5)
404
- data_couple: list["CommDataCouple"] = betterproto.message_field(6)
405
-
406
-
407
- @dataclass
408
- class CoverPathUploadT(betterproto.Message):
409
- pver: int = betterproto.int32_field(1)
410
- result: int = betterproto.int32_field(2)
411
- sub_cmd: int = betterproto.int32_field(3)
412
- area: int = betterproto.int32_field(4)
413
- time: int = betterproto.int32_field(5)
414
- total_frame: int = betterproto.int32_field(6)
415
- current_frame: int = betterproto.int32_field(7)
416
- total_path_num: int = betterproto.int32_field(8)
417
- vaild_path_num: int = betterproto.int32_field(9)
418
- data_hash: int = betterproto.fixed64_field(10)
419
- transaction_id: int = betterproto.int64_field(11)
420
- reserved: list[int] = betterproto.int64_field(12)
421
- data_len: int = betterproto.int32_field(13)
422
- path_packets: list["CoverPathPacketT"] = betterproto.message_field(14)
423
-
424
-
425
- @dataclass
426
- class ZoneStartPrecentT(betterproto.Message):
427
- data_hash: int = betterproto.fixed64_field(1)
428
- x: float = betterproto.float_field(2)
429
- y: float = betterproto.float_field(3)
430
- index: int = betterproto.int32_field(4)
431
-
432
-
433
- @dataclass
434
- class VisionCtrlMsg(betterproto.Message):
435
- type: int = betterproto.int32_field(1)
436
- cmd: int = betterproto.int32_field(2)
437
-
438
-
439
- @dataclass
440
- class NavSysParamMsg(betterproto.Message):
441
- rw: int = betterproto.int32_field(1)
442
- id: int = betterproto.int32_field(2)
443
- context: int = betterproto.int32_field(3)
444
-
445
-
446
- @dataclass
447
- class NavPlanTaskExecute(betterproto.Message):
448
- sub_cmd: int = betterproto.int32_field(1)
449
- id: str = betterproto.string_field(2)
450
- name: str = betterproto.string_field(3)
451
- result: int = betterproto.int32_field(4)
452
-
453
-
454
- @dataclass
455
- class CostmapT(betterproto.Message):
456
- width: int = betterproto.int32_field(1)
457
- height: int = betterproto.int32_field(2)
458
- center_x: float = betterproto.float_field(3)
459
- center_y: float = betterproto.float_field(4)
460
- yaw: float = betterproto.float_field(5)
461
- res: float = betterproto.float_field(6)
462
- costmap: list[int] = betterproto.int32_field(7)
463
-
464
-
465
- @dataclass
466
- class PlanTaskNameIdT(betterproto.Message):
467
- id: str = betterproto.string_field(1)
468
- name: str = betterproto.string_field(2)
469
-
470
-
471
- @dataclass
472
- class NavGetAllPlanTask(betterproto.Message):
473
- tasks: list["PlanTaskNameIdT"] = betterproto.message_field(1)
474
-
475
-
476
- @dataclass
477
- class NavTaskCtrlAck(betterproto.Message):
478
- """Define the NavTaskCtrlAck message"""
479
-
480
- type: int = betterproto.int32_field(1)
481
- action: int = betterproto.int32_field(2)
482
- result: int = betterproto.int32_field(3)
483
- nav_state: int = betterproto.int32_field(4)
484
- reserved: str = betterproto.string_field(5)
485
-
486
-
487
- @dataclass
488
- class NavMapNameMsg(betterproto.Message):
489
- rw: int = betterproto.int32_field(1)
490
- hash: int = betterproto.int64_field(2)
491
- name: str = betterproto.string_field(3)
492
- result: int = betterproto.int32_field(4)
493
- device_id: str = betterproto.string_field(5)
494
-
495
-
496
- @dataclass
497
- class SvgMessageT(betterproto.Message):
498
- x_move: float = betterproto.double_field(1)
499
- y_move: float = betterproto.double_field(2)
500
- scale: float = betterproto.double_field(3)
501
- rotate: float = betterproto.double_field(4)
502
- base_width_m: float = betterproto.double_field(5)
503
- base_width_pix: int = betterproto.int32_field(7)
504
- base_height_m: float = betterproto.double_field(6)
505
- base_height_pix: int = betterproto.int32_field(8)
506
- data_count: int = betterproto.int32_field(12)
507
- hide_svg: bool = betterproto.bool_field(13)
508
- name_count: int = betterproto.int32_field(11)
509
- svg_file_name: str = betterproto.string_field(9)
510
- svg_file_data: str = betterproto.string_field(10)
511
-
512
-
513
- @dataclass
514
- class SvgMessageAckT(betterproto.Message):
515
- pver: int = betterproto.int32_field(1)
516
- sub_cmd: int = betterproto.int32_field(2)
517
- total_frame: int = betterproto.int32_field(3)
518
- current_frame: int = betterproto.int32_field(4)
519
- data_hash: int = betterproto.fixed64_field(5)
520
- paternal_hash_a: int = betterproto.fixed64_field(6)
521
- type: int = betterproto.int32_field(7)
522
- result: int = betterproto.int32_field(8)
523
- svg_message: "SvgMessageT" = betterproto.message_field(9)
524
-
525
-
526
- @dataclass
527
- class AreaHashName(betterproto.Message):
528
- name: str = betterproto.string_field(2)
529
- hash: int = betterproto.fixed64_field(1)
530
-
531
-
532
- @dataclass
533
- class AppGetAllAreaHashName(betterproto.Message):
534
- device_id: str = betterproto.string_field(1)
535
- hashnames: list["AreaHashName"] = betterproto.message_field(2)
536
-
537
-
538
- @dataclass
539
- class MctlNav(betterproto.Message):
540
- toapp_lat_up: "NavLatLonUp" = betterproto.message_field(1, group="SubNavMsg")
541
- toapp_pos_up: "NavPosUp" = betterproto.message_field(2, group="SubNavMsg")
542
- todev_chl_line_data: "NavCHlLineData" = betterproto.message_field(
543
- 3, group="SubNavMsg"
544
- )
545
- toapp_task_info: "NavTaskInfo" = betterproto.message_field(4, group="SubNavMsg")
546
- toapp_opt_line_up: "NavOptLineUp" = betterproto.message_field(5, group="SubNavMsg")
547
- toapp_opt_border_info: "NavOptiBorderInfo" = betterproto.message_field(
548
- 6, group="SubNavMsg"
549
- )
550
- toapp_opt_obs_info: "NavOptObsInfo" = betterproto.message_field(
551
- 7, group="SubNavMsg"
552
- )
553
- todev_task_info_ack: "NavResFrame" = betterproto.message_field(8, group="SubNavMsg")
554
- todev_opt_border_info_ack: "NavResFrame" = betterproto.message_field(
555
- 9, group="SubNavMsg"
556
- )
557
- todev_opt_obs_info_ack: "NavResFrame" = betterproto.message_field(
558
- 10, group="SubNavMsg"
559
- )
560
- todev_opt_line_up_ack: "NavResFrame" = betterproto.message_field(
561
- 11, group="SubNavMsg"
562
- )
563
- toapp_chgpileto: "ChargePileType" = betterproto.message_field(12, group="SubNavMsg")
564
- todev_sustask: int = betterproto.int32_field(13, group="SubNavMsg")
565
- todev_rechgcmd: int = betterproto.int32_field(14, group="SubNavMsg")
566
- todev_edgecmd: int = betterproto.int32_field(15, group="SubNavMsg")
567
- todev_draw_border: int = betterproto.int32_field(16, group="SubNavMsg")
568
- todev_draw_border_end: int = betterproto.int32_field(17, group="SubNavMsg")
569
- todev_draw_obs: int = betterproto.int32_field(18, group="SubNavMsg")
570
- todev_draw_obs_end: int = betterproto.int32_field(19, group="SubNavMsg")
571
- todev_chl_line: int = betterproto.int32_field(20, group="SubNavMsg")
572
- todev_chl_line_end: int = betterproto.int32_field(21, group="SubNavMsg")
573
- todev_save_task: int = betterproto.int32_field(22, group="SubNavMsg")
574
- todev_cancel_suscmd: int = betterproto.int32_field(23, group="SubNavMsg")
575
- todev_reset_chg_pile: int = betterproto.int32_field(24, group="SubNavMsg")
576
- todev_cancel_draw_cmd: int = betterproto.int32_field(25, group="SubNavMsg")
577
- todev_one_touch_leave_pile: int = betterproto.int32_field(26, group="SubNavMsg")
578
- todev_mow_task: "NavStartJob" = betterproto.message_field(27, group="SubNavMsg")
579
- toapp_bstate: "NavBorderState" = betterproto.message_field(28, group="SubNavMsg")
580
- todev_lat_up_ack: int = betterproto.int32_field(29, group="SubNavMsg")
581
- todev_gethash: "NavGetHashList" = betterproto.message_field(30, group="SubNavMsg")
582
- toapp_gethash_ack: "NavGetHashListAck" = betterproto.message_field(
583
- 31, group="SubNavMsg"
584
- )
585
- todev_get_commondata: "NavGetCommData" = betterproto.message_field(
586
- 32, group="SubNavMsg"
587
- )
588
- toapp_get_commondata_ack: "NavGetCommDataAck" = betterproto.message_field(
589
- 33, group="SubNavMsg"
590
- )
591
- bidire_reqconver_path: "NavReqCoverPath" = betterproto.message_field(
592
- 34, group="SubNavMsg"
593
- )
594
- toapp_zigzag: "NavUploadZigZagResult" = betterproto.message_field(
595
- 35, group="SubNavMsg"
596
- )
597
- todev_zigzag_ack: "NavUploadZigZagResultAck" = betterproto.message_field(
598
- 36, group="SubNavMsg"
599
- )
600
- todev_taskctrl: "NavTaskCtrl" = betterproto.message_field(37, group="SubNavMsg")
601
- bidire_taskid: "NavTaskIdRw" = betterproto.message_field(38, group="SubNavMsg")
602
- toapp_bp: "NavTaskBreakPoint" = betterproto.message_field(39, group="SubNavMsg")
603
- todev_planjob_set: "NavPlanJobSet" = betterproto.message_field(
604
- 40, group="SubNavMsg"
605
- )
606
- todev_unable_time_set: "NavUnableTimeSet" = betterproto.message_field(
607
- 41, group="SubNavMsg"
608
- )
609
- simulation_cmd: "SimulationCmdData" = betterproto.message_field(
610
- 42, group="SubNavMsg"
611
- )
612
- todev_work_report_update_cmd: "WorkReportUpdateCmd" = betterproto.message_field(
613
- 43, group="SubNavMsg"
614
- )
615
- toapp_work_report_update_ack: "WorkReportUpdateAck" = betterproto.message_field(
616
- 44, group="SubNavMsg"
617
- )
618
- todev_work_report_cmd: "WorkReportCmdData" = betterproto.message_field(
619
- 45, group="SubNavMsg"
620
- )
621
- toapp_work_report_ack: "WorkReportInfoAck" = betterproto.message_field(
622
- 46, group="SubNavMsg"
623
- )
624
- toapp_work_report_upload: "WorkReportInfoAck" = betterproto.message_field(
625
- 47, group="SubNavMsg"
626
- )
627
- app_request_cover_paths: "AppRequestCoverPathsT" = betterproto.message_field(
628
- 48, group="SubNavMsg"
629
- )
630
- cover_path_upload: "CoverPathUploadT" = betterproto.message_field(
631
- 49, group="SubNavMsg"
632
- )
633
- zone_start_precent: "ZoneStartPrecentT" = betterproto.message_field(
634
- 50, group="SubNavMsg"
635
- )
636
- vision_ctrl: "VisionCtrlMsg" = betterproto.message_field(51, group="SubNavMsg")
637
- nav_sys_param_cmd: "NavSysParamMsg" = betterproto.message_field(
638
- 52, group="SubNavMsg"
639
- )
640
- plan_task_execute: "NavPlanTaskExecute" = betterproto.message_field(
641
- 53, group="SubNavMsg"
642
- )
643
- toapp_costmap: "CostmapT" = betterproto.message_field(54, group="SubNavMsg")
644
- plan_task_name_id: "PlanTaskNameIdT" = betterproto.message_field(
645
- 55, group="SubNavMsg"
646
- )
647
- all_plan_task: "NavGetAllPlanTask" = betterproto.message_field(
648
- 56, group="SubNavMsg"
649
- )
650
- todev_taskctrl_ack: "NavTaskCtrlAck" = betterproto.message_field(
651
- 57, group="SubNavMsg"
652
- )
653
- toapp_map_name_msg: "NavMapNameMsg" = betterproto.message_field(
654
- 58, group="SubNavMsg"
655
- )
656
- todev_svg_msg: "SvgMessageAckT" = betterproto.message_field(59, group="SubNavMsg")
657
- toapp_svg_msg: "SvgMessageAckT" = betterproto.message_field(60, group="SubNavMsg")
658
- toapp_all_hash_name: "AppGetAllAreaHashName" = betterproto.message_field(
659
- 61, group="SubNavMsg"
660
- )
@@ -1,48 +0,0 @@
1
- # Generated by the protocol buffer compiler. DO NOT EDIT!
2
- # sources: pymammotion/proto/mctrl_ota.proto
3
- # plugin: python-betterproto
4
- from dataclasses import dataclass
5
-
6
- import betterproto
7
-
8
-
9
- class InfoType(betterproto.Enum):
10
- IT_BASE = 0
11
- IT_OTA = 1
12
-
13
-
14
- @dataclass
15
- class BaseInfo(betterproto.Message):
16
- dev_version: str = betterproto.string_field(1)
17
- dev_status: int = betterproto.int32_field(2)
18
- batt_val: int = betterproto.int32_field(3)
19
- init_status: int = betterproto.int32_field(4)
20
- is_tilt: int = betterproto.int32_field(5)
21
-
22
-
23
- @dataclass
24
- class OtaInfo(betterproto.Message):
25
- otaid: str = betterproto.string_field(1)
26
- version: str = betterproto.string_field(2)
27
- progress: int = betterproto.int32_field(3)
28
- result: int = betterproto.int32_field(4)
29
- message: str = betterproto.string_field(5)
30
-
31
-
32
- @dataclass
33
- class GetInfoReq(betterproto.Message):
34
- type: "InfoType" = betterproto.enum_field(1)
35
-
36
-
37
- @dataclass
38
- class GetInfoRsp(betterproto.Message):
39
- result: int = betterproto.int32_field(1)
40
- type: "InfoType" = betterproto.enum_field(2)
41
- base: "BaseInfo" = betterproto.message_field(3, group="info")
42
- ota: "OtaInfo" = betterproto.message_field(4, group="info")
43
-
44
-
45
- @dataclass
46
- class MctlOta(betterproto.Message):
47
- todev_get_info_req: "GetInfoReq" = betterproto.message_field(1, group="SubOtaMsg")
48
- toapp_get_info_rsp: "GetInfoRsp" = betterproto.message_field(2, group="SubOtaMsg")