pymammotion 0.5.69__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.
Files changed (154) hide show
  1. pymammotion/__init__.py +53 -0
  2. pymammotion/agora/__init__.py +0 -0
  3. pymammotion/agora/agora_api.py +755 -0
  4. pymammotion/agora/agora_rtc_capabilities.py +748 -0
  5. pymammotion/agora/agora_websockets.py +1175 -0
  6. pymammotion/aliyun/__init__.py +1 -0
  7. pymammotion/aliyun/client.py +235 -0
  8. pymammotion/aliyun/cloud_gateway.py +982 -0
  9. pymammotion/aliyun/model/aep_response.py +21 -0
  10. pymammotion/aliyun/model/connect_response.py +51 -0
  11. pymammotion/aliyun/model/dev_by_account_response.py +195 -0
  12. pymammotion/aliyun/model/login_by_oauth_response.py +64 -0
  13. pymammotion/aliyun/model/regions_response.py +29 -0
  14. pymammotion/aliyun/model/session_by_authcode_response.py +19 -0
  15. pymammotion/aliyun/model/thing_response.py +12 -0
  16. pymammotion/aliyun/regions.py +62 -0
  17. pymammotion/aliyun/tea/core.py +297 -0
  18. pymammotion/aliyun/tmp_constant.py +171 -0
  19. pymammotion/bluetooth/__init__.py +1 -0
  20. pymammotion/bluetooth/ble.py +62 -0
  21. pymammotion/bluetooth/ble_message.py +676 -0
  22. pymammotion/bluetooth/const.py +27 -0
  23. pymammotion/bluetooth/data/__init__.py +0 -0
  24. pymammotion/bluetooth/data/convert.py +25 -0
  25. pymammotion/bluetooth/data/framectrldata.py +40 -0
  26. pymammotion/bluetooth/data/notifydata.py +62 -0
  27. pymammotion/bluetooth/model/__init__.py +0 -0
  28. pymammotion/bluetooth/model/atomic_integer.py +54 -0
  29. pymammotion/const.py +13 -0
  30. pymammotion/data/__init__.py +0 -0
  31. pymammotion/data/model/__init__.py +8 -0
  32. pymammotion/data/model/account.py +8 -0
  33. pymammotion/data/model/device.py +192 -0
  34. pymammotion/data/model/device_config.py +72 -0
  35. pymammotion/data/model/device_info.py +60 -0
  36. pymammotion/data/model/device_limits.py +49 -0
  37. pymammotion/data/model/enums.py +77 -0
  38. pymammotion/data/model/errors.py +12 -0
  39. pymammotion/data/model/events.py +14 -0
  40. pymammotion/data/model/generate_geojson.py +565 -0
  41. pymammotion/data/model/generate_route_information.py +26 -0
  42. pymammotion/data/model/hash_list.py +475 -0
  43. pymammotion/data/model/location.py +36 -0
  44. pymammotion/data/model/mowing_modes.py +77 -0
  45. pymammotion/data/model/rapid_state.py +45 -0
  46. pymammotion/data/model/raw_data.py +215 -0
  47. pymammotion/data/model/region_data.py +102 -0
  48. pymammotion/data/model/report_info.py +182 -0
  49. pymammotion/data/model/work.py +27 -0
  50. pymammotion/data/mower_state_manager.py +369 -0
  51. pymammotion/data/mqtt/__init__.py +1 -0
  52. pymammotion/data/mqtt/event.py +227 -0
  53. pymammotion/data/mqtt/mammotion_properties.py +276 -0
  54. pymammotion/data/mqtt/properties.py +203 -0
  55. pymammotion/data/mqtt/status.py +57 -0
  56. pymammotion/event/__init__.py +6 -0
  57. pymammotion/event/event.py +96 -0
  58. pymammotion/homeassistant/__init__.py +3 -0
  59. pymammotion/homeassistant/mower_api.py +514 -0
  60. pymammotion/homeassistant/rtk_api.py +54 -0
  61. pymammotion/http/__init__.py +0 -0
  62. pymammotion/http/encryption.py +220 -0
  63. pymammotion/http/http.py +673 -0
  64. pymammotion/http/model/__init__.py +0 -0
  65. pymammotion/http/model/camera_stream.py +31 -0
  66. pymammotion/http/model/http.py +249 -0
  67. pymammotion/http/model/response_factory.py +61 -0
  68. pymammotion/http/model/rtk.py +16 -0
  69. pymammotion/mammotion/__init__.py +0 -0
  70. pymammotion/mammotion/commands/__init__.py +0 -0
  71. pymammotion/mammotion/commands/abstract_message.py +24 -0
  72. pymammotion/mammotion/commands/mammotion_command.py +81 -0
  73. pymammotion/mammotion/commands/messages/__init__.py +0 -0
  74. pymammotion/mammotion/commands/messages/basestation.py +43 -0
  75. pymammotion/mammotion/commands/messages/driver.py +122 -0
  76. pymammotion/mammotion/commands/messages/media.py +87 -0
  77. pymammotion/mammotion/commands/messages/navigation.py +564 -0
  78. pymammotion/mammotion/commands/messages/network.py +205 -0
  79. pymammotion/mammotion/commands/messages/ota.py +38 -0
  80. pymammotion/mammotion/commands/messages/system.py +330 -0
  81. pymammotion/mammotion/commands/messages/video.py +33 -0
  82. pymammotion/mammotion/control/__init__.py +0 -0
  83. pymammotion/mammotion/control/joystick.py +145 -0
  84. pymammotion/mammotion/devices/__init__.py +29 -0
  85. pymammotion/mammotion/devices/base.py +163 -0
  86. pymammotion/mammotion/devices/mammotion.py +571 -0
  87. pymammotion/mammotion/devices/mammotion_bluetooth.py +496 -0
  88. pymammotion/mammotion/devices/mammotion_cloud.py +355 -0
  89. pymammotion/mammotion/devices/mammotion_mower_ble.py +48 -0
  90. pymammotion/mammotion/devices/mammotion_mower_cloud.py +39 -0
  91. pymammotion/mammotion/devices/managers/managers.py +81 -0
  92. pymammotion/mammotion/devices/mower_device.py +120 -0
  93. pymammotion/mammotion/devices/mower_manager.py +107 -0
  94. pymammotion/mammotion/devices/rtk_ble.py +89 -0
  95. pymammotion/mammotion/devices/rtk_cloud.py +115 -0
  96. pymammotion/mammotion/devices/rtk_device.py +50 -0
  97. pymammotion/mammotion/devices/rtk_manager.py +125 -0
  98. pymammotion/mqtt/__init__.py +6 -0
  99. pymammotion/mqtt/aliyun_mqtt.py +237 -0
  100. pymammotion/mqtt/linkkit/__init__.py +5 -0
  101. pymammotion/mqtt/linkkit/h2client.py +585 -0
  102. pymammotion/mqtt/linkkit/linkkit.py +3025 -0
  103. pymammotion/mqtt/mammotion_future.py +26 -0
  104. pymammotion/mqtt/mammotion_mqtt.py +214 -0
  105. pymammotion/mqtt/mqtt_models.py +66 -0
  106. pymammotion/proto/__init__.py +4841 -0
  107. pymammotion/proto/basestation.proto +51 -0
  108. pymammotion/proto/basestation_pb2.py +35 -0
  109. pymammotion/proto/basestation_pb2.pyi +89 -0
  110. pymammotion/proto/common.proto +7 -0
  111. pymammotion/proto/common_pb2.py +25 -0
  112. pymammotion/proto/common_pb2.pyi +13 -0
  113. pymammotion/proto/dev_net.proto +321 -0
  114. pymammotion/proto/dev_net_pb2.py +111 -0
  115. pymammotion/proto/dev_net_pb2.pyi +515 -0
  116. pymammotion/proto/luba_msg.proto +76 -0
  117. pymammotion/proto/luba_msg_pb2.py +41 -0
  118. pymammotion/proto/luba_msg_pb2.pyi +97 -0
  119. pymammotion/proto/luba_mul.proto +129 -0
  120. pymammotion/proto/luba_mul_pb2.py +61 -0
  121. pymammotion/proto/luba_mul_pb2.pyi +178 -0
  122. pymammotion/proto/mctrl_driver.proto +107 -0
  123. pymammotion/proto/mctrl_driver_pb2.py +57 -0
  124. pymammotion/proto/mctrl_driver_pb2.pyi +167 -0
  125. pymammotion/proto/mctrl_nav.proto +591 -0
  126. pymammotion/proto/mctrl_nav_pb2.py +136 -0
  127. pymammotion/proto/mctrl_nav_pb2.pyi +1067 -0
  128. pymammotion/proto/mctrl_ota.proto +80 -0
  129. pymammotion/proto/mctrl_ota_pb2.py +45 -0
  130. pymammotion/proto/mctrl_ota_pb2.pyi +128 -0
  131. pymammotion/proto/mctrl_pept.proto +34 -0
  132. pymammotion/proto/mctrl_pept_pb2.py +33 -0
  133. pymammotion/proto/mctrl_pept_pb2.pyi +58 -0
  134. pymammotion/proto/mctrl_sys.proto +741 -0
  135. pymammotion/proto/mctrl_sys_pb2.py +206 -0
  136. pymammotion/proto/mctrl_sys_pb2.pyi +1213 -0
  137. pymammotion/proto/message_pool.py +3 -0
  138. pymammotion/proto/py.typed +0 -0
  139. pymammotion/py.typed +0 -0
  140. pymammotion/utility/constant/__init__.py +3 -0
  141. pymammotion/utility/constant/device_constant.py +315 -0
  142. pymammotion/utility/conversions.py +5 -0
  143. pymammotion/utility/datatype_converter.py +124 -0
  144. pymammotion/utility/device_config.py +755 -0
  145. pymammotion/utility/device_type.py +489 -0
  146. pymammotion/utility/map.py +259 -0
  147. pymammotion/utility/movement.py +18 -0
  148. pymammotion/utility/mur_mur_hash.py +159 -0
  149. pymammotion/utility/periodic.py +106 -0
  150. pymammotion/utility/rocker_util.py +194 -0
  151. pymammotion-0.5.69.dist-info/METADATA +93 -0
  152. pymammotion-0.5.69.dist-info/RECORD +154 -0
  153. pymammotion-0.5.69.dist-info/WHEEL +4 -0
  154. pymammotion-0.5.69.dist-info/licenses/LICENSE +674 -0
