pymammotion 0.1.1__py3-none-any.whl → 0.1.3__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.
- pymammotion/data/model/device.py +18 -1
- pymammotion/data/model/location.py +5 -3
- pymammotion/data/model/report_info.py +121 -0
- pymammotion/data/state_manager.py +1 -1
- pymammotion/mammotion/devices/mammotion.py +1 -1
- pymammotion/proto/basestation.proto +43 -0
- pymammotion/proto/basestation.py +59 -0
- pymammotion/proto/basestation_pb2.py +33 -0
- pymammotion/proto/basestation_pb2.pyi +75 -0
- pymammotion/proto/dev_net.proto +4 -4
- pymammotion/proto/dev_net.py +2 -2
- pymammotion/proto/dev_net_pb2.py +1 -1
- pymammotion/proto/dev_net_pb2.pyi +10 -10
- pymammotion/proto/luba_msg.proto +2 -0
- pymammotion/proto/luba_msg.py +2 -1
- pymammotion/proto/luba_msg_pb2.py +12 -11
- pymammotion/proto/luba_msg_pb2.pyi +5 -2
- pymammotion/proto/mctrl_nav.py +2 -2
- pymammotion/proto/mctrl_sys.proto +2 -2
- pymammotion/proto/mctrl_sys.py +18 -19
- pymammotion/proto/mctrl_sys_pb2.py +98 -98
- pymammotion/proto/mctrl_sys_pb2.pyi +6 -6
- pymammotion/utility/map.py +70 -0
- {pymammotion-0.1.1.dist-info → pymammotion-0.1.3.dist-info}/METADATA +2 -1
- {pymammotion-0.1.1.dist-info → pymammotion-0.1.3.dist-info}/RECORD +27 -21
- {pymammotion-0.1.1.dist-info → pymammotion-0.1.3.dist-info}/LICENSE +0 -0
- {pymammotion-0.1.1.dist-info → pymammotion-0.1.3.dist-info}/WHEEL +0 -0
pymammotion/data/model/device.py
CHANGED
|
@@ -2,9 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
from dataclasses import dataclass
|
|
4
4
|
|
|
5
|
+
import betterproto
|
|
6
|
+
|
|
5
7
|
from pymammotion.data.model import HashList
|
|
6
8
|
from pymammotion.data.model.device_config import DeviceLimits
|
|
7
9
|
from pymammotion.data.model.location import Location
|
|
10
|
+
from pymammotion.data.model.report_info import ReportData
|
|
8
11
|
from pymammotion.proto.dev_net import DevNet
|
|
9
12
|
from pymammotion.proto.luba_msg import LubaMsg
|
|
10
13
|
from pymammotion.proto.luba_mul import SocMul
|
|
@@ -12,7 +15,8 @@ from pymammotion.proto.mctrl_driver import MctlDriver
|
|
|
12
15
|
from pymammotion.proto.mctrl_nav import MctlNav
|
|
13
16
|
from pymammotion.proto.mctrl_ota import MctlOta
|
|
14
17
|
from pymammotion.proto.mctrl_pept import MctlPept
|
|
15
|
-
from pymammotion.proto.mctrl_sys import MctlSys, MowToAppInfoT, SystemUpdateBufMsg
|
|
18
|
+
from pymammotion.proto.mctrl_sys import MctlSys, MowToAppInfoT, SystemUpdateBufMsg, ReportInfoData
|
|
19
|
+
from pymammotion.utility.map import CoordinateConverter
|
|
16
20
|
|
|
17
21
|
|
|
18
22
|
@dataclass
|
|
@@ -27,6 +31,7 @@ class MowingDevice:
|
|
|
27
31
|
self.device = LubaMsg()
|
|
28
32
|
self.map = HashList(area={}, path={}, obstacle={})
|
|
29
33
|
self.location = Location()
|
|
34
|
+
self.report_data = ReportData()
|
|
30
35
|
self.err_code_list = []
|
|
31
36
|
self.err_code_list_time = []
|
|
32
37
|
self.limits = DeviceLimits(30, 70, 0.2, 0.6)
|
|
@@ -84,6 +89,18 @@ class MowingDevice:
|
|
|
84
89
|
]
|
|
85
90
|
)
|
|
86
91
|
|
|
92
|
+
def update_report_data(self, toapp_report_data: ReportInfoData):
|
|
93
|
+
coordinate_converter = CoordinateConverter(self.location.RTK.latitude, self.location.RTK.longitude)
|
|
94
|
+
for index, location in enumerate(toapp_report_data.locations):
|
|
95
|
+
if index == 0:
|
|
96
|
+
self.location.position_type = location.pos_type
|
|
97
|
+
self.location.orientation = location.real_toward / 10000
|
|
98
|
+
self.location.device = coordinate_converter.enu_to_lla(location.real_pos_y, location.real_pos_x)
|
|
99
|
+
|
|
100
|
+
self.report_data = self.report_data.from_dict(toapp_report_data.to_dict(casing=betterproto.Casing.SNAKE))
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
|
|
87
104
|
def mow_info(self, toapp_mow_info: MowToAppInfoT):
|
|
88
105
|
pass
|
|
89
106
|
|
|
@@ -10,9 +10,9 @@ class Point:
|
|
|
10
10
|
latitude: float
|
|
11
11
|
longitude: float
|
|
12
12
|
|
|
13
|
-
def __init__(self):
|
|
14
|
-
self.latitude =
|
|
15
|
-
self.longitude =
|
|
13
|
+
def __init__(self, latitude=0.0, longitude=0.0):
|
|
14
|
+
self.latitude = latitude
|
|
15
|
+
self.longitude = longitude
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
@dataclass
|
|
@@ -33,6 +33,8 @@ class Location:
|
|
|
33
33
|
device: Point
|
|
34
34
|
RTK: Point
|
|
35
35
|
dock: Dock
|
|
36
|
+
position_type: int
|
|
37
|
+
orientation: int # 360 degree rotation +-
|
|
36
38
|
|
|
37
39
|
def __init__(self):
|
|
38
40
|
self.device = Point()
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
from dataclasses import dataclass, field
|
|
2
|
+
|
|
3
|
+
@dataclass
|
|
4
|
+
class ConnectData:
|
|
5
|
+
connect_type: int = 0
|
|
6
|
+
ble_rssi: int = 0
|
|
7
|
+
wifi_rssi: int = 0
|
|
8
|
+
|
|
9
|
+
@classmethod
|
|
10
|
+
def from_dict(cls, data: dict):
|
|
11
|
+
return cls(
|
|
12
|
+
connect_type=data.get('connect_type', 0),
|
|
13
|
+
ble_rssi=data.get('ble_rssi', 0),
|
|
14
|
+
wifi_rssi=data.get('wifi_rssi', 0)
|
|
15
|
+
)
|
|
16
|
+
|
|
17
|
+
@dataclass
|
|
18
|
+
class DeviceData:
|
|
19
|
+
sys_status: int = 0
|
|
20
|
+
charge_state: int = 0
|
|
21
|
+
battery_val: int = 0
|
|
22
|
+
sensor_status: int = 0
|
|
23
|
+
last_status: int = 0
|
|
24
|
+
sys_time_stamp: str = ""
|
|
25
|
+
|
|
26
|
+
@classmethod
|
|
27
|
+
def from_dict(cls, data: dict):
|
|
28
|
+
return cls(
|
|
29
|
+
sys_status=data.get('sys_status', 0),
|
|
30
|
+
charge_state=data.get('charge_state', 0),
|
|
31
|
+
battery_val=data.get('battery_val', 0),
|
|
32
|
+
sensor_status=data.get('sensor_status', 0),
|
|
33
|
+
last_status=data.get('last_status', 0),
|
|
34
|
+
sys_time_stamp=data.get('sys_time_stamp', "")
|
|
35
|
+
)
|
|
36
|
+
|
|
37
|
+
@dataclass
|
|
38
|
+
class RTKData:
|
|
39
|
+
status: int = 0
|
|
40
|
+
pos_level: int = 0
|
|
41
|
+
gps_stars: int = 0
|
|
42
|
+
dis_status: str = ""
|
|
43
|
+
co_view_stars: int = 0
|
|
44
|
+
|
|
45
|
+
@classmethod
|
|
46
|
+
def from_dict(cls, data: dict):
|
|
47
|
+
return cls(
|
|
48
|
+
status=data.get('status', 0),
|
|
49
|
+
pos_level=data.get('pos_level', 0),
|
|
50
|
+
gps_stars=data.get('gps_stars', 0),
|
|
51
|
+
dis_status=data.get('dis_status', ""),
|
|
52
|
+
co_view_stars=data.get('co_view_stars', 0)
|
|
53
|
+
)
|
|
54
|
+
|
|
55
|
+
@dataclass
|
|
56
|
+
class LocationData:
|
|
57
|
+
real_pos_x: int = 0
|
|
58
|
+
real_pos_y: int = 0
|
|
59
|
+
real_toward: int = 0
|
|
60
|
+
pos_type: int = 0
|
|
61
|
+
bol_hash: str = ""
|
|
62
|
+
|
|
63
|
+
@classmethod
|
|
64
|
+
def from_dict(cls, data: dict):
|
|
65
|
+
return cls(
|
|
66
|
+
real_pos_x=data.get('real_pos_x', 0),
|
|
67
|
+
real_pos_y=data.get('real_pos_y', 0),
|
|
68
|
+
real_toward=data.get('real_toward', 0),
|
|
69
|
+
pos_type=data.get('pos_type', 0),
|
|
70
|
+
bol_hash=data.get('bol_hash', "")
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
@dataclass
|
|
74
|
+
class WorkData:
|
|
75
|
+
path_hash: str = ""
|
|
76
|
+
progress: int = 0
|
|
77
|
+
area: int = 0
|
|
78
|
+
bp_info: int = 0
|
|
79
|
+
bp_hash: str = ""
|
|
80
|
+
bp_pos_x: int = 0
|
|
81
|
+
bp_pos_y: int = 0
|
|
82
|
+
real_path_num: str = ""
|
|
83
|
+
ub_zone_hash: str = ""
|
|
84
|
+
init_cfg_hash: str = ""
|
|
85
|
+
ub_ecode_hash: str = ""
|
|
86
|
+
knife_height: int = 0
|
|
87
|
+
|
|
88
|
+
@classmethod
|
|
89
|
+
def from_dict(cls, data: dict):
|
|
90
|
+
return cls(
|
|
91
|
+
path_hash=data.get('path_hash', ""),
|
|
92
|
+
progress=data.get('progress', 0),
|
|
93
|
+
area=data.get('area', 0),
|
|
94
|
+
bp_info=data.get('bp_info', 0),
|
|
95
|
+
bp_hash=data.get('bp_hash', ""),
|
|
96
|
+
bp_pos_x=data.get('bp_pos_x', 0),
|
|
97
|
+
bp_pos_y=data.get('bp_pos_y', 0),
|
|
98
|
+
real_path_num=data.get('real_path_num', ""),
|
|
99
|
+
ub_zone_hash=data.get('ub_zone_hash', ""),
|
|
100
|
+
init_cfg_hash=data.get('init_cfg_hash', ""),
|
|
101
|
+
ub_ecode_hash=data.get('ub_ecode_hash', ""),
|
|
102
|
+
knife_height=data.get('knife_height', 0)
|
|
103
|
+
)
|
|
104
|
+
|
|
105
|
+
@dataclass
|
|
106
|
+
class ReportData:
|
|
107
|
+
connect: ConnectData = field(default_factory=ConnectData)
|
|
108
|
+
dev: DeviceData = field(default_factory=DeviceData)
|
|
109
|
+
rtk: RTKData = field(default_factory=RTKData)
|
|
110
|
+
locations: list[LocationData] = field(default_factory=list)
|
|
111
|
+
work: WorkData = field(default_factory=WorkData)
|
|
112
|
+
|
|
113
|
+
@classmethod
|
|
114
|
+
def from_dict(cls, data: dict):
|
|
115
|
+
return cls(
|
|
116
|
+
connect=ConnectData.from_dict(data.get('connect', {})),
|
|
117
|
+
dev=DeviceData.from_dict(data.get('dev', {})),
|
|
118
|
+
rtk=RTKData.from_dict(data.get('rtk', {})),
|
|
119
|
+
locations=[LocationData.from_dict(loc) for loc in data.get('locations', [])],
|
|
120
|
+
work=WorkData.from_dict(data.get('work', {}))
|
|
121
|
+
)
|
|
@@ -534,12 +534,12 @@ class MammotionBaseBLEDevice(MammotionBaseDevice):
|
|
|
534
534
|
|
|
535
535
|
async def _notification_handler(self, _sender: BleakGATTCharacteristic, data: bytearray) -> None:
|
|
536
536
|
"""Handle notification responses."""
|
|
537
|
-
_LOGGER.debug("%s: Received notification: %s", self.name, data)
|
|
538
537
|
result = self._message.parseNotification(data)
|
|
539
538
|
if result == 0:
|
|
540
539
|
data = await self._message.parseBlufiNotifyData(True)
|
|
541
540
|
self._update_raw_data(data)
|
|
542
541
|
self._message.clearNotification()
|
|
542
|
+
_LOGGER.debug("%s: Received notification: %s", self.name, data)
|
|
543
543
|
else:
|
|
544
544
|
return
|
|
545
545
|
new_msg = LubaMsg().parse(data)
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
message request_basestation_info_t {
|
|
4
|
+
uint32 request_type = 1;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
message response_basestation_info_t {
|
|
8
|
+
uint64 system_status = 1;
|
|
9
|
+
uint32 app_connect_type = 2;
|
|
10
|
+
int32 ble_rssi = 3;
|
|
11
|
+
int32 wifi_rssi = 4;
|
|
12
|
+
uint64 sats_num = 5;
|
|
13
|
+
int64 lora_scan = 6;
|
|
14
|
+
int64 lora_channel = 7;
|
|
15
|
+
int64 lora_locid = 8;
|
|
16
|
+
int64 lora_netid = 9;
|
|
17
|
+
uint64 rtk_status = 10;
|
|
18
|
+
int32 lowpower_status = 11;
|
|
19
|
+
int32 mqtt_rtk_status = 12;
|
|
20
|
+
int32 rtk_channel = 13;
|
|
21
|
+
int32 rtk_switch = 14;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
message app_to_base_mqtt_rtk_t {
|
|
25
|
+
int32 rtk_switch = 1;
|
|
26
|
+
string rtk_url = 2;
|
|
27
|
+
int32 rtk_port = 3;
|
|
28
|
+
string rtk_username = 4;
|
|
29
|
+
string rtk_password = 5;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
message base_to_app_mqtt_rtk_t {
|
|
33
|
+
int32 rtk_switch_status = 1;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
message BaseStation {
|
|
37
|
+
oneof BaseStationSubType {
|
|
38
|
+
request_basestation_info_t to_dev = 1;
|
|
39
|
+
response_basestation_info_t to_app = 2;
|
|
40
|
+
app_to_base_mqtt_rtk_t app_to_base_mqtt_rtk_msg = 3;
|
|
41
|
+
base_to_app_mqtt_rtk_t base_to_app_mqtt_rtk_msg = 4;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
2
|
+
# sources: pymammotion/proto/basestation.proto
|
|
3
|
+
# plugin: python-betterproto
|
|
4
|
+
from dataclasses import dataclass
|
|
5
|
+
|
|
6
|
+
import betterproto
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
@dataclass
|
|
10
|
+
class RequestBasestationInfoT(betterproto.Message):
|
|
11
|
+
request_type: int = betterproto.uint32_field(1)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@dataclass
|
|
15
|
+
class ResponseBasestationInfoT(betterproto.Message):
|
|
16
|
+
system_status: int = betterproto.uint64_field(1)
|
|
17
|
+
app_connect_type: int = betterproto.uint32_field(2)
|
|
18
|
+
ble_rssi: int = betterproto.int32_field(3)
|
|
19
|
+
wifi_rssi: int = betterproto.int32_field(4)
|
|
20
|
+
sats_num: int = betterproto.uint64_field(5)
|
|
21
|
+
lora_scan: int = betterproto.int64_field(6)
|
|
22
|
+
lora_channel: int = betterproto.int64_field(7)
|
|
23
|
+
lora_locid: int = betterproto.int64_field(8)
|
|
24
|
+
lora_netid: int = betterproto.int64_field(9)
|
|
25
|
+
rtk_status: int = betterproto.uint64_field(10)
|
|
26
|
+
lowpower_status: int = betterproto.int32_field(11)
|
|
27
|
+
mqtt_rtk_status: int = betterproto.int32_field(12)
|
|
28
|
+
rtk_channel: int = betterproto.int32_field(13)
|
|
29
|
+
rtk_switch: int = betterproto.int32_field(14)
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
@dataclass
|
|
33
|
+
class AppToBaseMqttRtkT(betterproto.Message):
|
|
34
|
+
rtk_switch: int = betterproto.int32_field(1)
|
|
35
|
+
rtk_url: str = betterproto.string_field(2)
|
|
36
|
+
rtk_port: int = betterproto.int32_field(3)
|
|
37
|
+
rtk_username: str = betterproto.string_field(4)
|
|
38
|
+
rtk_password: str = betterproto.string_field(5)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
@dataclass
|
|
42
|
+
class BaseToAppMqttRtkT(betterproto.Message):
|
|
43
|
+
rtk_switch_status: int = betterproto.int32_field(1)
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
@dataclass
|
|
47
|
+
class BaseStation(betterproto.Message):
|
|
48
|
+
to_dev: "RequestBasestationInfoT" = betterproto.message_field(
|
|
49
|
+
1, group="BaseStationSubType"
|
|
50
|
+
)
|
|
51
|
+
to_app: "ResponseBasestationInfoT" = betterproto.message_field(
|
|
52
|
+
2, group="BaseStationSubType"
|
|
53
|
+
)
|
|
54
|
+
app_to_base_mqtt_rtk_msg: "AppToBaseMqttRtkT" = betterproto.message_field(
|
|
55
|
+
3, group="BaseStationSubType"
|
|
56
|
+
)
|
|
57
|
+
base_to_app_mqtt_rtk_msg: "BaseToAppMqttRtkT" = betterproto.message_field(
|
|
58
|
+
4, group="BaseStationSubType"
|
|
59
|
+
)
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# source: pymammotion/proto/basestation.proto
|
|
4
|
+
"""Generated protocol buffer code."""
|
|
5
|
+
from google.protobuf.internal import builder as _builder
|
|
6
|
+
from google.protobuf import descriptor as _descriptor
|
|
7
|
+
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
8
|
+
from google.protobuf import symbol_database as _symbol_database
|
|
9
|
+
# @@protoc_insertion_point(imports)
|
|
10
|
+
|
|
11
|
+
_sym_db = _symbol_database.Default()
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n#pymammotion/proto/basestation.proto\"2\n\x1arequest_basestation_info_t\x12\x14\n\x0crequest_type\x18\x01 \x01(\r\"\xc5\x02\n\x1bresponse_basestation_info_t\x12\x15\n\rsystem_status\x18\x01 \x01(\x04\x12\x18\n\x10\x61pp_connect_type\x18\x02 \x01(\r\x12\x10\n\x08\x62le_rssi\x18\x03 \x01(\x05\x12\x11\n\twifi_rssi\x18\x04 \x01(\x05\x12\x10\n\x08sats_num\x18\x05 \x01(\x04\x12\x11\n\tlora_scan\x18\x06 \x01(\x03\x12\x14\n\x0clora_channel\x18\x07 \x01(\x03\x12\x12\n\nlora_locid\x18\x08 \x01(\x03\x12\x12\n\nlora_netid\x18\t \x01(\x03\x12\x12\n\nrtk_status\x18\n \x01(\x04\x12\x17\n\x0flowpower_status\x18\x0b \x01(\x05\x12\x17\n\x0fmqtt_rtk_status\x18\x0c \x01(\x05\x12\x13\n\x0brtk_channel\x18\r \x01(\x05\x12\x12\n\nrtk_switch\x18\x0e \x01(\x05\"{\n\x16\x61pp_to_base_mqtt_rtk_t\x12\x12\n\nrtk_switch\x18\x01 \x01(\x05\x12\x0f\n\x07rtk_url\x18\x02 \x01(\t\x12\x10\n\x08rtk_port\x18\x03 \x01(\x05\x12\x14\n\x0crtk_username\x18\x04 \x01(\t\x12\x14\n\x0crtk_password\x18\x05 \x01(\t\"3\n\x16\x62\x61se_to_app_mqtt_rtk_t\x12\x19\n\x11rtk_switch_status\x18\x01 \x01(\x05\"\xfc\x01\n\x0b\x42\x61seStation\x12-\n\x06to_dev\x18\x01 \x01(\x0b\x32\x1b.request_basestation_info_tH\x00\x12.\n\x06to_app\x18\x02 \x01(\x0b\x32\x1c.response_basestation_info_tH\x00\x12;\n\x18\x61pp_to_base_mqtt_rtk_msg\x18\x03 \x01(\x0b\x32\x17.app_to_base_mqtt_rtk_tH\x00\x12;\n\x18\x62\x61se_to_app_mqtt_rtk_msg\x18\x04 \x01(\x0b\x32\x17.base_to_app_mqtt_rtk_tH\x00\x42\x14\n\x12\x42\x61seStationSubTypeb\x06proto3')
|
|
17
|
+
|
|
18
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals())
|
|
19
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'pymammotion.proto.basestation_pb2', globals())
|
|
20
|
+
if _descriptor._USE_C_DESCRIPTORS == False:
|
|
21
|
+
|
|
22
|
+
DESCRIPTOR._options = None
|
|
23
|
+
_REQUEST_BASESTATION_INFO_T._serialized_start=39
|
|
24
|
+
_REQUEST_BASESTATION_INFO_T._serialized_end=89
|
|
25
|
+
_RESPONSE_BASESTATION_INFO_T._serialized_start=92
|
|
26
|
+
_RESPONSE_BASESTATION_INFO_T._serialized_end=417
|
|
27
|
+
_APP_TO_BASE_MQTT_RTK_T._serialized_start=419
|
|
28
|
+
_APP_TO_BASE_MQTT_RTK_T._serialized_end=542
|
|
29
|
+
_BASE_TO_APP_MQTT_RTK_T._serialized_start=544
|
|
30
|
+
_BASE_TO_APP_MQTT_RTK_T._serialized_end=595
|
|
31
|
+
_BASESTATION._serialized_start=598
|
|
32
|
+
_BASESTATION._serialized_end=850
|
|
33
|
+
# @@protoc_insertion_point(module_scope)
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
from google.protobuf import descriptor as _descriptor
|
|
2
|
+
from google.protobuf import message as _message
|
|
3
|
+
from typing import ClassVar as _ClassVar, Mapping as _Mapping, Optional as _Optional, Union as _Union
|
|
4
|
+
|
|
5
|
+
DESCRIPTOR: _descriptor.FileDescriptor
|
|
6
|
+
|
|
7
|
+
class BaseStation(_message.Message):
|
|
8
|
+
__slots__ = ["app_to_base_mqtt_rtk_msg", "base_to_app_mqtt_rtk_msg", "to_app", "to_dev"]
|
|
9
|
+
APP_TO_BASE_MQTT_RTK_MSG_FIELD_NUMBER: _ClassVar[int]
|
|
10
|
+
BASE_TO_APP_MQTT_RTK_MSG_FIELD_NUMBER: _ClassVar[int]
|
|
11
|
+
TO_APP_FIELD_NUMBER: _ClassVar[int]
|
|
12
|
+
TO_DEV_FIELD_NUMBER: _ClassVar[int]
|
|
13
|
+
app_to_base_mqtt_rtk_msg: app_to_base_mqtt_rtk_t
|
|
14
|
+
base_to_app_mqtt_rtk_msg: base_to_app_mqtt_rtk_t
|
|
15
|
+
to_app: response_basestation_info_t
|
|
16
|
+
to_dev: request_basestation_info_t
|
|
17
|
+
def __init__(self, to_dev: _Optional[_Union[request_basestation_info_t, _Mapping]] = ..., to_app: _Optional[_Union[response_basestation_info_t, _Mapping]] = ..., app_to_base_mqtt_rtk_msg: _Optional[_Union[app_to_base_mqtt_rtk_t, _Mapping]] = ..., base_to_app_mqtt_rtk_msg: _Optional[_Union[base_to_app_mqtt_rtk_t, _Mapping]] = ...) -> None: ...
|
|
18
|
+
|
|
19
|
+
class app_to_base_mqtt_rtk_t(_message.Message):
|
|
20
|
+
__slots__ = ["rtk_password", "rtk_port", "rtk_switch", "rtk_url", "rtk_username"]
|
|
21
|
+
RTK_PASSWORD_FIELD_NUMBER: _ClassVar[int]
|
|
22
|
+
RTK_PORT_FIELD_NUMBER: _ClassVar[int]
|
|
23
|
+
RTK_SWITCH_FIELD_NUMBER: _ClassVar[int]
|
|
24
|
+
RTK_URL_FIELD_NUMBER: _ClassVar[int]
|
|
25
|
+
RTK_USERNAME_FIELD_NUMBER: _ClassVar[int]
|
|
26
|
+
rtk_password: str
|
|
27
|
+
rtk_port: int
|
|
28
|
+
rtk_switch: int
|
|
29
|
+
rtk_url: str
|
|
30
|
+
rtk_username: str
|
|
31
|
+
def __init__(self, rtk_switch: _Optional[int] = ..., rtk_url: _Optional[str] = ..., rtk_port: _Optional[int] = ..., rtk_username: _Optional[str] = ..., rtk_password: _Optional[str] = ...) -> None: ...
|
|
32
|
+
|
|
33
|
+
class base_to_app_mqtt_rtk_t(_message.Message):
|
|
34
|
+
__slots__ = ["rtk_switch_status"]
|
|
35
|
+
RTK_SWITCH_STATUS_FIELD_NUMBER: _ClassVar[int]
|
|
36
|
+
rtk_switch_status: int
|
|
37
|
+
def __init__(self, rtk_switch_status: _Optional[int] = ...) -> None: ...
|
|
38
|
+
|
|
39
|
+
class request_basestation_info_t(_message.Message):
|
|
40
|
+
__slots__ = ["request_type"]
|
|
41
|
+
REQUEST_TYPE_FIELD_NUMBER: _ClassVar[int]
|
|
42
|
+
request_type: int
|
|
43
|
+
def __init__(self, request_type: _Optional[int] = ...) -> None: ...
|
|
44
|
+
|
|
45
|
+
class response_basestation_info_t(_message.Message):
|
|
46
|
+
__slots__ = ["app_connect_type", "ble_rssi", "lora_channel", "lora_locid", "lora_netid", "lora_scan", "lowpower_status", "mqtt_rtk_status", "rtk_channel", "rtk_status", "rtk_switch", "sats_num", "system_status", "wifi_rssi"]
|
|
47
|
+
APP_CONNECT_TYPE_FIELD_NUMBER: _ClassVar[int]
|
|
48
|
+
BLE_RSSI_FIELD_NUMBER: _ClassVar[int]
|
|
49
|
+
LORA_CHANNEL_FIELD_NUMBER: _ClassVar[int]
|
|
50
|
+
LORA_LOCID_FIELD_NUMBER: _ClassVar[int]
|
|
51
|
+
LORA_NETID_FIELD_NUMBER: _ClassVar[int]
|
|
52
|
+
LORA_SCAN_FIELD_NUMBER: _ClassVar[int]
|
|
53
|
+
LOWPOWER_STATUS_FIELD_NUMBER: _ClassVar[int]
|
|
54
|
+
MQTT_RTK_STATUS_FIELD_NUMBER: _ClassVar[int]
|
|
55
|
+
RTK_CHANNEL_FIELD_NUMBER: _ClassVar[int]
|
|
56
|
+
RTK_STATUS_FIELD_NUMBER: _ClassVar[int]
|
|
57
|
+
RTK_SWITCH_FIELD_NUMBER: _ClassVar[int]
|
|
58
|
+
SATS_NUM_FIELD_NUMBER: _ClassVar[int]
|
|
59
|
+
SYSTEM_STATUS_FIELD_NUMBER: _ClassVar[int]
|
|
60
|
+
WIFI_RSSI_FIELD_NUMBER: _ClassVar[int]
|
|
61
|
+
app_connect_type: int
|
|
62
|
+
ble_rssi: int
|
|
63
|
+
lora_channel: int
|
|
64
|
+
lora_locid: int
|
|
65
|
+
lora_netid: int
|
|
66
|
+
lora_scan: int
|
|
67
|
+
lowpower_status: int
|
|
68
|
+
mqtt_rtk_status: int
|
|
69
|
+
rtk_channel: int
|
|
70
|
+
rtk_status: int
|
|
71
|
+
rtk_switch: int
|
|
72
|
+
sats_num: int
|
|
73
|
+
system_status: int
|
|
74
|
+
wifi_rssi: int
|
|
75
|
+
def __init__(self, system_status: _Optional[int] = ..., app_connect_type: _Optional[int] = ..., ble_rssi: _Optional[int] = ..., wifi_rssi: _Optional[int] = ..., sats_num: _Optional[int] = ..., lora_scan: _Optional[int] = ..., lora_channel: _Optional[int] = ..., lora_locid: _Optional[int] = ..., lora_netid: _Optional[int] = ..., rtk_status: _Optional[int] = ..., lowpower_status: _Optional[int] = ..., mqtt_rtk_status: _Optional[int] = ..., rtk_channel: _Optional[int] = ..., rtk_switch: _Optional[int] = ...) -> None: ...
|
pymammotion/proto/dev_net.proto
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
syntax = "proto3";
|
|
2
2
|
|
|
3
3
|
message DrvWifiUpload {
|
|
4
|
-
int32
|
|
4
|
+
int32 wifi_msg_upload = 1;
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
message DrvWifiList {
|
|
8
|
-
int32
|
|
8
|
+
int32 nvs_wifi_upload = 1;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
message DrvWifiSet {
|
|
@@ -17,8 +17,8 @@ message DrvWifiSet {
|
|
|
17
17
|
message DrvWifiMsg {
|
|
18
18
|
bool status1 = 1;
|
|
19
19
|
bool status2 = 2;
|
|
20
|
-
string
|
|
21
|
-
string
|
|
20
|
+
string ip = 3;
|
|
21
|
+
string msgssid = 4;
|
|
22
22
|
string password = 5;
|
|
23
23
|
int32 rssi = 6;
|
|
24
24
|
string productkey = 7;
|
pymammotion/proto/dev_net.py
CHANGED
|
@@ -149,7 +149,7 @@ class DrvDevInfoReqId(betterproto.Message):
|
|
|
149
149
|
class DrvDevInfoRespId(betterproto.Message):
|
|
150
150
|
id: int = betterproto.int32_field(1)
|
|
151
151
|
type: int = betterproto.int32_field(2)
|
|
152
|
-
res: DrvDevInfoResult = betterproto.enum_field(3)
|
|
152
|
+
res: "DrvDevInfoResult" = betterproto.enum_field(3)
|
|
153
153
|
info: str = betterproto.string_field(4)
|
|
154
154
|
|
|
155
155
|
|
|
@@ -233,7 +233,7 @@ class GetMnetInfoReq(betterproto.Message):
|
|
|
233
233
|
class GetMnetInfoRsp(betterproto.Message):
|
|
234
234
|
req_ids: int = betterproto.int32_field(1)
|
|
235
235
|
result: int = betterproto.int32_field(2)
|
|
236
|
-
mnet: MnetInfo = betterproto.message_field(3)
|
|
236
|
+
mnet: "MnetInfo" = betterproto.message_field(3)
|
|
237
237
|
|
|
238
238
|
|
|
239
239
|
@dataclass
|
pymammotion/proto/dev_net_pb2.py
CHANGED
|
@@ -13,7 +13,7 @@ _sym_db = _symbol_database.Default()
|
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1fpymammotion/proto/dev_net.proto\"(\n\rDrvWifiUpload\x12\x17\n\
|
|
16
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1fpymammotion/proto/dev_net.proto\"(\n\rDrvWifiUpload\x12\x17\n\x0fwifi_msg_upload\x18\x01 \x01(\x05\"&\n\x0b\x44rvWifiList\x12\x17\n\x0fnvs_wifi_upload\x18\x01 \x01(\x05\"H\n\nDrvWifiSet\x12\x13\n\x0b\x63onfigParam\x18\x01 \x01(\x05\x12\x10\n\x08\x43onfssid\x18\x02 \x01(\t\x12\x13\n\x0bwifi_enable\x18\x03 \x01(\x08\"\xa8\x01\n\nDrvWifiMsg\x12\x0f\n\x07status1\x18\x01 \x01(\x08\x12\x0f\n\x07status2\x18\x02 \x01(\x08\x12\n\n\x02ip\x18\x03 \x01(\t\x12\x0f\n\x07msgssid\x18\x04 \x01(\t\x12\x10\n\x08password\x18\x05 \x01(\t\x12\x0c\n\x04rssi\x18\x06 \x01(\x05\x12\x12\n\nproductkey\x18\x07 \x01(\t\x12\x12\n\ndevicename\x18\x08 \x01(\t\x12\x13\n\x0bwifi_enable\x18\t \x01(\x08\"?\n\x0b\x44rvWifiConf\x12\x10\n\x08succFlag\x18\x01 \x01(\x08\x12\x0c\n\x04\x63ode\x18\x02 \x01(\x05\x12\x10\n\x08\x43onfssid\x18\x03 \x01(\t\"\\\n\rDrvListUpload\x12\x0b\n\x03sum\x18\x01 \x01(\x05\x12\x0f\n\x07\x63urrent\x18\x02 \x01(\x05\x12\x0e\n\x06status\x18\x03 \x01(\x05\x12\x0f\n\x07Memssid\x18\x04 \x01(\t\x12\x0c\n\x04rssi\x18\x05 \x01(\x05\"Y\n\x10\x44rvUploadFileReq\x12\r\n\x05\x62izId\x18\x01 \x01(\t\x12\x0b\n\x03url\x18\x02 \x01(\t\x12\x0e\n\x06userId\x18\x03 \x01(\t\x12\x0b\n\x03num\x18\x04 \x01(\x05\x12\x0c\n\x04type\x18\x05 \x01(\x05\"$\n\x13\x44rvUploadFileCancel\x12\r\n\x05\x62izId\x18\x01 \x01(\t\"z\n\x15\x44rvUploadFileToAppReq\x12\r\n\x05\x62izId\x18\x01 \x01(\t\x12\x11\n\toperation\x18\x02 \x01(\x05\x12\x10\n\x08serverIp\x18\x03 \x01(\x07\x12\x12\n\nserverPort\x18\x04 \x01(\x05\x12\x0b\n\x03num\x18\x05 \x01(\x05\x12\x0c\n\x04type\x18\x06 \x01(\x05\"I\n\x15\x44rvUploadFileToAppRsp\x12\r\n\x05\x62izId\x18\x01 \x01(\t\x12\x11\n\toperation\x18\x02 \x01(\x05\x12\x0e\n\x06result\x18\x03 \x01(\x05\"+\n\x0f\x44rvDevInfoReqId\x12\n\n\x02id\x18\x01 \x01(\x05\x12\x0c\n\x04type\x18\x02 \x01(\x05\"Z\n\x10\x44rvDevInfoRespId\x12\n\n\x02id\x18\x01 \x01(\x05\x12\x0c\n\x04type\x18\x02 \x01(\x05\x12\x1e\n\x03res\x18\x03 \x01(\x0e\x32\x11.DrvDevInfoResult\x12\x0c\n\x04info\x18\x04 \x01(\t\"2\n\rDrvDevInfoReq\x12!\n\x07req_ids\x18\x01 \x03(\x0b\x32\x10.DrvDevInfoReqId\"5\n\x0e\x44rvDevInfoResp\x12#\n\x08resp_ids\x18\x01 \x03(\x0b\x32\x11.DrvDevInfoRespId\"\x8a\x01\n\x10\x44rvUpgradeReport\x12\x0f\n\x07\x64\x65vname\x18\x01 \x01(\t\x12\r\n\x05otaid\x18\x02 \x01(\t\x12\x0f\n\x07version\x18\x03 \x01(\t\x12\x10\n\x08progress\x18\x04 \x01(\x05\x12\x0e\n\x06result\x18\x05 \x01(\x05\x12\x0f\n\x07message\x18\x06 \x01(\t\x12\x12\n\nproperties\x18\x07 \x01(\t\"l\n\x13WifiIotStatusReport\x12\x16\n\x0ewifi_connected\x18\x01 \x01(\x08\x12\x15\n\riot_connected\x18\x02 \x01(\x08\x12\x12\n\nproductkey\x18\x03 \x01(\t\x12\x12\n\ndevicename\x18\x04 \x01(\t\"*\n\x0c\x42leTestBytes\x12\x0c\n\x04seqs\x18\x01 \x01(\x05\x12\x0c\n\x04\x64\x61ta\x18\x02 \x03(\x07\"$\n\x11GetNetworkInfoReq\x12\x0f\n\x07req_ids\x18\x01 \x01(\x05\"\x87\x01\n\x11GetNetworkInfoRsp\x12\x0f\n\x07req_ids\x18\x01 \x01(\x05\x12\x11\n\twifi_ssid\x18\x02 \x01(\t\x12\x10\n\x08wifi_mac\x18\x03 \x01(\t\x12\x11\n\twifi_rssi\x18\x04 \x01(\x05\x12\n\n\x02ip\x18\x05 \x01(\x07\x12\x0c\n\x04mask\x18\x06 \x01(\x07\x12\x0f\n\x07gateway\x18\x07 \x01(\x07\"N\n\x10mnet_inet_status\x12\x0f\n\x07\x63onnect\x18\x01 \x01(\x08\x12\n\n\x02ip\x18\x02 \x01(\x07\x12\x0c\n\x04mask\x18\x03 \x01(\x07\x12\x0f\n\x07gateway\x18\x04 \x01(\x07\"\xb6\x01\n\x08MnetInfo\x12\r\n\x05model\x18\x01 \x01(\t\x12\x10\n\x08revision\x18\x02 \x01(\t\x12\x0c\n\x04imei\x18\x03 \x01(\t\x12\x1a\n\x03sim\x18\x04 \x01(\x0e\x32\r.sim_card_sta\x12\x0c\n\x04imsi\x18\x05 \x01(\t\x12\"\n\tlink_type\x18\x06 \x01(\x0e\x32\x0f.mnet_link_type\x12\x0c\n\x04rssi\x18\x07 \x01(\x05\x12\x1f\n\x04inet\x18\x08 \x01(\x0b\x32\x11.mnet_inet_status\"!\n\x0eGetMnetInfoReq\x12\x0f\n\x07req_ids\x18\x01 \x01(\x05\"J\n\x0eGetMnetInfoRsp\x12\x0f\n\x07req_ids\x18\x01 \x01(\x05\x12\x0e\n\x06result\x18\x02 \x01(\x05\x12\x17\n\x04mnet\x18\x03 \x01(\x0b\x32\t.MnetInfo\"}\n\x07MnetApn\x12\x0b\n\x03\x63id\x18\x01 \x01(\x05\x12\x11\n\tapn_alias\x18\x02 \x01(\t\x12\x10\n\x08\x61pn_name\x18\x03 \x01(\t\x12\x1c\n\x04\x61uth\x18\x04 \x01(\x0e\x32\x0e.apn_auth_type\x12\x10\n\x08username\x18\x05 \x01(\t\x12\x10\n\x08password\x18\x06 \x01(\t\"9\n\nMnetApnCfg\x12\x14\n\x0c\x61pn_used_idx\x18\x01 \x01(\x05\x12\x15\n\x03\x61pn\x18\x02 \x03(\x0b\x32\x08.MnetApn\">\n\rMnetApnSetCfg\x12\x13\n\x0buse_default\x18\x01 \x01(\x08\x12\x18\n\x03\x63\x66g\x18\x02 \x01(\x0b\x32\x0b.MnetApnCfg\"~\n\x07MnetCfg\x12\x13\n\x0bmnet_enable\x18\x01 \x01(\x08\x12\x13\n\x0binet_enable\x18\x02 \x01(\x08\x12\x17\n\x04type\x18\x03 \x01(\x0e\x32\t.net_type\x12\x1b\n\x03\x61pn\x18\x04 \x01(\x0b\x32\x0e.MnetApnSetCfg\x12\x13\n\x0b\x61uto_select\x18\x05 \x01(\x08\" \n\rGetMnetCfgReq\x12\x0f\n\x07req_ids\x18\x01 \x01(\x05\"G\n\rGetMnetCfgRsp\x12\x0f\n\x07req_ids\x18\x01 \x01(\x05\x12\x0e\n\x06result\x18\x02 \x01(\x05\x12\x15\n\x03\x63\x66g\x18\x03 \x01(\x0b\x32\x08.MnetCfg\"7\n\rSetMnetCfgReq\x12\x0f\n\x07req_ids\x18\x01 \x01(\x05\x12\x15\n\x03\x63\x66g\x18\x02 \x01(\x0b\x32\x08.MnetCfg\"0\n\rSetMnetCfgRsp\x12\x0f\n\x07req_ids\x18\x01 \x01(\x05\x12\x0e\n\x06result\x18\x02 \x01(\x05\"N\n\x0e\x44rvDebugDdsZmq\x12\x11\n\tis_enable\x18\x01 \x01(\x08\x12\x15\n\rrx_topic_name\x18\x02 \x01(\t\x12\x12\n\ntx_zmq_url\x18\x03 \x01(\t\"!\n\x0cSetDrvBleMTU\x12\x11\n\tmtu_count\x18\x01 \x01(\x05\"\xca\n\n\x06\x44\x65vNet\x12\x18\n\x0etodev_ble_sync\x18\x01 \x01(\x05H\x00\x12\'\n\x0etodev_ConfType\x18\x02 \x01(\x0e\x32\r.WifiConfTypeH\x00\x12-\n\x13todev_WifiMsgUpload\x18\x03 \x01(\x0b\x32\x0e.DrvWifiUploadH\x00\x12,\n\x14todev_WifiListUpload\x18\x04 \x01(\x0b\x32\x0c.DrvWifiListH\x00\x12/\n\x18todev_Wifi_Configuration\x18\x05 \x01(\x0b\x32\x0b.DrvWifiSetH\x00\x12$\n\rtoapp_WifiMsg\x18\x06 \x01(\x0b\x32\x0b.DrvWifiMsgH\x00\x12&\n\x0etoapp_WifiConf\x18\x07 \x01(\x0b\x32\x0c.DrvWifiConfH\x00\x12*\n\x10toapp_ListUpload\x18\x08 \x01(\x0b\x32\x0e.DrvListUploadH\x00\x12/\n\x12todev_req_log_info\x18\t \x01(\x0b\x32\x11.DrvUploadFileReqH\x00\x12\x35\n\x15todev_log_data_cancel\x18\n \x01(\x0b\x32\x14.DrvUploadFileCancelH\x00\x12+\n\x11todev_devinfo_req\x18\x0b \x01(\x0b\x32\x0e.DrvDevInfoReqH\x00\x12-\n\x12toapp_devinfo_resp\x18\x0c \x01(\x0b\x32\x0f.DrvDevInfoRespH\x00\x12\x31\n\x14toapp_upgrade_report\x18\r \x01(\x0b\x32\x11.DrvUpgradeReportH\x00\x12\x35\n\x15toapp_wifi_iot_status\x18\x0e \x01(\x0b\x32\x14.WifiIotStatusReportH\x00\x12\x36\n\x14todev_uploadfile_req\x18\x0f \x01(\x0b\x32\x16.DrvUploadFileToAppReqH\x00\x12\x36\n\x14toapp_uploadfile_rsp\x18\x10 \x01(\x0b\x32\x16.DrvUploadFileToAppRspH\x00\x12\x33\n\x15todev_networkinfo_req\x18\x11 \x01(\x0b\x32\x12.GetNetworkInfoReqH\x00\x12\x33\n\x15toapp_networkinfo_rsp\x18\x12 \x01(\x0b\x32\x12.GetNetworkInfoRspH\x00\x12%\n\x0c\x62ir_testdata\x18\x13 \x01(\x0b\x32\r.BleTestBytesH\x00\x12.\n\x13todev_mnet_info_req\x18\x14 \x01(\x0b\x32\x0f.GetMnetInfoReqH\x00\x12.\n\x13toapp_mnet_info_rsp\x18\x15 \x01(\x0b\x32\x0f.GetMnetInfoRspH\x00\x12\x30\n\x16todev_get_mnet_cfg_req\x18\x16 \x01(\x0b\x32\x0e.GetMnetCfgReqH\x00\x12\x30\n\x16toapp_get_mnet_cfg_rsp\x18\x17 \x01(\x0b\x32\x0e.GetMnetCfgRspH\x00\x12\x30\n\x16todev_set_mnet_cfg_req\x18\x18 \x01(\x0b\x32\x0e.SetMnetCfgReqH\x00\x12\x30\n\x16toapp_set_mnet_cfg_rsp\x18\x19 \x01(\x0b\x32\x0e.SetMnetCfgRspH\x00\x12,\n\x11todev_set_dds2zmq\x18\x1a \x01(\x0b\x32\x0f.DrvDebugDdsZmqH\x00\x12*\n\x11todev_set_ble_mtu\x18\x1b \x01(\x0b\x32\r.SetDrvBleMTUH\x00\x12\x36\n\x19todev_set_iot_offline_req\x18\x1c \x01(\x0e\x32\x11.iot_conctrl_typeH\x00\x42\x0c\n\nNetSubType*l\n\x0cWifiConfType\x12\x12\n\x0e\x44isconnectWifi\x10\x00\x12\x0e\n\nForgetWifi\x10\x01\x12\x15\n\x11\x44irectConnectWifi\x10\x02\x12\x11\n\rReconnectWifi\x10\x03\x12\x0e\n\nset_enable\x10\x04*l\n\x15\x44rvUploadFileFileType\x12\x11\n\rFILE_TYPE_ALL\x10\x00\x12\x14\n\x10\x46ILE_TYPE_SYSLOG\x10\x01\x12\x14\n\x10\x46ILE_TYPE_NAVLOG\x10\x02\x12\x14\n\x10\x46ILE_TYPE_RTKLOG\x10\x03*R\n\x10\x44rvDevInfoResult\x12\x13\n\x0f\x44RV_RESULT_FAIL\x10\x00\x12\x12\n\x0e\x44RV_RESULT_SUC\x10\x01\x12\x15\n\x11\x44RV_RESULT_NOTSUP\x10\x02*p\n\x0csim_card_sta\x12\x0c\n\x08SIM_NONE\x10\x00\x12\x0f\n\x0bSIM_NO_CARD\x10\x01\x12\x0f\n\x0bSIM_INVALID\x10\x02\x12\x11\n\rSIM_INPUT_PIN\x10\x03\x12\x11\n\rSIM_INPUT_PUK\x10\x04\x12\n\n\x06SIM_OK\x10\x05*Z\n\x0emnet_link_type\x12\x12\n\x0eMNET_LINK_NONE\x10\x00\x12\x10\n\x0cMNET_LINK_2G\x10\x01\x12\x10\n\x0cMNET_LINK_3G\x10\x02\x12\x10\n\x0cMNET_LINK_4G\x10\x03*^\n\rapn_auth_type\x12\x11\n\rAPN_AUTH_NONE\x10\x00\x12\x10\n\x0c\x41PN_AUTH_PAP\x10\x01\x12\x11\n\rAPN_AUTH_CHAP\x10\x02\x12\x15\n\x11\x41PN_AUTH_PAP_CHAP\x10\x03*0\n\x08net_type\x12\x11\n\rNET_TYPE_WIFI\x10\x00\x12\x11\n\rNET_TYPE_MNET\x10\x01*Q\n\x10iot_conctrl_type\x12\x14\n\x10IOT_TYPE_OFFLINE\x10\x00\x12\x13\n\x0fIOT_TYPE_ONLINE\x10\x01\x12\x12\n\x0eIOT_TYPE_RESET\x10\x02\x62\x06proto3')
|
|
17
17
|
|
|
18
18
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals())
|
|
19
19
|
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'pymammotion.proto.dev_net_pb2', globals())
|
|
@@ -236,18 +236,16 @@ class DrvWifiConf(_message.Message):
|
|
|
236
236
|
def __init__(self, succFlag: bool = ..., code: _Optional[int] = ..., Confssid: _Optional[str] = ...) -> None: ...
|
|
237
237
|
|
|
238
238
|
class DrvWifiList(_message.Message):
|
|
239
|
-
__slots__ = ["
|
|
239
|
+
__slots__ = ["nvs_wifi_upload"]
|
|
240
240
|
NVS_WIFI_UPLOAD_FIELD_NUMBER: _ClassVar[int]
|
|
241
|
-
|
|
242
|
-
def __init__(self,
|
|
241
|
+
nvs_wifi_upload: int
|
|
242
|
+
def __init__(self, nvs_wifi_upload: _Optional[int] = ...) -> None: ...
|
|
243
243
|
|
|
244
244
|
class DrvWifiMsg(_message.Message):
|
|
245
|
-
__slots__ = ["
|
|
245
|
+
__slots__ = ["devicename", "ip", "msgssid", "password", "productkey", "rssi", "status1", "status2", "wifi_enable"]
|
|
246
246
|
DEVICENAME_FIELD_NUMBER: _ClassVar[int]
|
|
247
|
-
IP: str
|
|
248
247
|
IP_FIELD_NUMBER: _ClassVar[int]
|
|
249
248
|
MSGSSID_FIELD_NUMBER: _ClassVar[int]
|
|
250
|
-
Msgssid: str
|
|
251
249
|
PASSWORD_FIELD_NUMBER: _ClassVar[int]
|
|
252
250
|
PRODUCTKEY_FIELD_NUMBER: _ClassVar[int]
|
|
253
251
|
RSSI_FIELD_NUMBER: _ClassVar[int]
|
|
@@ -255,13 +253,15 @@ class DrvWifiMsg(_message.Message):
|
|
|
255
253
|
STATUS2_FIELD_NUMBER: _ClassVar[int]
|
|
256
254
|
WIFI_ENABLE_FIELD_NUMBER: _ClassVar[int]
|
|
257
255
|
devicename: str
|
|
256
|
+
ip: str
|
|
257
|
+
msgssid: str
|
|
258
258
|
password: str
|
|
259
259
|
productkey: str
|
|
260
260
|
rssi: int
|
|
261
261
|
status1: bool
|
|
262
262
|
status2: bool
|
|
263
263
|
wifi_enable: bool
|
|
264
|
-
def __init__(self, status1: bool = ..., status2: bool = ...,
|
|
264
|
+
def __init__(self, status1: bool = ..., status2: bool = ..., ip: _Optional[str] = ..., msgssid: _Optional[str] = ..., password: _Optional[str] = ..., rssi: _Optional[int] = ..., productkey: _Optional[str] = ..., devicename: _Optional[str] = ..., wifi_enable: bool = ...) -> None: ...
|
|
265
265
|
|
|
266
266
|
class DrvWifiSet(_message.Message):
|
|
267
267
|
__slots__ = ["Confssid", "configParam", "wifi_enable"]
|
|
@@ -274,10 +274,10 @@ class DrvWifiSet(_message.Message):
|
|
|
274
274
|
def __init__(self, configParam: _Optional[int] = ..., Confssid: _Optional[str] = ..., wifi_enable: bool = ...) -> None: ...
|
|
275
275
|
|
|
276
276
|
class DrvWifiUpload(_message.Message):
|
|
277
|
-
__slots__ = ["
|
|
277
|
+
__slots__ = ["wifi_msg_upload"]
|
|
278
278
|
WIFI_MSG_UPLOAD_FIELD_NUMBER: _ClassVar[int]
|
|
279
|
-
|
|
280
|
-
def __init__(self,
|
|
279
|
+
wifi_msg_upload: int
|
|
280
|
+
def __init__(self, wifi_msg_upload: _Optional[int] = ...) -> None: ...
|
|
281
281
|
|
|
282
282
|
class GetMnetCfgReq(_message.Message):
|
|
283
283
|
__slots__ = ["req_ids"]
|
pymammotion/proto/luba_msg.proto
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
syntax = "proto3";
|
|
2
2
|
|
|
3
|
+
import "pymammotion/proto/basestation.proto";
|
|
3
4
|
import "pymammotion/proto/mctrl_driver.proto";
|
|
4
5
|
import "pymammotion/proto/mctrl_nav.proto";
|
|
5
6
|
import "pymammotion/proto/mctrl_sys.proto";
|
|
@@ -28,6 +29,7 @@ message LubaMsg {
|
|
|
28
29
|
SocMul mul = 14;
|
|
29
30
|
MsgNull null = 16;
|
|
30
31
|
MctlPept pept = 17;
|
|
32
|
+
BaseStation base = 18;
|
|
31
33
|
}
|
|
32
34
|
uint64 timestamp = 15;
|
|
33
35
|
}
|
pymammotion/proto/luba_msg.py
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
from dataclasses import dataclass
|
|
5
5
|
|
|
6
6
|
import betterproto
|
|
7
|
-
|
|
8
7
|
from .common import *
|
|
8
|
+
from .basestation import *
|
|
9
9
|
from .dev_net import *
|
|
10
10
|
from .luba_mul import *
|
|
11
11
|
from .mctrl_driver import *
|
|
@@ -77,4 +77,5 @@ class LubaMsg(betterproto.Message):
|
|
|
77
77
|
mul: "SocMul" = betterproto.message_field(14, group="LubaSubMsg")
|
|
78
78
|
null: "MsgNull" = betterproto.message_field(16, group="LubaSubMsg")
|
|
79
79
|
pept: "MctlPept" = betterproto.message_field(17, group="LubaSubMsg")
|
|
80
|
+
base: "BaseStation" = betterproto.message_field(18, group="LubaSubMsg")
|
|
80
81
|
timestamp: int = betterproto.uint64_field(15)
|