@@ -0,0 +1,489 @@
1
+ from enum import Enum
2
+
3
+ LubaProductKey = [
4
+ "a1UBFdq6nNz",
5
+ "a1x0zHD3Xop",
6
+ "a1pvCnb3PPu",
7
+ "a1kweSOPylG",
8
+ "a1JFpmAV5Ur",
9
+ "a1BmXWlsdbA",
10
+ "a1jOhAYOIG8",
11
+ "a1K4Ki2L5rK",
12
+ "a1ae1QnXZGf",
13
+ "a1nf9kRBWoH",
14
+ "a1ZU6bdGjaM",
15
+ ]
16
+
17
+ LubaVProductKey = ["a1iMygIwxFC", "a1LLmy1zc0j", "a1LLmy1zc0j"]
18
+
19
+ LubaVProProductKey = ["a1mb8v6tnAa", "a1pHsTqyoPR"]
20
+
21
+ Luba2MiniProductKey = ["a1L5ZfJIxGl", "a1dCWYFLROK"]
22
+
23
+ YukaProductKey = ["a1kT0TlYEza", "a1IQV0BrnXb"]
24
+
25
+ YukaPlusProductKey = ["a1lNESu9VST", "a1zAEzmvWDa"]
26
+
27
+ YukaMiniProductKey = ["a1BqmEWMRbX", "a1biqVGvxrE"]
28
+
29
+ RTKProductKey = ["a1qXkZ5P39W", "a1Nc68bGZzX"]
30
+
31
+ YukaMVProductKey = ["a1jFe8HzcDb", "a16cz0iXgUJ", "USpE46bNTC7", "pdA6uJrBfjz"]
32
+
33
+ LubaLDProductKey = ["a1jDMfG2Fgj", "a1vtZq9LUFS"]
34
+
35
+ LubaVAProductKey = ["a1Ce85210Be", "a1BBOJnnjb9"]
36
+
37
+ YukaMLProductKey = ["a1OWGO8WXbh", "a1s6znKxGvI"]
38
+
39
+ LubaMDProductKey = ["a1T6VTFTc0C", "a14iRDqMepW"]
40
+
41
+ LubaMBProductKey = ["a1pb9toor70"]
42
+
43
+ RTKNBProductKey = ["a1NfZqdSREf", "a1ZuQVL7UiN"]
44
+
45
+ LubaLAProductKey = ["CDYuKXTYrSP"]
46
+
47
+ YukaMN100ProductKey = ["NnbeYtaEUGE"]
48
+
49
+ Cm900ProductKey = ["zkRuTK9KsXG", "6DbgVh2Qs5m"]
50
+
51
+
52
+ class DeviceType(Enum):
53
+ UNKNOWN = (-1, "UNKNOWN", "Unknown")
54
+ RTK = (0, "RTK", "RTK")
55
+ LUBA = (1, "Luba", "Luba 1")
56
+ LUBA_2 = (2, "Luba-VS", "Luba 2")
57
+ LUBA_YUKA = (3, "Yuka-", "Yuka")
58
+ YUKA_MINI = (4, "Yuka-MN", "Yuka Mini")
59
+ YUKA_MINI2 = (5, "Yuka-YM", "Yuka Mini 2")
60
+ LUBA_VP = (6, "Luba-VP", "Luba VP")
61
+ LUBA_MN = (7, "Luba-MN", "HM430")
62
+ YUKA_VP = (8, "Yuka-VP", "MN241")
63
+ SPINO = (9, "Spino", "Spino")
64
+ RTK3A1 = (10, "RBSA1", "RBS03A1")
65
+ LUBA_LD = (11, "Luba-LD", "HM431")
66
+ RTK3A0 = (12, "RBSA0", "RBS03A0")
67
+ RTK3A2 = (13, "RBSA2", "RBS03A2")
68
+ YUKA_MINIV = (14, "Yuka-MV", "MN231")
69
+ LUBA_VA = (15, "Luba-VA", "HM442")
70
+ YUKA_ML = (16, "Yuka-ML", "MN232")
71
+ LUBA_MD = (17, "Luba-MD", "HM433")
72
+ LUBA_LA = (18, "Luba-LA", "HM432")
73
+ SWIMMINGPOOL_S1 = (19, "Spino-S1", "Spino-S1")
74
+ SWIMMINGPOOL_E1 = (20, "Spino-E1", "Spino-E1")
75
+ YUKA_MN100 = (21, "Ezy-VT", "MN100")
76
+ RTKNB = (22, "NB", "NB")
77
+ LUBA_MB = (23, "Luba-MB", "HM434")
78
+ CM900 = (24, "Kumar-MK", "KM01")
79
+
80
+ def __init__(self, value: int, name: str, model: str) -> None:
81
+ self._value = value
82
+ self._name = name
83
+ self._model = model
84
+
85
+ def get_name(self) -> str:
86
+ return self._name
87
+
88
+ def get_model(self):
89
+ return self._model
90
+
91
+ def get_value(self):
92
+ return self._value
93
+
94
+ def get_value_str(self):
95
+ return str(self._value)
96
+
97
+ def set_value(self, value) -> None:
98
+ self._value = value
99
+
100
+ @staticmethod
101
+ def valueof(value):
102
+ """Return the corresponding DeviceType based on the input value.
103
+
104
+ This function takes an integer value as input and returns the
105
+ corresponding DeviceType enum value.
106
+
107
+ Args:
108
+ value (int): An integer representing the device type.
109
+
110
+ Returns:
111
+ DeviceType: The corresponding DeviceType enum value based on the input value.
112
+
113
+ """
114
+
115
+ if value == 0:
116
+ return DeviceType.RTK
117
+ elif value == 1:
118
+ return DeviceType.LUBA
119
+ elif value == 2:
120
+ return DeviceType.LUBA_2
121
+ elif value == 3:
122
+ return DeviceType.LUBA_YUKA
123
+ elif value == 4:
124
+ return DeviceType.YUKA_MINI
125
+ elif value == 5:
126
+ return DeviceType.YUKA_MINI2
127
+ elif value == 6:
128
+ return DeviceType.LUBA_VP
129
+ elif value == 7:
130
+ return DeviceType.LUBA_MN
131
+ elif value == 8:
132
+ return DeviceType.YUKA_VP
133
+ elif value == 9:
134
+ return DeviceType.SPINO
135
+ elif value == 10:
136
+ return DeviceType.RTK3A1
137
+ elif value == 11:
138
+ return DeviceType.LUBA_LD
139
+ elif value == 12:
140
+ return DeviceType.RTK3A0
141
+ elif value == 13:
142
+ return DeviceType.RTK3A2
143
+ elif value == 14:
144
+ return DeviceType.YUKA_MINIV
145
+ elif value == 15:
146
+ return DeviceType.LUBA_VA
147
+ elif value == 16:
148
+ return DeviceType.YUKA_ML
149
+ elif value == 17:
150
+ return DeviceType.LUBA_MD
151
+ elif value == 18:
152
+ return DeviceType.LUBA_LA
153
+ elif value == 19:
154
+ return DeviceType.SWIMMINGPOOL_S1
155
+ elif value == 20:
156
+ return DeviceType.SWIMMINGPOOL_E1
157
+ elif value == 21:
158
+ return DeviceType.YUKA_MN100
159
+ elif value == 22:
160
+ return DeviceType.RTKNB
161
+ elif value == 23:
162
+ return DeviceType.LUBA_MB
163
+ elif value == 24:
164
+ return DeviceType.CM900
165
+ else:
166
+ return DeviceType.UNKNOWN
167
+
168
+ @staticmethod
169
+ def value_of_str(device_name: str, product_key: str = ""):
170
+ """Determine the type of device based on the provided device name and
171
+ product key.
172
+
173
+ Args:
174
+ device_name (str): The name of the device.
175
+ product_key (str?): The product key associated with the device. Defaults to "".
176
+
177
+ Returns:
178
+ DeviceType: The type of device based on the provided information.
179
+
180
+ """
181
+
182
+ if not device_name and not product_key:
183
+ return DeviceType.UNKNOWN
184
+
185
+ try:
186
+ substring = device_name[:3]
187
+ substring2 = device_name[:7]
188
+
189
+ if DeviceType.RTK.get_name() in substring or DeviceType.contain_rtk_product_key(product_key):
190
+ return DeviceType.RTK
191
+ elif DeviceType.LUBA_2.get_name() in substring2 or DeviceType.contain_luba_2_product_key(product_key):
192
+ return DeviceType.LUBA_2
193
+ elif DeviceType.LUBA_LD.get_name() in substring2:
194
+ return DeviceType.LUBA_LD
195
+ elif DeviceType.LUBA_VP.get_name() in substring2:
196
+ return DeviceType.LUBA_VP
197
+ elif DeviceType.LUBA_MN.get_name() in substring2:
198
+ return DeviceType.LUBA_MN
199
+ elif DeviceType.YUKA_VP.get_name() in substring2:
200
+ return DeviceType.YUKA_VP
201
+ elif DeviceType.YUKA_MINI.get_name() in substring2:
202
+ return DeviceType.YUKA_MINI
203
+ elif DeviceType.YUKA_MINI2.get_name() in substring2:
204
+ return DeviceType.YUKA_MINI2
205
+ elif DeviceType.LUBA_YUKA.get_name() in substring2:
206
+ return DeviceType.LUBA_YUKA
207
+ elif DeviceType.LUBA.get_name() in substring2 or DeviceType.contain_luba_product_key(product_key):
208
+ return DeviceType.LUBA
209
+ elif DeviceType.SPINO.get_name() in substring2:
210
+ return DeviceType.SPINO
211
+ elif DeviceType.RTK3A1.get_name() in substring2:
212
+ return DeviceType.RTK3A1
213
+ elif DeviceType.RTK3A0.get_name() in substring2:
214
+ return DeviceType.RTK3A0
215
+ elif DeviceType.RTK3A2.get_name() in substring2:
216
+ return DeviceType.RTK3A2
217
+ elif DeviceType.YUKA_MINIV.get_name() in substring2:
218
+ return DeviceType.YUKA_MINIV
219
+ elif DeviceType.LUBA_VA.get_name() in substring2:
220
+ return DeviceType.LUBA_VA
221
+ elif DeviceType.YUKA_ML.get_name() in substring2:
222
+ return DeviceType.YUKA_ML
223
+ elif DeviceType.LUBA_MD.get_name() in substring2:
224
+ return DeviceType.LUBA_MD
225
+ elif DeviceType.LUBA_LA.get_name() in substring2:
226
+ return DeviceType.LUBA_LA
227
+ elif DeviceType.SWIMMINGPOOL_S1.get_name() in substring2:
228
+ return DeviceType.SWIMMINGPOOL_S1
229
+ elif DeviceType.SWIMMINGPOOL_E1.get_name() in substring2:
230
+ return DeviceType.SWIMMINGPOOL_E1
231
+ elif DeviceType.YUKA_MN100.get_name() in substring2:
232
+ return DeviceType.YUKA_MN100
233
+ elif DeviceType.RTKNB.get_name() in substring2:
234
+ return DeviceType.RTKNB
235
+ elif DeviceType.LUBA_MB.get_name() in substring2:
236
+ return DeviceType.LUBA_MB
237
+ elif DeviceType.CM900.get_name() in substring2:
238
+ return DeviceType.CM900
239
+ else:
240
+ return DeviceType.UNKNOWN
241
+ except Exception:
242
+ return DeviceType.UNKNOWN
243
+
244
+ @staticmethod
245
+ def has_4g(device_name: str, product_key: str = ""):
246
+ """Check if the device has 4G capability based on the device name and
247
+ optional product key.
248
+
249
+ This function determines the device type based on the device name and
250
+ product key (if provided). It then checks if the device type has a value
251
+ greater than or equal to the 4G threshold.
252
+
253
+ Args:
254
+ device_name (str): The name of the device.
255
+ product_key (str?): The product key associated with the device. Defaults to "".
256
+
257
+ Returns:
258
+ bool: True if the device has 4G capability, False otherwise.
259
+
260
+ """
261
+
262
+ if not product_key:
263
+ device_type = DeviceType.value_of_str(device_name)
264
+ else:
265
+ device_type = DeviceType.value_of_str(device_name, product_key)
266
+
267
+ return device_type.get_value() >= DeviceType.LUBA_2.get_value()
268
+
269
+ @staticmethod
270
+ def is_luba1(device_name: str, product_key: str = ""):
271
+ """Check if the given device is of type LUBA.
272
+
273
+ This function determines if the device specified by 'device_name' is of
274
+ type LUBA. If 'product_key' is provided, it is used to further identify
275
+ the device type.
276
+
277
+ Args:
278
+ device_name (str): The name of the device.
279
+ product_key (str?): The product key associated with the device. Defaults to "".
280
+
281
+ Returns:
282
+ bool: True if the device is of type LUBA, False otherwise.
283
+
284
+ """
285
+
286
+ if not product_key:
287
+ device_type = DeviceType.value_of_str(device_name)
288
+ else:
289
+ device_type = DeviceType.value_of_str(device_name, product_key)
290
+
291
+ return device_type.get_value() == DeviceType.LUBA.get_value()
292
+
293
+ @staticmethod
294
+ def is_luba_pro(device_name: str, product_key: str = ""):
295
+ """Check if the device type is LUBA 2 or higher based on the device name
296
+ and optional product key.
297
+
298
+ Args:
299
+ device_name (str): The name of the device.
300
+ product_key (str?): The product key associated with the device. Defaults to "".
301
+
302
+ Returns:
303
+ bool: True if the device type is LUBA 2 or higher, False otherwise.
304
+
305
+ """
306
+
307
+ if not product_key:
308
+ device_type = DeviceType.value_of_str(device_name)
309
+ else:
310
+ device_type = DeviceType.value_of_str(device_name, product_key)
311
+
312
+ return (
313
+ device_type.get_value() >= DeviceType.LUBA_2.get_value()
314
+ and device_type.get_value() != DeviceType.SPINO.get_value()
315
+ and not DeviceType.is_rtk(device_name, product_key)
316
+ )
317
+
318
+ @staticmethod
319
+ def is_yuka(device_name: str):
320
+ """Check if the given device name corresponds to a LUBA_YUKA device type.
321
+
322
+ Args:
323
+ device_name (str): The name of the device to be checked.
324
+
325
+ Returns:
326
+ bool: True if the device type is LUBA_YUKA, False otherwise.
327
+
328
+ """
329
+
330
+ return (
331
+ DeviceType.value_of_str(device_name).get_value() == DeviceType.LUBA_YUKA.get_value()
332
+ or DeviceType.value_of_str(device_name).get_value() == DeviceType.YUKA_VP.get_value()
333
+ or DeviceType.value_of_str(device_name).get_value() == DeviceType.YUKA_MINI.get_value()
334
+ or DeviceType.value_of_str(device_name).get_value() == DeviceType.YUKA_MINI2.get_value()
335
+ or DeviceType.value_of_str(device_name).get_value() == DeviceType.YUKA_MINIV.get_value()
336
+ or DeviceType.value_of_str(device_name).get_value() == DeviceType.YUKA_ML.get_value()
337
+ or DeviceType.value_of_str(device_name).get_value() == DeviceType.YUKA_MN100.get_value()
338
+ )
339
+
340
+ @staticmethod
341
+ def is_yuka_mini(device_name: str):
342
+ return (
343
+ DeviceType.value_of_str(device_name).get_value() == DeviceType.YUKA_MINI.get_value()
344
+ or DeviceType.value_of_str(device_name).get_value() == DeviceType.YUKA_MINI2.get_value()
345
+ )
346
+
347
+ @staticmethod
348
+ def is_mini_or_x_series(device_name: str):
349
+ """IsNewDeviceType returns if a device is part of the x or mini series."""
350
+
351
+ return (
352
+ DeviceType.value_of_str(device_name).get_value() == DeviceType.YUKA_MINI.get_value()
353
+ or DeviceType.value_of_str(device_name).get_value() == DeviceType.YUKA_MINI2.get_value()
354
+ or DeviceType.value_of_str(device_name).get_value() == DeviceType.YUKA_MINIV.get_value()
355
+ or DeviceType.value_of_str(device_name).get_value() == DeviceType.YUKA_VP.get_value()
356
+ or DeviceType.value_of_str(device_name).get_value() == DeviceType.LUBA_MN.get_value()
357
+ or DeviceType.value_of_str(device_name).get_value() == DeviceType.LUBA_VP.get_value()
358
+ or DeviceType.value_of_str(device_name).get_value() == DeviceType.LUBA_LD.get_value()
359
+ )
360
+
361
+ @staticmethod
362
+ def is_rtk(device_name: str, product_key: str = ""):
363
+ """Check if the device type is within the range of RTK devices.
364
+
365
+ This function determines if the device type corresponding to the given
366
+ device name and optional product key falls within the range of RTK
367
+ (Real-Time Kinematic) devices.
368
+
369
+ Args:
370
+ device_name (str): The name of the device.
371
+ product_key (str?): The product key associated with the device. Defaults to "".
372
+
373
+ Returns:
374
+ bool: True if the device type is within the RTK range, False otherwise.
375
+
376
+ """
377
+
378
+ if not product_key:
379
+ device_type = DeviceType.value_of_str(device_name)
380
+ else:
381
+ device_type = DeviceType.value_of_str(device_name, product_key)
382
+
383
+ return (
384
+ DeviceType.RTK.get_value() == device_type.get_value()
385
+ or DeviceType.RTK3A0.get_value() == device_type.get_value()
386
+ or DeviceType.RTK3A1.get_value() == device_type.get_value()
387
+ or DeviceType.RTK3A2.get_value() == device_type.get_value()
388
+ or DeviceType.RTKNB.get_value() == device_type.get_value()
389
+ )
390
+
391
+ @staticmethod
392
+ def contain_rtk_product_key(product_key) -> bool:
393
+ """Check if the given product key is in a predefined list of RTK product
394
+ keys.
395
+
396
+ Args:
397
+ product_key (str): The product key to be checked.
398
+
399
+ Returns:
400
+ bool: True if the product key is in the predefined list, False otherwise.
401
+
402
+ """
403
+
404
+ if not product_key:
405
+ return False
406
+ return product_key in RTKProductKey
407
+
408
+ @staticmethod
409
+ def contain_luba_product_key(product_key) -> bool:
410
+ """Check if the given product key is in the list of valid product keys.
411
+
412
+ Args:
413
+ product_key (str): The product key to be checked.
414
+
415
+ Returns:
416
+ bool: True if the product key is in the list of valid keys, False otherwise.
417
+
418
+ """
419
+
420
+ if not product_key:
421
+ return False
422
+ return product_key in LubaProductKey
423
+
424
+ @staticmethod
425
+ def contain_luba_2_product_key(product_key) -> bool:
426
+ """Check if the given product key is present in a predefined list.
427
+
428
+ Args:
429
+ product_key (str): The product key to be checked.
430
+
431
+ Returns:
432
+ bool: True if the product key is in the predefined list, False otherwise.
433
+
434
+ """
435
+
436
+ if not product_key:
437
+ return False
438
+ return product_key in LubaVProductKey
439
+
440
+ @staticmethod
441
+ def contain_yuka_product_key(product_key) -> bool:
442
+ """Check if the given product key is present in a predefined list.
443
+
444
+ Args:
445
+ product_key (str): The product key to be checked.
446
+
447
+ Returns:
448
+ bool: True if the product key is in the predefined list, False otherwise.
449
+
450
+ """
451
+
452
+ if not product_key:
453
+ return False
454
+ return product_key in YukaProductKey
455
+
456
+ @staticmethod
457
+ def contain_yuka_mini_product_key(product_key) -> bool:
458
+ """Check if the given product key is present in a predefined list.
459
+
460
+ Args:
461
+ product_key (str): The product key to be checked.
462
+
463
+ Returns:
464
+ bool: True if the product key is in the predefined list, False otherwise.
465
+
466
+ """
467
+
468
+ if not product_key:
469
+ return False
470
+ return product_key in YukaMiniProductKey
471
+
472
+ @staticmethod
473
+ def contain_yuka_plus_product_key(product_key) -> bool:
474
+ """Check if the given product key is present in a predefined list.
475
+
476
+ Args:
477
+ product_key (str): The product key to be checked.
478
+
479
+ Returns:
480
+ bool: True if the product key is in the predefined list, False otherwise.
481
+
482
+ """
483
+
484
+ if not product_key:
485
+ return False
486
+ return product_key in YukaPlusProductKey
487
+
488
+ def is_support_video(self):
489
+ return self != DeviceType.LUBA