From 09dd51b47420909332a8512a917be3aa74ccf28c Mon Sep 17 00:00:00 2001 From: Jonathan Thompson Date: Thu, 22 Jan 2026 22:41:06 +0000 Subject: [PATCH 01/25] /init to create CLAUDE.md Claude creating it's own CLAUDE.md --- CLAUDE.md | 96 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 CLAUDE.md diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..26c71f7 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,96 @@ +# CLAUDE.md + +This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. + +## Project Overview + +RoboVac is a Home Assistant custom integration for controlling Eufy RoboVac vacuum cleaners via local network (no cloud dependency). It supports 40+ models using Tuya protocol versions 3.3, 3.4, and 3.5. + +## Common Commands + +All commands use [Task](https://taskfile.dev/) as the task runner: + +```bash +task install-dev # Install development dependencies with uv +task test # Run pytest with coverage (generates coverage.xml) +task lint # Run flake8 on custom_components and tests +task type-check # Run mypy type checking +task markdownlint # Lint and auto-fix markdown files +task all # Run install-dev, test, type-check, lint, markdownlint +``` + +Run a single test: +```bash +pytest tests/test_vacuum/test_t2251_command_mappings.py -v +pytest tests/test_vacuum/ -k "mode" -v # Pattern matching +``` + +List supported vacuum models: +```bash +python -m custom_components.robovac.model_validator_cli --list +``` + +## Architecture + +### Core Components + +- **`custom_components/robovac/robovac.py`**: `RoboVac` class - core logic extending `TuyaDevice`, handles model-specific features and command translation +- **`custom_components/robovac/tuyalocalapi.py`**: `TuyaDevice` class - Tuya local protocol implementation with encryption (AES, HMAC-SHA256) +- **`custom_components/robovac/vacuum.py`**: `RoboVacEntity` - Home Assistant vacuum entity with state management and command execution +- **`custom_components/robovac/config_flow.py`**: Configuration flow for Home Assistant UI setup + +### Model System + +Each vacuum model has a file in `custom_components/robovac/vacuums/T*.py` defining: +- `homeassistant_features`: Home Assistant vacuum capabilities (battery, start, stop, fan_speed, etc.) +- `robovac_features`: Custom features (cleaning_time, cleaning_area, etc.) +- `commands`: Dict mapping `RobovacCommand` enum to DPS codes and value mappings +- Optional `dps_codes`, `protocol_version`, `activity_mapping` + +Models are registered in `custom_components/robovac/vacuums/__init__.py` via the `ROBOVAC_MODELS` dict. + +### Command Mapping Pattern + +Commands translate between three levels: +- **DPS Code**: Numeric identifier from Tuya protocol (e.g., "5", "102") +- **Command Name**: Enum value (e.g., `RobovacCommand.MODE`) +- **Command Value**: User-friendly string (e.g., "auto" -> "Auto") + +```python +RobovacCommand.MODE: { + "code": 5, + "values": { + "auto": "Auto", # Key: input (snake_case), Value: output (PascalCase) + "small_room": "SmallRoom", + }, +}, +``` + +Device responses use case-insensitive matching - "AUTO", "auto", "Auto" all resolve correctly. + +## Adding a New Vacuum Model + +1. Create `custom_components/robovac/vacuums/TXXX.py` with features and commands +2. Import and register in `custom_components/robovac/vacuums/__init__.py` +3. Create tests in `tests/test_vacuum/test_txxx_command_mappings.py` + +Test fixture pattern: +```python +@pytest.fixture +def mock_txxx_robovac(): + with patch("custom_components.robovac.robovac.TuyaDevice.__init__", return_value=None): + return RoboVac(model_code="TXXX", device_id="test", host="192.168.1.1", local_key="key") +``` + +## Commit Guidelines + +Follow [Conventional Commits](https://www.conventionalcommits.org/): `feat:`, `fix:`, `refactor:`, `test:`, `docs:`, `chore:` + +## Dev Container + +The project includes a dev container with Home Assistant for live testing: +```bash +task ha-start # Start Home Assistant +task ha-logs # View robovac logs +task ha-restart # Restart Home Assistant +``` From be5c3094fbabebe6de288d2afb41b05622dfb883 Mon Sep 17 00:00:00 2001 From: Jonathan Thompson Date: Thu, 22 Jan 2026 23:02:03 +0000 Subject: [PATCH 02/25] adding proto files for reference --- proto-reference/alarm.proto | 27 ++ proto-reference/alarm_pb2.py | 28 ++ proto-reference/alarm_pb2.pyi | 35 ++ proto-reference/analysis.proto | 196 ++++++++ proto-reference/analysis_pb2.py | 65 +++ proto-reference/analysis_pb2.pyi | 220 +++++++++ proto-reference/app_device_info.proto | 54 +++ proto-reference/app_device_info_pb2.py | 34 ++ proto-reference/app_device_info_pb2.pyi | 72 +++ proto-reference/ble.proto | 134 ++++++ proto-reference/ble_pb2.py | 57 +++ proto-reference/ble_pb2.pyi | 172 +++++++ proto-reference/clean_param.proto | 94 ++++ proto-reference/clean_param_pb2.py | 54 +++ proto-reference/clean_param_pb2.pyi | 124 +++++ proto-reference/clean_record.proto | 135 ++++++ proto-reference/clean_record_pb2.py | 49 ++ proto-reference/clean_record_pb2.pyi | 143 ++++++ proto-reference/clean_record_wrap.proto | 14 + proto-reference/clean_record_wrap_pb2.py | 25 ++ proto-reference/clean_record_wrap_pb2.pyi | 15 + proto-reference/clean_statistics.proto | 24 + proto-reference/clean_statistics_pb2.py | 29 ++ proto-reference/clean_statistics_pb2.pyi | 31 ++ proto-reference/common.proto | 80 ++++ proto-reference/common_pb2.py | 51 +++ proto-reference/common_pb2.pyi | 108 +++++ proto-reference/consumable.proto | 45 ++ proto-reference/consumable_pb2.py | 33 ++ proto-reference/consumable_pb2.pyi | 59 +++ proto-reference/control.proto | 197 ++++++++ proto-reference/control_pb2.py | 74 +++ proto-reference/control_pb2.pyi | 260 +++++++++++ proto-reference/debug.proto | 45 ++ proto-reference/debug_pb2.py | 36 ++ proto-reference/debug_pb2.pyi | 61 +++ proto-reference/error_code.proto | 55 +++ .../error_code_list_standard.proto | 189 ++++++++ .../error_code_list_standard_pb2.py | 27 ++ .../error_code_list_standard_pb2.pyi | 178 ++++++++ proto-reference/error_code_list_t2080.proto | 107 +++++ proto-reference/error_code_list_t2080_pb2.py | 27 ++ proto-reference/error_code_list_t2080_pb2.pyi | 103 +++++ proto-reference/error_code_list_t2265.proto | 86 ++++ proto-reference/error_code_list_t2265_pb2.py | 27 ++ proto-reference/error_code_list_t2265_pb2.pyi | 75 ++++ proto-reference/error_code_list_t2320.proto | 85 ++++ proto-reference/error_code_list_t2320_pb2.py | 27 ++ proto-reference/error_code_list_t2320_pb2.pyi | 81 ++++ proto-reference/error_code_pb2.py | 38 ++ proto-reference/error_code_pb2.pyi | 76 ++++ proto-reference/keepalive.proto | 13 + proto-reference/keepalive_pb2.py | 25 ++ proto-reference/keepalive_pb2.pyi | 13 + proto-reference/language.proto | 40 ++ proto-reference/language_pb2.py | 35 ++ proto-reference/language_pb2.pyi | 56 +++ proto-reference/map_edit.proto | 136 ++++++ proto-reference/map_edit_pb2.py | 67 +++ proto-reference/map_edit_pb2.pyi | 184 ++++++++ proto-reference/map_manage.proto | 50 +++ proto-reference/map_manage_pb2.py | 31 ++ proto-reference/map_manage_pb2.pyi | 49 ++ proto-reference/media_manager.proto | 116 +++++ proto-reference/media_manager_pb2.py | 59 +++ proto-reference/media_manager_pb2.pyi | 147 ++++++ proto-reference/misc.proto | 19 + proto-reference/misc_pb2.py | 30 ++ proto-reference/misc_pb2.pyi | 29 ++ proto-reference/multi_maps.proto | 70 +++ proto-reference/multi_maps_pb2.py | 41 ++ proto-reference/multi_maps_pb2.pyi | 82 ++++ proto-reference/p2pdata.proto | 152 +++++++ proto-reference/p2pdata_pb2.py | 43 ++ proto-reference/p2pdata_pb2.pyi | 135 ++++++ proto-reference/scene.proto | 145 ++++++ proto-reference/scene_pb2.py | 67 +++ proto-reference/scene_pb2.pyi | 179 ++++++++ proto-reference/socket.proto | 41 ++ proto-reference/socket_pb2.py | 32 ++ proto-reference/socket_pb2.pyi | 44 ++ proto-reference/station.proto | 190 ++++++++ proto-reference/station_pb2.py | 80 ++++ proto-reference/station_pb2.pyi | 242 ++++++++++ proto-reference/stream.proto | 423 ++++++++++++++++++ proto-reference/stream_pb2.py | 96 ++++ proto-reference/stream_pb2.pyi | 380 ++++++++++++++++ proto-reference/stream_wrap.proto | 20 + proto-reference/stream_wrap_pb2.py | 28 ++ proto-reference/stream_wrap_pb2.pyi | 25 ++ proto-reference/timing.proto | 185 ++++++++ proto-reference/timing_pb2.py | 78 ++++ proto-reference/timing_pb2.pyi | 241 ++++++++++ proto-reference/undisturbed.proto | 29 ++ proto-reference/undisturbed_pb2.py | 32 ++ proto-reference/undisturbed_pb2.pyi | 42 ++ proto-reference/unisetting.proto | 106 +++++ proto-reference/unisetting_pb2.py | 52 +++ proto-reference/unisetting_pb2.pyi | 159 +++++++ proto-reference/universal_data.proto | 27 ++ proto-reference/universal_data_pb2.py | 32 ++ proto-reference/universal_data_pb2.pyi | 39 ++ proto-reference/upgrade.proto | 34 ++ proto-reference/upgrade_pb2.py | 31 ++ proto-reference/upgrade_pb2.pyi | 38 ++ proto-reference/version.proto | 87 ++++ proto-reference/version_pb2.py | 45 ++ proto-reference/version_pb2.pyi | 70 +++ proto-reference/work_status.proto | 252 +++++++++++ proto-reference/work_status_pb2.py | 111 +++++ proto-reference/work_status_pb2.pyi | 287 ++++++++++++ 111 files changed, 9652 insertions(+) create mode 100644 proto-reference/alarm.proto create mode 100644 proto-reference/alarm_pb2.py create mode 100644 proto-reference/alarm_pb2.pyi create mode 100644 proto-reference/analysis.proto create mode 100644 proto-reference/analysis_pb2.py create mode 100644 proto-reference/analysis_pb2.pyi create mode 100644 proto-reference/app_device_info.proto create mode 100644 proto-reference/app_device_info_pb2.py create mode 100644 proto-reference/app_device_info_pb2.pyi create mode 100644 proto-reference/ble.proto create mode 100644 proto-reference/ble_pb2.py create mode 100644 proto-reference/ble_pb2.pyi create mode 100644 proto-reference/clean_param.proto create mode 100644 proto-reference/clean_param_pb2.py create mode 100644 proto-reference/clean_param_pb2.pyi create mode 100644 proto-reference/clean_record.proto create mode 100644 proto-reference/clean_record_pb2.py create mode 100644 proto-reference/clean_record_pb2.pyi create mode 100644 proto-reference/clean_record_wrap.proto create mode 100644 proto-reference/clean_record_wrap_pb2.py create mode 100644 proto-reference/clean_record_wrap_pb2.pyi create mode 100644 proto-reference/clean_statistics.proto create mode 100644 proto-reference/clean_statistics_pb2.py create mode 100644 proto-reference/clean_statistics_pb2.pyi create mode 100644 proto-reference/common.proto create mode 100644 proto-reference/common_pb2.py create mode 100644 proto-reference/common_pb2.pyi create mode 100644 proto-reference/consumable.proto create mode 100644 proto-reference/consumable_pb2.py create mode 100644 proto-reference/consumable_pb2.pyi create mode 100644 proto-reference/control.proto create mode 100644 proto-reference/control_pb2.py create mode 100644 proto-reference/control_pb2.pyi create mode 100644 proto-reference/debug.proto create mode 100644 proto-reference/debug_pb2.py create mode 100644 proto-reference/debug_pb2.pyi create mode 100644 proto-reference/error_code.proto create mode 100644 proto-reference/error_code_list_standard.proto create mode 100644 proto-reference/error_code_list_standard_pb2.py create mode 100644 proto-reference/error_code_list_standard_pb2.pyi create mode 100644 proto-reference/error_code_list_t2080.proto create mode 100644 proto-reference/error_code_list_t2080_pb2.py create mode 100644 proto-reference/error_code_list_t2080_pb2.pyi create mode 100644 proto-reference/error_code_list_t2265.proto create mode 100644 proto-reference/error_code_list_t2265_pb2.py create mode 100644 proto-reference/error_code_list_t2265_pb2.pyi create mode 100644 proto-reference/error_code_list_t2320.proto create mode 100644 proto-reference/error_code_list_t2320_pb2.py create mode 100644 proto-reference/error_code_list_t2320_pb2.pyi create mode 100644 proto-reference/error_code_pb2.py create mode 100644 proto-reference/error_code_pb2.pyi create mode 100644 proto-reference/keepalive.proto create mode 100644 proto-reference/keepalive_pb2.py create mode 100644 proto-reference/keepalive_pb2.pyi create mode 100644 proto-reference/language.proto create mode 100644 proto-reference/language_pb2.py create mode 100644 proto-reference/language_pb2.pyi create mode 100644 proto-reference/map_edit.proto create mode 100644 proto-reference/map_edit_pb2.py create mode 100644 proto-reference/map_edit_pb2.pyi create mode 100644 proto-reference/map_manage.proto create mode 100644 proto-reference/map_manage_pb2.py create mode 100644 proto-reference/map_manage_pb2.pyi create mode 100644 proto-reference/media_manager.proto create mode 100644 proto-reference/media_manager_pb2.py create mode 100644 proto-reference/media_manager_pb2.pyi create mode 100644 proto-reference/misc.proto create mode 100644 proto-reference/misc_pb2.py create mode 100644 proto-reference/misc_pb2.pyi create mode 100644 proto-reference/multi_maps.proto create mode 100644 proto-reference/multi_maps_pb2.py create mode 100644 proto-reference/multi_maps_pb2.pyi create mode 100644 proto-reference/p2pdata.proto create mode 100644 proto-reference/p2pdata_pb2.py create mode 100644 proto-reference/p2pdata_pb2.pyi create mode 100644 proto-reference/scene.proto create mode 100644 proto-reference/scene_pb2.py create mode 100644 proto-reference/scene_pb2.pyi create mode 100644 proto-reference/socket.proto create mode 100644 proto-reference/socket_pb2.py create mode 100644 proto-reference/socket_pb2.pyi create mode 100644 proto-reference/station.proto create mode 100644 proto-reference/station_pb2.py create mode 100644 proto-reference/station_pb2.pyi create mode 100644 proto-reference/stream.proto create mode 100644 proto-reference/stream_pb2.py create mode 100644 proto-reference/stream_pb2.pyi create mode 100644 proto-reference/stream_wrap.proto create mode 100644 proto-reference/stream_wrap_pb2.py create mode 100644 proto-reference/stream_wrap_pb2.pyi create mode 100644 proto-reference/timing.proto create mode 100644 proto-reference/timing_pb2.py create mode 100644 proto-reference/timing_pb2.pyi create mode 100644 proto-reference/undisturbed.proto create mode 100644 proto-reference/undisturbed_pb2.py create mode 100644 proto-reference/undisturbed_pb2.pyi create mode 100644 proto-reference/unisetting.proto create mode 100644 proto-reference/unisetting_pb2.py create mode 100644 proto-reference/unisetting_pb2.pyi create mode 100644 proto-reference/universal_data.proto create mode 100644 proto-reference/universal_data_pb2.py create mode 100644 proto-reference/universal_data_pb2.pyi create mode 100644 proto-reference/upgrade.proto create mode 100644 proto-reference/upgrade_pb2.py create mode 100644 proto-reference/upgrade_pb2.pyi create mode 100644 proto-reference/version.proto create mode 100644 proto-reference/version_pb2.py create mode 100644 proto-reference/version_pb2.pyi create mode 100644 proto-reference/work_status.proto create mode 100644 proto-reference/work_status_pb2.py create mode 100644 proto-reference/work_status_pb2.pyi diff --git a/proto-reference/alarm.proto b/proto-reference/alarm.proto new file mode 100644 index 0000000..7adcf4c --- /dev/null +++ b/proto-reference/alarm.proto @@ -0,0 +1,27 @@ +syntax = "proto2"; +package alarm.message; + +option java_package = "com.eufylife.smarthome.protobuftool"; +option java_outer_classname = "AlarmInfo"; +/*VER0.1*/ +/*author : bruce.yin@oceanwing.com*/ + + + +message Alarm { + required uint32 hours = 1;//range 0~23 + required uint32 minutes = 2;//range 0~59 + required bool repetition = 3;//1-enable weekly repetition 0-execute only once When only once, week_info can only have one valid BIT + required uint32 week_info = 4;//Monday to Sunday occupy BIT0-BIT6 in sequence, BIT7 is reserved as 0 +} + + +message SyncTime { + required uint32 year = 1;//example :2017 + required uint32 month = 2;//range 1~12 + required uint32 day = 3;//rang 1~31 + required uint32 weekday = 4;//rang 1~7 + required uint32 hours = 5;//range 0~23 + required uint32 minutes = 6;//range 0~59 + required uint32 seconds = 7;//range 0~59 +} \ No newline at end of file diff --git a/proto-reference/alarm_pb2.py b/proto-reference/alarm_pb2.py new file mode 100644 index 0000000..c5646d0 --- /dev/null +++ b/proto-reference/alarm_pb2.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: proto/cloud/alarm.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x17proto/cloud/alarm.proto\x12\ralarm.message\"N\n\x05\x41larm\x12\r\n\x05hours\x18\x01 \x02(\r\x12\x0f\n\x07minutes\x18\x02 \x02(\r\x12\x12\n\nrepetition\x18\x03 \x02(\x08\x12\x11\n\tweek_info\x18\x04 \x02(\r\"v\n\x08SyncTime\x12\x0c\n\x04year\x18\x01 \x02(\r\x12\r\n\x05month\x18\x02 \x02(\r\x12\x0b\n\x03\x64\x61y\x18\x03 \x02(\r\x12\x0f\n\x07weekday\x18\x04 \x02(\r\x12\r\n\x05hours\x18\x05 \x02(\r\x12\x0f\n\x07minutes\x18\x06 \x02(\r\x12\x0f\n\x07seconds\x18\x07 \x02(\rB0\n#com.eufylife.smarthome.protobuftoolB\tAlarmInfo') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'proto.cloud.alarm_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n#com.eufylife.smarthome.protobuftoolB\tAlarmInfo' + _ALARM._serialized_start=42 + _ALARM._serialized_end=120 + _SYNCTIME._serialized_start=122 + _SYNCTIME._serialized_end=240 +# @@protoc_insertion_point(module_scope) diff --git a/proto-reference/alarm_pb2.pyi b/proto-reference/alarm_pb2.pyi new file mode 100644 index 0000000..5ea495f --- /dev/null +++ b/proto-reference/alarm_pb2.pyi @@ -0,0 +1,35 @@ +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Optional as _Optional + +DESCRIPTOR: _descriptor.FileDescriptor + +class Alarm(_message.Message): + __slots__ = ["hours", "minutes", "repetition", "week_info"] + HOURS_FIELD_NUMBER: _ClassVar[int] + MINUTES_FIELD_NUMBER: _ClassVar[int] + REPETITION_FIELD_NUMBER: _ClassVar[int] + WEEK_INFO_FIELD_NUMBER: _ClassVar[int] + hours: int + minutes: int + repetition: bool + week_info: int + def __init__(self, hours: _Optional[int] = ..., minutes: _Optional[int] = ..., repetition: bool = ..., week_info: _Optional[int] = ...) -> None: ... + +class SyncTime(_message.Message): + __slots__ = ["day", "hours", "minutes", "month", "seconds", "weekday", "year"] + DAY_FIELD_NUMBER: _ClassVar[int] + HOURS_FIELD_NUMBER: _ClassVar[int] + MINUTES_FIELD_NUMBER: _ClassVar[int] + MONTH_FIELD_NUMBER: _ClassVar[int] + SECONDS_FIELD_NUMBER: _ClassVar[int] + WEEKDAY_FIELD_NUMBER: _ClassVar[int] + YEAR_FIELD_NUMBER: _ClassVar[int] + day: int + hours: int + minutes: int + month: int + seconds: int + weekday: int + year: int + def __init__(self, year: _Optional[int] = ..., month: _Optional[int] = ..., day: _Optional[int] = ..., weekday: _Optional[int] = ..., hours: _Optional[int] = ..., minutes: _Optional[int] = ..., seconds: _Optional[int] = ...) -> None: ... diff --git a/proto-reference/analysis.proto b/proto-reference/analysis.proto new file mode 100644 index 0000000..464f02b --- /dev/null +++ b/proto-reference/analysis.proto @@ -0,0 +1,196 @@ +syntax = "proto3"; + +// option optimize_for = LITE_RUNTIME; + +package proto.cloud; + +message AnalysisRequest { +} + +message AnalysisInternalStatus { + string robotapp_state = 1; + string motion_state = 2; +} + +message AnalysisStatistics { + // Cleaning record, reported at the end of cleaning (including automatic and manual intervention). + message CleanRecord { + uint32 clean_id = 1; // 清洁id,每次清洁id++,id从1开始,0为无效. + + bool result = 2; // 清洁结果,true - 成功,反之失败 + + enum FailCode { + UNKNOW = 0; // 未知原因,下面原因都不是 + + /** + 清洁过程机器原因触发异常导致停机,用户介入恢复清洁并成功后也判断为清洁失败; + 下面情况也算: + 脱困失败; + 断点续扫回充失败; + 回洗失败; + */ + ROBOT_FAULT = 1; + + /** + 不受机器控制的报警,比如水箱满、托盘不在位等 + */ + ROBOT_ALERT = 2; + + /** + 用户干预,比如清洁中暂停按回充(或直接搬到基站上)、清洁中切换模式等 + */ + MANUAL_BREAK = 3; + } + FailCode fail_code = 3; // 失败原因,当 result == false 有效 + + enum Mode { + AUTO_CLEAN = 0; // 全局自动清洁 + SELECT_ROOMS_CLEAN = 1; // 选房清洁 + SELECT_ZONES_CLEAN = 2; // 选区清洁 + SPOT_CLEAN = 3; // 定点清洁 + FAST_MAPPING = 4; // 快速建图 + } + Mode mode = 4; + + enum Type { + SWEEP_ONLY = 0; + MOP_ONLY = 1; + SWEEP_AND_MOP = 2; + } + Type type = 5; + + uint64 start_time = 6; // 清洁开始时间,单位s,不带时区 + uint64 end_time = 7; // 清洁结束时间,单位s,不带时区 + uint32 clean_time = 8; // 清洁时间,去除断点回充/回洗、暂停时间,不包括回充导航和上座, 单位s + uint32 clean_area = 9; // 清洁面积,清洁过的栅格面积,单位 m2 + uint32 slam_area = 10; // slam建图面积,不包括障碍物面积,单位 m2 + uint32 map_id = 11; // 当前清洁地图的id + uint32 room_count = 12; // 当前清洁地图中房间总数 + + message RollBrush { + // 单次清扫地毯过流次数,特指机器为了在长毛地毯上能正常清扫(没有卡住异物),采取的保护电机策略, + // 例如 L60 长毛地毯电流在 800mA-1100mA之间采取开1s停2s策略. + uint32 protect_count = 1; + + // 单次清扫堵转过流次数,堵转后机器采取类似开1s停3s策略. + uint32 stalled_count = 2; + } + RollBrush roll_brush = 13; // 单次清扫过程滚刷停转的次数 + } + CleanRecord clean = 1; + + // 回充记录,回充上座完成或回充失败时上报 + message GoHomeRecord { + uint32 clean_id = 1; // 清洁id, 清洁后回充与CleanRecord中的clean_id相同,无清洁的回充设置为0 + bool result = 2; // 回充结果,true - 成功,反之失败 + + enum FailCode { + UNKNOW = 0; // 未知,以下原因都不是. + MANUAL_BREAK = 1; // 人工手动停止 + NAVIGATE_FAIL = 2; // 导航到充电座附件失败 + ENTER_HOME_FAIL = 3; // 上座失败 + } + FailCode fail_code = 3; // 失败原因,当 result == false 有效 + + uint64 power_level = 4; // 开始回充的电量百分比,0 - 100 + uint64 start_time = 5; // 回充开始时间,单位s,不带时区 + uint64 end_time = 6; // 回充结束时间,单位s,不带时区 + } + GoHomeRecord gohome = 2; + + // 重定位记录,重定位成功或失败时上报 + message RelocateRecord { + uint32 clean_id = 1; // 清洁id, 清洁后回充与CleanRecord中的clean_id相同 + bool result = 2; // 重定位结果,true - 成功,反之失败 + uint32 map_count = 3; // 当前地图数量 + uint64 start_time = 4; // 重定位开始时间,单位s,不带时区 + uint64 end_time = 5; // 重定位结束时间,单位s,不带时区 + } + RelocateRecord relocate = 3; + + // 集尘记录,集尘完成或失败时上报 + message CollectRecord { + uint32 clean_id = 1; // 清洁id, 清洁后回充与CleanRecord中的clean_id相同 + bool result = 2; // 集尘结果,true - 成功,反之失败 + uint64 start_time = 3; // 集尘开始时间,单位s,不带时区 + } + CollectRecord collect = 4; + + // 控制事件 + message ControlEvent { + uint32 clean_id = 1; // 清洁id, 清洁后回充与CleanRecord中的clean_id相同,无清洁的回充设置为0 + + enum Type { + AUTO_CLEAN = 0; // 自动清洁 + SPOT_CLEAN = 1; // 定点清洁 + GOHOME = 2; // 回充 + CLEAN_PAUSE = 3; // 清洁(包括自动清洁、选房、选区、定点)暂停 + CLEAN_RESUME = 4; // 清洁(包括自动清洁、选房、选区、定点)恢复 + } + Type type = 2; + + enum Source { + KEY = 0; // 机身按键 + APP = 1; // APP控制 + TIMER = 2; // 预约定时 + } + Source source = 3; + + uint64 timestamp = 4; // 时间戳,单位s,不带时区 + } + ControlEvent ctrl_event = 5; + + // 配网事件 + message DistributeEvent { + message TimeStamp { + uint64 value = 1; // 时间戳,单位s,不带时区 + } + TimeStamp timestamp = 1; // 配网结束时间,仅配网成功有这个字段 + + enum Mode { + AP = 0; // AP + BLE = 1; // 蓝牙 + } + Mode mode = 2; + + enum Result { + E_OK = 0; // 成功 + E_SRV_ERR = 1; // 服务异常(连路由器超时) + E_AP_NOT_FOUND = 2; // 没有找到 ap + E_PASSWD_ERR = 3; // 密码错误 + E_DHCP_ERR = 4; // dhcp 错误 + E_GW_ERR = 5; // 网关错误 + E_DNS_ERR = 6; // dns 错误 + E_NET_ERR = 7; // 网络错误 + } + Result result = 3; + + string software_version = 4; // 固件版本 + string sn = 7; // sn + string mac = 5; // mac 地址 + string uuid = 6; // uuid + + string country_code = 8; // 国家地区码 https://datahub.io/core/country-list + string token = 9; // token + } + DistributeEvent distribute_event = 6; + + // 电池信息 + message BatteryInfo { + uint64 update_time = 1; // 更新时间,单位s,不带时区 + uint32 show_level = 2; // 显示电量百分比,0 - 100 + uint32 real_level = 3; // 真实电量百分比,0 - 100 + uint32 voltage = 4; // 电压,单位mV + sint32 current = 5; // 电流,单位mA + repeated sint32 temperature = 6; // 温度,单位0.1摄氏度(支持单个或多个电池) + } + BatteryInfo battery_info = 7; +} + +message AnalysisResponse { + // 机器人内部状态信息,不做缓存,变化比较频繁时将只上传最后的状态 + AnalysisInternalStatus internal_status = 1; + + // 数据分析信息,做缓存,保证数据不丢失 + AnalysisStatistics statistics = 2; +} diff --git a/proto-reference/analysis_pb2.py b/proto-reference/analysis_pb2.py new file mode 100644 index 0000000..27807ac --- /dev/null +++ b/proto-reference/analysis_pb2.py @@ -0,0 +1,65 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: proto/cloud/analysis.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1aproto/cloud/analysis.proto\x12\x0bproto.cloud\"\x11\n\x0f\x41nalysisRequest\"F\n\x16\x41nalysisInternalStatus\x12\x16\n\x0erobotapp_state\x18\x01 \x01(\t\x12\x14\n\x0cmotion_state\x18\x02 \x01(\t\"\xe0\x14\n\x12\x41nalysisStatistics\x12:\n\x05\x63lean\x18\x01 \x01(\x0b\x32+.proto.cloud.AnalysisStatistics.CleanRecord\x12<\n\x06gohome\x18\x02 \x01(\x0b\x32,.proto.cloud.AnalysisStatistics.GoHomeRecord\x12@\n\x08relocate\x18\x03 \x01(\x0b\x32..proto.cloud.AnalysisStatistics.RelocateRecord\x12>\n\x07\x63ollect\x18\x04 \x01(\x0b\x32-.proto.cloud.AnalysisStatistics.CollectRecord\x12@\n\nctrl_event\x18\x05 \x01(\x0b\x32,.proto.cloud.AnalysisStatistics.ControlEvent\x12I\n\x10\x64istribute_event\x18\x06 \x01(\x0b\x32/.proto.cloud.AnalysisStatistics.DistributeEvent\x12\x41\n\x0c\x62\x61ttery_info\x18\x07 \x01(\x0b\x32+.proto.cloud.AnalysisStatistics.BatteryInfo\x1a\xf2\x05\n\x0b\x43leanRecord\x12\x10\n\x08\x63lean_id\x18\x01 \x01(\r\x12\x0e\n\x06result\x18\x02 \x01(\x08\x12G\n\tfail_code\x18\x03 \x01(\x0e\x32\x34.proto.cloud.AnalysisStatistics.CleanRecord.FailCode\x12>\n\x04mode\x18\x04 \x01(\x0e\x32\x30.proto.cloud.AnalysisStatistics.CleanRecord.Mode\x12>\n\x04type\x18\x05 \x01(\x0e\x32\x30.proto.cloud.AnalysisStatistics.CleanRecord.Type\x12\x12\n\nstart_time\x18\x06 \x01(\x04\x12\x10\n\x08\x65nd_time\x18\x07 \x01(\x04\x12\x12\n\nclean_time\x18\x08 \x01(\r\x12\x12\n\nclean_area\x18\t \x01(\r\x12\x11\n\tslam_area\x18\n \x01(\r\x12\x0e\n\x06map_id\x18\x0b \x01(\r\x12\x12\n\nroom_count\x18\x0c \x01(\r\x12I\n\nroll_brush\x18\r \x01(\x0b\x32\x35.proto.cloud.AnalysisStatistics.CleanRecord.RollBrush\x1a\x39\n\tRollBrush\x12\x15\n\rprotect_count\x18\x01 \x01(\r\x12\x15\n\rstalled_count\x18\x02 \x01(\r\"J\n\x08\x46\x61ilCode\x12\n\n\x06UNKNOW\x10\x00\x12\x0f\n\x0bROBOT_FAULT\x10\x01\x12\x0f\n\x0bROBOT_ALERT\x10\x02\x12\x10\n\x0cMANUAL_BREAK\x10\x03\"h\n\x04Mode\x12\x0e\n\nAUTO_CLEAN\x10\x00\x12\x16\n\x12SELECT_ROOMS_CLEAN\x10\x01\x12\x16\n\x12SELECT_ZONES_CLEAN\x10\x02\x12\x0e\n\nSPOT_CLEAN\x10\x03\x12\x10\n\x0c\x46\x41ST_MAPPING\x10\x04\"7\n\x04Type\x12\x0e\n\nSWEEP_ONLY\x10\x00\x12\x0c\n\x08MOP_ONLY\x10\x01\x12\x11\n\rSWEEP_AND_MOP\x10\x02\x1a\x87\x02\n\x0cGoHomeRecord\x12\x10\n\x08\x63lean_id\x18\x01 \x01(\r\x12\x0e\n\x06result\x18\x02 \x01(\x08\x12H\n\tfail_code\x18\x03 \x01(\x0e\x32\x35.proto.cloud.AnalysisStatistics.GoHomeRecord.FailCode\x12\x13\n\x0bpower_level\x18\x04 \x01(\x04\x12\x12\n\nstart_time\x18\x05 \x01(\x04\x12\x10\n\x08\x65nd_time\x18\x06 \x01(\x04\"P\n\x08\x46\x61ilCode\x12\n\n\x06UNKNOW\x10\x00\x12\x10\n\x0cMANUAL_BREAK\x10\x01\x12\x11\n\rNAVIGATE_FAIL\x10\x02\x12\x13\n\x0f\x45NTER_HOME_FAIL\x10\x03\x1ak\n\x0eRelocateRecord\x12\x10\n\x08\x63lean_id\x18\x01 \x01(\r\x12\x0e\n\x06result\x18\x02 \x01(\x08\x12\x11\n\tmap_count\x18\x03 \x01(\r\x12\x12\n\nstart_time\x18\x04 \x01(\x04\x12\x10\n\x08\x65nd_time\x18\x05 \x01(\x04\x1a\x45\n\rCollectRecord\x12\x10\n\x08\x63lean_id\x18\x01 \x01(\r\x12\x0e\n\x06result\x18\x02 \x01(\x08\x12\x12\n\nstart_time\x18\x03 \x01(\x04\x1a\xb7\x02\n\x0c\x43ontrolEvent\x12\x10\n\x08\x63lean_id\x18\x01 \x01(\r\x12?\n\x04type\x18\x02 \x01(\x0e\x32\x31.proto.cloud.AnalysisStatistics.ControlEvent.Type\x12\x43\n\x06source\x18\x03 \x01(\x0e\x32\x33.proto.cloud.AnalysisStatistics.ControlEvent.Source\x12\x11\n\ttimestamp\x18\x04 \x01(\x04\"U\n\x04Type\x12\x0e\n\nAUTO_CLEAN\x10\x00\x12\x0e\n\nSPOT_CLEAN\x10\x01\x12\n\n\x06GOHOME\x10\x02\x12\x0f\n\x0b\x43LEAN_PAUSE\x10\x03\x12\x10\n\x0c\x43LEAN_RESUME\x10\x04\"%\n\x06Source\x12\x07\n\x03KEY\x10\x00\x12\x07\n\x03\x41PP\x10\x01\x12\t\n\x05TIMER\x10\x02\x1a\x8c\x04\n\x0f\x44istributeEvent\x12L\n\ttimestamp\x18\x01 \x01(\x0b\x32\x39.proto.cloud.AnalysisStatistics.DistributeEvent.TimeStamp\x12\x42\n\x04mode\x18\x02 \x01(\x0e\x32\x34.proto.cloud.AnalysisStatistics.DistributeEvent.Mode\x12\x46\n\x06result\x18\x03 \x01(\x0e\x32\x36.proto.cloud.AnalysisStatistics.DistributeEvent.Result\x12\x18\n\x10software_version\x18\x04 \x01(\t\x12\n\n\x02sn\x18\x07 \x01(\t\x12\x0b\n\x03mac\x18\x05 \x01(\t\x12\x0c\n\x04uuid\x18\x06 \x01(\t\x12\x14\n\x0c\x63ountry_code\x18\x08 \x01(\t\x12\r\n\x05token\x18\t \x01(\t\x1a\x1a\n\tTimeStamp\x12\r\n\x05value\x18\x01 \x01(\x04\"\x17\n\x04Mode\x12\x06\n\x02\x41P\x10\x00\x12\x07\n\x03\x42LE\x10\x01\"\x83\x01\n\x06Result\x12\x08\n\x04\x45_OK\x10\x00\x12\r\n\tE_SRV_ERR\x10\x01\x12\x12\n\x0e\x45_AP_NOT_FOUND\x10\x02\x12\x10\n\x0c\x45_PASSWD_ERR\x10\x03\x12\x0e\n\nE_DHCP_ERR\x10\x04\x12\x0c\n\x08\x45_GW_ERR\x10\x05\x12\r\n\tE_DNS_ERR\x10\x06\x12\r\n\tE_NET_ERR\x10\x07\x1a\x81\x01\n\x0b\x42\x61tteryInfo\x12\x13\n\x0bupdate_time\x18\x01 \x01(\x04\x12\x12\n\nshow_level\x18\x02 \x01(\r\x12\x12\n\nreal_level\x18\x03 \x01(\r\x12\x0f\n\x07voltage\x18\x04 \x01(\r\x12\x0f\n\x07\x63urrent\x18\x05 \x01(\x11\x12\x13\n\x0btemperature\x18\x06 \x03(\x11\"\x85\x01\n\x10\x41nalysisResponse\x12<\n\x0finternal_status\x18\x01 \x01(\x0b\x32#.proto.cloud.AnalysisInternalStatus\x12\x33\n\nstatistics\x18\x02 \x01(\x0b\x32\x1f.proto.cloud.AnalysisStatisticsb\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'proto.cloud.analysis_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _ANALYSISREQUEST._serialized_start=43 + _ANALYSISREQUEST._serialized_end=60 + _ANALYSISINTERNALSTATUS._serialized_start=62 + _ANALYSISINTERNALSTATUS._serialized_end=132 + _ANALYSISSTATISTICS._serialized_start=135 + _ANALYSISSTATISTICS._serialized_end=2791 + _ANALYSISSTATISTICS_CLEANRECORD._serialized_start=618 + _ANALYSISSTATISTICS_CLEANRECORD._serialized_end=1372 + _ANALYSISSTATISTICS_CLEANRECORD_ROLLBRUSH._serialized_start=1076 + _ANALYSISSTATISTICS_CLEANRECORD_ROLLBRUSH._serialized_end=1133 + _ANALYSISSTATISTICS_CLEANRECORD_FAILCODE._serialized_start=1135 + _ANALYSISSTATISTICS_CLEANRECORD_FAILCODE._serialized_end=1209 + _ANALYSISSTATISTICS_CLEANRECORD_MODE._serialized_start=1211 + _ANALYSISSTATISTICS_CLEANRECORD_MODE._serialized_end=1315 + _ANALYSISSTATISTICS_CLEANRECORD_TYPE._serialized_start=1317 + _ANALYSISSTATISTICS_CLEANRECORD_TYPE._serialized_end=1372 + _ANALYSISSTATISTICS_GOHOMERECORD._serialized_start=1375 + _ANALYSISSTATISTICS_GOHOMERECORD._serialized_end=1638 + _ANALYSISSTATISTICS_GOHOMERECORD_FAILCODE._serialized_start=1558 + _ANALYSISSTATISTICS_GOHOMERECORD_FAILCODE._serialized_end=1638 + _ANALYSISSTATISTICS_RELOCATERECORD._serialized_start=1640 + _ANALYSISSTATISTICS_RELOCATERECORD._serialized_end=1747 + _ANALYSISSTATISTICS_COLLECTRECORD._serialized_start=1749 + _ANALYSISSTATISTICS_COLLECTRECORD._serialized_end=1818 + _ANALYSISSTATISTICS_CONTROLEVENT._serialized_start=1821 + _ANALYSISSTATISTICS_CONTROLEVENT._serialized_end=2132 + _ANALYSISSTATISTICS_CONTROLEVENT_TYPE._serialized_start=2008 + _ANALYSISSTATISTICS_CONTROLEVENT_TYPE._serialized_end=2093 + _ANALYSISSTATISTICS_CONTROLEVENT_SOURCE._serialized_start=2095 + _ANALYSISSTATISTICS_CONTROLEVENT_SOURCE._serialized_end=2132 + _ANALYSISSTATISTICS_DISTRIBUTEEVENT._serialized_start=2135 + _ANALYSISSTATISTICS_DISTRIBUTEEVENT._serialized_end=2659 + _ANALYSISSTATISTICS_DISTRIBUTEEVENT_TIMESTAMP._serialized_start=2474 + _ANALYSISSTATISTICS_DISTRIBUTEEVENT_TIMESTAMP._serialized_end=2500 + _ANALYSISSTATISTICS_DISTRIBUTEEVENT_MODE._serialized_start=2502 + _ANALYSISSTATISTICS_DISTRIBUTEEVENT_MODE._serialized_end=2525 + _ANALYSISSTATISTICS_DISTRIBUTEEVENT_RESULT._serialized_start=2528 + _ANALYSISSTATISTICS_DISTRIBUTEEVENT_RESULT._serialized_end=2659 + _ANALYSISSTATISTICS_BATTERYINFO._serialized_start=2662 + _ANALYSISSTATISTICS_BATTERYINFO._serialized_end=2791 + _ANALYSISRESPONSE._serialized_start=2794 + _ANALYSISRESPONSE._serialized_end=2927 +# @@protoc_insertion_point(module_scope) diff --git a/proto-reference/analysis_pb2.pyi b/proto-reference/analysis_pb2.pyi new file mode 100644 index 0000000..fd36dbc --- /dev/null +++ b/proto-reference/analysis_pb2.pyi @@ -0,0 +1,220 @@ +from google.protobuf.internal import containers as _containers +from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class AnalysisInternalStatus(_message.Message): + __slots__ = ["motion_state", "robotapp_state"] + MOTION_STATE_FIELD_NUMBER: _ClassVar[int] + ROBOTAPP_STATE_FIELD_NUMBER: _ClassVar[int] + motion_state: str + robotapp_state: str + def __init__(self, robotapp_state: _Optional[str] = ..., motion_state: _Optional[str] = ...) -> None: ... + +class AnalysisRequest(_message.Message): + __slots__ = [] + def __init__(self) -> None: ... + +class AnalysisResponse(_message.Message): + __slots__ = ["internal_status", "statistics"] + INTERNAL_STATUS_FIELD_NUMBER: _ClassVar[int] + STATISTICS_FIELD_NUMBER: _ClassVar[int] + internal_status: AnalysisInternalStatus + statistics: AnalysisStatistics + def __init__(self, internal_status: _Optional[_Union[AnalysisInternalStatus, _Mapping]] = ..., statistics: _Optional[_Union[AnalysisStatistics, _Mapping]] = ...) -> None: ... + +class AnalysisStatistics(_message.Message): + __slots__ = ["battery_info", "clean", "collect", "ctrl_event", "distribute_event", "gohome", "relocate"] + class BatteryInfo(_message.Message): + __slots__ = ["current", "real_level", "show_level", "temperature", "update_time", "voltage"] + CURRENT_FIELD_NUMBER: _ClassVar[int] + REAL_LEVEL_FIELD_NUMBER: _ClassVar[int] + SHOW_LEVEL_FIELD_NUMBER: _ClassVar[int] + TEMPERATURE_FIELD_NUMBER: _ClassVar[int] + UPDATE_TIME_FIELD_NUMBER: _ClassVar[int] + VOLTAGE_FIELD_NUMBER: _ClassVar[int] + current: int + real_level: int + show_level: int + temperature: _containers.RepeatedScalarFieldContainer[int] + update_time: int + voltage: int + def __init__(self, update_time: _Optional[int] = ..., show_level: _Optional[int] = ..., real_level: _Optional[int] = ..., voltage: _Optional[int] = ..., current: _Optional[int] = ..., temperature: _Optional[_Iterable[int]] = ...) -> None: ... + class CleanRecord(_message.Message): + __slots__ = ["clean_area", "clean_id", "clean_time", "end_time", "fail_code", "map_id", "mode", "result", "roll_brush", "room_count", "slam_area", "start_time", "type"] + class FailCode(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + class Mode(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + class Type(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + class RollBrush(_message.Message): + __slots__ = ["protect_count", "stalled_count"] + PROTECT_COUNT_FIELD_NUMBER: _ClassVar[int] + STALLED_COUNT_FIELD_NUMBER: _ClassVar[int] + protect_count: int + stalled_count: int + def __init__(self, protect_count: _Optional[int] = ..., stalled_count: _Optional[int] = ...) -> None: ... + AUTO_CLEAN: AnalysisStatistics.CleanRecord.Mode + CLEAN_AREA_FIELD_NUMBER: _ClassVar[int] + CLEAN_ID_FIELD_NUMBER: _ClassVar[int] + CLEAN_TIME_FIELD_NUMBER: _ClassVar[int] + END_TIME_FIELD_NUMBER: _ClassVar[int] + FAIL_CODE_FIELD_NUMBER: _ClassVar[int] + FAST_MAPPING: AnalysisStatistics.CleanRecord.Mode + MANUAL_BREAK: AnalysisStatistics.CleanRecord.FailCode + MAP_ID_FIELD_NUMBER: _ClassVar[int] + MODE_FIELD_NUMBER: _ClassVar[int] + MOP_ONLY: AnalysisStatistics.CleanRecord.Type + RESULT_FIELD_NUMBER: _ClassVar[int] + ROBOT_ALERT: AnalysisStatistics.CleanRecord.FailCode + ROBOT_FAULT: AnalysisStatistics.CleanRecord.FailCode + ROLL_BRUSH_FIELD_NUMBER: _ClassVar[int] + ROOM_COUNT_FIELD_NUMBER: _ClassVar[int] + SELECT_ROOMS_CLEAN: AnalysisStatistics.CleanRecord.Mode + SELECT_ZONES_CLEAN: AnalysisStatistics.CleanRecord.Mode + SLAM_AREA_FIELD_NUMBER: _ClassVar[int] + SPOT_CLEAN: AnalysisStatistics.CleanRecord.Mode + START_TIME_FIELD_NUMBER: _ClassVar[int] + SWEEP_AND_MOP: AnalysisStatistics.CleanRecord.Type + SWEEP_ONLY: AnalysisStatistics.CleanRecord.Type + TYPE_FIELD_NUMBER: _ClassVar[int] + UNKNOW: AnalysisStatistics.CleanRecord.FailCode + clean_area: int + clean_id: int + clean_time: int + end_time: int + fail_code: AnalysisStatistics.CleanRecord.FailCode + map_id: int + mode: AnalysisStatistics.CleanRecord.Mode + result: bool + roll_brush: AnalysisStatistics.CleanRecord.RollBrush + room_count: int + slam_area: int + start_time: int + type: AnalysisStatistics.CleanRecord.Type + def __init__(self, clean_id: _Optional[int] = ..., result: bool = ..., fail_code: _Optional[_Union[AnalysisStatistics.CleanRecord.FailCode, str]] = ..., mode: _Optional[_Union[AnalysisStatistics.CleanRecord.Mode, str]] = ..., type: _Optional[_Union[AnalysisStatistics.CleanRecord.Type, str]] = ..., start_time: _Optional[int] = ..., end_time: _Optional[int] = ..., clean_time: _Optional[int] = ..., clean_area: _Optional[int] = ..., slam_area: _Optional[int] = ..., map_id: _Optional[int] = ..., room_count: _Optional[int] = ..., roll_brush: _Optional[_Union[AnalysisStatistics.CleanRecord.RollBrush, _Mapping]] = ...) -> None: ... + class CollectRecord(_message.Message): + __slots__ = ["clean_id", "result", "start_time"] + CLEAN_ID_FIELD_NUMBER: _ClassVar[int] + RESULT_FIELD_NUMBER: _ClassVar[int] + START_TIME_FIELD_NUMBER: _ClassVar[int] + clean_id: int + result: bool + start_time: int + def __init__(self, clean_id: _Optional[int] = ..., result: bool = ..., start_time: _Optional[int] = ...) -> None: ... + class ControlEvent(_message.Message): + __slots__ = ["clean_id", "source", "timestamp", "type"] + class Source(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + class Type(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + APP: AnalysisStatistics.ControlEvent.Source + AUTO_CLEAN: AnalysisStatistics.ControlEvent.Type + CLEAN_ID_FIELD_NUMBER: _ClassVar[int] + CLEAN_PAUSE: AnalysisStatistics.ControlEvent.Type + CLEAN_RESUME: AnalysisStatistics.ControlEvent.Type + GOHOME: AnalysisStatistics.ControlEvent.Type + KEY: AnalysisStatistics.ControlEvent.Source + SOURCE_FIELD_NUMBER: _ClassVar[int] + SPOT_CLEAN: AnalysisStatistics.ControlEvent.Type + TIMER: AnalysisStatistics.ControlEvent.Source + TIMESTAMP_FIELD_NUMBER: _ClassVar[int] + TYPE_FIELD_NUMBER: _ClassVar[int] + clean_id: int + source: AnalysisStatistics.ControlEvent.Source + timestamp: int + type: AnalysisStatistics.ControlEvent.Type + def __init__(self, clean_id: _Optional[int] = ..., type: _Optional[_Union[AnalysisStatistics.ControlEvent.Type, str]] = ..., source: _Optional[_Union[AnalysisStatistics.ControlEvent.Source, str]] = ..., timestamp: _Optional[int] = ...) -> None: ... + class DistributeEvent(_message.Message): + __slots__ = ["country_code", "mac", "mode", "result", "sn", "software_version", "timestamp", "token", "uuid"] + class Mode(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + class Result(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + class TimeStamp(_message.Message): + __slots__ = ["value"] + VALUE_FIELD_NUMBER: _ClassVar[int] + value: int + def __init__(self, value: _Optional[int] = ...) -> None: ... + AP: AnalysisStatistics.DistributeEvent.Mode + BLE: AnalysisStatistics.DistributeEvent.Mode + COUNTRY_CODE_FIELD_NUMBER: _ClassVar[int] + E_AP_NOT_FOUND: AnalysisStatistics.DistributeEvent.Result + E_DHCP_ERR: AnalysisStatistics.DistributeEvent.Result + E_DNS_ERR: AnalysisStatistics.DistributeEvent.Result + E_GW_ERR: AnalysisStatistics.DistributeEvent.Result + E_NET_ERR: AnalysisStatistics.DistributeEvent.Result + E_OK: AnalysisStatistics.DistributeEvent.Result + E_PASSWD_ERR: AnalysisStatistics.DistributeEvent.Result + E_SRV_ERR: AnalysisStatistics.DistributeEvent.Result + MAC_FIELD_NUMBER: _ClassVar[int] + MODE_FIELD_NUMBER: _ClassVar[int] + RESULT_FIELD_NUMBER: _ClassVar[int] + SN_FIELD_NUMBER: _ClassVar[int] + SOFTWARE_VERSION_FIELD_NUMBER: _ClassVar[int] + TIMESTAMP_FIELD_NUMBER: _ClassVar[int] + TOKEN_FIELD_NUMBER: _ClassVar[int] + UUID_FIELD_NUMBER: _ClassVar[int] + country_code: str + mac: str + mode: AnalysisStatistics.DistributeEvent.Mode + result: AnalysisStatistics.DistributeEvent.Result + sn: str + software_version: str + timestamp: AnalysisStatistics.DistributeEvent.TimeStamp + token: str + uuid: str + def __init__(self, timestamp: _Optional[_Union[AnalysisStatistics.DistributeEvent.TimeStamp, _Mapping]] = ..., mode: _Optional[_Union[AnalysisStatistics.DistributeEvent.Mode, str]] = ..., result: _Optional[_Union[AnalysisStatistics.DistributeEvent.Result, str]] = ..., software_version: _Optional[str] = ..., sn: _Optional[str] = ..., mac: _Optional[str] = ..., uuid: _Optional[str] = ..., country_code: _Optional[str] = ..., token: _Optional[str] = ...) -> None: ... + class GoHomeRecord(_message.Message): + __slots__ = ["clean_id", "end_time", "fail_code", "power_level", "result", "start_time"] + class FailCode(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + CLEAN_ID_FIELD_NUMBER: _ClassVar[int] + END_TIME_FIELD_NUMBER: _ClassVar[int] + ENTER_HOME_FAIL: AnalysisStatistics.GoHomeRecord.FailCode + FAIL_CODE_FIELD_NUMBER: _ClassVar[int] + MANUAL_BREAK: AnalysisStatistics.GoHomeRecord.FailCode + NAVIGATE_FAIL: AnalysisStatistics.GoHomeRecord.FailCode + POWER_LEVEL_FIELD_NUMBER: _ClassVar[int] + RESULT_FIELD_NUMBER: _ClassVar[int] + START_TIME_FIELD_NUMBER: _ClassVar[int] + UNKNOW: AnalysisStatistics.GoHomeRecord.FailCode + clean_id: int + end_time: int + fail_code: AnalysisStatistics.GoHomeRecord.FailCode + power_level: int + result: bool + start_time: int + def __init__(self, clean_id: _Optional[int] = ..., result: bool = ..., fail_code: _Optional[_Union[AnalysisStatistics.GoHomeRecord.FailCode, str]] = ..., power_level: _Optional[int] = ..., start_time: _Optional[int] = ..., end_time: _Optional[int] = ...) -> None: ... + class RelocateRecord(_message.Message): + __slots__ = ["clean_id", "end_time", "map_count", "result", "start_time"] + CLEAN_ID_FIELD_NUMBER: _ClassVar[int] + END_TIME_FIELD_NUMBER: _ClassVar[int] + MAP_COUNT_FIELD_NUMBER: _ClassVar[int] + RESULT_FIELD_NUMBER: _ClassVar[int] + START_TIME_FIELD_NUMBER: _ClassVar[int] + clean_id: int + end_time: int + map_count: int + result: bool + start_time: int + def __init__(self, clean_id: _Optional[int] = ..., result: bool = ..., map_count: _Optional[int] = ..., start_time: _Optional[int] = ..., end_time: _Optional[int] = ...) -> None: ... + BATTERY_INFO_FIELD_NUMBER: _ClassVar[int] + CLEAN_FIELD_NUMBER: _ClassVar[int] + COLLECT_FIELD_NUMBER: _ClassVar[int] + CTRL_EVENT_FIELD_NUMBER: _ClassVar[int] + DISTRIBUTE_EVENT_FIELD_NUMBER: _ClassVar[int] + GOHOME_FIELD_NUMBER: _ClassVar[int] + RELOCATE_FIELD_NUMBER: _ClassVar[int] + battery_info: AnalysisStatistics.BatteryInfo + clean: AnalysisStatistics.CleanRecord + collect: AnalysisStatistics.CollectRecord + ctrl_event: AnalysisStatistics.ControlEvent + distribute_event: AnalysisStatistics.DistributeEvent + gohome: AnalysisStatistics.GoHomeRecord + relocate: AnalysisStatistics.RelocateRecord + def __init__(self, clean: _Optional[_Union[AnalysisStatistics.CleanRecord, _Mapping]] = ..., gohome: _Optional[_Union[AnalysisStatistics.GoHomeRecord, _Mapping]] = ..., relocate: _Optional[_Union[AnalysisStatistics.RelocateRecord, _Mapping]] = ..., collect: _Optional[_Union[AnalysisStatistics.CollectRecord, _Mapping]] = ..., ctrl_event: _Optional[_Union[AnalysisStatistics.ControlEvent, _Mapping]] = ..., distribute_event: _Optional[_Union[AnalysisStatistics.DistributeEvent, _Mapping]] = ..., battery_info: _Optional[_Union[AnalysisStatistics.BatteryInfo, _Mapping]] = ...) -> None: ... diff --git a/proto-reference/app_device_info.proto b/proto-reference/app_device_info.proto new file mode 100644 index 0000000..c653430 --- /dev/null +++ b/proto-reference/app_device_info.proto @@ -0,0 +1,54 @@ +syntax = "proto3"; + +// option optimize_for = LITE_RUNTIME; + +package proto.cloud; + +import "proto/cloud/version.proto"; + +// 手机 app 每次进入实时地图控制面板后有且仅下发一次 +// 手机 app 主用户和分享用户都需要发送这个消息,其中 user_id 必须填主用户的 +message AppInfo { + enum Platform { + PF_OTHER = 0; + PF_ANDROID = 1; + PF_IOS = 2; + PF_CLOUD = 3; + } + Platform platform = 1; + + string app_version = 2; // App 版本,如 "3.3.60" + string family_id = 3; // 主用户 family_id + string user_id = 4; // 主用户 user_id + + enum DataCenter { + EU = 0; // 欧洲数据中心 + AZ = 1; // 美国数据中心 + AY = 2; // 亚洲数据中心 + } + DataCenter data_center = 5; + + AppFunction app_function = 6; + + string time_zone_id = 7; // 时区 id,如 "Asia/Shanghai" +} + +// 机器上线时上报一次或者 ip、user_id 变更上报 +message DeviceInfo { + string product_name = 1; // 产品名称,如 eufy Clean xxx + string video_sn = 2; // 序列号(video 相关服务使用) + string device_mac = 3; // 设备 mac + string software = 4; // 软件版本,如 "1.2.3" + uint32 hardware = 5; // 硬件版本,如 2 + string wifi_name = 6; // 已连接的 wifi 名称 + string wifi_ip = 7; // 当前 wifi 的 ip + string last_user_id = 8; // 机器上存储的最新 user_id(用于 app 判断是否相同账户) + + message Station { + string software = 1; // 软件版本,如 "1.2.3" + uint32 hardware = 2; // 硬件版本,如 400 + } + Station station = 11; // 基站信息(机器在基站开机才有这个字段) + + ProtoInfo proto_info = 12; +} diff --git a/proto-reference/app_device_info_pb2.py b/proto-reference/app_device_info_pb2.py new file mode 100644 index 0000000..c4194a4 --- /dev/null +++ b/proto-reference/app_device_info_pb2.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: proto/cloud/app_device_info.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder + +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from ...proto.cloud import version_pb2 as proto_dot_cloud_dot_version__pb2 + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!proto/cloud/app_device_info.proto\x12\x0bproto.cloud\x1a\x19proto/cloud/version.proto\"\xd9\x02\n\x07\x41ppInfo\x12/\n\x08platform\x18\x01 \x01(\x0e\x32\x1d.proto.cloud.AppInfo.Platform\x12\x13\n\x0b\x61pp_version\x18\x02 \x01(\t\x12\x11\n\tfamily_id\x18\x03 \x01(\t\x12\x0f\n\x07user_id\x18\x04 \x01(\t\x12\x34\n\x0b\x64\x61ta_center\x18\x05 \x01(\x0e\x32\x1f.proto.cloud.AppInfo.DataCenter\x12.\n\x0c\x61pp_function\x18\x06 \x01(\x0b\x32\x18.proto.cloud.AppFunction\x12\x14\n\x0ctime_zone_id\x18\x07 \x01(\t\"B\n\x08Platform\x12\x0c\n\x08PF_OTHER\x10\x00\x12\x0e\n\nPF_ANDROID\x10\x01\x12\n\n\x06PF_IOS\x10\x02\x12\x0c\n\x08PF_CLOUD\x10\x03\"$\n\nDataCenter\x12\x06\n\x02\x45U\x10\x00\x12\x06\n\x02\x41Z\x10\x01\x12\x06\n\x02\x41Y\x10\x02\"\xb3\x02\n\nDeviceInfo\x12\x14\n\x0cproduct_name\x18\x01 \x01(\t\x12\x10\n\x08video_sn\x18\x02 \x01(\t\x12\x12\n\ndevice_mac\x18\x03 \x01(\t\x12\x10\n\x08software\x18\x04 \x01(\t\x12\x10\n\x08hardware\x18\x05 \x01(\r\x12\x11\n\twifi_name\x18\x06 \x01(\t\x12\x0f\n\x07wifi_ip\x18\x07 \x01(\t\x12\x14\n\x0clast_user_id\x18\x08 \x01(\t\x12\x30\n\x07station\x18\x0b \x01(\x0b\x32\x1f.proto.cloud.DeviceInfo.Station\x12*\n\nproto_info\x18\x0c \x01(\x0b\x32\x16.proto.cloud.ProtoInfo\x1a-\n\x07Station\x12\x10\n\x08software\x18\x01 \x01(\t\x12\x10\n\x08hardware\x18\x02 \x01(\rb\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'proto.cloud.app_device_info_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _APPINFO._serialized_start=78 + _APPINFO._serialized_end=423 + _APPINFO_PLATFORM._serialized_start=319 + _APPINFO_PLATFORM._serialized_end=385 + _APPINFO_DATACENTER._serialized_start=387 + _APPINFO_DATACENTER._serialized_end=423 + _DEVICEINFO._serialized_start=426 + _DEVICEINFO._serialized_end=733 + _DEVICEINFO_STATION._serialized_start=688 + _DEVICEINFO_STATION._serialized_end=733 +# @@protoc_insertion_point(module_scope) diff --git a/proto-reference/app_device_info_pb2.pyi b/proto-reference/app_device_info_pb2.pyi new file mode 100644 index 0000000..1463c3a --- /dev/null +++ b/proto-reference/app_device_info_pb2.pyi @@ -0,0 +1,72 @@ +from typing import ClassVar as _ClassVar +from typing import Mapping as _Mapping +from typing import Optional as _Optional +from typing import Union as _Union + +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper + +from ...proto.cloud import version_pb2 as _version_pb2 + +DESCRIPTOR: _descriptor.FileDescriptor + +class AppInfo(_message.Message): + __slots__ = ["app_function", "app_version", "data_center", "family_id", "platform", "time_zone_id", "user_id"] + class DataCenter(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + class Platform(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + APP_FUNCTION_FIELD_NUMBER: _ClassVar[int] + APP_VERSION_FIELD_NUMBER: _ClassVar[int] + AY: AppInfo.DataCenter + AZ: AppInfo.DataCenter + DATA_CENTER_FIELD_NUMBER: _ClassVar[int] + EU: AppInfo.DataCenter + FAMILY_ID_FIELD_NUMBER: _ClassVar[int] + PF_ANDROID: AppInfo.Platform + PF_CLOUD: AppInfo.Platform + PF_IOS: AppInfo.Platform + PF_OTHER: AppInfo.Platform + PLATFORM_FIELD_NUMBER: _ClassVar[int] + TIME_ZONE_ID_FIELD_NUMBER: _ClassVar[int] + USER_ID_FIELD_NUMBER: _ClassVar[int] + app_function: _version_pb2.AppFunction + app_version: str + data_center: AppInfo.DataCenter + family_id: str + platform: AppInfo.Platform + time_zone_id: str + user_id: str + def __init__(self, platform: _Optional[_Union[AppInfo.Platform, str]] = ..., app_version: _Optional[str] = ..., family_id: _Optional[str] = ..., user_id: _Optional[str] = ..., data_center: _Optional[_Union[AppInfo.DataCenter, str]] = ..., app_function: _Optional[_Union[_version_pb2.AppFunction, _Mapping]] = ..., time_zone_id: _Optional[str] = ...) -> None: ... + +class DeviceInfo(_message.Message): + __slots__ = ["device_mac", "hardware", "last_user_id", "product_name", "proto_info", "software", "station", "video_sn", "wifi_ip", "wifi_name"] + class Station(_message.Message): + __slots__ = ["hardware", "software"] + HARDWARE_FIELD_NUMBER: _ClassVar[int] + SOFTWARE_FIELD_NUMBER: _ClassVar[int] + hardware: int + software: str + def __init__(self, software: _Optional[str] = ..., hardware: _Optional[int] = ...) -> None: ... + DEVICE_MAC_FIELD_NUMBER: _ClassVar[int] + HARDWARE_FIELD_NUMBER: _ClassVar[int] + LAST_USER_ID_FIELD_NUMBER: _ClassVar[int] + PRODUCT_NAME_FIELD_NUMBER: _ClassVar[int] + PROTO_INFO_FIELD_NUMBER: _ClassVar[int] + SOFTWARE_FIELD_NUMBER: _ClassVar[int] + STATION_FIELD_NUMBER: _ClassVar[int] + VIDEO_SN_FIELD_NUMBER: _ClassVar[int] + WIFI_IP_FIELD_NUMBER: _ClassVar[int] + WIFI_NAME_FIELD_NUMBER: _ClassVar[int] + device_mac: str + hardware: int + last_user_id: str + product_name: str + proto_info: _version_pb2.ProtoInfo + software: str + station: DeviceInfo.Station + video_sn: str + wifi_ip: str + wifi_name: str + def __init__(self, product_name: _Optional[str] = ..., video_sn: _Optional[str] = ..., device_mac: _Optional[str] = ..., software: _Optional[str] = ..., hardware: _Optional[int] = ..., wifi_name: _Optional[str] = ..., wifi_ip: _Optional[str] = ..., last_user_id: _Optional[str] = ..., station: _Optional[_Union[DeviceInfo.Station, _Mapping]] = ..., proto_info: _Optional[_Union[_version_pb2.ProtoInfo, _Mapping]] = ...) -> None: ... diff --git a/proto-reference/ble.proto b/proto-reference/ble.proto new file mode 100644 index 0000000..435e315 --- /dev/null +++ b/proto-reference/ble.proto @@ -0,0 +1,134 @@ +/** + * 蓝牙协议,通过 btgatt 进行通信; + */ +syntax = "proto3"; + +// option optimize_for = LITE_RUNTIME; + +package proto.cloud; + +// 手机 app 发给机器人 +message BtAppMsg { + message GetProductInfo { + bool get = 1; // 该字段随意填入 + + // 手机端配网功能的版本 + // 设备根据获取的版本使用不同的配网方法 + // 目前:版本=0 蓝牙配网不加密 + // 版本=1 蓝牙配网的 ssid、passwd 使用 AesCbc128 加密 + uint32 distribute_version = 2; + + message RemedyField { + uint32 distribute_version2 = 1; // distribute_version 必须传 0 时使用该字段 + } + RemedyField remedy_field = 3; // X10 Pro Omni 项目错误使用了 distribute_version 需要补救,其他项目不需要该字段 + + // WiFi 合规需要country code,如 CN、US、JP + message Country { + string code = 1; // https://datahub.io/core/country-list + } + Country country = 4; + } + GetProductInfo get_product_info = 1; + + message GetApList { + uint32 max_num = 1; + } + GetApList get_ap_list = 2; + + message Distribute { + string ssid = 1; + string passwd = 2; + string token = 3; + string user_id = 4; + string time_zone_id = 5; // 时区 id,如 "Asia/Shanghai" + + string domain = 6; // 服务器域名,如 "https://vsaas-api-ci.eufylife.com" + string app_id = 7; // app id,如 "eufy_home" + string house_id = 8; + string dev_name = 9; + string hub_name = 10; + } + Distribute distribute = 3; + + // id 4 已不再使用 + + message Debug { + string d_data = 1; + } + Debug req = 5; +} + +// 机器人发给手机 App +message BtRobotMsg { + message ProductInfo { + enum Result { + E_OK = 0; + E_FAIL = 1; + } + Result ret = 1; // 该字段为 E_OK 时其他字段才有非零值 + string brand = 2; // 如 eufy + string code_name = 3; // 如 T2320 + string model = 4; // 如 mopper + string name = 5; // 如 Eufyclean M61 + string alisa_name = 6; // 如 Eufyclean M61 + string cloud_pid = 7; + string mac = 8; // 使用 AesCbc128 加密 + + // 机器端配网功能的版本 + // 手机 app 根据获取的版本使用不同的配网方法 + // 目前:版本=0 蓝牙配网不加密 + // 版本=1 蓝牙配网的 ssid、passwd 使用 AesCbc128 加密 + uint32 distribute_version = 10; + + message RemedyField { + uint32 distribute_version2 = 1; // distribute_version 必须传 0 时使用该字段 + } + RemedyField remedy_field = 11; // X10 Pro Omni 项目错误使用了 distribute_version 需要补救,其他项目不需要该字段 + } + ProductInfo product_info = 1; + + message ApList { + message ApInfo { + string ssid = 1; + int32 dbm = 2; + } + repeated ApInfo ap_info = 1; + } + ApList ap_list = 2; + + message DistributeResult { + enum Value { + E_OK = 0; // 成功 + E_SRV_ERR = 1; // 服务异常 + E_AP_NOT_FOUND = 2; // 没有找到 ap + E_PASSWD_ERR = 3; // 密码错误 + E_DHCP_ERR = 4; // dhcp 错误 + E_GW_ERR = 5; // 网关错误 + E_DNS_ERR = 6; // dns 错误 + E_NET_ERR = 7; // 网络错误 + } + Value value = 1; + string mac = 2; // 使用 AesCbc128 加密 + string pid = 3; + string uuid = 4; // SN + string authkey = 5; // chip_id + int32 dbm = 6; // 选择 ap 的信号强度 + + message AiotResult { + int32 get_mqtt_info_ret = 1; + int32 get_data_point_ret = 2; + int32 connect_mqtt_ret = 3; + int32 bind_ret = 4; + } + AiotResult aiot_result = 7; + } + DistributeResult distribute_result = 3; + + // id 4 已不再使用 + + message Debug { + string d_data = 1; + } + Debug ack = 5; +} diff --git a/proto-reference/ble_pb2.py b/proto-reference/ble_pb2.py new file mode 100644 index 0000000..2ad7019 --- /dev/null +++ b/proto-reference/ble_pb2.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: proto/cloud/ble.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x15proto/cloud/ble.proto\x12\x0bproto.cloud\"\xd8\x05\n\x08\x42tAppMsg\x12>\n\x10get_product_info\x18\x01 \x01(\x0b\x32$.proto.cloud.BtAppMsg.GetProductInfo\x12\x34\n\x0bget_ap_list\x18\x02 \x01(\x0b\x32\x1f.proto.cloud.BtAppMsg.GetApList\x12\x34\n\ndistribute\x18\x03 \x01(\x0b\x32 .proto.cloud.BtAppMsg.Distribute\x12(\n\x03req\x18\x05 \x01(\x0b\x32\x1b.proto.cloud.BtAppMsg.Debug\x1a\x85\x02\n\x0eGetProductInfo\x12\x0b\n\x03get\x18\x01 \x01(\x08\x12\x1a\n\x12\x64istribute_version\x18\x02 \x01(\r\x12\x46\n\x0cremedy_field\x18\x03 \x01(\x0b\x32\x30.proto.cloud.BtAppMsg.GetProductInfo.RemedyField\x12=\n\x07\x63ountry\x18\x04 \x01(\x0b\x32,.proto.cloud.BtAppMsg.GetProductInfo.Country\x1a*\n\x0bRemedyField\x12\x1b\n\x13\x64istribute_version2\x18\x01 \x01(\r\x1a\x17\n\x07\x43ountry\x12\x0c\n\x04\x63ode\x18\x01 \x01(\t\x1a\x1c\n\tGetApList\x12\x0f\n\x07max_num\x18\x01 \x01(\r\x1a\xb6\x01\n\nDistribute\x12\x0c\n\x04ssid\x18\x01 \x01(\t\x12\x0e\n\x06passwd\x18\x02 \x01(\t\x12\r\n\x05token\x18\x03 \x01(\t\x12\x0f\n\x07user_id\x18\x04 \x01(\t\x12\x14\n\x0ctime_zone_id\x18\x05 \x01(\t\x12\x0e\n\x06\x64omain\x18\x06 \x01(\t\x12\x0e\n\x06\x61pp_id\x18\x07 \x01(\t\x12\x10\n\x08house_id\x18\x08 \x01(\t\x12\x10\n\x08\x64\x65v_name\x18\t \x01(\t\x12\x10\n\x08hub_name\x18\n \x01(\t\x1a\x17\n\x05\x44\x65\x62ug\x12\x0e\n\x06\x64_data\x18\x01 \x01(\t\"\xae\t\n\nBtRobotMsg\x12\x39\n\x0cproduct_info\x18\x01 \x01(\x0b\x32#.proto.cloud.BtRobotMsg.ProductInfo\x12/\n\x07\x61p_list\x18\x02 \x01(\x0b\x32\x1e.proto.cloud.BtRobotMsg.ApList\x12\x43\n\x11\x64istribute_result\x18\x03 \x01(\x0b\x32(.proto.cloud.BtRobotMsg.DistributeResult\x12*\n\x03\x61\x63k\x18\x05 \x01(\x0b\x32\x1d.proto.cloud.BtRobotMsg.Debug\x1a\xe8\x02\n\x0bProductInfo\x12\x37\n\x03ret\x18\x01 \x01(\x0e\x32*.proto.cloud.BtRobotMsg.ProductInfo.Result\x12\r\n\x05\x62rand\x18\x02 \x01(\t\x12\x11\n\tcode_name\x18\x03 \x01(\t\x12\r\n\x05model\x18\x04 \x01(\t\x12\x0c\n\x04name\x18\x05 \x01(\t\x12\x12\n\nalisa_name\x18\x06 \x01(\t\x12\x11\n\tcloud_pid\x18\x07 \x01(\t\x12\x0b\n\x03mac\x18\x08 \x01(\t\x12\x1a\n\x12\x64istribute_version\x18\n \x01(\r\x12\x45\n\x0cremedy_field\x18\x0b \x01(\x0b\x32/.proto.cloud.BtRobotMsg.ProductInfo.RemedyField\x1a*\n\x0bRemedyField\x12\x1b\n\x13\x64istribute_version2\x18\x01 \x01(\r\"\x1e\n\x06Result\x12\x08\n\x04\x45_OK\x10\x00\x12\n\n\x06\x45_FAIL\x10\x01\x1a\x65\n\x06\x41pList\x12\x36\n\x07\x61p_info\x18\x01 \x03(\x0b\x32%.proto.cloud.BtRobotMsg.ApList.ApInfo\x1a#\n\x06\x41pInfo\x12\x0c\n\x04ssid\x18\x01 \x01(\t\x12\x0b\n\x03\x64\x62m\x18\x02 \x01(\x05\x1a\xd7\x03\n\x10\x44istributeResult\x12=\n\x05value\x18\x01 \x01(\x0e\x32..proto.cloud.BtRobotMsg.DistributeResult.Value\x12\x0b\n\x03mac\x18\x02 \x01(\t\x12\x0b\n\x03pid\x18\x03 \x01(\t\x12\x0c\n\x04uuid\x18\x04 \x01(\t\x12\x0f\n\x07\x61uthkey\x18\x05 \x01(\t\x12\x0b\n\x03\x64\x62m\x18\x06 \x01(\x05\x12H\n\x0b\x61iot_result\x18\x07 \x01(\x0b\x32\x33.proto.cloud.BtRobotMsg.DistributeResult.AiotResult\x1ao\n\nAiotResult\x12\x19\n\x11get_mqtt_info_ret\x18\x01 \x01(\x05\x12\x1a\n\x12get_data_point_ret\x18\x02 \x01(\x05\x12\x18\n\x10\x63onnect_mqtt_ret\x18\x03 \x01(\x05\x12\x10\n\x08\x62ind_ret\x18\x04 \x01(\x05\"\x82\x01\n\x05Value\x12\x08\n\x04\x45_OK\x10\x00\x12\r\n\tE_SRV_ERR\x10\x01\x12\x12\n\x0e\x45_AP_NOT_FOUND\x10\x02\x12\x10\n\x0c\x45_PASSWD_ERR\x10\x03\x12\x0e\n\nE_DHCP_ERR\x10\x04\x12\x0c\n\x08\x45_GW_ERR\x10\x05\x12\r\n\tE_DNS_ERR\x10\x06\x12\r\n\tE_NET_ERR\x10\x07\x1a\x17\n\x05\x44\x65\x62ug\x12\x0e\n\x06\x64_data\x18\x01 \x01(\tb\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'proto.cloud.ble_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _BTAPPMSG._serialized_start=39 + _BTAPPMSG._serialized_end=767 + _BTAPPMSG_GETPRODUCTINFO._serialized_start=266 + _BTAPPMSG_GETPRODUCTINFO._serialized_end=527 + _BTAPPMSG_GETPRODUCTINFO_REMEDYFIELD._serialized_start=460 + _BTAPPMSG_GETPRODUCTINFO_REMEDYFIELD._serialized_end=502 + _BTAPPMSG_GETPRODUCTINFO_COUNTRY._serialized_start=504 + _BTAPPMSG_GETPRODUCTINFO_COUNTRY._serialized_end=527 + _BTAPPMSG_GETAPLIST._serialized_start=529 + _BTAPPMSG_GETAPLIST._serialized_end=557 + _BTAPPMSG_DISTRIBUTE._serialized_start=560 + _BTAPPMSG_DISTRIBUTE._serialized_end=742 + _BTAPPMSG_DEBUG._serialized_start=744 + _BTAPPMSG_DEBUG._serialized_end=767 + _BTROBOTMSG._serialized_start=770 + _BTROBOTMSG._serialized_end=1968 + _BTROBOTMSG_PRODUCTINFO._serialized_start=1006 + _BTROBOTMSG_PRODUCTINFO._serialized_end=1366 + _BTROBOTMSG_PRODUCTINFO_REMEDYFIELD._serialized_start=460 + _BTROBOTMSG_PRODUCTINFO_REMEDYFIELD._serialized_end=502 + _BTROBOTMSG_PRODUCTINFO_RESULT._serialized_start=1336 + _BTROBOTMSG_PRODUCTINFO_RESULT._serialized_end=1366 + _BTROBOTMSG_APLIST._serialized_start=1368 + _BTROBOTMSG_APLIST._serialized_end=1469 + _BTROBOTMSG_APLIST_APINFO._serialized_start=1434 + _BTROBOTMSG_APLIST_APINFO._serialized_end=1469 + _BTROBOTMSG_DISTRIBUTERESULT._serialized_start=1472 + _BTROBOTMSG_DISTRIBUTERESULT._serialized_end=1943 + _BTROBOTMSG_DISTRIBUTERESULT_AIOTRESULT._serialized_start=1699 + _BTROBOTMSG_DISTRIBUTERESULT_AIOTRESULT._serialized_end=1810 + _BTROBOTMSG_DISTRIBUTERESULT_VALUE._serialized_start=1813 + _BTROBOTMSG_DISTRIBUTERESULT_VALUE._serialized_end=1943 + _BTROBOTMSG_DEBUG._serialized_start=744 + _BTROBOTMSG_DEBUG._serialized_end=767 +# @@protoc_insertion_point(module_scope) diff --git a/proto-reference/ble_pb2.pyi b/proto-reference/ble_pb2.pyi new file mode 100644 index 0000000..a74a6c5 --- /dev/null +++ b/proto-reference/ble_pb2.pyi @@ -0,0 +1,172 @@ +from google.protobuf.internal import containers as _containers +from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class BtAppMsg(_message.Message): + __slots__ = ["distribute", "get_ap_list", "get_product_info", "req"] + class Debug(_message.Message): + __slots__ = ["d_data"] + D_DATA_FIELD_NUMBER: _ClassVar[int] + d_data: str + def __init__(self, d_data: _Optional[str] = ...) -> None: ... + class Distribute(_message.Message): + __slots__ = ["app_id", "dev_name", "domain", "house_id", "hub_name", "passwd", "ssid", "time_zone_id", "token", "user_id"] + APP_ID_FIELD_NUMBER: _ClassVar[int] + DEV_NAME_FIELD_NUMBER: _ClassVar[int] + DOMAIN_FIELD_NUMBER: _ClassVar[int] + HOUSE_ID_FIELD_NUMBER: _ClassVar[int] + HUB_NAME_FIELD_NUMBER: _ClassVar[int] + PASSWD_FIELD_NUMBER: _ClassVar[int] + SSID_FIELD_NUMBER: _ClassVar[int] + TIME_ZONE_ID_FIELD_NUMBER: _ClassVar[int] + TOKEN_FIELD_NUMBER: _ClassVar[int] + USER_ID_FIELD_NUMBER: _ClassVar[int] + app_id: str + dev_name: str + domain: str + house_id: str + hub_name: str + passwd: str + ssid: str + time_zone_id: str + token: str + user_id: str + def __init__(self, ssid: _Optional[str] = ..., passwd: _Optional[str] = ..., token: _Optional[str] = ..., user_id: _Optional[str] = ..., time_zone_id: _Optional[str] = ..., domain: _Optional[str] = ..., app_id: _Optional[str] = ..., house_id: _Optional[str] = ..., dev_name: _Optional[str] = ..., hub_name: _Optional[str] = ...) -> None: ... + class GetApList(_message.Message): + __slots__ = ["max_num"] + MAX_NUM_FIELD_NUMBER: _ClassVar[int] + max_num: int + def __init__(self, max_num: _Optional[int] = ...) -> None: ... + class GetProductInfo(_message.Message): + __slots__ = ["country", "distribute_version", "get", "remedy_field"] + class Country(_message.Message): + __slots__ = ["code"] + CODE_FIELD_NUMBER: _ClassVar[int] + code: str + def __init__(self, code: _Optional[str] = ...) -> None: ... + class RemedyField(_message.Message): + __slots__ = ["distribute_version2"] + DISTRIBUTE_VERSION2_FIELD_NUMBER: _ClassVar[int] + distribute_version2: int + def __init__(self, distribute_version2: _Optional[int] = ...) -> None: ... + COUNTRY_FIELD_NUMBER: _ClassVar[int] + DISTRIBUTE_VERSION_FIELD_NUMBER: _ClassVar[int] + GET_FIELD_NUMBER: _ClassVar[int] + REMEDY_FIELD_FIELD_NUMBER: _ClassVar[int] + country: BtAppMsg.GetProductInfo.Country + distribute_version: int + get: bool + remedy_field: BtAppMsg.GetProductInfo.RemedyField + def __init__(self, get: bool = ..., distribute_version: _Optional[int] = ..., remedy_field: _Optional[_Union[BtAppMsg.GetProductInfo.RemedyField, _Mapping]] = ..., country: _Optional[_Union[BtAppMsg.GetProductInfo.Country, _Mapping]] = ...) -> None: ... + DISTRIBUTE_FIELD_NUMBER: _ClassVar[int] + GET_AP_LIST_FIELD_NUMBER: _ClassVar[int] + GET_PRODUCT_INFO_FIELD_NUMBER: _ClassVar[int] + REQ_FIELD_NUMBER: _ClassVar[int] + distribute: BtAppMsg.Distribute + get_ap_list: BtAppMsg.GetApList + get_product_info: BtAppMsg.GetProductInfo + req: BtAppMsg.Debug + def __init__(self, get_product_info: _Optional[_Union[BtAppMsg.GetProductInfo, _Mapping]] = ..., get_ap_list: _Optional[_Union[BtAppMsg.GetApList, _Mapping]] = ..., distribute: _Optional[_Union[BtAppMsg.Distribute, _Mapping]] = ..., req: _Optional[_Union[BtAppMsg.Debug, _Mapping]] = ...) -> None: ... + +class BtRobotMsg(_message.Message): + __slots__ = ["ack", "ap_list", "distribute_result", "product_info"] + class ApList(_message.Message): + __slots__ = ["ap_info"] + class ApInfo(_message.Message): + __slots__ = ["dbm", "ssid"] + DBM_FIELD_NUMBER: _ClassVar[int] + SSID_FIELD_NUMBER: _ClassVar[int] + dbm: int + ssid: str + def __init__(self, ssid: _Optional[str] = ..., dbm: _Optional[int] = ...) -> None: ... + AP_INFO_FIELD_NUMBER: _ClassVar[int] + ap_info: _containers.RepeatedCompositeFieldContainer[BtRobotMsg.ApList.ApInfo] + def __init__(self, ap_info: _Optional[_Iterable[_Union[BtRobotMsg.ApList.ApInfo, _Mapping]]] = ...) -> None: ... + class Debug(_message.Message): + __slots__ = ["d_data"] + D_DATA_FIELD_NUMBER: _ClassVar[int] + d_data: str + def __init__(self, d_data: _Optional[str] = ...) -> None: ... + class DistributeResult(_message.Message): + __slots__ = ["aiot_result", "authkey", "dbm", "mac", "pid", "uuid", "value"] + class Value(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + class AiotResult(_message.Message): + __slots__ = ["bind_ret", "connect_mqtt_ret", "get_data_point_ret", "get_mqtt_info_ret"] + BIND_RET_FIELD_NUMBER: _ClassVar[int] + CONNECT_MQTT_RET_FIELD_NUMBER: _ClassVar[int] + GET_DATA_POINT_RET_FIELD_NUMBER: _ClassVar[int] + GET_MQTT_INFO_RET_FIELD_NUMBER: _ClassVar[int] + bind_ret: int + connect_mqtt_ret: int + get_data_point_ret: int + get_mqtt_info_ret: int + def __init__(self, get_mqtt_info_ret: _Optional[int] = ..., get_data_point_ret: _Optional[int] = ..., connect_mqtt_ret: _Optional[int] = ..., bind_ret: _Optional[int] = ...) -> None: ... + AIOT_RESULT_FIELD_NUMBER: _ClassVar[int] + AUTHKEY_FIELD_NUMBER: _ClassVar[int] + DBM_FIELD_NUMBER: _ClassVar[int] + E_AP_NOT_FOUND: BtRobotMsg.DistributeResult.Value + E_DHCP_ERR: BtRobotMsg.DistributeResult.Value + E_DNS_ERR: BtRobotMsg.DistributeResult.Value + E_GW_ERR: BtRobotMsg.DistributeResult.Value + E_NET_ERR: BtRobotMsg.DistributeResult.Value + E_OK: BtRobotMsg.DistributeResult.Value + E_PASSWD_ERR: BtRobotMsg.DistributeResult.Value + E_SRV_ERR: BtRobotMsg.DistributeResult.Value + MAC_FIELD_NUMBER: _ClassVar[int] + PID_FIELD_NUMBER: _ClassVar[int] + UUID_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + aiot_result: BtRobotMsg.DistributeResult.AiotResult + authkey: str + dbm: int + mac: str + pid: str + uuid: str + value: BtRobotMsg.DistributeResult.Value + def __init__(self, value: _Optional[_Union[BtRobotMsg.DistributeResult.Value, str]] = ..., mac: _Optional[str] = ..., pid: _Optional[str] = ..., uuid: _Optional[str] = ..., authkey: _Optional[str] = ..., dbm: _Optional[int] = ..., aiot_result: _Optional[_Union[BtRobotMsg.DistributeResult.AiotResult, _Mapping]] = ...) -> None: ... + class ProductInfo(_message.Message): + __slots__ = ["alisa_name", "brand", "cloud_pid", "code_name", "distribute_version", "mac", "model", "name", "remedy_field", "ret"] + class Result(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + class RemedyField(_message.Message): + __slots__ = ["distribute_version2"] + DISTRIBUTE_VERSION2_FIELD_NUMBER: _ClassVar[int] + distribute_version2: int + def __init__(self, distribute_version2: _Optional[int] = ...) -> None: ... + ALISA_NAME_FIELD_NUMBER: _ClassVar[int] + BRAND_FIELD_NUMBER: _ClassVar[int] + CLOUD_PID_FIELD_NUMBER: _ClassVar[int] + CODE_NAME_FIELD_NUMBER: _ClassVar[int] + DISTRIBUTE_VERSION_FIELD_NUMBER: _ClassVar[int] + E_FAIL: BtRobotMsg.ProductInfo.Result + E_OK: BtRobotMsg.ProductInfo.Result + MAC_FIELD_NUMBER: _ClassVar[int] + MODEL_FIELD_NUMBER: _ClassVar[int] + NAME_FIELD_NUMBER: _ClassVar[int] + REMEDY_FIELD_FIELD_NUMBER: _ClassVar[int] + RET_FIELD_NUMBER: _ClassVar[int] + alisa_name: str + brand: str + cloud_pid: str + code_name: str + distribute_version: int + mac: str + model: str + name: str + remedy_field: BtRobotMsg.ProductInfo.RemedyField + ret: BtRobotMsg.ProductInfo.Result + def __init__(self, ret: _Optional[_Union[BtRobotMsg.ProductInfo.Result, str]] = ..., brand: _Optional[str] = ..., code_name: _Optional[str] = ..., model: _Optional[str] = ..., name: _Optional[str] = ..., alisa_name: _Optional[str] = ..., cloud_pid: _Optional[str] = ..., mac: _Optional[str] = ..., distribute_version: _Optional[int] = ..., remedy_field: _Optional[_Union[BtRobotMsg.ProductInfo.RemedyField, _Mapping]] = ...) -> None: ... + ACK_FIELD_NUMBER: _ClassVar[int] + AP_LIST_FIELD_NUMBER: _ClassVar[int] + DISTRIBUTE_RESULT_FIELD_NUMBER: _ClassVar[int] + PRODUCT_INFO_FIELD_NUMBER: _ClassVar[int] + ack: BtRobotMsg.Debug + ap_list: BtRobotMsg.ApList + distribute_result: BtRobotMsg.DistributeResult + product_info: BtRobotMsg.ProductInfo + def __init__(self, product_info: _Optional[_Union[BtRobotMsg.ProductInfo, _Mapping]] = ..., ap_list: _Optional[_Union[BtRobotMsg.ApList, _Mapping]] = ..., distribute_result: _Optional[_Union[BtRobotMsg.DistributeResult, _Mapping]] = ..., ack: _Optional[_Union[BtRobotMsg.Debug, _Mapping]] = ...) -> None: ... diff --git a/proto-reference/clean_param.proto b/proto-reference/clean_param.proto new file mode 100644 index 0000000..31c2edd --- /dev/null +++ b/proto-reference/clean_param.proto @@ -0,0 +1,94 @@ +/** + * 清洁参数 Request 和 Response 协议; + */ +syntax = "proto3"; + +// option optimize_for = LITE_RUNTIME; + +package proto.cloud; +import "proto/cloud/common.proto"; + +message Fan { + enum Suction { // 风机吸力 + QUIET = 0; + STANDARD = 1; + TURBO = 2; + MAX = 3; + MAX_PLUS = 4; + } + Suction suction = 1; +} + +message MopMode { + enum Level { // 拖地档位 + LOW = 0; + MIDDLE = 1; + HIGH = 2; + } + Level level = 1; + + enum CornerClean { + NORMAL = 0; // 普通 + DEEP = 1; // 扭屁股动作 + } + CornerClean corner_clean = 2; +} + +message CleanCarpet { + enum Strategy { + AUTO_RAISE = 0; // 遇地毯自动抬升 + AVOID = 1; // 规避地毯 + IGNORE = 2; // 忽略(无视)地毯 + } + Strategy strategy = 1; // 遇地毯策略 +} + +message CleanType { + enum Value { + SWEEP_ONLY = 0; + MOP_ONLY = 1; + SWEEP_AND_MOP = 2; + SWEEP_THEN_MOP = 3; // 先扫后拖 + } + Value value = 1; +} + +message CleanExtent { // 清洁程度 + enum Value { // 注意和 app 上的显示顺序不一样 + NORMAL = 0; // 普通 + NARROW = 1; // 精(窄)扫/拖 + QUICK = 2; // 快速清理(只弓扫/拖,不沿边) + } + Value value = 1; +} + +message CleanTimes { + uint32 auto_clean = 1; + uint32 select_rooms = 2; + // id 3 已不再使用 + uint32 spot_clean = 4; +} + +// 吸力档位 Fan 来自单独的 dp,不放在 CleanParam +message CleanParam { + CleanType clean_type = 1; + CleanCarpet clean_carpet = 2; + CleanExtent clean_extent = 3; + MopMode mop_mode = 4; + Switch smart_mode_sw = 5; // 智能省心模式开关 + Fan fan = 6; // 从 x10 项目开始使用这里的风机档位,旧项目使用单独 dp + uint32 clean_times = 7; // 清扫次数,非 0 有效 +} + +message CleanParamRequest { + CleanParam clean_param = 1; + CleanParam area_clean_param = 2; +} + +// 清洁参数,需要保存 +message CleanParamResponse { + CleanParam clean_param = 1; + CleanTimes clean_times = 2; // 总清扫次数. x10 项目后废弃 + CleanParam area_clean_param = 3; + CleanParam running_clean_param = 4; // 执行过程中使用的清洁参数(状态) +} diff --git a/proto-reference/clean_param_pb2.py b/proto-reference/clean_param_pb2.py new file mode 100644 index 0000000..65543cd --- /dev/null +++ b/proto-reference/clean_param_pb2.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: proto/cloud/clean_param.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder + +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from ...proto.cloud import common_pb2 as proto_dot_cloud_dot_common__pb2 + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1dproto/cloud/clean_param.proto\x12\x0bproto.cloud\x1a\x18proto/cloud/common.proto\"v\n\x03\x46\x61n\x12)\n\x07suction\x18\x01 \x01(\x0e\x32\x18.proto.cloud.Fan.Suction\"D\n\x07Suction\x12\t\n\x05QUIET\x10\x00\x12\x0c\n\x08STANDARD\x10\x01\x12\t\n\x05TURBO\x10\x02\x12\x07\n\x03MAX\x10\x03\x12\x0c\n\x08MAX_PLUS\x10\x04\"\xb9\x01\n\x07MopMode\x12)\n\x05level\x18\x01 \x01(\x0e\x32\x1a.proto.cloud.MopMode.Level\x12\x36\n\x0c\x63orner_clean\x18\x02 \x01(\x0e\x32 .proto.cloud.MopMode.CornerClean\"&\n\x05Level\x12\x07\n\x03LOW\x10\x00\x12\n\n\x06MIDDLE\x10\x01\x12\x08\n\x04HIGH\x10\x02\"#\n\x0b\x43ornerClean\x12\n\n\x06NORMAL\x10\x00\x12\x08\n\x04\x44\x45\x45P\x10\x01\"u\n\x0b\x43leanCarpet\x12\x33\n\x08strategy\x18\x01 \x01(\x0e\x32!.proto.cloud.CleanCarpet.Strategy\"1\n\x08Strategy\x12\x0e\n\nAUTO_RAISE\x10\x00\x12\t\n\x05\x41VOID\x10\x01\x12\n\n\x06IGNORE\x10\x02\"\x86\x01\n\tCleanType\x12+\n\x05value\x18\x01 \x01(\x0e\x32\x1c.proto.cloud.CleanType.Value\"L\n\x05Value\x12\x0e\n\nSWEEP_ONLY\x10\x00\x12\x0c\n\x08MOP_ONLY\x10\x01\x12\x11\n\rSWEEP_AND_MOP\x10\x02\x12\x12\n\x0eSWEEP_THEN_MOP\x10\x03\"h\n\x0b\x43leanExtent\x12-\n\x05value\x18\x01 \x01(\x0e\x32\x1e.proto.cloud.CleanExtent.Value\"*\n\x05Value\x12\n\n\x06NORMAL\x10\x00\x12\n\n\x06NARROW\x10\x01\x12\t\n\x05QUICK\x10\x02\"J\n\nCleanTimes\x12\x12\n\nauto_clean\x18\x01 \x01(\r\x12\x14\n\x0cselect_rooms\x18\x02 \x01(\r\x12\x12\n\nspot_clean\x18\x04 \x01(\r\"\xa0\x02\n\nCleanParam\x12*\n\nclean_type\x18\x01 \x01(\x0b\x32\x16.proto.cloud.CleanType\x12.\n\x0c\x63lean_carpet\x18\x02 \x01(\x0b\x32\x18.proto.cloud.CleanCarpet\x12.\n\x0c\x63lean_extent\x18\x03 \x01(\x0b\x32\x18.proto.cloud.CleanExtent\x12&\n\x08mop_mode\x18\x04 \x01(\x0b\x32\x14.proto.cloud.MopMode\x12*\n\rsmart_mode_sw\x18\x05 \x01(\x0b\x32\x13.proto.cloud.Switch\x12\x1d\n\x03\x66\x61n\x18\x06 \x01(\x0b\x32\x10.proto.cloud.Fan\x12\x13\n\x0b\x63lean_times\x18\x07 \x01(\r\"t\n\x11\x43leanParamRequest\x12,\n\x0b\x63lean_param\x18\x01 \x01(\x0b\x32\x17.proto.cloud.CleanParam\x12\x31\n\x10\x61rea_clean_param\x18\x02 \x01(\x0b\x32\x17.proto.cloud.CleanParam\"\xd9\x01\n\x12\x43leanParamResponse\x12,\n\x0b\x63lean_param\x18\x01 \x01(\x0b\x32\x17.proto.cloud.CleanParam\x12,\n\x0b\x63lean_times\x18\x02 \x01(\x0b\x32\x17.proto.cloud.CleanTimes\x12\x31\n\x10\x61rea_clean_param\x18\x03 \x01(\x0b\x32\x17.proto.cloud.CleanParam\x12\x34\n\x13running_clean_param\x18\x04 \x01(\x0b\x32\x17.proto.cloud.CleanParamb\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'proto.cloud.clean_param_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _FAN._serialized_start=72 + _FAN._serialized_end=190 + _FAN_SUCTION._serialized_start=122 + _FAN_SUCTION._serialized_end=190 + _MOPMODE._serialized_start=193 + _MOPMODE._serialized_end=378 + _MOPMODE_LEVEL._serialized_start=303 + _MOPMODE_LEVEL._serialized_end=341 + _MOPMODE_CORNERCLEAN._serialized_start=343 + _MOPMODE_CORNERCLEAN._serialized_end=378 + _CLEANCARPET._serialized_start=380 + _CLEANCARPET._serialized_end=497 + _CLEANCARPET_STRATEGY._serialized_start=448 + _CLEANCARPET_STRATEGY._serialized_end=497 + _CLEANTYPE._serialized_start=500 + _CLEANTYPE._serialized_end=634 + _CLEANTYPE_VALUE._serialized_start=558 + _CLEANTYPE_VALUE._serialized_end=634 + _CLEANEXTENT._serialized_start=636 + _CLEANEXTENT._serialized_end=740 + _CLEANEXTENT_VALUE._serialized_start=698 + _CLEANEXTENT_VALUE._serialized_end=740 + _CLEANTIMES._serialized_start=742 + _CLEANTIMES._serialized_end=816 + _CLEANPARAM._serialized_start=819 + _CLEANPARAM._serialized_end=1107 + _CLEANPARAMREQUEST._serialized_start=1109 + _CLEANPARAMREQUEST._serialized_end=1225 + _CLEANPARAMRESPONSE._serialized_start=1228 + _CLEANPARAMRESPONSE._serialized_end=1445 +# @@protoc_insertion_point(module_scope) diff --git a/proto-reference/clean_param_pb2.pyi b/proto-reference/clean_param_pb2.pyi new file mode 100644 index 0000000..4e073c0 --- /dev/null +++ b/proto-reference/clean_param_pb2.pyi @@ -0,0 +1,124 @@ +from typing import ClassVar as _ClassVar +from typing import Mapping as _Mapping +from typing import Optional as _Optional +from typing import Union as _Union + +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper + +from ...proto.cloud import common_pb2 as _common_pb2 + +DESCRIPTOR: _descriptor.FileDescriptor + +class CleanCarpet(_message.Message): + __slots__ = ["strategy"] + class Strategy(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + AUTO_RAISE: CleanCarpet.Strategy + AVOID: CleanCarpet.Strategy + IGNORE: CleanCarpet.Strategy + STRATEGY_FIELD_NUMBER: _ClassVar[int] + strategy: CleanCarpet.Strategy + def __init__(self, strategy: _Optional[_Union[CleanCarpet.Strategy, str]] = ...) -> None: ... + +class CleanExtent(_message.Message): + __slots__ = ["value"] + class Value(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + NARROW: CleanExtent.Value + NORMAL: CleanExtent.Value + QUICK: CleanExtent.Value + VALUE_FIELD_NUMBER: _ClassVar[int] + value: CleanExtent.Value + def __init__(self, value: _Optional[_Union[CleanExtent.Value, str]] = ...) -> None: ... + +class CleanParam(_message.Message): + __slots__ = ["clean_carpet", "clean_extent", "clean_times", "clean_type", "fan", "mop_mode", "smart_mode_sw"] + CLEAN_CARPET_FIELD_NUMBER: _ClassVar[int] + CLEAN_EXTENT_FIELD_NUMBER: _ClassVar[int] + CLEAN_TIMES_FIELD_NUMBER: _ClassVar[int] + CLEAN_TYPE_FIELD_NUMBER: _ClassVar[int] + FAN_FIELD_NUMBER: _ClassVar[int] + MOP_MODE_FIELD_NUMBER: _ClassVar[int] + SMART_MODE_SW_FIELD_NUMBER: _ClassVar[int] + clean_carpet: CleanCarpet + clean_extent: CleanExtent + clean_times: int + clean_type: CleanType + fan: Fan + mop_mode: MopMode + smart_mode_sw: _common_pb2.Switch + def __init__(self, clean_type: _Optional[_Union[CleanType, _Mapping]] = ..., clean_carpet: _Optional[_Union[CleanCarpet, _Mapping]] = ..., clean_extent: _Optional[_Union[CleanExtent, _Mapping]] = ..., mop_mode: _Optional[_Union[MopMode, _Mapping]] = ..., smart_mode_sw: _Optional[_Union[_common_pb2.Switch, _Mapping]] = ..., fan: _Optional[_Union[Fan, _Mapping]] = ..., clean_times: _Optional[int] = ...) -> None: ... + +class CleanParamRequest(_message.Message): + __slots__ = ["area_clean_param", "clean_param"] + AREA_CLEAN_PARAM_FIELD_NUMBER: _ClassVar[int] + CLEAN_PARAM_FIELD_NUMBER: _ClassVar[int] + area_clean_param: CleanParam + clean_param: CleanParam + def __init__(self, clean_param: _Optional[_Union[CleanParam, _Mapping]] = ..., area_clean_param: _Optional[_Union[CleanParam, _Mapping]] = ...) -> None: ... + +class CleanParamResponse(_message.Message): + __slots__ = ["area_clean_param", "clean_param", "clean_times", "running_clean_param"] + AREA_CLEAN_PARAM_FIELD_NUMBER: _ClassVar[int] + CLEAN_PARAM_FIELD_NUMBER: _ClassVar[int] + CLEAN_TIMES_FIELD_NUMBER: _ClassVar[int] + RUNNING_CLEAN_PARAM_FIELD_NUMBER: _ClassVar[int] + area_clean_param: CleanParam + clean_param: CleanParam + clean_times: CleanTimes + running_clean_param: CleanParam + def __init__(self, clean_param: _Optional[_Union[CleanParam, _Mapping]] = ..., clean_times: _Optional[_Union[CleanTimes, _Mapping]] = ..., area_clean_param: _Optional[_Union[CleanParam, _Mapping]] = ..., running_clean_param: _Optional[_Union[CleanParam, _Mapping]] = ...) -> None: ... + +class CleanTimes(_message.Message): + __slots__ = ["auto_clean", "select_rooms", "spot_clean"] + AUTO_CLEAN_FIELD_NUMBER: _ClassVar[int] + SELECT_ROOMS_FIELD_NUMBER: _ClassVar[int] + SPOT_CLEAN_FIELD_NUMBER: _ClassVar[int] + auto_clean: int + select_rooms: int + spot_clean: int + def __init__(self, auto_clean: _Optional[int] = ..., select_rooms: _Optional[int] = ..., spot_clean: _Optional[int] = ...) -> None: ... + +class CleanType(_message.Message): + __slots__ = ["value"] + class Value(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + MOP_ONLY: CleanType.Value + SWEEP_AND_MOP: CleanType.Value + SWEEP_ONLY: CleanType.Value + SWEEP_THEN_MOP: CleanType.Value + VALUE_FIELD_NUMBER: _ClassVar[int] + value: CleanType.Value + def __init__(self, value: _Optional[_Union[CleanType.Value, str]] = ...) -> None: ... + +class Fan(_message.Message): + __slots__ = ["suction"] + class Suction(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + MAX: Fan.Suction + MAX_PLUS: Fan.Suction + QUIET: Fan.Suction + STANDARD: Fan.Suction + SUCTION_FIELD_NUMBER: _ClassVar[int] + TURBO: Fan.Suction + suction: Fan.Suction + def __init__(self, suction: _Optional[_Union[Fan.Suction, str]] = ...) -> None: ... + +class MopMode(_message.Message): + __slots__ = ["corner_clean", "level"] + class CornerClean(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + class Level(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + CORNER_CLEAN_FIELD_NUMBER: _ClassVar[int] + DEEP: MopMode.CornerClean + HIGH: MopMode.Level + LEVEL_FIELD_NUMBER: _ClassVar[int] + LOW: MopMode.Level + MIDDLE: MopMode.Level + NORMAL: MopMode.CornerClean + corner_clean: MopMode.CornerClean + level: MopMode.Level + def __init__(self, level: _Optional[_Union[MopMode.Level, str]] = ..., corner_clean: _Optional[_Union[MopMode.CornerClean, str]] = ...) -> None: ... diff --git a/proto-reference/clean_record.proto b/proto-reference/clean_record.proto new file mode 100644 index 0000000..2b03de1 --- /dev/null +++ b/proto-reference/clean_record.proto @@ -0,0 +1,135 @@ +/** + * 清洁记录. + */ +syntax = "proto3"; + +// option optimize_for = LITE_RUNTIME; + +package proto.cloud; + +import "proto/cloud/clean_param.proto"; +import "proto/cloud/stream.proto"; +import "proto/cloud/p2pdata.proto"; + +// 手机 app 优先获取 xxxRecordDesc +// CleanRecordDesc 数据格式: +// 0xAA 0x01 len(1 byte 数据段的长度) ... checksum(2 byte 除 checksum 外所有字节的和,高字节先发) +// CruiseRecordDesc 数据格式: +// 0xAA 0x02 len(1 byte 数据段的长度) ... checksum(2 byte 除 checksum 外所有字节的和,高字节先发) + +message CleanRecordDesc { + uint64 start_time = 1; // 不加时区,单位: s + uint64 end_time = 2; // 不加时区,单位: s + uint32 duration = 3; // 清洁时长,单位:s + uint32 area = 4; // 清洁面积,单位: m2 + CleanType clean_type = 5; // 扫、拖、扫+拖 + + enum FinishReason { + COMPLETED = 0; // 自动清扫完成 + MANUDAL = 1; // 人为停止 + LOW_POWER = 2; // 低电 + EXCEPTION = 3; // 异常中断(需要填充 Extra 中 error_code 或 warn_code) + } + FinishReason finish_reason = 6; + + message Extra { + enum Mode { + AUTO = 0; // 全局自动清洁 + SELECT_ROOM = 1; // 选房清洁 + SELECT_ZONE = 2; // 选区清洁 + SPOT = 3; // 定点清洁 + SCHEDULE_AUTO_CLEAN = 4; // 预约自动清扫 + SCHEDULE_ROOMS_CLEAN = 5; // 预约房间清扫 + } + Mode mode = 1; + + // MUS 功能(根据项目定义进行选配) + // bit-0: 执行过洗拖布 + // bit-1: 执行过烘干拖布 + // bit-2: 执行过集尘 + // bit-3: 执行过滚刷自清洁 + uint32 mus = 2; + + // 清扫错误码,正常为 0 + // 值来自 error_code_list_xxx.proto + uint32 error_code = 3; + + // 清扫警告码,正常为 0 + // 值来自 error_code_list_xxx.proto + uint32 prompt_code = 4; + } + Extra extra = 7; +} + +message CleanRecordData { + stream.RestrictedZone restricted_zone = 1; + stream.TemporaryData temp_data = 2; + stream.RoomParams room_params = 3; + + // id 4 不再使用 + // id 5 不再使用 + + // 上传格式: 头部 Point Point Point Point ... Point + // 其中头部格式: 0xAA 0x03 [4字节 map_id] [4字节 releases] + bytes path_data = 6; // 轨迹(目前未压缩) + + // id 7 不再使用 + // id 8 不再使用 + // id 9 不再使用 + + stream.Map map = 10; + stream.RoomOutline room_outline = 11; + stream.ObstacleInfo obstacle_info = 12; + + message PathData { + repeated stream.PathPoint points = 1; + } + PathData path_data_v2 = 13; // 存在该字段使用新的轨迹数据格式 + + /* p2p通道 清扫记录使用以下参数,不使用上述参数 */ + p2p.CompleteMap map_p2p = 20; //完整地图 + p2p.CompletePath path_p2p = 21; //完整路径 +} + +message CruiseRecordDesc { + uint64 start_time = 1; // 不加时区,单位: s + uint64 end_time = 2; // 不加时区,单位: s + uint32 duration = 3; // 巡航时长,单位:s + + enum FinishReason { + COMPLETED = 0; // 自动巡航完成 + MANUDAL = 1; // 人为停止 + LOW_POWER = 2; // 低电 + EXCEPTION = 3; // 异常中断 + } + FinishReason finish_reason = 4; + + message Extra { + enum Mode { + GLOBAL_CRUISE = 0; // 全屋巡航 + POINT_CRUISE = 1; // 精准巡航 + ZONES_CRUISE = 2; // 选区巡航 + SCHEDULE_CRUISE = 3; // 预约巡航 + } + Mode mode = 1; + } + Extra extra = 7; +} + +message CruiseRecordData { + stream.RestrictedZone restricted_zone = 1; + stream.TemporaryData temp_data = 2; + stream.RoomParams room_params = 3; + stream.ObstacleInfo obstacle_info = 4; + + // 上传格式: 头部 Point Point Point Point ... Point + // 其中头部格式: 0xAA 0x03 [4字节 map_id] [4字节 releases] + bytes path_data = 5; // 轨迹(目前未压缩) + stream.CruiseData cruise_data = 6; + stream.Map map = 7; + stream.RoomOutline room_outline = 8; + + /* p2p通道 使用以下参数,不使用 除 cruise_data 以外的上述参数 */ + p2p.CompleteMap map_p2p = 20; //完整地图 + p2p.CompletePath path_p2p = 21; //完整路径 +} diff --git a/proto-reference/clean_record_pb2.py b/proto-reference/clean_record_pb2.py new file mode 100644 index 0000000..c2958e6 --- /dev/null +++ b/proto-reference/clean_record_pb2.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: proto/cloud/clean_record.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder + +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from ...proto.cloud import \ + clean_param_pb2 as proto_dot_cloud_dot_clean__param__pb2 +from ...proto.cloud import p2pdata_pb2 as proto_dot_cloud_dot_p2pdata__pb2 +from ...proto.cloud import stream_pb2 as proto_dot_cloud_dot_stream__pb2 + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1eproto/cloud/clean_record.proto\x12\x0bproto.cloud\x1a\x1dproto/cloud/clean_param.proto\x1a\x18proto/cloud/stream.proto\x1a\x19proto/cloud/p2pdata.proto\"\xaa\x04\n\x0f\x43leanRecordDesc\x12\x12\n\nstart_time\x18\x01 \x01(\x04\x12\x10\n\x08\x65nd_time\x18\x02 \x01(\x04\x12\x10\n\x08\x64uration\x18\x03 \x01(\r\x12\x0c\n\x04\x61rea\x18\x04 \x01(\r\x12*\n\nclean_type\x18\x05 \x01(\x0b\x32\x16.proto.cloud.CleanType\x12@\n\rfinish_reason\x18\x06 \x01(\x0e\x32).proto.cloud.CleanRecordDesc.FinishReason\x12\x31\n\x05\x65xtra\x18\x07 \x01(\x0b\x32\".proto.cloud.CleanRecordDesc.Extra\x1a\xe5\x01\n\x05\x45xtra\x12\x35\n\x04mode\x18\x01 \x01(\x0e\x32\'.proto.cloud.CleanRecordDesc.Extra.Mode\x12\x0b\n\x03mus\x18\x02 \x01(\r\x12\x12\n\nerror_code\x18\x03 \x01(\r\x12\x13\n\x0bprompt_code\x18\x04 \x01(\r\"o\n\x04Mode\x12\x08\n\x04\x41UTO\x10\x00\x12\x0f\n\x0bSELECT_ROOM\x10\x01\x12\x0f\n\x0bSELECT_ZONE\x10\x02\x12\x08\n\x04SPOT\x10\x03\x12\x17\n\x13SCHEDULE_AUTO_CLEAN\x10\x04\x12\x18\n\x14SCHEDULE_ROOMS_CLEAN\x10\x05\"H\n\x0c\x46inishReason\x12\r\n\tCOMPLETED\x10\x00\x12\x0b\n\x07MANUDAL\x10\x01\x12\r\n\tLOW_POWER\x10\x02\x12\r\n\tEXCEPTION\x10\x03\"\xba\x04\n\x0f\x43leanRecordData\x12;\n\x0frestricted_zone\x18\x01 \x01(\x0b\x32\".proto.cloud.stream.RestrictedZone\x12\x34\n\ttemp_data\x18\x02 \x01(\x0b\x32!.proto.cloud.stream.TemporaryData\x12\x33\n\x0broom_params\x18\x03 \x01(\x0b\x32\x1e.proto.cloud.stream.RoomParams\x12\x11\n\tpath_data\x18\x06 \x01(\x0c\x12$\n\x03map\x18\n \x01(\x0b\x32\x17.proto.cloud.stream.Map\x12\x35\n\x0croom_outline\x18\x0b \x01(\x0b\x32\x1f.proto.cloud.stream.RoomOutline\x12\x37\n\robstacle_info\x18\x0c \x01(\x0b\x32 .proto.cloud.stream.ObstacleInfo\x12;\n\x0cpath_data_v2\x18\r \x01(\x0b\x32%.proto.cloud.CleanRecordData.PathData\x12-\n\x07map_p2p\x18\x14 \x01(\x0b\x32\x1c.proto.cloud.p2p.CompleteMap\x12/\n\x08path_p2p\x18\x15 \x01(\x0b\x32\x1d.proto.cloud.p2p.CompletePath\x1a\x39\n\x08PathData\x12-\n\x06points\x18\x01 \x03(\x0b\x32\x1d.proto.cloud.stream.PathPoint\"\xa1\x03\n\x10\x43ruiseRecordDesc\x12\x12\n\nstart_time\x18\x01 \x01(\x04\x12\x10\n\x08\x65nd_time\x18\x02 \x01(\x04\x12\x10\n\x08\x64uration\x18\x03 \x01(\r\x12\x41\n\rfinish_reason\x18\x04 \x01(\x0e\x32*.proto.cloud.CruiseRecordDesc.FinishReason\x12\x32\n\x05\x65xtra\x18\x07 \x01(\x0b\x32#.proto.cloud.CruiseRecordDesc.Extra\x1a\x93\x01\n\x05\x45xtra\x12\x36\n\x04mode\x18\x01 \x01(\x0e\x32(.proto.cloud.CruiseRecordDesc.Extra.Mode\"R\n\x04Mode\x12\x11\n\rGLOBAL_CRUISE\x10\x00\x12\x10\n\x0cPOINT_CRUISE\x10\x01\x12\x10\n\x0cZONES_CRUISE\x10\x02\x12\x13\n\x0fSCHEDULE_CRUISE\x10\x03\"H\n\x0c\x46inishReason\x12\r\n\tCOMPLETED\x10\x00\x12\x0b\n\x07MANUDAL\x10\x01\x12\r\n\tLOW_POWER\x10\x02\x12\r\n\tEXCEPTION\x10\x03\"\xf8\x03\n\x10\x43ruiseRecordData\x12;\n\x0frestricted_zone\x18\x01 \x01(\x0b\x32\".proto.cloud.stream.RestrictedZone\x12\x34\n\ttemp_data\x18\x02 \x01(\x0b\x32!.proto.cloud.stream.TemporaryData\x12\x33\n\x0broom_params\x18\x03 \x01(\x0b\x32\x1e.proto.cloud.stream.RoomParams\x12\x37\n\robstacle_info\x18\x04 \x01(\x0b\x32 .proto.cloud.stream.ObstacleInfo\x12\x11\n\tpath_data\x18\x05 \x01(\x0c\x12\x33\n\x0b\x63ruise_data\x18\x06 \x01(\x0b\x32\x1e.proto.cloud.stream.CruiseData\x12$\n\x03map\x18\x07 \x01(\x0b\x32\x17.proto.cloud.stream.Map\x12\x35\n\x0croom_outline\x18\x08 \x01(\x0b\x32\x1f.proto.cloud.stream.RoomOutline\x12-\n\x07map_p2p\x18\x14 \x01(\x0b\x32\x1c.proto.cloud.p2p.CompleteMap\x12/\n\x08path_p2p\x18\x15 \x01(\x0b\x32\x1d.proto.cloud.p2p.CompletePathb\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'proto.cloud.clean_record_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _CLEANRECORDDESC._serialized_start=132 + _CLEANRECORDDESC._serialized_end=686 + _CLEANRECORDDESC_EXTRA._serialized_start=383 + _CLEANRECORDDESC_EXTRA._serialized_end=612 + _CLEANRECORDDESC_EXTRA_MODE._serialized_start=501 + _CLEANRECORDDESC_EXTRA_MODE._serialized_end=612 + _CLEANRECORDDESC_FINISHREASON._serialized_start=614 + _CLEANRECORDDESC_FINISHREASON._serialized_end=686 + _CLEANRECORDDATA._serialized_start=689 + _CLEANRECORDDATA._serialized_end=1259 + _CLEANRECORDDATA_PATHDATA._serialized_start=1202 + _CLEANRECORDDATA_PATHDATA._serialized_end=1259 + _CRUISERECORDDESC._serialized_start=1262 + _CRUISERECORDDESC._serialized_end=1679 + _CRUISERECORDDESC_EXTRA._serialized_start=1458 + _CRUISERECORDDESC_EXTRA._serialized_end=1605 + _CRUISERECORDDESC_EXTRA_MODE._serialized_start=1523 + _CRUISERECORDDESC_EXTRA_MODE._serialized_end=1605 + _CRUISERECORDDESC_FINISHREASON._serialized_start=614 + _CRUISERECORDDESC_FINISHREASON._serialized_end=686 + _CRUISERECORDDATA._serialized_start=1682 + _CRUISERECORDDATA._serialized_end=2186 +# @@protoc_insertion_point(module_scope) diff --git a/proto-reference/clean_record_pb2.pyi b/proto-reference/clean_record_pb2.pyi new file mode 100644 index 0000000..f8c20ef --- /dev/null +++ b/proto-reference/clean_record_pb2.pyi @@ -0,0 +1,143 @@ +from typing import ClassVar as _ClassVar +from typing import Iterable as _Iterable +from typing import Mapping as _Mapping +from typing import Optional as _Optional +from typing import Union as _Union + +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf.internal import containers as _containers +from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper + +from ...proto.cloud import clean_param_pb2 as _clean_param_pb2 +from ...proto.cloud import p2pdata_pb2 as _p2pdata_pb2 +from ...proto.cloud import stream_pb2 as _stream_pb2 + +DESCRIPTOR: _descriptor.FileDescriptor + +class CleanRecordData(_message.Message): + __slots__ = ["map", "map_p2p", "obstacle_info", "path_data", "path_data_v2", "path_p2p", "restricted_zone", "room_outline", "room_params", "temp_data"] + class PathData(_message.Message): + __slots__ = ["points"] + POINTS_FIELD_NUMBER: _ClassVar[int] + points: _containers.RepeatedCompositeFieldContainer[_stream_pb2.PathPoint] + def __init__(self, points: _Optional[_Iterable[_Union[_stream_pb2.PathPoint, _Mapping]]] = ...) -> None: ... + MAP_FIELD_NUMBER: _ClassVar[int] + MAP_P2P_FIELD_NUMBER: _ClassVar[int] + OBSTACLE_INFO_FIELD_NUMBER: _ClassVar[int] + PATH_DATA_FIELD_NUMBER: _ClassVar[int] + PATH_DATA_V2_FIELD_NUMBER: _ClassVar[int] + PATH_P2P_FIELD_NUMBER: _ClassVar[int] + RESTRICTED_ZONE_FIELD_NUMBER: _ClassVar[int] + ROOM_OUTLINE_FIELD_NUMBER: _ClassVar[int] + ROOM_PARAMS_FIELD_NUMBER: _ClassVar[int] + TEMP_DATA_FIELD_NUMBER: _ClassVar[int] + map: _stream_pb2.Map + map_p2p: _p2pdata_pb2.CompleteMap + obstacle_info: _stream_pb2.ObstacleInfo + path_data: bytes + path_data_v2: CleanRecordData.PathData + path_p2p: _p2pdata_pb2.CompletePath + restricted_zone: _stream_pb2.RestrictedZone + room_outline: _stream_pb2.RoomOutline + room_params: _stream_pb2.RoomParams + temp_data: _stream_pb2.TemporaryData + def __init__(self, restricted_zone: _Optional[_Union[_stream_pb2.RestrictedZone, _Mapping]] = ..., temp_data: _Optional[_Union[_stream_pb2.TemporaryData, _Mapping]] = ..., room_params: _Optional[_Union[_stream_pb2.RoomParams, _Mapping]] = ..., path_data: _Optional[bytes] = ..., map: _Optional[_Union[_stream_pb2.Map, _Mapping]] = ..., room_outline: _Optional[_Union[_stream_pb2.RoomOutline, _Mapping]] = ..., obstacle_info: _Optional[_Union[_stream_pb2.ObstacleInfo, _Mapping]] = ..., path_data_v2: _Optional[_Union[CleanRecordData.PathData, _Mapping]] = ..., map_p2p: _Optional[_Union[_p2pdata_pb2.CompleteMap, _Mapping]] = ..., path_p2p: _Optional[_Union[_p2pdata_pb2.CompletePath, _Mapping]] = ...) -> None: ... + +class CleanRecordDesc(_message.Message): + __slots__ = ["area", "clean_type", "duration", "end_time", "extra", "finish_reason", "start_time"] + class FinishReason(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + class Extra(_message.Message): + __slots__ = ["error_code", "mode", "mus", "prompt_code"] + class Mode(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + AUTO: CleanRecordDesc.Extra.Mode + ERROR_CODE_FIELD_NUMBER: _ClassVar[int] + MODE_FIELD_NUMBER: _ClassVar[int] + MUS_FIELD_NUMBER: _ClassVar[int] + PROMPT_CODE_FIELD_NUMBER: _ClassVar[int] + SCHEDULE_AUTO_CLEAN: CleanRecordDesc.Extra.Mode + SCHEDULE_ROOMS_CLEAN: CleanRecordDesc.Extra.Mode + SELECT_ROOM: CleanRecordDesc.Extra.Mode + SELECT_ZONE: CleanRecordDesc.Extra.Mode + SPOT: CleanRecordDesc.Extra.Mode + error_code: int + mode: CleanRecordDesc.Extra.Mode + mus: int + prompt_code: int + def __init__(self, mode: _Optional[_Union[CleanRecordDesc.Extra.Mode, str]] = ..., mus: _Optional[int] = ..., error_code: _Optional[int] = ..., prompt_code: _Optional[int] = ...) -> None: ... + AREA_FIELD_NUMBER: _ClassVar[int] + CLEAN_TYPE_FIELD_NUMBER: _ClassVar[int] + COMPLETED: CleanRecordDesc.FinishReason + DURATION_FIELD_NUMBER: _ClassVar[int] + END_TIME_FIELD_NUMBER: _ClassVar[int] + EXCEPTION: CleanRecordDesc.FinishReason + EXTRA_FIELD_NUMBER: _ClassVar[int] + FINISH_REASON_FIELD_NUMBER: _ClassVar[int] + LOW_POWER: CleanRecordDesc.FinishReason + MANUDAL: CleanRecordDesc.FinishReason + START_TIME_FIELD_NUMBER: _ClassVar[int] + area: int + clean_type: _clean_param_pb2.CleanType + duration: int + end_time: int + extra: CleanRecordDesc.Extra + finish_reason: CleanRecordDesc.FinishReason + start_time: int + def __init__(self, start_time: _Optional[int] = ..., end_time: _Optional[int] = ..., duration: _Optional[int] = ..., area: _Optional[int] = ..., clean_type: _Optional[_Union[_clean_param_pb2.CleanType, _Mapping]] = ..., finish_reason: _Optional[_Union[CleanRecordDesc.FinishReason, str]] = ..., extra: _Optional[_Union[CleanRecordDesc.Extra, _Mapping]] = ...) -> None: ... + +class CruiseRecordData(_message.Message): + __slots__ = ["cruise_data", "map", "map_p2p", "obstacle_info", "path_data", "path_p2p", "restricted_zone", "room_outline", "room_params", "temp_data"] + CRUISE_DATA_FIELD_NUMBER: _ClassVar[int] + MAP_FIELD_NUMBER: _ClassVar[int] + MAP_P2P_FIELD_NUMBER: _ClassVar[int] + OBSTACLE_INFO_FIELD_NUMBER: _ClassVar[int] + PATH_DATA_FIELD_NUMBER: _ClassVar[int] + PATH_P2P_FIELD_NUMBER: _ClassVar[int] + RESTRICTED_ZONE_FIELD_NUMBER: _ClassVar[int] + ROOM_OUTLINE_FIELD_NUMBER: _ClassVar[int] + ROOM_PARAMS_FIELD_NUMBER: _ClassVar[int] + TEMP_DATA_FIELD_NUMBER: _ClassVar[int] + cruise_data: _stream_pb2.CruiseData + map: _stream_pb2.Map + map_p2p: _p2pdata_pb2.CompleteMap + obstacle_info: _stream_pb2.ObstacleInfo + path_data: bytes + path_p2p: _p2pdata_pb2.CompletePath + restricted_zone: _stream_pb2.RestrictedZone + room_outline: _stream_pb2.RoomOutline + room_params: _stream_pb2.RoomParams + temp_data: _stream_pb2.TemporaryData + def __init__(self, restricted_zone: _Optional[_Union[_stream_pb2.RestrictedZone, _Mapping]] = ..., temp_data: _Optional[_Union[_stream_pb2.TemporaryData, _Mapping]] = ..., room_params: _Optional[_Union[_stream_pb2.RoomParams, _Mapping]] = ..., obstacle_info: _Optional[_Union[_stream_pb2.ObstacleInfo, _Mapping]] = ..., path_data: _Optional[bytes] = ..., cruise_data: _Optional[_Union[_stream_pb2.CruiseData, _Mapping]] = ..., map: _Optional[_Union[_stream_pb2.Map, _Mapping]] = ..., room_outline: _Optional[_Union[_stream_pb2.RoomOutline, _Mapping]] = ..., map_p2p: _Optional[_Union[_p2pdata_pb2.CompleteMap, _Mapping]] = ..., path_p2p: _Optional[_Union[_p2pdata_pb2.CompletePath, _Mapping]] = ...) -> None: ... + +class CruiseRecordDesc(_message.Message): + __slots__ = ["duration", "end_time", "extra", "finish_reason", "start_time"] + class FinishReason(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + class Extra(_message.Message): + __slots__ = ["mode"] + class Mode(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + GLOBAL_CRUISE: CruiseRecordDesc.Extra.Mode + MODE_FIELD_NUMBER: _ClassVar[int] + POINT_CRUISE: CruiseRecordDesc.Extra.Mode + SCHEDULE_CRUISE: CruiseRecordDesc.Extra.Mode + ZONES_CRUISE: CruiseRecordDesc.Extra.Mode + mode: CruiseRecordDesc.Extra.Mode + def __init__(self, mode: _Optional[_Union[CruiseRecordDesc.Extra.Mode, str]] = ...) -> None: ... + COMPLETED: CruiseRecordDesc.FinishReason + DURATION_FIELD_NUMBER: _ClassVar[int] + END_TIME_FIELD_NUMBER: _ClassVar[int] + EXCEPTION: CruiseRecordDesc.FinishReason + EXTRA_FIELD_NUMBER: _ClassVar[int] + FINISH_REASON_FIELD_NUMBER: _ClassVar[int] + LOW_POWER: CruiseRecordDesc.FinishReason + MANUDAL: CruiseRecordDesc.FinishReason + START_TIME_FIELD_NUMBER: _ClassVar[int] + duration: int + end_time: int + extra: CruiseRecordDesc.Extra + finish_reason: CruiseRecordDesc.FinishReason + start_time: int + def __init__(self, start_time: _Optional[int] = ..., end_time: _Optional[int] = ..., duration: _Optional[int] = ..., finish_reason: _Optional[_Union[CruiseRecordDesc.FinishReason, str]] = ..., extra: _Optional[_Union[CruiseRecordDesc.Extra, _Mapping]] = ...) -> None: ... diff --git a/proto-reference/clean_record_wrap.proto b/proto-reference/clean_record_wrap.proto new file mode 100644 index 0000000..a91ddb5 --- /dev/null +++ b/proto-reference/clean_record_wrap.proto @@ -0,0 +1,14 @@ +/** + * 清洁记录包装,调试专用,APP 忽略. + */ +syntax = "proto3"; + +// option optimize_for = LITE_RUNTIME; + +package proto.cloud; + +message CleanRecordWrap { + uint32 id = 1; + bytes desc = 2; // CleanRecordDesc 序列化结果 + bytes data = 3; // CleanRecordData 序列化结果 +} diff --git a/proto-reference/clean_record_wrap_pb2.py b/proto-reference/clean_record_wrap_pb2.py new file mode 100644 index 0000000..96a2fde --- /dev/null +++ b/proto-reference/clean_record_wrap_pb2.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: proto/cloud/clean_record_wrap.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n#proto/cloud/clean_record_wrap.proto\x12\x0bproto.cloud\"9\n\x0f\x43leanRecordWrap\x12\n\n\x02id\x18\x01 \x01(\r\x12\x0c\n\x04\x64\x65sc\x18\x02 \x01(\x0c\x12\x0c\n\x04\x64\x61ta\x18\x03 \x01(\x0c\x62\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'proto.cloud.clean_record_wrap_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _CLEANRECORDWRAP._serialized_start=52 + _CLEANRECORDWRAP._serialized_end=109 +# @@protoc_insertion_point(module_scope) diff --git a/proto-reference/clean_record_wrap_pb2.pyi b/proto-reference/clean_record_wrap_pb2.pyi new file mode 100644 index 0000000..8c10186 --- /dev/null +++ b/proto-reference/clean_record_wrap_pb2.pyi @@ -0,0 +1,15 @@ +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Optional as _Optional + +DESCRIPTOR: _descriptor.FileDescriptor + +class CleanRecordWrap(_message.Message): + __slots__ = ["data", "desc", "id"] + DATA_FIELD_NUMBER: _ClassVar[int] + DESC_FIELD_NUMBER: _ClassVar[int] + ID_FIELD_NUMBER: _ClassVar[int] + data: bytes + desc: bytes + id: int + def __init__(self, id: _Optional[int] = ..., desc: _Optional[bytes] = ..., data: _Optional[bytes] = ...) -> None: ... diff --git a/proto-reference/clean_statistics.proto b/proto-reference/clean_statistics.proto new file mode 100644 index 0000000..e54562f --- /dev/null +++ b/proto-reference/clean_statistics.proto @@ -0,0 +1,24 @@ +/** + * 清洁统计信息 + */ +syntax = "proto3"; + +// option optimize_for = LITE_RUNTIME; + +package proto.cloud; + +message CleanStatistics { + message Single { // 当次清扫统计 + uint32 clean_duration = 1; // 当前清扫时长 + uint32 clean_area = 2; // 当前清扫面积 + } + message Total { // 总的清扫统计 + uint32 clean_duration = 1; // 总的清扫时长 + uint32 clean_area = 2; // 总的清扫面积 + uint32 clean_count = 3; // 总的清扫次数 + } + + Single single = 1; + Total total = 2; // 恢复出厂时不清零,用于机器老化的考量指标 + Total user_total = 3; // 不同用户时清零 +} diff --git a/proto-reference/clean_statistics_pb2.py b/proto-reference/clean_statistics_pb2.py new file mode 100644 index 0000000..911d3ab --- /dev/null +++ b/proto-reference/clean_statistics_pb2.py @@ -0,0 +1,29 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: proto/cloud/clean_statistics.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"proto/cloud/clean_statistics.proto\x12\x0bproto.cloud\"\xb1\x02\n\x0f\x43leanStatistics\x12\x33\n\x06single\x18\x01 \x01(\x0b\x32#.proto.cloud.CleanStatistics.Single\x12\x31\n\x05total\x18\x02 \x01(\x0b\x32\".proto.cloud.CleanStatistics.Total\x12\x36\n\nuser_total\x18\x03 \x01(\x0b\x32\".proto.cloud.CleanStatistics.Total\x1a\x34\n\x06Single\x12\x16\n\x0e\x63lean_duration\x18\x01 \x01(\r\x12\x12\n\nclean_area\x18\x02 \x01(\r\x1aH\n\x05Total\x12\x16\n\x0e\x63lean_duration\x18\x01 \x01(\r\x12\x12\n\nclean_area\x18\x02 \x01(\r\x12\x13\n\x0b\x63lean_count\x18\x03 \x01(\rb\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'proto.cloud.clean_statistics_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _CLEANSTATISTICS._serialized_start=52 + _CLEANSTATISTICS._serialized_end=357 + _CLEANSTATISTICS_SINGLE._serialized_start=231 + _CLEANSTATISTICS_SINGLE._serialized_end=283 + _CLEANSTATISTICS_TOTAL._serialized_start=285 + _CLEANSTATISTICS_TOTAL._serialized_end=357 +# @@protoc_insertion_point(module_scope) diff --git a/proto-reference/clean_statistics_pb2.pyi b/proto-reference/clean_statistics_pb2.pyi new file mode 100644 index 0000000..b66db79 --- /dev/null +++ b/proto-reference/clean_statistics_pb2.pyi @@ -0,0 +1,31 @@ +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Mapping as _Mapping, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class CleanStatistics(_message.Message): + __slots__ = ["single", "total", "user_total"] + class Single(_message.Message): + __slots__ = ["clean_area", "clean_duration"] + CLEAN_AREA_FIELD_NUMBER: _ClassVar[int] + CLEAN_DURATION_FIELD_NUMBER: _ClassVar[int] + clean_area: int + clean_duration: int + def __init__(self, clean_duration: _Optional[int] = ..., clean_area: _Optional[int] = ...) -> None: ... + class Total(_message.Message): + __slots__ = ["clean_area", "clean_count", "clean_duration"] + CLEAN_AREA_FIELD_NUMBER: _ClassVar[int] + CLEAN_COUNT_FIELD_NUMBER: _ClassVar[int] + CLEAN_DURATION_FIELD_NUMBER: _ClassVar[int] + clean_area: int + clean_count: int + clean_duration: int + def __init__(self, clean_duration: _Optional[int] = ..., clean_area: _Optional[int] = ..., clean_count: _Optional[int] = ...) -> None: ... + SINGLE_FIELD_NUMBER: _ClassVar[int] + TOTAL_FIELD_NUMBER: _ClassVar[int] + USER_TOTAL_FIELD_NUMBER: _ClassVar[int] + single: CleanStatistics.Single + total: CleanStatistics.Total + user_total: CleanStatistics.Total + def __init__(self, single: _Optional[_Union[CleanStatistics.Single, _Mapping]] = ..., total: _Optional[_Union[CleanStatistics.Total, _Mapping]] = ..., user_total: _Optional[_Union[CleanStatistics.Total, _Mapping]] = ...) -> None: ... diff --git a/proto-reference/common.proto b/proto-reference/common.proto new file mode 100644 index 0000000..f44ea7b --- /dev/null +++ b/proto-reference/common.proto @@ -0,0 +1,80 @@ +syntax = "proto3"; + +// option optimize_for = LITE_RUNTIME; + +package proto.cloud; + +message Empty { + +} + +message Point { + sint32 x = 1; // 单位: m x 100 + sint32 y = 2; +} + +message Pose { + sint32 x = 1; // 单位: m x 100 + sint32 y = 2; + sint32 theta = 3; // 单位: rad * 100 +} + +message Line { + Point p0 = 1; + Point p1 = 2; +} + +message Quadrangle { + Point p0 = 1; + Point p1 = 2; + Point p2 = 3; + Point p3 = 4; +} + +message Polygon { + repeated Point points = 1; +} + +message Switch { + bool value = 1; +} + +message Active { + bool value = 1; +} + +message Numerical { // 数值分级 + uint32 value = 1; +} + +// 地面类型 +message Floor { + enum Type { + UNKNOW = 0; + BLANKET = 1; // 毛毯 + WOOD = 2; // 木质 + CERAMIC = 3; // 瓷砖 + } + Type type = 1; +} + +// 房间类型 +// 当房间未命名时,手机 app 根据类型和索引值自动多语言命名,如 "厨房1"、"Kitchen1" 等 +message RoomScene { + enum Type { + UNKNOW = 0; + STUDYROOM = 1; + BEDROOM = 2; + RESTROOM = 3; + KITCHEN = 4; + LIVINGROOM = 5; + DININGROOM = 6; + CORRIDOR = 7; + } + Type type = 1; + + message Index { + uint32 value = 1; // 从1开始 + } + Index index = 2; +} \ No newline at end of file diff --git a/proto-reference/common_pb2.py b/proto-reference/common_pb2.py new file mode 100644 index 0000000..a2d0e6e --- /dev/null +++ b/proto-reference/common_pb2.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: proto/cloud/common.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x18proto/cloud/common.proto\x12\x0bproto.cloud\"\x07\n\x05\x45mpty\"\x1d\n\x05Point\x12\t\n\x01x\x18\x01 \x01(\x11\x12\t\n\x01y\x18\x02 \x01(\x11\"+\n\x04Pose\x12\t\n\x01x\x18\x01 \x01(\x11\x12\t\n\x01y\x18\x02 \x01(\x11\x12\r\n\x05theta\x18\x03 \x01(\x11\"F\n\x04Line\x12\x1e\n\x02p0\x18\x01 \x01(\x0b\x32\x12.proto.cloud.Point\x12\x1e\n\x02p1\x18\x02 \x01(\x0b\x32\x12.proto.cloud.Point\"\x8c\x01\n\nQuadrangle\x12\x1e\n\x02p0\x18\x01 \x01(\x0b\x32\x12.proto.cloud.Point\x12\x1e\n\x02p1\x18\x02 \x01(\x0b\x32\x12.proto.cloud.Point\x12\x1e\n\x02p2\x18\x03 \x01(\x0b\x32\x12.proto.cloud.Point\x12\x1e\n\x02p3\x18\x04 \x01(\x0b\x32\x12.proto.cloud.Point\"-\n\x07Polygon\x12\"\n\x06points\x18\x01 \x03(\x0b\x32\x12.proto.cloud.Point\"\x17\n\x06Switch\x12\r\n\x05value\x18\x01 \x01(\x08\"\x17\n\x06\x41\x63tive\x12\r\n\x05value\x18\x01 \x01(\x08\"\x1a\n\tNumerical\x12\r\n\x05value\x18\x01 \x01(\r\"f\n\x05\x46loor\x12%\n\x04type\x18\x01 \x01(\x0e\x32\x17.proto.cloud.Floor.Type\"6\n\x04Type\x12\n\n\x06UNKNOW\x10\x00\x12\x0b\n\x07\x42LANKET\x10\x01\x12\x08\n\x04WOOD\x10\x02\x12\x0b\n\x07\x43\x45RAMIC\x10\x03\"\xf4\x01\n\tRoomScene\x12)\n\x04type\x18\x01 \x01(\x0e\x32\x1b.proto.cloud.RoomScene.Type\x12+\n\x05index\x18\x02 \x01(\x0b\x32\x1c.proto.cloud.RoomScene.Index\x1a\x16\n\x05Index\x12\r\n\x05value\x18\x01 \x01(\r\"w\n\x04Type\x12\n\n\x06UNKNOW\x10\x00\x12\r\n\tSTUDYROOM\x10\x01\x12\x0b\n\x07\x42\x45\x44ROOM\x10\x02\x12\x0c\n\x08RESTROOM\x10\x03\x12\x0b\n\x07KITCHEN\x10\x04\x12\x0e\n\nLIVINGROOM\x10\x05\x12\x0e\n\nDININGROOM\x10\x06\x12\x0c\n\x08\x43ORRIDOR\x10\x07\x62\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'proto.cloud.common_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _EMPTY._serialized_start=41 + _EMPTY._serialized_end=48 + _POINT._serialized_start=50 + _POINT._serialized_end=79 + _POSE._serialized_start=81 + _POSE._serialized_end=124 + _LINE._serialized_start=126 + _LINE._serialized_end=196 + _QUADRANGLE._serialized_start=199 + _QUADRANGLE._serialized_end=339 + _POLYGON._serialized_start=341 + _POLYGON._serialized_end=386 + _SWITCH._serialized_start=388 + _SWITCH._serialized_end=411 + _ACTIVE._serialized_start=413 + _ACTIVE._serialized_end=436 + _NUMERICAL._serialized_start=438 + _NUMERICAL._serialized_end=464 + _FLOOR._serialized_start=466 + _FLOOR._serialized_end=568 + _FLOOR_TYPE._serialized_start=514 + _FLOOR_TYPE._serialized_end=568 + _ROOMSCENE._serialized_start=571 + _ROOMSCENE._serialized_end=815 + _ROOMSCENE_INDEX._serialized_start=672 + _ROOMSCENE_INDEX._serialized_end=694 + _ROOMSCENE_TYPE._serialized_start=696 + _ROOMSCENE_TYPE._serialized_end=815 +# @@protoc_insertion_point(module_scope) diff --git a/proto-reference/common_pb2.pyi b/proto-reference/common_pb2.pyi new file mode 100644 index 0000000..fd1acb7 --- /dev/null +++ b/proto-reference/common_pb2.pyi @@ -0,0 +1,108 @@ +from google.protobuf.internal import containers as _containers +from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class Active(_message.Message): + __slots__ = ["value"] + VALUE_FIELD_NUMBER: _ClassVar[int] + value: bool + def __init__(self, value: bool = ...) -> None: ... + +class Empty(_message.Message): + __slots__ = [] + def __init__(self) -> None: ... + +class Floor(_message.Message): + __slots__ = ["type"] + class Type(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + BLANKET: Floor.Type + CERAMIC: Floor.Type + TYPE_FIELD_NUMBER: _ClassVar[int] + UNKNOW: Floor.Type + WOOD: Floor.Type + type: Floor.Type + def __init__(self, type: _Optional[_Union[Floor.Type, str]] = ...) -> None: ... + +class Line(_message.Message): + __slots__ = ["p0", "p1"] + P0_FIELD_NUMBER: _ClassVar[int] + P1_FIELD_NUMBER: _ClassVar[int] + p0: Point + p1: Point + def __init__(self, p0: _Optional[_Union[Point, _Mapping]] = ..., p1: _Optional[_Union[Point, _Mapping]] = ...) -> None: ... + +class Numerical(_message.Message): + __slots__ = ["value"] + VALUE_FIELD_NUMBER: _ClassVar[int] + value: int + def __init__(self, value: _Optional[int] = ...) -> None: ... + +class Point(_message.Message): + __slots__ = ["x", "y"] + X_FIELD_NUMBER: _ClassVar[int] + Y_FIELD_NUMBER: _ClassVar[int] + x: int + y: int + def __init__(self, x: _Optional[int] = ..., y: _Optional[int] = ...) -> None: ... + +class Polygon(_message.Message): + __slots__ = ["points"] + POINTS_FIELD_NUMBER: _ClassVar[int] + points: _containers.RepeatedCompositeFieldContainer[Point] + def __init__(self, points: _Optional[_Iterable[_Union[Point, _Mapping]]] = ...) -> None: ... + +class Pose(_message.Message): + __slots__ = ["theta", "x", "y"] + THETA_FIELD_NUMBER: _ClassVar[int] + X_FIELD_NUMBER: _ClassVar[int] + Y_FIELD_NUMBER: _ClassVar[int] + theta: int + x: int + y: int + def __init__(self, x: _Optional[int] = ..., y: _Optional[int] = ..., theta: _Optional[int] = ...) -> None: ... + +class Quadrangle(_message.Message): + __slots__ = ["p0", "p1", "p2", "p3"] + P0_FIELD_NUMBER: _ClassVar[int] + P1_FIELD_NUMBER: _ClassVar[int] + P2_FIELD_NUMBER: _ClassVar[int] + P3_FIELD_NUMBER: _ClassVar[int] + p0: Point + p1: Point + p2: Point + p3: Point + def __init__(self, p0: _Optional[_Union[Point, _Mapping]] = ..., p1: _Optional[_Union[Point, _Mapping]] = ..., p2: _Optional[_Union[Point, _Mapping]] = ..., p3: _Optional[_Union[Point, _Mapping]] = ...) -> None: ... + +class RoomScene(_message.Message): + __slots__ = ["index", "type"] + class Type(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + class Index(_message.Message): + __slots__ = ["value"] + VALUE_FIELD_NUMBER: _ClassVar[int] + value: int + def __init__(self, value: _Optional[int] = ...) -> None: ... + BEDROOM: RoomScene.Type + CORRIDOR: RoomScene.Type + DININGROOM: RoomScene.Type + INDEX_FIELD_NUMBER: _ClassVar[int] + KITCHEN: RoomScene.Type + LIVINGROOM: RoomScene.Type + RESTROOM: RoomScene.Type + STUDYROOM: RoomScene.Type + TYPE_FIELD_NUMBER: _ClassVar[int] + UNKNOW: RoomScene.Type + index: RoomScene.Index + type: RoomScene.Type + def __init__(self, type: _Optional[_Union[RoomScene.Type, str]] = ..., index: _Optional[_Union[RoomScene.Index, _Mapping]] = ...) -> None: ... + +class Switch(_message.Message): + __slots__ = ["value"] + VALUE_FIELD_NUMBER: _ClassVar[int] + value: bool + def __init__(self, value: bool = ...) -> None: ... diff --git a/proto-reference/consumable.proto b/proto-reference/consumable.proto new file mode 100644 index 0000000..8a607d0 --- /dev/null +++ b/proto-reference/consumable.proto @@ -0,0 +1,45 @@ +/** + * 耗材统计. + */ +syntax = "proto3"; + +// option optimize_for = LITE_RUNTIME; + +package proto.cloud; + +message ConsumableRequest { + enum Type { + SIDE_BRUSH = 0; + ROLLING_BRUSH = 1; + FILTER_MESH = 2; + SCRAPE = 3; + SENSOR = 4; + MOP = 5; + DUSTBAG = 6; + DIRTY_WATERTANK = 7; + DIRTY_WATERFILTER = 8; + } + repeated Type reset_types = 1; +} + +message ConsumableRuntime { + message Duration { + uint32 duration = 1; // 单位:hour + } + + Duration side_brush = 1; //边刷 + Duration rolling_brush = 2; //滚刷 + Duration filter_mesh = 3; //滤网 + Duration scrape = 4; //刮条 + Duration sensor = 5; //传感器 + Duration mop = 6; //拖布 + Duration dustbag = 7; //尘袋 + Duration dirty_watertank = 10; //污水预存水槽 + Duration dirty_waterfilter = 11; //污水泵滤芯 + + uint64 last_time = 20; // 需要带上时间,单位纳秒,从1970.1.1开始的纳秒数。 +} + +message ConsumableResponse { + ConsumableRuntime runtime = 1; +} diff --git a/proto-reference/consumable_pb2.py b/proto-reference/consumable_pb2.py new file mode 100644 index 0000000..4e6e2b2 --- /dev/null +++ b/proto-reference/consumable_pb2.py @@ -0,0 +1,33 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: proto/cloud/consumable.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1cproto/cloud/consumable.proto\x12\x0bproto.cloud\"\xe4\x01\n\x11\x43onsumableRequest\x12\x38\n\x0breset_types\x18\x01 \x03(\x0e\x32#.proto.cloud.ConsumableRequest.Type\"\x94\x01\n\x04Type\x12\x0e\n\nSIDE_BRUSH\x10\x00\x12\x11\n\rROLLING_BRUSH\x10\x01\x12\x0f\n\x0b\x46ILTER_MESH\x10\x02\x12\n\n\x06SCRAPE\x10\x03\x12\n\n\x06SENSOR\x10\x04\x12\x07\n\x03MOP\x10\x05\x12\x0b\n\x07\x44USTBAG\x10\x06\x12\x13\n\x0f\x44IRTY_WATERTANK\x10\x07\x12\x15\n\x11\x44IRTY_WATERFILTER\x10\x08\"\xe7\x04\n\x11\x43onsumableRuntime\x12;\n\nside_brush\x18\x01 \x01(\x0b\x32\'.proto.cloud.ConsumableRuntime.Duration\x12>\n\rrolling_brush\x18\x02 \x01(\x0b\x32\'.proto.cloud.ConsumableRuntime.Duration\x12<\n\x0b\x66ilter_mesh\x18\x03 \x01(\x0b\x32\'.proto.cloud.ConsumableRuntime.Duration\x12\x37\n\x06scrape\x18\x04 \x01(\x0b\x32\'.proto.cloud.ConsumableRuntime.Duration\x12\x37\n\x06sensor\x18\x05 \x01(\x0b\x32\'.proto.cloud.ConsumableRuntime.Duration\x12\x34\n\x03mop\x18\x06 \x01(\x0b\x32\'.proto.cloud.ConsumableRuntime.Duration\x12\x38\n\x07\x64ustbag\x18\x07 \x01(\x0b\x32\'.proto.cloud.ConsumableRuntime.Duration\x12@\n\x0f\x64irty_watertank\x18\n \x01(\x0b\x32\'.proto.cloud.ConsumableRuntime.Duration\x12\x42\n\x11\x64irty_waterfilter\x18\x0b \x01(\x0b\x32\'.proto.cloud.ConsumableRuntime.Duration\x12\x11\n\tlast_time\x18\x14 \x01(\x04\x1a\x1c\n\x08\x44uration\x12\x10\n\x08\x64uration\x18\x01 \x01(\r\"E\n\x12\x43onsumableResponse\x12/\n\x07runtime\x18\x01 \x01(\x0b\x32\x1e.proto.cloud.ConsumableRuntimeb\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'proto.cloud.consumable_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _CONSUMABLEREQUEST._serialized_start=46 + _CONSUMABLEREQUEST._serialized_end=274 + _CONSUMABLEREQUEST_TYPE._serialized_start=126 + _CONSUMABLEREQUEST_TYPE._serialized_end=274 + _CONSUMABLERUNTIME._serialized_start=277 + _CONSUMABLERUNTIME._serialized_end=892 + _CONSUMABLERUNTIME_DURATION._serialized_start=864 + _CONSUMABLERUNTIME_DURATION._serialized_end=892 + _CONSUMABLERESPONSE._serialized_start=894 + _CONSUMABLERESPONSE._serialized_end=963 +# @@protoc_insertion_point(module_scope) diff --git a/proto-reference/consumable_pb2.pyi b/proto-reference/consumable_pb2.pyi new file mode 100644 index 0000000..b26f984 --- /dev/null +++ b/proto-reference/consumable_pb2.pyi @@ -0,0 +1,59 @@ +from google.protobuf.internal import containers as _containers +from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class ConsumableRequest(_message.Message): + __slots__ = ["reset_types"] + class Type(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + DIRTY_WATERFILTER: ConsumableRequest.Type + DIRTY_WATERTANK: ConsumableRequest.Type + DUSTBAG: ConsumableRequest.Type + FILTER_MESH: ConsumableRequest.Type + MOP: ConsumableRequest.Type + RESET_TYPES_FIELD_NUMBER: _ClassVar[int] + ROLLING_BRUSH: ConsumableRequest.Type + SCRAPE: ConsumableRequest.Type + SENSOR: ConsumableRequest.Type + SIDE_BRUSH: ConsumableRequest.Type + reset_types: _containers.RepeatedScalarFieldContainer[ConsumableRequest.Type] + def __init__(self, reset_types: _Optional[_Iterable[_Union[ConsumableRequest.Type, str]]] = ...) -> None: ... + +class ConsumableResponse(_message.Message): + __slots__ = ["runtime"] + RUNTIME_FIELD_NUMBER: _ClassVar[int] + runtime: ConsumableRuntime + def __init__(self, runtime: _Optional[_Union[ConsumableRuntime, _Mapping]] = ...) -> None: ... + +class ConsumableRuntime(_message.Message): + __slots__ = ["dirty_waterfilter", "dirty_watertank", "dustbag", "filter_mesh", "last_time", "mop", "rolling_brush", "scrape", "sensor", "side_brush"] + class Duration(_message.Message): + __slots__ = ["duration"] + DURATION_FIELD_NUMBER: _ClassVar[int] + duration: int + def __init__(self, duration: _Optional[int] = ...) -> None: ... + DIRTY_WATERFILTER_FIELD_NUMBER: _ClassVar[int] + DIRTY_WATERTANK_FIELD_NUMBER: _ClassVar[int] + DUSTBAG_FIELD_NUMBER: _ClassVar[int] + FILTER_MESH_FIELD_NUMBER: _ClassVar[int] + LAST_TIME_FIELD_NUMBER: _ClassVar[int] + MOP_FIELD_NUMBER: _ClassVar[int] + ROLLING_BRUSH_FIELD_NUMBER: _ClassVar[int] + SCRAPE_FIELD_NUMBER: _ClassVar[int] + SENSOR_FIELD_NUMBER: _ClassVar[int] + SIDE_BRUSH_FIELD_NUMBER: _ClassVar[int] + dirty_waterfilter: ConsumableRuntime.Duration + dirty_watertank: ConsumableRuntime.Duration + dustbag: ConsumableRuntime.Duration + filter_mesh: ConsumableRuntime.Duration + last_time: int + mop: ConsumableRuntime.Duration + rolling_brush: ConsumableRuntime.Duration + scrape: ConsumableRuntime.Duration + sensor: ConsumableRuntime.Duration + side_brush: ConsumableRuntime.Duration + def __init__(self, side_brush: _Optional[_Union[ConsumableRuntime.Duration, _Mapping]] = ..., rolling_brush: _Optional[_Union[ConsumableRuntime.Duration, _Mapping]] = ..., filter_mesh: _Optional[_Union[ConsumableRuntime.Duration, _Mapping]] = ..., scrape: _Optional[_Union[ConsumableRuntime.Duration, _Mapping]] = ..., sensor: _Optional[_Union[ConsumableRuntime.Duration, _Mapping]] = ..., mop: _Optional[_Union[ConsumableRuntime.Duration, _Mapping]] = ..., dustbag: _Optional[_Union[ConsumableRuntime.Duration, _Mapping]] = ..., dirty_watertank: _Optional[_Union[ConsumableRuntime.Duration, _Mapping]] = ..., dirty_waterfilter: _Optional[_Union[ConsumableRuntime.Duration, _Mapping]] = ..., last_time: _Optional[int] = ...) -> None: ... diff --git a/proto-reference/control.proto b/proto-reference/control.proto new file mode 100644 index 0000000..8014938 --- /dev/null +++ b/proto-reference/control.proto @@ -0,0 +1,197 @@ +syntax = "proto3"; + +// option optimize_for = LITE_RUNTIME; + +package proto.cloud; + +import "proto/cloud/common.proto"; +import "proto/cloud/clean_param.proto"; + +// 遥控器方向 +message RemoteCtrl { + enum Direction { + BRAKE = 0; // App可及时停止前面的遥控指令紧急刹车(不是退出遥控模式),比如在按键抬起时下发 + FORWARD = 1; + BACK = 2; + LEFT = 3; + RIGHT = 4; + } + // App下发任意FORWARD/BACK/LEFT/RIGHT即进入遥控模式 + Direction direction = 1; +} + +// 通用全局清扫,清洁参数走 clean_param 中 clean_param 参数 +// 定制全局清扫,设置每个房间不同的清扫参数走 stream 定制参数 - x10 开始不受支持 +// 通过 MapEditRequest.RoomsCustom.custom_enable 判断使用哪种参数 - x10 开始不受支持 +message AutoClean { + // 总清扫次数 + uint32 clean_times = 1; // 清扫次数,非 0 有效 + // 强制建图(即使当前有图也会重新建图) + bool force_mapping = 2; +} + +// 通用房间清扫,清洁参数走 clean_param 中 area_clean_param 参数 +// 定制房间清扫,设置每个房间不同的清扫参数走 stream 定制参数(通过 MapEditRequest.RoomsCustom 设置) +// 通过 type 判断使用哪种参数 +message SelectRoomsClean { + message Room { + uint32 id = 1; + uint32 order = 2; + } + repeated Room rooms = 1; // 定制房间清扫该字段也要传,虽然和 stream 中的部分信息重复 + uint32 clean_times = 2; // 通用清扫次数,非 0 有效。定制清扫次数放在 stream 中 + + uint32 map_id = 3; // map 的 id 号 + uint32 releases = 4; // map 的大版本修正号 + + enum Mode { + GENERAL = 0; // 通用清扫 + CUSTOMIZE = 1; // 定制清扫 + } + Mode mode = 5; +} + +message SelectZonesClean { + message Zone { + Quadrangle quadrangle = 1; + uint32 clean_times = 2; // 清扫次数,非 0 有效 + } + repeated Zone zones = 1; + + uint32 map_id = 2; // map 的 id 号 + uint32 releases = 3; // map 的大版本修正号 + + enum Type { + NORMAL = 0; // 普通清扫 + POOP_CLEANING = 1; // 便便补扫 + } + Type type = 4; +} + +message SceneClean { + uint32 scene_id = 1; +} + +message SpotClean { + uint32 clean_times = 1; // 清扫次数,非 0 有效 +} + +message Goto { + Point destination = 1; + + enum Type { + GOTO_DESTINATION = 0; // 只去目的地 + GOTO_SPOT = 1; + GOTO_AUTO = 2; + } + Type type = 2; + uint32 clean_times = 3; // 清扫次数,非 0 有效,SPOT 清扫才有效 + + uint32 map_id = 4; // map 的 id 号 + uint32 releases = 5; // map 的大版本修正号 +} + +message ScheduleAutoClean { + Fan fan = 1; + MopMode mop_mode = 2; + CleanType clean_type = 3; + CleanExtent clean_extent = 4; +} + +message ScheduleRoomsClean { + Fan fan = 1; + MopMode mop_mode = 2; + CleanType clean_type = 3; + CleanExtent clean_extent = 4; + + message Room { + uint32 id = 1; + uint32 order = 2; + } + repeated Room rooms = 5; + + uint32 map_id = 6; + uint32 releases = 7; // map 的大版本修正号 +} + +// 用户设置的全局巡航点通过地图编辑下发 +message GlobalCruise { + uint32 map_id = 1; + uint32 releases = 2; // map 的大版本修正号 +} + +message PointCruise { + Point points = 1; + uint32 map_id = 2; // map 的 id 号 + uint32 releases = 3; // map 的大版本修正号 +} + +message ZonesCruise { + repeated Point points = 1; + uint32 map_id = 2; // map 的 id 号 + uint32 releases = 3; // map 的大版本修正号 +} + +message ScheduleCruise { + uint32 map_id = 1; + uint32 releases = 2; // map 的大版本修正号 +} + +message ModeCtrlRequest { + enum Method { + START_AUTO_CLEAN = 0; // 开始全局自动清扫 + START_SELECT_ROOMS_CLEAN = 1; // 开始选房清扫 + START_SELECT_ZONES_CLEAN = 2; // 开始选区清扫 + START_SPOT_CLEAN = 3; // 开始当前位置局部清扫 + START_GOTO_CLEAN = 4; // 开始移动位置局部清扫 + START_RC_CLEAN = 5; // 开始遥控清扫 + START_GOHOME = 6; // 开始回充 + START_SCHEDULE_AUTO_CLEAN = 7; // 预约自动清扫,适用于定时下发消息的方案,后续项目不使用 + START_SCHEDULE_ROOMS_CLEAN = 8; // 预约房间清扫,适用于定时下发消息的方案,后续项目不使用 + START_FAST_MAPPING = 9; // 快速建图 + START_GOWASH = 10; // 开始回洗 + STOP_TASK = 12; // 停止清扫(巡航)任务 + PAUSE_TASK = 13; // 暂停清扫(巡航)任务 + RESUME_TASK = 14; // 恢复清扫(巡航)任务 + STOP_GOHOME = 15; // 停止回充 + STOP_RC_CLEAN = 16; // 停止遥控清扫 + STOP_GOWASH = 17; // 停止回洗 + STOP_SMART_FOLLOW = 18; // 停止智能跟随 + START_GLOBAL_CRUISE = 20; // 全屋巡航 + START_POINT_CRUISE = 21; // 精准巡航 + START_ZONES_CRUISE = 22; // 选区巡航 + START_SCHEDULE_CRUISE = 23; // 预约巡航,适用于定时下发消息的方案,后续项目不使用 + START_SCENE_CLEAN = 24; // 开始场景清扫 + START_MAPPING_THEN_CLEAN = 25; // 先建图再清扫 + } + + Method method = 1; + uint32 seq = 2; + + oneof Param { + AutoClean auto_clean = 3; + SelectRoomsClean select_rooms_clean = 4; + SelectZonesClean select_zones_clean = 5; + SpotClean spot_clean = 6; + Goto go_to = 7; + ScheduleAutoClean sche_auto_clean = 8; + ScheduleRoomsClean sche_rooms_clean = 9; + GlobalCruise global_cruise = 10; + PointCruise point_cruise = 11; + ZonesCruise zones_cruise = 12; + ScheduleCruise sche_cruise = 13; + SceneClean scene_clean = 14; + } +} + +// TODO: 可以考虑不返回,执行成功后状态会相应改变. +message ModeCtrlResponse { + ModeCtrlRequest.Method method = 1; + uint32 seq = 2; // 返回 ModeCtrlRequest 相同的 seq 值. + + enum Result { + SUCCESS = 0; + FAILED = 1; + } + Result result = 3; +} diff --git a/proto-reference/control_pb2.py b/proto-reference/control_pb2.py new file mode 100644 index 0000000..110beb4 --- /dev/null +++ b/proto-reference/control_pb2.py @@ -0,0 +1,74 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: proto/cloud/control.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder + +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from ...proto.cloud import \ + clean_param_pb2 as proto_dot_cloud_dot_clean__param__pb2 +from ...proto.cloud import common_pb2 as proto_dot_cloud_dot_common__pb2 + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x19proto/cloud/control.proto\x12\x0bproto.cloud\x1a\x18proto/cloud/common.proto\x1a\x1dproto/cloud/clean_param.proto\"\x86\x01\n\nRemoteCtrl\x12\x34\n\tdirection\x18\x01 \x01(\x0e\x32!.proto.cloud.RemoteCtrl.Direction\"B\n\tDirection\x12\t\n\x05\x42RAKE\x10\x00\x12\x0b\n\x07\x46ORWARD\x10\x01\x12\x08\n\x04\x42\x41\x43K\x10\x02\x12\x08\n\x04LEFT\x10\x03\x12\t\n\x05RIGHT\x10\x04\"7\n\tAutoClean\x12\x13\n\x0b\x63lean_times\x18\x01 \x01(\r\x12\x15\n\rforce_mapping\x18\x02 \x01(\x08\"\xf5\x01\n\x10SelectRoomsClean\x12\x31\n\x05rooms\x18\x01 \x03(\x0b\x32\".proto.cloud.SelectRoomsClean.Room\x12\x13\n\x0b\x63lean_times\x18\x02 \x01(\r\x12\x0e\n\x06map_id\x18\x03 \x01(\r\x12\x10\n\x08releases\x18\x04 \x01(\r\x12\x30\n\x04mode\x18\x05 \x01(\x0e\x32\".proto.cloud.SelectRoomsClean.Mode\x1a!\n\x04Room\x12\n\n\x02id\x18\x01 \x01(\r\x12\r\n\x05order\x18\x02 \x01(\r\"\"\n\x04Mode\x12\x0b\n\x07GENERAL\x10\x00\x12\r\n\tCUSTOMIZE\x10\x01\"\x8a\x02\n\x10SelectZonesClean\x12\x31\n\x05zones\x18\x01 \x03(\x0b\x32\".proto.cloud.SelectZonesClean.Zone\x12\x0e\n\x06map_id\x18\x02 \x01(\r\x12\x10\n\x08releases\x18\x03 \x01(\r\x12\x30\n\x04type\x18\x04 \x01(\x0e\x32\".proto.cloud.SelectZonesClean.Type\x1aH\n\x04Zone\x12+\n\nquadrangle\x18\x01 \x01(\x0b\x32\x17.proto.cloud.Quadrangle\x12\x13\n\x0b\x63lean_times\x18\x02 \x01(\r\"%\n\x04Type\x12\n\n\x06NORMAL\x10\x00\x12\x11\n\rPOOP_CLEANING\x10\x01\"\x1e\n\nSceneClean\x12\x10\n\x08scene_id\x18\x01 \x01(\r\" \n\tSpotClean\x12\x13\n\x0b\x63lean_times\x18\x01 \x01(\r\"\xc8\x01\n\x04Goto\x12\'\n\x0b\x64\x65stination\x18\x01 \x01(\x0b\x32\x12.proto.cloud.Point\x12$\n\x04type\x18\x02 \x01(\x0e\x32\x16.proto.cloud.Goto.Type\x12\x13\n\x0b\x63lean_times\x18\x03 \x01(\r\x12\x0e\n\x06map_id\x18\x04 \x01(\r\x12\x10\n\x08releases\x18\x05 \x01(\r\":\n\x04Type\x12\x14\n\x10GOTO_DESTINATION\x10\x00\x12\r\n\tGOTO_SPOT\x10\x01\x12\r\n\tGOTO_AUTO\x10\x02\"\xb6\x01\n\x11ScheduleAutoClean\x12\x1d\n\x03\x66\x61n\x18\x01 \x01(\x0b\x32\x10.proto.cloud.Fan\x12&\n\x08mop_mode\x18\x02 \x01(\x0b\x32\x14.proto.cloud.MopMode\x12*\n\nclean_type\x18\x03 \x01(\x0b\x32\x16.proto.cloud.CleanType\x12.\n\x0c\x63lean_extent\x18\x04 \x01(\x0b\x32\x18.proto.cloud.CleanExtent\"\xb1\x02\n\x12ScheduleRoomsClean\x12\x1d\n\x03\x66\x61n\x18\x01 \x01(\x0b\x32\x10.proto.cloud.Fan\x12&\n\x08mop_mode\x18\x02 \x01(\x0b\x32\x14.proto.cloud.MopMode\x12*\n\nclean_type\x18\x03 \x01(\x0b\x32\x16.proto.cloud.CleanType\x12.\n\x0c\x63lean_extent\x18\x04 \x01(\x0b\x32\x18.proto.cloud.CleanExtent\x12\x33\n\x05rooms\x18\x05 \x03(\x0b\x32$.proto.cloud.ScheduleRoomsClean.Room\x12\x0e\n\x06map_id\x18\x06 \x01(\r\x12\x10\n\x08releases\x18\x07 \x01(\r\x1a!\n\x04Room\x12\n\n\x02id\x18\x01 \x01(\r\x12\r\n\x05order\x18\x02 \x01(\r\"0\n\x0cGlobalCruise\x12\x0e\n\x06map_id\x18\x01 \x01(\r\x12\x10\n\x08releases\x18\x02 \x01(\r\"S\n\x0bPointCruise\x12\"\n\x06points\x18\x01 \x01(\x0b\x32\x12.proto.cloud.Point\x12\x0e\n\x06map_id\x18\x02 \x01(\r\x12\x10\n\x08releases\x18\x03 \x01(\r\"S\n\x0bZonesCruise\x12\"\n\x06points\x18\x01 \x03(\x0b\x32\x12.proto.cloud.Point\x12\x0e\n\x06map_id\x18\x02 \x01(\r\x12\x10\n\x08releases\x18\x03 \x01(\r\"2\n\x0eScheduleCruise\x12\x0e\n\x06map_id\x18\x01 \x01(\r\x12\x10\n\x08releases\x18\x02 \x01(\r\"\xf7\t\n\x0fModeCtrlRequest\x12\x33\n\x06method\x18\x01 \x01(\x0e\x32#.proto.cloud.ModeCtrlRequest.Method\x12\x0b\n\x03seq\x18\x02 \x01(\r\x12,\n\nauto_clean\x18\x03 \x01(\x0b\x32\x16.proto.cloud.AutoCleanH\x00\x12;\n\x12select_rooms_clean\x18\x04 \x01(\x0b\x32\x1d.proto.cloud.SelectRoomsCleanH\x00\x12;\n\x12select_zones_clean\x18\x05 \x01(\x0b\x32\x1d.proto.cloud.SelectZonesCleanH\x00\x12,\n\nspot_clean\x18\x06 \x01(\x0b\x32\x16.proto.cloud.SpotCleanH\x00\x12\"\n\x05go_to\x18\x07 \x01(\x0b\x32\x11.proto.cloud.GotoH\x00\x12\x39\n\x0fsche_auto_clean\x18\x08 \x01(\x0b\x32\x1e.proto.cloud.ScheduleAutoCleanH\x00\x12;\n\x10sche_rooms_clean\x18\t \x01(\x0b\x32\x1f.proto.cloud.ScheduleRoomsCleanH\x00\x12\x32\n\rglobal_cruise\x18\n \x01(\x0b\x32\x19.proto.cloud.GlobalCruiseH\x00\x12\x30\n\x0cpoint_cruise\x18\x0b \x01(\x0b\x32\x18.proto.cloud.PointCruiseH\x00\x12\x30\n\x0czones_cruise\x18\x0c \x01(\x0b\x32\x18.proto.cloud.ZonesCruiseH\x00\x12\x32\n\x0bsche_cruise\x18\r \x01(\x0b\x32\x1b.proto.cloud.ScheduleCruiseH\x00\x12.\n\x0bscene_clean\x18\x0e \x01(\x0b\x32\x17.proto.cloud.SceneCleanH\x00\"\xaa\x04\n\x06Method\x12\x14\n\x10START_AUTO_CLEAN\x10\x00\x12\x1c\n\x18START_SELECT_ROOMS_CLEAN\x10\x01\x12\x1c\n\x18START_SELECT_ZONES_CLEAN\x10\x02\x12\x14\n\x10START_SPOT_CLEAN\x10\x03\x12\x14\n\x10START_GOTO_CLEAN\x10\x04\x12\x12\n\x0eSTART_RC_CLEAN\x10\x05\x12\x10\n\x0cSTART_GOHOME\x10\x06\x12\x1d\n\x19START_SCHEDULE_AUTO_CLEAN\x10\x07\x12\x1e\n\x1aSTART_SCHEDULE_ROOMS_CLEAN\x10\x08\x12\x16\n\x12START_FAST_MAPPING\x10\t\x12\x10\n\x0cSTART_GOWASH\x10\n\x12\r\n\tSTOP_TASK\x10\x0c\x12\x0e\n\nPAUSE_TASK\x10\r\x12\x0f\n\x0bRESUME_TASK\x10\x0e\x12\x0f\n\x0bSTOP_GOHOME\x10\x0f\x12\x11\n\rSTOP_RC_CLEAN\x10\x10\x12\x0f\n\x0bSTOP_GOWASH\x10\x11\x12\x15\n\x11STOP_SMART_FOLLOW\x10\x12\x12\x17\n\x13START_GLOBAL_CRUISE\x10\x14\x12\x16\n\x12START_POINT_CRUISE\x10\x15\x12\x16\n\x12START_ZONES_CRUISE\x10\x16\x12\x19\n\x15START_SCHEDULE_CRUISE\x10\x17\x12\x15\n\x11START_SCENE_CLEAN\x10\x18\x12\x1c\n\x18START_MAPPING_THEN_CLEAN\x10\x19\x42\x07\n\x05Param\"\xad\x01\n\x10ModeCtrlResponse\x12\x33\n\x06method\x18\x01 \x01(\x0e\x32#.proto.cloud.ModeCtrlRequest.Method\x12\x0b\n\x03seq\x18\x02 \x01(\r\x12\x34\n\x06result\x18\x03 \x01(\x0e\x32$.proto.cloud.ModeCtrlResponse.Result\"!\n\x06Result\x12\x0b\n\x07SUCCESS\x10\x00\x12\n\n\x06\x46\x41ILED\x10\x01\x62\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'proto.cloud.control_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _REMOTECTRL._serialized_start=100 + _REMOTECTRL._serialized_end=234 + _REMOTECTRL_DIRECTION._serialized_start=168 + _REMOTECTRL_DIRECTION._serialized_end=234 + _AUTOCLEAN._serialized_start=236 + _AUTOCLEAN._serialized_end=291 + _SELECTROOMSCLEAN._serialized_start=294 + _SELECTROOMSCLEAN._serialized_end=539 + _SELECTROOMSCLEAN_ROOM._serialized_start=470 + _SELECTROOMSCLEAN_ROOM._serialized_end=503 + _SELECTROOMSCLEAN_MODE._serialized_start=505 + _SELECTROOMSCLEAN_MODE._serialized_end=539 + _SELECTZONESCLEAN._serialized_start=542 + _SELECTZONESCLEAN._serialized_end=808 + _SELECTZONESCLEAN_ZONE._serialized_start=697 + _SELECTZONESCLEAN_ZONE._serialized_end=769 + _SELECTZONESCLEAN_TYPE._serialized_start=771 + _SELECTZONESCLEAN_TYPE._serialized_end=808 + _SCENECLEAN._serialized_start=810 + _SCENECLEAN._serialized_end=840 + _SPOTCLEAN._serialized_start=842 + _SPOTCLEAN._serialized_end=874 + _GOTO._serialized_start=877 + _GOTO._serialized_end=1077 + _GOTO_TYPE._serialized_start=1019 + _GOTO_TYPE._serialized_end=1077 + _SCHEDULEAUTOCLEAN._serialized_start=1080 + _SCHEDULEAUTOCLEAN._serialized_end=1262 + _SCHEDULEROOMSCLEAN._serialized_start=1265 + _SCHEDULEROOMSCLEAN._serialized_end=1570 + _SCHEDULEROOMSCLEAN_ROOM._serialized_start=470 + _SCHEDULEROOMSCLEAN_ROOM._serialized_end=503 + _GLOBALCRUISE._serialized_start=1572 + _GLOBALCRUISE._serialized_end=1620 + _POINTCRUISE._serialized_start=1622 + _POINTCRUISE._serialized_end=1705 + _ZONESCRUISE._serialized_start=1707 + _ZONESCRUISE._serialized_end=1790 + _SCHEDULECRUISE._serialized_start=1792 + _SCHEDULECRUISE._serialized_end=1842 + _MODECTRLREQUEST._serialized_start=1845 + _MODECTRLREQUEST._serialized_end=3116 + _MODECTRLREQUEST_METHOD._serialized_start=2553 + _MODECTRLREQUEST_METHOD._serialized_end=3107 + _MODECTRLRESPONSE._serialized_start=3119 + _MODECTRLRESPONSE._serialized_end=3292 + _MODECTRLRESPONSE_RESULT._serialized_start=3259 + _MODECTRLRESPONSE_RESULT._serialized_end=3292 +# @@protoc_insertion_point(module_scope) diff --git a/proto-reference/control_pb2.pyi b/proto-reference/control_pb2.pyi new file mode 100644 index 0000000..fff5902 --- /dev/null +++ b/proto-reference/control_pb2.pyi @@ -0,0 +1,260 @@ +from typing import ClassVar as _ClassVar +from typing import Iterable as _Iterable +from typing import Mapping as _Mapping +from typing import Optional as _Optional +from typing import Union as _Union + +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf.internal import containers as _containers +from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper + +from ...proto.cloud import clean_param_pb2 as _clean_param_pb2 +from ...proto.cloud import common_pb2 as _common_pb2 + +DESCRIPTOR: _descriptor.FileDescriptor + +class AutoClean(_message.Message): + __slots__ = ["clean_times", "force_mapping"] + CLEAN_TIMES_FIELD_NUMBER: _ClassVar[int] + FORCE_MAPPING_FIELD_NUMBER: _ClassVar[int] + clean_times: int + force_mapping: bool + def __init__(self, clean_times: _Optional[int] = ..., force_mapping: bool = ...) -> None: ... + +class GlobalCruise(_message.Message): + __slots__ = ["map_id", "releases"] + MAP_ID_FIELD_NUMBER: _ClassVar[int] + RELEASES_FIELD_NUMBER: _ClassVar[int] + map_id: int + releases: int + def __init__(self, map_id: _Optional[int] = ..., releases: _Optional[int] = ...) -> None: ... + +class Goto(_message.Message): + __slots__ = ["clean_times", "destination", "map_id", "releases", "type"] + class Type(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + CLEAN_TIMES_FIELD_NUMBER: _ClassVar[int] + DESTINATION_FIELD_NUMBER: _ClassVar[int] + GOTO_AUTO: Goto.Type + GOTO_DESTINATION: Goto.Type + GOTO_SPOT: Goto.Type + MAP_ID_FIELD_NUMBER: _ClassVar[int] + RELEASES_FIELD_NUMBER: _ClassVar[int] + TYPE_FIELD_NUMBER: _ClassVar[int] + clean_times: int + destination: _common_pb2.Point + map_id: int + releases: int + type: Goto.Type + def __init__(self, destination: _Optional[_Union[_common_pb2.Point, _Mapping]] = ..., type: _Optional[_Union[Goto.Type, str]] = ..., clean_times: _Optional[int] = ..., map_id: _Optional[int] = ..., releases: _Optional[int] = ...) -> None: ... + +class ModeCtrlRequest(_message.Message): + __slots__ = ["auto_clean", "global_cruise", "go_to", "method", "point_cruise", "scene_clean", "sche_auto_clean", "sche_cruise", "sche_rooms_clean", "select_rooms_clean", "select_zones_clean", "seq", "spot_clean", "zones_cruise"] + class Method(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + AUTO_CLEAN_FIELD_NUMBER: _ClassVar[int] + GLOBAL_CRUISE_FIELD_NUMBER: _ClassVar[int] + GO_TO_FIELD_NUMBER: _ClassVar[int] + METHOD_FIELD_NUMBER: _ClassVar[int] + PAUSE_TASK: ModeCtrlRequest.Method + POINT_CRUISE_FIELD_NUMBER: _ClassVar[int] + RESUME_TASK: ModeCtrlRequest.Method + SCENE_CLEAN_FIELD_NUMBER: _ClassVar[int] + SCHE_AUTO_CLEAN_FIELD_NUMBER: _ClassVar[int] + SCHE_CRUISE_FIELD_NUMBER: _ClassVar[int] + SCHE_ROOMS_CLEAN_FIELD_NUMBER: _ClassVar[int] + SELECT_ROOMS_CLEAN_FIELD_NUMBER: _ClassVar[int] + SELECT_ZONES_CLEAN_FIELD_NUMBER: _ClassVar[int] + SEQ_FIELD_NUMBER: _ClassVar[int] + SPOT_CLEAN_FIELD_NUMBER: _ClassVar[int] + START_AUTO_CLEAN: ModeCtrlRequest.Method + START_FAST_MAPPING: ModeCtrlRequest.Method + START_GLOBAL_CRUISE: ModeCtrlRequest.Method + START_GOHOME: ModeCtrlRequest.Method + START_GOTO_CLEAN: ModeCtrlRequest.Method + START_GOWASH: ModeCtrlRequest.Method + START_MAPPING_THEN_CLEAN: ModeCtrlRequest.Method + START_POINT_CRUISE: ModeCtrlRequest.Method + START_RC_CLEAN: ModeCtrlRequest.Method + START_SCENE_CLEAN: ModeCtrlRequest.Method + START_SCHEDULE_AUTO_CLEAN: ModeCtrlRequest.Method + START_SCHEDULE_CRUISE: ModeCtrlRequest.Method + START_SCHEDULE_ROOMS_CLEAN: ModeCtrlRequest.Method + START_SELECT_ROOMS_CLEAN: ModeCtrlRequest.Method + START_SELECT_ZONES_CLEAN: ModeCtrlRequest.Method + START_SPOT_CLEAN: ModeCtrlRequest.Method + START_ZONES_CRUISE: ModeCtrlRequest.Method + STOP_GOHOME: ModeCtrlRequest.Method + STOP_GOWASH: ModeCtrlRequest.Method + STOP_RC_CLEAN: ModeCtrlRequest.Method + STOP_SMART_FOLLOW: ModeCtrlRequest.Method + STOP_TASK: ModeCtrlRequest.Method + ZONES_CRUISE_FIELD_NUMBER: _ClassVar[int] + auto_clean: AutoClean + global_cruise: GlobalCruise + go_to: Goto + method: ModeCtrlRequest.Method + point_cruise: PointCruise + scene_clean: SceneClean + sche_auto_clean: ScheduleAutoClean + sche_cruise: ScheduleCruise + sche_rooms_clean: ScheduleRoomsClean + select_rooms_clean: SelectRoomsClean + select_zones_clean: SelectZonesClean + seq: int + spot_clean: SpotClean + zones_cruise: ZonesCruise + def __init__(self, method: _Optional[_Union[ModeCtrlRequest.Method, str]] = ..., seq: _Optional[int] = ..., auto_clean: _Optional[_Union[AutoClean, _Mapping]] = ..., select_rooms_clean: _Optional[_Union[SelectRoomsClean, _Mapping]] = ..., select_zones_clean: _Optional[_Union[SelectZonesClean, _Mapping]] = ..., spot_clean: _Optional[_Union[SpotClean, _Mapping]] = ..., go_to: _Optional[_Union[Goto, _Mapping]] = ..., sche_auto_clean: _Optional[_Union[ScheduleAutoClean, _Mapping]] = ..., sche_rooms_clean: _Optional[_Union[ScheduleRoomsClean, _Mapping]] = ..., global_cruise: _Optional[_Union[GlobalCruise, _Mapping]] = ..., point_cruise: _Optional[_Union[PointCruise, _Mapping]] = ..., zones_cruise: _Optional[_Union[ZonesCruise, _Mapping]] = ..., sche_cruise: _Optional[_Union[ScheduleCruise, _Mapping]] = ..., scene_clean: _Optional[_Union[SceneClean, _Mapping]] = ...) -> None: ... + +class ModeCtrlResponse(_message.Message): + __slots__ = ["method", "result", "seq"] + class Result(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + FAILED: ModeCtrlResponse.Result + METHOD_FIELD_NUMBER: _ClassVar[int] + RESULT_FIELD_NUMBER: _ClassVar[int] + SEQ_FIELD_NUMBER: _ClassVar[int] + SUCCESS: ModeCtrlResponse.Result + method: ModeCtrlRequest.Method + result: ModeCtrlResponse.Result + seq: int + def __init__(self, method: _Optional[_Union[ModeCtrlRequest.Method, str]] = ..., seq: _Optional[int] = ..., result: _Optional[_Union[ModeCtrlResponse.Result, str]] = ...) -> None: ... + +class PointCruise(_message.Message): + __slots__ = ["map_id", "points", "releases"] + MAP_ID_FIELD_NUMBER: _ClassVar[int] + POINTS_FIELD_NUMBER: _ClassVar[int] + RELEASES_FIELD_NUMBER: _ClassVar[int] + map_id: int + points: _common_pb2.Point + releases: int + def __init__(self, points: _Optional[_Union[_common_pb2.Point, _Mapping]] = ..., map_id: _Optional[int] = ..., releases: _Optional[int] = ...) -> None: ... + +class RemoteCtrl(_message.Message): + __slots__ = ["direction"] + class Direction(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + BACK: RemoteCtrl.Direction + BRAKE: RemoteCtrl.Direction + DIRECTION_FIELD_NUMBER: _ClassVar[int] + FORWARD: RemoteCtrl.Direction + LEFT: RemoteCtrl.Direction + RIGHT: RemoteCtrl.Direction + direction: RemoteCtrl.Direction + def __init__(self, direction: _Optional[_Union[RemoteCtrl.Direction, str]] = ...) -> None: ... + +class SceneClean(_message.Message): + __slots__ = ["scene_id"] + SCENE_ID_FIELD_NUMBER: _ClassVar[int] + scene_id: int + def __init__(self, scene_id: _Optional[int] = ...) -> None: ... + +class ScheduleAutoClean(_message.Message): + __slots__ = ["clean_extent", "clean_type", "fan", "mop_mode"] + CLEAN_EXTENT_FIELD_NUMBER: _ClassVar[int] + CLEAN_TYPE_FIELD_NUMBER: _ClassVar[int] + FAN_FIELD_NUMBER: _ClassVar[int] + MOP_MODE_FIELD_NUMBER: _ClassVar[int] + clean_extent: _clean_param_pb2.CleanExtent + clean_type: _clean_param_pb2.CleanType + fan: _clean_param_pb2.Fan + mop_mode: _clean_param_pb2.MopMode + def __init__(self, fan: _Optional[_Union[_clean_param_pb2.Fan, _Mapping]] = ..., mop_mode: _Optional[_Union[_clean_param_pb2.MopMode, _Mapping]] = ..., clean_type: _Optional[_Union[_clean_param_pb2.CleanType, _Mapping]] = ..., clean_extent: _Optional[_Union[_clean_param_pb2.CleanExtent, _Mapping]] = ...) -> None: ... + +class ScheduleCruise(_message.Message): + __slots__ = ["map_id", "releases"] + MAP_ID_FIELD_NUMBER: _ClassVar[int] + RELEASES_FIELD_NUMBER: _ClassVar[int] + map_id: int + releases: int + def __init__(self, map_id: _Optional[int] = ..., releases: _Optional[int] = ...) -> None: ... + +class ScheduleRoomsClean(_message.Message): + __slots__ = ["clean_extent", "clean_type", "fan", "map_id", "mop_mode", "releases", "rooms"] + class Room(_message.Message): + __slots__ = ["id", "order"] + ID_FIELD_NUMBER: _ClassVar[int] + ORDER_FIELD_NUMBER: _ClassVar[int] + id: int + order: int + def __init__(self, id: _Optional[int] = ..., order: _Optional[int] = ...) -> None: ... + CLEAN_EXTENT_FIELD_NUMBER: _ClassVar[int] + CLEAN_TYPE_FIELD_NUMBER: _ClassVar[int] + FAN_FIELD_NUMBER: _ClassVar[int] + MAP_ID_FIELD_NUMBER: _ClassVar[int] + MOP_MODE_FIELD_NUMBER: _ClassVar[int] + RELEASES_FIELD_NUMBER: _ClassVar[int] + ROOMS_FIELD_NUMBER: _ClassVar[int] + clean_extent: _clean_param_pb2.CleanExtent + clean_type: _clean_param_pb2.CleanType + fan: _clean_param_pb2.Fan + map_id: int + mop_mode: _clean_param_pb2.MopMode + releases: int + rooms: _containers.RepeatedCompositeFieldContainer[ScheduleRoomsClean.Room] + def __init__(self, fan: _Optional[_Union[_clean_param_pb2.Fan, _Mapping]] = ..., mop_mode: _Optional[_Union[_clean_param_pb2.MopMode, _Mapping]] = ..., clean_type: _Optional[_Union[_clean_param_pb2.CleanType, _Mapping]] = ..., clean_extent: _Optional[_Union[_clean_param_pb2.CleanExtent, _Mapping]] = ..., rooms: _Optional[_Iterable[_Union[ScheduleRoomsClean.Room, _Mapping]]] = ..., map_id: _Optional[int] = ..., releases: _Optional[int] = ...) -> None: ... + +class SelectRoomsClean(_message.Message): + __slots__ = ["clean_times", "map_id", "mode", "releases", "rooms"] + class Mode(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + class Room(_message.Message): + __slots__ = ["id", "order"] + ID_FIELD_NUMBER: _ClassVar[int] + ORDER_FIELD_NUMBER: _ClassVar[int] + id: int + order: int + def __init__(self, id: _Optional[int] = ..., order: _Optional[int] = ...) -> None: ... + CLEAN_TIMES_FIELD_NUMBER: _ClassVar[int] + CUSTOMIZE: SelectRoomsClean.Mode + GENERAL: SelectRoomsClean.Mode + MAP_ID_FIELD_NUMBER: _ClassVar[int] + MODE_FIELD_NUMBER: _ClassVar[int] + RELEASES_FIELD_NUMBER: _ClassVar[int] + ROOMS_FIELD_NUMBER: _ClassVar[int] + clean_times: int + map_id: int + mode: SelectRoomsClean.Mode + releases: int + rooms: _containers.RepeatedCompositeFieldContainer[SelectRoomsClean.Room] + def __init__(self, rooms: _Optional[_Iterable[_Union[SelectRoomsClean.Room, _Mapping]]] = ..., clean_times: _Optional[int] = ..., map_id: _Optional[int] = ..., releases: _Optional[int] = ..., mode: _Optional[_Union[SelectRoomsClean.Mode, str]] = ...) -> None: ... + +class SelectZonesClean(_message.Message): + __slots__ = ["map_id", "releases", "type", "zones"] + class Type(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + class Zone(_message.Message): + __slots__ = ["clean_times", "quadrangle"] + CLEAN_TIMES_FIELD_NUMBER: _ClassVar[int] + QUADRANGLE_FIELD_NUMBER: _ClassVar[int] + clean_times: int + quadrangle: _common_pb2.Quadrangle + def __init__(self, quadrangle: _Optional[_Union[_common_pb2.Quadrangle, _Mapping]] = ..., clean_times: _Optional[int] = ...) -> None: ... + MAP_ID_FIELD_NUMBER: _ClassVar[int] + NORMAL: SelectZonesClean.Type + POOP_CLEANING: SelectZonesClean.Type + RELEASES_FIELD_NUMBER: _ClassVar[int] + TYPE_FIELD_NUMBER: _ClassVar[int] + ZONES_FIELD_NUMBER: _ClassVar[int] + map_id: int + releases: int + type: SelectZonesClean.Type + zones: _containers.RepeatedCompositeFieldContainer[SelectZonesClean.Zone] + def __init__(self, zones: _Optional[_Iterable[_Union[SelectZonesClean.Zone, _Mapping]]] = ..., map_id: _Optional[int] = ..., releases: _Optional[int] = ..., type: _Optional[_Union[SelectZonesClean.Type, str]] = ...) -> None: ... + +class SpotClean(_message.Message): + __slots__ = ["clean_times"] + CLEAN_TIMES_FIELD_NUMBER: _ClassVar[int] + clean_times: int + def __init__(self, clean_times: _Optional[int] = ...) -> None: ... + +class ZonesCruise(_message.Message): + __slots__ = ["map_id", "points", "releases"] + MAP_ID_FIELD_NUMBER: _ClassVar[int] + POINTS_FIELD_NUMBER: _ClassVar[int] + RELEASES_FIELD_NUMBER: _ClassVar[int] + map_id: int + points: _containers.RepeatedCompositeFieldContainer[_common_pb2.Point] + releases: int + def __init__(self, points: _Optional[_Iterable[_Union[_common_pb2.Point, _Mapping]]] = ..., map_id: _Optional[int] = ..., releases: _Optional[int] = ...) -> None: ... diff --git a/proto-reference/debug.proto b/proto-reference/debug.proto new file mode 100644 index 0000000..e8d0869 --- /dev/null +++ b/proto-reference/debug.proto @@ -0,0 +1,45 @@ +syntax = "proto3"; + +// option optimize_for = LITE_RUNTIME; + +package proto.cloud; + +import "proto/cloud/common.proto"; + +message DebugRequest { + Switch log_sw = 1; // 日志开关 + + // 用户在手机 app 主动反馈异常,这时设备可以单次上传日志 + message FaultReport { + uint32 seq = 1; + } + FaultReport fault_report = 2; + + Switch capture_sw = 3; // 数据采集开关(数据回流) + + // 图像识别不准确时,用户可以在手机 app 上主动反馈 + message ImageFeedback { + string object_type = 1; + string photo_id = 2; // 照片 id + } + ImageFeedback image_feedback = 4; // !!! 需求变更,此项废弃 + + Switch toggle_mop_raise = 11; // 翻转拖把抬起/下降,true 翻转,false 忽略 + Switch toggle_mop_spin = 12; // 翻转拖把旋转/停转,true 翻转,false 忽略 +} + +message DebugResponse { + Switch log_sw = 1; + + message UpdateInfo { + uint32 err_code = 1; + } + UpdateInfo update_info = 2; + + message WebTtyInfo { + string connection_data = 1; + } + WebTtyInfo webtty_info = 3; + + Switch capture_sw = 4; // 如果没有这个字段,app 上就不显示采集开关 +} diff --git a/proto-reference/debug_pb2.py b/proto-reference/debug_pb2.py new file mode 100644 index 0000000..c0c3d79 --- /dev/null +++ b/proto-reference/debug_pb2.py @@ -0,0 +1,36 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: proto/cloud/debug.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder + +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from ...proto.cloud import common_pb2 as proto_dot_cloud_dot_common__pb2 + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x17proto/cloud/debug.proto\x12\x0bproto.cloud\x1a\x18proto/cloud/common.proto\"\x8b\x03\n\x0c\x44\x65\x62ugRequest\x12#\n\x06log_sw\x18\x01 \x01(\x0b\x32\x13.proto.cloud.Switch\x12;\n\x0c\x66\x61ult_report\x18\x02 \x01(\x0b\x32%.proto.cloud.DebugRequest.FaultReport\x12\'\n\ncapture_sw\x18\x03 \x01(\x0b\x32\x13.proto.cloud.Switch\x12?\n\x0eimage_feedback\x18\x04 \x01(\x0b\x32\'.proto.cloud.DebugRequest.ImageFeedback\x12-\n\x10toggle_mop_raise\x18\x0b \x01(\x0b\x32\x13.proto.cloud.Switch\x12,\n\x0ftoggle_mop_spin\x18\x0c \x01(\x0b\x32\x13.proto.cloud.Switch\x1a\x1a\n\x0b\x46\x61ultReport\x12\x0b\n\x03seq\x18\x01 \x01(\r\x1a\x36\n\rImageFeedback\x12\x13\n\x0bobject_type\x18\x01 \x01(\t\x12\x10\n\x08photo_id\x18\x02 \x01(\t\"\x9c\x02\n\rDebugResponse\x12#\n\x06log_sw\x18\x01 \x01(\x0b\x32\x13.proto.cloud.Switch\x12:\n\x0bupdate_info\x18\x02 \x01(\x0b\x32%.proto.cloud.DebugResponse.UpdateInfo\x12:\n\x0bwebtty_info\x18\x03 \x01(\x0b\x32%.proto.cloud.DebugResponse.WebTtyInfo\x12\'\n\ncapture_sw\x18\x04 \x01(\x0b\x32\x13.proto.cloud.Switch\x1a\x1e\n\nUpdateInfo\x12\x10\n\x08\x65rr_code\x18\x01 \x01(\r\x1a%\n\nWebTtyInfo\x12\x17\n\x0f\x63onnection_data\x18\x01 \x01(\tb\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'proto.cloud.debug_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _DEBUGREQUEST._serialized_start=67 + _DEBUGREQUEST._serialized_end=462 + _DEBUGREQUEST_FAULTREPORT._serialized_start=380 + _DEBUGREQUEST_FAULTREPORT._serialized_end=406 + _DEBUGREQUEST_IMAGEFEEDBACK._serialized_start=408 + _DEBUGREQUEST_IMAGEFEEDBACK._serialized_end=462 + _DEBUGRESPONSE._serialized_start=465 + _DEBUGRESPONSE._serialized_end=749 + _DEBUGRESPONSE_UPDATEINFO._serialized_start=680 + _DEBUGRESPONSE_UPDATEINFO._serialized_end=710 + _DEBUGRESPONSE_WEBTTYINFO._serialized_start=712 + _DEBUGRESPONSE_WEBTTYINFO._serialized_end=749 +# @@protoc_insertion_point(module_scope) diff --git a/proto-reference/debug_pb2.pyi b/proto-reference/debug_pb2.pyi new file mode 100644 index 0000000..1aa6d14 --- /dev/null +++ b/proto-reference/debug_pb2.pyi @@ -0,0 +1,61 @@ +from typing import ClassVar as _ClassVar +from typing import Mapping as _Mapping +from typing import Optional as _Optional +from typing import Union as _Union + +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message + +from ...proto.cloud import common_pb2 as _common_pb2 + +DESCRIPTOR: _descriptor.FileDescriptor + +class DebugRequest(_message.Message): + __slots__ = ["capture_sw", "fault_report", "image_feedback", "log_sw", "toggle_mop_raise", "toggle_mop_spin"] + class FaultReport(_message.Message): + __slots__ = ["seq"] + SEQ_FIELD_NUMBER: _ClassVar[int] + seq: int + def __init__(self, seq: _Optional[int] = ...) -> None: ... + class ImageFeedback(_message.Message): + __slots__ = ["object_type", "photo_id"] + OBJECT_TYPE_FIELD_NUMBER: _ClassVar[int] + PHOTO_ID_FIELD_NUMBER: _ClassVar[int] + object_type: str + photo_id: str + def __init__(self, object_type: _Optional[str] = ..., photo_id: _Optional[str] = ...) -> None: ... + CAPTURE_SW_FIELD_NUMBER: _ClassVar[int] + FAULT_REPORT_FIELD_NUMBER: _ClassVar[int] + IMAGE_FEEDBACK_FIELD_NUMBER: _ClassVar[int] + LOG_SW_FIELD_NUMBER: _ClassVar[int] + TOGGLE_MOP_RAISE_FIELD_NUMBER: _ClassVar[int] + TOGGLE_MOP_SPIN_FIELD_NUMBER: _ClassVar[int] + capture_sw: _common_pb2.Switch + fault_report: DebugRequest.FaultReport + image_feedback: DebugRequest.ImageFeedback + log_sw: _common_pb2.Switch + toggle_mop_raise: _common_pb2.Switch + toggle_mop_spin: _common_pb2.Switch + def __init__(self, log_sw: _Optional[_Union[_common_pb2.Switch, _Mapping]] = ..., fault_report: _Optional[_Union[DebugRequest.FaultReport, _Mapping]] = ..., capture_sw: _Optional[_Union[_common_pb2.Switch, _Mapping]] = ..., image_feedback: _Optional[_Union[DebugRequest.ImageFeedback, _Mapping]] = ..., toggle_mop_raise: _Optional[_Union[_common_pb2.Switch, _Mapping]] = ..., toggle_mop_spin: _Optional[_Union[_common_pb2.Switch, _Mapping]] = ...) -> None: ... + +class DebugResponse(_message.Message): + __slots__ = ["capture_sw", "log_sw", "update_info", "webtty_info"] + class UpdateInfo(_message.Message): + __slots__ = ["err_code"] + ERR_CODE_FIELD_NUMBER: _ClassVar[int] + err_code: int + def __init__(self, err_code: _Optional[int] = ...) -> None: ... + class WebTtyInfo(_message.Message): + __slots__ = ["connection_data"] + CONNECTION_DATA_FIELD_NUMBER: _ClassVar[int] + connection_data: str + def __init__(self, connection_data: _Optional[str] = ...) -> None: ... + CAPTURE_SW_FIELD_NUMBER: _ClassVar[int] + LOG_SW_FIELD_NUMBER: _ClassVar[int] + UPDATE_INFO_FIELD_NUMBER: _ClassVar[int] + WEBTTY_INFO_FIELD_NUMBER: _ClassVar[int] + capture_sw: _common_pb2.Switch + log_sw: _common_pb2.Switch + update_info: DebugResponse.UpdateInfo + webtty_info: DebugResponse.WebTtyInfo + def __init__(self, log_sw: _Optional[_Union[_common_pb2.Switch, _Mapping]] = ..., update_info: _Optional[_Union[DebugResponse.UpdateInfo, _Mapping]] = ..., webtty_info: _Optional[_Union[DebugResponse.WebTtyInfo, _Mapping]] = ..., capture_sw: _Optional[_Union[_common_pb2.Switch, _Mapping]] = ...) -> None: ... diff --git a/proto-reference/error_code.proto b/proto-reference/error_code.proto new file mode 100644 index 0000000..8b2864f --- /dev/null +++ b/proto-reference/error_code.proto @@ -0,0 +1,55 @@ +syntax = "proto3"; + +// option optimize_for = LITE_RUNTIME; + +package proto.cloud; + +import "proto/cloud/common.proto"; + +// 云端下发给机器 +message ErrorSetting { + repeated uint32 warn_mask = 1; // 警告码屏蔽,可多个 + repeated string obstacle_reminder_mask = 2; // obstacle_reminder 屏蔽,可多个 +} + +// 机器上报到云的错误警告码,包含云端下发的 mask 字段(二次触发需要清除相应的项),枚举来自 ErrorCodeList +message ErrorCode { + uint64 last_time = 1; // 当前时间,单位是纳秒,开机到现在的单调时间 CLOCK_MONOTONIC + + repeated uint32 error = 2; // 可多个 + repeated uint32 warn = 3; // 可多个 + ErrorSetting setting = 4; // 可多个 + + message NewCode { + repeated uint32 error = 1; // 新上报的错误码 + repeated uint32 warn = 2; // 新上报的警告码 + } + NewCode new_code = 10; + + message Battery { + bool restored = 1; // 电池恢复(换电池标志) + } + Battery battery = 11; + + message ObstacleReminder { + enum Type { + POOP = 0; + } + Type type = 1; + string photo_id = 2; + uint32 accuracy = 3; // 准确率,0~100,表示百分比(0 表示无效) + uint32 map_id = 4; + + oneof Description { + Point point = 5; + } + } + repeated ObstacleReminder obstacle_reminder = 12; +} + +// 方向:机器上报到云的提醒(手机 app 显示 toast),枚举来自 PromptCodeList +message PromptCode { + uint64 last_time = 1; // 当前时间,单位是纳秒,开机到现在的单调时间 CLOCK_MONOTONIC + + repeated uint32 value = 2; +} diff --git a/proto-reference/error_code_list_standard.proto b/proto-reference/error_code_list_standard.proto new file mode 100644 index 0000000..c1224c4 --- /dev/null +++ b/proto-reference/error_code_list_standard.proto @@ -0,0 +1,189 @@ +syntax = "proto3"; + +// option optimize_for = LITE_RUNTIME; + +package proto.cloud.std; + +enum ErrorCodeList { + E0000_NONE = 0; + + E1013_LEFT_WHEEL_OVERCURRENT = 1013; // 左轮过流 + E1023_RIGHT_WHEEL_OVERCURRENT = 1023; // 右轮过流 + E1033_LEFT_RIGHT_WHEEL_OVERCURRENT = 1033; // 左右轮过流 + E1010_LEFT_WHEEL_OPEN_CIRCUIT = 1010; // 左轮开路 + E1011_LEFT_WHEEL_SHORT_CIRCUIT = 1011; // 左轮短路 + E1012_LEFT_WHEEL_ABNORMAL = 1012; // 左轮异常(开短路无法区分) + E1020_RIGHT_WHEEL_OPEN_CIRCUIT = 1020; // 右轮开路 + E1021_RIGHT_WHEEL_SHORT_CIRCUIT = 1021; // 右轮短路 + E1022_RIGHT_WHEEL_ABNORMAL = 1022; // 右轮异常(开短路无法区分) + E1030_LEFT_RIGHT_WHEEL_OPEN_CIRCUIT = 1030; // 左右轮开路 + E1031_LEFT_RIGHT_WHEEL_SHORT_CIRCUIT = 1031; // 左右轮短路 + E1032_LEFT_RIGHT_WHEEL_ABNORMAL = 1032; // 左右轮异常(开短路无法区分) + E2013_SINGLE_FAN_ROTATION_ABNORMAL = 2013; // 单风机转数异常 + E2023_LEFT_FAN_ROTATION_ABNORMAL = 2023; // 左风机转数异常 + E2027_RIGHT_FAN_ROTATION_ABNORMAL = 2027; // 右风机转数异常 + E2010_SINGLE_FAN_OPEN_CIRCUIT = 2010; // 单风机开路 + E2011_SINGLE_FAN_SHORT_CIRCUIT = 2011; // 单风机短路 + E2012_SINGLE_FAN_ABNORMAL = 2012; // 单风机异常(开路或短路无法区分) + E2020_LEFT_FAN_OPEN_CIRCUIT = 2020; // 双风机-左风机开路 + E2021_LEFT_FAN_SHORT_CIRCUIT = 2021; // 双风机-左风机短路 + E2022_LEFT_FAN_ABNORMAL = 2022; // 双风机-左风机异常(开路或短路无法区分) + E2024_RIGHT_FAN_OPEN_CIRCUIT = 2024; // 双风机-右风机开路 + E2025_RIGHT_FAN_SHORT_CIRCUIT = 2025; // 双风机-右风机短路 + E2026_RIGHT_FAN_ABNORMAL = 2026; // 双风机-右风机异常(开路或短路无法区分) + E2112_SINGLE_BRUSH_OVERCURRENT = 2112; // 单滚刷过流 + E2122_DOUBLE_BRUSH_FRONT_OVERCURRENT = 2122; // 双滚刷-前过流 + E2125_DOUBLE_BRUSH_BACK_OVERCURRENT = 2125; // 双滚刷-后过流 + E2110_SINGLE_BRUSH_OPEN_CIRCUIT = 2110; // 单滚刷开路 + E2111_SINGLE_BRUSH_SHORT_CIRCUIT = 2111; // 单滚刷短路 + E2113_SINGLE_BRUSH_ABNORMAL = 2113; // 单滚刷异常(开路短路不能区分) + E2120_DOUBLE_BRUSH_FRONT_OPEN_CIRCUIT = 2120; // 双滚刷-前开路 + E2121_DOUBLE_BRUSH_FRONT_SHORT_CIRCUIT = 2121; // 双滚刷-前短路 + E2123_DOUBLE_BRUSH_BACK_OPEN_CIRCUIT = 2123; // 双滚刷-后开路 + E2124_DOUBLE_BRUSH_BACK_SHORT_CIRCUIT = 2124; // 双滚刷-后短路 + E2213_SINGLE_SIDE_BRUSH_OVERCURRENT = 2213; // 单边刷过流 + E2223_LEFT_SIDE_BRUSH_OVERCURRENT = 2223; // 左边刷过流 + E2227_RIGHT_SIDE_BRUSH_OVERCURRENT = 2227; // 右边刷过流 + E2210_SINGLE_SIDE_BRUSH_OPEN_CIRCUIT = 2210; // 单边刷开路 + E2211_SINGLE_SIDE_BRUSH_SHORT_CIRCUIT = 2211; // 单边刷短路 + E2212_SINGLE_SIDE_BRUSH_ABNORMAL = 2212; // 单边刷异常(开路或短路无法区分) + E2220_LEFT_SIDE_BRUSH_OPEN_CIRCUIT = 2220; // 左边刷开路 + E2221_LEFT_SIDE_BRUSH_SHORT_CIRCUIT = 2221; // 左边刷短路 + E2222_LEFT_SIDE_BRUSH_ABNORMAL = 2222; // 左边刷异常(开路或短路无法区分) + E2224_RIGHT_SIDE_BRUSH_OPEN_CIRCUIT = 2224; // 右边刷开路 + E2225_RIGHT_SIDE_BRUSH_SHORT_CIRCUIT = 2225; // 右边刷短路 + E2226_RIGHT_SIDE_BRUSH_ABNORMAL = 2226; // 右边刷异常(开路或短路无法区分) + E2310_DUSTBIN_NOT_INSTALLED = 2310; // 尘盒&滤网不在位 + E2311_DUSTBIN_INSTALLED_USE_TIME_EXCEEDS_10_HOURS = 2311; // 尘盒在位使用超过10小时提醒 + E3013_ROBOT_WATER_TANK_INSUFFICIENT = 3013; // 机器人水箱水量不足 + E3010_ROBOT_WATER_PUMP_OPEN_CIRCUIT = 3010; // 机器人水泵开路 + E3011_ROBOT_WATER_PUMP_SHORT_CIRCUIT = 3011; // 机器人水泵短路 + E3012_ROBOT_WATER_TANK_WATER_PUMP_ABNORMAL = 3012; // 机器人水箱水泵异常(开路或短路无法区分) + E3020_ROBOT_WATER_TANK_REMOVED_CANNOT_MOVE = 3020; // 机器人水箱移除,无法正常运动 + E3110_LEFT_MOP_NOT_INSTALLED = 3110; // 左边抹布不在位 + E3111_RIGHT_MOP_NOT_INSTALLED = 3111; // 右边抹布不在位 + E3123_ROTATING_MOTOR_JAMMED = 3123; // 旋转电机卡住 + E3133_LIFTING_MOTOR_JAMMED = 3133; // 升降电机卡住 + E3120_ROTATING_MOTOR_OPEN_CIRCUIT = 3120; // 旋转电机开路 + E3121_ROTATING_MOTOR_SHORT_CIRCUIT = 3121; // 旋转电机短路 + E3122_ROTATING_MOTOR_ABNORMAL = 3122; // 旋转电机异常(开路或短路无法区分) + E3130_LIFTING_MOTOR_OPEN_CIRCUIT = 3130; // 升降电机开路 + E3131_LIFTING_MOTOR_SHORT_CIRCUIT = 3131; // 升降电机短路 + E3132_LIFTING_MOTOR_ABNORMAL = 3132; // 升降电机异常(开路或短路无法区分) + E4012_RADAR_ROTATION_ABNORMAL = 4012; // 雷达转数异常 + E4011_RADAR_BLOCKED = 4011; // 雷达被遮挡 + E4010_RADAR_NO_SIGNAL_COMMUNICATION_POSSIBLY_DAMAGED = 4010; // 雷达无信号通讯(可能损坏) + E4020_GYROSCOPE_ABNORMAL = 4020; // 陀螺仪异常(开路或短路无法区分) + E4030_TOF_NO_SIGNAL_COMMUNICATION_POSSIBLY_DAMAGED = 4030; // Tof无信号通讯(可能损坏) + E4031_TOF_BLOCKED = 4031; // Tof被遮挡 + E4040_CAM_NO_SIGNAL_COMMUNICATION_POSSIBLY_DAMAGED = 4040; // Cam无信号通讯(可能损坏) + E4041_CAM_BLOCKED = 4041; // Cam被遮挡 + E4090_WALL_SENSOR_NO_SIGNAL_COMMUNICATION_POSSIBLY_DAMAGED = 4090; // 沿墙无信号通讯(可能损坏) + E4091_WALL_SENSOR_BLOCKED = 4091; // 沿墙被遮挡 + E4111_LEFT_FRONT_COLLISION_LONG_TRIGGER = 4111; // 左前撞长触发 + E4112_RIGHT_FRONT_COLLISION_LONG_TRIGGER = 4112; // 右前撞长触发 + E4120_ULTRASONIC_COMMUNICATION_INTERRUPTED_CLEANING_SCENE = 4120; // 超声通信中断(清洁场景) + E4121_ULTRASONIC_COMMUNICATION_INTERRUPTED_NON_CLEANING_SCENE = 4121; // 超声通信中断(非清洁场景) + E4130_LASER_SHIELD_LONG_TRIGGER = 4130; // 激光罩长触发 + E5012_BATTERY_CHARGING_CURRENT_TOO_SMALL = 5012; // 电池充电电流偏小 + E5010_BATTERY_OPEN_CIRCUIT = 5010; // 电池开路 + E5011_BATTERY_SHORT_CIRCUIT = 5011; // 电池短路 + E5013_BATTERY_DISCHARGE_CURRENT_TOO_LARGE = 5013; // 电池放电电流过大 + E5016_CHARGING_CURRENT_TOO_LARGE = 5016; // 充电电流过大 + E5017_CHARGING_VOLTAGE_ABNORMAL = 5017; // 充电电压异常 + E5018_BATTERY_TEMPERATURE_ABNORMAL = 5018; // 电池温度异常 + E5021_DISCHARGE_HIGH_TEMPERATURE = 5021; // 放电高温 + E5022_DISCHARGE_LOW_TEMPERATURE = 5022; // 放电低温 + E5023_CHARGING_HIGH_TEMPERATURE = 5023; // 充电高温 + E5024_CHARGING_LOW_TEMPERATURE = 5024; // 充电低温 + E5014_LOW_BATTERY_SHUTDOWN = 5014; // 电量低关机 + E5015_LOW_BATTERY_CANNOT_SCHEDULE_CLEANING = 5015; // 电量低不能预约清洁 + E5110_WIFI_ABNORMAL = 5110; // Wi-Fi异常 + E5111_BT_ABNORMAL = 5111; // BT异常 + E5112_INFRARED_COMMUNICATION_ABNORMAL = 5112; // 红外通讯异常 + E6010_CLEAN_WATER_TANK_NOT_INSTALLED = 6010; // 清水箱不在 + E6020_DIRTY_WATER_TANK_NOT_INSTALLED = 6020; // 污水箱不在 + E6025_DIRTY_WATER_TANK_ABNORMAL_FULL_OR_NOT_INSTALLED = 6025; // 污水箱异常(满或者不在位) + E6011_CLEAN_WATER_TANK_EMPTY = 6011; // 清水箱没水 + E6021_DIRTY_WATER_TANK_FULL = 6021; // 污水箱满 + E6012_CLEAN_WATER_PUMP_OPEN_CIRCUIT = 6012; // 清水泵开路 + E6013_CLEAN_WATER_PUMP_SHORT_CIRCUIT = 6013; // 清水泵短路 + E6014_THREE_WAY_VALVE_SHORT_CIRCUIT = 6014; // 三通阀短路 + E6022_DIRTY_WATER_PUMP_OPEN_CIRCUIT = 6022; // 污水泵开路 + E6023_DIRTY_WATER_PUMP_SHORT_CIRCUIT = 6023; // 污水泵短路 + E6024_DIRTY_WATER_TANK_NOT_CLOSED_TIGHTLY = 6024; // 污水箱未盖紧 + E6030_CLEANING_DISC_NOT_INSTALLED = 6030; // 清洗盘不在位 + E6031_CLEANING_DISC_WATER_FULL = 6031; // 清洗盘水满 + E6032_CLEANING_DISC_NOT_INSTALLED_OR_WATER_FULL = 6032; // 清洗盘不在位或者水满 + E6040_BLOWING_FAN_OPEN_CIRCUIT = 6040; // 吹干风扇开路 + E6041_BLOWING_FAN_SHORT_CIRCUIT = 6041; // 吹干风扇短路 + E6042_HEATING_MODULE_OPEN_CIRCUIT = 6042; // 加热模块开路 + E6043_NTC_OPEN_CIRCUIT = 6043; // NTC开路 + E6110_VOLTAGE_TRANSFORMER_DEGREE_ABNORMAL = 6110; // 电压互感器度数异常 + E6111_DUST_BIN_LEAKS_AIR = 6111; // 集尘漏风 + E6112_DUST_BIN_BLOCKED = 6112; // 集尘堵塞 + E6113_DUST_BAG_NOT_INSTALLED = 6113; // 未安装尘袋 + E6114_FAN_OVERHEATED = 6114; // 风机过热 + E6115_PRESSURE_GAUGE_ABNORMAL = 6115; // 气压计异常 + // E6300_HAIR_CLEANING_IN_PROGRESS = 6300; // 毛发清理中 + // E6301_LOW_BATTERY_CANNOT_START_HAIR_CUTTING = 6301; // 电量过低,无法启动毛发切割 + // E6310_POWER_FAILURE = 6310; // 断电 + E6311_HAIR_CUTTING_COMPONENT_ABNORMAL_OR_BLOCKED_CANNOT_START_WORK = 6311; // 割毛发组件异常或堵塞,无法启动工作 + E7000_SMALL_SPACE_TIMEOUT = 7000; // 小空间超时 + E7001_PART_OF_MACHINE_SUSPENDED = 7001; // 机器部分悬空 + E7004_MACHINE_STUCK = 7004; // 机器卡死 + E7002_MACHINE_PICKED_UP_EXCEEDING_3_GROUND_CHECKS_WHEEL_SUSPENDED = 7002; // 机器被抱起:超过3个地检判断轮子悬空 + E7003_STARTUP_FALLING_SUSPENDED = 7003; // 开机-跌落悬空 + E7010_ENTERED_FORBIDDEN_AREA = 7010; // 误入禁区 + E7011_ENTERED_CARPET = 7011; // 误入地毯 + // E7020_POSITIONING_FAILED_IN_GLOBAL_CLEANING = 7020; // 全局清洁时定位失败 + // E7021_POSITIONING_FAILED_IN_NON_GLOBAL_CLEANING = 7021; // 其他(非全局清洁)时定位失败 + E7031_RIDING_FAILURE = 7031; // 上座失败 + E7035_RIDING_FAILURE_BASE_STATION_NOT_POWERED_ON = 7035; // 上座失败(基站没通电) + E7036_RIDING_FAILURE_OMNIWHEEL_JAMMED = 7036; // 上座失败(万向轮卡住) + E7037_RIDING_FAILURE_INFRARED_REFLECTION = 7037; // 上座失败(红外反射) + E7033_EXPLORING_BASE_STATION_FAILURE_BASE_STATION_DEPARTURE = 7033; // 探索基站失败(基站出发) + E7034_CANNOT_FIND_STARTING_POINT = 7034; // 找不到起点 + E7040_DISMOUNT_FAILURE = 7040; // 下座失败 + // E7050_CANNOT_REACH = 7050; // 无法抵达 + // E7051_SCHEDULE_FAILURE = 7051; // 预约失败 + // E7052_PATH_PLANNING_FAILURE = 7052; // 路径规划失败 + E7053_MACHINE_TILTED = 7053; // 机器倾斜 + E7055_STATION_NOT_FOUND_CANNOT_MOP = 7055; // 未发现基站,无法加水洗拖布,清洁时只扫不拖 +} + +enum PromptCodeList { + P0000_NONE = 0; + + P0061_LOW_BATTERY_RECHARGE_NO_CLEAN = 61; // 低电回充(不继续清扫,断点续扫没开) + P0078_LOW_BATTERY_CANNOT_START_TASK = 78; // 电量不足无法启动任务 + P0065_LOW_BATTERY_30_PERCENT_NOT_ENOUGH = 65; // 电量不足,请充电至30%后再启动任务(30% 电量以下建图) + P0066_LOW_BATTERY_10_PERCENT_NOT_ENOUGH = 66; // 电量不足,请充电至10%后再启动任务(10% 电量以下清洁) + P0079_LOW_BATTERY_RECHARGE = 79; // 低电回充(会继续清扫,断点续扫打开) + P0083_CHILD_LOCK_ON_CANNOT_USE_POSITIONING = 83; // 童锁开,不可用(定点) + P0088_CHILD_LOCK_ON_CANNOT_USE_RECHARGE = 88; // 童锁开,不可用(回充) + P0024_NETWORK_PASSWORD_ERROR = 24; // 配网密码错误 + P0025_ROUTER_NOT_CONNECTED_TO_INTERNET = 25; // 路由器没有联网 + P0085_SCHEDULE_CLEAN_START = 85; // 预约清洁启动 + P0087_MAP_DATA_UPDATING_CANNOT_OPERATE = 87; // 地图数据更新中无法操作 + P0031_LOCATION_SUCCESS = 31; // 定位成功 + P0038_MOPPING_COMPLETED_IN_TASK = 38; // 任务中洗拖布完成 + P0039_MOPPING_COMPLETED_AFTER_TASK = 39; // 任务结束清洗拖布完成 + P0040_RETURN_TO_BASE_AFTER_TASK_COMPLETED = 40; // 任务完成返回基站 + P0045_TASK_COMPLETED = 45; // 任务完成 + P0076_CANNOT_EXECUTE_POSITIONING_RECHARGE_IN_BASE = 76; // 在基站无法执行定点/回充 + P0090_BASE_INSIDE_MOP_BUTTON_PRESSED = 90; // 基站内洗抹布点按键 + P0091_BASE_INSIDE_DUST_COLLECTING_BUTTON_PRESSED = 91; // 基站内集尘点按键 + + P6117_LOW_BATTERY_CANNOT_START_DUST_COLLECTION = 6117; // 电量低无法启动自动集尘 + P6118_LOW_BATTERY_CANNOT_START_ROLLING_BRUSH_SELF_CLEANING = 6118; // 电量低无法启动滚刷自清洁 + P6300_HAIR_CLEANING_IN_PROGRESS = 6300; // 毛发清理中 + P6301_LOW_BATTERY_CANNOT_START_HAIR_CUTTING = 6301; // 电量过低,无法启动毛发切割 + P6310_POWER_FAILURE = 6310; // 断电 + P7020_POSITIONING_FAILED_IN_GLOBAL_CLEANING = 7020; // 全局清洁时定位失败 + P7021_POSITIONING_FAILED_IN_NON_GLOBAL_CLEANING = 7021; // 其他(非全局清洁)时定位失败 + P7050_CANNOT_REACH = 7050; // 无法抵达 + P7051_SCHEDULE_FAILURE = 7051; // 预约失败 + P7052_PATH_PLANNING_FAILURE = 7052; // 路径规划失败 + P7054_TARGET_NOT_FOUND_STOP_FOLLOWING = 7054; // 智能跟随未发现目标自动退出 +} \ No newline at end of file diff --git a/proto-reference/error_code_list_standard_pb2.py b/proto-reference/error_code_list_standard_pb2.py new file mode 100644 index 0000000..371725a --- /dev/null +++ b/proto-reference/error_code_list_standard_pb2.py @@ -0,0 +1,27 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: proto/cloud/error_code_list_standard.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n*proto/cloud/error_code_list_standard.proto\x12\x0fproto.cloud.std*\xc4*\n\rErrorCodeList\x12\x0e\n\nE0000_NONE\x10\x00\x12!\n\x1c\x45\x31\x30\x31\x33_LEFT_WHEEL_OVERCURRENT\x10\xf5\x07\x12\"\n\x1d\x45\x31\x30\x32\x33_RIGHT_WHEEL_OVERCURRENT\x10\xff\x07\x12\'\n\"E1033_LEFT_RIGHT_WHEEL_OVERCURRENT\x10\x89\x08\x12\"\n\x1d\x45\x31\x30\x31\x30_LEFT_WHEEL_OPEN_CIRCUIT\x10\xf2\x07\x12#\n\x1e\x45\x31\x30\x31\x31_LEFT_WHEEL_SHORT_CIRCUIT\x10\xf3\x07\x12\x1e\n\x19\x45\x31\x30\x31\x32_LEFT_WHEEL_ABNORMAL\x10\xf4\x07\x12#\n\x1e\x45\x31\x30\x32\x30_RIGHT_WHEEL_OPEN_CIRCUIT\x10\xfc\x07\x12$\n\x1f\x45\x31\x30\x32\x31_RIGHT_WHEEL_SHORT_CIRCUIT\x10\xfd\x07\x12\x1f\n\x1a\x45\x31\x30\x32\x32_RIGHT_WHEEL_ABNORMAL\x10\xfe\x07\x12(\n#E1030_LEFT_RIGHT_WHEEL_OPEN_CIRCUIT\x10\x86\x08\x12)\n$E1031_LEFT_RIGHT_WHEEL_SHORT_CIRCUIT\x10\x87\x08\x12$\n\x1f\x45\x31\x30\x33\x32_LEFT_RIGHT_WHEEL_ABNORMAL\x10\x88\x08\x12\'\n\"E2013_SINGLE_FAN_ROTATION_ABNORMAL\x10\xdd\x0f\x12%\n E2023_LEFT_FAN_ROTATION_ABNORMAL\x10\xe7\x0f\x12&\n!E2027_RIGHT_FAN_ROTATION_ABNORMAL\x10\xeb\x0f\x12\"\n\x1d\x45\x32\x30\x31\x30_SINGLE_FAN_OPEN_CIRCUIT\x10\xda\x0f\x12#\n\x1e\x45\x32\x30\x31\x31_SINGLE_FAN_SHORT_CIRCUIT\x10\xdb\x0f\x12\x1e\n\x19\x45\x32\x30\x31\x32_SINGLE_FAN_ABNORMAL\x10\xdc\x0f\x12 \n\x1b\x45\x32\x30\x32\x30_LEFT_FAN_OPEN_CIRCUIT\x10\xe4\x0f\x12!\n\x1c\x45\x32\x30\x32\x31_LEFT_FAN_SHORT_CIRCUIT\x10\xe5\x0f\x12\x1c\n\x17\x45\x32\x30\x32\x32_LEFT_FAN_ABNORMAL\x10\xe6\x0f\x12!\n\x1c\x45\x32\x30\x32\x34_RIGHT_FAN_OPEN_CIRCUIT\x10\xe8\x0f\x12\"\n\x1d\x45\x32\x30\x32\x35_RIGHT_FAN_SHORT_CIRCUIT\x10\xe9\x0f\x12\x1d\n\x18\x45\x32\x30\x32\x36_RIGHT_FAN_ABNORMAL\x10\xea\x0f\x12#\n\x1e\x45\x32\x31\x31\x32_SINGLE_BRUSH_OVERCURRENT\x10\xc0\x10\x12)\n$E2122_DOUBLE_BRUSH_FRONT_OVERCURRENT\x10\xca\x10\x12(\n#E2125_DOUBLE_BRUSH_BACK_OVERCURRENT\x10\xcd\x10\x12$\n\x1f\x45\x32\x31\x31\x30_SINGLE_BRUSH_OPEN_CIRCUIT\x10\xbe\x10\x12%\n E2111_SINGLE_BRUSH_SHORT_CIRCUIT\x10\xbf\x10\x12 \n\x1b\x45\x32\x31\x31\x33_SINGLE_BRUSH_ABNORMAL\x10\xc1\x10\x12*\n%E2120_DOUBLE_BRUSH_FRONT_OPEN_CIRCUIT\x10\xc8\x10\x12+\n&E2121_DOUBLE_BRUSH_FRONT_SHORT_CIRCUIT\x10\xc9\x10\x12)\n$E2123_DOUBLE_BRUSH_BACK_OPEN_CIRCUIT\x10\xcb\x10\x12*\n%E2124_DOUBLE_BRUSH_BACK_SHORT_CIRCUIT\x10\xcc\x10\x12(\n#E2213_SINGLE_SIDE_BRUSH_OVERCURRENT\x10\xa5\x11\x12&\n!E2223_LEFT_SIDE_BRUSH_OVERCURRENT\x10\xaf\x11\x12\'\n\"E2227_RIGHT_SIDE_BRUSH_OVERCURRENT\x10\xb3\x11\x12)\n$E2210_SINGLE_SIDE_BRUSH_OPEN_CIRCUIT\x10\xa2\x11\x12*\n%E2211_SINGLE_SIDE_BRUSH_SHORT_CIRCUIT\x10\xa3\x11\x12%\n E2212_SINGLE_SIDE_BRUSH_ABNORMAL\x10\xa4\x11\x12\'\n\"E2220_LEFT_SIDE_BRUSH_OPEN_CIRCUIT\x10\xac\x11\x12(\n#E2221_LEFT_SIDE_BRUSH_SHORT_CIRCUIT\x10\xad\x11\x12#\n\x1e\x45\x32\x32\x32\x32_LEFT_SIDE_BRUSH_ABNORMAL\x10\xae\x11\x12(\n#E2224_RIGHT_SIDE_BRUSH_OPEN_CIRCUIT\x10\xb0\x11\x12)\n$E2225_RIGHT_SIDE_BRUSH_SHORT_CIRCUIT\x10\xb1\x11\x12$\n\x1f\x45\x32\x32\x32\x36_RIGHT_SIDE_BRUSH_ABNORMAL\x10\xb2\x11\x12 \n\x1b\x45\x32\x33\x31\x30_DUSTBIN_NOT_INSTALLED\x10\x86\x12\x12\x36\n1E2311_DUSTBIN_INSTALLED_USE_TIME_EXCEEDS_10_HOURS\x10\x87\x12\x12(\n#E3013_ROBOT_WATER_TANK_INSUFFICIENT\x10\xc5\x17\x12(\n#E3010_ROBOT_WATER_PUMP_OPEN_CIRCUIT\x10\xc2\x17\x12)\n$E3011_ROBOT_WATER_PUMP_SHORT_CIRCUIT\x10\xc3\x17\x12/\n*E3012_ROBOT_WATER_TANK_WATER_PUMP_ABNORMAL\x10\xc4\x17\x12/\n*E3020_ROBOT_WATER_TANK_REMOVED_CANNOT_MOVE\x10\xcc\x17\x12!\n\x1c\x45\x33\x31\x31\x30_LEFT_MOP_NOT_INSTALLED\x10\xa6\x18\x12\"\n\x1d\x45\x33\x31\x31\x31_RIGHT_MOP_NOT_INSTALLED\x10\xa7\x18\x12 \n\x1b\x45\x33\x31\x32\x33_ROTATING_MOTOR_JAMMED\x10\xb3\x18\x12\x1f\n\x1a\x45\x33\x31\x33\x33_LIFTING_MOTOR_JAMMED\x10\xbd\x18\x12&\n!E3120_ROTATING_MOTOR_OPEN_CIRCUIT\x10\xb0\x18\x12\'\n\"E3121_ROTATING_MOTOR_SHORT_CIRCUIT\x10\xb1\x18\x12\"\n\x1d\x45\x33\x31\x32\x32_ROTATING_MOTOR_ABNORMAL\x10\xb2\x18\x12%\n E3130_LIFTING_MOTOR_OPEN_CIRCUIT\x10\xba\x18\x12&\n!E3131_LIFTING_MOTOR_SHORT_CIRCUIT\x10\xbb\x18\x12!\n\x1c\x45\x33\x31\x33\x32_LIFTING_MOTOR_ABNORMAL\x10\xbc\x18\x12\"\n\x1d\x45\x34\x30\x31\x32_RADAR_ROTATION_ABNORMAL\x10\xac\x1f\x12\x18\n\x13\x45\x34\x30\x31\x31_RADAR_BLOCKED\x10\xab\x1f\x12\x39\n4E4010_RADAR_NO_SIGNAL_COMMUNICATION_POSSIBLY_DAMAGED\x10\xaa\x1f\x12\x1d\n\x18\x45\x34\x30\x32\x30_GYROSCOPE_ABNORMAL\x10\xb4\x1f\x12\x37\n2E4030_TOF_NO_SIGNAL_COMMUNICATION_POSSIBLY_DAMAGED\x10\xbe\x1f\x12\x16\n\x11\x45\x34\x30\x33\x31_TOF_BLOCKED\x10\xbf\x1f\x12\x37\n2E4040_CAM_NO_SIGNAL_COMMUNICATION_POSSIBLY_DAMAGED\x10\xc8\x1f\x12\x16\n\x11\x45\x34\x30\x34\x31_CAM_BLOCKED\x10\xc9\x1f\x12?\n:E4090_WALL_SENSOR_NO_SIGNAL_COMMUNICATION_POSSIBLY_DAMAGED\x10\xfa\x1f\x12\x1e\n\x19\x45\x34\x30\x39\x31_WALL_SENSOR_BLOCKED\x10\xfb\x1f\x12,\n\'E4111_LEFT_FRONT_COLLISION_LONG_TRIGGER\x10\x8f \x12-\n(E4112_RIGHT_FRONT_COLLISION_LONG_TRIGGER\x10\x90 \x12>\n9E4120_ULTRASONIC_COMMUNICATION_INTERRUPTED_CLEANING_SCENE\x10\x98 \x12\x42\n=E4121_ULTRASONIC_COMMUNICATION_INTERRUPTED_NON_CLEANING_SCENE\x10\x99 \x12$\n\x1f\x45\x34\x31\x33\x30_LASER_SHIELD_LONG_TRIGGER\x10\xa2 \x12-\n(E5012_BATTERY_CHARGING_CURRENT_TOO_SMALL\x10\x94\'\x12\x1f\n\x1a\x45\x35\x30\x31\x30_BATTERY_OPEN_CIRCUIT\x10\x92\'\x12 \n\x1b\x45\x35\x30\x31\x31_BATTERY_SHORT_CIRCUIT\x10\x93\'\x12.\n)E5013_BATTERY_DISCHARGE_CURRENT_TOO_LARGE\x10\x95\'\x12%\n E5016_CHARGING_CURRENT_TOO_LARGE\x10\x98\'\x12$\n\x1f\x45\x35\x30\x31\x37_CHARGING_VOLTAGE_ABNORMAL\x10\x99\'\x12\'\n\"E5018_BATTERY_TEMPERATURE_ABNORMAL\x10\x9a\'\x12%\n E5021_DISCHARGE_HIGH_TEMPERATURE\x10\x9d\'\x12$\n\x1f\x45\x35\x30\x32\x32_DISCHARGE_LOW_TEMPERATURE\x10\x9e\'\x12$\n\x1f\x45\x35\x30\x32\x33_CHARGING_HIGH_TEMPERATURE\x10\x9f\'\x12#\n\x1e\x45\x35\x30\x32\x34_CHARGING_LOW_TEMPERATURE\x10\xa0\'\x12\x1f\n\x1a\x45\x35\x30\x31\x34_LOW_BATTERY_SHUTDOWN\x10\x96\'\x12/\n*E5015_LOW_BATTERY_CANNOT_SCHEDULE_CLEANING\x10\x97\'\x12\x18\n\x13\x45\x35\x31\x31\x30_WIFI_ABNORMAL\x10\xf6\'\x12\x16\n\x11\x45\x35\x31\x31\x31_BT_ABNORMAL\x10\xf7\'\x12*\n%E5112_INFRARED_COMMUNICATION_ABNORMAL\x10\xf8\'\x12)\n$E6010_CLEAN_WATER_TANK_NOT_INSTALLED\x10\xfa.\x12)\n$E6020_DIRTY_WATER_TANK_NOT_INSTALLED\x10\x84/\x12:\n5E6025_DIRTY_WATER_TANK_ABNORMAL_FULL_OR_NOT_INSTALLED\x10\x89/\x12!\n\x1c\x45\x36\x30\x31\x31_CLEAN_WATER_TANK_EMPTY\x10\xfb.\x12 \n\x1b\x45\x36\x30\x32\x31_DIRTY_WATER_TANK_FULL\x10\x85/\x12(\n#E6012_CLEAN_WATER_PUMP_OPEN_CIRCUIT\x10\xfc.\x12)\n$E6013_CLEAN_WATER_PUMP_SHORT_CIRCUIT\x10\xfd.\x12(\n#E6014_THREE_WAY_VALVE_SHORT_CIRCUIT\x10\xfe.\x12(\n#E6022_DIRTY_WATER_PUMP_OPEN_CIRCUIT\x10\x86/\x12)\n$E6023_DIRTY_WATER_PUMP_SHORT_CIRCUIT\x10\x87/\x12.\n)E6024_DIRTY_WATER_TANK_NOT_CLOSED_TIGHTLY\x10\x88/\x12&\n!E6030_CLEANING_DISC_NOT_INSTALLED\x10\x8e/\x12#\n\x1e\x45\x36\x30\x33\x31_CLEANING_DISC_WATER_FULL\x10\x8f/\x12\x34\n/E6032_CLEANING_DISC_NOT_INSTALLED_OR_WATER_FULL\x10\x90/\x12#\n\x1e\x45\x36\x30\x34\x30_BLOWING_FAN_OPEN_CIRCUIT\x10\x98/\x12$\n\x1f\x45\x36\x30\x34\x31_BLOWING_FAN_SHORT_CIRCUIT\x10\x99/\x12&\n!E6042_HEATING_MODULE_OPEN_CIRCUIT\x10\x9a/\x12\x1b\n\x16\x45\x36\x30\x34\x33_NTC_OPEN_CIRCUIT\x10\x9b/\x12.\n)E6110_VOLTAGE_TRANSFORMER_DEGREE_ABNORMAL\x10\xde/\x12\x1d\n\x18\x45\x36\x31\x31\x31_DUST_BIN_LEAKS_AIR\x10\xdf/\x12\x1b\n\x16\x45\x36\x31\x31\x32_DUST_BIN_BLOCKED\x10\xe0/\x12!\n\x1c\x45\x36\x31\x31\x33_DUST_BAG_NOT_INSTALLED\x10\xe1/\x12\x19\n\x14\x45\x36\x31\x31\x34_FAN_OVERHEATED\x10\xe2/\x12\"\n\x1d\x45\x36\x31\x31\x35_PRESSURE_GAUGE_ABNORMAL\x10\xe3/\x12G\nBE6311_HAIR_CUTTING_COMPONENT_ABNORMAL_OR_BLOCKED_CANNOT_START_WORK\x10\xa7\x31\x12\x1e\n\x19\x45\x37\x30\x30\x30_SMALL_SPACE_TIMEOUT\x10\xd8\x36\x12$\n\x1f\x45\x37\x30\x30\x31_PART_OF_MACHINE_SUSPENDED\x10\xd9\x36\x12\x18\n\x13\x45\x37\x30\x30\x34_MACHINE_STUCK\x10\xdc\x36\x12\x46\nAE7002_MACHINE_PICKED_UP_EXCEEDING_3_GROUND_CHECKS_WHEEL_SUSPENDED\x10\xda\x36\x12$\n\x1f\x45\x37\x30\x30\x33_STARTUP_FALLING_SUSPENDED\x10\xdb\x36\x12!\n\x1c\x45\x37\x30\x31\x30_ENTERED_FORBIDDEN_AREA\x10\xe2\x36\x12\x19\n\x14\x45\x37\x30\x31\x31_ENTERED_CARPET\x10\xe3\x36\x12\x19\n\x14\x45\x37\x30\x33\x31_RIDING_FAILURE\x10\xf7\x36\x12\x35\n0E7035_RIDING_FAILURE_BASE_STATION_NOT_POWERED_ON\x10\xfb\x36\x12*\n%E7036_RIDING_FAILURE_OMNIWHEEL_JAMMED\x10\xfc\x36\x12-\n(E7037_RIDING_FAILURE_INFRARED_REFLECTION\x10\xfd\x36\x12@\n;E7033_EXPLORING_BASE_STATION_FAILURE_BASE_STATION_DEPARTURE\x10\xf9\x36\x12%\n E7034_CANNOT_FIND_STARTING_POINT\x10\xfa\x36\x12\x1b\n\x16\x45\x37\x30\x34\x30_DISMOUNT_FAILURE\x10\x80\x37\x12\x19\n\x14\x45\x37\x30\x35\x33_MACHINE_TILTED\x10\x8d\x37\x12\'\n\"E7055_STATION_NOT_FOUND_CANNOT_MOP\x10\x8f\x37*\x80\n\n\x0ePromptCodeList\x12\x0e\n\nP0000_NONE\x10\x00\x12\'\n#P0061_LOW_BATTERY_RECHARGE_NO_CLEAN\x10=\x12\'\n#P0078_LOW_BATTERY_CANNOT_START_TASK\x10N\x12+\n\'P0065_LOW_BATTERY_30_PERCENT_NOT_ENOUGH\x10\x41\x12+\n\'P0066_LOW_BATTERY_10_PERCENT_NOT_ENOUGH\x10\x42\x12\x1e\n\x1aP0079_LOW_BATTERY_RECHARGE\x10O\x12.\n*P0083_CHILD_LOCK_ON_CANNOT_USE_POSITIONING\x10S\x12+\n\'P0088_CHILD_LOCK_ON_CANNOT_USE_RECHARGE\x10X\x12 \n\x1cP0024_NETWORK_PASSWORD_ERROR\x10\x18\x12*\n&P0025_ROUTER_NOT_CONNECTED_TO_INTERNET\x10\x19\x12\x1e\n\x1aP0085_SCHEDULE_CLEAN_START\x10U\x12*\n&P0087_MAP_DATA_UPDATING_CANNOT_OPERATE\x10W\x12\x1a\n\x16P0031_LOCATION_SUCCESS\x10\x1f\x12#\n\x1fP0038_MOPPING_COMPLETED_IN_TASK\x10&\x12&\n\"P0039_MOPPING_COMPLETED_AFTER_TASK\x10\'\x12-\n)P0040_RETURN_TO_BASE_AFTER_TASK_COMPLETED\x10(\x12\x18\n\x14P0045_TASK_COMPLETED\x10-\x12\x35\n1P0076_CANNOT_EXECUTE_POSITIONING_RECHARGE_IN_BASE\x10L\x12(\n$P0090_BASE_INSIDE_MOP_BUTTON_PRESSED\x10Z\x12\x34\n0P0091_BASE_INSIDE_DUST_COLLECTING_BUTTON_PRESSED\x10[\x12\x33\n.P6117_LOW_BATTERY_CANNOT_START_DUST_COLLECTION\x10\xe5/\x12?\n:P6118_LOW_BATTERY_CANNOT_START_ROLLING_BRUSH_SELF_CLEANING\x10\xe6/\x12$\n\x1fP6300_HAIR_CLEANING_IN_PROGRESS\x10\x9c\x31\x12\x30\n+P6301_LOW_BATTERY_CANNOT_START_HAIR_CUTTING\x10\x9d\x31\x12\x18\n\x13P6310_POWER_FAILURE\x10\xa6\x31\x12\x30\n+P7020_POSITIONING_FAILED_IN_GLOBAL_CLEANING\x10\xec\x36\x12\x34\n/P7021_POSITIONING_FAILED_IN_NON_GLOBAL_CLEANING\x10\xed\x36\x12\x17\n\x12P7050_CANNOT_REACH\x10\x8a\x37\x12\x1b\n\x16P7051_SCHEDULE_FAILURE\x10\x8b\x37\x12 \n\x1bP7052_PATH_PLANNING_FAILURE\x10\x8c\x37\x12*\n%P7054_TARGET_NOT_FOUND_STOP_FOLLOWING\x10\x8e\x37\x62\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'proto.cloud.error_code_list_standard_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _ERRORCODELIST._serialized_start=64 + _ERRORCODELIST._serialized_end=5508 + _PROMPTCODELIST._serialized_start=5511 + _PROMPTCODELIST._serialized_end=6791 +# @@protoc_insertion_point(module_scope) diff --git a/proto-reference/error_code_list_standard_pb2.pyi b/proto-reference/error_code_list_standard_pb2.pyi new file mode 100644 index 0000000..7c85a76 --- /dev/null +++ b/proto-reference/error_code_list_standard_pb2.pyi @@ -0,0 +1,178 @@ +from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper +from google.protobuf import descriptor as _descriptor +from typing import ClassVar as _ClassVar + +DESCRIPTOR: _descriptor.FileDescriptor +E0000_NONE: ErrorCodeList +E1010_LEFT_WHEEL_OPEN_CIRCUIT: ErrorCodeList +E1011_LEFT_WHEEL_SHORT_CIRCUIT: ErrorCodeList +E1012_LEFT_WHEEL_ABNORMAL: ErrorCodeList +E1013_LEFT_WHEEL_OVERCURRENT: ErrorCodeList +E1020_RIGHT_WHEEL_OPEN_CIRCUIT: ErrorCodeList +E1021_RIGHT_WHEEL_SHORT_CIRCUIT: ErrorCodeList +E1022_RIGHT_WHEEL_ABNORMAL: ErrorCodeList +E1023_RIGHT_WHEEL_OVERCURRENT: ErrorCodeList +E1030_LEFT_RIGHT_WHEEL_OPEN_CIRCUIT: ErrorCodeList +E1031_LEFT_RIGHT_WHEEL_SHORT_CIRCUIT: ErrorCodeList +E1032_LEFT_RIGHT_WHEEL_ABNORMAL: ErrorCodeList +E1033_LEFT_RIGHT_WHEEL_OVERCURRENT: ErrorCodeList +E2010_SINGLE_FAN_OPEN_CIRCUIT: ErrorCodeList +E2011_SINGLE_FAN_SHORT_CIRCUIT: ErrorCodeList +E2012_SINGLE_FAN_ABNORMAL: ErrorCodeList +E2013_SINGLE_FAN_ROTATION_ABNORMAL: ErrorCodeList +E2020_LEFT_FAN_OPEN_CIRCUIT: ErrorCodeList +E2021_LEFT_FAN_SHORT_CIRCUIT: ErrorCodeList +E2022_LEFT_FAN_ABNORMAL: ErrorCodeList +E2023_LEFT_FAN_ROTATION_ABNORMAL: ErrorCodeList +E2024_RIGHT_FAN_OPEN_CIRCUIT: ErrorCodeList +E2025_RIGHT_FAN_SHORT_CIRCUIT: ErrorCodeList +E2026_RIGHT_FAN_ABNORMAL: ErrorCodeList +E2027_RIGHT_FAN_ROTATION_ABNORMAL: ErrorCodeList +E2110_SINGLE_BRUSH_OPEN_CIRCUIT: ErrorCodeList +E2111_SINGLE_BRUSH_SHORT_CIRCUIT: ErrorCodeList +E2112_SINGLE_BRUSH_OVERCURRENT: ErrorCodeList +E2113_SINGLE_BRUSH_ABNORMAL: ErrorCodeList +E2120_DOUBLE_BRUSH_FRONT_OPEN_CIRCUIT: ErrorCodeList +E2121_DOUBLE_BRUSH_FRONT_SHORT_CIRCUIT: ErrorCodeList +E2122_DOUBLE_BRUSH_FRONT_OVERCURRENT: ErrorCodeList +E2123_DOUBLE_BRUSH_BACK_OPEN_CIRCUIT: ErrorCodeList +E2124_DOUBLE_BRUSH_BACK_SHORT_CIRCUIT: ErrorCodeList +E2125_DOUBLE_BRUSH_BACK_OVERCURRENT: ErrorCodeList +E2210_SINGLE_SIDE_BRUSH_OPEN_CIRCUIT: ErrorCodeList +E2211_SINGLE_SIDE_BRUSH_SHORT_CIRCUIT: ErrorCodeList +E2212_SINGLE_SIDE_BRUSH_ABNORMAL: ErrorCodeList +E2213_SINGLE_SIDE_BRUSH_OVERCURRENT: ErrorCodeList +E2220_LEFT_SIDE_BRUSH_OPEN_CIRCUIT: ErrorCodeList +E2221_LEFT_SIDE_BRUSH_SHORT_CIRCUIT: ErrorCodeList +E2222_LEFT_SIDE_BRUSH_ABNORMAL: ErrorCodeList +E2223_LEFT_SIDE_BRUSH_OVERCURRENT: ErrorCodeList +E2224_RIGHT_SIDE_BRUSH_OPEN_CIRCUIT: ErrorCodeList +E2225_RIGHT_SIDE_BRUSH_SHORT_CIRCUIT: ErrorCodeList +E2226_RIGHT_SIDE_BRUSH_ABNORMAL: ErrorCodeList +E2227_RIGHT_SIDE_BRUSH_OVERCURRENT: ErrorCodeList +E2310_DUSTBIN_NOT_INSTALLED: ErrorCodeList +E2311_DUSTBIN_INSTALLED_USE_TIME_EXCEEDS_10_HOURS: ErrorCodeList +E3010_ROBOT_WATER_PUMP_OPEN_CIRCUIT: ErrorCodeList +E3011_ROBOT_WATER_PUMP_SHORT_CIRCUIT: ErrorCodeList +E3012_ROBOT_WATER_TANK_WATER_PUMP_ABNORMAL: ErrorCodeList +E3013_ROBOT_WATER_TANK_INSUFFICIENT: ErrorCodeList +E3020_ROBOT_WATER_TANK_REMOVED_CANNOT_MOVE: ErrorCodeList +E3110_LEFT_MOP_NOT_INSTALLED: ErrorCodeList +E3111_RIGHT_MOP_NOT_INSTALLED: ErrorCodeList +E3120_ROTATING_MOTOR_OPEN_CIRCUIT: ErrorCodeList +E3121_ROTATING_MOTOR_SHORT_CIRCUIT: ErrorCodeList +E3122_ROTATING_MOTOR_ABNORMAL: ErrorCodeList +E3123_ROTATING_MOTOR_JAMMED: ErrorCodeList +E3130_LIFTING_MOTOR_OPEN_CIRCUIT: ErrorCodeList +E3131_LIFTING_MOTOR_SHORT_CIRCUIT: ErrorCodeList +E3132_LIFTING_MOTOR_ABNORMAL: ErrorCodeList +E3133_LIFTING_MOTOR_JAMMED: ErrorCodeList +E4010_RADAR_NO_SIGNAL_COMMUNICATION_POSSIBLY_DAMAGED: ErrorCodeList +E4011_RADAR_BLOCKED: ErrorCodeList +E4012_RADAR_ROTATION_ABNORMAL: ErrorCodeList +E4020_GYROSCOPE_ABNORMAL: ErrorCodeList +E4030_TOF_NO_SIGNAL_COMMUNICATION_POSSIBLY_DAMAGED: ErrorCodeList +E4031_TOF_BLOCKED: ErrorCodeList +E4040_CAM_NO_SIGNAL_COMMUNICATION_POSSIBLY_DAMAGED: ErrorCodeList +E4041_CAM_BLOCKED: ErrorCodeList +E4090_WALL_SENSOR_NO_SIGNAL_COMMUNICATION_POSSIBLY_DAMAGED: ErrorCodeList +E4091_WALL_SENSOR_BLOCKED: ErrorCodeList +E4111_LEFT_FRONT_COLLISION_LONG_TRIGGER: ErrorCodeList +E4112_RIGHT_FRONT_COLLISION_LONG_TRIGGER: ErrorCodeList +E4120_ULTRASONIC_COMMUNICATION_INTERRUPTED_CLEANING_SCENE: ErrorCodeList +E4121_ULTRASONIC_COMMUNICATION_INTERRUPTED_NON_CLEANING_SCENE: ErrorCodeList +E4130_LASER_SHIELD_LONG_TRIGGER: ErrorCodeList +E5010_BATTERY_OPEN_CIRCUIT: ErrorCodeList +E5011_BATTERY_SHORT_CIRCUIT: ErrorCodeList +E5012_BATTERY_CHARGING_CURRENT_TOO_SMALL: ErrorCodeList +E5013_BATTERY_DISCHARGE_CURRENT_TOO_LARGE: ErrorCodeList +E5014_LOW_BATTERY_SHUTDOWN: ErrorCodeList +E5015_LOW_BATTERY_CANNOT_SCHEDULE_CLEANING: ErrorCodeList +E5016_CHARGING_CURRENT_TOO_LARGE: ErrorCodeList +E5017_CHARGING_VOLTAGE_ABNORMAL: ErrorCodeList +E5018_BATTERY_TEMPERATURE_ABNORMAL: ErrorCodeList +E5021_DISCHARGE_HIGH_TEMPERATURE: ErrorCodeList +E5022_DISCHARGE_LOW_TEMPERATURE: ErrorCodeList +E5023_CHARGING_HIGH_TEMPERATURE: ErrorCodeList +E5024_CHARGING_LOW_TEMPERATURE: ErrorCodeList +E5110_WIFI_ABNORMAL: ErrorCodeList +E5111_BT_ABNORMAL: ErrorCodeList +E5112_INFRARED_COMMUNICATION_ABNORMAL: ErrorCodeList +E6010_CLEAN_WATER_TANK_NOT_INSTALLED: ErrorCodeList +E6011_CLEAN_WATER_TANK_EMPTY: ErrorCodeList +E6012_CLEAN_WATER_PUMP_OPEN_CIRCUIT: ErrorCodeList +E6013_CLEAN_WATER_PUMP_SHORT_CIRCUIT: ErrorCodeList +E6014_THREE_WAY_VALVE_SHORT_CIRCUIT: ErrorCodeList +E6020_DIRTY_WATER_TANK_NOT_INSTALLED: ErrorCodeList +E6021_DIRTY_WATER_TANK_FULL: ErrorCodeList +E6022_DIRTY_WATER_PUMP_OPEN_CIRCUIT: ErrorCodeList +E6023_DIRTY_WATER_PUMP_SHORT_CIRCUIT: ErrorCodeList +E6024_DIRTY_WATER_TANK_NOT_CLOSED_TIGHTLY: ErrorCodeList +E6025_DIRTY_WATER_TANK_ABNORMAL_FULL_OR_NOT_INSTALLED: ErrorCodeList +E6030_CLEANING_DISC_NOT_INSTALLED: ErrorCodeList +E6031_CLEANING_DISC_WATER_FULL: ErrorCodeList +E6032_CLEANING_DISC_NOT_INSTALLED_OR_WATER_FULL: ErrorCodeList +E6040_BLOWING_FAN_OPEN_CIRCUIT: ErrorCodeList +E6041_BLOWING_FAN_SHORT_CIRCUIT: ErrorCodeList +E6042_HEATING_MODULE_OPEN_CIRCUIT: ErrorCodeList +E6043_NTC_OPEN_CIRCUIT: ErrorCodeList +E6110_VOLTAGE_TRANSFORMER_DEGREE_ABNORMAL: ErrorCodeList +E6111_DUST_BIN_LEAKS_AIR: ErrorCodeList +E6112_DUST_BIN_BLOCKED: ErrorCodeList +E6113_DUST_BAG_NOT_INSTALLED: ErrorCodeList +E6114_FAN_OVERHEATED: ErrorCodeList +E6115_PRESSURE_GAUGE_ABNORMAL: ErrorCodeList +E6311_HAIR_CUTTING_COMPONENT_ABNORMAL_OR_BLOCKED_CANNOT_START_WORK: ErrorCodeList +E7000_SMALL_SPACE_TIMEOUT: ErrorCodeList +E7001_PART_OF_MACHINE_SUSPENDED: ErrorCodeList +E7002_MACHINE_PICKED_UP_EXCEEDING_3_GROUND_CHECKS_WHEEL_SUSPENDED: ErrorCodeList +E7003_STARTUP_FALLING_SUSPENDED: ErrorCodeList +E7004_MACHINE_STUCK: ErrorCodeList +E7010_ENTERED_FORBIDDEN_AREA: ErrorCodeList +E7011_ENTERED_CARPET: ErrorCodeList +E7031_RIDING_FAILURE: ErrorCodeList +E7033_EXPLORING_BASE_STATION_FAILURE_BASE_STATION_DEPARTURE: ErrorCodeList +E7034_CANNOT_FIND_STARTING_POINT: ErrorCodeList +E7035_RIDING_FAILURE_BASE_STATION_NOT_POWERED_ON: ErrorCodeList +E7036_RIDING_FAILURE_OMNIWHEEL_JAMMED: ErrorCodeList +E7037_RIDING_FAILURE_INFRARED_REFLECTION: ErrorCodeList +E7040_DISMOUNT_FAILURE: ErrorCodeList +E7053_MACHINE_TILTED: ErrorCodeList +E7055_STATION_NOT_FOUND_CANNOT_MOP: ErrorCodeList +P0000_NONE: PromptCodeList +P0024_NETWORK_PASSWORD_ERROR: PromptCodeList +P0025_ROUTER_NOT_CONNECTED_TO_INTERNET: PromptCodeList +P0031_LOCATION_SUCCESS: PromptCodeList +P0038_MOPPING_COMPLETED_IN_TASK: PromptCodeList +P0039_MOPPING_COMPLETED_AFTER_TASK: PromptCodeList +P0040_RETURN_TO_BASE_AFTER_TASK_COMPLETED: PromptCodeList +P0045_TASK_COMPLETED: PromptCodeList +P0061_LOW_BATTERY_RECHARGE_NO_CLEAN: PromptCodeList +P0065_LOW_BATTERY_30_PERCENT_NOT_ENOUGH: PromptCodeList +P0066_LOW_BATTERY_10_PERCENT_NOT_ENOUGH: PromptCodeList +P0076_CANNOT_EXECUTE_POSITIONING_RECHARGE_IN_BASE: PromptCodeList +P0078_LOW_BATTERY_CANNOT_START_TASK: PromptCodeList +P0079_LOW_BATTERY_RECHARGE: PromptCodeList +P0083_CHILD_LOCK_ON_CANNOT_USE_POSITIONING: PromptCodeList +P0085_SCHEDULE_CLEAN_START: PromptCodeList +P0087_MAP_DATA_UPDATING_CANNOT_OPERATE: PromptCodeList +P0088_CHILD_LOCK_ON_CANNOT_USE_RECHARGE: PromptCodeList +P0090_BASE_INSIDE_MOP_BUTTON_PRESSED: PromptCodeList +P0091_BASE_INSIDE_DUST_COLLECTING_BUTTON_PRESSED: PromptCodeList +P6117_LOW_BATTERY_CANNOT_START_DUST_COLLECTION: PromptCodeList +P6118_LOW_BATTERY_CANNOT_START_ROLLING_BRUSH_SELF_CLEANING: PromptCodeList +P6300_HAIR_CLEANING_IN_PROGRESS: PromptCodeList +P6301_LOW_BATTERY_CANNOT_START_HAIR_CUTTING: PromptCodeList +P6310_POWER_FAILURE: PromptCodeList +P7020_POSITIONING_FAILED_IN_GLOBAL_CLEANING: PromptCodeList +P7021_POSITIONING_FAILED_IN_NON_GLOBAL_CLEANING: PromptCodeList +P7050_CANNOT_REACH: PromptCodeList +P7051_SCHEDULE_FAILURE: PromptCodeList +P7052_PATH_PLANNING_FAILURE: PromptCodeList +P7054_TARGET_NOT_FOUND_STOP_FOLLOWING: PromptCodeList + +class ErrorCodeList(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + +class PromptCodeList(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] diff --git a/proto-reference/error_code_list_t2080.proto b/proto-reference/error_code_list_t2080.proto new file mode 100644 index 0000000..b44fddf --- /dev/null +++ b/proto-reference/error_code_list_t2080.proto @@ -0,0 +1,107 @@ +syntax = "proto3"; + +// option optimize_for = LITE_RUNTIME; + +package proto.cloud.t20xx; + +enum ErrorCodeList { + E000_NONE = 0; + E001_THE_SIDE_BRUSH_IS_STUCK = 1; // 边刷被卡住 + E002_ROLLING_BRUSH_IS_STUCK = 2; // 滚刷被卡住 + E003_FAN_SPEED_IS_ABNORMAL = 3; // 风机转速异常 + E004_MICRO_SWITCH_IS_ABNORMAL = 4; // 微动开关异常 + E005_THE_WHEEL_IS_OVERHANGING = 5; // 轮子悬空 + E006_THE_RIGHT_SIDE_SENSOR_ALONG_THE_WALL_IS_BLOCKED = 6; // 右侧沿墙传感器被挡住 + E007_THE_COLLISION_BUFFER_IS_JAMMED = 7; // 碰撞缓冲器被卡住 + E008_THE_COLLISION_SWITCH_IS_ABNORMAL_THE_MANUAL_OR_APP = 8; // 碰撞开关异常 + E009_ULTRASONIC_SENSOR_IS_ABNORMAL_THE_MANUAL_OR_APP = 9; // 超声波传感器异常 + E010_LASER_PROTECTION_COVER_IS_STUCK = 10; // 激光保护罩被卡住 + E011_LASER_SENSOR_MAY_BE_BLOCKED = 11; // 激光传感器可能被遮挡 + E012_LASER_SENSOR_IS_STUCK_OR_ENTANGLED = 12; // 激光传感器被卡住或缠绕 + E013_COMMUNICATION_MODULE_IS_ABNORMAL = 13; // 通讯模块异常 + E014_THE_POWER_IS_TOO_LOW_THE_SYSTEM_IS_ABOUT_TO_SHUT_DOWN_AUTOMATICALLY = 14; // 电量过低,系统即将自动关机 + E015_PLEASE_PUT_BACK_THE_DUST_BOX_AND_FILTER = 15; // 请装回尘盒和滤网。 + E016_THE_WATER_TANK_IS_TAKEN_OUT = 16; // 水箱取出 + E017_THE_MOP_CLOTH_IS_OFF = 17; // 拖布脱落 + E018_THE_MACHINE_IS_TILTED = 18; // 机器倾斜 + E019_THE_MACHINE_IS_TRAPPED_PLEASE_CLEAR_THE_SURROUNDING_OBSTACLES = 19; // 机器被困 + E020_THE_MACHINE_IS_TRAPPED_PLEASE_MOVE_TO_THE_ORIGINAL_PLACE_NEAR_TO_START = 20; // 机器被困 + E021_THE_WATER_TANK_IS_NOT_ENOUGH = 21; // 清水箱水量不足 + E022_THE_SEWAGE_TANK_IS_FUL = 22; // 污水箱已满 + E023_WATER_TANK_IS_NOT_IN_POSITION = 23; // 水箱不在位 + E024_HEATER_IS_ABNORMAL = 24; // 加热器异常 + E025_THE_WATER_LEVEL_OF_CLEANING_TRAY_IS_ABNORMAL = 25; // 清洗盘水位异常 + E026_THE_CLEANING_TRAY_IS_NOT_INSTALLED = 26; // 清洗盘未安装 + + E027_TRAVELING_WHEEL_IS_STUCK = 27; // 行走轮被卡住 + E029_NO_GO_ZONE_DETECTED_PLEASE_MOVE = 29; // 检测到禁区,请移动到新位置启动 + E030_VIRTUAL_WALL_MAGNETIC_STRIP_DETECTED_PLEASE_MOVE = 30; // 检测到虚拟墙磁条,请移动到新位置启动 + E031_ROTATING_MOTOR_IS_STUCK = 31; // 旋转电机被卡住 + E032_LIFT_MOTOR_IS_STUCK = 32; // 升降电机被卡住 + + E051_LONG_TIME_NOT_CLEAN_THE_DUST_BOX = 51; // 长时间未清理尘盒 + E052_CAMERA_LENS_IS_DIRTY = 52; // 摄像头镜头赃污 + + E101_THE_BATTERY_IS_ABNORMAL = 101; // 电池异常 + E102_THE_WHEEL_MODULE_IS_ABNORMAL = 102; // 轮子模组异常 + E103_THE_SIDE_BRUSH_MODULE_IS_ABNORMAL = 103; // 边刷模组异常 + E104_THE_ROLLER_BRUSH_IS_ABNORMAL = 104; // 滚刷异常 + E105_THE_FAN_IS_ABNORMAL = 105; // 风机异常 + E106_THE_WATER_PUMP_IS_ABNORMAL = 106; // 水泵异常 + E107_THE_LASER_SENSOR_IS_ABNORMAL = 107; // 激光传感器异常 + E108_THE_OPTICAL_FLOW_SENSOR_IS_ABNORMAL = 108; // 光流传感器异常 + E109_THE_GYROSCOPE_IS_ABNORMAL = 109; // 陀螺仪异常 + E110_CAMERA_IS_ABNORMAL = 110; // 摄像头异常 + E111_ROTATION_MOTOR_ABNORMAL = 111; // 旋转电机异常 + E112_LIFT_MOTOR_ABNORMAL = 112; // 升降电机异常 + E113_THE_WATER_SPRAYING_DEVICE_IS_ABNORMAL = 113; // 喷水装置异常 + E114_THE_WATER_PUMPING_DEVICE_IS_ABNORMAL = 114; // 抽水装置异常 + E115_THE_AIR_DRYING_DEVICE_IS_ABNORMAL = 115; // 风干装置异常 + E116_3D_TOF_ABNORMAL = 116; // 3D TOF 异常 + E117_ULTRASONIC_SENSOR_ABNORMAL = 117; // 超声波传感器异常 + E118_LASER_SHIELD_IS_JAMMED = 118; // 激光保护罩被卡住 + + E119_MID_SWEEP_OPEN_CIRCUIT_PROTECTION_TEST = 119; // 中扫开路保护测试 + E120_LEFT_AND_RIGHT_WHEEL_OPEN_CIRCUIT_PROTECTION_TEST = 120; // 左右轮开路保护测试 + E121_SIDE_SWEEP_OPEN_CIRCUIT_PROTECTION_TEST = 121; // 边扫开路保护测试 + E122_FAN_OPEN_CIRCUIT_PROTECTION_TEST = 122; // 风机开路保护测试 + E123_RADAR_OPEN_CIRCUIT_PROTECTION_TEST = 123; // 雷达开路保护测试 + E124_TOF_OPEN_CIRCUIT_PROTECTION_TEST = 124; // TOF开路保护测试 + E125_TURNTABLE_MOTOR_OPEN_CIRCUIT = 125; // 转盘电机开路 + E126_LIFT_MOTOR_OPEN_CIRCUIT = 126; // 升降电机开路 + E127_MID_SWEEP_SHORT_CIRCUIT_PROTECTION_TEST = 127; // 中扫短路保护测试 + E128_LEFT_AND_RIGHT_WHEEL_SHORT_CIRCUIT_PROTECTION_TEST = 128; // 左右轮短路保护测试 + E129_SIDE_SWEEP_SHORT_CIRCUIT_PROTECTION_TEST = 129; // 边扫短路保护测试 + E130_TURNTABLE_MOTOR_SHORT_CIRCUIT = 130; // 转盘电机短路 + E131_LIFT_MOTOR_SHORT_CIRCUIT = 131; // 升降电机短路 + E132_MID_SWEEP_BLOCKING_PROTECTION_TEST = 132; // 中扫堵转保护测试 + E133_LEFT_AND_RIGHT_WHEEL_BLOCKING_PROTECTION_TEST = 133; // 左右轮堵转保护测试 + E134_SIDE_SWEEP_BLOCKING_PROTECTION_TEST = 134; // 边扫堵转保护测试 + E135_BLOWER_BLOCKING_PROTECTION_TEST = 135; // 风机堵转保护测试 + E136_TURNTABLE_MOTOR_BLOCKING_TEST = 136; // 转盘电机堵转测试 + E137_LIFTING_MOTOR_BLOCKING_TEST = 137; // 升降电机堵转测试 + E138_FORWARD_COLLISION_PROTECTION_TEST = 138; // 前撞保护测试 + E139_OFF_GROUND_PROTECTION_TEST = 139; // 离地保护测试 + E140_GRAY_LAYER_BOX_PROTECTION_TEST = 140; // 灰层盒保护测试 + E141_T2310_HOST_WATER_TANK_PROTECTION_TEST = 141; // T2310主机水箱保护测试 + E142_RADAR_COVER_MICRO_SWITCH_JAMMING_PROTECTION = 142; // 雷达盖微动开关卡死保护 + E143_T2320_BASE_STATION_WATER_TANK_IS_NOT_IN_POSITION = 143; // T2320基站清水箱不在位 + E144_T2320_BASE_STATION_SEWAGE_TANK_IS_NOT_IN_POSITION = 144; // T2320基站污水箱不在位 + E145_T2320_BASE_STATION_SEWAGE_TANK_FULL = 145; // T2320基站污水箱满 + E151_LEFT_WHEEL_OPEN_CIRCUIT_PROTECTION_TEST = 151; // 左轮开路保护测试 + E152_RIGHT_WHEEL_OPEN_CIRCUIT_PROTECTION_TEST = 152; // 右轮开路保护测试 +} + +enum PromptCodeList { + P000_NONE = 0; + P001_START_SCHEDULED_CLEANING = 1; // 开始预约清洁 + P002_START_CRUISE_APPOINTMENT = 2; // 开始预约巡航 + P003_POWER_IS_LOW_RETURN_TO_BASE_STATION_IMMEDIATELY = 3; // 电量不足,立即返回基站 + P004_POSITIONING_FAILED_REBUILD_MAP_START_NEW_CLEANING = 4; // 定位失败,重新建图,开始新清洁 + P005_POSITIONING_FAILED_MISSION_ENDED_START_BACK_TO_BASE_STATION = 5; // 定位失败,任务结束,开始返回基站 + P006_SOME_AREAS_ARE_NOT_YET_CLEANED_BECAUSE_THEY_ARE_UNREACHABLE = 6; // 部分区域因为无法到达,还未清洁 + P007_PATH_PLANNING_FAILED_CANT_REACH_THE_DESIGNATED_AREA = 7; // 路径规划失败,无法到达指定区域 + P008_UNABLE_TO_REACH_THE_TARGET_POINT = 8; // 无法到达目标点 + P009_BASE_STATION_EXPLORATION_FAILED_THE_MACHINE_RETURNED_TO_THE_STARTING_POINT = 9; // 基站探索失败,机器返回起点 + P010_BASE_STATION_EXPLORATION_FAILED_MACHINE_STOPPED_WORKING = 10; // 基站探索失败,机器停止工作 +} diff --git a/proto-reference/error_code_list_t2080_pb2.py b/proto-reference/error_code_list_t2080_pb2.py new file mode 100644 index 0000000..8421166 --- /dev/null +++ b/proto-reference/error_code_list_t2080_pb2.py @@ -0,0 +1,27 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: proto/cloud/error_code_list_t2080.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\'proto/cloud/error_code_list_t2080.proto\x12\x11proto.cloud.t20xx*\xcb\x1b\n\rErrorCodeList\x12\r\n\tE000_NONE\x10\x00\x12 \n\x1c\x45\x30\x30\x31_THE_SIDE_BRUSH_IS_STUCK\x10\x01\x12\x1f\n\x1b\x45\x30\x30\x32_ROLLING_BRUSH_IS_STUCK\x10\x02\x12\x1e\n\x1a\x45\x30\x30\x33_FAN_SPEED_IS_ABNORMAL\x10\x03\x12!\n\x1d\x45\x30\x30\x34_MICRO_SWITCH_IS_ABNORMAL\x10\x04\x12!\n\x1d\x45\x30\x30\x35_THE_WHEEL_IS_OVERHANGING\x10\x05\x12\x38\n4E006_THE_RIGHT_SIDE_SENSOR_ALONG_THE_WALL_IS_BLOCKED\x10\x06\x12\'\n#E007_THE_COLLISION_BUFFER_IS_JAMMED\x10\x07\x12;\n7E008_THE_COLLISION_SWITCH_IS_ABNORMAL_THE_MANUAL_OR_APP\x10\x08\x12\x38\n4E009_ULTRASONIC_SENSOR_IS_ABNORMAL_THE_MANUAL_OR_APP\x10\t\x12(\n$E010_LASER_PROTECTION_COVER_IS_STUCK\x10\n\x12$\n E011_LASER_SENSOR_MAY_BE_BLOCKED\x10\x0b\x12+\n\'E012_LASER_SENSOR_IS_STUCK_OR_ENTANGLED\x10\x0c\x12)\n%E013_COMMUNICATION_MODULE_IS_ABNORMAL\x10\r\x12L\nHE014_THE_POWER_IS_TOO_LOW_THE_SYSTEM_IS_ABOUT_TO_SHUT_DOWN_AUTOMATICALLY\x10\x0e\x12\x30\n,E015_PLEASE_PUT_BACK_THE_DUST_BOX_AND_FILTER\x10\x0f\x12$\n E016_THE_WATER_TANK_IS_TAKEN_OUT\x10\x10\x12\x1d\n\x19\x45\x30\x31\x37_THE_MOP_CLOTH_IS_OFF\x10\x11\x12\x1e\n\x1a\x45\x30\x31\x38_THE_MACHINE_IS_TILTED\x10\x12\x12\x46\nBE019_THE_MACHINE_IS_TRAPPED_PLEASE_CLEAR_THE_SURROUNDING_OBSTACLES\x10\x13\x12O\nKE020_THE_MACHINE_IS_TRAPPED_PLEASE_MOVE_TO_THE_ORIGINAL_PLACE_NEAR_TO_START\x10\x14\x12%\n!E021_THE_WATER_TANK_IS_NOT_ENOUGH\x10\x15\x12\x1f\n\x1b\x45\x30\x32\x32_THE_SEWAGE_TANK_IS_FUL\x10\x16\x12&\n\"E023_WATER_TANK_IS_NOT_IN_POSITION\x10\x17\x12\x1b\n\x17\x45\x30\x32\x34_HEATER_IS_ABNORMAL\x10\x18\x12\x35\n1E025_THE_WATER_LEVEL_OF_CLEANING_TRAY_IS_ABNORMAL\x10\x19\x12+\n\'E026_THE_CLEANING_TRAY_IS_NOT_INSTALLED\x10\x1a\x12!\n\x1d\x45\x30\x32\x37_TRAVELING_WHEEL_IS_STUCK\x10\x1b\x12(\n$E029_NO_GO_ZONE_DETECTED_PLEASE_MOVE\x10\x1d\x12\x39\n5E030_VIRTUAL_WALL_MAGNETIC_STRIP_DETECTED_PLEASE_MOVE\x10\x1e\x12 \n\x1c\x45\x30\x33\x31_ROTATING_MOTOR_IS_STUCK\x10\x1f\x12\x1c\n\x18\x45\x30\x33\x32_LIFT_MOTOR_IS_STUCK\x10 \x12)\n%E051_LONG_TIME_NOT_CLEAN_THE_DUST_BOX\x10\x33\x12\x1d\n\x19\x45\x30\x35\x32_CAMERA_LENS_IS_DIRTY\x10\x34\x12 \n\x1c\x45\x31\x30\x31_THE_BATTERY_IS_ABNORMAL\x10\x65\x12%\n!E102_THE_WHEEL_MODULE_IS_ABNORMAL\x10\x66\x12*\n&E103_THE_SIDE_BRUSH_MODULE_IS_ABNORMAL\x10g\x12%\n!E104_THE_ROLLER_BRUSH_IS_ABNORMAL\x10h\x12\x1c\n\x18\x45\x31\x30\x35_THE_FAN_IS_ABNORMAL\x10i\x12#\n\x1f\x45\x31\x30\x36_THE_WATER_PUMP_IS_ABNORMAL\x10j\x12%\n!E107_THE_LASER_SENSOR_IS_ABNORMAL\x10k\x12,\n(E108_THE_OPTICAL_FLOW_SENSOR_IS_ABNORMAL\x10l\x12\"\n\x1e\x45\x31\x30\x39_THE_GYROSCOPE_IS_ABNORMAL\x10m\x12\x1b\n\x17\x45\x31\x31\x30_CAMERA_IS_ABNORMAL\x10n\x12 \n\x1c\x45\x31\x31\x31_ROTATION_MOTOR_ABNORMAL\x10o\x12\x1c\n\x18\x45\x31\x31\x32_LIFT_MOTOR_ABNORMAL\x10p\x12.\n*E113_THE_WATER_SPRAYING_DEVICE_IS_ABNORMAL\x10q\x12-\n)E114_THE_WATER_PUMPING_DEVICE_IS_ABNORMAL\x10r\x12*\n&E115_THE_AIR_DRYING_DEVICE_IS_ABNORMAL\x10s\x12\x18\n\x14\x45\x31\x31\x36_3D_TOF_ABNORMAL\x10t\x12#\n\x1f\x45\x31\x31\x37_ULTRASONIC_SENSOR_ABNORMAL\x10u\x12\x1f\n\x1b\x45\x31\x31\x38_LASER_SHIELD_IS_JAMMED\x10v\x12/\n+E119_MID_SWEEP_OPEN_CIRCUIT_PROTECTION_TEST\x10w\x12:\n6E120_LEFT_AND_RIGHT_WHEEL_OPEN_CIRCUIT_PROTECTION_TEST\x10x\x12\x30\n,E121_SIDE_SWEEP_OPEN_CIRCUIT_PROTECTION_TEST\x10y\x12)\n%E122_FAN_OPEN_CIRCUIT_PROTECTION_TEST\x10z\x12+\n\'E123_RADAR_OPEN_CIRCUIT_PROTECTION_TEST\x10{\x12)\n%E124_TOF_OPEN_CIRCUIT_PROTECTION_TEST\x10|\x12%\n!E125_TURNTABLE_MOTOR_OPEN_CIRCUIT\x10}\x12 \n\x1c\x45\x31\x32\x36_LIFT_MOTOR_OPEN_CIRCUIT\x10~\x12\x30\n,E127_MID_SWEEP_SHORT_CIRCUIT_PROTECTION_TEST\x10\x7f\x12<\n7E128_LEFT_AND_RIGHT_WHEEL_SHORT_CIRCUIT_PROTECTION_TEST\x10\x80\x01\x12\x32\n-E129_SIDE_SWEEP_SHORT_CIRCUIT_PROTECTION_TEST\x10\x81\x01\x12\'\n\"E130_TURNTABLE_MOTOR_SHORT_CIRCUIT\x10\x82\x01\x12\"\n\x1d\x45\x31\x33\x31_LIFT_MOTOR_SHORT_CIRCUIT\x10\x83\x01\x12,\n\'E132_MID_SWEEP_BLOCKING_PROTECTION_TEST\x10\x84\x01\x12\x37\n2E133_LEFT_AND_RIGHT_WHEEL_BLOCKING_PROTECTION_TEST\x10\x85\x01\x12-\n(E134_SIDE_SWEEP_BLOCKING_PROTECTION_TEST\x10\x86\x01\x12)\n$E135_BLOWER_BLOCKING_PROTECTION_TEST\x10\x87\x01\x12\'\n\"E136_TURNTABLE_MOTOR_BLOCKING_TEST\x10\x88\x01\x12%\n E137_LIFTING_MOTOR_BLOCKING_TEST\x10\x89\x01\x12+\n&E138_FORWARD_COLLISION_PROTECTION_TEST\x10\x8a\x01\x12$\n\x1f\x45\x31\x33\x39_OFF_GROUND_PROTECTION_TEST\x10\x8b\x01\x12(\n#E140_GRAY_LAYER_BOX_PROTECTION_TEST\x10\x8c\x01\x12/\n*E141_T2310_HOST_WATER_TANK_PROTECTION_TEST\x10\x8d\x01\x12\x35\n0E142_RADAR_COVER_MICRO_SWITCH_JAMMING_PROTECTION\x10\x8e\x01\x12:\n5E143_T2320_BASE_STATION_WATER_TANK_IS_NOT_IN_POSITION\x10\x8f\x01\x12;\n6E144_T2320_BASE_STATION_SEWAGE_TANK_IS_NOT_IN_POSITION\x10\x90\x01\x12-\n(E145_T2320_BASE_STATION_SEWAGE_TANK_FULL\x10\x91\x01\x12\x31\n,E151_LEFT_WHEEL_OPEN_CIRCUIT_PROTECTION_TEST\x10\x97\x01\x12\x32\n-E152_RIGHT_WHEEL_OPEN_CIRCUIT_PROTECTION_TEST\x10\x98\x01*\xe7\x04\n\x0ePromptCodeList\x12\r\n\tP000_NONE\x10\x00\x12!\n\x1dP001_START_SCHEDULED_CLEANING\x10\x01\x12!\n\x1dP002_START_CRUISE_APPOINTMENT\x10\x02\x12\x38\n4P003_POWER_IS_LOW_RETURN_TO_BASE_STATION_IMMEDIATELY\x10\x03\x12:\n6P004_POSITIONING_FAILED_REBUILD_MAP_START_NEW_CLEANING\x10\x04\x12\x44\n@P005_POSITIONING_FAILED_MISSION_ENDED_START_BACK_TO_BASE_STATION\x10\x05\x12\x44\n@P006_SOME_AREAS_ARE_NOT_YET_CLEANED_BECAUSE_THEY_ARE_UNREACHABLE\x10\x06\x12<\n8P007_PATH_PLANNING_FAILED_CANT_REACH_THE_DESIGNATED_AREA\x10\x07\x12)\n%P008_UNABLE_TO_REACH_THE_TARGET_POINT\x10\x08\x12S\nOP009_BASE_STATION_EXPLORATION_FAILED_THE_MACHINE_RETURNED_TO_THE_STARTING_POINT\x10\t\x12@\n None: ... + class NewCode(_message.Message): + __slots__ = ["error", "warn"] + ERROR_FIELD_NUMBER: _ClassVar[int] + WARN_FIELD_NUMBER: _ClassVar[int] + error: _containers.RepeatedScalarFieldContainer[int] + warn: _containers.RepeatedScalarFieldContainer[int] + def __init__(self, error: _Optional[_Iterable[int]] = ..., warn: _Optional[_Iterable[int]] = ...) -> None: ... + class ObstacleReminder(_message.Message): + __slots__ = ["accuracy", "map_id", "photo_id", "point", "type"] + class Type(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + ACCURACY_FIELD_NUMBER: _ClassVar[int] + MAP_ID_FIELD_NUMBER: _ClassVar[int] + PHOTO_ID_FIELD_NUMBER: _ClassVar[int] + POINT_FIELD_NUMBER: _ClassVar[int] + POOP: ErrorCode.ObstacleReminder.Type + TYPE_FIELD_NUMBER: _ClassVar[int] + accuracy: int + map_id: int + photo_id: str + point: _common_pb2.Point + type: ErrorCode.ObstacleReminder.Type + def __init__(self, type: _Optional[_Union[ErrorCode.ObstacleReminder.Type, str]] = ..., photo_id: _Optional[str] = ..., accuracy: _Optional[int] = ..., map_id: _Optional[int] = ..., point: _Optional[_Union[_common_pb2.Point, _Mapping]] = ...) -> None: ... + BATTERY_FIELD_NUMBER: _ClassVar[int] + ERROR_FIELD_NUMBER: _ClassVar[int] + LAST_TIME_FIELD_NUMBER: _ClassVar[int] + NEW_CODE_FIELD_NUMBER: _ClassVar[int] + OBSTACLE_REMINDER_FIELD_NUMBER: _ClassVar[int] + SETTING_FIELD_NUMBER: _ClassVar[int] + WARN_FIELD_NUMBER: _ClassVar[int] + battery: ErrorCode.Battery + error: _containers.RepeatedScalarFieldContainer[int] + last_time: int + new_code: ErrorCode.NewCode + obstacle_reminder: _containers.RepeatedCompositeFieldContainer[ErrorCode.ObstacleReminder] + setting: ErrorSetting + warn: _containers.RepeatedScalarFieldContainer[int] + def __init__(self, last_time: _Optional[int] = ..., error: _Optional[_Iterable[int]] = ..., warn: _Optional[_Iterable[int]] = ..., setting: _Optional[_Union[ErrorSetting, _Mapping]] = ..., new_code: _Optional[_Union[ErrorCode.NewCode, _Mapping]] = ..., battery: _Optional[_Union[ErrorCode.Battery, _Mapping]] = ..., obstacle_reminder: _Optional[_Iterable[_Union[ErrorCode.ObstacleReminder, _Mapping]]] = ...) -> None: ... + +class ErrorSetting(_message.Message): + __slots__ = ["obstacle_reminder_mask", "warn_mask"] + OBSTACLE_REMINDER_MASK_FIELD_NUMBER: _ClassVar[int] + WARN_MASK_FIELD_NUMBER: _ClassVar[int] + obstacle_reminder_mask: _containers.RepeatedScalarFieldContainer[str] + warn_mask: _containers.RepeatedScalarFieldContainer[int] + def __init__(self, warn_mask: _Optional[_Iterable[int]] = ..., obstacle_reminder_mask: _Optional[_Iterable[str]] = ...) -> None: ... + +class PromptCode(_message.Message): + __slots__ = ["last_time", "value"] + LAST_TIME_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + last_time: int + value: _containers.RepeatedScalarFieldContainer[int] + def __init__(self, last_time: _Optional[int] = ..., value: _Optional[_Iterable[int]] = ...) -> None: ... diff --git a/proto-reference/keepalive.proto b/proto-reference/keepalive.proto new file mode 100644 index 0000000..69eab04 --- /dev/null +++ b/proto-reference/keepalive.proto @@ -0,0 +1,13 @@ +syntax = "proto3"; + +// option optimize_for = LITE_RUNTIME; + +package proto.cloud; + +message KeepAliveRequest { + uint64 timestamp = 1; + + // 强制同步机器中数据 + // 手机 app 上多次尝试都拿不到数据才考虑使用该标志 + bool force_sync = 2; +} diff --git a/proto-reference/keepalive_pb2.py b/proto-reference/keepalive_pb2.py new file mode 100644 index 0000000..a4f2033 --- /dev/null +++ b/proto-reference/keepalive_pb2.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: proto/cloud/keepalive.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1bproto/cloud/keepalive.proto\x12\x0bproto.cloud\"9\n\x10KeepAliveRequest\x12\x11\n\ttimestamp\x18\x01 \x01(\x04\x12\x12\n\nforce_sync\x18\x02 \x01(\x08\x62\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'proto.cloud.keepalive_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _KEEPALIVEREQUEST._serialized_start=44 + _KEEPALIVEREQUEST._serialized_end=101 +# @@protoc_insertion_point(module_scope) diff --git a/proto-reference/keepalive_pb2.pyi b/proto-reference/keepalive_pb2.pyi new file mode 100644 index 0000000..efdfda0 --- /dev/null +++ b/proto-reference/keepalive_pb2.pyi @@ -0,0 +1,13 @@ +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Optional as _Optional + +DESCRIPTOR: _descriptor.FileDescriptor + +class KeepAliveRequest(_message.Message): + __slots__ = ["force_sync", "timestamp"] + FORCE_SYNC_FIELD_NUMBER: _ClassVar[int] + TIMESTAMP_FIELD_NUMBER: _ClassVar[int] + force_sync: bool + timestamp: int + def __init__(self, timestamp: _Optional[int] = ..., force_sync: bool = ...) -> None: ... diff --git a/proto-reference/language.proto b/proto-reference/language.proto new file mode 100644 index 0000000..321395d --- /dev/null +++ b/proto-reference/language.proto @@ -0,0 +1,40 @@ +syntax = "proto3"; + +// option optimize_for = LITE_RUNTIME; + +package proto.cloud; + +message LanguageRequest { + message Desc { + uint32 set_id = 1; + string url = 2; + string md5 = 3; + uint32 version = 4; + uint32 size = 5; + } + Desc desc = 1; + + message Selection { + enum Value { + DEFAULT = 0; + USER = 1; + } + Value value = 1; + } + Selection selection = 2; +} + +message LanguageResponse { + uint32 default_id = 1; + uint32 current_id = 2; + uint32 version = 3; + uint32 set_id = 4; + + enum State { + IDLE = 0; + UPDATING = 1; + SUCCESS = 2; + FAILURE = 3; + } + State state = 5; +} diff --git a/proto-reference/language_pb2.py b/proto-reference/language_pb2.py new file mode 100644 index 0000000..0f76965 --- /dev/null +++ b/proto-reference/language_pb2.py @@ -0,0 +1,35 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: proto/cloud/language.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1aproto/cloud/language.proto\x12\x0bproto.cloud\"\xb8\x02\n\x0fLanguageRequest\x12/\n\x04\x64\x65sc\x18\x01 \x01(\x0b\x32!.proto.cloud.LanguageRequest.Desc\x12\x39\n\tselection\x18\x02 \x01(\x0b\x32&.proto.cloud.LanguageRequest.Selection\x1aO\n\x04\x44\x65sc\x12\x0e\n\x06set_id\x18\x01 \x01(\r\x12\x0b\n\x03url\x18\x02 \x01(\t\x12\x0b\n\x03md5\x18\x03 \x01(\t\x12\x0f\n\x07version\x18\x04 \x01(\r\x12\x0c\n\x04size\x18\x05 \x01(\r\x1ah\n\tSelection\x12;\n\x05value\x18\x01 \x01(\x0e\x32,.proto.cloud.LanguageRequest.Selection.Value\"\x1e\n\x05Value\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10\x00\x12\x08\n\x04USER\x10\x01\"\xca\x01\n\x10LanguageResponse\x12\x12\n\ndefault_id\x18\x01 \x01(\r\x12\x12\n\ncurrent_id\x18\x02 \x01(\r\x12\x0f\n\x07version\x18\x03 \x01(\r\x12\x0e\n\x06set_id\x18\x04 \x01(\r\x12\x32\n\x05state\x18\x05 \x01(\x0e\x32#.proto.cloud.LanguageResponse.State\"9\n\x05State\x12\x08\n\x04IDLE\x10\x00\x12\x0c\n\x08UPDATING\x10\x01\x12\x0b\n\x07SUCCESS\x10\x02\x12\x0b\n\x07\x46\x41ILURE\x10\x03\x62\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'proto.cloud.language_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _LANGUAGEREQUEST._serialized_start=44 + _LANGUAGEREQUEST._serialized_end=356 + _LANGUAGEREQUEST_DESC._serialized_start=171 + _LANGUAGEREQUEST_DESC._serialized_end=250 + _LANGUAGEREQUEST_SELECTION._serialized_start=252 + _LANGUAGEREQUEST_SELECTION._serialized_end=356 + _LANGUAGEREQUEST_SELECTION_VALUE._serialized_start=326 + _LANGUAGEREQUEST_SELECTION_VALUE._serialized_end=356 + _LANGUAGERESPONSE._serialized_start=359 + _LANGUAGERESPONSE._serialized_end=561 + _LANGUAGERESPONSE_STATE._serialized_start=504 + _LANGUAGERESPONSE_STATE._serialized_end=561 +# @@protoc_insertion_point(module_scope) diff --git a/proto-reference/language_pb2.pyi b/proto-reference/language_pb2.pyi new file mode 100644 index 0000000..429f49a --- /dev/null +++ b/proto-reference/language_pb2.pyi @@ -0,0 +1,56 @@ +from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Mapping as _Mapping, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class LanguageRequest(_message.Message): + __slots__ = ["desc", "selection"] + class Desc(_message.Message): + __slots__ = ["md5", "set_id", "size", "url", "version"] + MD5_FIELD_NUMBER: _ClassVar[int] + SET_ID_FIELD_NUMBER: _ClassVar[int] + SIZE_FIELD_NUMBER: _ClassVar[int] + URL_FIELD_NUMBER: _ClassVar[int] + VERSION_FIELD_NUMBER: _ClassVar[int] + md5: str + set_id: int + size: int + url: str + version: int + def __init__(self, set_id: _Optional[int] = ..., url: _Optional[str] = ..., md5: _Optional[str] = ..., version: _Optional[int] = ..., size: _Optional[int] = ...) -> None: ... + class Selection(_message.Message): + __slots__ = ["value"] + class Value(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + DEFAULT: LanguageRequest.Selection.Value + USER: LanguageRequest.Selection.Value + VALUE_FIELD_NUMBER: _ClassVar[int] + value: LanguageRequest.Selection.Value + def __init__(self, value: _Optional[_Union[LanguageRequest.Selection.Value, str]] = ...) -> None: ... + DESC_FIELD_NUMBER: _ClassVar[int] + SELECTION_FIELD_NUMBER: _ClassVar[int] + desc: LanguageRequest.Desc + selection: LanguageRequest.Selection + def __init__(self, desc: _Optional[_Union[LanguageRequest.Desc, _Mapping]] = ..., selection: _Optional[_Union[LanguageRequest.Selection, _Mapping]] = ...) -> None: ... + +class LanguageResponse(_message.Message): + __slots__ = ["current_id", "default_id", "set_id", "state", "version"] + class State(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + CURRENT_ID_FIELD_NUMBER: _ClassVar[int] + DEFAULT_ID_FIELD_NUMBER: _ClassVar[int] + FAILURE: LanguageResponse.State + IDLE: LanguageResponse.State + SET_ID_FIELD_NUMBER: _ClassVar[int] + STATE_FIELD_NUMBER: _ClassVar[int] + SUCCESS: LanguageResponse.State + UPDATING: LanguageResponse.State + VERSION_FIELD_NUMBER: _ClassVar[int] + current_id: int + default_id: int + set_id: int + state: LanguageResponse.State + version: int + def __init__(self, default_id: _Optional[int] = ..., current_id: _Optional[int] = ..., version: _Optional[int] = ..., set_id: _Optional[int] = ..., state: _Optional[_Union[LanguageResponse.State, str]] = ...) -> None: ... diff --git a/proto-reference/map_edit.proto b/proto-reference/map_edit.proto new file mode 100644 index 0000000..474d980 --- /dev/null +++ b/proto-reference/map_edit.proto @@ -0,0 +1,136 @@ +syntax = "proto3"; + +// option optimize_for = LITE_RUNTIME; + +package proto.cloud; + +import "proto/cloud/common.proto"; +import "proto/cloud/stream.proto"; +import "proto/cloud/clean_param.proto"; + +message MapEditRequest { + enum Method { + MERGE_ROOMS = 0; + DIVIDE_ROOM = 1; + RESET_ROOMS = 2; + RENAME_ROOM = 3; // 房间描述 + SET_RESTRICTED_ZONES = 4; // 设置限制区域:虚拟墙、禁区、禁拖区; + SET_ROOMS_CUSTOM = 5; // 房间定制(个性化清洁) + SET_CRUISE_POINTS = 6; // 设置全局巡航点 + ROTATION = 7; // 地图旋转 + IGNORE_OBSTACLE = 8; // 忽略/恢复障碍物 + } + + Method method = 1; + uint32 seq = 2; + uint32 map_id = 3; + + message MergeRooms { + repeated uint32 room_ids = 1; + } + + message DivideRoom { + uint32 room_id = 1; + repeated Point points = 2; // 分房是两个点还是可以大于2个点??? + } + + // 房间定制(个性化清洁) + message RoomsCustom { + message Enable { + bool value = 1; // false: 使用全局参数;true: 使用房间定制参数 + } + Enable custom_enable = 1; // x10 之后不再使用 + + // 设置房间顺序 + message Order { + message Room { + uint32 id = 1; + uint32 order = 2; + } + repeated Room rooms = 1; + } + Order rooms_order = 2; + + // 设置房间定制参数 + message Parm { + message Room { + uint32 id = 1; + + message Custom { + CleanType clean_type = 1; + Fan fan = 2; + MopMode mop_mode = 3; + CleanExtent clean_extent = 4; + uint32 clean_times = 5; // 清扫次数,非 0 有效 + } + Custom custom = 2; + } + repeated Room rooms = 1; + } + Parm rooms_parm = 3; + + Switch smart_mode_sw = 4; // 智能省心模式开关 + + enum Condition { + GENERAL = 0; // 通常设置房间定制参数 + RESERVATION_IN_PROGRESS = 1; // 预约房间清扫过程中设置房间定制参数 + } + Condition condition = 5; + } + + message RoomDesc { + uint32 id = 1; + string name = 2; + Floor floor = 3; + RoomScene scene = 4; + } + + message CruisePoints { + repeated Point points = 1; + } + + message Rotation { + uint32 angle = 1; // 顺时针的角度的度数,如 90,180 + } + + message IgnoreObstacle { + bool valid = 1; // false: 设置无效;true: 设置有效 + string object_type = 2; + string photo_id = 3; // 照片 id(优先通过照片 id 进行匹配) + Point point = 4; // 障碍物中心点(其次搜索点的周围区域) + } + + oneof Param { + MergeRooms merge_rooms = 6; + DivideRoom divide_room = 7; + stream.RestrictedZone restricted_zone = 8; + RoomDesc room_desc = 9; + RoomsCustom rooms_custom = 10; + CruisePoints cruise_points = 11; + Rotation rotation = 12; + IgnoreObstacle ignore_obstacle = 13; + } +} + +message MapEditResponse { + MapEditRequest.Method method = 1; + uint32 seq = 2; + + enum Result { + SUCCESS = 0; + STARTED = 1; + FAILED = 2; + } + Result result = 3; + + message FailCode{ + enum Value { + UNKNOWN = 0; // 其他错误,非以下错误码 + AREA_SMALL = 1; // 分割后房间面积太小 + ROOM_UNADJACENT = 2; // 房间不相邻不能合并 + TOO_MANY_ROOMS = 3; // 分割后房间数太多 + } + Value value = 1; + } + FailCode fail_code = 4; +} diff --git a/proto-reference/map_edit_pb2.py b/proto-reference/map_edit_pb2.py new file mode 100644 index 0000000..5b8a365 --- /dev/null +++ b/proto-reference/map_edit_pb2.py @@ -0,0 +1,67 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: proto/cloud/map_edit.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder + +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from ...proto.cloud import \ + clean_param_pb2 as proto_dot_cloud_dot_clean__param__pb2 +from ...proto.cloud import common_pb2 as proto_dot_cloud_dot_common__pb2 +from ...proto.cloud import stream_pb2 as proto_dot_cloud_dot_stream__pb2 + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1aproto/cloud/map_edit.proto\x12\x0bproto.cloud\x1a\x18proto/cloud/common.proto\x1a\x18proto/cloud/stream.proto\x1a\x1dproto/cloud/clean_param.proto\"\xa8\x10\n\x0eMapEditRequest\x12\x32\n\x06method\x18\x01 \x01(\x0e\x32\".proto.cloud.MapEditRequest.Method\x12\x0b\n\x03seq\x18\x02 \x01(\r\x12\x0e\n\x06map_id\x18\x03 \x01(\r\x12=\n\x0bmerge_rooms\x18\x06 \x01(\x0b\x32&.proto.cloud.MapEditRequest.MergeRoomsH\x00\x12=\n\x0b\x64ivide_room\x18\x07 \x01(\x0b\x32&.proto.cloud.MapEditRequest.DivideRoomH\x00\x12=\n\x0frestricted_zone\x18\x08 \x01(\x0b\x32\".proto.cloud.stream.RestrictedZoneH\x00\x12\x39\n\troom_desc\x18\t \x01(\x0b\x32$.proto.cloud.MapEditRequest.RoomDescH\x00\x12?\n\x0crooms_custom\x18\n \x01(\x0b\x32\'.proto.cloud.MapEditRequest.RoomsCustomH\x00\x12\x41\n\rcruise_points\x18\x0b \x01(\x0b\x32(.proto.cloud.MapEditRequest.CruisePointsH\x00\x12\x38\n\x08rotation\x18\x0c \x01(\x0b\x32$.proto.cloud.MapEditRequest.RotationH\x00\x12\x45\n\x0fignore_obstacle\x18\r \x01(\x0b\x32*.proto.cloud.MapEditRequest.IgnoreObstacleH\x00\x1a\x1e\n\nMergeRooms\x12\x10\n\x08room_ids\x18\x01 \x03(\r\x1a\x41\n\nDivideRoom\x12\x0f\n\x07room_id\x18\x01 \x01(\r\x12\"\n\x06points\x18\x02 \x03(\x0b\x32\x12.proto.cloud.Point\x1a\xf8\x06\n\x0bRoomsCustom\x12\x45\n\rcustom_enable\x18\x01 \x01(\x0b\x32..proto.cloud.MapEditRequest.RoomsCustom.Enable\x12\x42\n\x0brooms_order\x18\x02 \x01(\x0b\x32-.proto.cloud.MapEditRequest.RoomsCustom.Order\x12@\n\nrooms_parm\x18\x03 \x01(\x0b\x32,.proto.cloud.MapEditRequest.RoomsCustom.Parm\x12*\n\rsmart_mode_sw\x18\x04 \x01(\x0b\x32\x13.proto.cloud.Switch\x12\x44\n\tcondition\x18\x05 \x01(\x0e\x32\x31.proto.cloud.MapEditRequest.RoomsCustom.Condition\x1a\x17\n\x06\x45nable\x12\r\n\x05value\x18\x01 \x01(\x08\x1am\n\x05Order\x12\x41\n\x05rooms\x18\x01 \x03(\x0b\x32\x32.proto.cloud.MapEditRequest.RoomsCustom.Order.Room\x1a!\n\x04Room\x12\n\n\x02id\x18\x01 \x01(\r\x12\r\n\x05order\x18\x02 \x01(\r\x1a\xea\x02\n\x04Parm\x12@\n\x05rooms\x18\x01 \x03(\x0b\x32\x31.proto.cloud.MapEditRequest.RoomsCustom.Parm.Room\x1a\x9f\x02\n\x04Room\x12\n\n\x02id\x18\x01 \x01(\r\x12H\n\x06\x63ustom\x18\x02 \x01(\x0b\x32\x38.proto.cloud.MapEditRequest.RoomsCustom.Parm.Room.Custom\x1a\xc0\x01\n\x06\x43ustom\x12*\n\nclean_type\x18\x01 \x01(\x0b\x32\x16.proto.cloud.CleanType\x12\x1d\n\x03\x66\x61n\x18\x02 \x01(\x0b\x32\x10.proto.cloud.Fan\x12&\n\x08mop_mode\x18\x03 \x01(\x0b\x32\x14.proto.cloud.MopMode\x12.\n\x0c\x63lean_extent\x18\x04 \x01(\x0b\x32\x18.proto.cloud.CleanExtent\x12\x13\n\x0b\x63lean_times\x18\x05 \x01(\r\"5\n\tCondition\x12\x0b\n\x07GENERAL\x10\x00\x12\x1b\n\x17RESERVATION_IN_PROGRESS\x10\x01\x1an\n\x08RoomDesc\x12\n\n\x02id\x18\x01 \x01(\r\x12\x0c\n\x04name\x18\x02 \x01(\t\x12!\n\x05\x66loor\x18\x03 \x01(\x0b\x32\x12.proto.cloud.Floor\x12%\n\x05scene\x18\x04 \x01(\x0b\x32\x16.proto.cloud.RoomScene\x1a\x32\n\x0c\x43ruisePoints\x12\"\n\x06points\x18\x01 \x03(\x0b\x32\x12.proto.cloud.Point\x1a\x19\n\x08Rotation\x12\r\n\x05\x61ngle\x18\x01 \x01(\r\x1ai\n\x0eIgnoreObstacle\x12\r\n\x05valid\x18\x01 \x01(\x08\x12\x13\n\x0bobject_type\x18\x02 \x01(\t\x12\x10\n\x08photo_id\x18\x03 \x01(\t\x12!\n\x05point\x18\x04 \x01(\x0b\x32\x12.proto.cloud.Point\"\xb6\x01\n\x06Method\x12\x0f\n\x0bMERGE_ROOMS\x10\x00\x12\x0f\n\x0b\x44IVIDE_ROOM\x10\x01\x12\x0f\n\x0bRESET_ROOMS\x10\x02\x12\x0f\n\x0bRENAME_ROOM\x10\x03\x12\x18\n\x14SET_RESTRICTED_ZONES\x10\x04\x12\x14\n\x10SET_ROOMS_CUSTOM\x10\x05\x12\x15\n\x11SET_CRUISE_POINTS\x10\x06\x12\x0c\n\x08ROTATION\x10\x07\x12\x13\n\x0fIGNORE_OBSTACLE\x10\x08\x42\x07\n\x05Param\"\x89\x03\n\x0fMapEditResponse\x12\x32\n\x06method\x18\x01 \x01(\x0e\x32\".proto.cloud.MapEditRequest.Method\x12\x0b\n\x03seq\x18\x02 \x01(\r\x12\x33\n\x06result\x18\x03 \x01(\x0e\x32#.proto.cloud.MapEditResponse.Result\x12\x38\n\tfail_code\x18\x04 \x01(\x0b\x32%.proto.cloud.MapEditResponse.FailCode\x1a\x95\x01\n\x08\x46\x61ilCode\x12:\n\x05value\x18\x01 \x01(\x0e\x32+.proto.cloud.MapEditResponse.FailCode.Value\"M\n\x05Value\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x0e\n\nAREA_SMALL\x10\x01\x12\x13\n\x0fROOM_UNADJACENT\x10\x02\x12\x12\n\x0eTOO_MANY_ROOMS\x10\x03\".\n\x06Result\x12\x0b\n\x07SUCCESS\x10\x00\x12\x0b\n\x07STARTED\x10\x01\x12\n\n\x06\x46\x41ILED\x10\x02\x62\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'proto.cloud.map_edit_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _MAPEDITREQUEST._serialized_start=127 + _MAPEDITREQUEST._serialized_end=2215 + _MAPEDITREQUEST_MERGEROOMS._serialized_start=735 + _MAPEDITREQUEST_MERGEROOMS._serialized_end=765 + _MAPEDITREQUEST_DIVIDEROOM._serialized_start=767 + _MAPEDITREQUEST_DIVIDEROOM._serialized_end=832 + _MAPEDITREQUEST_ROOMSCUSTOM._serialized_start=835 + _MAPEDITREQUEST_ROOMSCUSTOM._serialized_end=1723 + _MAPEDITREQUEST_ROOMSCUSTOM_ENABLE._serialized_start=1169 + _MAPEDITREQUEST_ROOMSCUSTOM_ENABLE._serialized_end=1192 + _MAPEDITREQUEST_ROOMSCUSTOM_ORDER._serialized_start=1194 + _MAPEDITREQUEST_ROOMSCUSTOM_ORDER._serialized_end=1303 + _MAPEDITREQUEST_ROOMSCUSTOM_ORDER_ROOM._serialized_start=1270 + _MAPEDITREQUEST_ROOMSCUSTOM_ORDER_ROOM._serialized_end=1303 + _MAPEDITREQUEST_ROOMSCUSTOM_PARM._serialized_start=1306 + _MAPEDITREQUEST_ROOMSCUSTOM_PARM._serialized_end=1668 + _MAPEDITREQUEST_ROOMSCUSTOM_PARM_ROOM._serialized_start=1381 + _MAPEDITREQUEST_ROOMSCUSTOM_PARM_ROOM._serialized_end=1668 + _MAPEDITREQUEST_ROOMSCUSTOM_PARM_ROOM_CUSTOM._serialized_start=1476 + _MAPEDITREQUEST_ROOMSCUSTOM_PARM_ROOM_CUSTOM._serialized_end=1668 + _MAPEDITREQUEST_ROOMSCUSTOM_CONDITION._serialized_start=1670 + _MAPEDITREQUEST_ROOMSCUSTOM_CONDITION._serialized_end=1723 + _MAPEDITREQUEST_ROOMDESC._serialized_start=1725 + _MAPEDITREQUEST_ROOMDESC._serialized_end=1835 + _MAPEDITREQUEST_CRUISEPOINTS._serialized_start=1837 + _MAPEDITREQUEST_CRUISEPOINTS._serialized_end=1887 + _MAPEDITREQUEST_ROTATION._serialized_start=1889 + _MAPEDITREQUEST_ROTATION._serialized_end=1914 + _MAPEDITREQUEST_IGNOREOBSTACLE._serialized_start=1916 + _MAPEDITREQUEST_IGNOREOBSTACLE._serialized_end=2021 + _MAPEDITREQUEST_METHOD._serialized_start=2024 + _MAPEDITREQUEST_METHOD._serialized_end=2206 + _MAPEDITRESPONSE._serialized_start=2218 + _MAPEDITRESPONSE._serialized_end=2611 + _MAPEDITRESPONSE_FAILCODE._serialized_start=2414 + _MAPEDITRESPONSE_FAILCODE._serialized_end=2563 + _MAPEDITRESPONSE_FAILCODE_VALUE._serialized_start=2486 + _MAPEDITRESPONSE_FAILCODE_VALUE._serialized_end=2563 + _MAPEDITRESPONSE_RESULT._serialized_start=2565 + _MAPEDITRESPONSE_RESULT._serialized_end=2611 +# @@protoc_insertion_point(module_scope) diff --git a/proto-reference/map_edit_pb2.pyi b/proto-reference/map_edit_pb2.pyi new file mode 100644 index 0000000..fc58f99 --- /dev/null +++ b/proto-reference/map_edit_pb2.pyi @@ -0,0 +1,184 @@ +from typing import ClassVar as _ClassVar +from typing import Iterable as _Iterable +from typing import Mapping as _Mapping +from typing import Optional as _Optional +from typing import Union as _Union + +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf.internal import containers as _containers +from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper + +from ...proto.cloud import clean_param_pb2 as _clean_param_pb2 +from ...proto.cloud import common_pb2 as _common_pb2 +from ...proto.cloud import stream_pb2 as _stream_pb2 + +DESCRIPTOR: _descriptor.FileDescriptor + +class MapEditRequest(_message.Message): + __slots__ = ["cruise_points", "divide_room", "ignore_obstacle", "map_id", "merge_rooms", "method", "restricted_zone", "room_desc", "rooms_custom", "rotation", "seq"] + class Method(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + class CruisePoints(_message.Message): + __slots__ = ["points"] + POINTS_FIELD_NUMBER: _ClassVar[int] + points: _containers.RepeatedCompositeFieldContainer[_common_pb2.Point] + def __init__(self, points: _Optional[_Iterable[_Union[_common_pb2.Point, _Mapping]]] = ...) -> None: ... + class DivideRoom(_message.Message): + __slots__ = ["points", "room_id"] + POINTS_FIELD_NUMBER: _ClassVar[int] + ROOM_ID_FIELD_NUMBER: _ClassVar[int] + points: _containers.RepeatedCompositeFieldContainer[_common_pb2.Point] + room_id: int + def __init__(self, room_id: _Optional[int] = ..., points: _Optional[_Iterable[_Union[_common_pb2.Point, _Mapping]]] = ...) -> None: ... + class IgnoreObstacle(_message.Message): + __slots__ = ["object_type", "photo_id", "point", "valid"] + OBJECT_TYPE_FIELD_NUMBER: _ClassVar[int] + PHOTO_ID_FIELD_NUMBER: _ClassVar[int] + POINT_FIELD_NUMBER: _ClassVar[int] + VALID_FIELD_NUMBER: _ClassVar[int] + object_type: str + photo_id: str + point: _common_pb2.Point + valid: bool + def __init__(self, valid: bool = ..., object_type: _Optional[str] = ..., photo_id: _Optional[str] = ..., point: _Optional[_Union[_common_pb2.Point, _Mapping]] = ...) -> None: ... + class MergeRooms(_message.Message): + __slots__ = ["room_ids"] + ROOM_IDS_FIELD_NUMBER: _ClassVar[int] + room_ids: _containers.RepeatedScalarFieldContainer[int] + def __init__(self, room_ids: _Optional[_Iterable[int]] = ...) -> None: ... + class RoomDesc(_message.Message): + __slots__ = ["floor", "id", "name", "scene"] + FLOOR_FIELD_NUMBER: _ClassVar[int] + ID_FIELD_NUMBER: _ClassVar[int] + NAME_FIELD_NUMBER: _ClassVar[int] + SCENE_FIELD_NUMBER: _ClassVar[int] + floor: _common_pb2.Floor + id: int + name: str + scene: _common_pb2.RoomScene + def __init__(self, id: _Optional[int] = ..., name: _Optional[str] = ..., floor: _Optional[_Union[_common_pb2.Floor, _Mapping]] = ..., scene: _Optional[_Union[_common_pb2.RoomScene, _Mapping]] = ...) -> None: ... + class RoomsCustom(_message.Message): + __slots__ = ["condition", "custom_enable", "rooms_order", "rooms_parm", "smart_mode_sw"] + class Condition(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + class Enable(_message.Message): + __slots__ = ["value"] + VALUE_FIELD_NUMBER: _ClassVar[int] + value: bool + def __init__(self, value: bool = ...) -> None: ... + class Order(_message.Message): + __slots__ = ["rooms"] + class Room(_message.Message): + __slots__ = ["id", "order"] + ID_FIELD_NUMBER: _ClassVar[int] + ORDER_FIELD_NUMBER: _ClassVar[int] + id: int + order: int + def __init__(self, id: _Optional[int] = ..., order: _Optional[int] = ...) -> None: ... + ROOMS_FIELD_NUMBER: _ClassVar[int] + rooms: _containers.RepeatedCompositeFieldContainer[MapEditRequest.RoomsCustom.Order.Room] + def __init__(self, rooms: _Optional[_Iterable[_Union[MapEditRequest.RoomsCustom.Order.Room, _Mapping]]] = ...) -> None: ... + class Parm(_message.Message): + __slots__ = ["rooms"] + class Room(_message.Message): + __slots__ = ["custom", "id"] + class Custom(_message.Message): + __slots__ = ["clean_extent", "clean_times", "clean_type", "fan", "mop_mode"] + CLEAN_EXTENT_FIELD_NUMBER: _ClassVar[int] + CLEAN_TIMES_FIELD_NUMBER: _ClassVar[int] + CLEAN_TYPE_FIELD_NUMBER: _ClassVar[int] + FAN_FIELD_NUMBER: _ClassVar[int] + MOP_MODE_FIELD_NUMBER: _ClassVar[int] + clean_extent: _clean_param_pb2.CleanExtent + clean_times: int + clean_type: _clean_param_pb2.CleanType + fan: _clean_param_pb2.Fan + mop_mode: _clean_param_pb2.MopMode + def __init__(self, clean_type: _Optional[_Union[_clean_param_pb2.CleanType, _Mapping]] = ..., fan: _Optional[_Union[_clean_param_pb2.Fan, _Mapping]] = ..., mop_mode: _Optional[_Union[_clean_param_pb2.MopMode, _Mapping]] = ..., clean_extent: _Optional[_Union[_clean_param_pb2.CleanExtent, _Mapping]] = ..., clean_times: _Optional[int] = ...) -> None: ... + CUSTOM_FIELD_NUMBER: _ClassVar[int] + ID_FIELD_NUMBER: _ClassVar[int] + custom: MapEditRequest.RoomsCustom.Parm.Room.Custom + id: int + def __init__(self, id: _Optional[int] = ..., custom: _Optional[_Union[MapEditRequest.RoomsCustom.Parm.Room.Custom, _Mapping]] = ...) -> None: ... + ROOMS_FIELD_NUMBER: _ClassVar[int] + rooms: _containers.RepeatedCompositeFieldContainer[MapEditRequest.RoomsCustom.Parm.Room] + def __init__(self, rooms: _Optional[_Iterable[_Union[MapEditRequest.RoomsCustom.Parm.Room, _Mapping]]] = ...) -> None: ... + CONDITION_FIELD_NUMBER: _ClassVar[int] + CUSTOM_ENABLE_FIELD_NUMBER: _ClassVar[int] + GENERAL: MapEditRequest.RoomsCustom.Condition + RESERVATION_IN_PROGRESS: MapEditRequest.RoomsCustom.Condition + ROOMS_ORDER_FIELD_NUMBER: _ClassVar[int] + ROOMS_PARM_FIELD_NUMBER: _ClassVar[int] + SMART_MODE_SW_FIELD_NUMBER: _ClassVar[int] + condition: MapEditRequest.RoomsCustom.Condition + custom_enable: MapEditRequest.RoomsCustom.Enable + rooms_order: MapEditRequest.RoomsCustom.Order + rooms_parm: MapEditRequest.RoomsCustom.Parm + smart_mode_sw: _common_pb2.Switch + def __init__(self, custom_enable: _Optional[_Union[MapEditRequest.RoomsCustom.Enable, _Mapping]] = ..., rooms_order: _Optional[_Union[MapEditRequest.RoomsCustom.Order, _Mapping]] = ..., rooms_parm: _Optional[_Union[MapEditRequest.RoomsCustom.Parm, _Mapping]] = ..., smart_mode_sw: _Optional[_Union[_common_pb2.Switch, _Mapping]] = ..., condition: _Optional[_Union[MapEditRequest.RoomsCustom.Condition, str]] = ...) -> None: ... + class Rotation(_message.Message): + __slots__ = ["angle"] + ANGLE_FIELD_NUMBER: _ClassVar[int] + angle: int + def __init__(self, angle: _Optional[int] = ...) -> None: ... + CRUISE_POINTS_FIELD_NUMBER: _ClassVar[int] + DIVIDE_ROOM: MapEditRequest.Method + DIVIDE_ROOM_FIELD_NUMBER: _ClassVar[int] + IGNORE_OBSTACLE: MapEditRequest.Method + IGNORE_OBSTACLE_FIELD_NUMBER: _ClassVar[int] + MAP_ID_FIELD_NUMBER: _ClassVar[int] + MERGE_ROOMS: MapEditRequest.Method + MERGE_ROOMS_FIELD_NUMBER: _ClassVar[int] + METHOD_FIELD_NUMBER: _ClassVar[int] + RENAME_ROOM: MapEditRequest.Method + RESET_ROOMS: MapEditRequest.Method + RESTRICTED_ZONE_FIELD_NUMBER: _ClassVar[int] + ROOMS_CUSTOM_FIELD_NUMBER: _ClassVar[int] + ROOM_DESC_FIELD_NUMBER: _ClassVar[int] + ROTATION: MapEditRequest.Method + ROTATION_FIELD_NUMBER: _ClassVar[int] + SEQ_FIELD_NUMBER: _ClassVar[int] + SET_CRUISE_POINTS: MapEditRequest.Method + SET_RESTRICTED_ZONES: MapEditRequest.Method + SET_ROOMS_CUSTOM: MapEditRequest.Method + cruise_points: MapEditRequest.CruisePoints + divide_room: MapEditRequest.DivideRoom + ignore_obstacle: MapEditRequest.IgnoreObstacle + map_id: int + merge_rooms: MapEditRequest.MergeRooms + method: MapEditRequest.Method + restricted_zone: _stream_pb2.RestrictedZone + room_desc: MapEditRequest.RoomDesc + rooms_custom: MapEditRequest.RoomsCustom + rotation: MapEditRequest.Rotation + seq: int + def __init__(self, method: _Optional[_Union[MapEditRequest.Method, str]] = ..., seq: _Optional[int] = ..., map_id: _Optional[int] = ..., merge_rooms: _Optional[_Union[MapEditRequest.MergeRooms, _Mapping]] = ..., divide_room: _Optional[_Union[MapEditRequest.DivideRoom, _Mapping]] = ..., restricted_zone: _Optional[_Union[_stream_pb2.RestrictedZone, _Mapping]] = ..., room_desc: _Optional[_Union[MapEditRequest.RoomDesc, _Mapping]] = ..., rooms_custom: _Optional[_Union[MapEditRequest.RoomsCustom, _Mapping]] = ..., cruise_points: _Optional[_Union[MapEditRequest.CruisePoints, _Mapping]] = ..., rotation: _Optional[_Union[MapEditRequest.Rotation, _Mapping]] = ..., ignore_obstacle: _Optional[_Union[MapEditRequest.IgnoreObstacle, _Mapping]] = ...) -> None: ... + +class MapEditResponse(_message.Message): + __slots__ = ["fail_code", "method", "result", "seq"] + class Result(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + class FailCode(_message.Message): + __slots__ = ["value"] + class Value(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + AREA_SMALL: MapEditResponse.FailCode.Value + ROOM_UNADJACENT: MapEditResponse.FailCode.Value + TOO_MANY_ROOMS: MapEditResponse.FailCode.Value + UNKNOWN: MapEditResponse.FailCode.Value + VALUE_FIELD_NUMBER: _ClassVar[int] + value: MapEditResponse.FailCode.Value + def __init__(self, value: _Optional[_Union[MapEditResponse.FailCode.Value, str]] = ...) -> None: ... + FAILED: MapEditResponse.Result + FAIL_CODE_FIELD_NUMBER: _ClassVar[int] + METHOD_FIELD_NUMBER: _ClassVar[int] + RESULT_FIELD_NUMBER: _ClassVar[int] + SEQ_FIELD_NUMBER: _ClassVar[int] + STARTED: MapEditResponse.Result + SUCCESS: MapEditResponse.Result + fail_code: MapEditResponse.FailCode + method: MapEditRequest.Method + result: MapEditResponse.Result + seq: int + def __init__(self, method: _Optional[_Union[MapEditRequest.Method, str]] = ..., seq: _Optional[int] = ..., result: _Optional[_Union[MapEditResponse.Result, str]] = ..., fail_code: _Optional[_Union[MapEditResponse.FailCode, _Mapping]] = ...) -> None: ... diff --git a/proto-reference/map_manage.proto b/proto-reference/map_manage.proto new file mode 100644 index 0000000..346b9d1 --- /dev/null +++ b/proto-reference/map_manage.proto @@ -0,0 +1,50 @@ +/** + * 地图管理相关协议,存储在云端的地图文件信息. + * + * 此协议与云端存储方式相关,目前以涂鸦为例: + * 涂鸦地图可以存储多张,每张地图有两个通道,分别是显示地图通道和特征地图通道, + * 由于特征地图目前已经不需要,故将地图通道数据拆开分两部分:MapEntity 和 MapExtras. + */ +syntax = "proto3"; + +// option optimize_for = LITE_RUNTIME; + +package proto.cloud; + +import "proto/cloud/common.proto"; +import "proto/cloud/stream.proto"; + +/** + * 地图实体数据,包括 + - 地图描述; + - 地图像素; + */ +message MapEntity { + message Desc { + uint32 map_id = 1; + + uint32 width = 2; + uint32 height = 3; + uint32 resolution = 4; + + Point origin = 5; // 原点 + repeated Pose docks = 6; + } + Desc desc = 1; + + bytes pixel = 2; +} + +/** + * 地图附加信息,包括 + * - 地图名称; + * - 房间轮廓; + * - 房间参数; + * - 禁区; + */ +message MapExtras { + string name = 1; + repeated stream.RoomOutline room_outline = 2; + repeated stream.RoomParams room_params = 3; + stream.RestrictedZone restricted_zone = 4; +} diff --git a/proto-reference/map_manage_pb2.py b/proto-reference/map_manage_pb2.py new file mode 100644 index 0000000..e4df161 --- /dev/null +++ b/proto-reference/map_manage_pb2.py @@ -0,0 +1,31 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: proto/cloud/map_manage.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder + +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from ...proto.cloud import common_pb2 as proto_dot_cloud_dot_common__pb2 +from ...proto.cloud import stream_pb2 as proto_dot_cloud_dot_stream__pb2 + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1cproto/cloud/map_manage.proto\x12\x0bproto.cloud\x1a\x18proto/cloud/common.proto\x1a\x18proto/cloud/stream.proto\"\xd7\x01\n\tMapEntity\x12)\n\x04\x64\x65sc\x18\x01 \x01(\x0b\x32\x1b.proto.cloud.MapEntity.Desc\x12\r\n\x05pixel\x18\x02 \x01(\x0c\x1a\x8f\x01\n\x04\x44\x65sc\x12\x0e\n\x06map_id\x18\x01 \x01(\r\x12\r\n\x05width\x18\x02 \x01(\r\x12\x0e\n\x06height\x18\x03 \x01(\r\x12\x12\n\nresolution\x18\x04 \x01(\r\x12\"\n\x06origin\x18\x05 \x01(\x0b\x32\x12.proto.cloud.Point\x12 \n\x05\x64ocks\x18\x06 \x03(\x0b\x32\x11.proto.cloud.Pose\"\xc2\x01\n\tMapExtras\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x35\n\x0croom_outline\x18\x02 \x03(\x0b\x32\x1f.proto.cloud.stream.RoomOutline\x12\x33\n\x0broom_params\x18\x03 \x03(\x0b\x32\x1e.proto.cloud.stream.RoomParams\x12;\n\x0frestricted_zone\x18\x04 \x01(\x0b\x32\".proto.cloud.stream.RestrictedZoneb\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'proto.cloud.map_manage_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _MAPENTITY._serialized_start=98 + _MAPENTITY._serialized_end=313 + _MAPENTITY_DESC._serialized_start=170 + _MAPENTITY_DESC._serialized_end=313 + _MAPEXTRAS._serialized_start=316 + _MAPEXTRAS._serialized_end=510 +# @@protoc_insertion_point(module_scope) diff --git a/proto-reference/map_manage_pb2.pyi b/proto-reference/map_manage_pb2.pyi new file mode 100644 index 0000000..8b2ddcc --- /dev/null +++ b/proto-reference/map_manage_pb2.pyi @@ -0,0 +1,49 @@ +from typing import ClassVar as _ClassVar +from typing import Iterable as _Iterable +from typing import Mapping as _Mapping +from typing import Optional as _Optional +from typing import Union as _Union + +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf.internal import containers as _containers + +from ...proto.cloud import common_pb2 as _common_pb2 +from ...proto.cloud import stream_pb2 as _stream_pb2 + +DESCRIPTOR: _descriptor.FileDescriptor + +class MapEntity(_message.Message): + __slots__ = ["desc", "pixel"] + class Desc(_message.Message): + __slots__ = ["docks", "height", "map_id", "origin", "resolution", "width"] + DOCKS_FIELD_NUMBER: _ClassVar[int] + HEIGHT_FIELD_NUMBER: _ClassVar[int] + MAP_ID_FIELD_NUMBER: _ClassVar[int] + ORIGIN_FIELD_NUMBER: _ClassVar[int] + RESOLUTION_FIELD_NUMBER: _ClassVar[int] + WIDTH_FIELD_NUMBER: _ClassVar[int] + docks: _containers.RepeatedCompositeFieldContainer[_common_pb2.Pose] + height: int + map_id: int + origin: _common_pb2.Point + resolution: int + width: int + def __init__(self, map_id: _Optional[int] = ..., width: _Optional[int] = ..., height: _Optional[int] = ..., resolution: _Optional[int] = ..., origin: _Optional[_Union[_common_pb2.Point, _Mapping]] = ..., docks: _Optional[_Iterable[_Union[_common_pb2.Pose, _Mapping]]] = ...) -> None: ... + DESC_FIELD_NUMBER: _ClassVar[int] + PIXEL_FIELD_NUMBER: _ClassVar[int] + desc: MapEntity.Desc + pixel: bytes + def __init__(self, desc: _Optional[_Union[MapEntity.Desc, _Mapping]] = ..., pixel: _Optional[bytes] = ...) -> None: ... + +class MapExtras(_message.Message): + __slots__ = ["name", "restricted_zone", "room_outline", "room_params"] + NAME_FIELD_NUMBER: _ClassVar[int] + RESTRICTED_ZONE_FIELD_NUMBER: _ClassVar[int] + ROOM_OUTLINE_FIELD_NUMBER: _ClassVar[int] + ROOM_PARAMS_FIELD_NUMBER: _ClassVar[int] + name: str + restricted_zone: _stream_pb2.RestrictedZone + room_outline: _containers.RepeatedCompositeFieldContainer[_stream_pb2.RoomOutline] + room_params: _containers.RepeatedCompositeFieldContainer[_stream_pb2.RoomParams] + def __init__(self, name: _Optional[str] = ..., room_outline: _Optional[_Iterable[_Union[_stream_pb2.RoomOutline, _Mapping]]] = ..., room_params: _Optional[_Iterable[_Union[_stream_pb2.RoomParams, _Mapping]]] = ..., restricted_zone: _Optional[_Union[_stream_pb2.RestrictedZone, _Mapping]] = ...) -> None: ... diff --git a/proto-reference/media_manager.proto b/proto-reference/media_manager.proto new file mode 100644 index 0000000..f811e0e --- /dev/null +++ b/proto-reference/media_manager.proto @@ -0,0 +1,116 @@ +/** + * media控制协议; + */ +syntax = "proto3"; + +// option optimize_for = LITE_RUNTIME; + +package proto.cloud; + +message MediaSetting { + enum Resolution { + R_480P = 0; + R_720P = 1; + R_1080P = 2; + } + + // 实时视频流参数 + message RTStream { + Resolution resolution = 1; + } + RTStream rt_stream = 1; + + // 录像参数 + message Record { + Resolution resolution = 1; + uint32 bitrate = 2; + } + Record record = 2; + + // 拍照参数 + message Capture { + uint32 width = 1; + uint32 height = 2; + } + Capture capture = 3; +} + +message MediaStatus { + enum State { + IDLE = 0; // 空闲 + RECORDING = 1; // 录像中 + } + State state = 1; + + enum Storage { + NORMAL = 0; + THRESHOLD = 1; // 达到阈值 + FULL = 2; // 存储空间满 + } + Storage storage = 2; + + uint32 total_space = 3; // 总空间大小(单位 kb,下同) + uint32 photo_space = 4; // 照片占用空间大小 + uint32 video_space = 5; // 视频占用空间大小 + bool bind_state = 6; // 是否已绑定云 +} + +message MediaManagerRequest { + // 媒体控制 + message Control { + enum Method { + RECORD_START = 0; // 开始录像 + RECORD_STOP = 1; // 停止录像 + CAPTURE = 2; // 执行拍照 + } + Method method = 1; + uint32 seq = 2; // 序号 + } + Control control = 1; + + MediaSetting setting = 2; + + message BindMediaSvc { + uint32 seq = 1; + uint32 c = 2; + uint32 d = 3; + string g = 4; + uint32 j = 5; + string user_account = 6; + } + BindMediaSvc bind_media_svc_data = 3; +} + +message MediaManagerResponse { + // 媒体控制结果 + message Control { + MediaManagerRequest.Control.Method method = 1; + uint32 seq = 2; // 返回与Request相同的seq + + enum Result { + SUCCESS = 0; + FAIL = 1; + } + Result result = 3; + + message FileInfo { + string filepath = 1; + string id = 2; + } + FileInfo file_info = 4; + } + Control control = 1; + + MediaSetting setting = 2; + MediaStatus status = 3; + + message BindMediaSvc { + uint32 seq = 1; + enum Result { + SUCCESS = 0; + FAIL = 1; + } + Result result = 2; + } + BindMediaSvc bind_media_svc = 4; +} diff --git a/proto-reference/media_manager_pb2.py b/proto-reference/media_manager_pb2.py new file mode 100644 index 0000000..9951edf --- /dev/null +++ b/proto-reference/media_manager_pb2.py @@ -0,0 +1,59 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: proto/cloud/media_manager.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1fproto/cloud/media_manager.proto\x12\x0bproto.cloud\"\xa3\x03\n\x0cMediaSetting\x12\x35\n\trt_stream\x18\x01 \x01(\x0b\x32\".proto.cloud.MediaSetting.RTStream\x12\x30\n\x06record\x18\x02 \x01(\x0b\x32 .proto.cloud.MediaSetting.Record\x12\x32\n\x07\x63\x61pture\x18\x03 \x01(\x0b\x32!.proto.cloud.MediaSetting.Capture\x1a\x44\n\x08RTStream\x12\x38\n\nresolution\x18\x01 \x01(\x0e\x32$.proto.cloud.MediaSetting.Resolution\x1aS\n\x06Record\x12\x38\n\nresolution\x18\x01 \x01(\x0e\x32$.proto.cloud.MediaSetting.Resolution\x12\x0f\n\x07\x62itrate\x18\x02 \x01(\r\x1a(\n\x07\x43\x61pture\x12\r\n\x05width\x18\x01 \x01(\r\x12\x0e\n\x06height\x18\x02 \x01(\r\"1\n\nResolution\x12\n\n\x06R_480P\x10\x00\x12\n\n\x06R_720P\x10\x01\x12\x0b\n\x07R_1080P\x10\x02\"\x94\x02\n\x0bMediaStatus\x12-\n\x05state\x18\x01 \x01(\x0e\x32\x1e.proto.cloud.MediaStatus.State\x12\x31\n\x07storage\x18\x02 \x01(\x0e\x32 .proto.cloud.MediaStatus.Storage\x12\x13\n\x0btotal_space\x18\x03 \x01(\r\x12\x13\n\x0bphoto_space\x18\x04 \x01(\r\x12\x13\n\x0bvideo_space\x18\x05 \x01(\r\x12\x12\n\nbind_state\x18\x06 \x01(\x08\" \n\x05State\x12\x08\n\x04IDLE\x10\x00\x12\r\n\tRECORDING\x10\x01\".\n\x07Storage\x12\n\n\x06NORMAL\x10\x00\x12\r\n\tTHRESHOLD\x10\x01\x12\x08\n\x04\x46ULL\x10\x02\"\xbb\x03\n\x13MediaManagerRequest\x12\x39\n\x07\x63ontrol\x18\x01 \x01(\x0b\x32(.proto.cloud.MediaManagerRequest.Control\x12*\n\x07setting\x18\x02 \x01(\x0b\x32\x19.proto.cloud.MediaSetting\x12J\n\x13\x62ind_media_svc_data\x18\x03 \x01(\x0b\x32-.proto.cloud.MediaManagerRequest.BindMediaSvc\x1a\x91\x01\n\x07\x43ontrol\x12?\n\x06method\x18\x01 \x01(\x0e\x32/.proto.cloud.MediaManagerRequest.Control.Method\x12\x0b\n\x03seq\x18\x02 \x01(\r\"8\n\x06Method\x12\x10\n\x0cRECORD_START\x10\x00\x12\x0f\n\x0bRECORD_STOP\x10\x01\x12\x0b\n\x07\x43\x41PTURE\x10\x02\x1a]\n\x0c\x42indMediaSvc\x12\x0b\n\x03seq\x18\x01 \x01(\r\x12\t\n\x01\x63\x18\x02 \x01(\r\x12\t\n\x01\x64\x18\x03 \x01(\r\x12\t\n\x01g\x18\x04 \x01(\t\x12\t\n\x01j\x18\x05 \x01(\r\x12\x14\n\x0cuser_account\x18\x06 \x01(\t\"\xa4\x05\n\x14MediaManagerResponse\x12:\n\x07\x63ontrol\x18\x01 \x01(\x0b\x32).proto.cloud.MediaManagerResponse.Control\x12*\n\x07setting\x18\x02 \x01(\x0b\x32\x19.proto.cloud.MediaSetting\x12(\n\x06status\x18\x03 \x01(\x0b\x32\x18.proto.cloud.MediaStatus\x12\x46\n\x0e\x62ind_media_svc\x18\x04 \x01(\x0b\x32..proto.cloud.MediaManagerResponse.BindMediaSvc\x1a\xab\x02\n\x07\x43ontrol\x12?\n\x06method\x18\x01 \x01(\x0e\x32/.proto.cloud.MediaManagerRequest.Control.Method\x12\x0b\n\x03seq\x18\x02 \x01(\r\x12@\n\x06result\x18\x03 \x01(\x0e\x32\x30.proto.cloud.MediaManagerResponse.Control.Result\x12\x45\n\tfile_info\x18\x04 \x01(\x0b\x32\x32.proto.cloud.MediaManagerResponse.Control.FileInfo\x1a(\n\x08\x46ileInfo\x12\x10\n\x08\x66ilepath\x18\x01 \x01(\t\x12\n\n\x02id\x18\x02 \x01(\t\"\x1f\n\x06Result\x12\x0b\n\x07SUCCESS\x10\x00\x12\x08\n\x04\x46\x41IL\x10\x01\x1a\x83\x01\n\x0c\x42indMediaSvc\x12\x0b\n\x03seq\x18\x01 \x01(\r\x12\x45\n\x06result\x18\x02 \x01(\x0e\x32\x35.proto.cloud.MediaManagerResponse.BindMediaSvc.Result\"\x1f\n\x06Result\x12\x0b\n\x07SUCCESS\x10\x00\x12\x08\n\x04\x46\x41IL\x10\x01\x62\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'proto.cloud.media_manager_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _MEDIASETTING._serialized_start=49 + _MEDIASETTING._serialized_end=468 + _MEDIASETTING_RTSTREAM._serialized_start=222 + _MEDIASETTING_RTSTREAM._serialized_end=290 + _MEDIASETTING_RECORD._serialized_start=292 + _MEDIASETTING_RECORD._serialized_end=375 + _MEDIASETTING_CAPTURE._serialized_start=377 + _MEDIASETTING_CAPTURE._serialized_end=417 + _MEDIASETTING_RESOLUTION._serialized_start=419 + _MEDIASETTING_RESOLUTION._serialized_end=468 + _MEDIASTATUS._serialized_start=471 + _MEDIASTATUS._serialized_end=747 + _MEDIASTATUS_STATE._serialized_start=667 + _MEDIASTATUS_STATE._serialized_end=699 + _MEDIASTATUS_STORAGE._serialized_start=701 + _MEDIASTATUS_STORAGE._serialized_end=747 + _MEDIAMANAGERREQUEST._serialized_start=750 + _MEDIAMANAGERREQUEST._serialized_end=1193 + _MEDIAMANAGERREQUEST_CONTROL._serialized_start=953 + _MEDIAMANAGERREQUEST_CONTROL._serialized_end=1098 + _MEDIAMANAGERREQUEST_CONTROL_METHOD._serialized_start=1042 + _MEDIAMANAGERREQUEST_CONTROL_METHOD._serialized_end=1098 + _MEDIAMANAGERREQUEST_BINDMEDIASVC._serialized_start=1100 + _MEDIAMANAGERREQUEST_BINDMEDIASVC._serialized_end=1193 + _MEDIAMANAGERRESPONSE._serialized_start=1196 + _MEDIAMANAGERRESPONSE._serialized_end=1872 + _MEDIAMANAGERRESPONSE_CONTROL._serialized_start=1439 + _MEDIAMANAGERRESPONSE_CONTROL._serialized_end=1738 + _MEDIAMANAGERRESPONSE_CONTROL_FILEINFO._serialized_start=1665 + _MEDIAMANAGERRESPONSE_CONTROL_FILEINFO._serialized_end=1705 + _MEDIAMANAGERRESPONSE_CONTROL_RESULT._serialized_start=1707 + _MEDIAMANAGERRESPONSE_CONTROL_RESULT._serialized_end=1738 + _MEDIAMANAGERRESPONSE_BINDMEDIASVC._serialized_start=1741 + _MEDIAMANAGERRESPONSE_BINDMEDIASVC._serialized_end=1872 + _MEDIAMANAGERRESPONSE_BINDMEDIASVC_RESULT._serialized_start=1707 + _MEDIAMANAGERRESPONSE_BINDMEDIASVC_RESULT._serialized_end=1738 +# @@protoc_insertion_point(module_scope) diff --git a/proto-reference/media_manager_pb2.pyi b/proto-reference/media_manager_pb2.pyi new file mode 100644 index 0000000..ec1467c --- /dev/null +++ b/proto-reference/media_manager_pb2.pyi @@ -0,0 +1,147 @@ +from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Mapping as _Mapping, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class MediaManagerRequest(_message.Message): + __slots__ = ["bind_media_svc_data", "control", "setting"] + class BindMediaSvc(_message.Message): + __slots__ = ["c", "d", "g", "j", "seq", "user_account"] + C_FIELD_NUMBER: _ClassVar[int] + D_FIELD_NUMBER: _ClassVar[int] + G_FIELD_NUMBER: _ClassVar[int] + J_FIELD_NUMBER: _ClassVar[int] + SEQ_FIELD_NUMBER: _ClassVar[int] + USER_ACCOUNT_FIELD_NUMBER: _ClassVar[int] + c: int + d: int + g: str + j: int + seq: int + user_account: str + def __init__(self, seq: _Optional[int] = ..., c: _Optional[int] = ..., d: _Optional[int] = ..., g: _Optional[str] = ..., j: _Optional[int] = ..., user_account: _Optional[str] = ...) -> None: ... + class Control(_message.Message): + __slots__ = ["method", "seq"] + class Method(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + CAPTURE: MediaManagerRequest.Control.Method + METHOD_FIELD_NUMBER: _ClassVar[int] + RECORD_START: MediaManagerRequest.Control.Method + RECORD_STOP: MediaManagerRequest.Control.Method + SEQ_FIELD_NUMBER: _ClassVar[int] + method: MediaManagerRequest.Control.Method + seq: int + def __init__(self, method: _Optional[_Union[MediaManagerRequest.Control.Method, str]] = ..., seq: _Optional[int] = ...) -> None: ... + BIND_MEDIA_SVC_DATA_FIELD_NUMBER: _ClassVar[int] + CONTROL_FIELD_NUMBER: _ClassVar[int] + SETTING_FIELD_NUMBER: _ClassVar[int] + bind_media_svc_data: MediaManagerRequest.BindMediaSvc + control: MediaManagerRequest.Control + setting: MediaSetting + def __init__(self, control: _Optional[_Union[MediaManagerRequest.Control, _Mapping]] = ..., setting: _Optional[_Union[MediaSetting, _Mapping]] = ..., bind_media_svc_data: _Optional[_Union[MediaManagerRequest.BindMediaSvc, _Mapping]] = ...) -> None: ... + +class MediaManagerResponse(_message.Message): + __slots__ = ["bind_media_svc", "control", "setting", "status"] + class BindMediaSvc(_message.Message): + __slots__ = ["result", "seq"] + class Result(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + FAIL: MediaManagerResponse.BindMediaSvc.Result + RESULT_FIELD_NUMBER: _ClassVar[int] + SEQ_FIELD_NUMBER: _ClassVar[int] + SUCCESS: MediaManagerResponse.BindMediaSvc.Result + result: MediaManagerResponse.BindMediaSvc.Result + seq: int + def __init__(self, seq: _Optional[int] = ..., result: _Optional[_Union[MediaManagerResponse.BindMediaSvc.Result, str]] = ...) -> None: ... + class Control(_message.Message): + __slots__ = ["file_info", "method", "result", "seq"] + class Result(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + class FileInfo(_message.Message): + __slots__ = ["filepath", "id"] + FILEPATH_FIELD_NUMBER: _ClassVar[int] + ID_FIELD_NUMBER: _ClassVar[int] + filepath: str + id: str + def __init__(self, filepath: _Optional[str] = ..., id: _Optional[str] = ...) -> None: ... + FAIL: MediaManagerResponse.Control.Result + FILE_INFO_FIELD_NUMBER: _ClassVar[int] + METHOD_FIELD_NUMBER: _ClassVar[int] + RESULT_FIELD_NUMBER: _ClassVar[int] + SEQ_FIELD_NUMBER: _ClassVar[int] + SUCCESS: MediaManagerResponse.Control.Result + file_info: MediaManagerResponse.Control.FileInfo + method: MediaManagerRequest.Control.Method + result: MediaManagerResponse.Control.Result + seq: int + def __init__(self, method: _Optional[_Union[MediaManagerRequest.Control.Method, str]] = ..., seq: _Optional[int] = ..., result: _Optional[_Union[MediaManagerResponse.Control.Result, str]] = ..., file_info: _Optional[_Union[MediaManagerResponse.Control.FileInfo, _Mapping]] = ...) -> None: ... + BIND_MEDIA_SVC_FIELD_NUMBER: _ClassVar[int] + CONTROL_FIELD_NUMBER: _ClassVar[int] + SETTING_FIELD_NUMBER: _ClassVar[int] + STATUS_FIELD_NUMBER: _ClassVar[int] + bind_media_svc: MediaManagerResponse.BindMediaSvc + control: MediaManagerResponse.Control + setting: MediaSetting + status: MediaStatus + def __init__(self, control: _Optional[_Union[MediaManagerResponse.Control, _Mapping]] = ..., setting: _Optional[_Union[MediaSetting, _Mapping]] = ..., status: _Optional[_Union[MediaStatus, _Mapping]] = ..., bind_media_svc: _Optional[_Union[MediaManagerResponse.BindMediaSvc, _Mapping]] = ...) -> None: ... + +class MediaSetting(_message.Message): + __slots__ = ["capture", "record", "rt_stream"] + class Resolution(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + class Capture(_message.Message): + __slots__ = ["height", "width"] + HEIGHT_FIELD_NUMBER: _ClassVar[int] + WIDTH_FIELD_NUMBER: _ClassVar[int] + height: int + width: int + def __init__(self, width: _Optional[int] = ..., height: _Optional[int] = ...) -> None: ... + class RTStream(_message.Message): + __slots__ = ["resolution"] + RESOLUTION_FIELD_NUMBER: _ClassVar[int] + resolution: MediaSetting.Resolution + def __init__(self, resolution: _Optional[_Union[MediaSetting.Resolution, str]] = ...) -> None: ... + class Record(_message.Message): + __slots__ = ["bitrate", "resolution"] + BITRATE_FIELD_NUMBER: _ClassVar[int] + RESOLUTION_FIELD_NUMBER: _ClassVar[int] + bitrate: int + resolution: MediaSetting.Resolution + def __init__(self, resolution: _Optional[_Union[MediaSetting.Resolution, str]] = ..., bitrate: _Optional[int] = ...) -> None: ... + CAPTURE_FIELD_NUMBER: _ClassVar[int] + RECORD_FIELD_NUMBER: _ClassVar[int] + RT_STREAM_FIELD_NUMBER: _ClassVar[int] + R_1080P: MediaSetting.Resolution + R_480P: MediaSetting.Resolution + R_720P: MediaSetting.Resolution + capture: MediaSetting.Capture + record: MediaSetting.Record + rt_stream: MediaSetting.RTStream + def __init__(self, rt_stream: _Optional[_Union[MediaSetting.RTStream, _Mapping]] = ..., record: _Optional[_Union[MediaSetting.Record, _Mapping]] = ..., capture: _Optional[_Union[MediaSetting.Capture, _Mapping]] = ...) -> None: ... + +class MediaStatus(_message.Message): + __slots__ = ["bind_state", "photo_space", "state", "storage", "total_space", "video_space"] + class State(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + class Storage(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + BIND_STATE_FIELD_NUMBER: _ClassVar[int] + FULL: MediaStatus.Storage + IDLE: MediaStatus.State + NORMAL: MediaStatus.Storage + PHOTO_SPACE_FIELD_NUMBER: _ClassVar[int] + RECORDING: MediaStatus.State + STATE_FIELD_NUMBER: _ClassVar[int] + STORAGE_FIELD_NUMBER: _ClassVar[int] + THRESHOLD: MediaStatus.Storage + TOTAL_SPACE_FIELD_NUMBER: _ClassVar[int] + VIDEO_SPACE_FIELD_NUMBER: _ClassVar[int] + bind_state: bool + photo_space: int + state: MediaStatus.State + storage: MediaStatus.Storage + total_space: int + video_space: int + def __init__(self, state: _Optional[_Union[MediaStatus.State, str]] = ..., storage: _Optional[_Union[MediaStatus.Storage, str]] = ..., total_space: _Optional[int] = ..., photo_space: _Optional[int] = ..., video_space: _Optional[int] = ..., bind_state: bool = ...) -> None: ... diff --git a/proto-reference/misc.proto b/proto-reference/misc.proto new file mode 100644 index 0000000..5b7494f --- /dev/null +++ b/proto-reference/misc.proto @@ -0,0 +1,19 @@ +syntax = "proto3"; + +// option optimize_for = LITE_RUNTIME; + +package proto.cloud; + +import "proto/cloud/common.proto"; + +message Volume { + uint32 value = 1; // 0 - 100 +} + +message Power { + Switch sw = 1; +} + +message Battery { + uint32 level = 1; // 0 - 100 +} diff --git a/proto-reference/misc_pb2.py b/proto-reference/misc_pb2.py new file mode 100644 index 0000000..9e2702d --- /dev/null +++ b/proto-reference/misc_pb2.py @@ -0,0 +1,30 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: proto/cloud/misc.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder + +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from ...proto.cloud import common_pb2 as proto_dot_cloud_dot_common__pb2 + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x16proto/cloud/misc.proto\x12\x0bproto.cloud\x1a\x18proto/cloud/common.proto\"\x17\n\x06Volume\x12\r\n\x05value\x18\x01 \x01(\r\"(\n\x05Power\x12\x1f\n\x02sw\x18\x01 \x01(\x0b\x32\x13.proto.cloud.Switch\"\x18\n\x07\x42\x61ttery\x12\r\n\x05level\x18\x01 \x01(\rb\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'proto.cloud.misc_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _VOLUME._serialized_start=65 + _VOLUME._serialized_end=88 + _POWER._serialized_start=90 + _POWER._serialized_end=130 + _BATTERY._serialized_start=132 + _BATTERY._serialized_end=156 +# @@protoc_insertion_point(module_scope) diff --git a/proto-reference/misc_pb2.pyi b/proto-reference/misc_pb2.pyi new file mode 100644 index 0000000..e76366d --- /dev/null +++ b/proto-reference/misc_pb2.pyi @@ -0,0 +1,29 @@ +from typing import ClassVar as _ClassVar +from typing import Mapping as _Mapping +from typing import Optional as _Optional +from typing import Union as _Union + +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message + +from ...proto.cloud import common_pb2 as _common_pb2 + +DESCRIPTOR: _descriptor.FileDescriptor + +class Battery(_message.Message): + __slots__ = ["level"] + LEVEL_FIELD_NUMBER: _ClassVar[int] + level: int + def __init__(self, level: _Optional[int] = ...) -> None: ... + +class Power(_message.Message): + __slots__ = ["sw"] + SW_FIELD_NUMBER: _ClassVar[int] + sw: _common_pb2.Switch + def __init__(self, sw: _Optional[_Union[_common_pb2.Switch, _Mapping]] = ...) -> None: ... + +class Volume(_message.Message): + __slots__ = ["value"] + VALUE_FIELD_NUMBER: _ClassVar[int] + value: int + def __init__(self, value: _Optional[int] = ...) -> None: ... diff --git a/proto-reference/multi_maps.proto b/proto-reference/multi_maps.proto new file mode 100644 index 0000000..0db3c29 --- /dev/null +++ b/proto-reference/multi_maps.proto @@ -0,0 +1,70 @@ +syntax = "proto3"; + +// option optimize_for = LITE_RUNTIME; + +package proto.cloud; + +import "proto/cloud/common.proto"; +import "proto/cloud/p2pdata.proto"; + +// 所有的Request均使用tuya DP发送 +message MultiMapsManageRequest { + enum Method { + MAP_RESET = 0; // 不带参 + MAP_RENAME = 1; // message Rename + MAP_LOAD = 2; // message Common + MAP_REPLACE = 3; // message Common + MAP_DELETE = 4; // message Common + MAP_SAVE = 5; // message SaveOptions + MAP_IGNORE = 6; // 忽略当前地图(不保存),不带参 + MAP_GET_ALL = 7; // 获取所有地址, p2p同时加入 + MAP_GET_ONE = 8; // 获取单个地图, p2p同时加入 + MAP_RECOVERY = 9; // 恢复地图,message Common + } + + Method method = 1; + uint32 seq = 2; + + message Rename { + uint32 cloud_mapid = 1; // TODO: 是否使用cloud_mapid与多地图方案有关; + string new_name = 2; + } + + message Common { + uint32 cloud_mapid = 1; + } + + message SaveOptions { + Switch multi_map_sw = 1; + } + + oneof Param { + Rename rename = 3; + Common common = 4; + SaveOptions save_options = 5; + } +} + +// 请求中method == MAP_GET_ALL或MAP_GET_ONE时, 使用p2p传送 +// 其它使用tuya DP传送 +message MultiMapsManageResponse { + MultiMapsManageRequest.Method method = 1; + uint32 seq = 2; + + enum Result { + SUCCESS = 0; + FAILED = 1; + STARTED = 2; + } + Result result = 3; + + // p2p同时加入, 请求中method == MAP_GET_ALL或MAP_GET_ONE时使用. + message CompleteMaps { + repeated p2p.CompleteMap complete_map = 1; + } + + oneof Param { + p2p.MapInfo map_infos = 11; + CompleteMaps complete_maps = 12; + } +} diff --git a/proto-reference/multi_maps_pb2.py b/proto-reference/multi_maps_pb2.py new file mode 100644 index 0000000..2f251c8 --- /dev/null +++ b/proto-reference/multi_maps_pb2.py @@ -0,0 +1,41 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: proto/cloud/multi_maps.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder + +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from ...proto.cloud import common_pb2 as proto_dot_cloud_dot_common__pb2 +from ...proto.cloud import p2pdata_pb2 as proto_dot_cloud_dot_p2pdata__pb2 + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1cproto/cloud/multi_maps.proto\x12\x0bproto.cloud\x1a\x18proto/cloud/common.proto\x1a\x19proto/cloud/p2pdata.proto\"\xe4\x04\n\x16MultiMapsManageRequest\x12:\n\x06method\x18\x01 \x01(\x0e\x32*.proto.cloud.MultiMapsManageRequest.Method\x12\x0b\n\x03seq\x18\x02 \x01(\r\x12<\n\x06rename\x18\x03 \x01(\x0b\x32*.proto.cloud.MultiMapsManageRequest.RenameH\x00\x12<\n\x06\x63ommon\x18\x04 \x01(\x0b\x32*.proto.cloud.MultiMapsManageRequest.CommonH\x00\x12G\n\x0csave_options\x18\x05 \x01(\x0b\x32/.proto.cloud.MultiMapsManageRequest.SaveOptionsH\x00\x1a/\n\x06Rename\x12\x13\n\x0b\x63loud_mapid\x18\x01 \x01(\r\x12\x10\n\x08new_name\x18\x02 \x01(\t\x1a\x1d\n\x06\x43ommon\x12\x13\n\x0b\x63loud_mapid\x18\x01 \x01(\r\x1a\x38\n\x0bSaveOptions\x12)\n\x0cmulti_map_sw\x18\x01 \x01(\x0b\x32\x13.proto.cloud.Switch\"\xa8\x01\n\x06Method\x12\r\n\tMAP_RESET\x10\x00\x12\x0e\n\nMAP_RENAME\x10\x01\x12\x0c\n\x08MAP_LOAD\x10\x02\x12\x0f\n\x0bMAP_REPLACE\x10\x03\x12\x0e\n\nMAP_DELETE\x10\x04\x12\x0c\n\x08MAP_SAVE\x10\x05\x12\x0e\n\nMAP_IGNORE\x10\x06\x12\x0f\n\x0bMAP_GET_ALL\x10\x07\x12\x0f\n\x0bMAP_GET_ONE\x10\x08\x12\x10\n\x0cMAP_RECOVERY\x10\tB\x07\n\x05Param\"\x97\x03\n\x17MultiMapsManageResponse\x12:\n\x06method\x18\x01 \x01(\x0e\x32*.proto.cloud.MultiMapsManageRequest.Method\x12\x0b\n\x03seq\x18\x02 \x01(\r\x12;\n\x06result\x18\x03 \x01(\x0e\x32+.proto.cloud.MultiMapsManageResponse.Result\x12-\n\tmap_infos\x18\x0b \x01(\x0b\x32\x18.proto.cloud.p2p.MapInfoH\x00\x12J\n\rcomplete_maps\x18\x0c \x01(\x0b\x32\x31.proto.cloud.MultiMapsManageResponse.CompleteMapsH\x00\x1a\x42\n\x0c\x43ompleteMaps\x12\x32\n\x0c\x63omplete_map\x18\x01 \x03(\x0b\x32\x1c.proto.cloud.p2p.CompleteMap\".\n\x06Result\x12\x0b\n\x07SUCCESS\x10\x00\x12\n\n\x06\x46\x41ILED\x10\x01\x12\x0b\n\x07STARTED\x10\x02\x42\x07\n\x05Paramb\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'proto.cloud.multi_maps_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _MULTIMAPSMANAGEREQUEST._serialized_start=99 + _MULTIMAPSMANAGEREQUEST._serialized_end=711 + _MULTIMAPSMANAGEREQUEST_RENAME._serialized_start=395 + _MULTIMAPSMANAGEREQUEST_RENAME._serialized_end=442 + _MULTIMAPSMANAGEREQUEST_COMMON._serialized_start=444 + _MULTIMAPSMANAGEREQUEST_COMMON._serialized_end=473 + _MULTIMAPSMANAGEREQUEST_SAVEOPTIONS._serialized_start=475 + _MULTIMAPSMANAGEREQUEST_SAVEOPTIONS._serialized_end=531 + _MULTIMAPSMANAGEREQUEST_METHOD._serialized_start=534 + _MULTIMAPSMANAGEREQUEST_METHOD._serialized_end=702 + _MULTIMAPSMANAGERESPONSE._serialized_start=714 + _MULTIMAPSMANAGERESPONSE._serialized_end=1121 + _MULTIMAPSMANAGERESPONSE_COMPLETEMAPS._serialized_start=998 + _MULTIMAPSMANAGERESPONSE_COMPLETEMAPS._serialized_end=1064 + _MULTIMAPSMANAGERESPONSE_RESULT._serialized_start=1066 + _MULTIMAPSMANAGERESPONSE_RESULT._serialized_end=1112 +# @@protoc_insertion_point(module_scope) diff --git a/proto-reference/multi_maps_pb2.pyi b/proto-reference/multi_maps_pb2.pyi new file mode 100644 index 0000000..2ee10b2 --- /dev/null +++ b/proto-reference/multi_maps_pb2.pyi @@ -0,0 +1,82 @@ +from typing import ClassVar as _ClassVar +from typing import Iterable as _Iterable +from typing import Mapping as _Mapping +from typing import Optional as _Optional +from typing import Union as _Union + +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf.internal import containers as _containers +from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper + +from ...proto.cloud import common_pb2 as _common_pb2 +from ...proto.cloud import p2pdata_pb2 as _p2pdata_pb2 + +DESCRIPTOR: _descriptor.FileDescriptor + +class MultiMapsManageRequest(_message.Message): + __slots__ = ["common", "method", "rename", "save_options", "seq"] + class Method(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + class Common(_message.Message): + __slots__ = ["cloud_mapid"] + CLOUD_MAPID_FIELD_NUMBER: _ClassVar[int] + cloud_mapid: int + def __init__(self, cloud_mapid: _Optional[int] = ...) -> None: ... + class Rename(_message.Message): + __slots__ = ["cloud_mapid", "new_name"] + CLOUD_MAPID_FIELD_NUMBER: _ClassVar[int] + NEW_NAME_FIELD_NUMBER: _ClassVar[int] + cloud_mapid: int + new_name: str + def __init__(self, cloud_mapid: _Optional[int] = ..., new_name: _Optional[str] = ...) -> None: ... + class SaveOptions(_message.Message): + __slots__ = ["multi_map_sw"] + MULTI_MAP_SW_FIELD_NUMBER: _ClassVar[int] + multi_map_sw: _common_pb2.Switch + def __init__(self, multi_map_sw: _Optional[_Union[_common_pb2.Switch, _Mapping]] = ...) -> None: ... + COMMON_FIELD_NUMBER: _ClassVar[int] + MAP_DELETE: MultiMapsManageRequest.Method + MAP_GET_ALL: MultiMapsManageRequest.Method + MAP_GET_ONE: MultiMapsManageRequest.Method + MAP_IGNORE: MultiMapsManageRequest.Method + MAP_LOAD: MultiMapsManageRequest.Method + MAP_RECOVERY: MultiMapsManageRequest.Method + MAP_RENAME: MultiMapsManageRequest.Method + MAP_REPLACE: MultiMapsManageRequest.Method + MAP_RESET: MultiMapsManageRequest.Method + MAP_SAVE: MultiMapsManageRequest.Method + METHOD_FIELD_NUMBER: _ClassVar[int] + RENAME_FIELD_NUMBER: _ClassVar[int] + SAVE_OPTIONS_FIELD_NUMBER: _ClassVar[int] + SEQ_FIELD_NUMBER: _ClassVar[int] + common: MultiMapsManageRequest.Common + method: MultiMapsManageRequest.Method + rename: MultiMapsManageRequest.Rename + save_options: MultiMapsManageRequest.SaveOptions + seq: int + def __init__(self, method: _Optional[_Union[MultiMapsManageRequest.Method, str]] = ..., seq: _Optional[int] = ..., rename: _Optional[_Union[MultiMapsManageRequest.Rename, _Mapping]] = ..., common: _Optional[_Union[MultiMapsManageRequest.Common, _Mapping]] = ..., save_options: _Optional[_Union[MultiMapsManageRequest.SaveOptions, _Mapping]] = ...) -> None: ... + +class MultiMapsManageResponse(_message.Message): + __slots__ = ["complete_maps", "map_infos", "method", "result", "seq"] + class Result(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + class CompleteMaps(_message.Message): + __slots__ = ["complete_map"] + COMPLETE_MAP_FIELD_NUMBER: _ClassVar[int] + complete_map: _containers.RepeatedCompositeFieldContainer[_p2pdata_pb2.CompleteMap] + def __init__(self, complete_map: _Optional[_Iterable[_Union[_p2pdata_pb2.CompleteMap, _Mapping]]] = ...) -> None: ... + COMPLETE_MAPS_FIELD_NUMBER: _ClassVar[int] + FAILED: MultiMapsManageResponse.Result + MAP_INFOS_FIELD_NUMBER: _ClassVar[int] + METHOD_FIELD_NUMBER: _ClassVar[int] + RESULT_FIELD_NUMBER: _ClassVar[int] + SEQ_FIELD_NUMBER: _ClassVar[int] + STARTED: MultiMapsManageResponse.Result + SUCCESS: MultiMapsManageResponse.Result + complete_maps: MultiMapsManageResponse.CompleteMaps + map_infos: _p2pdata_pb2.MapInfo + method: MultiMapsManageRequest.Method + result: MultiMapsManageResponse.Result + seq: int + def __init__(self, method: _Optional[_Union[MultiMapsManageRequest.Method, str]] = ..., seq: _Optional[int] = ..., result: _Optional[_Union[MultiMapsManageResponse.Result, str]] = ..., map_infos: _Optional[_Union[_p2pdata_pb2.MapInfo, _Mapping]] = ..., complete_maps: _Optional[_Union[MultiMapsManageResponse.CompleteMaps, _Mapping]] = ...) -> None: ... diff --git a/proto-reference/p2pdata.proto b/proto-reference/p2pdata.proto new file mode 100644 index 0000000..a545508 --- /dev/null +++ b/proto-reference/p2pdata.proto @@ -0,0 +1,152 @@ +syntax = "proto3"; + +// option optimize_for = LITE_RUNTIME; + +package proto.cloud.p2p; + +import "proto/cloud/common.proto"; +import "proto/cloud/stream.proto"; + +/** + * 地图数据的统一入口, 包括实时地图数据, 多地图相关数据. + */ +message MapChannelMsg { + enum MsgType { + MAP_INFO = 0; + MULTI_MAP_RESPONSE = 1; + } + + MsgType type = 1; + oneof MsgData { + /* + * 实时地图数据不需要发送请求(为实时推送) + */ + MapInfo map_info = 2; + + /* + * 该成员解析为MultiMapsManageResponse类型, 需要发送相应DP请求. + */ + bytes multi_map_response = 3; + } +} + +/** + * 房间轮廓信息(使用包含分区信息的地图),单次上传. + * + * @note: Delimited 方式序列化. + */ +message MapPixels { + /** + * 地图像素数据,目前采用 LZ4 压缩; + * 地图更新采用SLAM地图+分区地图的方式维护,slam地图实时更新,分区地图仅在保存地图、用户手动调整分区时更新; + * 实时地图: + * 1byte表示4像素,即1个像素2bit: + * 0x00 为未知区域 + * 0x01 为张障碍物 + * 0x02 为可清扫区域 + * 0x03 为地毯 + * 分区地图: + * 1byte表示1像素的方式 + * 低2bit表示像素 + * 0x00 为未知区域 + * 0x01 为张障碍物 + * 0x02 为可清扫区域 + * 0x03 为地毯 + * 高6bit表示房间分区id + * 每个像素占 1byte,包含房间id、是否是背景等数据. + * 房间标识说明 + * 有效房间标识: 0 - 31 + * 无效房间标识: 大于等于32 + * 特殊房间标识: + * 60:没有房间数据 + * 61:房间间隙 + * 62:代表障碍物 + * 63:未知的房间标识 + */ + bytes pixels = 1; // 地图压缩 + + /** + * 地图像素原始size, 如果pixels有压缩,则 pixel_size 表示解压后的长度. + */ + uint32 pixel_size = 2; +} + + +/** + p2p数据相当于直播,不会在云端保存,每次可以直接传输全量数据 +*/ +message MapInfo { + uint32 releases = 1; //map 的大版本修正号, version + uint32 map_id = 2; // map 的 id 号, name/releases在后面 + bool map_stable = 3; // 地图是否稳定 + uint32 map_width = 4; + uint32 map_height = 5; + Point origin = 6; // 原点 + repeated Pose docks = 7; // 支持多个充电座/基站 + + enum MapMsgType{ + MAP_REALTIME = 0; + MAP_ROOMOUTLINE = 1; + OBSTACLE_INFO = 2; + RESTRICT_ZONES = 3; + ROOM_PARAMS = 4; + CRUISE_DATA = 5; + TEMPORARY_DATA = 6; + }; + MapMsgType msg_type = 8; + + oneof MapMsg { // 由 msg_type 决定包含哪种数据 + MapPixels pixels = 9; // 实时地图信息或房间轮廓信息 + stream.ObstacleInfo obstacles = 10; + stream.RestrictedZone restricted_zones = 11; + stream.RoomParams room_params = 12; + stream.CruiseData cruise_data = 13; + stream.TemporaryData temporary_data = 14; + } + + uint32 is_new_map = 15; // p2p同时加入 + string name = 16; // map 的名称 +} + +message CompleteMap { + uint32 releases = 1; // map 的大版本修正号, version + uint32 map_id = 2; + bool map_stable = 3; // 地图是否稳定 + uint32 map_width = 4; + uint32 map_height = 5; + Point origin = 6; // 原点 + + repeated Pose docks = 7; // 支持多个充电座/基站 + MapPixels map = 8; // 实时地图信息 + MapPixels room_outline = 9; // 房间轮廓信息 + stream.ObstacleInfo obstacles = 10; + stream.RestrictedZone restricted_zones = 11; + stream.RoomParams room_params = 12; + stream.TemporaryData temporary_data = 13; + uint32 is_new_map = 14; // p2p同时加入 + string name = 15; // map 的名称 +} + +/** + 一个路径点包含 5 个字节: + byte 1-2: x 坐标, byte1高字节,最高位为符号位, byte2为低字节; + byte 3-4: y 坐标,byte3高字节,最高位为符号位, byte4为低字节; + byte 5: flags信息, + bit 0-3 类型,0 - 清扫,1 - 拖地,2 - 扫+拖,3 - 导航,4 - 回充 (TODO: 根据需求完善) + bit 4: 状态,0 - 继续上一轨迹点, 1 - 新轨迹点,与上一轨迹点不连续; + */ +message CompletePath { + enum Type{ + SWEEP = 0; + MOP = 1; + SWEEP_MOP = 2; + NAVI = 3; + GOHOME = 4; + }; + enum State { + FOLLOW = 0; // 继续上一轨迹点 + NEW = 1; // 新轨迹点,与上一轨迹点不连续 + } + bytes path = 3; //lz4压缩 + uint32 path_lz4len = 4; //压缩原始长度 +} diff --git a/proto-reference/p2pdata_pb2.py b/proto-reference/p2pdata_pb2.py new file mode 100644 index 0000000..bbbe2fc --- /dev/null +++ b/proto-reference/p2pdata_pb2.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: proto/cloud/p2pdata.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder + +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from ...proto.cloud import common_pb2 as proto_dot_cloud_dot_common__pb2 +from ...proto.cloud import stream_pb2 as proto_dot_cloud_dot_stream__pb2 + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x19proto/cloud/p2pdata.proto\x12\x0fproto.cloud.p2p\x1a\x18proto/cloud/common.proto\x1a\x18proto/cloud/stream.proto\"\xcd\x01\n\rMapChannelMsg\x12\x34\n\x04type\x18\x01 \x01(\x0e\x32&.proto.cloud.p2p.MapChannelMsg.MsgType\x12,\n\x08map_info\x18\x02 \x01(\x0b\x32\x18.proto.cloud.p2p.MapInfoH\x00\x12\x1c\n\x12multi_map_response\x18\x03 \x01(\x0cH\x00\"/\n\x07MsgType\x12\x0c\n\x08MAP_INFO\x10\x00\x12\x16\n\x12MULTI_MAP_RESPONSE\x10\x01\x42\t\n\x07MsgData\"/\n\tMapPixels\x12\x0e\n\x06pixels\x18\x01 \x01(\x0c\x12\x12\n\npixel_size\x18\x02 \x01(\r\"\xf2\x05\n\x07MapInfo\x12\x10\n\x08releases\x18\x01 \x01(\r\x12\x0e\n\x06map_id\x18\x02 \x01(\r\x12\x12\n\nmap_stable\x18\x03 \x01(\x08\x12\x11\n\tmap_width\x18\x04 \x01(\r\x12\x12\n\nmap_height\x18\x05 \x01(\r\x12\"\n\x06origin\x18\x06 \x01(\x0b\x32\x12.proto.cloud.Point\x12 \n\x05\x64ocks\x18\x07 \x03(\x0b\x32\x11.proto.cloud.Pose\x12\x35\n\x08msg_type\x18\x08 \x01(\x0e\x32#.proto.cloud.p2p.MapInfo.MapMsgType\x12,\n\x06pixels\x18\t \x01(\x0b\x32\x1a.proto.cloud.p2p.MapPixelsH\x00\x12\x35\n\tobstacles\x18\n \x01(\x0b\x32 .proto.cloud.stream.ObstacleInfoH\x00\x12>\n\x10restricted_zones\x18\x0b \x01(\x0b\x32\".proto.cloud.stream.RestrictedZoneH\x00\x12\x35\n\x0broom_params\x18\x0c \x01(\x0b\x32\x1e.proto.cloud.stream.RoomParamsH\x00\x12\x35\n\x0b\x63ruise_data\x18\r \x01(\x0b\x32\x1e.proto.cloud.stream.CruiseDataH\x00\x12;\n\x0etemporary_data\x18\x0e \x01(\x0b\x32!.proto.cloud.stream.TemporaryDataH\x00\x12\x12\n\nis_new_map\x18\x0f \x01(\r\x12\x0c\n\x04name\x18\x10 \x01(\t\"\x90\x01\n\nMapMsgType\x12\x10\n\x0cMAP_REALTIME\x10\x00\x12\x13\n\x0fMAP_ROOMOUTLINE\x10\x01\x12\x11\n\rOBSTACLE_INFO\x10\x02\x12\x12\n\x0eRESTRICT_ZONES\x10\x03\x12\x0f\n\x0bROOM_PARAMS\x10\x04\x12\x0f\n\x0b\x43RUISE_DATA\x10\x05\x12\x12\n\x0eTEMPORARY_DATA\x10\x06\x42\x08\n\x06MapMsg\"\x90\x04\n\x0b\x43ompleteMap\x12\x10\n\x08releases\x18\x01 \x01(\r\x12\x0e\n\x06map_id\x18\x02 \x01(\r\x12\x12\n\nmap_stable\x18\x03 \x01(\x08\x12\x11\n\tmap_width\x18\x04 \x01(\r\x12\x12\n\nmap_height\x18\x05 \x01(\r\x12\"\n\x06origin\x18\x06 \x01(\x0b\x32\x12.proto.cloud.Point\x12 \n\x05\x64ocks\x18\x07 \x03(\x0b\x32\x11.proto.cloud.Pose\x12\'\n\x03map\x18\x08 \x01(\x0b\x32\x1a.proto.cloud.p2p.MapPixels\x12\x30\n\x0croom_outline\x18\t \x01(\x0b\x32\x1a.proto.cloud.p2p.MapPixels\x12\x33\n\tobstacles\x18\n \x01(\x0b\x32 .proto.cloud.stream.ObstacleInfo\x12<\n\x10restricted_zones\x18\x0b \x01(\x0b\x32\".proto.cloud.stream.RestrictedZone\x12\x33\n\x0broom_params\x18\x0c \x01(\x0b\x32\x1e.proto.cloud.stream.RoomParams\x12\x39\n\x0etemporary_data\x18\r \x01(\x0b\x32!.proto.cloud.stream.TemporaryData\x12\x12\n\nis_new_map\x18\x0e \x01(\r\x12\x0c\n\x04name\x18\x0f \x01(\t\"\x90\x01\n\x0c\x43ompletePath\x12\x0c\n\x04path\x18\x03 \x01(\x0c\x12\x13\n\x0bpath_lz4len\x18\x04 \x01(\r\"?\n\x04Type\x12\t\n\x05SWEEP\x10\x00\x12\x07\n\x03MOP\x10\x01\x12\r\n\tSWEEP_MOP\x10\x02\x12\x08\n\x04NAVI\x10\x03\x12\n\n\x06GOHOME\x10\x04\"\x1c\n\x05State\x12\n\n\x06\x46OLLOW\x10\x00\x12\x07\n\x03NEW\x10\x01\x62\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'proto.cloud.p2pdata_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _MAPCHANNELMSG._serialized_start=99 + _MAPCHANNELMSG._serialized_end=304 + _MAPCHANNELMSG_MSGTYPE._serialized_start=246 + _MAPCHANNELMSG_MSGTYPE._serialized_end=293 + _MAPPIXELS._serialized_start=306 + _MAPPIXELS._serialized_end=353 + _MAPINFO._serialized_start=356 + _MAPINFO._serialized_end=1110 + _MAPINFO_MAPMSGTYPE._serialized_start=956 + _MAPINFO_MAPMSGTYPE._serialized_end=1100 + _COMPLETEMAP._serialized_start=1113 + _COMPLETEMAP._serialized_end=1641 + _COMPLETEPATH._serialized_start=1644 + _COMPLETEPATH._serialized_end=1788 + _COMPLETEPATH_TYPE._serialized_start=1695 + _COMPLETEPATH_TYPE._serialized_end=1758 + _COMPLETEPATH_STATE._serialized_start=1760 + _COMPLETEPATH_STATE._serialized_end=1788 +# @@protoc_insertion_point(module_scope) diff --git a/proto-reference/p2pdata_pb2.pyi b/proto-reference/p2pdata_pb2.pyi new file mode 100644 index 0000000..12ea3e7 --- /dev/null +++ b/proto-reference/p2pdata_pb2.pyi @@ -0,0 +1,135 @@ +from typing import ClassVar as _ClassVar +from typing import Iterable as _Iterable +from typing import Mapping as _Mapping +from typing import Optional as _Optional +from typing import Union as _Union + +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf.internal import containers as _containers +from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper + +from ...proto.cloud import common_pb2 as _common_pb2 +from ...proto.cloud import stream_pb2 as _stream_pb2 + +DESCRIPTOR: _descriptor.FileDescriptor + +class CompleteMap(_message.Message): + __slots__ = ["docks", "is_new_map", "map", "map_height", "map_id", "map_stable", "map_width", "name", "obstacles", "origin", "releases", "restricted_zones", "room_outline", "room_params", "temporary_data"] + DOCKS_FIELD_NUMBER: _ClassVar[int] + IS_NEW_MAP_FIELD_NUMBER: _ClassVar[int] + MAP_FIELD_NUMBER: _ClassVar[int] + MAP_HEIGHT_FIELD_NUMBER: _ClassVar[int] + MAP_ID_FIELD_NUMBER: _ClassVar[int] + MAP_STABLE_FIELD_NUMBER: _ClassVar[int] + MAP_WIDTH_FIELD_NUMBER: _ClassVar[int] + NAME_FIELD_NUMBER: _ClassVar[int] + OBSTACLES_FIELD_NUMBER: _ClassVar[int] + ORIGIN_FIELD_NUMBER: _ClassVar[int] + RELEASES_FIELD_NUMBER: _ClassVar[int] + RESTRICTED_ZONES_FIELD_NUMBER: _ClassVar[int] + ROOM_OUTLINE_FIELD_NUMBER: _ClassVar[int] + ROOM_PARAMS_FIELD_NUMBER: _ClassVar[int] + TEMPORARY_DATA_FIELD_NUMBER: _ClassVar[int] + docks: _containers.RepeatedCompositeFieldContainer[_common_pb2.Pose] + is_new_map: int + map: MapPixels + map_height: int + map_id: int + map_stable: bool + map_width: int + name: str + obstacles: _stream_pb2.ObstacleInfo + origin: _common_pb2.Point + releases: int + restricted_zones: _stream_pb2.RestrictedZone + room_outline: MapPixels + room_params: _stream_pb2.RoomParams + temporary_data: _stream_pb2.TemporaryData + def __init__(self, releases: _Optional[int] = ..., map_id: _Optional[int] = ..., map_stable: bool = ..., map_width: _Optional[int] = ..., map_height: _Optional[int] = ..., origin: _Optional[_Union[_common_pb2.Point, _Mapping]] = ..., docks: _Optional[_Iterable[_Union[_common_pb2.Pose, _Mapping]]] = ..., map: _Optional[_Union[MapPixels, _Mapping]] = ..., room_outline: _Optional[_Union[MapPixels, _Mapping]] = ..., obstacles: _Optional[_Union[_stream_pb2.ObstacleInfo, _Mapping]] = ..., restricted_zones: _Optional[_Union[_stream_pb2.RestrictedZone, _Mapping]] = ..., room_params: _Optional[_Union[_stream_pb2.RoomParams, _Mapping]] = ..., temporary_data: _Optional[_Union[_stream_pb2.TemporaryData, _Mapping]] = ..., is_new_map: _Optional[int] = ..., name: _Optional[str] = ...) -> None: ... + +class CompletePath(_message.Message): + __slots__ = ["path", "path_lz4len"] + class State(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + class Type(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + FOLLOW: CompletePath.State + GOHOME: CompletePath.Type + MOP: CompletePath.Type + NAVI: CompletePath.Type + NEW: CompletePath.State + PATH_FIELD_NUMBER: _ClassVar[int] + PATH_LZ4LEN_FIELD_NUMBER: _ClassVar[int] + SWEEP: CompletePath.Type + SWEEP_MOP: CompletePath.Type + path: bytes + path_lz4len: int + def __init__(self, path: _Optional[bytes] = ..., path_lz4len: _Optional[int] = ...) -> None: ... + +class MapChannelMsg(_message.Message): + __slots__ = ["map_info", "multi_map_response", "type"] + class MsgType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + MAP_INFO: MapChannelMsg.MsgType + MAP_INFO_FIELD_NUMBER: _ClassVar[int] + MULTI_MAP_RESPONSE: MapChannelMsg.MsgType + MULTI_MAP_RESPONSE_FIELD_NUMBER: _ClassVar[int] + TYPE_FIELD_NUMBER: _ClassVar[int] + map_info: MapInfo + multi_map_response: bytes + type: MapChannelMsg.MsgType + def __init__(self, type: _Optional[_Union[MapChannelMsg.MsgType, str]] = ..., map_info: _Optional[_Union[MapInfo, _Mapping]] = ..., multi_map_response: _Optional[bytes] = ...) -> None: ... + +class MapInfo(_message.Message): + __slots__ = ["cruise_data", "docks", "is_new_map", "map_height", "map_id", "map_stable", "map_width", "msg_type", "name", "obstacles", "origin", "pixels", "releases", "restricted_zones", "room_params", "temporary_data"] + class MapMsgType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + CRUISE_DATA: MapInfo.MapMsgType + CRUISE_DATA_FIELD_NUMBER: _ClassVar[int] + DOCKS_FIELD_NUMBER: _ClassVar[int] + IS_NEW_MAP_FIELD_NUMBER: _ClassVar[int] + MAP_HEIGHT_FIELD_NUMBER: _ClassVar[int] + MAP_ID_FIELD_NUMBER: _ClassVar[int] + MAP_REALTIME: MapInfo.MapMsgType + MAP_ROOMOUTLINE: MapInfo.MapMsgType + MAP_STABLE_FIELD_NUMBER: _ClassVar[int] + MAP_WIDTH_FIELD_NUMBER: _ClassVar[int] + MSG_TYPE_FIELD_NUMBER: _ClassVar[int] + NAME_FIELD_NUMBER: _ClassVar[int] + OBSTACLES_FIELD_NUMBER: _ClassVar[int] + OBSTACLE_INFO: MapInfo.MapMsgType + ORIGIN_FIELD_NUMBER: _ClassVar[int] + PIXELS_FIELD_NUMBER: _ClassVar[int] + RELEASES_FIELD_NUMBER: _ClassVar[int] + RESTRICTED_ZONES_FIELD_NUMBER: _ClassVar[int] + RESTRICT_ZONES: MapInfo.MapMsgType + ROOM_PARAMS: MapInfo.MapMsgType + ROOM_PARAMS_FIELD_NUMBER: _ClassVar[int] + TEMPORARY_DATA: MapInfo.MapMsgType + TEMPORARY_DATA_FIELD_NUMBER: _ClassVar[int] + cruise_data: _stream_pb2.CruiseData + docks: _containers.RepeatedCompositeFieldContainer[_common_pb2.Pose] + is_new_map: int + map_height: int + map_id: int + map_stable: bool + map_width: int + msg_type: MapInfo.MapMsgType + name: str + obstacles: _stream_pb2.ObstacleInfo + origin: _common_pb2.Point + pixels: MapPixels + releases: int + restricted_zones: _stream_pb2.RestrictedZone + room_params: _stream_pb2.RoomParams + temporary_data: _stream_pb2.TemporaryData + def __init__(self, releases: _Optional[int] = ..., map_id: _Optional[int] = ..., map_stable: bool = ..., map_width: _Optional[int] = ..., map_height: _Optional[int] = ..., origin: _Optional[_Union[_common_pb2.Point, _Mapping]] = ..., docks: _Optional[_Iterable[_Union[_common_pb2.Pose, _Mapping]]] = ..., msg_type: _Optional[_Union[MapInfo.MapMsgType, str]] = ..., pixels: _Optional[_Union[MapPixels, _Mapping]] = ..., obstacles: _Optional[_Union[_stream_pb2.ObstacleInfo, _Mapping]] = ..., restricted_zones: _Optional[_Union[_stream_pb2.RestrictedZone, _Mapping]] = ..., room_params: _Optional[_Union[_stream_pb2.RoomParams, _Mapping]] = ..., cruise_data: _Optional[_Union[_stream_pb2.CruiseData, _Mapping]] = ..., temporary_data: _Optional[_Union[_stream_pb2.TemporaryData, _Mapping]] = ..., is_new_map: _Optional[int] = ..., name: _Optional[str] = ...) -> None: ... + +class MapPixels(_message.Message): + __slots__ = ["pixel_size", "pixels"] + PIXELS_FIELD_NUMBER: _ClassVar[int] + PIXEL_SIZE_FIELD_NUMBER: _ClassVar[int] + pixel_size: int + pixels: bytes + def __init__(self, pixels: _Optional[bytes] = ..., pixel_size: _Optional[int] = ...) -> None: ... diff --git a/proto-reference/scene.proto b/proto-reference/scene.proto new file mode 100644 index 0000000..d41ad0b --- /dev/null +++ b/proto-reference/scene.proto @@ -0,0 +1,145 @@ +syntax = "proto3"; + +// option optimize_for = LITE_RUNTIME; + +package proto.cloud; + +import "proto/cloud/common.proto"; +import "proto/cloud/clean_param.proto"; +import "proto/cloud/timing.proto"; + +message SceneTask { + uint32 index = 1; // 顺序,从1开始 + + enum Type { + CURRENT_ROOM = 0; + ALL_ROOMS = 1; + } + Type type = 2; + + enum CleanMode { + GENERAL = 0; // 通用模式 + SMART = 1; // 智能省心模式 + } + + // 通用参数 + message General { + CleanType clean_type = 1; + uint32 clean_times = 2; // 清扫次数,非 0 有效 + Fan fan = 3; + MopMode mop_mode = 4; + CleanExtent clean_extent = 5; + } + + message CurrentRoom { + message Unit { + General general = 1; // 通用模式会有这项 + + message RoomClean { + uint32 room_id = 1; + RoomScene room_scene = 2; + } + message ZoneClean { + Quadrangle quadrangle = 1; + } + + oneof Param { + RoomClean room_clean = 2; + ZoneClean zone_clean = 3; + } + } + CleanMode mode = 1; + repeated Unit units = 2; + } + + message AllRooms { + CleanMode mode = 1; + General general = 2; // 通用模式会有这项 + } + + oneof Task { + CurrentRoom current_room = 3; + AllRooms all_rooms = 4; + } +} + +message SceneInfo { + // 手机 app 新建定时不需要该字段,设备返回 id + // 手机 app 其他操作需要该字段 + message Id { + uint32 value = 1; + } + Id id = 1; + + bool valid = 2; + enum InvalidReason { + NORMAL = 0; // 正常(非失效状态) + MAP_NOT_EXIST = 1; // 地图不存在 + MAP_NOT_AVAILABLE = 2; // 地图不可用(地图不完整) + MAP_NOT_MATCH = 3; // 地图不适配(缺少指定区域) + OTHER = 4; // 其他未分类的失效原因 + DEFAULT = 5; // 后续使用 type 字段,不再使用这个值表示默认场景 + } + InvalidReason invalid_reason = 3; + + string name = 4; + uint32 mapid = 5; // 关联的地图id(无效:-2) + + // 场景执行时的动态时间数据放 WorkStatus 中 + uint32 estimate_time = 6; // 执行前预估完成时间(无效:0) + uint32 index = 7; // 顺序,从1开始 + + enum Type { + SCENE_NORMAL = 0; // 普通场景 + WHOLE_HOUSE_DAILY_CLEANING = 1; // 全屋日常清洁(默认) + WHOLE_HOUSE_DEEP_CLEANING = 2; // 全屋深度清洁(默认) + AFTER_DINNER_CLEANING = 3; // 饭后清洁(默认) + PET_AREA_CLEANING = 4; // 宠物区域清洁(默认) + } + Type type = 8; +} + +message SceneRequest { + enum Method { + DEFAULT = 0; + ADD_SCENE = 1; // 添加场景(可选设置定时、是否指定地图) + DELETE_SCENE = 2; // 删除场景,使用 message common + MODIFY_SCENE = 3; // 修改场景(可选设置定时、是否指定地图) + } + + Method method = 1; + uint32 seq = 2; + + message Common { + uint32 scene_id = 1; + } + + message Scene { + SceneInfo info = 1; + repeated SceneTask tasks = 2; + TimerInfo.Desc desc = 3; + } + + oneof Param { + Common common = 3; + Scene scene = 4; + } +} + +// 通过 dp 传基础信息 +message SceneResponse { + SceneRequest.Method method = 1; // 开机/失效上报 DEFAULT,其他情况跟下发相同 + uint32 seq = 2; + + message Result { + enum Value { + SUCCESS = 0; + FAILED = 1; + } + Value value = 1; + + uint32 err_code = 2; + } + Result result = 3; + repeated SceneInfo infos = 4; +} \ No newline at end of file diff --git a/proto-reference/scene_pb2.py b/proto-reference/scene_pb2.py new file mode 100644 index 0000000..cc918de --- /dev/null +++ b/proto-reference/scene_pb2.py @@ -0,0 +1,67 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: proto/cloud/scene.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder + +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from ...proto.cloud import \ + clean_param_pb2 as proto_dot_cloud_dot_clean__param__pb2 +from ...proto.cloud import common_pb2 as proto_dot_cloud_dot_common__pb2 +from ...proto.cloud import timing_pb2 as proto_dot_cloud_dot_timing__pb2 + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x17proto/cloud/scene.proto\x12\x0bproto.cloud\x1a\x18proto/cloud/common.proto\x1a\x1dproto/cloud/clean_param.proto\x1a\x18proto/cloud/timing.proto\"\x8f\x08\n\tSceneTask\x12\r\n\x05index\x18\x01 \x01(\r\x12)\n\x04type\x18\x02 \x01(\x0e\x32\x1b.proto.cloud.SceneTask.Type\x12:\n\x0c\x63urrent_room\x18\x03 \x01(\x0b\x32\".proto.cloud.SceneTask.CurrentRoomH\x00\x12\x34\n\tall_rooms\x18\x04 \x01(\x0b\x32\x1f.proto.cloud.SceneTask.AllRoomsH\x00\x1a\xc1\x01\n\x07General\x12*\n\nclean_type\x18\x01 \x01(\x0b\x32\x16.proto.cloud.CleanType\x12\x13\n\x0b\x63lean_times\x18\x02 \x01(\r\x12\x1d\n\x03\x66\x61n\x18\x03 \x01(\x0b\x32\x10.proto.cloud.Fan\x12&\n\x08mop_mode\x18\x04 \x01(\x0b\x32\x14.proto.cloud.MopMode\x12.\n\x0c\x63lean_extent\x18\x05 \x01(\x0b\x32\x18.proto.cloud.CleanExtent\x1a\xce\x03\n\x0b\x43urrentRoom\x12.\n\x04mode\x18\x01 \x01(\x0e\x32 .proto.cloud.SceneTask.CleanMode\x12\x36\n\x05units\x18\x02 \x03(\x0b\x32\'.proto.cloud.SceneTask.CurrentRoom.Unit\x1a\xd6\x02\n\x04Unit\x12/\n\x07general\x18\x01 \x01(\x0b\x32\x1e.proto.cloud.SceneTask.General\x12G\n\nroom_clean\x18\x02 \x01(\x0b\x32\x31.proto.cloud.SceneTask.CurrentRoom.Unit.RoomCleanH\x00\x12G\n\nzone_clean\x18\x03 \x01(\x0b\x32\x31.proto.cloud.SceneTask.CurrentRoom.Unit.ZoneCleanH\x00\x1aH\n\tRoomClean\x12\x0f\n\x07room_id\x18\x01 \x01(\r\x12*\n\nroom_scene\x18\x02 \x01(\x0b\x32\x16.proto.cloud.RoomScene\x1a\x38\n\tZoneClean\x12+\n\nquadrangle\x18\x01 \x01(\x0b\x32\x17.proto.cloud.QuadrangleB\x07\n\x05Param\x1ak\n\x08\x41llRooms\x12.\n\x04mode\x18\x01 \x01(\x0e\x32 .proto.cloud.SceneTask.CleanMode\x12/\n\x07general\x18\x02 \x01(\x0b\x32\x1e.proto.cloud.SceneTask.General\"\'\n\x04Type\x12\x10\n\x0c\x43URRENT_ROOM\x10\x00\x12\r\n\tALL_ROOMS\x10\x01\"#\n\tCleanMode\x12\x0b\n\x07GENERAL\x10\x00\x12\t\n\x05SMART\x10\x01\x42\x06\n\x04Task\"\x80\x04\n\tSceneInfo\x12%\n\x02id\x18\x01 \x01(\x0b\x32\x19.proto.cloud.SceneInfo.Id\x12\r\n\x05valid\x18\x02 \x01(\x08\x12<\n\x0einvalid_reason\x18\x03 \x01(\x0e\x32$.proto.cloud.SceneInfo.InvalidReason\x12\x0c\n\x04name\x18\x04 \x01(\t\x12\r\n\x05mapid\x18\x05 \x01(\r\x12\x15\n\restimate_time\x18\x06 \x01(\r\x12\r\n\x05index\x18\x07 \x01(\r\x12)\n\x04type\x18\x08 \x01(\x0e\x32\x1b.proto.cloud.SceneInfo.Type\x1a\x13\n\x02Id\x12\r\n\x05value\x18\x01 \x01(\r\"p\n\rInvalidReason\x12\n\n\x06NORMAL\x10\x00\x12\x11\n\rMAP_NOT_EXIST\x10\x01\x12\x15\n\x11MAP_NOT_AVAILABLE\x10\x02\x12\x11\n\rMAP_NOT_MATCH\x10\x03\x12\t\n\x05OTHER\x10\x04\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10\x05\"\x89\x01\n\x04Type\x12\x10\n\x0cSCENE_NORMAL\x10\x00\x12\x1e\n\x1aWHOLE_HOUSE_DAILY_CLEANING\x10\x01\x12\x1d\n\x19WHOLE_HOUSE_DEEP_CLEANING\x10\x02\x12\x19\n\x15\x41\x46TER_DINNER_CLEANING\x10\x03\x12\x15\n\x11PET_AREA_CLEANING\x10\x04\"\xa3\x03\n\x0cSceneRequest\x12\x30\n\x06method\x18\x01 \x01(\x0e\x32 .proto.cloud.SceneRequest.Method\x12\x0b\n\x03seq\x18\x02 \x01(\r\x12\x32\n\x06\x63ommon\x18\x03 \x01(\x0b\x32 .proto.cloud.SceneRequest.CommonH\x00\x12\x30\n\x05scene\x18\x04 \x01(\x0b\x32\x1f.proto.cloud.SceneRequest.SceneH\x00\x1a\x1a\n\x06\x43ommon\x12\x10\n\x08scene_id\x18\x01 \x01(\r\x1a\x7f\n\x05Scene\x12$\n\x04info\x18\x01 \x01(\x0b\x32\x16.proto.cloud.SceneInfo\x12%\n\x05tasks\x18\x02 \x03(\x0b\x32\x16.proto.cloud.SceneTask\x12)\n\x04\x64\x65sc\x18\x03 \x01(\x0b\x32\x1b.proto.cloud.TimerInfo.Desc\"H\n\x06Method\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10\x00\x12\r\n\tADD_SCENE\x10\x01\x12\x10\n\x0c\x44\x45LETE_SCENE\x10\x02\x12\x10\n\x0cMODIFY_SCENE\x10\x03\x42\x07\n\x05Param\"\x9e\x02\n\rSceneResponse\x12\x30\n\x06method\x18\x01 \x01(\x0e\x32 .proto.cloud.SceneRequest.Method\x12\x0b\n\x03seq\x18\x02 \x01(\r\x12\x31\n\x06result\x18\x03 \x01(\x0b\x32!.proto.cloud.SceneResponse.Result\x12%\n\x05infos\x18\x04 \x03(\x0b\x32\x16.proto.cloud.SceneInfo\x1at\n\x06Result\x12\x36\n\x05value\x18\x01 \x01(\x0e\x32\'.proto.cloud.SceneResponse.Result.Value\x12\x10\n\x08\x65rr_code\x18\x02 \x01(\r\" \n\x05Value\x12\x0b\n\x07SUCCESS\x10\x00\x12\n\n\x06\x46\x41ILED\x10\x01\x62\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'proto.cloud.scene_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _SCENETASK._serialized_start=124 + _SCENETASK._serialized_end=1163 + _SCENETASK_GENERAL._serialized_start=310 + _SCENETASK_GENERAL._serialized_end=503 + _SCENETASK_CURRENTROOM._serialized_start=506 + _SCENETASK_CURRENTROOM._serialized_end=968 + _SCENETASK_CURRENTROOM_UNIT._serialized_start=626 + _SCENETASK_CURRENTROOM_UNIT._serialized_end=968 + _SCENETASK_CURRENTROOM_UNIT_ROOMCLEAN._serialized_start=829 + _SCENETASK_CURRENTROOM_UNIT_ROOMCLEAN._serialized_end=901 + _SCENETASK_CURRENTROOM_UNIT_ZONECLEAN._serialized_start=903 + _SCENETASK_CURRENTROOM_UNIT_ZONECLEAN._serialized_end=959 + _SCENETASK_ALLROOMS._serialized_start=970 + _SCENETASK_ALLROOMS._serialized_end=1077 + _SCENETASK_TYPE._serialized_start=1079 + _SCENETASK_TYPE._serialized_end=1118 + _SCENETASK_CLEANMODE._serialized_start=1120 + _SCENETASK_CLEANMODE._serialized_end=1155 + _SCENEINFO._serialized_start=1166 + _SCENEINFO._serialized_end=1678 + _SCENEINFO_ID._serialized_start=1405 + _SCENEINFO_ID._serialized_end=1424 + _SCENEINFO_INVALIDREASON._serialized_start=1426 + _SCENEINFO_INVALIDREASON._serialized_end=1538 + _SCENEINFO_TYPE._serialized_start=1541 + _SCENEINFO_TYPE._serialized_end=1678 + _SCENEREQUEST._serialized_start=1681 + _SCENEREQUEST._serialized_end=2100 + _SCENEREQUEST_COMMON._serialized_start=1862 + _SCENEREQUEST_COMMON._serialized_end=1888 + _SCENEREQUEST_SCENE._serialized_start=1890 + _SCENEREQUEST_SCENE._serialized_end=2017 + _SCENEREQUEST_METHOD._serialized_start=2019 + _SCENEREQUEST_METHOD._serialized_end=2091 + _SCENERESPONSE._serialized_start=2103 + _SCENERESPONSE._serialized_end=2389 + _SCENERESPONSE_RESULT._serialized_start=2273 + _SCENERESPONSE_RESULT._serialized_end=2389 + _SCENERESPONSE_RESULT_VALUE._serialized_start=2357 + _SCENERESPONSE_RESULT_VALUE._serialized_end=2389 +# @@protoc_insertion_point(module_scope) diff --git a/proto-reference/scene_pb2.pyi b/proto-reference/scene_pb2.pyi new file mode 100644 index 0000000..142f297 --- /dev/null +++ b/proto-reference/scene_pb2.pyi @@ -0,0 +1,179 @@ +from typing import ClassVar as _ClassVar +from typing import Iterable as _Iterable +from typing import Mapping as _Mapping +from typing import Optional as _Optional +from typing import Union as _Union + +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf.internal import containers as _containers +from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper + +from ...proto.cloud import clean_param_pb2 as _clean_param_pb2 +from ...proto.cloud import common_pb2 as _common_pb2 +from ...proto.cloud import timing_pb2 as _timing_pb2 + +DESCRIPTOR: _descriptor.FileDescriptor + +class SceneInfo(_message.Message): + __slots__ = ["estimate_time", "id", "index", "invalid_reason", "mapid", "name", "type", "valid"] + class InvalidReason(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + class Type(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + class Id(_message.Message): + __slots__ = ["value"] + VALUE_FIELD_NUMBER: _ClassVar[int] + value: int + def __init__(self, value: _Optional[int] = ...) -> None: ... + AFTER_DINNER_CLEANING: SceneInfo.Type + DEFAULT: SceneInfo.InvalidReason + ESTIMATE_TIME_FIELD_NUMBER: _ClassVar[int] + ID_FIELD_NUMBER: _ClassVar[int] + INDEX_FIELD_NUMBER: _ClassVar[int] + INVALID_REASON_FIELD_NUMBER: _ClassVar[int] + MAPID_FIELD_NUMBER: _ClassVar[int] + MAP_NOT_AVAILABLE: SceneInfo.InvalidReason + MAP_NOT_EXIST: SceneInfo.InvalidReason + MAP_NOT_MATCH: SceneInfo.InvalidReason + NAME_FIELD_NUMBER: _ClassVar[int] + NORMAL: SceneInfo.InvalidReason + OTHER: SceneInfo.InvalidReason + PET_AREA_CLEANING: SceneInfo.Type + SCENE_NORMAL: SceneInfo.Type + TYPE_FIELD_NUMBER: _ClassVar[int] + VALID_FIELD_NUMBER: _ClassVar[int] + WHOLE_HOUSE_DAILY_CLEANING: SceneInfo.Type + WHOLE_HOUSE_DEEP_CLEANING: SceneInfo.Type + estimate_time: int + id: SceneInfo.Id + index: int + invalid_reason: SceneInfo.InvalidReason + mapid: int + name: str + type: SceneInfo.Type + valid: bool + def __init__(self, id: _Optional[_Union[SceneInfo.Id, _Mapping]] = ..., valid: bool = ..., invalid_reason: _Optional[_Union[SceneInfo.InvalidReason, str]] = ..., name: _Optional[str] = ..., mapid: _Optional[int] = ..., estimate_time: _Optional[int] = ..., index: _Optional[int] = ..., type: _Optional[_Union[SceneInfo.Type, str]] = ...) -> None: ... + +class SceneRequest(_message.Message): + __slots__ = ["common", "method", "scene", "seq"] + class Method(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + class Common(_message.Message): + __slots__ = ["scene_id"] + SCENE_ID_FIELD_NUMBER: _ClassVar[int] + scene_id: int + def __init__(self, scene_id: _Optional[int] = ...) -> None: ... + class Scene(_message.Message): + __slots__ = ["desc", "info", "tasks"] + DESC_FIELD_NUMBER: _ClassVar[int] + INFO_FIELD_NUMBER: _ClassVar[int] + TASKS_FIELD_NUMBER: _ClassVar[int] + desc: _timing_pb2.TimerInfo.Desc + info: SceneInfo + tasks: _containers.RepeatedCompositeFieldContainer[SceneTask] + def __init__(self, info: _Optional[_Union[SceneInfo, _Mapping]] = ..., tasks: _Optional[_Iterable[_Union[SceneTask, _Mapping]]] = ..., desc: _Optional[_Union[_timing_pb2.TimerInfo.Desc, _Mapping]] = ...) -> None: ... + ADD_SCENE: SceneRequest.Method + COMMON_FIELD_NUMBER: _ClassVar[int] + DEFAULT: SceneRequest.Method + DELETE_SCENE: SceneRequest.Method + METHOD_FIELD_NUMBER: _ClassVar[int] + MODIFY_SCENE: SceneRequest.Method + SCENE_FIELD_NUMBER: _ClassVar[int] + SEQ_FIELD_NUMBER: _ClassVar[int] + common: SceneRequest.Common + method: SceneRequest.Method + scene: SceneRequest.Scene + seq: int + def __init__(self, method: _Optional[_Union[SceneRequest.Method, str]] = ..., seq: _Optional[int] = ..., common: _Optional[_Union[SceneRequest.Common, _Mapping]] = ..., scene: _Optional[_Union[SceneRequest.Scene, _Mapping]] = ...) -> None: ... + +class SceneResponse(_message.Message): + __slots__ = ["infos", "method", "result", "seq"] + class Result(_message.Message): + __slots__ = ["err_code", "value"] + class Value(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + ERR_CODE_FIELD_NUMBER: _ClassVar[int] + FAILED: SceneResponse.Result.Value + SUCCESS: SceneResponse.Result.Value + VALUE_FIELD_NUMBER: _ClassVar[int] + err_code: int + value: SceneResponse.Result.Value + def __init__(self, value: _Optional[_Union[SceneResponse.Result.Value, str]] = ..., err_code: _Optional[int] = ...) -> None: ... + INFOS_FIELD_NUMBER: _ClassVar[int] + METHOD_FIELD_NUMBER: _ClassVar[int] + RESULT_FIELD_NUMBER: _ClassVar[int] + SEQ_FIELD_NUMBER: _ClassVar[int] + infos: _containers.RepeatedCompositeFieldContainer[SceneInfo] + method: SceneRequest.Method + result: SceneResponse.Result + seq: int + def __init__(self, method: _Optional[_Union[SceneRequest.Method, str]] = ..., seq: _Optional[int] = ..., result: _Optional[_Union[SceneResponse.Result, _Mapping]] = ..., infos: _Optional[_Iterable[_Union[SceneInfo, _Mapping]]] = ...) -> None: ... + +class SceneTask(_message.Message): + __slots__ = ["all_rooms", "current_room", "index", "type"] + class CleanMode(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + class Type(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + class AllRooms(_message.Message): + __slots__ = ["general", "mode"] + GENERAL_FIELD_NUMBER: _ClassVar[int] + MODE_FIELD_NUMBER: _ClassVar[int] + general: SceneTask.General + mode: SceneTask.CleanMode + def __init__(self, mode: _Optional[_Union[SceneTask.CleanMode, str]] = ..., general: _Optional[_Union[SceneTask.General, _Mapping]] = ...) -> None: ... + class CurrentRoom(_message.Message): + __slots__ = ["mode", "units"] + class Unit(_message.Message): + __slots__ = ["general", "room_clean", "zone_clean"] + class RoomClean(_message.Message): + __slots__ = ["room_id", "room_scene"] + ROOM_ID_FIELD_NUMBER: _ClassVar[int] + ROOM_SCENE_FIELD_NUMBER: _ClassVar[int] + room_id: int + room_scene: _common_pb2.RoomScene + def __init__(self, room_id: _Optional[int] = ..., room_scene: _Optional[_Union[_common_pb2.RoomScene, _Mapping]] = ...) -> None: ... + class ZoneClean(_message.Message): + __slots__ = ["quadrangle"] + QUADRANGLE_FIELD_NUMBER: _ClassVar[int] + quadrangle: _common_pb2.Quadrangle + def __init__(self, quadrangle: _Optional[_Union[_common_pb2.Quadrangle, _Mapping]] = ...) -> None: ... + GENERAL_FIELD_NUMBER: _ClassVar[int] + ROOM_CLEAN_FIELD_NUMBER: _ClassVar[int] + ZONE_CLEAN_FIELD_NUMBER: _ClassVar[int] + general: SceneTask.General + room_clean: SceneTask.CurrentRoom.Unit.RoomClean + zone_clean: SceneTask.CurrentRoom.Unit.ZoneClean + def __init__(self, general: _Optional[_Union[SceneTask.General, _Mapping]] = ..., room_clean: _Optional[_Union[SceneTask.CurrentRoom.Unit.RoomClean, _Mapping]] = ..., zone_clean: _Optional[_Union[SceneTask.CurrentRoom.Unit.ZoneClean, _Mapping]] = ...) -> None: ... + MODE_FIELD_NUMBER: _ClassVar[int] + UNITS_FIELD_NUMBER: _ClassVar[int] + mode: SceneTask.CleanMode + units: _containers.RepeatedCompositeFieldContainer[SceneTask.CurrentRoom.Unit] + def __init__(self, mode: _Optional[_Union[SceneTask.CleanMode, str]] = ..., units: _Optional[_Iterable[_Union[SceneTask.CurrentRoom.Unit, _Mapping]]] = ...) -> None: ... + class General(_message.Message): + __slots__ = ["clean_extent", "clean_times", "clean_type", "fan", "mop_mode"] + CLEAN_EXTENT_FIELD_NUMBER: _ClassVar[int] + CLEAN_TIMES_FIELD_NUMBER: _ClassVar[int] + CLEAN_TYPE_FIELD_NUMBER: _ClassVar[int] + FAN_FIELD_NUMBER: _ClassVar[int] + MOP_MODE_FIELD_NUMBER: _ClassVar[int] + clean_extent: _clean_param_pb2.CleanExtent + clean_times: int + clean_type: _clean_param_pb2.CleanType + fan: _clean_param_pb2.Fan + mop_mode: _clean_param_pb2.MopMode + def __init__(self, clean_type: _Optional[_Union[_clean_param_pb2.CleanType, _Mapping]] = ..., clean_times: _Optional[int] = ..., fan: _Optional[_Union[_clean_param_pb2.Fan, _Mapping]] = ..., mop_mode: _Optional[_Union[_clean_param_pb2.MopMode, _Mapping]] = ..., clean_extent: _Optional[_Union[_clean_param_pb2.CleanExtent, _Mapping]] = ...) -> None: ... + ALL_ROOMS: SceneTask.Type + ALL_ROOMS_FIELD_NUMBER: _ClassVar[int] + CURRENT_ROOM: SceneTask.Type + CURRENT_ROOM_FIELD_NUMBER: _ClassVar[int] + GENERAL: SceneTask.CleanMode + INDEX_FIELD_NUMBER: _ClassVar[int] + SMART: SceneTask.CleanMode + TYPE_FIELD_NUMBER: _ClassVar[int] + all_rooms: SceneTask.AllRooms + current_room: SceneTask.CurrentRoom + index: int + type: SceneTask.Type + def __init__(self, index: _Optional[int] = ..., type: _Optional[_Union[SceneTask.Type, str]] = ..., current_room: _Optional[_Union[SceneTask.CurrentRoom, _Mapping]] = ..., all_rooms: _Optional[_Union[SceneTask.AllRooms, _Mapping]] = ...) -> None: ... diff --git a/proto-reference/socket.proto b/proto-reference/socket.proto new file mode 100644 index 0000000..8b43bcf --- /dev/null +++ b/proto-reference/socket.proto @@ -0,0 +1,41 @@ +/** + * tcp 服务和 udp 广播协议,通过 socket 进行通信; + */ +syntax = "proto3"; +// option optimize_for = LITE_RUNTIME; + +package proto.cloud; + +import "proto/cloud/ble.proto"; + +// ==机器人定时向外广播== +message SocketBroadcast { + bool is_bind = 1; // 是否绑定 + string device_sn = 2; // 设备序列号 + string user_id = 3; // 用户id(绑定后才有这个字段) +} + +// ==验证消息== +// 1. 客户端(手机 app)连接服务端(机器人) +// 2. 服务端(机器人)向客户端(手机 app)发送 12 位随机数 +// 3. 客户端(手机 app)向服务端(机器人)发送验证消息 +// 4. 服务端(机器人)向客户端(手机 app)发送验证结果(验证失败服务器会关闭 socket 连接) + +// 验证消息的 message 定义如下 +message SocketVerify { + string random = 1; // 12 位随机数 + string device_sn = 2; // 设备序列号 + string user_id = 3; // 用户id(绑定后才验证这个字段) +} +// 验证结果的 message 返回 BtRobotMsg.ProductInfo 消息(消息体中有成功/失败) + +// ==手机 app 发送数据== +message SocketTransData { + enum Type { + E_DISTRIBUTE = 0; // 配网 + E_DP = 1; // 数据点 + } + Type type = 1; + + BtAppMsg.Distribute distribute = 2; +} \ No newline at end of file diff --git a/proto-reference/socket_pb2.py b/proto-reference/socket_pb2.py new file mode 100644 index 0000000..fef05e6 --- /dev/null +++ b/proto-reference/socket_pb2.py @@ -0,0 +1,32 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: proto/cloud/socket.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder + +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from ...proto.cloud import ble_pb2 as proto_dot_cloud_dot_ble__pb2 + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x18proto/cloud/socket.proto\x12\x0bproto.cloud\x1a\x15proto/cloud/ble.proto\"F\n\x0fSocketBroadcast\x12\x0f\n\x07is_bind\x18\x01 \x01(\x08\x12\x11\n\tdevice_sn\x18\x02 \x01(\t\x12\x0f\n\x07user_id\x18\x03 \x01(\t\"B\n\x0cSocketVerify\x12\x0e\n\x06random\x18\x01 \x01(\t\x12\x11\n\tdevice_sn\x18\x02 \x01(\t\x12\x0f\n\x07user_id\x18\x03 \x01(\t\"\x9c\x01\n\x0fSocketTransData\x12/\n\x04type\x18\x01 \x01(\x0e\x32!.proto.cloud.SocketTransData.Type\x12\x34\n\ndistribute\x18\x02 \x01(\x0b\x32 .proto.cloud.BtAppMsg.Distribute\"\"\n\x04Type\x12\x10\n\x0c\x45_DISTRIBUTE\x10\x00\x12\x08\n\x04\x45_DP\x10\x01\x62\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'proto.cloud.socket_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _SOCKETBROADCAST._serialized_start=64 + _SOCKETBROADCAST._serialized_end=134 + _SOCKETVERIFY._serialized_start=136 + _SOCKETVERIFY._serialized_end=202 + _SOCKETTRANSDATA._serialized_start=205 + _SOCKETTRANSDATA._serialized_end=361 + _SOCKETTRANSDATA_TYPE._serialized_start=327 + _SOCKETTRANSDATA_TYPE._serialized_end=361 +# @@protoc_insertion_point(module_scope) diff --git a/proto-reference/socket_pb2.pyi b/proto-reference/socket_pb2.pyi new file mode 100644 index 0000000..73b3a1f --- /dev/null +++ b/proto-reference/socket_pb2.pyi @@ -0,0 +1,44 @@ +from typing import ClassVar as _ClassVar +from typing import Mapping as _Mapping +from typing import Optional as _Optional +from typing import Union as _Union + +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper + +from ...proto.cloud import ble_pb2 as _ble_pb2 + +DESCRIPTOR: _descriptor.FileDescriptor + +class SocketBroadcast(_message.Message): + __slots__ = ["device_sn", "is_bind", "user_id"] + DEVICE_SN_FIELD_NUMBER: _ClassVar[int] + IS_BIND_FIELD_NUMBER: _ClassVar[int] + USER_ID_FIELD_NUMBER: _ClassVar[int] + device_sn: str + is_bind: bool + user_id: str + def __init__(self, is_bind: bool = ..., device_sn: _Optional[str] = ..., user_id: _Optional[str] = ...) -> None: ... + +class SocketTransData(_message.Message): + __slots__ = ["distribute", "type"] + class Type(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + DISTRIBUTE_FIELD_NUMBER: _ClassVar[int] + E_DISTRIBUTE: SocketTransData.Type + E_DP: SocketTransData.Type + TYPE_FIELD_NUMBER: _ClassVar[int] + distribute: _ble_pb2.BtAppMsg.Distribute + type: SocketTransData.Type + def __init__(self, type: _Optional[_Union[SocketTransData.Type, str]] = ..., distribute: _Optional[_Union[_ble_pb2.BtAppMsg.Distribute, _Mapping]] = ...) -> None: ... + +class SocketVerify(_message.Message): + __slots__ = ["device_sn", "random", "user_id"] + DEVICE_SN_FIELD_NUMBER: _ClassVar[int] + RANDOM_FIELD_NUMBER: _ClassVar[int] + USER_ID_FIELD_NUMBER: _ClassVar[int] + device_sn: str + random: str + user_id: str + def __init__(self, random: _Optional[str] = ..., device_sn: _Optional[str] = ..., user_id: _Optional[str] = ...) -> None: ... diff --git a/proto-reference/station.proto b/proto-reference/station.proto new file mode 100644 index 0000000..5588dcd --- /dev/null +++ b/proto-reference/station.proto @@ -0,0 +1,190 @@ +/** + * 基站 Request 和 Response 协议; + */ +syntax = "proto3"; +// option optimize_for = LITE_RUNTIME; +package proto.cloud; + +import "proto/cloud/common.proto"; + +message Duration { // 时长档位分级 + enum Level { + SHORT = 0; + MEDIUM = 1; + LONG = 2; + } + Level level = 1; +} + +message CollectDustCfg { // 集尘配置 + enum Cfg { + CLOSE = 0; // 关闭 + ONCE = 1; // 清扫1次就集尘 + TWICE = 2; // 清扫2次才集尘 + } + Cfg cfg = 1; +} + +message CollectDustCfgV2 { // 集尘配置新版协议 + Switch sw = 1; + + message Mode { + enum Value { + BY_TASK = 0; // 按次数 + BY_TIME = 1; // 按时间 + SMART = 2; // 智能托管 + } + Value value = 1; + + uint32 task = 2; // 任务次数 + uint32 time = 3; // 清洁时间,单位分钟 + } + Mode mode = 2; +} + +message DryCfg { // 烘干配置 + enum Cfg { + CLOSE = 0; // 关闭 + STANDARD = 1; // 标准 + QUICK = 2; // 快速 + } + Cfg cfg = 1; + Duration duration = 2; +} + +message WashCfg { // 洗拖布配置 + message BackwashFreq { + enum Mode { + ByPartition = 0; // 按分区 + ByTime = 1; // 按时间 + ByArea = 2; // 按面积 + } + Mode mode = 1; + // 按档位需要传下面的值(档位表示不同时长或者不同面积) + Duration duration = 2; + // 按数值需要传下面的值(表示不同时长或者不同面积) + Numerical time_or_area = 3; // 时长单位分钟,面积单位平方米 + } + BackwashFreq wash_freq = 1; // 回洗拖布的频率 + Duration wash_duration = 2; // 清洗拖布的时长 + + // 自动洗拖布开关 + enum Cfg { + CLOSE = 0; // 关闭 + STANDARD = 1; // 标准 + } + Cfg cfg = 3; +} + +message CutHairCfg { // 割毛发配置 + Switch sw = 1; +} + +message SelfPurifyingCfg { // [废弃] 手动自净(集尘、滚刷清洁组合项) + enum Type { + STANDARD = 0; // 标准 + STRONG = 1; // 强效 + ENERGY_SAVING = 2; // 节能 + CUSTOM = 3; // 自定义 + } + Type type = 1; + + message Config { + message Frequency { + enum Mode { + BY_TASK = 0; // 按次数 + BY_TIME = 1; // 按时间 + } + Mode mode = 1; + + uint32 task = 2; // 任务次数 + uint32 time = 3; // 清洁时间,单位分钟 + } + Frequency frequency = 1; + + message Intensity { + enum Level { + LOW = 0; + MEDIUM = 1; + HIGH = 2; + } + Level level = 1; + } + Intensity intensity = 2; + } + + // 设备始终上报所有的配置 + // app 选择自定义时,需要下发 custom_cfg + Config standard_cfg = 2; + Config strong_cfg = 3; + Config energy_saving_cfg = 4; + Config custom_cfg = 5; +} + +message AutoActionCfg { // 扫拖过程自动进行的行为开关 + WashCfg wash = 1; //洗拖布 + DryCfg dry = 2; // 烘干 + CollectDustCfg collectdust = 3; // 集尘 + bool detergent = 4; // 添加清洁剂 + bool make_disinfectant = 5; // 自动制备消毒剂 + CollectDustCfgV2 collectdust_v2 = 6; // 集尘新版协议 + CutHairCfg cut_hair = 7; // 割毛发 + SelfPurifyingCfg self_purifying = 8; // [废弃] 手动自净(集尘、滚刷清洁组合项) +} + +message ManualActionCmd { + oneof Cmd { + bool self_maintain = 1; // 按照设置完成返回基站后的自动维护操作(加污排污/集尘/洗拖把/烘干),即深度自清洁 + bool go_dry = 2; // 手动烘干开关 + bool go_collect_dust = 3; // 手动集尘 + bool go_selfcleaning = 4; // 手动洗拖把 + bool go_remove_scale = 5; // 手动除水垢 + bool go_cut_hair = 6; // 手动割毛发 + bool go_selfpurifying = 7; // [废弃] 手动自净(集尘、滚刷清洁组合项) + } +} + +// 拖地模式下: +// 回到基站自动触发清洗拖布; +// 需要设置自动烘干拖布,才能烘干拖布; +message StationRequest { + AutoActionCfg auto_cfg = 1; + ManualActionCmd manual_cmd = 2; +} + +message StationResponse { + AutoActionCfg auto_cfg_status = 1; + + message StationStatus { + bool connected = 1; //基站是否已连接 + + // 基站工作状态 + enum State { + IDLE = 0; // 空闲 + WASHING = 1; // 清洗拖布 + DRYING = 2; // 烘干拖布 + REMOVING_SCALE = 3; // 除水垢 + } + State state = 2; + + // 各模块的状态 + bool collecting_dust = 3; // 集尘中 + bool clear_water_adding = 4; // 清水添加中 + bool waste_water_recycling = 5; // 污水回收中 + bool disinfectant_making = 6; // 消毒剂制备中 + bool cutting_hair = 7; // 割毛发 + } + StationStatus status = 2; + + enum WaterLevel { + EMPTY = 0; + VERY_LOW = 1; // <25% + LOW = 2; // 25% < low < 50% + MEDIUM = 3; // 50% < medium < 75% + HIGH = 4; // >75% + } + WaterLevel clean_level = 3; // 干净水量 + WaterLevel dirty_level = 4; // 污水水量 + + Numerical clean_water = 5; // 干净水量,0%~100% +} diff --git a/proto-reference/station_pb2.py b/proto-reference/station_pb2.py new file mode 100644 index 0000000..dea7e1c --- /dev/null +++ b/proto-reference/station_pb2.py @@ -0,0 +1,80 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: proto/cloud/station.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder + +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from ...proto.cloud import common_pb2 as proto_dot_cloud_dot_common__pb2 + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x19proto/cloud/station.proto\x12\x0bproto.cloud\x1a\x18proto/cloud/common.proto\"`\n\x08\x44uration\x12*\n\x05level\x18\x01 \x01(\x0e\x32\x1b.proto.cloud.Duration.Level\"(\n\x05Level\x12\t\n\x05SHORT\x10\x00\x12\n\n\x06MEDIUM\x10\x01\x12\x08\n\x04LONG\x10\x02\"e\n\x0e\x43ollectDustCfg\x12,\n\x03\x63\x66g\x18\x01 \x01(\x0e\x32\x1f.proto.cloud.CollectDustCfg.Cfg\"%\n\x03\x43\x66g\x12\t\n\x05\x43LOSE\x10\x00\x12\x08\n\x04ONCE\x10\x01\x12\t\n\x05TWICE\x10\x02\"\xe5\x01\n\x10\x43ollectDustCfgV2\x12\x1f\n\x02sw\x18\x01 \x01(\x0b\x32\x13.proto.cloud.Switch\x12\x30\n\x04mode\x18\x02 \x01(\x0b\x32\".proto.cloud.CollectDustCfgV2.Mode\x1a~\n\x04Mode\x12\x37\n\x05value\x18\x01 \x01(\x0e\x32(.proto.cloud.CollectDustCfgV2.Mode.Value\x12\x0c\n\x04task\x18\x02 \x01(\r\x12\x0c\n\x04time\x18\x03 \x01(\r\"!\n\x05Value\x12\x0b\n\x07\x42Y_TASK\x10\x00\x12\x0b\n\x07\x42Y_TIME\x10\x01\"\x82\x01\n\x06\x44ryCfg\x12$\n\x03\x63\x66g\x18\x01 \x01(\x0e\x32\x17.proto.cloud.DryCfg.Cfg\x12\'\n\x08\x64uration\x18\x02 \x01(\x0b\x32\x15.proto.cloud.Duration\")\n\x03\x43\x66g\x12\t\n\x05\x43LOSE\x10\x00\x12\x0c\n\x08STANDARD\x10\x01\x12\t\n\x05QUICK\x10\x02\"\x83\x03\n\x07WashCfg\x12\x34\n\twash_freq\x18\x01 \x01(\x0b\x32!.proto.cloud.WashCfg.BackwashFreq\x12,\n\rwash_duration\x18\x02 \x01(\x0b\x32\x15.proto.cloud.Duration\x12%\n\x03\x63\x66g\x18\x03 \x01(\x0e\x32\x18.proto.cloud.WashCfg.Cfg\x1a\xcc\x01\n\x0c\x42\x61\x63kwashFreq\x12\x34\n\x04mode\x18\x01 \x01(\x0e\x32&.proto.cloud.WashCfg.BackwashFreq.Mode\x12\'\n\x08\x64uration\x18\x02 \x01(\x0b\x32\x15.proto.cloud.Duration\x12,\n\x0ctime_or_area\x18\x03 \x01(\x0b\x32\x16.proto.cloud.Numerical\"/\n\x04Mode\x12\x0f\n\x0b\x42yPartition\x10\x00\x12\n\n\x06\x42yTime\x10\x01\x12\n\n\x06\x42yArea\x10\x02\"\x1e\n\x03\x43\x66g\x12\t\n\x05\x43LOSE\x10\x00\x12\x0c\n\x08STANDARD\x10\x01\"-\n\nCutHairCfg\x12\x1f\n\x02sw\x18\x01 \x01(\x0b\x32\x13.proto.cloud.Switch\"\x90\x06\n\x10SelfPurifyingCfg\x12\x30\n\x04type\x18\x01 \x01(\x0e\x32\".proto.cloud.SelfPurifyingCfg.Type\x12:\n\x0cstandard_cfg\x18\x02 \x01(\x0b\x32$.proto.cloud.SelfPurifyingCfg.Config\x12\x38\n\nstrong_cfg\x18\x03 \x01(\x0b\x32$.proto.cloud.SelfPurifyingCfg.Config\x12?\n\x11\x65nergy_saving_cfg\x18\x04 \x01(\x0b\x32$.proto.cloud.SelfPurifyingCfg.Config\x12\x38\n\ncustom_cfg\x18\x05 \x01(\x0b\x32$.proto.cloud.SelfPurifyingCfg.Config\x1a\x97\x03\n\x06\x43onfig\x12\x41\n\tfrequency\x18\x01 \x01(\x0b\x32..proto.cloud.SelfPurifyingCfg.Config.Frequency\x12\x41\n\tintensity\x18\x02 \x01(\x0b\x32..proto.cloud.SelfPurifyingCfg.Config.Intensity\x1a\x8c\x01\n\tFrequency\x12\x41\n\x04mode\x18\x01 \x01(\x0e\x32\x33.proto.cloud.SelfPurifyingCfg.Config.Frequency.Mode\x12\x0c\n\x04task\x18\x02 \x01(\r\x12\x0c\n\x04time\x18\x03 \x01(\r\" \n\x04Mode\x12\x0b\n\x07\x42Y_TASK\x10\x00\x12\x0b\n\x07\x42Y_TIME\x10\x01\x1ax\n\tIntensity\x12\x43\n\x05level\x18\x01 \x01(\x0e\x32\x34.proto.cloud.SelfPurifyingCfg.Config.Intensity.Level\"&\n\x05Level\x12\x07\n\x03LOW\x10\x00\x12\n\n\x06MEDIUM\x10\x01\x12\x08\n\x04HIGH\x10\x02\"?\n\x04Type\x12\x0c\n\x08STANDARD\x10\x00\x12\n\n\x06STRONG\x10\x01\x12\x11\n\rENERGY_SAVING\x10\x02\x12\n\n\x06\x43USTOM\x10\x03\"\xce\x02\n\rAutoActionCfg\x12\"\n\x04wash\x18\x01 \x01(\x0b\x32\x14.proto.cloud.WashCfg\x12 \n\x03\x64ry\x18\x02 \x01(\x0b\x32\x13.proto.cloud.DryCfg\x12\x30\n\x0b\x63ollectdust\x18\x03 \x01(\x0b\x32\x1b.proto.cloud.CollectDustCfg\x12\x11\n\tdetergent\x18\x04 \x01(\x08\x12\x19\n\x11make_disinfectant\x18\x05 \x01(\x08\x12\x35\n\x0e\x63ollectdust_v2\x18\x06 \x01(\x0b\x32\x1d.proto.cloud.CollectDustCfgV2\x12)\n\x08\x63ut_hair\x18\x07 \x01(\x0b\x32\x17.proto.cloud.CutHairCfg\x12\x35\n\x0eself_purifying\x18\x08 \x01(\x0b\x32\x1d.proto.cloud.SelfPurifyingCfg\"\xc7\x01\n\x0fManualActionCmd\x12\x17\n\rself_maintain\x18\x01 \x01(\x08H\x00\x12\x10\n\x06go_dry\x18\x02 \x01(\x08H\x00\x12\x19\n\x0fgo_collect_dust\x18\x03 \x01(\x08H\x00\x12\x19\n\x0fgo_selfcleaning\x18\x04 \x01(\x08H\x00\x12\x19\n\x0fgo_remove_scale\x18\x05 \x01(\x08H\x00\x12\x15\n\x0bgo_cut_hair\x18\x06 \x01(\x08H\x00\x12\x1a\n\x10go_selfpurifying\x18\x07 \x01(\x08H\x00\x42\x05\n\x03\x43md\"p\n\x0eStationRequest\x12,\n\x08\x61uto_cfg\x18\x01 \x01(\x0b\x32\x1a.proto.cloud.AutoActionCfg\x12\x30\n\nmanual_cmd\x18\x02 \x01(\x0b\x32\x1c.proto.cloud.ManualActionCmd\"\x9e\x05\n\x0fStationResponse\x12\x33\n\x0f\x61uto_cfg_status\x18\x01 \x01(\x0b\x32\x1a.proto.cloud.AutoActionCfg\x12:\n\x06status\x18\x02 \x01(\x0b\x32*.proto.cloud.StationResponse.StationStatus\x12<\n\x0b\x63lean_level\x18\x03 \x01(\x0e\x32\'.proto.cloud.StationResponse.WaterLevel\x12<\n\x0b\x64irty_level\x18\x04 \x01(\x0e\x32\'.proto.cloud.StationResponse.WaterLevel\x12+\n\x0b\x63lean_water\x18\x05 \x01(\x0b\x32\x16.proto.cloud.Numerical\x1a\xaa\x02\n\rStationStatus\x12\x11\n\tconnected\x18\x01 \x01(\x08\x12?\n\x05state\x18\x02 \x01(\x0e\x32\x30.proto.cloud.StationResponse.StationStatus.State\x12\x17\n\x0f\x63ollecting_dust\x18\x03 \x01(\x08\x12\x1a\n\x12\x63lear_water_adding\x18\x04 \x01(\x08\x12\x1d\n\x15waste_water_recycling\x18\x05 \x01(\x08\x12\x1b\n\x13\x64isinfectant_making\x18\x06 \x01(\x08\x12\x14\n\x0c\x63utting_hair\x18\x07 \x01(\x08\">\n\x05State\x12\x08\n\x04IDLE\x10\x00\x12\x0b\n\x07WASHING\x10\x01\x12\n\n\x06\x44RYING\x10\x02\x12\x12\n\x0eREMOVING_SCALE\x10\x03\"D\n\nWaterLevel\x12\t\n\x05\x45MPTY\x10\x00\x12\x0c\n\x08VERY_LOW\x10\x01\x12\x07\n\x03LOW\x10\x02\x12\n\n\x06MEDIUM\x10\x03\x12\x08\n\x04HIGH\x10\x04\x62\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'proto.cloud.station_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _DURATION._serialized_start=68 + _DURATION._serialized_end=164 + _DURATION_LEVEL._serialized_start=124 + _DURATION_LEVEL._serialized_end=164 + _COLLECTDUSTCFG._serialized_start=166 + _COLLECTDUSTCFG._serialized_end=267 + _COLLECTDUSTCFG_CFG._serialized_start=230 + _COLLECTDUSTCFG_CFG._serialized_end=267 + _COLLECTDUSTCFGV2._serialized_start=270 + _COLLECTDUSTCFGV2._serialized_end=499 + _COLLECTDUSTCFGV2_MODE._serialized_start=373 + _COLLECTDUSTCFGV2_MODE._serialized_end=499 + _COLLECTDUSTCFGV2_MODE_VALUE._serialized_start=466 + _COLLECTDUSTCFGV2_MODE_VALUE._serialized_end=499 + _DRYCFG._serialized_start=502 + _DRYCFG._serialized_end=632 + _DRYCFG_CFG._serialized_start=591 + _DRYCFG_CFG._serialized_end=632 + _WASHCFG._serialized_start=635 + _WASHCFG._serialized_end=1022 + _WASHCFG_BACKWASHFREQ._serialized_start=786 + _WASHCFG_BACKWASHFREQ._serialized_end=990 + _WASHCFG_BACKWASHFREQ_MODE._serialized_start=943 + _WASHCFG_BACKWASHFREQ_MODE._serialized_end=990 + _WASHCFG_CFG._serialized_start=591 + _WASHCFG_CFG._serialized_end=621 + _CUTHAIRCFG._serialized_start=1024 + _CUTHAIRCFG._serialized_end=1069 + _SELFPURIFYINGCFG._serialized_start=1072 + _SELFPURIFYINGCFG._serialized_end=1856 + _SELFPURIFYINGCFG_CONFIG._serialized_start=1384 + _SELFPURIFYINGCFG_CONFIG._serialized_end=1791 + _SELFPURIFYINGCFG_CONFIG_FREQUENCY._serialized_start=1529 + _SELFPURIFYINGCFG_CONFIG_FREQUENCY._serialized_end=1669 + _SELFPURIFYINGCFG_CONFIG_FREQUENCY_MODE._serialized_start=1637 + _SELFPURIFYINGCFG_CONFIG_FREQUENCY_MODE._serialized_end=1669 + _SELFPURIFYINGCFG_CONFIG_INTENSITY._serialized_start=1671 + _SELFPURIFYINGCFG_CONFIG_INTENSITY._serialized_end=1791 + _SELFPURIFYINGCFG_CONFIG_INTENSITY_LEVEL._serialized_start=1753 + _SELFPURIFYINGCFG_CONFIG_INTENSITY_LEVEL._serialized_end=1791 + _SELFPURIFYINGCFG_TYPE._serialized_start=1793 + _SELFPURIFYINGCFG_TYPE._serialized_end=1856 + _AUTOACTIONCFG._serialized_start=1859 + _AUTOACTIONCFG._serialized_end=2193 + _MANUALACTIONCMD._serialized_start=2196 + _MANUALACTIONCMD._serialized_end=2395 + _STATIONREQUEST._serialized_start=2397 + _STATIONREQUEST._serialized_end=2509 + _STATIONRESPONSE._serialized_start=2512 + _STATIONRESPONSE._serialized_end=3182 + _STATIONRESPONSE_STATIONSTATUS._serialized_start=2814 + _STATIONRESPONSE_STATIONSTATUS._serialized_end=3112 + _STATIONRESPONSE_STATIONSTATUS_STATE._serialized_start=3050 + _STATIONRESPONSE_STATIONSTATUS_STATE._serialized_end=3112 + _STATIONRESPONSE_WATERLEVEL._serialized_start=3114 + _STATIONRESPONSE_WATERLEVEL._serialized_end=3182 +# @@protoc_insertion_point(module_scope) diff --git a/proto-reference/station_pb2.pyi b/proto-reference/station_pb2.pyi new file mode 100644 index 0000000..89feddb --- /dev/null +++ b/proto-reference/station_pb2.pyi @@ -0,0 +1,242 @@ +from typing import ClassVar as _ClassVar +from typing import Mapping as _Mapping +from typing import Optional as _Optional +from typing import Union as _Union + +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper + +from ...proto.cloud import common_pb2 as _common_pb2 + +DESCRIPTOR: _descriptor.FileDescriptor + +class AutoActionCfg(_message.Message): + __slots__ = ["collectdust", "collectdust_v2", "cut_hair", "detergent", "dry", "make_disinfectant", "self_purifying", "wash"] + COLLECTDUST_FIELD_NUMBER: _ClassVar[int] + COLLECTDUST_V2_FIELD_NUMBER: _ClassVar[int] + CUT_HAIR_FIELD_NUMBER: _ClassVar[int] + DETERGENT_FIELD_NUMBER: _ClassVar[int] + DRY_FIELD_NUMBER: _ClassVar[int] + MAKE_DISINFECTANT_FIELD_NUMBER: _ClassVar[int] + SELF_PURIFYING_FIELD_NUMBER: _ClassVar[int] + WASH_FIELD_NUMBER: _ClassVar[int] + collectdust: CollectDustCfg + collectdust_v2: CollectDustCfgV2 + cut_hair: CutHairCfg + detergent: bool + dry: DryCfg + make_disinfectant: bool + self_purifying: SelfPurifyingCfg + wash: WashCfg + def __init__(self, wash: _Optional[_Union[WashCfg, _Mapping]] = ..., dry: _Optional[_Union[DryCfg, _Mapping]] = ..., collectdust: _Optional[_Union[CollectDustCfg, _Mapping]] = ..., detergent: bool = ..., make_disinfectant: bool = ..., collectdust_v2: _Optional[_Union[CollectDustCfgV2, _Mapping]] = ..., cut_hair: _Optional[_Union[CutHairCfg, _Mapping]] = ..., self_purifying: _Optional[_Union[SelfPurifyingCfg, _Mapping]] = ...) -> None: ... + +class CollectDustCfg(_message.Message): + __slots__ = ["cfg"] + class Cfg(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + CFG_FIELD_NUMBER: _ClassVar[int] + CLOSE: CollectDustCfg.Cfg + ONCE: CollectDustCfg.Cfg + TWICE: CollectDustCfg.Cfg + cfg: CollectDustCfg.Cfg + def __init__(self, cfg: _Optional[_Union[CollectDustCfg.Cfg, str]] = ...) -> None: ... + +class CollectDustCfgV2(_message.Message): + __slots__ = ["mode", "sw"] + class Mode(_message.Message): + __slots__ = ["task", "time", "value"] + class Value(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + BY_TASK: CollectDustCfgV2.Mode.Value + BY_TIME: CollectDustCfgV2.Mode.Value + TASK_FIELD_NUMBER: _ClassVar[int] + TIME_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + task: int + time: int + value: CollectDustCfgV2.Mode.Value + def __init__(self, value: _Optional[_Union[CollectDustCfgV2.Mode.Value, str]] = ..., task: _Optional[int] = ..., time: _Optional[int] = ...) -> None: ... + MODE_FIELD_NUMBER: _ClassVar[int] + SW_FIELD_NUMBER: _ClassVar[int] + mode: CollectDustCfgV2.Mode + sw: _common_pb2.Switch + def __init__(self, sw: _Optional[_Union[_common_pb2.Switch, _Mapping]] = ..., mode: _Optional[_Union[CollectDustCfgV2.Mode, _Mapping]] = ...) -> None: ... + +class CutHairCfg(_message.Message): + __slots__ = ["sw"] + SW_FIELD_NUMBER: _ClassVar[int] + sw: _common_pb2.Switch + def __init__(self, sw: _Optional[_Union[_common_pb2.Switch, _Mapping]] = ...) -> None: ... + +class DryCfg(_message.Message): + __slots__ = ["cfg", "duration"] + class Cfg(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + CFG_FIELD_NUMBER: _ClassVar[int] + CLOSE: DryCfg.Cfg + DURATION_FIELD_NUMBER: _ClassVar[int] + QUICK: DryCfg.Cfg + STANDARD: DryCfg.Cfg + cfg: DryCfg.Cfg + duration: Duration + def __init__(self, cfg: _Optional[_Union[DryCfg.Cfg, str]] = ..., duration: _Optional[_Union[Duration, _Mapping]] = ...) -> None: ... + +class Duration(_message.Message): + __slots__ = ["level"] + class Level(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + LEVEL_FIELD_NUMBER: _ClassVar[int] + LONG: Duration.Level + MEDIUM: Duration.Level + SHORT: Duration.Level + level: Duration.Level + def __init__(self, level: _Optional[_Union[Duration.Level, str]] = ...) -> None: ... + +class ManualActionCmd(_message.Message): + __slots__ = ["go_collect_dust", "go_cut_hair", "go_dry", "go_remove_scale", "go_selfcleaning", "go_selfpurifying", "self_maintain"] + GO_COLLECT_DUST_FIELD_NUMBER: _ClassVar[int] + GO_CUT_HAIR_FIELD_NUMBER: _ClassVar[int] + GO_DRY_FIELD_NUMBER: _ClassVar[int] + GO_REMOVE_SCALE_FIELD_NUMBER: _ClassVar[int] + GO_SELFCLEANING_FIELD_NUMBER: _ClassVar[int] + GO_SELFPURIFYING_FIELD_NUMBER: _ClassVar[int] + SELF_MAINTAIN_FIELD_NUMBER: _ClassVar[int] + go_collect_dust: bool + go_cut_hair: bool + go_dry: bool + go_remove_scale: bool + go_selfcleaning: bool + go_selfpurifying: bool + self_maintain: bool + def __init__(self, self_maintain: bool = ..., go_dry: bool = ..., go_collect_dust: bool = ..., go_selfcleaning: bool = ..., go_remove_scale: bool = ..., go_cut_hair: bool = ..., go_selfpurifying: bool = ...) -> None: ... + +class SelfPurifyingCfg(_message.Message): + __slots__ = ["custom_cfg", "energy_saving_cfg", "standard_cfg", "strong_cfg", "type"] + class Type(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + class Config(_message.Message): + __slots__ = ["frequency", "intensity"] + class Frequency(_message.Message): + __slots__ = ["mode", "task", "time"] + class Mode(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + BY_TASK: SelfPurifyingCfg.Config.Frequency.Mode + BY_TIME: SelfPurifyingCfg.Config.Frequency.Mode + MODE_FIELD_NUMBER: _ClassVar[int] + TASK_FIELD_NUMBER: _ClassVar[int] + TIME_FIELD_NUMBER: _ClassVar[int] + mode: SelfPurifyingCfg.Config.Frequency.Mode + task: int + time: int + def __init__(self, mode: _Optional[_Union[SelfPurifyingCfg.Config.Frequency.Mode, str]] = ..., task: _Optional[int] = ..., time: _Optional[int] = ...) -> None: ... + class Intensity(_message.Message): + __slots__ = ["level"] + class Level(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + HIGH: SelfPurifyingCfg.Config.Intensity.Level + LEVEL_FIELD_NUMBER: _ClassVar[int] + LOW: SelfPurifyingCfg.Config.Intensity.Level + MEDIUM: SelfPurifyingCfg.Config.Intensity.Level + level: SelfPurifyingCfg.Config.Intensity.Level + def __init__(self, level: _Optional[_Union[SelfPurifyingCfg.Config.Intensity.Level, str]] = ...) -> None: ... + FREQUENCY_FIELD_NUMBER: _ClassVar[int] + INTENSITY_FIELD_NUMBER: _ClassVar[int] + frequency: SelfPurifyingCfg.Config.Frequency + intensity: SelfPurifyingCfg.Config.Intensity + def __init__(self, frequency: _Optional[_Union[SelfPurifyingCfg.Config.Frequency, _Mapping]] = ..., intensity: _Optional[_Union[SelfPurifyingCfg.Config.Intensity, _Mapping]] = ...) -> None: ... + CUSTOM: SelfPurifyingCfg.Type + CUSTOM_CFG_FIELD_NUMBER: _ClassVar[int] + ENERGY_SAVING: SelfPurifyingCfg.Type + ENERGY_SAVING_CFG_FIELD_NUMBER: _ClassVar[int] + STANDARD: SelfPurifyingCfg.Type + STANDARD_CFG_FIELD_NUMBER: _ClassVar[int] + STRONG: SelfPurifyingCfg.Type + STRONG_CFG_FIELD_NUMBER: _ClassVar[int] + TYPE_FIELD_NUMBER: _ClassVar[int] + custom_cfg: SelfPurifyingCfg.Config + energy_saving_cfg: SelfPurifyingCfg.Config + standard_cfg: SelfPurifyingCfg.Config + strong_cfg: SelfPurifyingCfg.Config + type: SelfPurifyingCfg.Type + def __init__(self, type: _Optional[_Union[SelfPurifyingCfg.Type, str]] = ..., standard_cfg: _Optional[_Union[SelfPurifyingCfg.Config, _Mapping]] = ..., strong_cfg: _Optional[_Union[SelfPurifyingCfg.Config, _Mapping]] = ..., energy_saving_cfg: _Optional[_Union[SelfPurifyingCfg.Config, _Mapping]] = ..., custom_cfg: _Optional[_Union[SelfPurifyingCfg.Config, _Mapping]] = ...) -> None: ... + +class StationRequest(_message.Message): + __slots__ = ["auto_cfg", "manual_cmd"] + AUTO_CFG_FIELD_NUMBER: _ClassVar[int] + MANUAL_CMD_FIELD_NUMBER: _ClassVar[int] + auto_cfg: AutoActionCfg + manual_cmd: ManualActionCmd + def __init__(self, auto_cfg: _Optional[_Union[AutoActionCfg, _Mapping]] = ..., manual_cmd: _Optional[_Union[ManualActionCmd, _Mapping]] = ...) -> None: ... + +class StationResponse(_message.Message): + __slots__ = ["auto_cfg_status", "clean_level", "clean_water", "dirty_level", "status"] + class WaterLevel(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + class StationStatus(_message.Message): + __slots__ = ["clear_water_adding", "collecting_dust", "connected", "cutting_hair", "disinfectant_making", "state", "waste_water_recycling"] + class State(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + CLEAR_WATER_ADDING_FIELD_NUMBER: _ClassVar[int] + COLLECTING_DUST_FIELD_NUMBER: _ClassVar[int] + CONNECTED_FIELD_NUMBER: _ClassVar[int] + CUTTING_HAIR_FIELD_NUMBER: _ClassVar[int] + DISINFECTANT_MAKING_FIELD_NUMBER: _ClassVar[int] + DRYING: StationResponse.StationStatus.State + IDLE: StationResponse.StationStatus.State + REMOVING_SCALE: StationResponse.StationStatus.State + STATE_FIELD_NUMBER: _ClassVar[int] + WASHING: StationResponse.StationStatus.State + WASTE_WATER_RECYCLING_FIELD_NUMBER: _ClassVar[int] + clear_water_adding: bool + collecting_dust: bool + connected: bool + cutting_hair: bool + disinfectant_making: bool + state: StationResponse.StationStatus.State + waste_water_recycling: bool + def __init__(self, connected: bool = ..., state: _Optional[_Union[StationResponse.StationStatus.State, str]] = ..., collecting_dust: bool = ..., clear_water_adding: bool = ..., waste_water_recycling: bool = ..., disinfectant_making: bool = ..., cutting_hair: bool = ...) -> None: ... + AUTO_CFG_STATUS_FIELD_NUMBER: _ClassVar[int] + CLEAN_LEVEL_FIELD_NUMBER: _ClassVar[int] + CLEAN_WATER_FIELD_NUMBER: _ClassVar[int] + DIRTY_LEVEL_FIELD_NUMBER: _ClassVar[int] + EMPTY: StationResponse.WaterLevel + HIGH: StationResponse.WaterLevel + LOW: StationResponse.WaterLevel + MEDIUM: StationResponse.WaterLevel + STATUS_FIELD_NUMBER: _ClassVar[int] + VERY_LOW: StationResponse.WaterLevel + auto_cfg_status: AutoActionCfg + clean_level: StationResponse.WaterLevel + clean_water: _common_pb2.Numerical + dirty_level: StationResponse.WaterLevel + status: StationResponse.StationStatus + def __init__(self, auto_cfg_status: _Optional[_Union[AutoActionCfg, _Mapping]] = ..., status: _Optional[_Union[StationResponse.StationStatus, _Mapping]] = ..., clean_level: _Optional[_Union[StationResponse.WaterLevel, str]] = ..., dirty_level: _Optional[_Union[StationResponse.WaterLevel, str]] = ..., clean_water: _Optional[_Union[_common_pb2.Numerical, _Mapping]] = ...) -> None: ... + +class WashCfg(_message.Message): + __slots__ = ["cfg", "wash_duration", "wash_freq"] + class Cfg(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + class BackwashFreq(_message.Message): + __slots__ = ["duration", "mode", "time_or_area"] + class Mode(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + ByArea: WashCfg.BackwashFreq.Mode + ByPartition: WashCfg.BackwashFreq.Mode + ByTime: WashCfg.BackwashFreq.Mode + DURATION_FIELD_NUMBER: _ClassVar[int] + MODE_FIELD_NUMBER: _ClassVar[int] + TIME_OR_AREA_FIELD_NUMBER: _ClassVar[int] + duration: Duration + mode: WashCfg.BackwashFreq.Mode + time_or_area: _common_pb2.Numerical + def __init__(self, mode: _Optional[_Union[WashCfg.BackwashFreq.Mode, str]] = ..., duration: _Optional[_Union[Duration, _Mapping]] = ..., time_or_area: _Optional[_Union[_common_pb2.Numerical, _Mapping]] = ...) -> None: ... + CFG_FIELD_NUMBER: _ClassVar[int] + CLOSE: WashCfg.Cfg + STANDARD: WashCfg.Cfg + WASH_DURATION_FIELD_NUMBER: _ClassVar[int] + WASH_FREQ_FIELD_NUMBER: _ClassVar[int] + cfg: WashCfg.Cfg + wash_duration: Duration + wash_freq: WashCfg.BackwashFreq + def __init__(self, wash_freq: _Optional[_Union[WashCfg.BackwashFreq, _Mapping]] = ..., wash_duration: _Optional[_Union[Duration, _Mapping]] = ..., cfg: _Optional[_Union[WashCfg.Cfg, str]] = ...) -> None: ... diff --git a/proto-reference/stream.proto b/proto-reference/stream.proto new file mode 100644 index 0000000..356e05e --- /dev/null +++ b/proto-reference/stream.proto @@ -0,0 +1,423 @@ +/** + * 流通道 + */ +syntax = "proto3"; + +// option optimize_for = LITE_RUNTIME; + +package proto.cloud.stream; + +import "proto/cloud/common.proto"; +import "proto/cloud/clean_param.proto"; +import "proto/cloud/control.proto"; +import "proto/cloud/scene.proto"; + +/** + * 通道、版本信息. + * + * @note: Delimited 方式序列化. + */ +message Metadata { + message Versions { + // 只针对非 protobuf 格式的通道,protobuf协议本身是向下兼容的; + uint32 map_data = 1; + } + Versions versions = 1; + + message ChanIds { + // 地图信息通道,使用 message MapInfo 解析; + uint32 map_info = 1; + + // 路径数据通道,使用 message Path 解析; + uint32 path = 2; + + // 房间轮廓,使用 message RoomOutline 解析; + uint32 room_outline = 3; + + // 房间参数信息,使用 message RoomParams 解析; + uint32 room_params = 4; + + // 禁区信息,使用 message RestrictedZone 解析; + uint32 restricted_zone = 5; + + // 动态数据,主要是位姿,使用 message DynamicData 解析; + uint32 dynamic_data = 6; + + // 临时数据通道,包括选区、指哪到哪等参数,使用 message TemporaryData 解析; + uint32 temporary_data = 7; + + // 视觉识别的物体信息,使用 message ObstacleInfo 解析; + uint32 obstacle_info = 8; + + // 地图数据,使用 message Map 解析. + uint32 map_data = 9; + + // 巡航点数据,使用 message CruiseData 解析; + uint32 cruise_data = 10; + } + ChanIds chan_ids = 2; +} + +/** + * 地图信息. + * + * @note: Delimited 方式序列化. + */ +message MapInfo { + uint32 map_id = 1; // id 1 不再使用,兼容回放系统留到 2023/01/22 再删除 + + uint32 width = 2; + uint32 height = 3; + uint32 resolution = 4; // 单位: m x 100 + + Point origin = 5; // 原点 + repeated Pose docks = 6; // 支持多个充电座/基站 + + enum Type { + INCOMPLETE = 0; // 不完善的地图 + ROUGH = 1; // 粗糙的完整地图(快速产生的地图) + EFFECTIVE = 2; // 有效的完整地图(清洁建图、快速建图后继续清洁产生的地图) + LIST_FULL = 3; // 列表已满(通知 app 需要替换一张多地图或者忽略当前地图) + } + Type type = 7; + + uint32 seq = 8; // id 8 不再使用,兼容回放系统留到 2023/01/22 再删除 + uint32 angle = 9; // 顺时针的角度的度数,如 90,180 + + message Dock { + enum Type { + ADAPTER = 0; // 充电座 + STATION = 1; // 基站 + } + Dock.Type type = 1; + Pose pose = 2; + } + repeated Dock docks_v2 = 10; // 支持多个充电座/基站 +} + +/** + * 地图帧数据, 可全量和增量上传. + * 当 Frame 为 I 时,表示全量地图,机器端会先清除地图subid通道数据; + * 当 Frame 为 P 时,表示增量地图; + * + * @note: Delimited 方式序列化. + */ +message Map { + uint32 map_id = 1; // id 1 不再使用,兼容回放系统留到 2023/01/22 再删除 + uint32 seq = 2; // id 2 不再使用,兼容回放系统留到 2023/01/22 再删除 + + enum Frame { + I = 0; // 全量地图 + P = 1; // 增量地图 + } + Frame frame = 3; + + enum PixelValue { + UNKNOW = 0; + OBSTACLE = 1; + FREE = 2; + CARPET = 3; + } + /** + * 地图像素数据,目前采用 LZ4 压缩; + * 每个像素占 2bit,即4种值,与上面 enum PixelValue 对应. + * 像素从字节低位bit开始. + */ + bytes pixels = 4; // 地图压缩 + + /** + * 地图像素原始size, 如果pixels有压缩,则 pixel_size 表示解压后的长度. + */ + uint32 pixel_size = 5; + + MapInfo info = 6; // map 的信息 + string name = 7; // map 的名称 + uint32 id = 8; // map 的 id 号 + uint32 releases = 9; // map 的大版本修正号 + + message Index { + uint32 value = 1; // 地图索引,0 表示实时地图,1~MULTI_MAP_NUM 表示多地图中的地图索引 + } + Index index = 10; +} + +/** + * 路径数据,增量上传. + * + * @note: Delimited 方式序列化. + */ +/** xy 信息如下: + byte 1-2: x 坐标, byte1高字节,最高位为符号位, byte2为低字节; + byte 3-4: y 坐标,byte3高字节,最高位为符号位, byte4为低字节; + flags 信息如下: + byte 1: flags信息, + bit 0-3 类型,见下方定义: + SWEEP = 0, // 纯扫 + MOP = 1, // 纯拖地 + SWEEP_MOP = 2, // 扫+拖地 + FAST_MAPPING = 3, // 快速建图运行轨迹 + CRUISIING = 4, // 全屋巡航运行轨迹 + POINT_TO_POINT = 5, // 指哪到哪运行轨迹 + REMOTE_CTRL = 6, // 遥控运行轨迹 + GO_CHARGE_IN_WORK = 7, // 任务中回充轨迹 + GO_CHARGE = 8, // 任务结束回充轨迹 + GO_WASH_IN_WORK = 9, // 任务中回洗轨迹 + GO_WASH = 10, // 任务结束回洗轨迹 + EXPLORE_STATIONS = 11, // 探索基站轨迹 + NAVIGATION = 12, // 分区之间导航轨迹 + RESUME_CLEANING = 13, // 回充回洗后的续扫轨迹 + RETURN_START_POINT = 14, // 回充失败再返回起点的轨迹 + HIDE = 15, // 隐藏轨迹(轨迹优化使用)同时需要使能 AppFunction.optimization.PATH_HIDE_TYPE + bit 4: 状态,0 - 继续上一轨迹点, 1 - 新轨迹点,与上一轨迹点不连续; + bit 5: 是否显示轨迹,0 - 不显示,1 - 显示; + bit 6: 是否显示机器人,0 - 不显示,1 - 显示; + bit 7: 预留; + byte 2: task_motion_type; + byte 3-4: 预留; + */ +message PathPoint { + // bit0~15 为 x 坐标 + // bit16~31 为 y 坐标 + uint32 xy = 1; + // bit0~3 为 point_type + // bit4 为 break_type + // bit5 为 show_trajectory_flag + // bit6 为 show_robot_flag + // bit7 预留 + // bit8~15 为 task_motion_type + // bit16~23 预留 + // bit24~31 预留 + uint32 flags = 2; +} + +/** + * 房间轮廓信息(使用包含分区信息的地图),单次上传. + * + * @note: Delimited 方式序列化. + */ + message RoomOutline { + uint32 map_id = 1; // map 的 id 号 + uint32 releases = 2; // map 的大版本修正号 + + uint32 width = 3; + uint32 height = 4; + uint32 resolution = 5; // 单位: m x 100 + Point origin = 6; + + /** + * 地图像素数据,目前采用 LZ4 压缩; + * 每个像素占 1byte,表示房间 id + */ + bytes pixels = 7; // 地图压缩 + + /** + * 地图像素原始size, 如果pixels有压缩,则 pixel_size 表示解压后的长度. + */ + uint32 pixel_size = 8; +} + +/** + * 房间参数,单次上传. + * + * @note: Delimited 方式序列化. + */ +message RoomParams { + // 定制化清扫参数使能. + bool custom_enable = 1; // x10 以后不再使用 + + message Room { + uint32 id = 1; + string name = 2; // 默认名称为 "",表示未命名 + Floor floor = 3; + RoomScene scene = 4; // 场景(类型+索引) + + // 定制化顺序. + message Order { + uint32 value = 1; + } + Order order = 6; + + // 定制化参数. + message Custom { + CleanType clean_type = 1; + Fan fan = 2; + MopMode mop_mode = 3; + CleanExtent clean_extent = 4; + uint32 clean_times = 5; // 清扫次数,非 0 有效 + } + Custom custom = 7; + } + repeated Room rooms = 2; + + uint32 map_id = 3; // map 的 id 号 + uint32 releases = 4; // map 的大版本修正号 + + // enum ModeType { + // CUSTOM = 0; // 通用/定制模式,x10 以后不再使用 + // SMART = 1; // 智能模式 + // } + // ModeType mode_type = 5; + Switch smart_mode_sw = 6; // 智能省心模式开关 +} + +/** + * 禁区信息,单次上传. + * + * @note: Delimited 方式序列化. + */ +message RestrictedZone { + repeated Line virtual_walls = 1; + repeated Quadrangle forbidden_zones = 2; + repeated Quadrangle ban_mop_zones = 3; + + uint32 map_id = 4; // map 的 id 号 + uint32 releases = 5; // map 的大版本修正号 + + // 自动推荐,只有推荐的禁区有 id 信息,由机器端生成,逐渐增加 + // 机器要做到: + // 1. 存在推荐禁区后,再收到一次编辑禁区消息,需要删除推荐禁区,将设置的推荐禁区转为编辑禁区 + // 2. 推荐的禁区没有被设置,那么机器后面就不应该再推荐这个禁区 + message Suggestion { + message LineWrap { + uint32 id = 1; + Line line = 2; + } + message QuadrangleWrap { + uint32 id = 1; + Quadrangle quadrangle = 2; + } + + repeated LineWrap virtual_walls = 1; + repeated QuadrangleWrap forbidden_zones = 2; + repeated QuadrangleWrap ban_mop_zones = 3; + } + Suggestion suggestion = 7; +} + +/** + * 动态数据,单次上传. + * + * @note: Delimited 方式序列化. + */ +message DynamicData { + Pose cur_pose = 1; // 当前位姿 +} + +/** + * 存储临时数据,机器端不主动清除,app根据workstatus自行判断数据是否有效. + * 单次上传. + * + * @note: Delimited 方式序列化. + */ +message TemporaryData { + .proto.cloud.SelectRoomsClean select_rooms_clean = 1; + .proto.cloud.SelectZonesClean select_zones_clean = 2; + .proto.cloud.Goto goto_location = 3; + .proto.cloud.PointCruise select_point_cruise = 4; + .proto.cloud.ZonesCruise select_zones_cruise = 5; +} + +/** + * 物体数据信息,单次上传. + * + * @note: Delimited 方式序列化. + */ +message ObstacleInfo { + uint32 map_id = 1; // map 的 id 号 + uint32 releases = 2; // map 的大版本修正号 + + message Obstacle { + string object_type = 1; + + enum ShowType { + POSITION = 0; // 坐标: show_points 只有一个 + OUTLINE = 1; // 轮廓 + FILL = 2; // 填充 + BITMAP = 3; // 位图(左上坐标+长宽+mask序列,bit为0表示空,为1表示存在) + } + ShowType show_type = 2; + + repeated Point show_points = 3; // TODO: 考虑 3D + + message Bitmap { + Point ref_point = 1; // 参考点,bitmap 以此为左上角 + uint32 width = 2; + uint32 height = 3; + uint32 data_len = 4; + bytes data = 5; // 单bit描述一个点,bit为0表示空,为1表示存在 + } + Bitmap bitmap = 4; + + sint32 theta = 5; // 物体方向,单位: rad * 100 + + string photo_id = 6; // 照片 id + + uint32 accuracy = 7; // 准确率,0~100,表示百分比(0 表示无效) + + message Valid { + bool value = 1; + } + Valid valid = 8; // 是否有效 + } + repeated Obstacle obstacles = 3; +} + +/** + * 巡航数据. + * 更新频率:巡航指令后更新一次(照片 id 为空),结束巡航后更新一次(一次性写入照片 id) + * + * @note: Delimited 方式序列化. + */ +message CruiseData { + message ProcessData { + Point points = 1; // 巡航点(收到巡航指令后更新一次,照片 id 可为空) + + repeated string photo_id = 2; // 每个巡航点关联的照片 id(结束巡航一次性写入) + } + repeated ProcessData cruise_data = 1; + + uint32 map_id = 2; // map 的 id 号 + uint32 releases = 3; // map 的大版本修正号 +} + +/** + * 地图描述,单次上传. + * + * @note: Delimited 方式序列化. + */ + message MapDescription { + // id 1 不再使用 + + string name = 2; // 地图名 + uint32 create_cause = 3; + uint64 create_time = 4; // 创建时间 + uint64 last_time = 5; // 最后更新时间 + uint32 map_id = 6; // map 的 id 号 + uint32 releases = 7; // map 的大版本修正号 +} + +/** + * 地图备份,单次上传. + * + * @note: Delimited 方式序列化. + */ +message MapBackup { + MapDescription desc = 1; + Map map = 2; + RoomOutline rooms = 3; + RoomParams room_params = 4; + RestrictedZone restricted_zone = 5; +} + +/** + * 场景信息,单次上传. + * + * @note: Delimited 方式序列化. + */ +message SceneWrap { + message Scene { + SceneInfo info = 1; + repeated SceneTask tasks = 2; + } + repeated Scene scenes = 1; +} \ No newline at end of file diff --git a/proto-reference/stream_pb2.py b/proto-reference/stream_pb2.py new file mode 100644 index 0000000..cec85c8 --- /dev/null +++ b/proto-reference/stream_pb2.py @@ -0,0 +1,96 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: proto/cloud/stream.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder + +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from ...proto.cloud import \ + clean_param_pb2 as proto_dot_cloud_dot_clean__param__pb2 +from ...proto.cloud import common_pb2 as proto_dot_cloud_dot_common__pb2 +from ...proto.cloud import control_pb2 as proto_dot_cloud_dot_control__pb2 +from ...proto.cloud import scene_pb2 as proto_dot_cloud_dot_scene__pb2 + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x18proto/cloud/stream.proto\x12\x12proto.cloud.stream\x1a\x18proto/cloud/common.proto\x1a\x1dproto/cloud/clean_param.proto\x1a\x19proto/cloud/control.proto\x1a\x17proto/cloud/scene.proto\"\xf5\x02\n\x08Metadata\x12\x37\n\x08versions\x18\x01 \x01(\x0b\x32%.proto.cloud.stream.Metadata.Versions\x12\x36\n\x08\x63han_ids\x18\x02 \x01(\x0b\x32$.proto.cloud.stream.Metadata.ChanIds\x1a\x1c\n\x08Versions\x12\x10\n\x08map_data\x18\x01 \x01(\r\x1a\xd9\x01\n\x07\x43hanIds\x12\x10\n\x08map_info\x18\x01 \x01(\r\x12\x0c\n\x04path\x18\x02 \x01(\r\x12\x14\n\x0croom_outline\x18\x03 \x01(\r\x12\x13\n\x0broom_params\x18\x04 \x01(\r\x12\x17\n\x0frestricted_zone\x18\x05 \x01(\r\x12\x14\n\x0c\x64ynamic_data\x18\x06 \x01(\r\x12\x16\n\x0etemporary_data\x18\x07 \x01(\r\x12\x15\n\robstacle_info\x18\x08 \x01(\r\x12\x10\n\x08map_data\x18\t \x01(\r\x12\x13\n\x0b\x63ruise_data\x18\n \x01(\r\"\xd3\x03\n\x07MapInfo\x12\x0e\n\x06map_id\x18\x01 \x01(\r\x12\r\n\x05width\x18\x02 \x01(\r\x12\x0e\n\x06height\x18\x03 \x01(\r\x12\x12\n\nresolution\x18\x04 \x01(\r\x12\"\n\x06origin\x18\x05 \x01(\x0b\x32\x12.proto.cloud.Point\x12 \n\x05\x64ocks\x18\x06 \x03(\x0b\x32\x11.proto.cloud.Pose\x12.\n\x04type\x18\x07 \x01(\x0e\x32 .proto.cloud.stream.MapInfo.Type\x12\x0b\n\x03seq\x18\x08 \x01(\r\x12\r\n\x05\x61ngle\x18\t \x01(\r\x12\x32\n\x08\x64ocks_v2\x18\n \x03(\x0b\x32 .proto.cloud.stream.MapInfo.Dock\x1a~\n\x04\x44ock\x12\x33\n\x04type\x18\x01 \x01(\x0e\x32%.proto.cloud.stream.MapInfo.Dock.Type\x12\x1f\n\x04pose\x18\x02 \x01(\x0b\x32\x11.proto.cloud.Pose\" \n\x04Type\x12\x0b\n\x07\x41\x44\x41PTER\x10\x00\x12\x0b\n\x07STATION\x10\x01\"?\n\x04Type\x12\x0e\n\nINCOMPLETE\x10\x00\x12\t\n\x05ROUGH\x10\x01\x12\r\n\tEFFECTIVE\x10\x02\x12\r\n\tLIST_FULL\x10\x03\"\xe6\x02\n\x03Map\x12\x0e\n\x06map_id\x18\x01 \x01(\r\x12\x0b\n\x03seq\x18\x02 \x01(\r\x12,\n\x05\x66rame\x18\x03 \x01(\x0e\x32\x1d.proto.cloud.stream.Map.Frame\x12\x0e\n\x06pixels\x18\x04 \x01(\x0c\x12\x12\n\npixel_size\x18\x05 \x01(\r\x12)\n\x04info\x18\x06 \x01(\x0b\x32\x1b.proto.cloud.stream.MapInfo\x12\x0c\n\x04name\x18\x07 \x01(\t\x12\n\n\x02id\x18\x08 \x01(\r\x12\x10\n\x08releases\x18\t \x01(\r\x12,\n\x05index\x18\n \x01(\x0b\x32\x1d.proto.cloud.stream.Map.Index\x1a\x16\n\x05Index\x12\r\n\x05value\x18\x01 \x01(\r\"\x15\n\x05\x46rame\x12\x05\n\x01I\x10\x00\x12\x05\n\x01P\x10\x01\"<\n\nPixelValue\x12\n\n\x06UNKNOW\x10\x00\x12\x0c\n\x08OBSTACLE\x10\x01\x12\x08\n\x04\x46REE\x10\x02\x12\n\n\x06\x43\x41RPET\x10\x03\"&\n\tPathPoint\x12\n\n\x02xy\x18\x01 \x01(\r\x12\r\n\x05\x66lags\x18\x02 \x01(\r\"\xaa\x01\n\x0bRoomOutline\x12\x0e\n\x06map_id\x18\x01 \x01(\r\x12\x10\n\x08releases\x18\x02 \x01(\r\x12\r\n\x05width\x18\x03 \x01(\r\x12\x0e\n\x06height\x18\x04 \x01(\r\x12\x12\n\nresolution\x18\x05 \x01(\r\x12\"\n\x06origin\x18\x06 \x01(\x0b\x32\x12.proto.cloud.Point\x12\x0e\n\x06pixels\x18\x07 \x01(\x0c\x12\x12\n\npixel_size\x18\x08 \x01(\r\"\xe3\x04\n\nRoomParams\x12\x15\n\rcustom_enable\x18\x01 \x01(\x08\x12\x32\n\x05rooms\x18\x02 \x03(\x0b\x32#.proto.cloud.stream.RoomParams.Room\x12\x0e\n\x06map_id\x18\x03 \x01(\r\x12\x10\n\x08releases\x18\x04 \x01(\r\x12*\n\rsmart_mode_sw\x18\x06 \x01(\x0b\x32\x13.proto.cloud.Switch\x1a\xbb\x03\n\x04Room\x12\n\n\x02id\x18\x01 \x01(\r\x12\x0c\n\x04name\x18\x02 \x01(\t\x12!\n\x05\x66loor\x18\x03 \x01(\x0b\x32\x12.proto.cloud.Floor\x12%\n\x05scene\x18\x04 \x01(\x0b\x32\x16.proto.cloud.RoomScene\x12\x38\n\x05order\x18\x06 \x01(\x0b\x32).proto.cloud.stream.RoomParams.Room.Order\x12:\n\x06\x63ustom\x18\x07 \x01(\x0b\x32*.proto.cloud.stream.RoomParams.Room.Custom\x1a\x16\n\x05Order\x12\r\n\x05value\x18\x01 \x01(\r\x1a\xc0\x01\n\x06\x43ustom\x12*\n\nclean_type\x18\x01 \x01(\x0b\x32\x16.proto.cloud.CleanType\x12\x1d\n\x03\x66\x61n\x18\x02 \x01(\x0b\x32\x10.proto.cloud.Fan\x12&\n\x08mop_mode\x18\x03 \x01(\x0b\x32\x14.proto.cloud.MopMode\x12.\n\x0c\x63lean_extent\x18\x04 \x01(\x0b\x32\x18.proto.cloud.CleanExtent\x12\x13\n\x0b\x63lean_times\x18\x05 \x01(\r\"\x8f\x05\n\x0eRestrictedZone\x12(\n\rvirtual_walls\x18\x01 \x03(\x0b\x32\x11.proto.cloud.Line\x12\x30\n\x0f\x66orbidden_zones\x18\x02 \x03(\x0b\x32\x17.proto.cloud.Quadrangle\x12.\n\rban_mop_zones\x18\x03 \x03(\x0b\x32\x17.proto.cloud.Quadrangle\x12\x0e\n\x06map_id\x18\x04 \x01(\r\x12\x10\n\x08releases\x18\x05 \x01(\r\x12\x41\n\nsuggestion\x18\x07 \x01(\x0b\x32-.proto.cloud.stream.RestrictedZone.Suggestion\x1a\x8b\x03\n\nSuggestion\x12M\n\rvirtual_walls\x18\x01 \x03(\x0b\x32\x36.proto.cloud.stream.RestrictedZone.Suggestion.LineWrap\x12U\n\x0f\x66orbidden_zones\x18\x02 \x03(\x0b\x32<.proto.cloud.stream.RestrictedZone.Suggestion.QuadrangleWrap\x12S\n\rban_mop_zones\x18\x03 \x03(\x0b\x32<.proto.cloud.stream.RestrictedZone.Suggestion.QuadrangleWrap\x1a\x37\n\x08LineWrap\x12\n\n\x02id\x18\x01 \x01(\r\x12\x1f\n\x04line\x18\x02 \x01(\x0b\x32\x11.proto.cloud.Line\x1aI\n\x0eQuadrangleWrap\x12\n\n\x02id\x18\x01 \x01(\r\x12+\n\nquadrangle\x18\x02 \x01(\x0b\x32\x17.proto.cloud.Quadrangle\"2\n\x0b\x44ynamicData\x12#\n\x08\x63ur_pose\x18\x01 \x01(\x0b\x32\x11.proto.cloud.Pose\"\x9d\x02\n\rTemporaryData\x12\x39\n\x12select_rooms_clean\x18\x01 \x01(\x0b\x32\x1d.proto.cloud.SelectRoomsClean\x12\x39\n\x12select_zones_clean\x18\x02 \x01(\x0b\x32\x1d.proto.cloud.SelectZonesClean\x12(\n\rgoto_location\x18\x03 \x01(\x0b\x32\x11.proto.cloud.Goto\x12\x35\n\x13select_point_cruise\x18\x04 \x01(\x0b\x32\x18.proto.cloud.PointCruise\x12\x35\n\x13select_zones_cruise\x18\x05 \x01(\x0b\x32\x18.proto.cloud.ZonesCruise\"\xfa\x04\n\x0cObstacleInfo\x12\x0e\n\x06map_id\x18\x01 \x01(\r\x12\x10\n\x08releases\x18\x02 \x01(\r\x12<\n\tobstacles\x18\x03 \x03(\x0b\x32).proto.cloud.stream.ObstacleInfo.Obstacle\x1a\x89\x04\n\x08Obstacle\x12\x13\n\x0bobject_type\x18\x01 \x01(\t\x12\x45\n\tshow_type\x18\x02 \x01(\x0e\x32\x32.proto.cloud.stream.ObstacleInfo.Obstacle.ShowType\x12\'\n\x0bshow_points\x18\x03 \x03(\x0b\x32\x12.proto.cloud.Point\x12@\n\x06\x62itmap\x18\x04 \x01(\x0b\x32\x30.proto.cloud.stream.ObstacleInfo.Obstacle.Bitmap\x12\r\n\x05theta\x18\x05 \x01(\x11\x12\x10\n\x08photo_id\x18\x06 \x01(\t\x12\x10\n\x08\x61\x63\x63uracy\x18\x07 \x01(\r\x12>\n\x05valid\x18\x08 \x01(\x0b\x32/.proto.cloud.stream.ObstacleInfo.Obstacle.Valid\x1an\n\x06\x42itmap\x12%\n\tref_point\x18\x01 \x01(\x0b\x32\x12.proto.cloud.Point\x12\r\n\x05width\x18\x02 \x01(\r\x12\x0e\n\x06height\x18\x03 \x01(\r\x12\x10\n\x08\x64\x61ta_len\x18\x04 \x01(\r\x12\x0c\n\x04\x64\x61ta\x18\x05 \x01(\x0c\x1a\x16\n\x05Valid\x12\r\n\x05value\x18\x01 \x01(\x08\";\n\x08ShowType\x12\x0c\n\x08POSITION\x10\x00\x12\x0b\n\x07OUTLINE\x10\x01\x12\x08\n\x04\x46ILL\x10\x02\x12\n\n\x06\x42ITMAP\x10\x03\"\xb4\x01\n\nCruiseData\x12?\n\x0b\x63ruise_data\x18\x01 \x03(\x0b\x32*.proto.cloud.stream.CruiseData.ProcessData\x12\x0e\n\x06map_id\x18\x02 \x01(\r\x12\x10\n\x08releases\x18\x03 \x01(\r\x1a\x43\n\x0bProcessData\x12\"\n\x06points\x18\x01 \x01(\x0b\x32\x12.proto.cloud.Point\x12\x10\n\x08photo_id\x18\x02 \x03(\t\"~\n\x0eMapDescription\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x14\n\x0c\x63reate_cause\x18\x03 \x01(\r\x12\x13\n\x0b\x63reate_time\x18\x04 \x01(\x04\x12\x11\n\tlast_time\x18\x05 \x01(\x04\x12\x0e\n\x06map_id\x18\x06 \x01(\r\x12\x10\n\x08releases\x18\x07 \x01(\r\"\x85\x02\n\tMapBackup\x12\x30\n\x04\x64\x65sc\x18\x01 \x01(\x0b\x32\".proto.cloud.stream.MapDescription\x12$\n\x03map\x18\x02 \x01(\x0b\x32\x17.proto.cloud.stream.Map\x12.\n\x05rooms\x18\x03 \x01(\x0b\x32\x1f.proto.cloud.stream.RoomOutline\x12\x33\n\x0broom_params\x18\x04 \x01(\x0b\x32\x1e.proto.cloud.stream.RoomParams\x12;\n\x0frestricted_zone\x18\x05 \x01(\x0b\x32\".proto.cloud.stream.RestrictedZone\"\x96\x01\n\tSceneWrap\x12\x33\n\x06scenes\x18\x01 \x03(\x0b\x32#.proto.cloud.stream.SceneWrap.Scene\x1aT\n\x05Scene\x12$\n\x04info\x18\x01 \x01(\x0b\x32\x16.proto.cloud.SceneInfo\x12%\n\x05tasks\x18\x02 \x03(\x0b\x32\x16.proto.cloud.SceneTaskb\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'proto.cloud.stream_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _METADATA._serialized_start=158 + _METADATA._serialized_end=531 + _METADATA_VERSIONS._serialized_start=283 + _METADATA_VERSIONS._serialized_end=311 + _METADATA_CHANIDS._serialized_start=314 + _METADATA_CHANIDS._serialized_end=531 + _MAPINFO._serialized_start=534 + _MAPINFO._serialized_end=1001 + _MAPINFO_DOCK._serialized_start=810 + _MAPINFO_DOCK._serialized_end=936 + _MAPINFO_DOCK_TYPE._serialized_start=904 + _MAPINFO_DOCK_TYPE._serialized_end=936 + _MAPINFO_TYPE._serialized_start=938 + _MAPINFO_TYPE._serialized_end=1001 + _MAP._serialized_start=1004 + _MAP._serialized_end=1362 + _MAP_INDEX._serialized_start=1255 + _MAP_INDEX._serialized_end=1277 + _MAP_FRAME._serialized_start=1279 + _MAP_FRAME._serialized_end=1300 + _MAP_PIXELVALUE._serialized_start=1302 + _MAP_PIXELVALUE._serialized_end=1362 + _PATHPOINT._serialized_start=1364 + _PATHPOINT._serialized_end=1402 + _ROOMOUTLINE._serialized_start=1405 + _ROOMOUTLINE._serialized_end=1575 + _ROOMPARAMS._serialized_start=1578 + _ROOMPARAMS._serialized_end=2189 + _ROOMPARAMS_ROOM._serialized_start=1746 + _ROOMPARAMS_ROOM._serialized_end=2189 + _ROOMPARAMS_ROOM_ORDER._serialized_start=1972 + _ROOMPARAMS_ROOM_ORDER._serialized_end=1994 + _ROOMPARAMS_ROOM_CUSTOM._serialized_start=1997 + _ROOMPARAMS_ROOM_CUSTOM._serialized_end=2189 + _RESTRICTEDZONE._serialized_start=2192 + _RESTRICTEDZONE._serialized_end=2847 + _RESTRICTEDZONE_SUGGESTION._serialized_start=2452 + _RESTRICTEDZONE_SUGGESTION._serialized_end=2847 + _RESTRICTEDZONE_SUGGESTION_LINEWRAP._serialized_start=2717 + _RESTRICTEDZONE_SUGGESTION_LINEWRAP._serialized_end=2772 + _RESTRICTEDZONE_SUGGESTION_QUADRANGLEWRAP._serialized_start=2774 + _RESTRICTEDZONE_SUGGESTION_QUADRANGLEWRAP._serialized_end=2847 + _DYNAMICDATA._serialized_start=2849 + _DYNAMICDATA._serialized_end=2899 + _TEMPORARYDATA._serialized_start=2902 + _TEMPORARYDATA._serialized_end=3187 + _OBSTACLEINFO._serialized_start=3190 + _OBSTACLEINFO._serialized_end=3824 + _OBSTACLEINFO_OBSTACLE._serialized_start=3303 + _OBSTACLEINFO_OBSTACLE._serialized_end=3824 + _OBSTACLEINFO_OBSTACLE_BITMAP._serialized_start=3629 + _OBSTACLEINFO_OBSTACLE_BITMAP._serialized_end=3739 + _OBSTACLEINFO_OBSTACLE_VALID._serialized_start=3741 + _OBSTACLEINFO_OBSTACLE_VALID._serialized_end=3763 + _OBSTACLEINFO_OBSTACLE_SHOWTYPE._serialized_start=3765 + _OBSTACLEINFO_OBSTACLE_SHOWTYPE._serialized_end=3824 + _CRUISEDATA._serialized_start=3827 + _CRUISEDATA._serialized_end=4007 + _CRUISEDATA_PROCESSDATA._serialized_start=3940 + _CRUISEDATA_PROCESSDATA._serialized_end=4007 + _MAPDESCRIPTION._serialized_start=4009 + _MAPDESCRIPTION._serialized_end=4135 + _MAPBACKUP._serialized_start=4138 + _MAPBACKUP._serialized_end=4399 + _SCENEWRAP._serialized_start=4402 + _SCENEWRAP._serialized_end=4552 + _SCENEWRAP_SCENE._serialized_start=4468 + _SCENEWRAP_SCENE._serialized_end=4552 +# @@protoc_insertion_point(module_scope) diff --git a/proto-reference/stream_pb2.pyi b/proto-reference/stream_pb2.pyi new file mode 100644 index 0000000..e948bd4 --- /dev/null +++ b/proto-reference/stream_pb2.pyi @@ -0,0 +1,380 @@ +from typing import ClassVar as _ClassVar +from typing import Iterable as _Iterable +from typing import Mapping as _Mapping +from typing import Optional as _Optional +from typing import Union as _Union + +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf.internal import containers as _containers +from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper + +from ...proto.cloud import clean_param_pb2 as _clean_param_pb2 +from ...proto.cloud import common_pb2 as _common_pb2 +from ...proto.cloud import control_pb2 as _control_pb2 +from ...proto.cloud import scene_pb2 as _scene_pb2 + +DESCRIPTOR: _descriptor.FileDescriptor + +class CruiseData(_message.Message): + __slots__ = ["cruise_data", "map_id", "releases"] + class ProcessData(_message.Message): + __slots__ = ["photo_id", "points"] + PHOTO_ID_FIELD_NUMBER: _ClassVar[int] + POINTS_FIELD_NUMBER: _ClassVar[int] + photo_id: _containers.RepeatedScalarFieldContainer[str] + points: _common_pb2.Point + def __init__(self, points: _Optional[_Union[_common_pb2.Point, _Mapping]] = ..., photo_id: _Optional[_Iterable[str]] = ...) -> None: ... + CRUISE_DATA_FIELD_NUMBER: _ClassVar[int] + MAP_ID_FIELD_NUMBER: _ClassVar[int] + RELEASES_FIELD_NUMBER: _ClassVar[int] + cruise_data: _containers.RepeatedCompositeFieldContainer[CruiseData.ProcessData] + map_id: int + releases: int + def __init__(self, cruise_data: _Optional[_Iterable[_Union[CruiseData.ProcessData, _Mapping]]] = ..., map_id: _Optional[int] = ..., releases: _Optional[int] = ...) -> None: ... + +class DynamicData(_message.Message): + __slots__ = ["cur_pose"] + CUR_POSE_FIELD_NUMBER: _ClassVar[int] + cur_pose: _common_pb2.Pose + def __init__(self, cur_pose: _Optional[_Union[_common_pb2.Pose, _Mapping]] = ...) -> None: ... + +class Map(_message.Message): + __slots__ = ["frame", "id", "index", "info", "map_id", "name", "pixel_size", "pixels", "releases", "seq"] + class Frame(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + class PixelValue(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + class Index(_message.Message): + __slots__ = ["value"] + VALUE_FIELD_NUMBER: _ClassVar[int] + value: int + def __init__(self, value: _Optional[int] = ...) -> None: ... + CARPET: Map.PixelValue + FRAME_FIELD_NUMBER: _ClassVar[int] + FREE: Map.PixelValue + I: Map.Frame + ID_FIELD_NUMBER: _ClassVar[int] + INDEX_FIELD_NUMBER: _ClassVar[int] + INFO_FIELD_NUMBER: _ClassVar[int] + MAP_ID_FIELD_NUMBER: _ClassVar[int] + NAME_FIELD_NUMBER: _ClassVar[int] + OBSTACLE: Map.PixelValue + P: Map.Frame + PIXELS_FIELD_NUMBER: _ClassVar[int] + PIXEL_SIZE_FIELD_NUMBER: _ClassVar[int] + RELEASES_FIELD_NUMBER: _ClassVar[int] + SEQ_FIELD_NUMBER: _ClassVar[int] + UNKNOW: Map.PixelValue + frame: Map.Frame + id: int + index: Map.Index + info: MapInfo + map_id: int + name: str + pixel_size: int + pixels: bytes + releases: int + seq: int + def __init__(self, map_id: _Optional[int] = ..., seq: _Optional[int] = ..., frame: _Optional[_Union[Map.Frame, str]] = ..., pixels: _Optional[bytes] = ..., pixel_size: _Optional[int] = ..., info: _Optional[_Union[MapInfo, _Mapping]] = ..., name: _Optional[str] = ..., id: _Optional[int] = ..., releases: _Optional[int] = ..., index: _Optional[_Union[Map.Index, _Mapping]] = ...) -> None: ... + +class MapBackup(_message.Message): + __slots__ = ["desc", "map", "restricted_zone", "room_params", "rooms"] + DESC_FIELD_NUMBER: _ClassVar[int] + MAP_FIELD_NUMBER: _ClassVar[int] + RESTRICTED_ZONE_FIELD_NUMBER: _ClassVar[int] + ROOMS_FIELD_NUMBER: _ClassVar[int] + ROOM_PARAMS_FIELD_NUMBER: _ClassVar[int] + desc: MapDescription + map: Map + restricted_zone: RestrictedZone + room_params: RoomParams + rooms: RoomOutline + def __init__(self, desc: _Optional[_Union[MapDescription, _Mapping]] = ..., map: _Optional[_Union[Map, _Mapping]] = ..., rooms: _Optional[_Union[RoomOutline, _Mapping]] = ..., room_params: _Optional[_Union[RoomParams, _Mapping]] = ..., restricted_zone: _Optional[_Union[RestrictedZone, _Mapping]] = ...) -> None: ... + +class MapDescription(_message.Message): + __slots__ = ["create_cause", "create_time", "last_time", "map_id", "name", "releases"] + CREATE_CAUSE_FIELD_NUMBER: _ClassVar[int] + CREATE_TIME_FIELD_NUMBER: _ClassVar[int] + LAST_TIME_FIELD_NUMBER: _ClassVar[int] + MAP_ID_FIELD_NUMBER: _ClassVar[int] + NAME_FIELD_NUMBER: _ClassVar[int] + RELEASES_FIELD_NUMBER: _ClassVar[int] + create_cause: int + create_time: int + last_time: int + map_id: int + name: str + releases: int + def __init__(self, name: _Optional[str] = ..., create_cause: _Optional[int] = ..., create_time: _Optional[int] = ..., last_time: _Optional[int] = ..., map_id: _Optional[int] = ..., releases: _Optional[int] = ...) -> None: ... + +class MapInfo(_message.Message): + __slots__ = ["angle", "docks", "docks_v2", "height", "map_id", "origin", "resolution", "seq", "type", "width"] + class Type(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + class Dock(_message.Message): + __slots__ = ["pose", "type"] + class Type(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + ADAPTER: MapInfo.Dock.Type + POSE_FIELD_NUMBER: _ClassVar[int] + STATION: MapInfo.Dock.Type + TYPE_FIELD_NUMBER: _ClassVar[int] + pose: _common_pb2.Pose + type: MapInfo.Dock.Type + def __init__(self, type: _Optional[_Union[MapInfo.Dock.Type, str]] = ..., pose: _Optional[_Union[_common_pb2.Pose, _Mapping]] = ...) -> None: ... + ANGLE_FIELD_NUMBER: _ClassVar[int] + DOCKS_FIELD_NUMBER: _ClassVar[int] + DOCKS_V2_FIELD_NUMBER: _ClassVar[int] + EFFECTIVE: MapInfo.Type + HEIGHT_FIELD_NUMBER: _ClassVar[int] + INCOMPLETE: MapInfo.Type + LIST_FULL: MapInfo.Type + MAP_ID_FIELD_NUMBER: _ClassVar[int] + ORIGIN_FIELD_NUMBER: _ClassVar[int] + RESOLUTION_FIELD_NUMBER: _ClassVar[int] + ROUGH: MapInfo.Type + SEQ_FIELD_NUMBER: _ClassVar[int] + TYPE_FIELD_NUMBER: _ClassVar[int] + WIDTH_FIELD_NUMBER: _ClassVar[int] + angle: int + docks: _containers.RepeatedCompositeFieldContainer[_common_pb2.Pose] + docks_v2: _containers.RepeatedCompositeFieldContainer[MapInfo.Dock] + height: int + map_id: int + origin: _common_pb2.Point + resolution: int + seq: int + type: MapInfo.Type + width: int + def __init__(self, map_id: _Optional[int] = ..., width: _Optional[int] = ..., height: _Optional[int] = ..., resolution: _Optional[int] = ..., origin: _Optional[_Union[_common_pb2.Point, _Mapping]] = ..., docks: _Optional[_Iterable[_Union[_common_pb2.Pose, _Mapping]]] = ..., type: _Optional[_Union[MapInfo.Type, str]] = ..., seq: _Optional[int] = ..., angle: _Optional[int] = ..., docks_v2: _Optional[_Iterable[_Union[MapInfo.Dock, _Mapping]]] = ...) -> None: ... + +class Metadata(_message.Message): + __slots__ = ["chan_ids", "versions"] + class ChanIds(_message.Message): + __slots__ = ["cruise_data", "dynamic_data", "map_data", "map_info", "obstacle_info", "path", "restricted_zone", "room_outline", "room_params", "temporary_data"] + CRUISE_DATA_FIELD_NUMBER: _ClassVar[int] + DYNAMIC_DATA_FIELD_NUMBER: _ClassVar[int] + MAP_DATA_FIELD_NUMBER: _ClassVar[int] + MAP_INFO_FIELD_NUMBER: _ClassVar[int] + OBSTACLE_INFO_FIELD_NUMBER: _ClassVar[int] + PATH_FIELD_NUMBER: _ClassVar[int] + RESTRICTED_ZONE_FIELD_NUMBER: _ClassVar[int] + ROOM_OUTLINE_FIELD_NUMBER: _ClassVar[int] + ROOM_PARAMS_FIELD_NUMBER: _ClassVar[int] + TEMPORARY_DATA_FIELD_NUMBER: _ClassVar[int] + cruise_data: int + dynamic_data: int + map_data: int + map_info: int + obstacle_info: int + path: int + restricted_zone: int + room_outline: int + room_params: int + temporary_data: int + def __init__(self, map_info: _Optional[int] = ..., path: _Optional[int] = ..., room_outline: _Optional[int] = ..., room_params: _Optional[int] = ..., restricted_zone: _Optional[int] = ..., dynamic_data: _Optional[int] = ..., temporary_data: _Optional[int] = ..., obstacle_info: _Optional[int] = ..., map_data: _Optional[int] = ..., cruise_data: _Optional[int] = ...) -> None: ... + class Versions(_message.Message): + __slots__ = ["map_data"] + MAP_DATA_FIELD_NUMBER: _ClassVar[int] + map_data: int + def __init__(self, map_data: _Optional[int] = ...) -> None: ... + CHAN_IDS_FIELD_NUMBER: _ClassVar[int] + VERSIONS_FIELD_NUMBER: _ClassVar[int] + chan_ids: Metadata.ChanIds + versions: Metadata.Versions + def __init__(self, versions: _Optional[_Union[Metadata.Versions, _Mapping]] = ..., chan_ids: _Optional[_Union[Metadata.ChanIds, _Mapping]] = ...) -> None: ... + +class ObstacleInfo(_message.Message): + __slots__ = ["map_id", "obstacles", "releases"] + class Obstacle(_message.Message): + __slots__ = ["accuracy", "bitmap", "object_type", "photo_id", "show_points", "show_type", "theta", "valid"] + class ShowType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + class Bitmap(_message.Message): + __slots__ = ["data", "data_len", "height", "ref_point", "width"] + DATA_FIELD_NUMBER: _ClassVar[int] + DATA_LEN_FIELD_NUMBER: _ClassVar[int] + HEIGHT_FIELD_NUMBER: _ClassVar[int] + REF_POINT_FIELD_NUMBER: _ClassVar[int] + WIDTH_FIELD_NUMBER: _ClassVar[int] + data: bytes + data_len: int + height: int + ref_point: _common_pb2.Point + width: int + def __init__(self, ref_point: _Optional[_Union[_common_pb2.Point, _Mapping]] = ..., width: _Optional[int] = ..., height: _Optional[int] = ..., data_len: _Optional[int] = ..., data: _Optional[bytes] = ...) -> None: ... + class Valid(_message.Message): + __slots__ = ["value"] + VALUE_FIELD_NUMBER: _ClassVar[int] + value: bool + def __init__(self, value: bool = ...) -> None: ... + ACCURACY_FIELD_NUMBER: _ClassVar[int] + BITMAP: ObstacleInfo.Obstacle.ShowType + BITMAP_FIELD_NUMBER: _ClassVar[int] + FILL: ObstacleInfo.Obstacle.ShowType + OBJECT_TYPE_FIELD_NUMBER: _ClassVar[int] + OUTLINE: ObstacleInfo.Obstacle.ShowType + PHOTO_ID_FIELD_NUMBER: _ClassVar[int] + POSITION: ObstacleInfo.Obstacle.ShowType + SHOW_POINTS_FIELD_NUMBER: _ClassVar[int] + SHOW_TYPE_FIELD_NUMBER: _ClassVar[int] + THETA_FIELD_NUMBER: _ClassVar[int] + VALID_FIELD_NUMBER: _ClassVar[int] + accuracy: int + bitmap: ObstacleInfo.Obstacle.Bitmap + object_type: str + photo_id: str + show_points: _containers.RepeatedCompositeFieldContainer[_common_pb2.Point] + show_type: ObstacleInfo.Obstacle.ShowType + theta: int + valid: ObstacleInfo.Obstacle.Valid + def __init__(self, object_type: _Optional[str] = ..., show_type: _Optional[_Union[ObstacleInfo.Obstacle.ShowType, str]] = ..., show_points: _Optional[_Iterable[_Union[_common_pb2.Point, _Mapping]]] = ..., bitmap: _Optional[_Union[ObstacleInfo.Obstacle.Bitmap, _Mapping]] = ..., theta: _Optional[int] = ..., photo_id: _Optional[str] = ..., accuracy: _Optional[int] = ..., valid: _Optional[_Union[ObstacleInfo.Obstacle.Valid, _Mapping]] = ...) -> None: ... + MAP_ID_FIELD_NUMBER: _ClassVar[int] + OBSTACLES_FIELD_NUMBER: _ClassVar[int] + RELEASES_FIELD_NUMBER: _ClassVar[int] + map_id: int + obstacles: _containers.RepeatedCompositeFieldContainer[ObstacleInfo.Obstacle] + releases: int + def __init__(self, map_id: _Optional[int] = ..., releases: _Optional[int] = ..., obstacles: _Optional[_Iterable[_Union[ObstacleInfo.Obstacle, _Mapping]]] = ...) -> None: ... + +class PathPoint(_message.Message): + __slots__ = ["flags", "xy"] + FLAGS_FIELD_NUMBER: _ClassVar[int] + XY_FIELD_NUMBER: _ClassVar[int] + flags: int + xy: int + def __init__(self, xy: _Optional[int] = ..., flags: _Optional[int] = ...) -> None: ... + +class RestrictedZone(_message.Message): + __slots__ = ["ban_mop_zones", "forbidden_zones", "map_id", "releases", "suggestion", "virtual_walls"] + class Suggestion(_message.Message): + __slots__ = ["ban_mop_zones", "forbidden_zones", "virtual_walls"] + class LineWrap(_message.Message): + __slots__ = ["id", "line"] + ID_FIELD_NUMBER: _ClassVar[int] + LINE_FIELD_NUMBER: _ClassVar[int] + id: int + line: _common_pb2.Line + def __init__(self, id: _Optional[int] = ..., line: _Optional[_Union[_common_pb2.Line, _Mapping]] = ...) -> None: ... + class QuadrangleWrap(_message.Message): + __slots__ = ["id", "quadrangle"] + ID_FIELD_NUMBER: _ClassVar[int] + QUADRANGLE_FIELD_NUMBER: _ClassVar[int] + id: int + quadrangle: _common_pb2.Quadrangle + def __init__(self, id: _Optional[int] = ..., quadrangle: _Optional[_Union[_common_pb2.Quadrangle, _Mapping]] = ...) -> None: ... + BAN_MOP_ZONES_FIELD_NUMBER: _ClassVar[int] + FORBIDDEN_ZONES_FIELD_NUMBER: _ClassVar[int] + VIRTUAL_WALLS_FIELD_NUMBER: _ClassVar[int] + ban_mop_zones: _containers.RepeatedCompositeFieldContainer[RestrictedZone.Suggestion.QuadrangleWrap] + forbidden_zones: _containers.RepeatedCompositeFieldContainer[RestrictedZone.Suggestion.QuadrangleWrap] + virtual_walls: _containers.RepeatedCompositeFieldContainer[RestrictedZone.Suggestion.LineWrap] + def __init__(self, virtual_walls: _Optional[_Iterable[_Union[RestrictedZone.Suggestion.LineWrap, _Mapping]]] = ..., forbidden_zones: _Optional[_Iterable[_Union[RestrictedZone.Suggestion.QuadrangleWrap, _Mapping]]] = ..., ban_mop_zones: _Optional[_Iterable[_Union[RestrictedZone.Suggestion.QuadrangleWrap, _Mapping]]] = ...) -> None: ... + BAN_MOP_ZONES_FIELD_NUMBER: _ClassVar[int] + FORBIDDEN_ZONES_FIELD_NUMBER: _ClassVar[int] + MAP_ID_FIELD_NUMBER: _ClassVar[int] + RELEASES_FIELD_NUMBER: _ClassVar[int] + SUGGESTION_FIELD_NUMBER: _ClassVar[int] + VIRTUAL_WALLS_FIELD_NUMBER: _ClassVar[int] + ban_mop_zones: _containers.RepeatedCompositeFieldContainer[_common_pb2.Quadrangle] + forbidden_zones: _containers.RepeatedCompositeFieldContainer[_common_pb2.Quadrangle] + map_id: int + releases: int + suggestion: RestrictedZone.Suggestion + virtual_walls: _containers.RepeatedCompositeFieldContainer[_common_pb2.Line] + def __init__(self, virtual_walls: _Optional[_Iterable[_Union[_common_pb2.Line, _Mapping]]] = ..., forbidden_zones: _Optional[_Iterable[_Union[_common_pb2.Quadrangle, _Mapping]]] = ..., ban_mop_zones: _Optional[_Iterable[_Union[_common_pb2.Quadrangle, _Mapping]]] = ..., map_id: _Optional[int] = ..., releases: _Optional[int] = ..., suggestion: _Optional[_Union[RestrictedZone.Suggestion, _Mapping]] = ...) -> None: ... + +class RoomOutline(_message.Message): + __slots__ = ["height", "map_id", "origin", "pixel_size", "pixels", "releases", "resolution", "width"] + HEIGHT_FIELD_NUMBER: _ClassVar[int] + MAP_ID_FIELD_NUMBER: _ClassVar[int] + ORIGIN_FIELD_NUMBER: _ClassVar[int] + PIXELS_FIELD_NUMBER: _ClassVar[int] + PIXEL_SIZE_FIELD_NUMBER: _ClassVar[int] + RELEASES_FIELD_NUMBER: _ClassVar[int] + RESOLUTION_FIELD_NUMBER: _ClassVar[int] + WIDTH_FIELD_NUMBER: _ClassVar[int] + height: int + map_id: int + origin: _common_pb2.Point + pixel_size: int + pixels: bytes + releases: int + resolution: int + width: int + def __init__(self, map_id: _Optional[int] = ..., releases: _Optional[int] = ..., width: _Optional[int] = ..., height: _Optional[int] = ..., resolution: _Optional[int] = ..., origin: _Optional[_Union[_common_pb2.Point, _Mapping]] = ..., pixels: _Optional[bytes] = ..., pixel_size: _Optional[int] = ...) -> None: ... + +class RoomParams(_message.Message): + __slots__ = ["custom_enable", "map_id", "releases", "rooms", "smart_mode_sw"] + class Room(_message.Message): + __slots__ = ["custom", "floor", "id", "name", "order", "scene"] + class Custom(_message.Message): + __slots__ = ["clean_extent", "clean_times", "clean_type", "fan", "mop_mode"] + CLEAN_EXTENT_FIELD_NUMBER: _ClassVar[int] + CLEAN_TIMES_FIELD_NUMBER: _ClassVar[int] + CLEAN_TYPE_FIELD_NUMBER: _ClassVar[int] + FAN_FIELD_NUMBER: _ClassVar[int] + MOP_MODE_FIELD_NUMBER: _ClassVar[int] + clean_extent: _clean_param_pb2.CleanExtent + clean_times: int + clean_type: _clean_param_pb2.CleanType + fan: _clean_param_pb2.Fan + mop_mode: _clean_param_pb2.MopMode + def __init__(self, clean_type: _Optional[_Union[_clean_param_pb2.CleanType, _Mapping]] = ..., fan: _Optional[_Union[_clean_param_pb2.Fan, _Mapping]] = ..., mop_mode: _Optional[_Union[_clean_param_pb2.MopMode, _Mapping]] = ..., clean_extent: _Optional[_Union[_clean_param_pb2.CleanExtent, _Mapping]] = ..., clean_times: _Optional[int] = ...) -> None: ... + class Order(_message.Message): + __slots__ = ["value"] + VALUE_FIELD_NUMBER: _ClassVar[int] + value: int + def __init__(self, value: _Optional[int] = ...) -> None: ... + CUSTOM_FIELD_NUMBER: _ClassVar[int] + FLOOR_FIELD_NUMBER: _ClassVar[int] + ID_FIELD_NUMBER: _ClassVar[int] + NAME_FIELD_NUMBER: _ClassVar[int] + ORDER_FIELD_NUMBER: _ClassVar[int] + SCENE_FIELD_NUMBER: _ClassVar[int] + custom: RoomParams.Room.Custom + floor: _common_pb2.Floor + id: int + name: str + order: RoomParams.Room.Order + scene: _common_pb2.RoomScene + def __init__(self, id: _Optional[int] = ..., name: _Optional[str] = ..., floor: _Optional[_Union[_common_pb2.Floor, _Mapping]] = ..., scene: _Optional[_Union[_common_pb2.RoomScene, _Mapping]] = ..., order: _Optional[_Union[RoomParams.Room.Order, _Mapping]] = ..., custom: _Optional[_Union[RoomParams.Room.Custom, _Mapping]] = ...) -> None: ... + CUSTOM_ENABLE_FIELD_NUMBER: _ClassVar[int] + MAP_ID_FIELD_NUMBER: _ClassVar[int] + RELEASES_FIELD_NUMBER: _ClassVar[int] + ROOMS_FIELD_NUMBER: _ClassVar[int] + SMART_MODE_SW_FIELD_NUMBER: _ClassVar[int] + custom_enable: bool + map_id: int + releases: int + rooms: _containers.RepeatedCompositeFieldContainer[RoomParams.Room] + smart_mode_sw: _common_pb2.Switch + def __init__(self, custom_enable: bool = ..., rooms: _Optional[_Iterable[_Union[RoomParams.Room, _Mapping]]] = ..., map_id: _Optional[int] = ..., releases: _Optional[int] = ..., smart_mode_sw: _Optional[_Union[_common_pb2.Switch, _Mapping]] = ...) -> None: ... + +class SceneWrap(_message.Message): + __slots__ = ["scenes"] + class Scene(_message.Message): + __slots__ = ["info", "tasks"] + INFO_FIELD_NUMBER: _ClassVar[int] + TASKS_FIELD_NUMBER: _ClassVar[int] + info: _scene_pb2.SceneInfo + tasks: _containers.RepeatedCompositeFieldContainer[_scene_pb2.SceneTask] + def __init__(self, info: _Optional[_Union[_scene_pb2.SceneInfo, _Mapping]] = ..., tasks: _Optional[_Iterable[_Union[_scene_pb2.SceneTask, _Mapping]]] = ...) -> None: ... + SCENES_FIELD_NUMBER: _ClassVar[int] + scenes: _containers.RepeatedCompositeFieldContainer[SceneWrap.Scene] + def __init__(self, scenes: _Optional[_Iterable[_Union[SceneWrap.Scene, _Mapping]]] = ...) -> None: ... + +class TemporaryData(_message.Message): + __slots__ = ["goto_location", "select_point_cruise", "select_rooms_clean", "select_zones_clean", "select_zones_cruise"] + GOTO_LOCATION_FIELD_NUMBER: _ClassVar[int] + SELECT_POINT_CRUISE_FIELD_NUMBER: _ClassVar[int] + SELECT_ROOMS_CLEAN_FIELD_NUMBER: _ClassVar[int] + SELECT_ZONES_CLEAN_FIELD_NUMBER: _ClassVar[int] + SELECT_ZONES_CRUISE_FIELD_NUMBER: _ClassVar[int] + goto_location: _control_pb2.Goto + select_point_cruise: _control_pb2.PointCruise + select_rooms_clean: _control_pb2.SelectRoomsClean + select_zones_clean: _control_pb2.SelectZonesClean + select_zones_cruise: _control_pb2.ZonesCruise + def __init__(self, select_rooms_clean: _Optional[_Union[_control_pb2.SelectRoomsClean, _Mapping]] = ..., select_zones_clean: _Optional[_Union[_control_pb2.SelectZonesClean, _Mapping]] = ..., goto_location: _Optional[_Union[_control_pb2.Goto, _Mapping]] = ..., select_point_cruise: _Optional[_Union[_control_pb2.PointCruise, _Mapping]] = ..., select_zones_cruise: _Optional[_Union[_control_pb2.ZonesCruise, _Mapping]] = ...) -> None: ... diff --git a/proto-reference/stream_wrap.proto b/proto-reference/stream_wrap.proto new file mode 100644 index 0000000..1f57059 --- /dev/null +++ b/proto-reference/stream_wrap.proto @@ -0,0 +1,20 @@ +/** + * 流通道协议包装. + * + * @note: 机器端使用,app忽略 + */ +syntax = "proto3"; + +// option optimize_for = LITE_RUNTIME; + +package proto.cloud.stream; + +import "proto/cloud/stream.proto"; + +message RoomParamsWrap { + repeated .proto.cloud.stream.RoomParams room_params = 1; +} + +message ObstacleInfoWrap { + repeated .proto.cloud.stream.ObstacleInfo obstacle_info = 1; +} diff --git a/proto-reference/stream_wrap_pb2.py b/proto-reference/stream_wrap_pb2.py new file mode 100644 index 0000000..6abc757 --- /dev/null +++ b/proto-reference/stream_wrap_pb2.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: proto/cloud/stream_wrap.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder + +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from ...proto.cloud import stream_pb2 as proto_dot_cloud_dot_stream__pb2 + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1dproto/cloud/stream_wrap.proto\x12\x12proto.cloud.stream\x1a\x18proto/cloud/stream.proto\"E\n\x0eRoomParamsWrap\x12\x33\n\x0broom_params\x18\x01 \x03(\x0b\x32\x1e.proto.cloud.stream.RoomParams\"K\n\x10ObstacleInfoWrap\x12\x37\n\robstacle_info\x18\x01 \x03(\x0b\x32 .proto.cloud.stream.ObstacleInfob\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'proto.cloud.stream_wrap_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _ROOMPARAMSWRAP._serialized_start=79 + _ROOMPARAMSWRAP._serialized_end=148 + _OBSTACLEINFOWRAP._serialized_start=150 + _OBSTACLEINFOWRAP._serialized_end=225 +# @@protoc_insertion_point(module_scope) diff --git a/proto-reference/stream_wrap_pb2.pyi b/proto-reference/stream_wrap_pb2.pyi new file mode 100644 index 0000000..c1cf47d --- /dev/null +++ b/proto-reference/stream_wrap_pb2.pyi @@ -0,0 +1,25 @@ +from typing import ClassVar as _ClassVar +from typing import Iterable as _Iterable +from typing import Mapping as _Mapping +from typing import Optional as _Optional +from typing import Union as _Union + +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf.internal import containers as _containers + +from ...proto.cloud import stream_pb2 as _stream_pb2 + +DESCRIPTOR: _descriptor.FileDescriptor + +class ObstacleInfoWrap(_message.Message): + __slots__ = ["obstacle_info"] + OBSTACLE_INFO_FIELD_NUMBER: _ClassVar[int] + obstacle_info: _containers.RepeatedCompositeFieldContainer[_stream_pb2.ObstacleInfo] + def __init__(self, obstacle_info: _Optional[_Iterable[_Union[_stream_pb2.ObstacleInfo, _Mapping]]] = ...) -> None: ... + +class RoomParamsWrap(_message.Message): + __slots__ = ["room_params"] + ROOM_PARAMS_FIELD_NUMBER: _ClassVar[int] + room_params: _containers.RepeatedCompositeFieldContainer[_stream_pb2.RoomParams] + def __init__(self, room_params: _Optional[_Iterable[_Union[_stream_pb2.RoomParams, _Mapping]]] = ...) -> None: ... diff --git a/proto-reference/timing.proto b/proto-reference/timing.proto new file mode 100644 index 0000000..c7a1baf --- /dev/null +++ b/proto-reference/timing.proto @@ -0,0 +1,185 @@ +syntax = "proto3"; + +// option optimize_for = LITE_RUNTIME; + +package proto.cloud; + +import "proto/cloud/common.proto"; +import "proto/cloud/clean_param.proto"; + +message TimerInfo { + // 手机 app 新建定时不需要该字段,设备返回 id + // 手机 app 其他操作需要该字段 + message Id { + uint32 value = 1; + } + Id id = 1; + + message Status { + bool valid = 1; + bool opened = 2; + } + Status status = 2; + + message Desc { + enum Trigger { + SINGLE = 0; // 单次触发 + CYCLE = 1; // 周期触发 + } + Trigger trigger = 1; + + message Timing { + uint32 user_tz = 1; // 用户时区,单位 s + bool summer = 2; // 用户是否处于夏令时的国家或地区 + uint32 hours = 3; + uint32 minutes = 4; + } + Timing timing = 2; + + // 周期触发需要有以下字段描述周期 + // 这里的 week 指用户感知的周,机器需要结合用户时区来判断某天对应的时间 + message Cycle { + uint32 week_bits = 1; // bit-0 周日 bit-1 ... bit-6 周一~周六 + } + Cycle cycle = 3; + } + Desc desc = 3; + + message Addition { + uint64 create_time = 1; // 创建时间 + string create_user_id = 2; // 创建用户 id + uint64 renew_time = 3; // 修改时间 + string renew_user_id = 4; // 修改用户 id + } + Addition addition = 4; + + message Action { + enum Type { + SCHEDULE_AUTO_CLEAN = 0; // 预约自动清扫 + SCHEDULE_ROOMS_CLEAN = 1; // 预约房间清扫 + SCHEDULE_CRUISE = 2; // 预约巡航 + SCHEDULE_SCENE_CLEAN = 3; // 预约场景清扫 + } + Type type = 1; + + // 前置操作 + message Precondition { + // TODO + } + Precondition precondition = 2; + + enum Mode { + GENERAL = 0; // 通用模式 + CUSTOMIZE = 1; // x9 定制清洁和 stream 房间参数关联,x10 后和 ScheduleRoomsClean.Custom 关联 + } + + message ScheduleAutoClean { + Mode mode = 1; + + message General { + // 智能省心模式开关关闭时才有下面 4 个字段 + Fan fan = 1; + MopMode mop_mode = 2; + CleanType clean_type = 3; + CleanExtent clean_extent = 4; + + Switch smart_mode_sw = 5; // 智能省心模式开关 + } + General general = 2; + } + + message ScheduleRoomsClean { + Mode mode = 1; + + message General { // x9 通用模式有效,x10 之后不再使用 + uint32 map_id = 1; + + Fan fan = 2; + MopMode mop_mode = 3; + CleanType clean_type = 4; + CleanExtent clean_extent = 5; + + message Room { + uint32 id = 1; + uint32 order = 2; + } + repeated Room rooms = 6; + } + General general = 2; + + message Custom { // x9 定制模式不走这里,走 stream,x10 之后房间清洁走这里 + uint32 map_id = 1; + Switch smart_mode_sw = 2; // 智能省心模式开关 + + message Room { + uint32 id = 1; + uint32 order = 2; + + // 智能省心模式开关关闭时才有下面 4 个字段 + CleanType clean_type = 6; + Fan fan = 7; + MopMode mop_mode = 8; + CleanExtent clean_extent = 9; + + uint32 clean_times = 10; // 清扫次数,非 0 有效 + } + repeated Room rooms = 3; + } + Custom custom = 3; + } + + message ScheduleCruise { + uint32 map_id = 1; + } + + message ScheduleSceneClean { + uint32 scene_id = 1; + string scene_name = 2; // 场景被删除时还可以在定时中显示失效的场景名 + } + + oneof Param { + ScheduleAutoClean sche_auto_clean = 3; + ScheduleRoomsClean sche_rooms_clean = 4; + ScheduleCruise sche_cruise = 5; + ScheduleSceneClean sche_scene_clean = 6; + } + } + Action action = 5; +} + +message TimerRequest { + enum Method { + DEFAULT = 0; + ADD = 1; // 下面 timer 字段中不带 id 字段,其他都要 + DELETE = 2; // 下面 timer 字段中只用带 id 字段 + MOTIFY = 3; // 下面 timer 字段中要完整的字段 + OPEN = 4; // 下面 timer 字段中只用带 id 字段 + CLOSE = 5; // 下面 timer 字段中只用带 id 字段 + INQUIRY = 6; // 查询/上报 + IGNORE_ONCE = 7; // 忽略一次,下面 timer 字段中只用带 id 字段 + } + Method method = 1; + + uint32 seq = 2; + + TimerInfo timer = 3; +} + +message TimerResponse { + TimerRequest.Method method = 1; // 开机/失效上报 DEFAULT,其他情况跟下发相同 + uint32 seq = 2; + + message Result { + enum Value { + SUCCESS = 0; + FAILED = 1; + } + Value value = 1; + + uint32 err_code = 2; + } + Result result = 3; + + // 全量上报机器中所有的定时信息 + repeated TimerInfo timers = 4; +} diff --git a/proto-reference/timing_pb2.py b/proto-reference/timing_pb2.py new file mode 100644 index 0000000..c1d8371 --- /dev/null +++ b/proto-reference/timing_pb2.py @@ -0,0 +1,78 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: proto/cloud/timing.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder + +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from ...proto.cloud import \ + clean_param_pb2 as proto_dot_cloud_dot_clean__param__pb2 +from ...proto.cloud import common_pb2 as proto_dot_cloud_dot_common__pb2 + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x18proto/cloud/timing.proto\x12\x0bproto.cloud\x1a\x18proto/cloud/common.proto\x1a\x1dproto/cloud/clean_param.proto\"\xd9\x14\n\tTimerInfo\x12%\n\x02id\x18\x01 \x01(\x0b\x32\x19.proto.cloud.TimerInfo.Id\x12-\n\x06status\x18\x02 \x01(\x0b\x32\x1d.proto.cloud.TimerInfo.Status\x12)\n\x04\x64\x65sc\x18\x03 \x01(\x0b\x32\x1b.proto.cloud.TimerInfo.Desc\x12\x31\n\x08\x61\x64\x64ition\x18\x04 \x01(\x0b\x32\x1f.proto.cloud.TimerInfo.Addition\x12-\n\x06\x61\x63tion\x18\x05 \x01(\x0b\x32\x1d.proto.cloud.TimerInfo.Action\x1a\x13\n\x02Id\x12\r\n\x05value\x18\x01 \x01(\r\x1a\'\n\x06Status\x12\r\n\x05valid\x18\x01 \x01(\x08\x12\x0e\n\x06opened\x18\x02 \x01(\x08\x1a\xab\x02\n\x04\x44\x65sc\x12\x34\n\x07trigger\x18\x01 \x01(\x0e\x32#.proto.cloud.TimerInfo.Desc.Trigger\x12\x32\n\x06timing\x18\x02 \x01(\x0b\x32\".proto.cloud.TimerInfo.Desc.Timing\x12\x30\n\x05\x63ycle\x18\x03 \x01(\x0b\x32!.proto.cloud.TimerInfo.Desc.Cycle\x1aI\n\x06Timing\x12\x0f\n\x07user_tz\x18\x01 \x01(\r\x12\x0e\n\x06summer\x18\x02 \x01(\x08\x12\r\n\x05hours\x18\x03 \x01(\r\x12\x0f\n\x07minutes\x18\x04 \x01(\r\x1a\x1a\n\x05\x43ycle\x12\x11\n\tweek_bits\x18\x01 \x01(\r\" \n\x07Trigger\x12\n\n\x06SINGLE\x10\x00\x12\t\n\x05\x43YCLE\x10\x01\x1a\x62\n\x08\x41\x64\x64ition\x12\x13\n\x0b\x63reate_time\x18\x01 \x01(\x04\x12\x16\n\x0e\x63reate_user_id\x18\x02 \x01(\t\x12\x12\n\nrenew_time\x18\x03 \x01(\x04\x12\x15\n\rrenew_user_id\x18\x04 \x01(\t\x1a\x98\x0f\n\x06\x41\x63tion\x12\x30\n\x04type\x18\x01 \x01(\x0e\x32\".proto.cloud.TimerInfo.Action.Type\x12@\n\x0cprecondition\x18\x02 \x01(\x0b\x32*.proto.cloud.TimerInfo.Action.Precondition\x12J\n\x0fsche_auto_clean\x18\x03 \x01(\x0b\x32/.proto.cloud.TimerInfo.Action.ScheduleAutoCleanH\x00\x12L\n\x10sche_rooms_clean\x18\x04 \x01(\x0b\x32\x30.proto.cloud.TimerInfo.Action.ScheduleRoomsCleanH\x00\x12\x43\n\x0bsche_cruise\x18\x05 \x01(\x0b\x32,.proto.cloud.TimerInfo.Action.ScheduleCruiseH\x00\x12L\n\x10sche_scene_clean\x18\x06 \x01(\x0b\x32\x30.proto.cloud.TimerInfo.Action.ScheduleSceneCleanH\x00\x1a\x0e\n\x0cPrecondition\x1a\xea\x02\n\x11ScheduleAutoClean\x12\x30\n\x04mode\x18\x01 \x01(\x0e\x32\".proto.cloud.TimerInfo.Action.Mode\x12H\n\x07general\x18\x02 \x01(\x0b\x32\x37.proto.cloud.TimerInfo.Action.ScheduleAutoClean.General\x1a\xd8\x01\n\x07General\x12\x1d\n\x03\x66\x61n\x18\x01 \x01(\x0b\x32\x10.proto.cloud.Fan\x12&\n\x08mop_mode\x18\x02 \x01(\x0b\x32\x14.proto.cloud.MopMode\x12*\n\nclean_type\x18\x03 \x01(\x0b\x32\x16.proto.cloud.CleanType\x12.\n\x0c\x63lean_extent\x18\x04 \x01(\x0b\x32\x18.proto.cloud.CleanExtent\x12*\n\rsmart_mode_sw\x18\x05 \x01(\x0b\x32\x13.proto.cloud.Switch\x1a\xfa\x06\n\x12ScheduleRoomsClean\x12\x30\n\x04mode\x18\x01 \x01(\x0e\x32\".proto.cloud.TimerInfo.Action.Mode\x12I\n\x07general\x18\x02 \x01(\x0b\x32\x38.proto.cloud.TimerInfo.Action.ScheduleRoomsClean.General\x12G\n\x06\x63ustom\x18\x03 \x01(\x0b\x32\x37.proto.cloud.TimerInfo.Action.ScheduleRoomsClean.Custom\x1a\xad\x02\n\x07General\x12\x0e\n\x06map_id\x18\x01 \x01(\r\x12\x1d\n\x03\x66\x61n\x18\x02 \x01(\x0b\x32\x10.proto.cloud.Fan\x12&\n\x08mop_mode\x18\x03 \x01(\x0b\x32\x14.proto.cloud.MopMode\x12*\n\nclean_type\x18\x04 \x01(\x0b\x32\x16.proto.cloud.CleanType\x12.\n\x0c\x63lean_extent\x18\x05 \x01(\x0b\x32\x18.proto.cloud.CleanExtent\x12L\n\x05rooms\x18\x06 \x03(\x0b\x32=.proto.cloud.TimerInfo.Action.ScheduleRoomsClean.General.Room\x1a!\n\x04Room\x12\n\n\x02id\x18\x01 \x01(\r\x12\r\n\x05order\x18\x02 \x01(\r\x1a\xed\x02\n\x06\x43ustom\x12\x0e\n\x06map_id\x18\x01 \x01(\r\x12*\n\rsmart_mode_sw\x18\x02 \x01(\x0b\x32\x13.proto.cloud.Switch\x12K\n\x05rooms\x18\x03 \x03(\x0b\x32<.proto.cloud.TimerInfo.Action.ScheduleRoomsClean.Custom.Room\x1a\xd9\x01\n\x04Room\x12\n\n\x02id\x18\x01 \x01(\r\x12\r\n\x05order\x18\x02 \x01(\r\x12*\n\nclean_type\x18\x06 \x01(\x0b\x32\x16.proto.cloud.CleanType\x12\x1d\n\x03\x66\x61n\x18\x07 \x01(\x0b\x32\x10.proto.cloud.Fan\x12&\n\x08mop_mode\x18\x08 \x01(\x0b\x32\x14.proto.cloud.MopMode\x12.\n\x0c\x63lean_extent\x18\t \x01(\x0b\x32\x18.proto.cloud.CleanExtent\x12\x13\n\x0b\x63lean_times\x18\n \x01(\r\x1a \n\x0eScheduleCruise\x12\x0e\n\x06map_id\x18\x01 \x01(\r\x1a:\n\x12ScheduleSceneClean\x12\x10\n\x08scene_id\x18\x01 \x01(\r\x12\x12\n\nscene_name\x18\x02 \x01(\t\"h\n\x04Type\x12\x17\n\x13SCHEDULE_AUTO_CLEAN\x10\x00\x12\x18\n\x14SCHEDULE_ROOMS_CLEAN\x10\x01\x12\x13\n\x0fSCHEDULE_CRUISE\x10\x02\x12\x18\n\x14SCHEDULE_SCENE_CLEAN\x10\x03\"\"\n\x04Mode\x12\x0b\n\x07GENERAL\x10\x00\x12\r\n\tCUSTOMIZE\x10\x01\x42\x07\n\x05Param\"\xdf\x01\n\x0cTimerRequest\x12\x30\n\x06method\x18\x01 \x01(\x0e\x32 .proto.cloud.TimerRequest.Method\x12\x0b\n\x03seq\x18\x02 \x01(\r\x12%\n\x05timer\x18\x03 \x01(\x0b\x32\x16.proto.cloud.TimerInfo\"i\n\x06Method\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10\x00\x12\x07\n\x03\x41\x44\x44\x10\x01\x12\n\n\x06\x44\x45LETE\x10\x02\x12\n\n\x06MOTIFY\x10\x03\x12\x08\n\x04OPEN\x10\x04\x12\t\n\x05\x43LOSE\x10\x05\x12\x0b\n\x07INQUIRY\x10\x06\x12\x0f\n\x0bIGNORE_ONCE\x10\x07\"\x9f\x02\n\rTimerResponse\x12\x30\n\x06method\x18\x01 \x01(\x0e\x32 .proto.cloud.TimerRequest.Method\x12\x0b\n\x03seq\x18\x02 \x01(\r\x12\x31\n\x06result\x18\x03 \x01(\x0b\x32!.proto.cloud.TimerResponse.Result\x12&\n\x06timers\x18\x04 \x03(\x0b\x32\x16.proto.cloud.TimerInfo\x1at\n\x06Result\x12\x36\n\x05value\x18\x01 \x01(\x0e\x32\'.proto.cloud.TimerResponse.Result.Value\x12\x10\n\x08\x65rr_code\x18\x02 \x01(\r\" \n\x05Value\x12\x0b\n\x07SUCCESS\x10\x00\x12\n\n\x06\x46\x41ILED\x10\x01\x62\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'proto.cloud.timing_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _TIMERINFO._serialized_start=99 + _TIMERINFO._serialized_end=2748 + _TIMERINFO_ID._serialized_start=339 + _TIMERINFO_ID._serialized_end=358 + _TIMERINFO_STATUS._serialized_start=360 + _TIMERINFO_STATUS._serialized_end=399 + _TIMERINFO_DESC._serialized_start=402 + _TIMERINFO_DESC._serialized_end=701 + _TIMERINFO_DESC_TIMING._serialized_start=566 + _TIMERINFO_DESC_TIMING._serialized_end=639 + _TIMERINFO_DESC_CYCLE._serialized_start=641 + _TIMERINFO_DESC_CYCLE._serialized_end=667 + _TIMERINFO_DESC_TRIGGER._serialized_start=669 + _TIMERINFO_DESC_TRIGGER._serialized_end=701 + _TIMERINFO_ADDITION._serialized_start=703 + _TIMERINFO_ADDITION._serialized_end=801 + _TIMERINFO_ACTION._serialized_start=804 + _TIMERINFO_ACTION._serialized_end=2748 + _TIMERINFO_ACTION_PRECONDITION._serialized_start=1231 + _TIMERINFO_ACTION_PRECONDITION._serialized_end=1245 + _TIMERINFO_ACTION_SCHEDULEAUTOCLEAN._serialized_start=1248 + _TIMERINFO_ACTION_SCHEDULEAUTOCLEAN._serialized_end=1610 + _TIMERINFO_ACTION_SCHEDULEAUTOCLEAN_GENERAL._serialized_start=1394 + _TIMERINFO_ACTION_SCHEDULEAUTOCLEAN_GENERAL._serialized_end=1610 + _TIMERINFO_ACTION_SCHEDULEROOMSCLEAN._serialized_start=1613 + _TIMERINFO_ACTION_SCHEDULEROOMSCLEAN._serialized_end=2503 + _TIMERINFO_ACTION_SCHEDULEROOMSCLEAN_GENERAL._serialized_start=1834 + _TIMERINFO_ACTION_SCHEDULEROOMSCLEAN_GENERAL._serialized_end=2135 + _TIMERINFO_ACTION_SCHEDULEROOMSCLEAN_GENERAL_ROOM._serialized_start=2102 + _TIMERINFO_ACTION_SCHEDULEROOMSCLEAN_GENERAL_ROOM._serialized_end=2135 + _TIMERINFO_ACTION_SCHEDULEROOMSCLEAN_CUSTOM._serialized_start=2138 + _TIMERINFO_ACTION_SCHEDULEROOMSCLEAN_CUSTOM._serialized_end=2503 + _TIMERINFO_ACTION_SCHEDULEROOMSCLEAN_CUSTOM_ROOM._serialized_start=2286 + _TIMERINFO_ACTION_SCHEDULEROOMSCLEAN_CUSTOM_ROOM._serialized_end=2503 + _TIMERINFO_ACTION_SCHEDULECRUISE._serialized_start=2505 + _TIMERINFO_ACTION_SCHEDULECRUISE._serialized_end=2537 + _TIMERINFO_ACTION_SCHEDULESCENECLEAN._serialized_start=2539 + _TIMERINFO_ACTION_SCHEDULESCENECLEAN._serialized_end=2597 + _TIMERINFO_ACTION_TYPE._serialized_start=2599 + _TIMERINFO_ACTION_TYPE._serialized_end=2703 + _TIMERINFO_ACTION_MODE._serialized_start=2705 + _TIMERINFO_ACTION_MODE._serialized_end=2739 + _TIMERREQUEST._serialized_start=2751 + _TIMERREQUEST._serialized_end=2974 + _TIMERREQUEST_METHOD._serialized_start=2869 + _TIMERREQUEST_METHOD._serialized_end=2974 + _TIMERRESPONSE._serialized_start=2977 + _TIMERRESPONSE._serialized_end=3264 + _TIMERRESPONSE_RESULT._serialized_start=3148 + _TIMERRESPONSE_RESULT._serialized_end=3264 + _TIMERRESPONSE_RESULT_VALUE._serialized_start=3232 + _TIMERRESPONSE_RESULT_VALUE._serialized_end=3264 +# @@protoc_insertion_point(module_scope) diff --git a/proto-reference/timing_pb2.pyi b/proto-reference/timing_pb2.pyi new file mode 100644 index 0000000..f74f02e --- /dev/null +++ b/proto-reference/timing_pb2.pyi @@ -0,0 +1,241 @@ +from typing import ClassVar as _ClassVar +from typing import Iterable as _Iterable +from typing import Mapping as _Mapping +from typing import Optional as _Optional +from typing import Union as _Union + +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf.internal import containers as _containers +from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper + +from ...proto.cloud import clean_param_pb2 as _clean_param_pb2 +from ...proto.cloud import common_pb2 as _common_pb2 + +DESCRIPTOR: _descriptor.FileDescriptor + +class TimerInfo(_message.Message): + __slots__ = ["action", "addition", "desc", "id", "status"] + class Action(_message.Message): + __slots__ = ["precondition", "sche_auto_clean", "sche_cruise", "sche_rooms_clean", "sche_scene_clean", "type"] + class Mode(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + class Type(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + class Precondition(_message.Message): + __slots__ = [] + def __init__(self) -> None: ... + class ScheduleAutoClean(_message.Message): + __slots__ = ["general", "mode"] + class General(_message.Message): + __slots__ = ["clean_extent", "clean_type", "fan", "mop_mode", "smart_mode_sw"] + CLEAN_EXTENT_FIELD_NUMBER: _ClassVar[int] + CLEAN_TYPE_FIELD_NUMBER: _ClassVar[int] + FAN_FIELD_NUMBER: _ClassVar[int] + MOP_MODE_FIELD_NUMBER: _ClassVar[int] + SMART_MODE_SW_FIELD_NUMBER: _ClassVar[int] + clean_extent: _clean_param_pb2.CleanExtent + clean_type: _clean_param_pb2.CleanType + fan: _clean_param_pb2.Fan + mop_mode: _clean_param_pb2.MopMode + smart_mode_sw: _common_pb2.Switch + def __init__(self, fan: _Optional[_Union[_clean_param_pb2.Fan, _Mapping]] = ..., mop_mode: _Optional[_Union[_clean_param_pb2.MopMode, _Mapping]] = ..., clean_type: _Optional[_Union[_clean_param_pb2.CleanType, _Mapping]] = ..., clean_extent: _Optional[_Union[_clean_param_pb2.CleanExtent, _Mapping]] = ..., smart_mode_sw: _Optional[_Union[_common_pb2.Switch, _Mapping]] = ...) -> None: ... + GENERAL_FIELD_NUMBER: _ClassVar[int] + MODE_FIELD_NUMBER: _ClassVar[int] + general: TimerInfo.Action.ScheduleAutoClean.General + mode: TimerInfo.Action.Mode + def __init__(self, mode: _Optional[_Union[TimerInfo.Action.Mode, str]] = ..., general: _Optional[_Union[TimerInfo.Action.ScheduleAutoClean.General, _Mapping]] = ...) -> None: ... + class ScheduleCruise(_message.Message): + __slots__ = ["map_id"] + MAP_ID_FIELD_NUMBER: _ClassVar[int] + map_id: int + def __init__(self, map_id: _Optional[int] = ...) -> None: ... + class ScheduleRoomsClean(_message.Message): + __slots__ = ["custom", "general", "mode"] + class Custom(_message.Message): + __slots__ = ["map_id", "rooms", "smart_mode_sw"] + class Room(_message.Message): + __slots__ = ["clean_extent", "clean_times", "clean_type", "fan", "id", "mop_mode", "order"] + CLEAN_EXTENT_FIELD_NUMBER: _ClassVar[int] + CLEAN_TIMES_FIELD_NUMBER: _ClassVar[int] + CLEAN_TYPE_FIELD_NUMBER: _ClassVar[int] + FAN_FIELD_NUMBER: _ClassVar[int] + ID_FIELD_NUMBER: _ClassVar[int] + MOP_MODE_FIELD_NUMBER: _ClassVar[int] + ORDER_FIELD_NUMBER: _ClassVar[int] + clean_extent: _clean_param_pb2.CleanExtent + clean_times: int + clean_type: _clean_param_pb2.CleanType + fan: _clean_param_pb2.Fan + id: int + mop_mode: _clean_param_pb2.MopMode + order: int + def __init__(self, id: _Optional[int] = ..., order: _Optional[int] = ..., clean_type: _Optional[_Union[_clean_param_pb2.CleanType, _Mapping]] = ..., fan: _Optional[_Union[_clean_param_pb2.Fan, _Mapping]] = ..., mop_mode: _Optional[_Union[_clean_param_pb2.MopMode, _Mapping]] = ..., clean_extent: _Optional[_Union[_clean_param_pb2.CleanExtent, _Mapping]] = ..., clean_times: _Optional[int] = ...) -> None: ... + MAP_ID_FIELD_NUMBER: _ClassVar[int] + ROOMS_FIELD_NUMBER: _ClassVar[int] + SMART_MODE_SW_FIELD_NUMBER: _ClassVar[int] + map_id: int + rooms: _containers.RepeatedCompositeFieldContainer[TimerInfo.Action.ScheduleRoomsClean.Custom.Room] + smart_mode_sw: _common_pb2.Switch + def __init__(self, map_id: _Optional[int] = ..., smart_mode_sw: _Optional[_Union[_common_pb2.Switch, _Mapping]] = ..., rooms: _Optional[_Iterable[_Union[TimerInfo.Action.ScheduleRoomsClean.Custom.Room, _Mapping]]] = ...) -> None: ... + class General(_message.Message): + __slots__ = ["clean_extent", "clean_type", "fan", "map_id", "mop_mode", "rooms"] + class Room(_message.Message): + __slots__ = ["id", "order"] + ID_FIELD_NUMBER: _ClassVar[int] + ORDER_FIELD_NUMBER: _ClassVar[int] + id: int + order: int + def __init__(self, id: _Optional[int] = ..., order: _Optional[int] = ...) -> None: ... + CLEAN_EXTENT_FIELD_NUMBER: _ClassVar[int] + CLEAN_TYPE_FIELD_NUMBER: _ClassVar[int] + FAN_FIELD_NUMBER: _ClassVar[int] + MAP_ID_FIELD_NUMBER: _ClassVar[int] + MOP_MODE_FIELD_NUMBER: _ClassVar[int] + ROOMS_FIELD_NUMBER: _ClassVar[int] + clean_extent: _clean_param_pb2.CleanExtent + clean_type: _clean_param_pb2.CleanType + fan: _clean_param_pb2.Fan + map_id: int + mop_mode: _clean_param_pb2.MopMode + rooms: _containers.RepeatedCompositeFieldContainer[TimerInfo.Action.ScheduleRoomsClean.General.Room] + def __init__(self, map_id: _Optional[int] = ..., fan: _Optional[_Union[_clean_param_pb2.Fan, _Mapping]] = ..., mop_mode: _Optional[_Union[_clean_param_pb2.MopMode, _Mapping]] = ..., clean_type: _Optional[_Union[_clean_param_pb2.CleanType, _Mapping]] = ..., clean_extent: _Optional[_Union[_clean_param_pb2.CleanExtent, _Mapping]] = ..., rooms: _Optional[_Iterable[_Union[TimerInfo.Action.ScheduleRoomsClean.General.Room, _Mapping]]] = ...) -> None: ... + CUSTOM_FIELD_NUMBER: _ClassVar[int] + GENERAL_FIELD_NUMBER: _ClassVar[int] + MODE_FIELD_NUMBER: _ClassVar[int] + custom: TimerInfo.Action.ScheduleRoomsClean.Custom + general: TimerInfo.Action.ScheduleRoomsClean.General + mode: TimerInfo.Action.Mode + def __init__(self, mode: _Optional[_Union[TimerInfo.Action.Mode, str]] = ..., general: _Optional[_Union[TimerInfo.Action.ScheduleRoomsClean.General, _Mapping]] = ..., custom: _Optional[_Union[TimerInfo.Action.ScheduleRoomsClean.Custom, _Mapping]] = ...) -> None: ... + class ScheduleSceneClean(_message.Message): + __slots__ = ["scene_id", "scene_name"] + SCENE_ID_FIELD_NUMBER: _ClassVar[int] + SCENE_NAME_FIELD_NUMBER: _ClassVar[int] + scene_id: int + scene_name: str + def __init__(self, scene_id: _Optional[int] = ..., scene_name: _Optional[str] = ...) -> None: ... + CUSTOMIZE: TimerInfo.Action.Mode + GENERAL: TimerInfo.Action.Mode + PRECONDITION_FIELD_NUMBER: _ClassVar[int] + SCHEDULE_AUTO_CLEAN: TimerInfo.Action.Type + SCHEDULE_CRUISE: TimerInfo.Action.Type + SCHEDULE_ROOMS_CLEAN: TimerInfo.Action.Type + SCHEDULE_SCENE_CLEAN: TimerInfo.Action.Type + SCHE_AUTO_CLEAN_FIELD_NUMBER: _ClassVar[int] + SCHE_CRUISE_FIELD_NUMBER: _ClassVar[int] + SCHE_ROOMS_CLEAN_FIELD_NUMBER: _ClassVar[int] + SCHE_SCENE_CLEAN_FIELD_NUMBER: _ClassVar[int] + TYPE_FIELD_NUMBER: _ClassVar[int] + precondition: TimerInfo.Action.Precondition + sche_auto_clean: TimerInfo.Action.ScheduleAutoClean + sche_cruise: TimerInfo.Action.ScheduleCruise + sche_rooms_clean: TimerInfo.Action.ScheduleRoomsClean + sche_scene_clean: TimerInfo.Action.ScheduleSceneClean + type: TimerInfo.Action.Type + def __init__(self, type: _Optional[_Union[TimerInfo.Action.Type, str]] = ..., precondition: _Optional[_Union[TimerInfo.Action.Precondition, _Mapping]] = ..., sche_auto_clean: _Optional[_Union[TimerInfo.Action.ScheduleAutoClean, _Mapping]] = ..., sche_rooms_clean: _Optional[_Union[TimerInfo.Action.ScheduleRoomsClean, _Mapping]] = ..., sche_cruise: _Optional[_Union[TimerInfo.Action.ScheduleCruise, _Mapping]] = ..., sche_scene_clean: _Optional[_Union[TimerInfo.Action.ScheduleSceneClean, _Mapping]] = ...) -> None: ... + class Addition(_message.Message): + __slots__ = ["create_time", "create_user_id", "renew_time", "renew_user_id"] + CREATE_TIME_FIELD_NUMBER: _ClassVar[int] + CREATE_USER_ID_FIELD_NUMBER: _ClassVar[int] + RENEW_TIME_FIELD_NUMBER: _ClassVar[int] + RENEW_USER_ID_FIELD_NUMBER: _ClassVar[int] + create_time: int + create_user_id: str + renew_time: int + renew_user_id: str + def __init__(self, create_time: _Optional[int] = ..., create_user_id: _Optional[str] = ..., renew_time: _Optional[int] = ..., renew_user_id: _Optional[str] = ...) -> None: ... + class Desc(_message.Message): + __slots__ = ["cycle", "timing", "trigger"] + class Trigger(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + class Cycle(_message.Message): + __slots__ = ["week_bits"] + WEEK_BITS_FIELD_NUMBER: _ClassVar[int] + week_bits: int + def __init__(self, week_bits: _Optional[int] = ...) -> None: ... + class Timing(_message.Message): + __slots__ = ["hours", "minutes", "summer", "user_tz"] + HOURS_FIELD_NUMBER: _ClassVar[int] + MINUTES_FIELD_NUMBER: _ClassVar[int] + SUMMER_FIELD_NUMBER: _ClassVar[int] + USER_TZ_FIELD_NUMBER: _ClassVar[int] + hours: int + minutes: int + summer: bool + user_tz: int + def __init__(self, user_tz: _Optional[int] = ..., summer: bool = ..., hours: _Optional[int] = ..., minutes: _Optional[int] = ...) -> None: ... + CYCLE: TimerInfo.Desc.Trigger + CYCLE_FIELD_NUMBER: _ClassVar[int] + SINGLE: TimerInfo.Desc.Trigger + TIMING_FIELD_NUMBER: _ClassVar[int] + TRIGGER_FIELD_NUMBER: _ClassVar[int] + cycle: TimerInfo.Desc.Cycle + timing: TimerInfo.Desc.Timing + trigger: TimerInfo.Desc.Trigger + def __init__(self, trigger: _Optional[_Union[TimerInfo.Desc.Trigger, str]] = ..., timing: _Optional[_Union[TimerInfo.Desc.Timing, _Mapping]] = ..., cycle: _Optional[_Union[TimerInfo.Desc.Cycle, _Mapping]] = ...) -> None: ... + class Id(_message.Message): + __slots__ = ["value"] + VALUE_FIELD_NUMBER: _ClassVar[int] + value: int + def __init__(self, value: _Optional[int] = ...) -> None: ... + class Status(_message.Message): + __slots__ = ["opened", "valid"] + OPENED_FIELD_NUMBER: _ClassVar[int] + VALID_FIELD_NUMBER: _ClassVar[int] + opened: bool + valid: bool + def __init__(self, valid: bool = ..., opened: bool = ...) -> None: ... + ACTION_FIELD_NUMBER: _ClassVar[int] + ADDITION_FIELD_NUMBER: _ClassVar[int] + DESC_FIELD_NUMBER: _ClassVar[int] + ID_FIELD_NUMBER: _ClassVar[int] + STATUS_FIELD_NUMBER: _ClassVar[int] + action: TimerInfo.Action + addition: TimerInfo.Addition + desc: TimerInfo.Desc + id: TimerInfo.Id + status: TimerInfo.Status + def __init__(self, id: _Optional[_Union[TimerInfo.Id, _Mapping]] = ..., status: _Optional[_Union[TimerInfo.Status, _Mapping]] = ..., desc: _Optional[_Union[TimerInfo.Desc, _Mapping]] = ..., addition: _Optional[_Union[TimerInfo.Addition, _Mapping]] = ..., action: _Optional[_Union[TimerInfo.Action, _Mapping]] = ...) -> None: ... + +class TimerRequest(_message.Message): + __slots__ = ["method", "seq", "timer"] + class Method(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + ADD: TimerRequest.Method + CLOSE: TimerRequest.Method + DEFAULT: TimerRequest.Method + DELETE: TimerRequest.Method + IGNORE_ONCE: TimerRequest.Method + INQUIRY: TimerRequest.Method + METHOD_FIELD_NUMBER: _ClassVar[int] + MOTIFY: TimerRequest.Method + OPEN: TimerRequest.Method + SEQ_FIELD_NUMBER: _ClassVar[int] + TIMER_FIELD_NUMBER: _ClassVar[int] + method: TimerRequest.Method + seq: int + timer: TimerInfo + def __init__(self, method: _Optional[_Union[TimerRequest.Method, str]] = ..., seq: _Optional[int] = ..., timer: _Optional[_Union[TimerInfo, _Mapping]] = ...) -> None: ... + +class TimerResponse(_message.Message): + __slots__ = ["method", "result", "seq", "timers"] + class Result(_message.Message): + __slots__ = ["err_code", "value"] + class Value(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + ERR_CODE_FIELD_NUMBER: _ClassVar[int] + FAILED: TimerResponse.Result.Value + SUCCESS: TimerResponse.Result.Value + VALUE_FIELD_NUMBER: _ClassVar[int] + err_code: int + value: TimerResponse.Result.Value + def __init__(self, value: _Optional[_Union[TimerResponse.Result.Value, str]] = ..., err_code: _Optional[int] = ...) -> None: ... + METHOD_FIELD_NUMBER: _ClassVar[int] + RESULT_FIELD_NUMBER: _ClassVar[int] + SEQ_FIELD_NUMBER: _ClassVar[int] + TIMERS_FIELD_NUMBER: _ClassVar[int] + method: TimerRequest.Method + result: TimerResponse.Result + seq: int + timers: _containers.RepeatedCompositeFieldContainer[TimerInfo] + def __init__(self, method: _Optional[_Union[TimerRequest.Method, str]] = ..., seq: _Optional[int] = ..., result: _Optional[_Union[TimerResponse.Result, _Mapping]] = ..., timers: _Optional[_Iterable[_Union[TimerInfo, _Mapping]]] = ...) -> None: ... diff --git a/proto-reference/undisturbed.proto b/proto-reference/undisturbed.proto new file mode 100644 index 0000000..4646feb --- /dev/null +++ b/proto-reference/undisturbed.proto @@ -0,0 +1,29 @@ +syntax = "proto3"; + +// option optimize_for = LITE_RUNTIME; + +package proto.cloud; + +import "proto/cloud/common.proto"; + +message Undisturbed { + message TimePoint { + uint32 hour = 1; + uint32 minute = 2; + } + + Switch sw = 1; // 勿扰使能开关 + + TimePoint begin = 2; + TimePoint end = 3; +} + +message UndisturbedRequest { + Undisturbed undisturbed = 1; +} + +message UndisturbedResponse { + Active active = 1; // 勿扰激活状态 + + Undisturbed undisturbed = 2; +} diff --git a/proto-reference/undisturbed_pb2.py b/proto-reference/undisturbed_pb2.py new file mode 100644 index 0000000..911e290 --- /dev/null +++ b/proto-reference/undisturbed_pb2.py @@ -0,0 +1,32 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: proto/cloud/undisturbed.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder + +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from ...proto.cloud import common_pb2 as proto_dot_cloud_dot_common__pb2 + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1dproto/cloud/undisturbed.proto\x12\x0bproto.cloud\x1a\x18proto/cloud/common.proto\"\xbd\x01\n\x0bUndisturbed\x12\x1f\n\x02sw\x18\x01 \x01(\x0b\x32\x13.proto.cloud.Switch\x12\x31\n\x05\x62\x65gin\x18\x02 \x01(\x0b\x32\".proto.cloud.Undisturbed.TimePoint\x12/\n\x03\x65nd\x18\x03 \x01(\x0b\x32\".proto.cloud.Undisturbed.TimePoint\x1a)\n\tTimePoint\x12\x0c\n\x04hour\x18\x01 \x01(\r\x12\x0e\n\x06minute\x18\x02 \x01(\r\"C\n\x12UndisturbedRequest\x12-\n\x0bundisturbed\x18\x01 \x01(\x0b\x32\x18.proto.cloud.Undisturbed\"i\n\x13UndisturbedResponse\x12#\n\x06\x61\x63tive\x18\x01 \x01(\x0b\x32\x13.proto.cloud.Active\x12-\n\x0bundisturbed\x18\x02 \x01(\x0b\x32\x18.proto.cloud.Undisturbedb\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'proto.cloud.undisturbed_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _UNDISTURBED._serialized_start=73 + _UNDISTURBED._serialized_end=262 + _UNDISTURBED_TIMEPOINT._serialized_start=221 + _UNDISTURBED_TIMEPOINT._serialized_end=262 + _UNDISTURBEDREQUEST._serialized_start=264 + _UNDISTURBEDREQUEST._serialized_end=331 + _UNDISTURBEDRESPONSE._serialized_start=333 + _UNDISTURBEDRESPONSE._serialized_end=438 +# @@protoc_insertion_point(module_scope) diff --git a/proto-reference/undisturbed_pb2.pyi b/proto-reference/undisturbed_pb2.pyi new file mode 100644 index 0000000..47f0180 --- /dev/null +++ b/proto-reference/undisturbed_pb2.pyi @@ -0,0 +1,42 @@ +from typing import ClassVar as _ClassVar +from typing import Mapping as _Mapping +from typing import Optional as _Optional +from typing import Union as _Union + +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message + +from ...proto.cloud import common_pb2 as _common_pb2 + +DESCRIPTOR: _descriptor.FileDescriptor + +class Undisturbed(_message.Message): + __slots__ = ["begin", "end", "sw"] + class TimePoint(_message.Message): + __slots__ = ["hour", "minute"] + HOUR_FIELD_NUMBER: _ClassVar[int] + MINUTE_FIELD_NUMBER: _ClassVar[int] + hour: int + minute: int + def __init__(self, hour: _Optional[int] = ..., minute: _Optional[int] = ...) -> None: ... + BEGIN_FIELD_NUMBER: _ClassVar[int] + END_FIELD_NUMBER: _ClassVar[int] + SW_FIELD_NUMBER: _ClassVar[int] + begin: Undisturbed.TimePoint + end: Undisturbed.TimePoint + sw: _common_pb2.Switch + def __init__(self, sw: _Optional[_Union[_common_pb2.Switch, _Mapping]] = ..., begin: _Optional[_Union[Undisturbed.TimePoint, _Mapping]] = ..., end: _Optional[_Union[Undisturbed.TimePoint, _Mapping]] = ...) -> None: ... + +class UndisturbedRequest(_message.Message): + __slots__ = ["undisturbed"] + UNDISTURBED_FIELD_NUMBER: _ClassVar[int] + undisturbed: Undisturbed + def __init__(self, undisturbed: _Optional[_Union[Undisturbed, _Mapping]] = ...) -> None: ... + +class UndisturbedResponse(_message.Message): + __slots__ = ["active", "undisturbed"] + ACTIVE_FIELD_NUMBER: _ClassVar[int] + UNDISTURBED_FIELD_NUMBER: _ClassVar[int] + active: _common_pb2.Active + undisturbed: Undisturbed + def __init__(self, active: _Optional[_Union[_common_pb2.Active, _Mapping]] = ..., undisturbed: _Optional[_Union[Undisturbed, _Mapping]] = ...) -> None: ... diff --git a/proto-reference/unisetting.proto b/proto-reference/unisetting.proto new file mode 100644 index 0000000..9b2ed8c --- /dev/null +++ b/proto-reference/unisetting.proto @@ -0,0 +1,106 @@ +syntax = "proto3"; + +// option optimize_for = LITE_RUNTIME; + +package proto.cloud; + +import "proto/cloud/common.proto"; + +// 设置项 +message UnisettingRequest { + Switch children_lock = 1; // 童锁开关 + Switch cruise_continue_sw = 2; // 断点巡航开关 + Switch multi_map_sw = 3; // 多地图开关 + Switch ai_see = 4; // AI See识别开关 + message MultiMapOptions { + message Retain { + repeated uint32 map_id = 1; + } + Retain retain = 1; // 多地图开关关闭时,可选带这个保留部分地图 + } + MultiMapOptions multi_map_options = 5; + + message WifiSetting { + message Deletion { // 删除指定 ssid,协议支持多个 + repeated string ssid = 1; + } + Deletion deletion = 1; + } + WifiSetting wifi_setting = 6; + + Switch water_level_sw = 7; // 实验室功能——清水量显示开关 + Switch suggest_restricted_zone_sw = 8; // 实验室功能——自动推荐禁区开关 + Switch deep_mop_corner_sw = 9; // 实验室功能——深度拖墙角开关(扭屁股动作) + + Numerical dust_full_remind = 10; // 尘满提醒的时长,单位:分钟 + Switch live_photo_sw = 11; // 实景照片开关 + Switch smart_follow_sw = 12; // 实验室功能——智能跟随开关 + Switch poop_avoidance_sw = 13; // 便便避让开关 + Switch pet_mode_sw = 14; // 宠物模式开关 +} + +message Unistate { + Switch mop_holder_state_l = 1; // 左侧拖布状态(已安装或已取出) + Switch mop_holder_state_r = 2; // 右侧拖布状态(已安装或已取出) + Switch custom_clean_mode = 3; // 通用/定制的状态 + Active map_valid = 4; // 存在有效地图(设备至少存在一张有房间轮廓的地图) + Switch mop_state = 5; // 固定(不旋转)拖布状态(已安装或已取出) + + message LiveMap { + enum StateBit { // 多个值组合(用位运算) + BASE = 0; // 底图 + ROOM = 1; // 房间轮廓 + KITCHEN = 2; // 厨房 + PET = 3; // 宠物区 + } + uint32 state_bits = 1; + } + LiveMap live_map = 6; // 实时地图有哪些组件信息 + + uint32 clean_strategy_version = 7; // 清洁策略版本(云端/本地) +} + +message WifiData { + message Ap { + enum Frequency { + FREQ_2_4G = 0; + FREQ_5G = 1; + } + + message Connection { + enum Result { + OK = 0; + PASSWD_ERR = 1; + } + Result result = 1; + uint64 timestamp = 2; // utc, 单位s + } + + string ssid = 1; + Frequency frequency = 2; + Connection connection = 3; + } + repeated Ap ap = 1; // 第1个为当前连接的AP +} + +// 设置项或状态项 +message UnisettingResponse { + Switch children_lock = 1; // 童锁开关 + Switch cruise_continue_sw = 2; // 断点巡航开关 + Switch multi_map_sw = 3; // 多地图开关 + Switch ai_see = 4; // AI See识别开关 + + Switch water_level_sw = 5; // 实验室功能——清水量显示开关 + Switch suggest_restricted_zone_sw = 6; // 实验室功能——自动推荐禁区开关 + Switch deep_mop_corner_sw = 7; // 实验室功能——深度拖墙角开关(扭屁股动作) + + Numerical dust_full_remind = 8; // 尘满提醒的时长,单位:分钟 + Switch live_photo_sw = 9; // 实景照片开关 + + Unistate unistate = 10; + uint32 ap_signal_strength = 11; // 0 - 100,当前连接的wifi信号强度 + WifiData wifi_data = 12; + Switch smart_follow_sw = 13; // 实验室功能——智能跟随开关 + Switch poop_avoidance_sw = 14; // 便便避让开关 + Switch pet_mode_sw = 15; // 宠物模式开关 +} diff --git a/proto-reference/unisetting_pb2.py b/proto-reference/unisetting_pb2.py new file mode 100644 index 0000000..c49ccb3 --- /dev/null +++ b/proto-reference/unisetting_pb2.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: proto/cloud/unisetting.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder + +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from ...proto.cloud import common_pb2 as proto_dot_cloud_dot_common__pb2 + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1cproto/cloud/unisetting.proto\x12\x0bproto.cloud\x1a\x18proto/cloud/common.proto\"\xae\x07\n\x11UnisettingRequest\x12*\n\rchildren_lock\x18\x01 \x01(\x0b\x32\x13.proto.cloud.Switch\x12/\n\x12\x63ruise_continue_sw\x18\x02 \x01(\x0b\x32\x13.proto.cloud.Switch\x12)\n\x0cmulti_map_sw\x18\x03 \x01(\x0b\x32\x13.proto.cloud.Switch\x12#\n\x06\x61i_see\x18\x04 \x01(\x0b\x32\x13.proto.cloud.Switch\x12I\n\x11multi_map_options\x18\x05 \x01(\x0b\x32..proto.cloud.UnisettingRequest.MultiMapOptions\x12@\n\x0cwifi_setting\x18\x06 \x01(\x0b\x32*.proto.cloud.UnisettingRequest.WifiSetting\x12+\n\x0ewater_level_sw\x18\x07 \x01(\x0b\x32\x13.proto.cloud.Switch\x12\x37\n\x1asuggest_restricted_zone_sw\x18\x08 \x01(\x0b\x32\x13.proto.cloud.Switch\x12/\n\x12\x64\x65\x65p_mop_corner_sw\x18\t \x01(\x0b\x32\x13.proto.cloud.Switch\x12\x30\n\x10\x64ust_full_remind\x18\n \x01(\x0b\x32\x16.proto.cloud.Numerical\x12*\n\rlive_photo_sw\x18\x0b \x01(\x0b\x32\x13.proto.cloud.Switch\x12,\n\x0fsmart_follow_sw\x18\x0c \x01(\x0b\x32\x13.proto.cloud.Switch\x12.\n\x11poop_avoidance_sw\x18\r \x01(\x0b\x32\x13.proto.cloud.Switch\x12(\n\x0bpet_mode_sw\x18\x0e \x01(\x0b\x32\x13.proto.cloud.Switch\x1ar\n\x0fMultiMapOptions\x12\x45\n\x06retain\x18\x01 \x01(\x0b\x32\x35.proto.cloud.UnisettingRequest.MultiMapOptions.Retain\x1a\x18\n\x06Retain\x12\x0e\n\x06map_id\x18\x01 \x03(\r\x1an\n\x0bWifiSetting\x12\x45\n\x08\x64\x65letion\x18\x01 \x01(\x0b\x32\x33.proto.cloud.UnisettingRequest.WifiSetting.Deletion\x1a\x18\n\x08\x44\x65letion\x12\x0c\n\x04ssid\x18\x01 \x03(\t\"\x92\x03\n\x08Unistate\x12/\n\x12mop_holder_state_l\x18\x01 \x01(\x0b\x32\x13.proto.cloud.Switch\x12/\n\x12mop_holder_state_r\x18\x02 \x01(\x0b\x32\x13.proto.cloud.Switch\x12.\n\x11\x63ustom_clean_mode\x18\x03 \x01(\x0b\x32\x13.proto.cloud.Switch\x12&\n\tmap_valid\x18\x04 \x01(\x0b\x32\x13.proto.cloud.Active\x12&\n\tmop_state\x18\x05 \x01(\x0b\x32\x13.proto.cloud.Switch\x12/\n\x08live_map\x18\x06 \x01(\x0b\x32\x1d.proto.cloud.Unistate.LiveMap\x12\x1e\n\x16\x63lean_strategy_version\x18\x07 \x01(\r\x1aS\n\x07LiveMap\x12\x12\n\nstate_bits\x18\x01 \x01(\r\"4\n\x08StateBit\x12\x08\n\x04\x42\x41SE\x10\x00\x12\x08\n\x04ROOM\x10\x01\x12\x0b\n\x07KITCHEN\x10\x02\x12\x07\n\x03PET\x10\x03\"\xdd\x02\n\x08WifiData\x12$\n\x02\x61p\x18\x01 \x03(\x0b\x32\x18.proto.cloud.WifiData.Ap\x1a\xaa\x02\n\x02\x41p\x12\x0c\n\x04ssid\x18\x01 \x01(\t\x12\x35\n\tfrequency\x18\x02 \x01(\x0e\x32\".proto.cloud.WifiData.Ap.Frequency\x12\x37\n\nconnection\x18\x03 \x01(\x0b\x32#.proto.cloud.WifiData.Ap.Connection\x1a}\n\nConnection\x12:\n\x06result\x18\x01 \x01(\x0e\x32*.proto.cloud.WifiData.Ap.Connection.Result\x12\x11\n\ttimestamp\x18\x02 \x01(\x04\" \n\x06Result\x12\x06\n\x02OK\x10\x00\x12\x0e\n\nPASSWD_ERR\x10\x01\"\'\n\tFrequency\x12\r\n\tFREQ_2_4G\x10\x00\x12\x0b\n\x07\x46REQ_5G\x10\x01\"\xad\x05\n\x12UnisettingResponse\x12*\n\rchildren_lock\x18\x01 \x01(\x0b\x32\x13.proto.cloud.Switch\x12/\n\x12\x63ruise_continue_sw\x18\x02 \x01(\x0b\x32\x13.proto.cloud.Switch\x12)\n\x0cmulti_map_sw\x18\x03 \x01(\x0b\x32\x13.proto.cloud.Switch\x12#\n\x06\x61i_see\x18\x04 \x01(\x0b\x32\x13.proto.cloud.Switch\x12+\n\x0ewater_level_sw\x18\x05 \x01(\x0b\x32\x13.proto.cloud.Switch\x12\x37\n\x1asuggest_restricted_zone_sw\x18\x06 \x01(\x0b\x32\x13.proto.cloud.Switch\x12/\n\x12\x64\x65\x65p_mop_corner_sw\x18\x07 \x01(\x0b\x32\x13.proto.cloud.Switch\x12\x30\n\x10\x64ust_full_remind\x18\x08 \x01(\x0b\x32\x16.proto.cloud.Numerical\x12*\n\rlive_photo_sw\x18\t \x01(\x0b\x32\x13.proto.cloud.Switch\x12\'\n\x08unistate\x18\n \x01(\x0b\x32\x15.proto.cloud.Unistate\x12\x1a\n\x12\x61p_signal_strength\x18\x0b \x01(\r\x12(\n\twifi_data\x18\x0c \x01(\x0b\x32\x15.proto.cloud.WifiData\x12,\n\x0fsmart_follow_sw\x18\r \x01(\x0b\x32\x13.proto.cloud.Switch\x12.\n\x11poop_avoidance_sw\x18\x0e \x01(\x0b\x32\x13.proto.cloud.Switch\x12(\n\x0bpet_mode_sw\x18\x0f \x01(\x0b\x32\x13.proto.cloud.Switchb\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'proto.cloud.unisetting_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _UNISETTINGREQUEST._serialized_start=72 + _UNISETTINGREQUEST._serialized_end=1014 + _UNISETTINGREQUEST_MULTIMAPOPTIONS._serialized_start=788 + _UNISETTINGREQUEST_MULTIMAPOPTIONS._serialized_end=902 + _UNISETTINGREQUEST_MULTIMAPOPTIONS_RETAIN._serialized_start=878 + _UNISETTINGREQUEST_MULTIMAPOPTIONS_RETAIN._serialized_end=902 + _UNISETTINGREQUEST_WIFISETTING._serialized_start=904 + _UNISETTINGREQUEST_WIFISETTING._serialized_end=1014 + _UNISETTINGREQUEST_WIFISETTING_DELETION._serialized_start=990 + _UNISETTINGREQUEST_WIFISETTING_DELETION._serialized_end=1014 + _UNISTATE._serialized_start=1017 + _UNISTATE._serialized_end=1419 + _UNISTATE_LIVEMAP._serialized_start=1336 + _UNISTATE_LIVEMAP._serialized_end=1419 + _UNISTATE_LIVEMAP_STATEBIT._serialized_start=1367 + _UNISTATE_LIVEMAP_STATEBIT._serialized_end=1419 + _WIFIDATA._serialized_start=1422 + _WIFIDATA._serialized_end=1771 + _WIFIDATA_AP._serialized_start=1473 + _WIFIDATA_AP._serialized_end=1771 + _WIFIDATA_AP_CONNECTION._serialized_start=1605 + _WIFIDATA_AP_CONNECTION._serialized_end=1730 + _WIFIDATA_AP_CONNECTION_RESULT._serialized_start=1698 + _WIFIDATA_AP_CONNECTION_RESULT._serialized_end=1730 + _WIFIDATA_AP_FREQUENCY._serialized_start=1732 + _WIFIDATA_AP_FREQUENCY._serialized_end=1771 + _UNISETTINGRESPONSE._serialized_start=1774 + _UNISETTINGRESPONSE._serialized_end=2459 +# @@protoc_insertion_point(module_scope) diff --git a/proto-reference/unisetting_pb2.pyi b/proto-reference/unisetting_pb2.pyi new file mode 100644 index 0000000..55528b7 --- /dev/null +++ b/proto-reference/unisetting_pb2.pyi @@ -0,0 +1,159 @@ +from typing import ClassVar as _ClassVar +from typing import Iterable as _Iterable +from typing import Mapping as _Mapping +from typing import Optional as _Optional +from typing import Union as _Union + +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf.internal import containers as _containers +from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper + +from ...proto.cloud import common_pb2 as _common_pb2 + +DESCRIPTOR: _descriptor.FileDescriptor + +class UnisettingRequest(_message.Message): + __slots__ = ["ai_see", "children_lock", "cruise_continue_sw", "deep_mop_corner_sw", "dust_full_remind", "live_photo_sw", "multi_map_options", "multi_map_sw", "pet_mode_sw", "poop_avoidance_sw", "smart_follow_sw", "suggest_restricted_zone_sw", "water_level_sw", "wifi_setting"] + class MultiMapOptions(_message.Message): + __slots__ = ["retain"] + class Retain(_message.Message): + __slots__ = ["map_id"] + MAP_ID_FIELD_NUMBER: _ClassVar[int] + map_id: _containers.RepeatedScalarFieldContainer[int] + def __init__(self, map_id: _Optional[_Iterable[int]] = ...) -> None: ... + RETAIN_FIELD_NUMBER: _ClassVar[int] + retain: UnisettingRequest.MultiMapOptions.Retain + def __init__(self, retain: _Optional[_Union[UnisettingRequest.MultiMapOptions.Retain, _Mapping]] = ...) -> None: ... + class WifiSetting(_message.Message): + __slots__ = ["deletion"] + class Deletion(_message.Message): + __slots__ = ["ssid"] + SSID_FIELD_NUMBER: _ClassVar[int] + ssid: _containers.RepeatedScalarFieldContainer[str] + def __init__(self, ssid: _Optional[_Iterable[str]] = ...) -> None: ... + DELETION_FIELD_NUMBER: _ClassVar[int] + deletion: UnisettingRequest.WifiSetting.Deletion + def __init__(self, deletion: _Optional[_Union[UnisettingRequest.WifiSetting.Deletion, _Mapping]] = ...) -> None: ... + AI_SEE_FIELD_NUMBER: _ClassVar[int] + CHILDREN_LOCK_FIELD_NUMBER: _ClassVar[int] + CRUISE_CONTINUE_SW_FIELD_NUMBER: _ClassVar[int] + DEEP_MOP_CORNER_SW_FIELD_NUMBER: _ClassVar[int] + DUST_FULL_REMIND_FIELD_NUMBER: _ClassVar[int] + LIVE_PHOTO_SW_FIELD_NUMBER: _ClassVar[int] + MULTI_MAP_OPTIONS_FIELD_NUMBER: _ClassVar[int] + MULTI_MAP_SW_FIELD_NUMBER: _ClassVar[int] + PET_MODE_SW_FIELD_NUMBER: _ClassVar[int] + POOP_AVOIDANCE_SW_FIELD_NUMBER: _ClassVar[int] + SMART_FOLLOW_SW_FIELD_NUMBER: _ClassVar[int] + SUGGEST_RESTRICTED_ZONE_SW_FIELD_NUMBER: _ClassVar[int] + WATER_LEVEL_SW_FIELD_NUMBER: _ClassVar[int] + WIFI_SETTING_FIELD_NUMBER: _ClassVar[int] + ai_see: _common_pb2.Switch + children_lock: _common_pb2.Switch + cruise_continue_sw: _common_pb2.Switch + deep_mop_corner_sw: _common_pb2.Switch + dust_full_remind: _common_pb2.Numerical + live_photo_sw: _common_pb2.Switch + multi_map_options: UnisettingRequest.MultiMapOptions + multi_map_sw: _common_pb2.Switch + pet_mode_sw: _common_pb2.Switch + poop_avoidance_sw: _common_pb2.Switch + smart_follow_sw: _common_pb2.Switch + suggest_restricted_zone_sw: _common_pb2.Switch + water_level_sw: _common_pb2.Switch + wifi_setting: UnisettingRequest.WifiSetting + def __init__(self, children_lock: _Optional[_Union[_common_pb2.Switch, _Mapping]] = ..., cruise_continue_sw: _Optional[_Union[_common_pb2.Switch, _Mapping]] = ..., multi_map_sw: _Optional[_Union[_common_pb2.Switch, _Mapping]] = ..., ai_see: _Optional[_Union[_common_pb2.Switch, _Mapping]] = ..., multi_map_options: _Optional[_Union[UnisettingRequest.MultiMapOptions, _Mapping]] = ..., wifi_setting: _Optional[_Union[UnisettingRequest.WifiSetting, _Mapping]] = ..., water_level_sw: _Optional[_Union[_common_pb2.Switch, _Mapping]] = ..., suggest_restricted_zone_sw: _Optional[_Union[_common_pb2.Switch, _Mapping]] = ..., deep_mop_corner_sw: _Optional[_Union[_common_pb2.Switch, _Mapping]] = ..., dust_full_remind: _Optional[_Union[_common_pb2.Numerical, _Mapping]] = ..., live_photo_sw: _Optional[_Union[_common_pb2.Switch, _Mapping]] = ..., smart_follow_sw: _Optional[_Union[_common_pb2.Switch, _Mapping]] = ..., poop_avoidance_sw: _Optional[_Union[_common_pb2.Switch, _Mapping]] = ..., pet_mode_sw: _Optional[_Union[_common_pb2.Switch, _Mapping]] = ...) -> None: ... + +class UnisettingResponse(_message.Message): + __slots__ = ["ai_see", "ap_signal_strength", "children_lock", "cruise_continue_sw", "deep_mop_corner_sw", "dust_full_remind", "live_photo_sw", "multi_map_sw", "pet_mode_sw", "poop_avoidance_sw", "smart_follow_sw", "suggest_restricted_zone_sw", "unistate", "water_level_sw", "wifi_data"] + AI_SEE_FIELD_NUMBER: _ClassVar[int] + AP_SIGNAL_STRENGTH_FIELD_NUMBER: _ClassVar[int] + CHILDREN_LOCK_FIELD_NUMBER: _ClassVar[int] + CRUISE_CONTINUE_SW_FIELD_NUMBER: _ClassVar[int] + DEEP_MOP_CORNER_SW_FIELD_NUMBER: _ClassVar[int] + DUST_FULL_REMIND_FIELD_NUMBER: _ClassVar[int] + LIVE_PHOTO_SW_FIELD_NUMBER: _ClassVar[int] + MULTI_MAP_SW_FIELD_NUMBER: _ClassVar[int] + PET_MODE_SW_FIELD_NUMBER: _ClassVar[int] + POOP_AVOIDANCE_SW_FIELD_NUMBER: _ClassVar[int] + SMART_FOLLOW_SW_FIELD_NUMBER: _ClassVar[int] + SUGGEST_RESTRICTED_ZONE_SW_FIELD_NUMBER: _ClassVar[int] + UNISTATE_FIELD_NUMBER: _ClassVar[int] + WATER_LEVEL_SW_FIELD_NUMBER: _ClassVar[int] + WIFI_DATA_FIELD_NUMBER: _ClassVar[int] + ai_see: _common_pb2.Switch + ap_signal_strength: int + children_lock: _common_pb2.Switch + cruise_continue_sw: _common_pb2.Switch + deep_mop_corner_sw: _common_pb2.Switch + dust_full_remind: _common_pb2.Numerical + live_photo_sw: _common_pb2.Switch + multi_map_sw: _common_pb2.Switch + pet_mode_sw: _common_pb2.Switch + poop_avoidance_sw: _common_pb2.Switch + smart_follow_sw: _common_pb2.Switch + suggest_restricted_zone_sw: _common_pb2.Switch + unistate: Unistate + water_level_sw: _common_pb2.Switch + wifi_data: WifiData + def __init__(self, children_lock: _Optional[_Union[_common_pb2.Switch, _Mapping]] = ..., cruise_continue_sw: _Optional[_Union[_common_pb2.Switch, _Mapping]] = ..., multi_map_sw: _Optional[_Union[_common_pb2.Switch, _Mapping]] = ..., ai_see: _Optional[_Union[_common_pb2.Switch, _Mapping]] = ..., water_level_sw: _Optional[_Union[_common_pb2.Switch, _Mapping]] = ..., suggest_restricted_zone_sw: _Optional[_Union[_common_pb2.Switch, _Mapping]] = ..., deep_mop_corner_sw: _Optional[_Union[_common_pb2.Switch, _Mapping]] = ..., dust_full_remind: _Optional[_Union[_common_pb2.Numerical, _Mapping]] = ..., live_photo_sw: _Optional[_Union[_common_pb2.Switch, _Mapping]] = ..., unistate: _Optional[_Union[Unistate, _Mapping]] = ..., ap_signal_strength: _Optional[int] = ..., wifi_data: _Optional[_Union[WifiData, _Mapping]] = ..., smart_follow_sw: _Optional[_Union[_common_pb2.Switch, _Mapping]] = ..., poop_avoidance_sw: _Optional[_Union[_common_pb2.Switch, _Mapping]] = ..., pet_mode_sw: _Optional[_Union[_common_pb2.Switch, _Mapping]] = ...) -> None: ... + +class Unistate(_message.Message): + __slots__ = ["clean_strategy_version", "custom_clean_mode", "live_map", "map_valid", "mop_holder_state_l", "mop_holder_state_r", "mop_state"] + class LiveMap(_message.Message): + __slots__ = ["state_bits"] + class StateBit(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + BASE: Unistate.LiveMap.StateBit + KITCHEN: Unistate.LiveMap.StateBit + PET: Unistate.LiveMap.StateBit + ROOM: Unistate.LiveMap.StateBit + STATE_BITS_FIELD_NUMBER: _ClassVar[int] + state_bits: int + def __init__(self, state_bits: _Optional[int] = ...) -> None: ... + CLEAN_STRATEGY_VERSION_FIELD_NUMBER: _ClassVar[int] + CUSTOM_CLEAN_MODE_FIELD_NUMBER: _ClassVar[int] + LIVE_MAP_FIELD_NUMBER: _ClassVar[int] + MAP_VALID_FIELD_NUMBER: _ClassVar[int] + MOP_HOLDER_STATE_L_FIELD_NUMBER: _ClassVar[int] + MOP_HOLDER_STATE_R_FIELD_NUMBER: _ClassVar[int] + MOP_STATE_FIELD_NUMBER: _ClassVar[int] + clean_strategy_version: int + custom_clean_mode: _common_pb2.Switch + live_map: Unistate.LiveMap + map_valid: _common_pb2.Active + mop_holder_state_l: _common_pb2.Switch + mop_holder_state_r: _common_pb2.Switch + mop_state: _common_pb2.Switch + def __init__(self, mop_holder_state_l: _Optional[_Union[_common_pb2.Switch, _Mapping]] = ..., mop_holder_state_r: _Optional[_Union[_common_pb2.Switch, _Mapping]] = ..., custom_clean_mode: _Optional[_Union[_common_pb2.Switch, _Mapping]] = ..., map_valid: _Optional[_Union[_common_pb2.Active, _Mapping]] = ..., mop_state: _Optional[_Union[_common_pb2.Switch, _Mapping]] = ..., live_map: _Optional[_Union[Unistate.LiveMap, _Mapping]] = ..., clean_strategy_version: _Optional[int] = ...) -> None: ... + +class WifiData(_message.Message): + __slots__ = ["ap"] + class Ap(_message.Message): + __slots__ = ["connection", "frequency", "ssid"] + class Frequency(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + class Connection(_message.Message): + __slots__ = ["result", "timestamp"] + class Result(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + OK: WifiData.Ap.Connection.Result + PASSWD_ERR: WifiData.Ap.Connection.Result + RESULT_FIELD_NUMBER: _ClassVar[int] + TIMESTAMP_FIELD_NUMBER: _ClassVar[int] + result: WifiData.Ap.Connection.Result + timestamp: int + def __init__(self, result: _Optional[_Union[WifiData.Ap.Connection.Result, str]] = ..., timestamp: _Optional[int] = ...) -> None: ... + CONNECTION_FIELD_NUMBER: _ClassVar[int] + FREQUENCY_FIELD_NUMBER: _ClassVar[int] + FREQ_2_4G: WifiData.Ap.Frequency + FREQ_5G: WifiData.Ap.Frequency + SSID_FIELD_NUMBER: _ClassVar[int] + connection: WifiData.Ap.Connection + frequency: WifiData.Ap.Frequency + ssid: str + def __init__(self, ssid: _Optional[str] = ..., frequency: _Optional[_Union[WifiData.Ap.Frequency, str]] = ..., connection: _Optional[_Union[WifiData.Ap.Connection, _Mapping]] = ...) -> None: ... + AP_FIELD_NUMBER: _ClassVar[int] + ap: _containers.RepeatedCompositeFieldContainer[WifiData.Ap] + def __init__(self, ap: _Optional[_Iterable[_Union[WifiData.Ap, _Mapping]]] = ...) -> None: ... diff --git a/proto-reference/universal_data.proto b/proto-reference/universal_data.proto new file mode 100644 index 0000000..3ea592c --- /dev/null +++ b/proto-reference/universal_data.proto @@ -0,0 +1,27 @@ +/** + * 通用数据协议 + */ +syntax = "proto3"; + +// option optimize_for = LITE_RUNTIME; + +package proto.cloud; + +import "proto/cloud/common.proto"; + +message UniversalDataRequest { +} + +message UniversalDataResponse { + message RoomTable { + uint32 map_id = 1; + + message Data { + uint32 id = 1; + string name = 2; + RoomScene scene = 3; + } + repeated Data data = 2; + } + RoomTable cur_map_room = 1; +} diff --git a/proto-reference/universal_data_pb2.py b/proto-reference/universal_data_pb2.py new file mode 100644 index 0000000..cd0e653 --- /dev/null +++ b/proto-reference/universal_data_pb2.py @@ -0,0 +1,32 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: proto/cloud/universal_data.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder + +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from ...proto.cloud import common_pb2 as proto_dot_cloud_dot_common__pb2 + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n proto/cloud/universal_data.proto\x12\x0bproto.cloud\x1a\x18proto/cloud/common.proto\"\x16\n\x14UniversalDataRequest\"\x83\x02\n\x15UniversalDataResponse\x12\x42\n\x0c\x63ur_map_room\x18\x01 \x01(\x0b\x32,.proto.cloud.UniversalDataResponse.RoomTable\x1a\xa5\x01\n\tRoomTable\x12\x0e\n\x06map_id\x18\x01 \x01(\r\x12?\n\x04\x64\x61ta\x18\x02 \x03(\x0b\x32\x31.proto.cloud.UniversalDataResponse.RoomTable.Data\x1aG\n\x04\x44\x61ta\x12\n\n\x02id\x18\x01 \x01(\r\x12\x0c\n\x04name\x18\x02 \x01(\t\x12%\n\x05scene\x18\x03 \x01(\x0b\x32\x16.proto.cloud.RoomSceneb\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'proto.cloud.universal_data_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _UNIVERSALDATAREQUEST._serialized_start=75 + _UNIVERSALDATAREQUEST._serialized_end=97 + _UNIVERSALDATARESPONSE._serialized_start=100 + _UNIVERSALDATARESPONSE._serialized_end=359 + _UNIVERSALDATARESPONSE_ROOMTABLE._serialized_start=194 + _UNIVERSALDATARESPONSE_ROOMTABLE._serialized_end=359 + _UNIVERSALDATARESPONSE_ROOMTABLE_DATA._serialized_start=288 + _UNIVERSALDATARESPONSE_ROOMTABLE_DATA._serialized_end=359 +# @@protoc_insertion_point(module_scope) diff --git a/proto-reference/universal_data_pb2.pyi b/proto-reference/universal_data_pb2.pyi new file mode 100644 index 0000000..9254b8e --- /dev/null +++ b/proto-reference/universal_data_pb2.pyi @@ -0,0 +1,39 @@ +from typing import ClassVar as _ClassVar +from typing import Iterable as _Iterable +from typing import Mapping as _Mapping +from typing import Optional as _Optional +from typing import Union as _Union + +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf.internal import containers as _containers + +from ...proto.cloud import common_pb2 as _common_pb2 + +DESCRIPTOR: _descriptor.FileDescriptor + +class UniversalDataRequest(_message.Message): + __slots__ = [] + def __init__(self) -> None: ... + +class UniversalDataResponse(_message.Message): + __slots__ = ["cur_map_room"] + class RoomTable(_message.Message): + __slots__ = ["data", "map_id"] + class Data(_message.Message): + __slots__ = ["id", "name", "scene"] + ID_FIELD_NUMBER: _ClassVar[int] + NAME_FIELD_NUMBER: _ClassVar[int] + SCENE_FIELD_NUMBER: _ClassVar[int] + id: int + name: str + scene: _common_pb2.RoomScene + def __init__(self, id: _Optional[int] = ..., name: _Optional[str] = ..., scene: _Optional[_Union[_common_pb2.RoomScene, _Mapping]] = ...) -> None: ... + DATA_FIELD_NUMBER: _ClassVar[int] + MAP_ID_FIELD_NUMBER: _ClassVar[int] + data: _containers.RepeatedCompositeFieldContainer[UniversalDataResponse.RoomTable.Data] + map_id: int + def __init__(self, map_id: _Optional[int] = ..., data: _Optional[_Iterable[_Union[UniversalDataResponse.RoomTable.Data, _Mapping]]] = ...) -> None: ... + CUR_MAP_ROOM_FIELD_NUMBER: _ClassVar[int] + cur_map_room: UniversalDataResponse.RoomTable + def __init__(self, cur_map_room: _Optional[_Union[UniversalDataResponse.RoomTable, _Mapping]] = ...) -> None: ... diff --git a/proto-reference/upgrade.proto b/proto-reference/upgrade.proto new file mode 100644 index 0000000..2360e74 --- /dev/null +++ b/proto-reference/upgrade.proto @@ -0,0 +1,34 @@ +syntax = "proto3"; + +package proto.cloud; + +// Request +message QueryUpgradeStatus { + // 无参数 +} + +// Response +message UpgradeStatus { + enum Status { + IDLE = 0; // 空闲状态 + DOWNLOADING = 1; // 下载中 + DOWNLOAD_COMPLETE = 2; // 下载完成 + DOWNLOAD_FAILED = 3; // 下载失败 + INSTALLING = 4; // 安装中 + INSTALL_COMPLETE = 5; // 安装完成 + INSTALL_FAILED = 6; // 安装失败 + } + Status status = 1; + uint32 progress = 2; // 下载进度, 0-100% + + enum Error{ + NONE = 0; + NOT_IN_STATION = 1; // 不在充电桩 + BATTERY_NOT_ENOUGH = 2; // 电量不足 + MCU_INSTALL_FAILED = 3; // MCU安装失败 + AP_INSTALL_FAILED = 4; // AP安装失败 + STATION_NOT_CONNECTED = 5; // 基站未连接 + STATION_INSTALL_FAILED = 6; // 基站安装失败 + } + string error = 3; +} diff --git a/proto-reference/upgrade_pb2.py b/proto-reference/upgrade_pb2.py new file mode 100644 index 0000000..a021275 --- /dev/null +++ b/proto-reference/upgrade_pb2.py @@ -0,0 +1,31 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: proto/cloud/upgrade.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x19proto/cloud/upgrade.proto\x12\x0bproto.cloud\"\x14\n\x12QueryUpgradeStatus\"\x95\x03\n\rUpgradeStatus\x12\x31\n\x06status\x18\x01 \x01(\x0e\x32!.proto.cloud.UpgradeStatus.Status\x12\x10\n\x08progress\x18\x02 \x01(\r\x12\r\n\x05\x65rror\x18\x03 \x01(\t\"\x89\x01\n\x06Status\x12\x08\n\x04IDLE\x10\x00\x12\x0f\n\x0b\x44OWNLOADING\x10\x01\x12\x15\n\x11\x44OWNLOAD_COMPLETE\x10\x02\x12\x13\n\x0f\x44OWNLOAD_FAILED\x10\x03\x12\x0e\n\nINSTALLING\x10\x04\x12\x14\n\x10INSTALL_COMPLETE\x10\x05\x12\x12\n\x0eINSTALL_FAILED\x10\x06\"\xa3\x01\n\x05\x45rror\x12\x08\n\x04NONE\x10\x00\x12\x12\n\x0eNOT_IN_STATION\x10\x01\x12\x16\n\x12\x42\x41TTERY_NOT_ENOUGH\x10\x02\x12\x16\n\x12MCU_INSTALL_FAILED\x10\x03\x12\x15\n\x11\x41P_INSTALL_FAILED\x10\x04\x12\x19\n\x15STATION_NOT_CONNECTED\x10\x05\x12\x1a\n\x16STATION_INSTALL_FAILED\x10\x06\x62\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'proto.cloud.upgrade_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _QUERYUPGRADESTATUS._serialized_start=42 + _QUERYUPGRADESTATUS._serialized_end=62 + _UPGRADESTATUS._serialized_start=65 + _UPGRADESTATUS._serialized_end=470 + _UPGRADESTATUS_STATUS._serialized_start=167 + _UPGRADESTATUS_STATUS._serialized_end=304 + _UPGRADESTATUS_ERROR._serialized_start=307 + _UPGRADESTATUS_ERROR._serialized_end=470 +# @@protoc_insertion_point(module_scope) diff --git a/proto-reference/upgrade_pb2.pyi b/proto-reference/upgrade_pb2.pyi new file mode 100644 index 0000000..09a473a --- /dev/null +++ b/proto-reference/upgrade_pb2.pyi @@ -0,0 +1,38 @@ +from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class QueryUpgradeStatus(_message.Message): + __slots__ = [] + def __init__(self) -> None: ... + +class UpgradeStatus(_message.Message): + __slots__ = ["error", "progress", "status"] + class Error(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + class Status(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + AP_INSTALL_FAILED: UpgradeStatus.Error + BATTERY_NOT_ENOUGH: UpgradeStatus.Error + DOWNLOADING: UpgradeStatus.Status + DOWNLOAD_COMPLETE: UpgradeStatus.Status + DOWNLOAD_FAILED: UpgradeStatus.Status + ERROR_FIELD_NUMBER: _ClassVar[int] + IDLE: UpgradeStatus.Status + INSTALLING: UpgradeStatus.Status + INSTALL_COMPLETE: UpgradeStatus.Status + INSTALL_FAILED: UpgradeStatus.Status + MCU_INSTALL_FAILED: UpgradeStatus.Error + NONE: UpgradeStatus.Error + NOT_IN_STATION: UpgradeStatus.Error + PROGRESS_FIELD_NUMBER: _ClassVar[int] + STATION_INSTALL_FAILED: UpgradeStatus.Error + STATION_NOT_CONNECTED: UpgradeStatus.Error + STATUS_FIELD_NUMBER: _ClassVar[int] + error: str + progress: int + status: UpgradeStatus.Status + def __init__(self, status: _Optional[_Union[UpgradeStatus.Status, str]] = ..., progress: _Optional[int] = ..., error: _Optional[str] = ...) -> None: ... diff --git a/proto-reference/version.proto b/proto-reference/version.proto new file mode 100644 index 0000000..258cae7 --- /dev/null +++ b/proto-reference/version.proto @@ -0,0 +1,87 @@ +syntax = "proto3"; + +// option optimize_for = LITE_RUNTIME; + +package proto.cloud; + +enum Global { + NONE = 0; + PROTO_VERSION = 1; // 目前是1,有变更则递增 +} + +// 设备支持的协议 +message ProtoInfo { + uint32 global_verison = 1; // 使用 Global 的 PROTO_VERSION + + message Module { + uint32 version = 1; + uint32 options = 2; + } + + enum CollectDustOptionBit { + COLLECT_DUST_APP_START = 0; // 此位为1时表示带App一键启动集尘功能,0表示不带 + } + /** + * 对应 station.proto 文件 + * version 1 使用 CollectDustCfg + * version 2 使用 CollectDustCfgV2, option定义见CollectDustOptionBit + */ + Module collect_dust = 2; + + enum MapFormatOptionBit { + MAP_FORMAT_ANGLE = 0; // 地图存在 angle 字段 + MAP_FORMAT_RESERVE_MAP = 1; // 固件适配关闭多地图能选择保留地图 + MAP_FORMAT_DEFAULT_NAME = 2; // 固件支持地图和房间默认名称 + } + /** + * version 1 地图增加 angle 字段(仅使用 Module.version) + * version 2 地图使用 option 定义见 MapFormatOptionBit + */ + Module map_format = 3; + + enum ContinueCleanOptionBit { + SMART_CONTINUE_CLEAN = 0; // 智能断点续扫 + } + /** + * version 1 断点续扫使用 option 定义见 ContinueCleanOptionBit + */ + Module continue_clean = 4; + + /** + * version 1 支持割毛发功能 + */ + Module cut_hair = 5; + + enum TimingOptionBit { + SCHEDULE_ROOMS_CLEAN_CUSTOM = 0; // 预约房间清扫支持每个房间自定义参数 + SCHEDULE_SCENE_CLEAN = 1; // 预约场景清扫 + } + /** + * version 1 定时功能使用 option 定义见 TimingOptionBit + */ + Module timing = 6; +} + +// App 支持的功能 +message AppFunction { + message Module { + uint32 version = 1; + uint32 options = 2; + } + + enum MultiMapsFunctionBit { + REMIND_MAP_SAVE = 0; // 此位为1时表示App的拥有能力是地图提醒保存 + } + /** + * version 1 使用 option 定义见 MultiMapsFunctionBit + */ + Module multi_maps= 2; + + enum OptimizationFunctionBit { + PATH_HIDE_TYPE = 0; // 此位为1时表示App支持路径隐藏类型 + } + /** + * version 1 使用 option 定义见 OptimizationFunctionBit + */ + Module optimization = 3; +} \ No newline at end of file diff --git a/proto-reference/version_pb2.py b/proto-reference/version_pb2.py new file mode 100644 index 0000000..c08a8b9 --- /dev/null +++ b/proto-reference/version_pb2.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: proto/cloud/version.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x19proto/cloud/version.proto\x12\x0bproto.cloud\"\xe9\x04\n\tProtoInfo\x12\x16\n\x0eglobal_verison\x18\x01 \x01(\r\x12\x33\n\x0c\x63ollect_dust\x18\x02 \x01(\x0b\x32\x1d.proto.cloud.ProtoInfo.Module\x12\x31\n\nmap_format\x18\x03 \x01(\x0b\x32\x1d.proto.cloud.ProtoInfo.Module\x12\x35\n\x0e\x63ontinue_clean\x18\x04 \x01(\x0b\x32\x1d.proto.cloud.ProtoInfo.Module\x12/\n\x08\x63ut_hair\x18\x05 \x01(\x0b\x32\x1d.proto.cloud.ProtoInfo.Module\x12-\n\x06timing\x18\x06 \x01(\x0b\x32\x1d.proto.cloud.ProtoInfo.Module\x1a*\n\x06Module\x12\x0f\n\x07version\x18\x01 \x01(\r\x12\x0f\n\x07options\x18\x02 \x01(\r\"2\n\x14\x43ollectDustOptionBit\x12\x1a\n\x16\x43OLLECT_DUST_APP_START\x10\x00\"c\n\x12MapFormatOptionBit\x12\x14\n\x10MAP_FORMAT_ANGLE\x10\x00\x12\x1a\n\x16MAP_FORMAT_RESERVE_MAP\x10\x01\x12\x1b\n\x17MAP_FORMAT_DEFAULT_NAME\x10\x02\"2\n\x16\x43ontinueCleanOptionBit\x12\x18\n\x14SMART_CONTINUE_CLEAN\x10\x00\"L\n\x0fTimingOptionBit\x12\x1f\n\x1bSCHEDULE_ROOMS_CLEAN_CUSTOM\x10\x00\x12\x18\n\x14SCHEDULE_SCENE_CLEAN\x10\x01\"\x81\x02\n\x0b\x41ppFunction\x12\x33\n\nmulti_maps\x18\x02 \x01(\x0b\x32\x1f.proto.cloud.AppFunction.Module\x12\x35\n\x0coptimization\x18\x03 \x01(\x0b\x32\x1f.proto.cloud.AppFunction.Module\x1a*\n\x06Module\x12\x0f\n\x07version\x18\x01 \x01(\r\x12\x0f\n\x07options\x18\x02 \x01(\r\"+\n\x14MultiMapsFunctionBit\x12\x13\n\x0fREMIND_MAP_SAVE\x10\x00\"-\n\x17OptimizationFunctionBit\x12\x12\n\x0ePATH_HIDE_TYPE\x10\x00*%\n\x06Global\x12\x08\n\x04NONE\x10\x00\x12\x11\n\rPROTO_VERSION\x10\x01\x62\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'proto.cloud.version_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _GLOBAL._serialized_start=922 + _GLOBAL._serialized_end=959 + _PROTOINFO._serialized_start=43 + _PROTOINFO._serialized_end=660 + _PROTOINFO_MODULE._serialized_start=335 + _PROTOINFO_MODULE._serialized_end=377 + _PROTOINFO_COLLECTDUSTOPTIONBIT._serialized_start=379 + _PROTOINFO_COLLECTDUSTOPTIONBIT._serialized_end=429 + _PROTOINFO_MAPFORMATOPTIONBIT._serialized_start=431 + _PROTOINFO_MAPFORMATOPTIONBIT._serialized_end=530 + _PROTOINFO_CONTINUECLEANOPTIONBIT._serialized_start=532 + _PROTOINFO_CONTINUECLEANOPTIONBIT._serialized_end=582 + _PROTOINFO_TIMINGOPTIONBIT._serialized_start=584 + _PROTOINFO_TIMINGOPTIONBIT._serialized_end=660 + _APPFUNCTION._serialized_start=663 + _APPFUNCTION._serialized_end=920 + _APPFUNCTION_MODULE._serialized_start=335 + _APPFUNCTION_MODULE._serialized_end=377 + _APPFUNCTION_MULTIMAPSFUNCTIONBIT._serialized_start=830 + _APPFUNCTION_MULTIMAPSFUNCTIONBIT._serialized_end=873 + _APPFUNCTION_OPTIMIZATIONFUNCTIONBIT._serialized_start=875 + _APPFUNCTION_OPTIMIZATIONFUNCTIONBIT._serialized_end=920 +# @@protoc_insertion_point(module_scope) diff --git a/proto-reference/version_pb2.pyi b/proto-reference/version_pb2.pyi new file mode 100644 index 0000000..a7e91fc --- /dev/null +++ b/proto-reference/version_pb2.pyi @@ -0,0 +1,70 @@ +from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Mapping as _Mapping, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor +NONE: Global +PROTO_VERSION: Global + +class AppFunction(_message.Message): + __slots__ = ["multi_maps", "optimization"] + class MultiMapsFunctionBit(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + class OptimizationFunctionBit(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + class Module(_message.Message): + __slots__ = ["options", "version"] + OPTIONS_FIELD_NUMBER: _ClassVar[int] + VERSION_FIELD_NUMBER: _ClassVar[int] + options: int + version: int + def __init__(self, version: _Optional[int] = ..., options: _Optional[int] = ...) -> None: ... + MULTI_MAPS_FIELD_NUMBER: _ClassVar[int] + OPTIMIZATION_FIELD_NUMBER: _ClassVar[int] + PATH_HIDE_TYPE: AppFunction.OptimizationFunctionBit + REMIND_MAP_SAVE: AppFunction.MultiMapsFunctionBit + multi_maps: AppFunction.Module + optimization: AppFunction.Module + def __init__(self, multi_maps: _Optional[_Union[AppFunction.Module, _Mapping]] = ..., optimization: _Optional[_Union[AppFunction.Module, _Mapping]] = ...) -> None: ... + +class ProtoInfo(_message.Message): + __slots__ = ["collect_dust", "continue_clean", "cut_hair", "global_verison", "map_format", "timing"] + class CollectDustOptionBit(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + class ContinueCleanOptionBit(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + class MapFormatOptionBit(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + class TimingOptionBit(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + class Module(_message.Message): + __slots__ = ["options", "version"] + OPTIONS_FIELD_NUMBER: _ClassVar[int] + VERSION_FIELD_NUMBER: _ClassVar[int] + options: int + version: int + def __init__(self, version: _Optional[int] = ..., options: _Optional[int] = ...) -> None: ... + COLLECT_DUST_APP_START: ProtoInfo.CollectDustOptionBit + COLLECT_DUST_FIELD_NUMBER: _ClassVar[int] + CONTINUE_CLEAN_FIELD_NUMBER: _ClassVar[int] + CUT_HAIR_FIELD_NUMBER: _ClassVar[int] + GLOBAL_VERISON_FIELD_NUMBER: _ClassVar[int] + MAP_FORMAT_ANGLE: ProtoInfo.MapFormatOptionBit + MAP_FORMAT_DEFAULT_NAME: ProtoInfo.MapFormatOptionBit + MAP_FORMAT_FIELD_NUMBER: _ClassVar[int] + MAP_FORMAT_RESERVE_MAP: ProtoInfo.MapFormatOptionBit + SCHEDULE_ROOMS_CLEAN_CUSTOM: ProtoInfo.TimingOptionBit + SCHEDULE_SCENE_CLEAN: ProtoInfo.TimingOptionBit + SMART_CONTINUE_CLEAN: ProtoInfo.ContinueCleanOptionBit + TIMING_FIELD_NUMBER: _ClassVar[int] + collect_dust: ProtoInfo.Module + continue_clean: ProtoInfo.Module + cut_hair: ProtoInfo.Module + global_verison: int + map_format: ProtoInfo.Module + timing: ProtoInfo.Module + def __init__(self, global_verison: _Optional[int] = ..., collect_dust: _Optional[_Union[ProtoInfo.Module, _Mapping]] = ..., map_format: _Optional[_Union[ProtoInfo.Module, _Mapping]] = ..., continue_clean: _Optional[_Union[ProtoInfo.Module, _Mapping]] = ..., cut_hair: _Optional[_Union[ProtoInfo.Module, _Mapping]] = ..., timing: _Optional[_Union[ProtoInfo.Module, _Mapping]] = ...) -> None: ... + +class Global(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] diff --git a/proto-reference/work_status.proto b/proto-reference/work_status.proto new file mode 100644 index 0000000..638f4f7 --- /dev/null +++ b/proto-reference/work_status.proto @@ -0,0 +1,252 @@ +syntax = "proto3"; + +// option optimize_for = LITE_RUNTIME; + +package proto.cloud; + +message WorkStatus { + // 刚开机时,不用传 mode,由手机 app 自行决定展示默认值 + // mode 由手机 app 下发或按键更改,回复值和上次相同 + message Mode { + enum Value { + AUTO = 0; // 全局自动清洁 + SELECT_ROOM = 1; // 选房清洁 + SELECT_ZONE = 2; // 选区清洁 + SPOT = 3; // 定点清洁 + FAST_MAPPING = 4; // 快速建图 + GLOBAL_CRUISE = 5; // 全屋巡航 + ZONES_CRUISE = 6; // 选区巡航 + POINT_CRUISE = 7; // 指哪巡航(精准到达) + SCENE = 8; // 场景清洁 + SMART_FOLLOW = 9; // 智能跟随 + } + Value value = 1; + } + Mode mode = 1; + + enum State { + STANDBY = 0; // 待机、建图暂停、暂停清洁、暂停回洗、暂停回充、暂停巡航、寻找机器人 + SLEEP = 1; // 休眠 + FAULT = 2; // 故障 + CHARGING = 3; // 升级中(未来可能考虑非充电状态也能升级)、充电中、充电完成、充电异常 + FAST_MAPPING = 4; // 定位中、快速建图 + CLEANING = 5; // 定位中、全局清洁、选区清洁、划区清洁、定点清洁、回洗拖布中、清洗拖布中 + REMOTE_CTRL = 6; // 遥控中 + GO_HOME = 7; // 定位中、回充中(包括清洁完成回充、低电回充) + CRUISIING = 8; // 定位中、巡航中 + } + State state = 2; + + // 某一时刻以下子状态可能存在一个或同时存在多个 + // 隐含规则:下面 message 如果不存在表示该子状态为 IDLE + + message Charging { + enum State { + DOING = 0; + DONE = 1; + ABNORMAL = 2; // 充电异常(充电弹片接触但无法充电) + } + State state = 1; + } + Charging charging = 3; + + message Upgrading { + enum State { + DOING = 0; + DONE = 1; + } + State state = 1; + } + Upgrading upgrading = 4; + + message Mapping { // 快速建图、清洁建图都会有这个 message + enum RunState { + DOING = 0; + PAUSED = 1; + } + RunState state = 1; + + enum Mode { + MAPPING = 0; // [兼容字段,4.1 废弃] + RELOCATING = 1; // [兼容字段,4.1 废弃] + } + Mode mode = 2; // [兼容字段,4.1 废弃] + } + Mapping mapping = 5; + + message Cleaning { + enum RunState { + DOING = 0; + PAUSED = 1; + } + RunState state = 1; + + enum Mode { + CLEANING = 0; + RELOCATING = 1; // [兼容字段,4.1 废弃] + GOTO_POS = 2; + POOP_CLEANING = 3; // 便便补扫 + } + Mode mode = 2; + bool scheduled_task = 3; // 是否在执行预约定时任务 + } + Cleaning cleaning = 6; + + message GoWash { + enum RunState { + DOING = 0; + PAUSED = 1; + } + RunState state = 1; + + enum Mode { + NAVIGATION = 0; // 回洗 + WASHING = 1; // 清洗拖布中 + DRYING = 2; // 烘干拖布中(严格意义不属于回洗) + } + Mode mode = 2; + } + GoWash go_wash = 7; + + message GoHome { + enum RunState { + DOING = 0; + PAUSED = 1; + } + RunState state = 1; + + enum Mode { + COMPLETE_TASK = 0; // 完成任务回充 + COLLECT_DUST = 1; // 中途集尘回充 + OTHRERS = 10; // 其他回充 + } + Mode mode = 2; + } + GoHome go_home = 8; + + message Cruisiing { + enum RunState { + DOING = 0; + PAUSED = 1; + } + RunState state = 1; + + enum Mode { + RELOCATING = 0; // [兼容字段,4.1 废弃] + CRUISIING = 1; // [兼容字段,4.1 废弃] + } + Mode mode = 2; // [兼容字段,4.1 废弃] + } + Cruisiing cruisiing = 9; + + message Relocating { + enum State { + DOING = 0; + } + State state = 1; + } + Relocating relocating = 10; + + message Breakpoint { + enum State { + DOING = 0; + } + State state = 1; + } + Breakpoint breakpoint = 11; + + message RollerBrushCleaning { + enum State { + DOING = 0; + } + State state = 1; + } + RollerBrushCleaning roller_brush_cleaning = 12; + + message SmartFollow { + enum State { + DOING = 0; + } + State state = 1; + + enum Mode { + FOLLOWING = 0; // 跟随中 + SEARCHING = 1; // 搜索目标中 + } + Mode mode = 2; + uint32 elapsed_time = 3; // 已执行时间 + uint32 area = 4; // 面积 + } + SmartFollow smart_follow = 13; + + message Station { + // 注水系统,操作对象:机器人水箱 + message WaterInjectionSystem { + enum State { + ADDING = 0; // 注水中 + EMPTYING = 1; // 排水中 + } + State state = 1; + } + WaterInjectionSystem water_injection_system = 1; + + // 集尘系统,操作对象:机器人集尘盒 + message DustCollectionSystem { + enum State { + EMPTYING = 0; // 排空中 + } + State state = 1; + } + DustCollectionSystem dust_collection_system = 2; + + // 洗和烘干系统,操作对象:机器人拖布 + message WashingDryingSystem { + enum State { + WASHING = 0; // 洗拖布中 + DRYING = 1; // 烘干拖布中 + } + State state = 1; + } + WashingDryingSystem washing_drying_system = 3; + + // 基站水箱状态 + message WaterTankState { + bool clear_water_adding = 1; // 清水添加中 + bool waste_water_recycling = 2; // 污水回收中 + } + WaterTankState water_tank_state = 4; + } + Station station = 14; // 从 x10 项目开始使用这里的基站状态,station dp 的状态保留但不做逻辑处理 + + message Scene { + uint32 id = 1; + + uint32 elapsed_time = 2; // 已执行时间,0 有效 + uint32 estimate_time = 3; // 预估完成时间,0 无效 + string name = 4; + + enum TaskMode { + AUTO = 0; // 全局自动清洁 + SELECT_ROOM = 1; // 选房清洁 + SELECT_ZONE = 2; // 选区清洁 + } + TaskMode task_mode = 5; + + // 后面这里加上场景的时间线 + // ... + } + Scene current_scene = 19; + + message Trigger { + enum Source { + UNKNOWN = 0; // 来源未知,如:刚开机 + APP = 1; // 手机 app 或者其他调试工具 + KEY = 2; // 按键,如:暂停、继续、停止、回充等 + TIMING = 3; // 定时,如:每天清洁、每周清洁等 + ROBOT = 4; // 机器人,如:低电、故障、清洁完成等 + REMOTE_CTRL = 5; // 遥控器, 如:遥控器按键 + } + Source source = 1; + } + Trigger trigger = 20; +} diff --git a/proto-reference/work_status_pb2.py b/proto-reference/work_status_pb2.py new file mode 100644 index 0000000..36964f7 --- /dev/null +++ b/proto-reference/work_status_pb2.py @@ -0,0 +1,111 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: proto/cloud/work_status.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1dproto/cloud/work_status.proto\x12\x0bproto.cloud\"\xc4 \n\nWorkStatus\x12*\n\x04mode\x18\x01 \x01(\x0b\x32\x1c.proto.cloud.WorkStatus.Mode\x12,\n\x05state\x18\x02 \x01(\x0e\x32\x1d.proto.cloud.WorkStatus.State\x12\x32\n\x08\x63harging\x18\x03 \x01(\x0b\x32 .proto.cloud.WorkStatus.Charging\x12\x34\n\tupgrading\x18\x04 \x01(\x0b\x32!.proto.cloud.WorkStatus.Upgrading\x12\x30\n\x07mapping\x18\x05 \x01(\x0b\x32\x1f.proto.cloud.WorkStatus.Mapping\x12\x32\n\x08\x63leaning\x18\x06 \x01(\x0b\x32 .proto.cloud.WorkStatus.Cleaning\x12/\n\x07go_wash\x18\x07 \x01(\x0b\x32\x1e.proto.cloud.WorkStatus.GoWash\x12/\n\x07go_home\x18\x08 \x01(\x0b\x32\x1e.proto.cloud.WorkStatus.GoHome\x12\x34\n\tcruisiing\x18\t \x01(\x0b\x32!.proto.cloud.WorkStatus.Cruisiing\x12\x36\n\nrelocating\x18\n \x01(\x0b\x32\".proto.cloud.WorkStatus.Relocating\x12\x36\n\nbreakpoint\x18\x0b \x01(\x0b\x32\".proto.cloud.WorkStatus.Breakpoint\x12J\n\x15roller_brush_cleaning\x18\x0c \x01(\x0b\x32+.proto.cloud.WorkStatus.RollerBrushCleaning\x12\x39\n\x0csmart_follow\x18\r \x01(\x0b\x32#.proto.cloud.WorkStatus.SmartFollow\x12\x30\n\x07station\x18\x0e \x01(\x0b\x32\x1f.proto.cloud.WorkStatus.Station\x12\x34\n\rcurrent_scene\x18\x13 \x01(\x0b\x32\x1d.proto.cloud.WorkStatus.Scene\x12\x30\n\x07trigger\x18\x14 \x01(\x0b\x32\x1f.proto.cloud.WorkStatus.Trigger\x1a\xdf\x01\n\x04Mode\x12\x31\n\x05value\x18\x01 \x01(\x0e\x32\".proto.cloud.WorkStatus.Mode.Value\"\xa3\x01\n\x05Value\x12\x08\n\x04\x41UTO\x10\x00\x12\x0f\n\x0bSELECT_ROOM\x10\x01\x12\x0f\n\x0bSELECT_ZONE\x10\x02\x12\x08\n\x04SPOT\x10\x03\x12\x10\n\x0c\x46\x41ST_MAPPING\x10\x04\x12\x11\n\rGLOBAL_CRUISE\x10\x05\x12\x10\n\x0cZONES_CRUISE\x10\x06\x12\x10\n\x0cPOINT_CRUISE\x10\x07\x12\t\n\x05SCENE\x10\x08\x12\x10\n\x0cSMART_FOLLOW\x10\t\x1am\n\x08\x43harging\x12\x35\n\x05state\x18\x01 \x01(\x0e\x32&.proto.cloud.WorkStatus.Charging.State\"*\n\x05State\x12\t\n\x05\x44OING\x10\x00\x12\x08\n\x04\x44ONE\x10\x01\x12\x0c\n\x08\x41\x42NORMAL\x10\x02\x1a\x61\n\tUpgrading\x12\x36\n\x05state\x18\x01 \x01(\x0e\x32\'.proto.cloud.WorkStatus.Upgrading.State\"\x1c\n\x05State\x12\t\n\x05\x44OING\x10\x00\x12\x08\n\x04\x44ONE\x10\x01\x1a\xbe\x01\n\x07Mapping\x12\x37\n\x05state\x18\x01 \x01(\x0e\x32(.proto.cloud.WorkStatus.Mapping.RunState\x12\x32\n\x04mode\x18\x02 \x01(\x0e\x32$.proto.cloud.WorkStatus.Mapping.Mode\"!\n\x08RunState\x12\t\n\x05\x44OING\x10\x00\x12\n\n\x06PAUSED\x10\x01\"#\n\x04Mode\x12\x0b\n\x07MAPPING\x10\x00\x12\x0e\n\nRELOCATING\x10\x01\x1a\xfb\x01\n\x08\x43leaning\x12\x38\n\x05state\x18\x01 \x01(\x0e\x32).proto.cloud.WorkStatus.Cleaning.RunState\x12\x33\n\x04mode\x18\x02 \x01(\x0e\x32%.proto.cloud.WorkStatus.Cleaning.Mode\x12\x16\n\x0escheduled_task\x18\x03 \x01(\x08\"!\n\x08RunState\x12\t\n\x05\x44OING\x10\x00\x12\n\n\x06PAUSED\x10\x01\"E\n\x04Mode\x12\x0c\n\x08\x43LEANING\x10\x00\x12\x0e\n\nRELOCATING\x10\x01\x12\x0c\n\x08GOTO_POS\x10\x02\x12\x11\n\rPOOP_CLEANING\x10\x03\x1a\xc7\x01\n\x06GoWash\x12\x36\n\x05state\x18\x01 \x01(\x0e\x32\'.proto.cloud.WorkStatus.GoWash.RunState\x12\x31\n\x04mode\x18\x02 \x01(\x0e\x32#.proto.cloud.WorkStatus.GoWash.Mode\"!\n\x08RunState\x12\t\n\x05\x44OING\x10\x00\x12\n\n\x06PAUSED\x10\x01\"/\n\x04Mode\x12\x0e\n\nNAVIGATION\x10\x00\x12\x0b\n\x07WASHING\x10\x01\x12\n\n\x06\x44RYING\x10\x02\x1a\xd0\x01\n\x06GoHome\x12\x36\n\x05state\x18\x01 \x01(\x0e\x32\'.proto.cloud.WorkStatus.GoHome.RunState\x12\x31\n\x04mode\x18\x02 \x01(\x0e\x32#.proto.cloud.WorkStatus.GoHome.Mode\"!\n\x08RunState\x12\t\n\x05\x44OING\x10\x00\x12\n\n\x06PAUSED\x10\x01\"8\n\x04Mode\x12\x11\n\rCOMPLETE_TASK\x10\x00\x12\x10\n\x0c\x43OLLECT_DUST\x10\x01\x12\x0b\n\x07OTHRERS\x10\n\x1a\xc6\x01\n\tCruisiing\x12\x39\n\x05state\x18\x01 \x01(\x0e\x32*.proto.cloud.WorkStatus.Cruisiing.RunState\x12\x34\n\x04mode\x18\x02 \x01(\x0e\x32&.proto.cloud.WorkStatus.Cruisiing.Mode\"!\n\x08RunState\x12\t\n\x05\x44OING\x10\x00\x12\n\n\x06PAUSED\x10\x01\"%\n\x04Mode\x12\x0e\n\nRELOCATING\x10\x00\x12\r\n\tCRUISIING\x10\x01\x1aY\n\nRelocating\x12\x37\n\x05state\x18\x01 \x01(\x0e\x32(.proto.cloud.WorkStatus.Relocating.State\"\x12\n\x05State\x12\t\n\x05\x44OING\x10\x00\x1aY\n\nBreakpoint\x12\x37\n\x05state\x18\x01 \x01(\x0e\x32(.proto.cloud.WorkStatus.Breakpoint.State\"\x12\n\x05State\x12\t\n\x05\x44OING\x10\x00\x1ak\n\x13RollerBrushCleaning\x12@\n\x05state\x18\x01 \x01(\x0e\x32\x31.proto.cloud.WorkStatus.RollerBrushCleaning.State\"\x12\n\x05State\x12\t\n\x05\x44OING\x10\x00\x1a\xdd\x01\n\x0bSmartFollow\x12\x38\n\x05state\x18\x01 \x01(\x0e\x32).proto.cloud.WorkStatus.SmartFollow.State\x12\x36\n\x04mode\x18\x02 \x01(\x0e\x32(.proto.cloud.WorkStatus.SmartFollow.Mode\x12\x14\n\x0c\x65lapsed_time\x18\x03 \x01(\r\x12\x0c\n\x04\x61rea\x18\x04 \x01(\r\"\x12\n\x05State\x12\t\n\x05\x44OING\x10\x00\"$\n\x04Mode\x12\r\n\tFOLLOWING\x10\x00\x12\r\n\tSEARCHING\x10\x01\x1a\xa5\x06\n\x07Station\x12T\n\x16water_injection_system\x18\x01 \x01(\x0b\x32\x34.proto.cloud.WorkStatus.Station.WaterInjectionSystem\x12T\n\x16\x64ust_collection_system\x18\x02 \x01(\x0b\x32\x34.proto.cloud.WorkStatus.Station.DustCollectionSystem\x12R\n\x15washing_drying_system\x18\x03 \x01(\x0b\x32\x33.proto.cloud.WorkStatus.Station.WashingDryingSystem\x12H\n\x10water_tank_state\x18\x04 \x01(\x0b\x32..proto.cloud.WorkStatus.Station.WaterTankState\x1a\x84\x01\n\x14WaterInjectionSystem\x12I\n\x05state\x18\x01 \x01(\x0e\x32:.proto.cloud.WorkStatus.Station.WaterInjectionSystem.State\"!\n\x05State\x12\n\n\x06\x41\x44\x44ING\x10\x00\x12\x0c\n\x08\x45MPTYING\x10\x01\x1ax\n\x14\x44ustCollectionSystem\x12I\n\x05state\x18\x01 \x01(\x0e\x32:.proto.cloud.WorkStatus.Station.DustCollectionSystem.State\"\x15\n\x05State\x12\x0c\n\x08\x45MPTYING\x10\x00\x1a\x81\x01\n\x13WashingDryingSystem\x12H\n\x05state\x18\x01 \x01(\x0e\x32\x39.proto.cloud.WorkStatus.Station.WashingDryingSystem.State\" \n\x05State\x12\x0b\n\x07WASHING\x10\x00\x12\n\n\x06\x44RYING\x10\x01\x1aK\n\x0eWaterTankState\x12\x1a\n\x12\x63lear_water_adding\x18\x01 \x01(\x08\x12\x1d\n\x15waste_water_recycling\x18\x02 \x01(\x08\x1a\xc1\x01\n\x05Scene\x12\n\n\x02id\x18\x01 \x01(\r\x12\x14\n\x0c\x65lapsed_time\x18\x02 \x01(\r\x12\x15\n\restimate_time\x18\x03 \x01(\r\x12\x0c\n\x04name\x18\x04 \x01(\t\x12\x39\n\ttask_mode\x18\x05 \x01(\x0e\x32&.proto.cloud.WorkStatus.Scene.TaskMode\"6\n\x08TaskMode\x12\x08\n\x04\x41UTO\x10\x00\x12\x0f\n\x0bSELECT_ROOM\x10\x01\x12\x0f\n\x0bSELECT_ZONE\x10\x02\x1a\x92\x01\n\x07Trigger\x12\x36\n\x06source\x18\x01 \x01(\x0e\x32&.proto.cloud.WorkStatus.Trigger.Source\"O\n\x06Source\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x07\n\x03\x41PP\x10\x01\x12\x07\n\x03KEY\x10\x02\x12\n\n\x06TIMING\x10\x03\x12\t\n\x05ROBOT\x10\x04\x12\x0f\n\x0bREMOTE_CTRL\x10\x05\"\x85\x01\n\x05State\x12\x0b\n\x07STANDBY\x10\x00\x12\t\n\x05SLEEP\x10\x01\x12\t\n\x05\x46\x41ULT\x10\x02\x12\x0c\n\x08\x43HARGING\x10\x03\x12\x10\n\x0c\x46\x41ST_MAPPING\x10\x04\x12\x0c\n\x08\x43LEANING\x10\x05\x12\x0f\n\x0bREMOTE_CTRL\x10\x06\x12\x0b\n\x07GO_HOME\x10\x07\x12\r\n\tCRUISIING\x10\x08\x62\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'proto.cloud.work_status_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _WORKSTATUS._serialized_start=47 + _WORKSTATUS._serialized_end=4211 + _WORKSTATUS_MODE._serialized_start=913 + _WORKSTATUS_MODE._serialized_end=1136 + _WORKSTATUS_MODE_VALUE._serialized_start=973 + _WORKSTATUS_MODE_VALUE._serialized_end=1136 + _WORKSTATUS_CHARGING._serialized_start=1138 + _WORKSTATUS_CHARGING._serialized_end=1247 + _WORKSTATUS_CHARGING_STATE._serialized_start=1205 + _WORKSTATUS_CHARGING_STATE._serialized_end=1247 + _WORKSTATUS_UPGRADING._serialized_start=1249 + _WORKSTATUS_UPGRADING._serialized_end=1346 + _WORKSTATUS_UPGRADING_STATE._serialized_start=1205 + _WORKSTATUS_UPGRADING_STATE._serialized_end=1233 + _WORKSTATUS_MAPPING._serialized_start=1349 + _WORKSTATUS_MAPPING._serialized_end=1539 + _WORKSTATUS_MAPPING_RUNSTATE._serialized_start=1469 + _WORKSTATUS_MAPPING_RUNSTATE._serialized_end=1502 + _WORKSTATUS_MAPPING_MODE._serialized_start=1504 + _WORKSTATUS_MAPPING_MODE._serialized_end=1539 + _WORKSTATUS_CLEANING._serialized_start=1542 + _WORKSTATUS_CLEANING._serialized_end=1793 + _WORKSTATUS_CLEANING_RUNSTATE._serialized_start=1469 + _WORKSTATUS_CLEANING_RUNSTATE._serialized_end=1502 + _WORKSTATUS_CLEANING_MODE._serialized_start=1724 + _WORKSTATUS_CLEANING_MODE._serialized_end=1793 + _WORKSTATUS_GOWASH._serialized_start=1796 + _WORKSTATUS_GOWASH._serialized_end=1995 + _WORKSTATUS_GOWASH_RUNSTATE._serialized_start=1469 + _WORKSTATUS_GOWASH_RUNSTATE._serialized_end=1502 + _WORKSTATUS_GOWASH_MODE._serialized_start=1948 + _WORKSTATUS_GOWASH_MODE._serialized_end=1995 + _WORKSTATUS_GOHOME._serialized_start=1998 + _WORKSTATUS_GOHOME._serialized_end=2206 + _WORKSTATUS_GOHOME_RUNSTATE._serialized_start=1469 + _WORKSTATUS_GOHOME_RUNSTATE._serialized_end=1502 + _WORKSTATUS_GOHOME_MODE._serialized_start=2150 + _WORKSTATUS_GOHOME_MODE._serialized_end=2206 + _WORKSTATUS_CRUISIING._serialized_start=2209 + _WORKSTATUS_CRUISIING._serialized_end=2407 + _WORKSTATUS_CRUISIING_RUNSTATE._serialized_start=1469 + _WORKSTATUS_CRUISIING_RUNSTATE._serialized_end=1502 + _WORKSTATUS_CRUISIING_MODE._serialized_start=2370 + _WORKSTATUS_CRUISIING_MODE._serialized_end=2407 + _WORKSTATUS_RELOCATING._serialized_start=2409 + _WORKSTATUS_RELOCATING._serialized_end=2498 + _WORKSTATUS_RELOCATING_STATE._serialized_start=1205 + _WORKSTATUS_RELOCATING_STATE._serialized_end=1223 + _WORKSTATUS_BREAKPOINT._serialized_start=2500 + _WORKSTATUS_BREAKPOINT._serialized_end=2589 + _WORKSTATUS_BREAKPOINT_STATE._serialized_start=1205 + _WORKSTATUS_BREAKPOINT_STATE._serialized_end=1223 + _WORKSTATUS_ROLLERBRUSHCLEANING._serialized_start=2591 + _WORKSTATUS_ROLLERBRUSHCLEANING._serialized_end=2698 + _WORKSTATUS_ROLLERBRUSHCLEANING_STATE._serialized_start=1205 + _WORKSTATUS_ROLLERBRUSHCLEANING_STATE._serialized_end=1223 + _WORKSTATUS_SMARTFOLLOW._serialized_start=2701 + _WORKSTATUS_SMARTFOLLOW._serialized_end=2922 + _WORKSTATUS_SMARTFOLLOW_STATE._serialized_start=1205 + _WORKSTATUS_SMARTFOLLOW_STATE._serialized_end=1223 + _WORKSTATUS_SMARTFOLLOW_MODE._serialized_start=2886 + _WORKSTATUS_SMARTFOLLOW_MODE._serialized_end=2922 + _WORKSTATUS_STATION._serialized_start=2925 + _WORKSTATUS_STATION._serialized_end=3730 + _WORKSTATUS_STATION_WATERINJECTIONSYSTEM._serialized_start=3267 + _WORKSTATUS_STATION_WATERINJECTIONSYSTEM._serialized_end=3399 + _WORKSTATUS_STATION_WATERINJECTIONSYSTEM_STATE._serialized_start=3366 + _WORKSTATUS_STATION_WATERINJECTIONSYSTEM_STATE._serialized_end=3399 + _WORKSTATUS_STATION_DUSTCOLLECTIONSYSTEM._serialized_start=3401 + _WORKSTATUS_STATION_DUSTCOLLECTIONSYSTEM._serialized_end=3521 + _WORKSTATUS_STATION_DUSTCOLLECTIONSYSTEM_STATE._serialized_start=3500 + _WORKSTATUS_STATION_DUSTCOLLECTIONSYSTEM_STATE._serialized_end=3521 + _WORKSTATUS_STATION_WASHINGDRYINGSYSTEM._serialized_start=3524 + _WORKSTATUS_STATION_WASHINGDRYINGSYSTEM._serialized_end=3653 + _WORKSTATUS_STATION_WASHINGDRYINGSYSTEM_STATE._serialized_start=3621 + _WORKSTATUS_STATION_WASHINGDRYINGSYSTEM_STATE._serialized_end=3653 + _WORKSTATUS_STATION_WATERTANKSTATE._serialized_start=3655 + _WORKSTATUS_STATION_WATERTANKSTATE._serialized_end=3730 + _WORKSTATUS_SCENE._serialized_start=3733 + _WORKSTATUS_SCENE._serialized_end=3926 + _WORKSTATUS_SCENE_TASKMODE._serialized_start=3872 + _WORKSTATUS_SCENE_TASKMODE._serialized_end=3926 + _WORKSTATUS_TRIGGER._serialized_start=3929 + _WORKSTATUS_TRIGGER._serialized_end=4075 + _WORKSTATUS_TRIGGER_SOURCE._serialized_start=3996 + _WORKSTATUS_TRIGGER_SOURCE._serialized_end=4075 + _WORKSTATUS_STATE._serialized_start=4078 + _WORKSTATUS_STATE._serialized_end=4211 +# @@protoc_insertion_point(module_scope) diff --git a/proto-reference/work_status_pb2.pyi b/proto-reference/work_status_pb2.pyi new file mode 100644 index 0000000..ec6bea0 --- /dev/null +++ b/proto-reference/work_status_pb2.pyi @@ -0,0 +1,287 @@ +from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Mapping as _Mapping, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class WorkStatus(_message.Message): + __slots__ = ["breakpoint", "charging", "cleaning", "cruisiing", "current_scene", "go_home", "go_wash", "mapping", "mode", "relocating", "roller_brush_cleaning", "smart_follow", "state", "station", "trigger", "upgrading"] + class State(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + class Breakpoint(_message.Message): + __slots__ = ["state"] + class State(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + DOING: WorkStatus.Breakpoint.State + STATE_FIELD_NUMBER: _ClassVar[int] + state: WorkStatus.Breakpoint.State + def __init__(self, state: _Optional[_Union[WorkStatus.Breakpoint.State, str]] = ...) -> None: ... + class Charging(_message.Message): + __slots__ = ["state"] + class State(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + ABNORMAL: WorkStatus.Charging.State + DOING: WorkStatus.Charging.State + DONE: WorkStatus.Charging.State + STATE_FIELD_NUMBER: _ClassVar[int] + state: WorkStatus.Charging.State + def __init__(self, state: _Optional[_Union[WorkStatus.Charging.State, str]] = ...) -> None: ... + class Cleaning(_message.Message): + __slots__ = ["mode", "scheduled_task", "state"] + class Mode(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + class RunState(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + CLEANING: WorkStatus.Cleaning.Mode + DOING: WorkStatus.Cleaning.RunState + GOTO_POS: WorkStatus.Cleaning.Mode + MODE_FIELD_NUMBER: _ClassVar[int] + PAUSED: WorkStatus.Cleaning.RunState + POOP_CLEANING: WorkStatus.Cleaning.Mode + RELOCATING: WorkStatus.Cleaning.Mode + SCHEDULED_TASK_FIELD_NUMBER: _ClassVar[int] + STATE_FIELD_NUMBER: _ClassVar[int] + mode: WorkStatus.Cleaning.Mode + scheduled_task: bool + state: WorkStatus.Cleaning.RunState + def __init__(self, state: _Optional[_Union[WorkStatus.Cleaning.RunState, str]] = ..., mode: _Optional[_Union[WorkStatus.Cleaning.Mode, str]] = ..., scheduled_task: bool = ...) -> None: ... + class Cruisiing(_message.Message): + __slots__ = ["mode", "state"] + class Mode(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + class RunState(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + CRUISIING: WorkStatus.Cruisiing.Mode + DOING: WorkStatus.Cruisiing.RunState + MODE_FIELD_NUMBER: _ClassVar[int] + PAUSED: WorkStatus.Cruisiing.RunState + RELOCATING: WorkStatus.Cruisiing.Mode + STATE_FIELD_NUMBER: _ClassVar[int] + mode: WorkStatus.Cruisiing.Mode + state: WorkStatus.Cruisiing.RunState + def __init__(self, state: _Optional[_Union[WorkStatus.Cruisiing.RunState, str]] = ..., mode: _Optional[_Union[WorkStatus.Cruisiing.Mode, str]] = ...) -> None: ... + class GoHome(_message.Message): + __slots__ = ["mode", "state"] + class Mode(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + class RunState(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + COLLECT_DUST: WorkStatus.GoHome.Mode + COMPLETE_TASK: WorkStatus.GoHome.Mode + DOING: WorkStatus.GoHome.RunState + MODE_FIELD_NUMBER: _ClassVar[int] + OTHRERS: WorkStatus.GoHome.Mode + PAUSED: WorkStatus.GoHome.RunState + STATE_FIELD_NUMBER: _ClassVar[int] + mode: WorkStatus.GoHome.Mode + state: WorkStatus.GoHome.RunState + def __init__(self, state: _Optional[_Union[WorkStatus.GoHome.RunState, str]] = ..., mode: _Optional[_Union[WorkStatus.GoHome.Mode, str]] = ...) -> None: ... + class GoWash(_message.Message): + __slots__ = ["mode", "state"] + class Mode(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + class RunState(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + DOING: WorkStatus.GoWash.RunState + DRYING: WorkStatus.GoWash.Mode + MODE_FIELD_NUMBER: _ClassVar[int] + NAVIGATION: WorkStatus.GoWash.Mode + PAUSED: WorkStatus.GoWash.RunState + STATE_FIELD_NUMBER: _ClassVar[int] + WASHING: WorkStatus.GoWash.Mode + mode: WorkStatus.GoWash.Mode + state: WorkStatus.GoWash.RunState + def __init__(self, state: _Optional[_Union[WorkStatus.GoWash.RunState, str]] = ..., mode: _Optional[_Union[WorkStatus.GoWash.Mode, str]] = ...) -> None: ... + class Mapping(_message.Message): + __slots__ = ["mode", "state"] + class Mode(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + class RunState(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + DOING: WorkStatus.Mapping.RunState + MAPPING: WorkStatus.Mapping.Mode + MODE_FIELD_NUMBER: _ClassVar[int] + PAUSED: WorkStatus.Mapping.RunState + RELOCATING: WorkStatus.Mapping.Mode + STATE_FIELD_NUMBER: _ClassVar[int] + mode: WorkStatus.Mapping.Mode + state: WorkStatus.Mapping.RunState + def __init__(self, state: _Optional[_Union[WorkStatus.Mapping.RunState, str]] = ..., mode: _Optional[_Union[WorkStatus.Mapping.Mode, str]] = ...) -> None: ... + class Mode(_message.Message): + __slots__ = ["value"] + class Value(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + AUTO: WorkStatus.Mode.Value + FAST_MAPPING: WorkStatus.Mode.Value + GLOBAL_CRUISE: WorkStatus.Mode.Value + POINT_CRUISE: WorkStatus.Mode.Value + SCENE: WorkStatus.Mode.Value + SELECT_ROOM: WorkStatus.Mode.Value + SELECT_ZONE: WorkStatus.Mode.Value + SMART_FOLLOW: WorkStatus.Mode.Value + SPOT: WorkStatus.Mode.Value + VALUE_FIELD_NUMBER: _ClassVar[int] + ZONES_CRUISE: WorkStatus.Mode.Value + value: WorkStatus.Mode.Value + def __init__(self, value: _Optional[_Union[WorkStatus.Mode.Value, str]] = ...) -> None: ... + class Relocating(_message.Message): + __slots__ = ["state"] + class State(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + DOING: WorkStatus.Relocating.State + STATE_FIELD_NUMBER: _ClassVar[int] + state: WorkStatus.Relocating.State + def __init__(self, state: _Optional[_Union[WorkStatus.Relocating.State, str]] = ...) -> None: ... + class RollerBrushCleaning(_message.Message): + __slots__ = ["state"] + class State(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + DOING: WorkStatus.RollerBrushCleaning.State + STATE_FIELD_NUMBER: _ClassVar[int] + state: WorkStatus.RollerBrushCleaning.State + def __init__(self, state: _Optional[_Union[WorkStatus.RollerBrushCleaning.State, str]] = ...) -> None: ... + class Scene(_message.Message): + __slots__ = ["elapsed_time", "estimate_time", "id", "name", "task_mode"] + class TaskMode(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + AUTO: WorkStatus.Scene.TaskMode + ELAPSED_TIME_FIELD_NUMBER: _ClassVar[int] + ESTIMATE_TIME_FIELD_NUMBER: _ClassVar[int] + ID_FIELD_NUMBER: _ClassVar[int] + NAME_FIELD_NUMBER: _ClassVar[int] + SELECT_ROOM: WorkStatus.Scene.TaskMode + SELECT_ZONE: WorkStatus.Scene.TaskMode + TASK_MODE_FIELD_NUMBER: _ClassVar[int] + elapsed_time: int + estimate_time: int + id: int + name: str + task_mode: WorkStatus.Scene.TaskMode + def __init__(self, id: _Optional[int] = ..., elapsed_time: _Optional[int] = ..., estimate_time: _Optional[int] = ..., name: _Optional[str] = ..., task_mode: _Optional[_Union[WorkStatus.Scene.TaskMode, str]] = ...) -> None: ... + class SmartFollow(_message.Message): + __slots__ = ["area", "elapsed_time", "mode", "state"] + class Mode(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + class State(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + AREA_FIELD_NUMBER: _ClassVar[int] + DOING: WorkStatus.SmartFollow.State + ELAPSED_TIME_FIELD_NUMBER: _ClassVar[int] + FOLLOWING: WorkStatus.SmartFollow.Mode + MODE_FIELD_NUMBER: _ClassVar[int] + SEARCHING: WorkStatus.SmartFollow.Mode + STATE_FIELD_NUMBER: _ClassVar[int] + area: int + elapsed_time: int + mode: WorkStatus.SmartFollow.Mode + state: WorkStatus.SmartFollow.State + def __init__(self, state: _Optional[_Union[WorkStatus.SmartFollow.State, str]] = ..., mode: _Optional[_Union[WorkStatus.SmartFollow.Mode, str]] = ..., elapsed_time: _Optional[int] = ..., area: _Optional[int] = ...) -> None: ... + class Station(_message.Message): + __slots__ = ["dust_collection_system", "washing_drying_system", "water_injection_system", "water_tank_state"] + class DustCollectionSystem(_message.Message): + __slots__ = ["state"] + class State(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + EMPTYING: WorkStatus.Station.DustCollectionSystem.State + STATE_FIELD_NUMBER: _ClassVar[int] + state: WorkStatus.Station.DustCollectionSystem.State + def __init__(self, state: _Optional[_Union[WorkStatus.Station.DustCollectionSystem.State, str]] = ...) -> None: ... + class WashingDryingSystem(_message.Message): + __slots__ = ["state"] + class State(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + DRYING: WorkStatus.Station.WashingDryingSystem.State + STATE_FIELD_NUMBER: _ClassVar[int] + WASHING: WorkStatus.Station.WashingDryingSystem.State + state: WorkStatus.Station.WashingDryingSystem.State + def __init__(self, state: _Optional[_Union[WorkStatus.Station.WashingDryingSystem.State, str]] = ...) -> None: ... + class WaterInjectionSystem(_message.Message): + __slots__ = ["state"] + class State(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + ADDING: WorkStatus.Station.WaterInjectionSystem.State + EMPTYING: WorkStatus.Station.WaterInjectionSystem.State + STATE_FIELD_NUMBER: _ClassVar[int] + state: WorkStatus.Station.WaterInjectionSystem.State + def __init__(self, state: _Optional[_Union[WorkStatus.Station.WaterInjectionSystem.State, str]] = ...) -> None: ... + class WaterTankState(_message.Message): + __slots__ = ["clear_water_adding", "waste_water_recycling"] + CLEAR_WATER_ADDING_FIELD_NUMBER: _ClassVar[int] + WASTE_WATER_RECYCLING_FIELD_NUMBER: _ClassVar[int] + clear_water_adding: bool + waste_water_recycling: bool + def __init__(self, clear_water_adding: bool = ..., waste_water_recycling: bool = ...) -> None: ... + DUST_COLLECTION_SYSTEM_FIELD_NUMBER: _ClassVar[int] + WASHING_DRYING_SYSTEM_FIELD_NUMBER: _ClassVar[int] + WATER_INJECTION_SYSTEM_FIELD_NUMBER: _ClassVar[int] + WATER_TANK_STATE_FIELD_NUMBER: _ClassVar[int] + dust_collection_system: WorkStatus.Station.DustCollectionSystem + washing_drying_system: WorkStatus.Station.WashingDryingSystem + water_injection_system: WorkStatus.Station.WaterInjectionSystem + water_tank_state: WorkStatus.Station.WaterTankState + def __init__(self, water_injection_system: _Optional[_Union[WorkStatus.Station.WaterInjectionSystem, _Mapping]] = ..., dust_collection_system: _Optional[_Union[WorkStatus.Station.DustCollectionSystem, _Mapping]] = ..., washing_drying_system: _Optional[_Union[WorkStatus.Station.WashingDryingSystem, _Mapping]] = ..., water_tank_state: _Optional[_Union[WorkStatus.Station.WaterTankState, _Mapping]] = ...) -> None: ... + class Trigger(_message.Message): + __slots__ = ["source"] + class Source(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + APP: WorkStatus.Trigger.Source + KEY: WorkStatus.Trigger.Source + REMOTE_CTRL: WorkStatus.Trigger.Source + ROBOT: WorkStatus.Trigger.Source + SOURCE_FIELD_NUMBER: _ClassVar[int] + TIMING: WorkStatus.Trigger.Source + UNKNOWN: WorkStatus.Trigger.Source + source: WorkStatus.Trigger.Source + def __init__(self, source: _Optional[_Union[WorkStatus.Trigger.Source, str]] = ...) -> None: ... + class Upgrading(_message.Message): + __slots__ = ["state"] + class State(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + DOING: WorkStatus.Upgrading.State + DONE: WorkStatus.Upgrading.State + STATE_FIELD_NUMBER: _ClassVar[int] + state: WorkStatus.Upgrading.State + def __init__(self, state: _Optional[_Union[WorkStatus.Upgrading.State, str]] = ...) -> None: ... + BREAKPOINT_FIELD_NUMBER: _ClassVar[int] + CHARGING: WorkStatus.State + CHARGING_FIELD_NUMBER: _ClassVar[int] + CLEANING: WorkStatus.State + CLEANING_FIELD_NUMBER: _ClassVar[int] + CRUISIING: WorkStatus.State + CRUISIING_FIELD_NUMBER: _ClassVar[int] + CURRENT_SCENE_FIELD_NUMBER: _ClassVar[int] + FAST_MAPPING: WorkStatus.State + FAULT: WorkStatus.State + GO_HOME: WorkStatus.State + GO_HOME_FIELD_NUMBER: _ClassVar[int] + GO_WASH_FIELD_NUMBER: _ClassVar[int] + MAPPING_FIELD_NUMBER: _ClassVar[int] + MODE_FIELD_NUMBER: _ClassVar[int] + RELOCATING_FIELD_NUMBER: _ClassVar[int] + REMOTE_CTRL: WorkStatus.State + ROLLER_BRUSH_CLEANING_FIELD_NUMBER: _ClassVar[int] + SLEEP: WorkStatus.State + SMART_FOLLOW_FIELD_NUMBER: _ClassVar[int] + STANDBY: WorkStatus.State + STATE_FIELD_NUMBER: _ClassVar[int] + STATION_FIELD_NUMBER: _ClassVar[int] + TRIGGER_FIELD_NUMBER: _ClassVar[int] + UPGRADING_FIELD_NUMBER: _ClassVar[int] + breakpoint: WorkStatus.Breakpoint + charging: WorkStatus.Charging + cleaning: WorkStatus.Cleaning + cruisiing: WorkStatus.Cruisiing + current_scene: WorkStatus.Scene + go_home: WorkStatus.GoHome + go_wash: WorkStatus.GoWash + mapping: WorkStatus.Mapping + mode: WorkStatus.Mode + relocating: WorkStatus.Relocating + roller_brush_cleaning: WorkStatus.RollerBrushCleaning + smart_follow: WorkStatus.SmartFollow + state: WorkStatus.State + station: WorkStatus.Station + trigger: WorkStatus.Trigger + upgrading: WorkStatus.Upgrading + def __init__(self, mode: _Optional[_Union[WorkStatus.Mode, _Mapping]] = ..., state: _Optional[_Union[WorkStatus.State, str]] = ..., charging: _Optional[_Union[WorkStatus.Charging, _Mapping]] = ..., upgrading: _Optional[_Union[WorkStatus.Upgrading, _Mapping]] = ..., mapping: _Optional[_Union[WorkStatus.Mapping, _Mapping]] = ..., cleaning: _Optional[_Union[WorkStatus.Cleaning, _Mapping]] = ..., go_wash: _Optional[_Union[WorkStatus.GoWash, _Mapping]] = ..., go_home: _Optional[_Union[WorkStatus.GoHome, _Mapping]] = ..., cruisiing: _Optional[_Union[WorkStatus.Cruisiing, _Mapping]] = ..., relocating: _Optional[_Union[WorkStatus.Relocating, _Mapping]] = ..., breakpoint: _Optional[_Union[WorkStatus.Breakpoint, _Mapping]] = ..., roller_brush_cleaning: _Optional[_Union[WorkStatus.RollerBrushCleaning, _Mapping]] = ..., smart_follow: _Optional[_Union[WorkStatus.SmartFollow, _Mapping]] = ..., station: _Optional[_Union[WorkStatus.Station, _Mapping]] = ..., current_scene: _Optional[_Union[WorkStatus.Scene, _Mapping]] = ..., trigger: _Optional[_Union[WorkStatus.Trigger, _Mapping]] = ...) -> None: ... From a6978515fce26787ad8215bdddad31af4831df56 Mon Sep 17 00:00:00 2001 From: Jonathan Thompson Date: Thu, 22 Jan 2026 23:21:31 +0000 Subject: [PATCH 03/25] Add detail to CLAUDE.md on what proto-reference is Claude explination for proto-reference --- CLAUDE.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/CLAUDE.md b/CLAUDE.md index 26c71f7..a582148 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -68,6 +68,22 @@ RobovacCommand.MODE: { Device responses use case-insensitive matching - "AUTO", "auto", "Auto" all resolve correctly. +## Proto Reference (Reference Only) + +The `proto-reference/` directory contains Protocol Buffer definitions that document the communication protocol used by newer Eufy vacuums. **This is reference material only and is not part of the Home Assistant integration.** + +Key proto files: + +- **`control.proto`**: Cleaning commands (auto, room, zone, spot, cruise, goto) via `ModeCtrlRequest` +- **`work_status.proto`**: Device state machine with nested sub-states (cleaning, charging, washing, drying) +- **`clean_param.proto`**: Cleaning parameters (fan suction, mop level, carpet strategy, clean type) +- **`map_manage.proto`**: Map data structures (pixels, room outlines, restricted zones) +- **`station.proto`**: Docking station config (dust collection, mop washing/drying, water levels) +- **`consumable.proto`**: Part wear tracking (brushes, filters, mop, dust bag in hours) +- **`error_code.proto`**: Error/warning reporting with obstacle detection (e.g., poop detection) + +These protos use the `proto.cloud` package and include Chinese comments from original development. The generated `*_pb2.py` files are Python protobuf outputs. Coordinates use centimeters (meters × 100). + ## Adding a New Vacuum Model 1. Create `custom_components/robovac/vacuums/TXXX.py` with features and commands From ef132023c6576930db976886ba4ba5ae8ac2642a Mon Sep 17 00:00:00 2001 From: Jonathan Thompson Date: Thu, 22 Jan 2026 23:22:43 +0000 Subject: [PATCH 04/25] English translation of Chinese proto Claude Code translations of Chinese to english, first pass, I ran out of tokens. --- proto-reference/analysis.proto | 166 ++++----- proto-reference/app_device_info.proto | 42 +-- proto-reference/ble.proto | 78 ++-- proto-reference/clean_param.proto | 46 +-- proto-reference/clean_record.proto | 118 +++--- proto-reference/clean_record_wrap.proto | 6 +- proto-reference/clean_statistics.proto | 20 +- proto-reference/common.proto | 24 +- proto-reference/consumable.proto | 24 +- proto-reference/control.proto | 124 +++---- proto-reference/debug.proto | 18 +- proto-reference/error_code.proto | 28 +- .../error_code_list_standard.proto | 348 +++++++++--------- proto-reference/error_code_list_t2080.proto | 180 ++++----- proto-reference/error_code_list_t2265.proto | 124 +++---- proto-reference/error_code_list_t2320.proto | 136 +++---- proto-reference/keepalive.proto | 4 +- proto-reference/map_edit.proto | 48 +-- proto-reference/map_manage.proto | 26 +- proto-reference/media_manager.proto | 38 +- proto-reference/multi_maps.proto | 20 +- proto-reference/p2pdata.proto | 120 +++--- proto-reference/scene.proto | 60 +-- proto-reference/socket.proto | 38 +- proto-reference/station.proto | 148 ++++---- proto-reference/stream.proto | 318 ++++++++-------- proto-reference/stream_wrap.proto | 4 +- proto-reference/timing.proto | 74 ++-- proto-reference/undisturbed.proto | 4 +- proto-reference/unisetting.proto | 86 ++--- proto-reference/universal_data.proto | 2 +- proto-reference/upgrade.proto | 30 +- proto-reference/version.proto | 48 +-- proto-reference/work_status.proto | 136 +++---- 34 files changed, 1343 insertions(+), 1343 deletions(-) diff --git a/proto-reference/analysis.proto b/proto-reference/analysis.proto index 464f02b..5f104b5 100644 --- a/proto-reference/analysis.proto +++ b/proto-reference/analysis.proto @@ -15,40 +15,40 @@ message AnalysisInternalStatus { message AnalysisStatistics { // Cleaning record, reported at the end of cleaning (including automatic and manual intervention). message CleanRecord { - uint32 clean_id = 1; // 清洁id,每次清洁id++,id从1开始,0为无效. + uint32 clean_id = 1; // 清洁id,每次清洁id++,id从1开始,0为无效. [EN: Cleaning ID, increments with each cleaning, starts from 1, 0 is invalid.] - bool result = 2; // 清洁结果,true - 成功,反之失败 + bool result = 2; // 清洁结果,true - 成功,反之失败 [EN: Cleaning result, true - success, otherwise failure] enum FailCode { - UNKNOW = 0; // 未知原因,下面原因都不是 + UNKNOW = 0; // 未知原因,下面原因都不是 [EN: Unknown reason, none of the reasons below] /** - 清洁过程机器原因触发异常导致停机,用户介入恢复清洁并成功后也判断为清洁失败; - 下面情况也算: - 脱困失败; - 断点续扫回充失败; - 回洗失败; + 清洁过程机器原因触发异常导致停机,用户介入恢复清洁并成功后也判断为清洁失败; [EN: Machine-triggered exception during cleaning causing shutdown; even if user intervenes to resume and complete cleaning, it's still considered a failure;] + 下面情况也算: [EN: The following situations also count:] + 脱困失败; [EN: Escape failure;] + 断点续扫回充失败; [EN: Resume cleaning return-to-charge failure;] + 回洗失败; [EN: Return-to-wash failure;] */ ROBOT_FAULT = 1; /** - 不受机器控制的报警,比如水箱满、托盘不在位等 + 不受机器控制的报警,比如水箱满、托盘不在位等 [EN: Alarms not controlled by the machine, such as water tank full, tray not in position, etc.] */ ROBOT_ALERT = 2; /** - 用户干预,比如清洁中暂停按回充(或直接搬到基站上)、清洁中切换模式等 + 用户干预,比如清洁中暂停按回充(或直接搬到基站上)、清洁中切换模式等 [EN: User intervention, such as pausing during cleaning and pressing return-to-charge (or moving directly to the station), switching modes during cleaning, etc.] */ MANUAL_BREAK = 3; } - FailCode fail_code = 3; // 失败原因,当 result == false 有效 + FailCode fail_code = 3; // 失败原因,当 result == false 有效 [EN: Failure reason, valid when result == false] enum Mode { - AUTO_CLEAN = 0; // 全局自动清洁 - SELECT_ROOMS_CLEAN = 1; // 选房清洁 - SELECT_ZONES_CLEAN = 2; // 选区清洁 - SPOT_CLEAN = 3; // 定点清洁 - FAST_MAPPING = 4; // 快速建图 + AUTO_CLEAN = 0; // 全局自动清洁 [EN: Global automatic cleaning] + SELECT_ROOMS_CLEAN = 1; // 选房清洁 [EN: Selected rooms cleaning] + SELECT_ZONES_CLEAN = 2; // 选区清洁 [EN: Selected zones cleaning] + SPOT_CLEAN = 3; // 定点清洁 [EN: Spot cleaning] + FAST_MAPPING = 4; // 快速建图 [EN: Fast mapping] } Mode mode = 4; @@ -59,138 +59,138 @@ message AnalysisStatistics { } Type type = 5; - uint64 start_time = 6; // 清洁开始时间,单位s,不带时区 - uint64 end_time = 7; // 清洁结束时间,单位s,不带时区 - uint32 clean_time = 8; // 清洁时间,去除断点回充/回洗、暂停时间,不包括回充导航和上座, 单位s - uint32 clean_area = 9; // 清洁面积,清洁过的栅格面积,单位 m2 - uint32 slam_area = 10; // slam建图面积,不包括障碍物面积,单位 m2 - uint32 map_id = 11; // 当前清洁地图的id - uint32 room_count = 12; // 当前清洁地图中房间总数 + uint64 start_time = 6; // 清洁开始时间,单位s,不带时区 [EN: Cleaning start time, unit: seconds, without timezone] + uint64 end_time = 7; // 清洁结束时间,单位s,不带时区 [EN: Cleaning end time, unit: seconds, without timezone] + uint32 clean_time = 8; // 清洁时间,去除断点回充/回洗、暂停时间,不包括回充导航和上座, 单位s [EN: Cleaning duration, excluding resume charging/washing and pause time, not including return-to-charge navigation and docking, unit: seconds] + uint32 clean_area = 9; // 清洁面积,清洁过的栅格面积,单位 m2 [EN: Cleaning area, grid area cleaned, unit: m2] + uint32 slam_area = 10; // slam建图面积,不包括障碍物面积,单位 m2 [EN: SLAM mapping area, excluding obstacle area, unit: m2] + uint32 map_id = 11; // 当前清洁地图的id [EN: Current cleaning map ID] + uint32 room_count = 12; // 当前清洁地图中房间总数 [EN: Total number of rooms in current cleaning map] message RollBrush { - // 单次清扫地毯过流次数,特指机器为了在长毛地毯上能正常清扫(没有卡住异物),采取的保护电机策略, - // 例如 L60 长毛地毯电流在 800mA-1100mA之间采取开1s停2s策略. + // 单次清扫地毯过流次数,特指机器为了在长毛地毯上能正常清扫(没有卡住异物),采取的保护电机策略, [EN: Single sweep carpet overcurrent count, specifically refers to the motor protection strategy adopted by the machine to sweep normally on long-pile carpet (without getting stuck on foreign objects),] + // 例如 L60 长毛地毯电流在 800mA-1100mA之间采取开1s停2s策略. [EN: for example, L60 adopts a 1s on, 2s off strategy when long-pile carpet current is between 800mA-1100mA.] uint32 protect_count = 1; - // 单次清扫堵转过流次数,堵转后机器采取类似开1s停3s策略. + // 单次清扫堵转过流次数,堵转后机器采取类似开1s停3s策略. [EN: Single sweep stall overcurrent count, after stall the machine adopts a strategy similar to 1s on, 3s off.] uint32 stalled_count = 2; } - RollBrush roll_brush = 13; // 单次清扫过程滚刷停转的次数 + RollBrush roll_brush = 13; // 单次清扫过程滚刷停转的次数 [EN: Number of times the roller brush stopped during a single sweep] } CleanRecord clean = 1; - // 回充记录,回充上座完成或回充失败时上报 + // 回充记录,回充上座完成或回充失败时上报 [EN: Return-to-charge record, reported when return-to-charge docking is complete or failed] message GoHomeRecord { - uint32 clean_id = 1; // 清洁id, 清洁后回充与CleanRecord中的clean_id相同,无清洁的回充设置为0 - bool result = 2; // 回充结果,true - 成功,反之失败 + uint32 clean_id = 1; // 清洁id, 清洁后回充与CleanRecord中的clean_id相同,无清洁的回充设置为0 [EN: Cleaning ID, same as clean_id in CleanRecord for return-to-charge after cleaning, set to 0 for return-to-charge without cleaning] + bool result = 2; // 回充结果,true - 成功,反之失败 [EN: Return-to-charge result, true - success, otherwise failure] enum FailCode { - UNKNOW = 0; // 未知,以下原因都不是. - MANUAL_BREAK = 1; // 人工手动停止 - NAVIGATE_FAIL = 2; // 导航到充电座附件失败 - ENTER_HOME_FAIL = 3; // 上座失败 + UNKNOW = 0; // 未知,以下原因都不是. [EN: Unknown, none of the following reasons.] + MANUAL_BREAK = 1; // 人工手动停止 [EN: Manual stop by user] + NAVIGATE_FAIL = 2; // 导航到充电座附件失败 [EN: Navigation to charging dock vicinity failed] + ENTER_HOME_FAIL = 3; // 上座失败 [EN: Docking failed] } - FailCode fail_code = 3; // 失败原因,当 result == false 有效 + FailCode fail_code = 3; // 失败原因,当 result == false 有效 [EN: Failure reason, valid when result == false] - uint64 power_level = 4; // 开始回充的电量百分比,0 - 100 - uint64 start_time = 5; // 回充开始时间,单位s,不带时区 - uint64 end_time = 6; // 回充结束时间,单位s,不带时区 + uint64 power_level = 4; // 开始回充的电量百分比,0 - 100 [EN: Battery percentage when starting return-to-charge, 0 - 100] + uint64 start_time = 5; // 回充开始时间,单位s,不带时区 [EN: Return-to-charge start time, unit: seconds, without timezone] + uint64 end_time = 6; // 回充结束时间,单位s,不带时区 [EN: Return-to-charge end time, unit: seconds, without timezone] } GoHomeRecord gohome = 2; - // 重定位记录,重定位成功或失败时上报 + // 重定位记录,重定位成功或失败时上报 [EN: Relocalization record, reported when relocalization succeeds or fails] message RelocateRecord { - uint32 clean_id = 1; // 清洁id, 清洁后回充与CleanRecord中的clean_id相同 - bool result = 2; // 重定位结果,true - 成功,反之失败 - uint32 map_count = 3; // 当前地图数量 - uint64 start_time = 4; // 重定位开始时间,单位s,不带时区 - uint64 end_time = 5; // 重定位结束时间,单位s,不带时区 + uint32 clean_id = 1; // 清洁id, 清洁后回充与CleanRecord中的clean_id相同 [EN: Cleaning ID, same as clean_id in CleanRecord for return-to-charge after cleaning] + bool result = 2; // 重定位结果,true - 成功,反之失败 [EN: Relocalization result, true - success, otherwise failure] + uint32 map_count = 3; // 当前地图数量 [EN: Current map count] + uint64 start_time = 4; // 重定位开始时间,单位s,不带时区 [EN: Relocalization start time, unit: seconds, without timezone] + uint64 end_time = 5; // 重定位结束时间,单位s,不带时区 [EN: Relocalization end time, unit: seconds, without timezone] } RelocateRecord relocate = 3; - // 集尘记录,集尘完成或失败时上报 + // 集尘记录,集尘完成或失败时上报 [EN: Dust collection record, reported when dust collection completes or fails] message CollectRecord { - uint32 clean_id = 1; // 清洁id, 清洁后回充与CleanRecord中的clean_id相同 - bool result = 2; // 集尘结果,true - 成功,反之失败 - uint64 start_time = 3; // 集尘开始时间,单位s,不带时区 + uint32 clean_id = 1; // 清洁id, 清洁后回充与CleanRecord中的clean_id相同 [EN: Cleaning ID, same as clean_id in CleanRecord for return-to-charge after cleaning] + bool result = 2; // 集尘结果,true - 成功,反之失败 [EN: Dust collection result, true - success, otherwise failure] + uint64 start_time = 3; // 集尘开始时间,单位s,不带时区 [EN: Dust collection start time, unit: seconds, without timezone] } CollectRecord collect = 4; - // 控制事件 + // 控制事件 [EN: Control event] message ControlEvent { - uint32 clean_id = 1; // 清洁id, 清洁后回充与CleanRecord中的clean_id相同,无清洁的回充设置为0 + uint32 clean_id = 1; // 清洁id, 清洁后回充与CleanRecord中的clean_id相同,无清洁的回充设置为0 [EN: Cleaning ID, same as clean_id in CleanRecord for return-to-charge after cleaning, set to 0 for return-to-charge without cleaning] enum Type { - AUTO_CLEAN = 0; // 自动清洁 - SPOT_CLEAN = 1; // 定点清洁 - GOHOME = 2; // 回充 - CLEAN_PAUSE = 3; // 清洁(包括自动清洁、选房、选区、定点)暂停 - CLEAN_RESUME = 4; // 清洁(包括自动清洁、选房、选区、定点)恢复 + AUTO_CLEAN = 0; // 自动清洁 [EN: Automatic cleaning] + SPOT_CLEAN = 1; // 定点清洁 [EN: Spot cleaning] + GOHOME = 2; // 回充 [EN: Return to charge] + CLEAN_PAUSE = 3; // 清洁(包括自动清洁、选房、选区、定点)暂停 [EN: Cleaning pause (including automatic cleaning, room selection, zone selection, spot)] + CLEAN_RESUME = 4; // 清洁(包括自动清洁、选房、选区、定点)恢复 [EN: Cleaning resume (including automatic cleaning, room selection, zone selection, spot)] } Type type = 2; enum Source { - KEY = 0; // 机身按键 - APP = 1; // APP控制 - TIMER = 2; // 预约定时 + KEY = 0; // 机身按键 [EN: Device button] + APP = 1; // APP控制 [EN: APP control] + TIMER = 2; // 预约定时 [EN: Scheduled timer] } Source source = 3; - uint64 timestamp = 4; // 时间戳,单位s,不带时区 + uint64 timestamp = 4; // 时间戳,单位s,不带时区 [EN: Timestamp, unit: seconds, without timezone] } ControlEvent ctrl_event = 5; - // 配网事件 + // 配网事件 [EN: Network configuration event] message DistributeEvent { message TimeStamp { - uint64 value = 1; // 时间戳,单位s,不带时区 + uint64 value = 1; // 时间戳,单位s,不带时区 [EN: Timestamp, unit: seconds, without timezone] } - TimeStamp timestamp = 1; // 配网结束时间,仅配网成功有这个字段 + TimeStamp timestamp = 1; // 配网结束时间,仅配网成功有这个字段 [EN: Network configuration end time, only present when configuration succeeds] enum Mode { AP = 0; // AP - BLE = 1; // 蓝牙 + BLE = 1; // 蓝牙 [EN: Bluetooth] } Mode mode = 2; enum Result { - E_OK = 0; // 成功 - E_SRV_ERR = 1; // 服务异常(连路由器超时) - E_AP_NOT_FOUND = 2; // 没有找到 ap - E_PASSWD_ERR = 3; // 密码错误 - E_DHCP_ERR = 4; // dhcp 错误 - E_GW_ERR = 5; // 网关错误 - E_DNS_ERR = 6; // dns 错误 - E_NET_ERR = 7; // 网络错误 + E_OK = 0; // 成功 [EN: Success] + E_SRV_ERR = 1; // 服务异常(连路由器超时) [EN: Service error (router connection timeout)] + E_AP_NOT_FOUND = 2; // 没有找到 ap [EN: AP not found] + E_PASSWD_ERR = 3; // 密码错误 [EN: Password error] + E_DHCP_ERR = 4; // dhcp 错误 [EN: DHCP error] + E_GW_ERR = 5; // 网关错误 [EN: Gateway error] + E_DNS_ERR = 6; // dns 错误 [EN: DNS error] + E_NET_ERR = 7; // 网络错误 [EN: Network error] } Result result = 3; - string software_version = 4; // 固件版本 + string software_version = 4; // 固件版本 [EN: Firmware version] string sn = 7; // sn - string mac = 5; // mac 地址 + string mac = 5; // mac 地址 [EN: MAC address] string uuid = 6; // uuid - string country_code = 8; // 国家地区码 https://datahub.io/core/country-list + string country_code = 8; // 国家地区码 https://datahub.io/core/country-list [EN: Country/region code https://datahub.io/core/country-list] string token = 9; // token } DistributeEvent distribute_event = 6; - // 电池信息 + // 电池信息 [EN: Battery information] message BatteryInfo { - uint64 update_time = 1; // 更新时间,单位s,不带时区 - uint32 show_level = 2; // 显示电量百分比,0 - 100 - uint32 real_level = 3; // 真实电量百分比,0 - 100 - uint32 voltage = 4; // 电压,单位mV - sint32 current = 5; // 电流,单位mA - repeated sint32 temperature = 6; // 温度,单位0.1摄氏度(支持单个或多个电池) + uint64 update_time = 1; // 更新时间,单位s,不带时区 [EN: Update time, unit: seconds, without timezone] + uint32 show_level = 2; // 显示电量百分比,0 - 100 [EN: Display battery percentage, 0 - 100] + uint32 real_level = 3; // 真实电量百分比,0 - 100 [EN: Actual battery percentage, 0 - 100] + uint32 voltage = 4; // 电压,单位mV [EN: Voltage, unit: mV] + sint32 current = 5; // 电流,单位mA [EN: Current, unit: mA] + repeated sint32 temperature = 6; // 温度,单位0.1摄氏度(支持单个或多个电池) [EN: Temperature, unit: 0.1 degrees Celsius (supports single or multiple batteries)] } BatteryInfo battery_info = 7; } message AnalysisResponse { - // 机器人内部状态信息,不做缓存,变化比较频繁时将只上传最后的状态 + // 机器人内部状态信息,不做缓存,变化比较频繁时将只上传最后的状态 [EN: Robot internal status information, not cached, will only upload the last status when changes are frequent] AnalysisInternalStatus internal_status = 1; - // 数据分析信息,做缓存,保证数据不丢失 + // 数据分析信息,做缓存,保证数据不丢失 [EN: Data analysis information, cached to ensure data is not lost] AnalysisStatistics statistics = 2; } diff --git a/proto-reference/app_device_info.proto b/proto-reference/app_device_info.proto index c653430..2fb7df4 100644 --- a/proto-reference/app_device_info.proto +++ b/proto-reference/app_device_info.proto @@ -6,8 +6,8 @@ package proto.cloud; import "proto/cloud/version.proto"; -// 手机 app 每次进入实时地图控制面板后有且仅下发一次 -// 手机 app 主用户和分享用户都需要发送这个消息,其中 user_id 必须填主用户的 +// 手机 app 每次进入实时地图控制面板后有且仅下发一次 [EN: Mobile app sends this exactly once each time entering the real-time map control panel] +// 手机 app 主用户和分享用户都需要发送这个消息,其中 user_id 必须填主用户的 [EN: Both main user and shared user of mobile app need to send this message, where user_id must be the main user's] message AppInfo { enum Platform { PF_OTHER = 0; @@ -17,38 +17,38 @@ message AppInfo { } Platform platform = 1; - string app_version = 2; // App 版本,如 "3.3.60" - string family_id = 3; // 主用户 family_id - string user_id = 4; // 主用户 user_id + string app_version = 2; // App 版本,如 "3.3.60" [EN: App version, e.g. "3.3.60"] + string family_id = 3; // 主用户 family_id [EN: Main user family_id] + string user_id = 4; // 主用户 user_id [EN: Main user user_id] enum DataCenter { - EU = 0; // 欧洲数据中心 - AZ = 1; // 美国数据中心 - AY = 2; // 亚洲数据中心 + EU = 0; // 欧洲数据中心 [EN: European data center] + AZ = 1; // 美国数据中心 [EN: US data center] + AY = 2; // 亚洲数据中心 [EN: Asian data center] } DataCenter data_center = 5; AppFunction app_function = 6; - string time_zone_id = 7; // 时区 id,如 "Asia/Shanghai" + string time_zone_id = 7; // 时区 id,如 "Asia/Shanghai" [EN: Timezone ID, e.g. "Asia/Shanghai"] } -// 机器上线时上报一次或者 ip、user_id 变更上报 +// 机器上线时上报一次或者 ip、user_id 变更上报 [EN: Reported once when device comes online or when ip/user_id changes] message DeviceInfo { - string product_name = 1; // 产品名称,如 eufy Clean xxx - string video_sn = 2; // 序列号(video 相关服务使用) - string device_mac = 3; // 设备 mac - string software = 4; // 软件版本,如 "1.2.3" - uint32 hardware = 5; // 硬件版本,如 2 - string wifi_name = 6; // 已连接的 wifi 名称 - string wifi_ip = 7; // 当前 wifi 的 ip - string last_user_id = 8; // 机器上存储的最新 user_id(用于 app 判断是否相同账户) + string product_name = 1; // 产品名称,如 eufy Clean xxx [EN: Product name, e.g. eufy Clean xxx] + string video_sn = 2; // 序列号(video 相关服务使用) [EN: Serial number (used by video-related services)] + string device_mac = 3; // 设备 mac [EN: Device MAC] + string software = 4; // 软件版本,如 "1.2.3" [EN: Software version, e.g. "1.2.3"] + uint32 hardware = 5; // 硬件版本,如 2 [EN: Hardware version, e.g. 2] + string wifi_name = 6; // 已连接的 wifi 名称 [EN: Connected WiFi name] + string wifi_ip = 7; // 当前 wifi 的 ip [EN: Current WiFi IP] + string last_user_id = 8; // 机器上存储的最新 user_id(用于 app 判断是否相同账户) [EN: Latest user_id stored on device (used by app to determine if same account)] message Station { - string software = 1; // 软件版本,如 "1.2.3" - uint32 hardware = 2; // 硬件版本,如 400 + string software = 1; // 软件版本,如 "1.2.3" [EN: Software version, e.g. "1.2.3"] + uint32 hardware = 2; // 硬件版本,如 400 [EN: Hardware version, e.g. 400] } - Station station = 11; // 基站信息(机器在基站开机才有这个字段) + Station station = 11; // 基站信息(机器在基站开机才有这个字段) [EN: Station information (this field exists only when device boots on station)] ProtoInfo proto_info = 12; } diff --git a/proto-reference/ble.proto b/proto-reference/ble.proto index 435e315..9a66fec 100644 --- a/proto-reference/ble.proto +++ b/proto-reference/ble.proto @@ -1,5 +1,5 @@ /** - * 蓝牙协议,通过 btgatt 进行通信; + * 蓝牙协议,通过 btgatt 进行通信; [EN: Bluetooth protocol, communicates via btgatt;] */ syntax = "proto3"; @@ -7,23 +7,23 @@ syntax = "proto3"; package proto.cloud; -// 手机 app 发给机器人 +// 手机 app 发给机器人 [EN: Mobile app sends to robot] message BtAppMsg { message GetProductInfo { - bool get = 1; // 该字段随意填入 + bool get = 1; // 该字段随意填入 [EN: This field can be filled arbitrarily] - // 手机端配网功能的版本 - // 设备根据获取的版本使用不同的配网方法 - // 目前:版本=0 蓝牙配网不加密 - // 版本=1 蓝牙配网的 ssid、passwd 使用 AesCbc128 加密 + // 手机端配网功能的版本 [EN: Mobile device network configuration feature version] + // 设备根据获取的版本使用不同的配网方法 [EN: Device uses different network configuration methods based on the version obtained] + // 目前:版本=0 蓝牙配网不加密 [EN: Currently: version=0 Bluetooth configuration without encryption] + // 版本=1 蓝牙配网的 ssid、passwd 使用 AesCbc128 加密 [EN: version=1 Bluetooth configuration ssid and passwd use AesCbc128 encryption] uint32 distribute_version = 2; message RemedyField { - uint32 distribute_version2 = 1; // distribute_version 必须传 0 时使用该字段 + uint32 distribute_version2 = 1; // distribute_version 必须传 0 时使用该字段 [EN: Use this field when distribute_version must be 0] } - RemedyField remedy_field = 3; // X10 Pro Omni 项目错误使用了 distribute_version 需要补救,其他项目不需要该字段 + RemedyField remedy_field = 3; // X10 Pro Omni 项目错误使用了 distribute_version 需要补救,其他项目不需要该字段 [EN: X10 Pro Omni project mistakenly used distribute_version and needs remedy, other projects don't need this field] - // WiFi 合规需要country code,如 CN、US、JP + // WiFi 合规需要country code,如 CN、US、JP [EN: WiFi compliance requires country code, e.g. CN, US, JP] message Country { string code = 1; // https://datahub.io/core/country-list } @@ -41,17 +41,17 @@ message BtAppMsg { string passwd = 2; string token = 3; string user_id = 4; - string time_zone_id = 5; // 时区 id,如 "Asia/Shanghai" + string time_zone_id = 5; // 时区 id,如 "Asia/Shanghai" [EN: Timezone ID, e.g. "Asia/Shanghai"] - string domain = 6; // 服务器域名,如 "https://vsaas-api-ci.eufylife.com" - string app_id = 7; // app id,如 "eufy_home" + string domain = 6; // 服务器域名,如 "https://vsaas-api-ci.eufylife.com" [EN: Server domain, e.g. "https://vsaas-api-ci.eufylife.com"] + string app_id = 7; // app id,如 "eufy_home" [EN: App ID, e.g. "eufy_home"] string house_id = 8; string dev_name = 9; string hub_name = 10; } Distribute distribute = 3; - // id 4 已不再使用 + // id 4 已不再使用 [EN: id 4 is no longer used] message Debug { string d_data = 1; @@ -59,32 +59,32 @@ message BtAppMsg { Debug req = 5; } -// 机器人发给手机 App +// 机器人发给手机 App [EN: Robot sends to mobile App] message BtRobotMsg { message ProductInfo { enum Result { E_OK = 0; E_FAIL = 1; } - Result ret = 1; // 该字段为 E_OK 时其他字段才有非零值 - string brand = 2; // 如 eufy - string code_name = 3; // 如 T2320 - string model = 4; // 如 mopper - string name = 5; // 如 Eufyclean M61 - string alisa_name = 6; // 如 Eufyclean M61 + Result ret = 1; // 该字段为 E_OK 时其他字段才有非零值 [EN: Other fields have non-zero values only when this field is E_OK] + string brand = 2; // 如 eufy [EN: e.g. eufy] + string code_name = 3; // 如 T2320 [EN: e.g. T2320] + string model = 4; // 如 mopper [EN: e.g. mopper] + string name = 5; // 如 Eufyclean M61 [EN: e.g. Eufyclean M61] + string alisa_name = 6; // 如 Eufyclean M61 [EN: e.g. Eufyclean M61] string cloud_pid = 7; - string mac = 8; // 使用 AesCbc128 加密 + string mac = 8; // 使用 AesCbc128 加密 [EN: Encrypted with AesCbc128] - // 机器端配网功能的版本 - // 手机 app 根据获取的版本使用不同的配网方法 - // 目前:版本=0 蓝牙配网不加密 - // 版本=1 蓝牙配网的 ssid、passwd 使用 AesCbc128 加密 + // 机器端配网功能的版本 [EN: Device-side network configuration feature version] + // 手机 app 根据获取的版本使用不同的配网方法 [EN: Mobile app uses different network configuration methods based on the version obtained] + // 目前:版本=0 蓝牙配网不加密 [EN: Currently: version=0 Bluetooth configuration without encryption] + // 版本=1 蓝牙配网的 ssid、passwd 使用 AesCbc128 加密 [EN: version=1 Bluetooth configuration ssid and passwd use AesCbc128 encryption] uint32 distribute_version = 10; message RemedyField { - uint32 distribute_version2 = 1; // distribute_version 必须传 0 时使用该字段 + uint32 distribute_version2 = 1; // distribute_version 必须传 0 时使用该字段 [EN: Use this field when distribute_version must be 0] } - RemedyField remedy_field = 11; // X10 Pro Omni 项目错误使用了 distribute_version 需要补救,其他项目不需要该字段 + RemedyField remedy_field = 11; // X10 Pro Omni 项目错误使用了 distribute_version 需要补救,其他项目不需要该字段 [EN: X10 Pro Omni project mistakenly used distribute_version and needs remedy, other projects don't need this field] } ProductInfo product_info = 1; @@ -99,21 +99,21 @@ message BtRobotMsg { message DistributeResult { enum Value { - E_OK = 0; // 成功 - E_SRV_ERR = 1; // 服务异常 - E_AP_NOT_FOUND = 2; // 没有找到 ap - E_PASSWD_ERR = 3; // 密码错误 - E_DHCP_ERR = 4; // dhcp 错误 - E_GW_ERR = 5; // 网关错误 - E_DNS_ERR = 6; // dns 错误 - E_NET_ERR = 7; // 网络错误 + E_OK = 0; // 成功 [EN: Success] + E_SRV_ERR = 1; // 服务异常 [EN: Service error] + E_AP_NOT_FOUND = 2; // 没有找到 ap [EN: AP not found] + E_PASSWD_ERR = 3; // 密码错误 [EN: Password error] + E_DHCP_ERR = 4; // dhcp 错误 [EN: DHCP error] + E_GW_ERR = 5; // 网关错误 [EN: Gateway error] + E_DNS_ERR = 6; // dns 错误 [EN: DNS error] + E_NET_ERR = 7; // 网络错误 [EN: Network error] } Value value = 1; - string mac = 2; // 使用 AesCbc128 加密 + string mac = 2; // 使用 AesCbc128 加密 [EN: Encrypted with AesCbc128] string pid = 3; string uuid = 4; // SN string authkey = 5; // chip_id - int32 dbm = 6; // 选择 ap 的信号强度 + int32 dbm = 6; // 选择 ap 的信号强度 [EN: Signal strength of selected AP] message AiotResult { int32 get_mqtt_info_ret = 1; @@ -125,7 +125,7 @@ message BtRobotMsg { } DistributeResult distribute_result = 3; - // id 4 已不再使用 + // id 4 已不再使用 [EN: id 4 is no longer used] message Debug { string d_data = 1; diff --git a/proto-reference/clean_param.proto b/proto-reference/clean_param.proto index 31c2edd..dd4d0e6 100644 --- a/proto-reference/clean_param.proto +++ b/proto-reference/clean_param.proto @@ -1,5 +1,5 @@ /** - * 清洁参数 Request 和 Response 协议; + * 清洁参数 Request 和 Response 协议;[EN: Cleaning parameters Request and Response protocol;] */ syntax = "proto3"; @@ -9,7 +9,7 @@ package proto.cloud; import "proto/cloud/common.proto"; message Fan { - enum Suction { // 风机吸力 + enum Suction { // 风机吸力 [EN: Fan suction power] QUIET = 0; STANDARD = 1; TURBO = 2; @@ -20,7 +20,7 @@ message Fan { } message MopMode { - enum Level { // 拖地档位 + enum Level { // 拖地档位 [EN: Mopping level] LOW = 0; MIDDLE = 1; HIGH = 2; @@ -28,19 +28,19 @@ message MopMode { Level level = 1; enum CornerClean { - NORMAL = 0; // 普通 - DEEP = 1; // 扭屁股动作 + NORMAL = 0; // 普通 [EN: Normal] + DEEP = 1; // 扭屁股动作 [EN: Twist butt motion] } CornerClean corner_clean = 2; } message CleanCarpet { enum Strategy { - AUTO_RAISE = 0; // 遇地毯自动抬升 - AVOID = 1; // 规避地毯 - IGNORE = 2; // 忽略(无视)地毯 + AUTO_RAISE = 0; // 遇地毯自动抬升 [EN: Auto raise when encountering carpet] + AVOID = 1; // 规避地毯 [EN: Avoid carpet] + IGNORE = 2; // 忽略(无视)地毯 [EN: Ignore carpet] } - Strategy strategy = 1; // 遇地毯策略 + Strategy strategy = 1; // 遇地毯策略 [EN: Carpet encounter strategy] } message CleanType { @@ -48,16 +48,16 @@ message CleanType { SWEEP_ONLY = 0; MOP_ONLY = 1; SWEEP_AND_MOP = 2; - SWEEP_THEN_MOP = 3; // 先扫后拖 + SWEEP_THEN_MOP = 3; // 先扫后拖 [EN: Sweep first then mop] } Value value = 1; } -message CleanExtent { // 清洁程度 - enum Value { // 注意和 app 上的显示顺序不一样 - NORMAL = 0; // 普通 - NARROW = 1; // 精(窄)扫/拖 - QUICK = 2; // 快速清理(只弓扫/拖,不沿边) +message CleanExtent { // 清洁程度 [EN: Cleaning extent] + enum Value { // 注意和 app 上的显示顺序不一样 [EN: Note the display order is different from the app] + NORMAL = 0; // 普通 [EN: Normal] + NARROW = 1; // 精(窄)扫/拖 [EN: Fine (narrow) sweep/mop] + QUICK = 2; // 快速清理(只弓扫/拖,不沿边) [EN: Quick clean (bow sweep/mop only, no edge following)] } Value value = 1; } @@ -65,19 +65,19 @@ message CleanExtent { // 清洁程度 message CleanTimes { uint32 auto_clean = 1; uint32 select_rooms = 2; - // id 3 已不再使用 + // id 3 已不再使用 [EN: id 3 is no longer used] uint32 spot_clean = 4; } -// 吸力档位 Fan 来自单独的 dp,不放在 CleanParam +// 吸力档位 Fan 来自单独的 dp,不放在 CleanParam [EN: Suction level Fan comes from a separate dp, not in CleanParam] message CleanParam { CleanType clean_type = 1; CleanCarpet clean_carpet = 2; CleanExtent clean_extent = 3; MopMode mop_mode = 4; - Switch smart_mode_sw = 5; // 智能省心模式开关 - Fan fan = 6; // 从 x10 项目开始使用这里的风机档位,旧项目使用单独 dp - uint32 clean_times = 7; // 清扫次数,非 0 有效 + Switch smart_mode_sw = 5; // 智能省心模式开关 [EN: Smart easy mode switch] + Fan fan = 6; // 从 x10 项目开始使用这里的风机档位,旧项目使用单独 dp [EN: From x10 project onwards use fan level here, old projects use separate dp] + uint32 clean_times = 7; // 清扫次数,非 0 有效 [EN: Cleaning times, valid when non-zero] } message CleanParamRequest { @@ -85,10 +85,10 @@ message CleanParamRequest { CleanParam area_clean_param = 2; } -// 清洁参数,需要保存 +// 清洁参数,需要保存 [EN: Cleaning parameters, need to save] message CleanParamResponse { CleanParam clean_param = 1; - CleanTimes clean_times = 2; // 总清扫次数. x10 项目后废弃 + CleanTimes clean_times = 2; // 总清扫次数. x10 项目后废弃 [EN: Total cleaning times. Deprecated after x10 project] CleanParam area_clean_param = 3; - CleanParam running_clean_param = 4; // 执行过程中使用的清洁参数(状态) + CleanParam running_clean_param = 4; // 执行过程中使用的清洁参数(状态) [EN: Cleaning parameters used during execution (status)] } diff --git a/proto-reference/clean_record.proto b/proto-reference/clean_record.proto index 2b03de1..5b0bc23 100644 --- a/proto-reference/clean_record.proto +++ b/proto-reference/clean_record.proto @@ -1,5 +1,5 @@ /** - * 清洁记录. + * 清洁记录. [EN: Cleaning records.] */ syntax = "proto3"; @@ -11,51 +11,51 @@ import "proto/cloud/clean_param.proto"; import "proto/cloud/stream.proto"; import "proto/cloud/p2pdata.proto"; -// 手机 app 优先获取 xxxRecordDesc -// CleanRecordDesc 数据格式: -// 0xAA 0x01 len(1 byte 数据段的长度) ... checksum(2 byte 除 checksum 外所有字节的和,高字节先发) -// CruiseRecordDesc 数据格式: -// 0xAA 0x02 len(1 byte 数据段的长度) ... checksum(2 byte 除 checksum 外所有字节的和,高字节先发) +// 手机 app 优先获取 xxxRecordDesc [EN: Mobile app prioritizes fetching xxxRecordDesc] +// CleanRecordDesc 数据格式: [EN: CleanRecordDesc data format:] +// 0xAA 0x01 len(1 byte 数据段的长度) ... checksum(2 byte 除 checksum 外所有字节的和,高字节先发) [EN: 0xAA 0x01 len(1 byte data segment length) ... checksum(2 byte sum of all bytes except checksum, high byte first)] +// CruiseRecordDesc 数据格式: [EN: CruiseRecordDesc data format:] +// 0xAA 0x02 len(1 byte 数据段的长度) ... checksum(2 byte 除 checksum 外所有字节的和,高字节先发) [EN: 0xAA 0x02 len(1 byte data segment length) ... checksum(2 byte sum of all bytes except checksum, high byte first)] message CleanRecordDesc { - uint64 start_time = 1; // 不加时区,单位: s - uint64 end_time = 2; // 不加时区,单位: s - uint32 duration = 3; // 清洁时长,单位:s - uint32 area = 4; // 清洁面积,单位: m2 - CleanType clean_type = 5; // 扫、拖、扫+拖 + uint64 start_time = 1; // 不加时区,单位: s [EN: Without timezone, unit: seconds] + uint64 end_time = 2; // 不加时区,单位: s [EN: Without timezone, unit: seconds] + uint32 duration = 3; // 清洁时长,单位:s [EN: Cleaning duration, unit: seconds] + uint32 area = 4; // 清洁面积,单位: m2 [EN: Cleaning area, unit: m2] + CleanType clean_type = 5; // 扫、拖、扫+拖 [EN: Sweep, mop, sweep+mop] enum FinishReason { - COMPLETED = 0; // 自动清扫完成 - MANUDAL = 1; // 人为停止 - LOW_POWER = 2; // 低电 - EXCEPTION = 3; // 异常中断(需要填充 Extra 中 error_code 或 warn_code) + COMPLETED = 0; // 自动清扫完成 [EN: Automatic cleaning completed] + MANUDAL = 1; // 人为停止 [EN: Manually stopped] + LOW_POWER = 2; // 低电 [EN: Low battery] + EXCEPTION = 3; // 异常中断(需要填充 Extra 中 error_code 或 warn_code) [EN: Exception interrupted (need to fill error_code or warn_code in Extra)] } FinishReason finish_reason = 6; message Extra { enum Mode { - AUTO = 0; // 全局自动清洁 - SELECT_ROOM = 1; // 选房清洁 - SELECT_ZONE = 2; // 选区清洁 - SPOT = 3; // 定点清洁 - SCHEDULE_AUTO_CLEAN = 4; // 预约自动清扫 - SCHEDULE_ROOMS_CLEAN = 5; // 预约房间清扫 + AUTO = 0; // 全局自动清洁 [EN: Global automatic cleaning] + SELECT_ROOM = 1; // 选房清洁 [EN: Selected rooms cleaning] + SELECT_ZONE = 2; // 选区清洁 [EN: Selected zones cleaning] + SPOT = 3; // 定点清洁 [EN: Spot cleaning] + SCHEDULE_AUTO_CLEAN = 4; // 预约自动清扫 [EN: Scheduled automatic cleaning] + SCHEDULE_ROOMS_CLEAN = 5; // 预约房间清扫 [EN: Scheduled rooms cleaning] } Mode mode = 1; - // MUS 功能(根据项目定义进行选配) - // bit-0: 执行过洗拖布 - // bit-1: 执行过烘干拖布 - // bit-2: 执行过集尘 - // bit-3: 执行过滚刷自清洁 + // MUS 功能(根据项目定义进行选配) [EN: MUS feature (optional based on project definition)] + // bit-0: 执行过洗拖布 [EN: bit-0: Mop washing executed] + // bit-1: 执行过烘干拖布 [EN: bit-1: Mop drying executed] + // bit-2: 执行过集尘 [EN: bit-2: Dust collection executed] + // bit-3: 执行过滚刷自清洁 [EN: bit-3: Roller brush self-cleaning executed] uint32 mus = 2; - // 清扫错误码,正常为 0 - // 值来自 error_code_list_xxx.proto + // 清扫错误码,正常为 0 [EN: Cleaning error code, 0 for normal] + // 值来自 error_code_list_xxx.proto [EN: Values from error_code_list_xxx.proto] uint32 error_code = 3; - // 清扫警告码,正常为 0 - // 值来自 error_code_list_xxx.proto + // 清扫警告码,正常为 0 [EN: Cleaning warning code, 0 for normal] + // 值来自 error_code_list_xxx.proto [EN: Values from error_code_list_xxx.proto] uint32 prompt_code = 4; } Extra extra = 7; @@ -66,16 +66,16 @@ message CleanRecordData { stream.TemporaryData temp_data = 2; stream.RoomParams room_params = 3; - // id 4 不再使用 - // id 5 不再使用 + // id 4 不再使用 [EN: id 4 no longer used] + // id 5 不再使用 [EN: id 5 no longer used] - // 上传格式: 头部 Point Point Point Point ... Point - // 其中头部格式: 0xAA 0x03 [4字节 map_id] [4字节 releases] - bytes path_data = 6; // 轨迹(目前未压缩) + // 上传格式: 头部 Point Point Point Point ... Point [EN: Upload format: header Point Point Point Point ... Point] + // 其中头部格式: 0xAA 0x03 [4字节 map_id] [4字节 releases] [EN: header format: 0xAA 0x03 [4 bytes map_id] [4 bytes releases]] + bytes path_data = 6; // 轨迹(目前未压缩) [EN: Path (currently uncompressed)] - // id 7 不再使用 - // id 8 不再使用 - // id 9 不再使用 + // id 7 不再使用 [EN: id 7 no longer used] + // id 8 不再使用 [EN: id 8 no longer used] + // id 9 不再使用 [EN: id 9 no longer used] stream.Map map = 10; stream.RoomOutline room_outline = 11; @@ -84,32 +84,32 @@ message CleanRecordData { message PathData { repeated stream.PathPoint points = 1; } - PathData path_data_v2 = 13; // 存在该字段使用新的轨迹数据格式 + PathData path_data_v2 = 13; // 存在该字段使用新的轨迹数据格式 [EN: Use new path data format when this field exists] - /* p2p通道 清扫记录使用以下参数,不使用上述参数 */ - p2p.CompleteMap map_p2p = 20; //完整地图 - p2p.CompletePath path_p2p = 21; //完整路径 + /* p2p通道 清扫记录使用以下参数,不使用上述参数 */ // [EN: p2p channel cleaning records use the following parameters, not the above parameters] + p2p.CompleteMap map_p2p = 20; //完整地图 [EN: Complete map] + p2p.CompletePath path_p2p = 21; //完整路径 [EN: Complete path] } message CruiseRecordDesc { - uint64 start_time = 1; // 不加时区,单位: s - uint64 end_time = 2; // 不加时区,单位: s - uint32 duration = 3; // 巡航时长,单位:s + uint64 start_time = 1; // 不加时区,单位: s [EN: Without timezone, unit: seconds] + uint64 end_time = 2; // 不加时区,单位: s [EN: Without timezone, unit: seconds] + uint32 duration = 3; // 巡航时长,单位:s [EN: Cruise duration, unit: seconds] enum FinishReason { - COMPLETED = 0; // 自动巡航完成 - MANUDAL = 1; // 人为停止 - LOW_POWER = 2; // 低电 - EXCEPTION = 3; // 异常中断 + COMPLETED = 0; // 自动巡航完成 [EN: Automatic cruise completed] + MANUDAL = 1; // 人为停止 [EN: Manually stopped] + LOW_POWER = 2; // 低电 [EN: Low battery] + EXCEPTION = 3; // 异常中断 [EN: Exception interrupted] } FinishReason finish_reason = 4; message Extra { enum Mode { - GLOBAL_CRUISE = 0; // 全屋巡航 - POINT_CRUISE = 1; // 精准巡航 - ZONES_CRUISE = 2; // 选区巡航 - SCHEDULE_CRUISE = 3; // 预约巡航 + GLOBAL_CRUISE = 0; // 全屋巡航 [EN: Whole house cruise] + POINT_CRUISE = 1; // 精准巡航 [EN: Precise cruise] + ZONES_CRUISE = 2; // 选区巡航 [EN: Selected zones cruise] + SCHEDULE_CRUISE = 3; // 预约巡航 [EN: Scheduled cruise] } Mode mode = 1; } @@ -122,14 +122,14 @@ message CruiseRecordData { stream.RoomParams room_params = 3; stream.ObstacleInfo obstacle_info = 4; - // 上传格式: 头部 Point Point Point Point ... Point - // 其中头部格式: 0xAA 0x03 [4字节 map_id] [4字节 releases] - bytes path_data = 5; // 轨迹(目前未压缩) + // 上传格式: 头部 Point Point Point Point ... Point [EN: Upload format: header Point Point Point Point ... Point] + // 其中头部格式: 0xAA 0x03 [4字节 map_id] [4字节 releases] [EN: header format: 0xAA 0x03 [4 bytes map_id] [4 bytes releases]] + bytes path_data = 5; // 轨迹(目前未压缩) [EN: Path (currently uncompressed)] stream.CruiseData cruise_data = 6; stream.Map map = 7; stream.RoomOutline room_outline = 8; - /* p2p通道 使用以下参数,不使用 除 cruise_data 以外的上述参数 */ - p2p.CompleteMap map_p2p = 20; //完整地图 - p2p.CompletePath path_p2p = 21; //完整路径 + /* p2p通道 使用以下参数,不使用 除 cruise_data 以外的上述参数 */ // [EN: p2p channel uses the following parameters, not the above parameters except cruise_data] + p2p.CompleteMap map_p2p = 20; //完整地图 [EN: Complete map] + p2p.CompletePath path_p2p = 21; //完整路径 [EN: Complete path] } diff --git a/proto-reference/clean_record_wrap.proto b/proto-reference/clean_record_wrap.proto index a91ddb5..3e1c503 100644 --- a/proto-reference/clean_record_wrap.proto +++ b/proto-reference/clean_record_wrap.proto @@ -1,5 +1,5 @@ /** - * 清洁记录包装,调试专用,APP 忽略. + * 清洁记录包装,调试专用,APP 忽略. [EN: Cleaning record wrapper, for debugging only, APP should ignore.] */ syntax = "proto3"; @@ -9,6 +9,6 @@ package proto.cloud; message CleanRecordWrap { uint32 id = 1; - bytes desc = 2; // CleanRecordDesc 序列化结果 - bytes data = 3; // CleanRecordData 序列化结果 + bytes desc = 2; // CleanRecordDesc 序列化结果 [EN: CleanRecordDesc serialization result] + bytes data = 3; // CleanRecordData 序列化结果 [EN: CleanRecordData serialization result] } diff --git a/proto-reference/clean_statistics.proto b/proto-reference/clean_statistics.proto index e54562f..d29424e 100644 --- a/proto-reference/clean_statistics.proto +++ b/proto-reference/clean_statistics.proto @@ -1,5 +1,5 @@ /** - * 清洁统计信息 + * 清洁统计信息 [EN: Cleaning statistics information] */ syntax = "proto3"; @@ -8,17 +8,17 @@ syntax = "proto3"; package proto.cloud; message CleanStatistics { - message Single { // 当次清扫统计 - uint32 clean_duration = 1; // 当前清扫时长 - uint32 clean_area = 2; // 当前清扫面积 + message Single { // 当次清扫统计 [EN: Current cleaning statistics] + uint32 clean_duration = 1; // 当前清扫时长 [EN: Current cleaning duration] + uint32 clean_area = 2; // 当前清扫面积 [EN: Current cleaning area] } - message Total { // 总的清扫统计 - uint32 clean_duration = 1; // 总的清扫时长 - uint32 clean_area = 2; // 总的清扫面积 - uint32 clean_count = 3; // 总的清扫次数 + message Total { // 总的清扫统计 [EN: Total cleaning statistics] + uint32 clean_duration = 1; // 总的清扫时长 [EN: Total cleaning duration] + uint32 clean_area = 2; // 总的清扫面积 [EN: Total cleaning area] + uint32 clean_count = 3; // 总的清扫次数 [EN: Total cleaning count] } Single single = 1; - Total total = 2; // 恢复出厂时不清零,用于机器老化的考量指标 - Total user_total = 3; // 不同用户时清零 + Total total = 2; // 恢复出厂时不清零,用于机器老化的考量指标 [EN: Not reset on factory restore, used as a metric for machine aging consideration] + Total user_total = 3; // 不同用户时清零 [EN: Reset when user changes] } diff --git a/proto-reference/common.proto b/proto-reference/common.proto index f44ea7b..0aa035c 100644 --- a/proto-reference/common.proto +++ b/proto-reference/common.proto @@ -9,14 +9,14 @@ message Empty { } message Point { - sint32 x = 1; // 单位: m x 100 + sint32 x = 1; // 单位: m x 100 [EN: Unit: m x 100] sint32 y = 2; } message Pose { - sint32 x = 1; // 单位: m x 100 + sint32 x = 1; // 单位: m x 100 [EN: Unit: m x 100] sint32 y = 2; - sint32 theta = 3; // 单位: rad * 100 + sint32 theta = 3; // 单位: rad * 100 [EN: Unit: rad * 100] } message Line { @@ -43,23 +43,23 @@ message Active { bool value = 1; } -message Numerical { // 数值分级 +message Numerical { // 数值分级 [EN: Numerical grading] uint32 value = 1; } -// 地面类型 +// 地面类型 [EN: Floor type] message Floor { enum Type { UNKNOW = 0; - BLANKET = 1; // 毛毯 - WOOD = 2; // 木质 - CERAMIC = 3; // 瓷砖 + BLANKET = 1; // 毛毯 [EN: Carpet] + WOOD = 2; // 木质 [EN: Wood] + CERAMIC = 3; // 瓷砖 [EN: Ceramic tile] } Type type = 1; } -// 房间类型 -// 当房间未命名时,手机 app 根据类型和索引值自动多语言命名,如 "厨房1"、"Kitchen1" 等 +// 房间类型 [EN: Room type] +// 当房间未命名时,手机 app 根据类型和索引值自动多语言命名,如 "厨房1"、"Kitchen1" 等 [EN: When room is unnamed, mobile app automatically names it in multiple languages based on type and index, such as "厨房1", "Kitchen1", etc.] message RoomScene { enum Type { UNKNOW = 0; @@ -74,7 +74,7 @@ message RoomScene { Type type = 1; message Index { - uint32 value = 1; // 从1开始 + uint32 value = 1; // 从1开始 [EN: Starting from 1] } Index index = 2; -} \ No newline at end of file +} diff --git a/proto-reference/consumable.proto b/proto-reference/consumable.proto index 8a607d0..00b2d33 100644 --- a/proto-reference/consumable.proto +++ b/proto-reference/consumable.proto @@ -1,5 +1,5 @@ /** - * 耗材统计. + * 耗材统计. [EN: Consumables statistics.] */ syntax = "proto3"; @@ -24,20 +24,20 @@ message ConsumableRequest { message ConsumableRuntime { message Duration { - uint32 duration = 1; // 单位:hour + uint32 duration = 1; // 单位:hour [EN: Unit: hour] } - Duration side_brush = 1; //边刷 - Duration rolling_brush = 2; //滚刷 - Duration filter_mesh = 3; //滤网 - Duration scrape = 4; //刮条 - Duration sensor = 5; //传感器 - Duration mop = 6; //拖布 - Duration dustbag = 7; //尘袋 - Duration dirty_watertank = 10; //污水预存水槽 - Duration dirty_waterfilter = 11; //污水泵滤芯 + Duration side_brush = 1; //边刷 [EN: Side brush] + Duration rolling_brush = 2; //滚刷 [EN: Rolling brush] + Duration filter_mesh = 3; //滤网 [EN: Filter mesh] + Duration scrape = 4; //刮条 [EN: Scraper] + Duration sensor = 5; //传感器 [EN: Sensor] + Duration mop = 6; //拖布 [EN: Mop] + Duration dustbag = 7; //尘袋 [EN: Dust bag] + Duration dirty_watertank = 10; //污水预存水槽 [EN: Dirty water pre-storage tank] + Duration dirty_waterfilter = 11; //污水泵滤芯 [EN: Dirty water pump filter] - uint64 last_time = 20; // 需要带上时间,单位纳秒,从1970.1.1开始的纳秒数。 + uint64 last_time = 20; // 需要带上时间,单位纳秒,从1970.1.1开始的纳秒数。[EN: Needs to include time, unit nanoseconds, nanoseconds since 1970.1.1.] } message ConsumableResponse { diff --git a/proto-reference/control.proto b/proto-reference/control.proto index 8014938..313b4ac 100644 --- a/proto-reference/control.proto +++ b/proto-reference/control.proto @@ -7,46 +7,46 @@ package proto.cloud; import "proto/cloud/common.proto"; import "proto/cloud/clean_param.proto"; -// 遥控器方向 +// 遥控器方向 [EN: Remote control direction] message RemoteCtrl { enum Direction { - BRAKE = 0; // App可及时停止前面的遥控指令紧急刹车(不是退出遥控模式),比如在按键抬起时下发 + BRAKE = 0; // App可及时停止前面的遥控指令紧急刹车(不是退出遥控模式),比如在按键抬起时下发 [EN: App can immediately stop the previous remote control command for emergency braking (not exiting remote control mode), such as when a button is released] FORWARD = 1; BACK = 2; LEFT = 3; RIGHT = 4; } - // App下发任意FORWARD/BACK/LEFT/RIGHT即进入遥控模式 + // App下发任意FORWARD/BACK/LEFT/RIGHT即进入遥控模式 [EN: App sends any FORWARD/BACK/LEFT/RIGHT to enter remote control mode] Direction direction = 1; } -// 通用全局清扫,清洁参数走 clean_param 中 clean_param 参数 -// 定制全局清扫,设置每个房间不同的清扫参数走 stream 定制参数 - x10 开始不受支持 -// 通过 MapEditRequest.RoomsCustom.custom_enable 判断使用哪种参数 - x10 开始不受支持 +// 通用全局清扫,清洁参数走 clean_param 中 clean_param 参数 [EN: General global cleaning, cleaning parameters use clean_param from clean_param] +// 定制全局清扫,设置每个房间不同的清扫参数走 stream 定制参数 - x10 开始不受支持 [EN: Custom global cleaning, setting different cleaning parameters for each room uses stream custom parameters - not supported from x10 onwards] +// 通过 MapEditRequest.RoomsCustom.custom_enable 判断使用哪种参数 - x10 开始不受支持 [EN: Use MapEditRequest.RoomsCustom.custom_enable to determine which parameters to use - not supported from x10 onwards] message AutoClean { - // 总清扫次数 - uint32 clean_times = 1; // 清扫次数,非 0 有效 - // 强制建图(即使当前有图也会重新建图) + // 总清扫次数 [EN: Total cleaning times] + uint32 clean_times = 1; // 清扫次数,非 0 有效 [EN: Cleaning times, valid when non-zero] + // 强制建图(即使当前有图也会重新建图) [EN: Force mapping (will remap even if current map exists)] bool force_mapping = 2; } -// 通用房间清扫,清洁参数走 clean_param 中 area_clean_param 参数 -// 定制房间清扫,设置每个房间不同的清扫参数走 stream 定制参数(通过 MapEditRequest.RoomsCustom 设置) -// 通过 type 判断使用哪种参数 +// 通用房间清扫,清洁参数走 clean_param 中 area_clean_param 参数 [EN: General room cleaning, cleaning parameters use area_clean_param from clean_param] +// 定制房间清扫,设置每个房间不同的清扫参数走 stream 定制参数(通过 MapEditRequest.RoomsCustom 设置) [EN: Custom room cleaning, setting different cleaning parameters for each room uses stream custom parameters (set via MapEditRequest.RoomsCustom)] +// 通过 type 判断使用哪种参数 [EN: Use type to determine which parameters to use] message SelectRoomsClean { message Room { uint32 id = 1; uint32 order = 2; } - repeated Room rooms = 1; // 定制房间清扫该字段也要传,虽然和 stream 中的部分信息重复 - uint32 clean_times = 2; // 通用清扫次数,非 0 有效。定制清扫次数放在 stream 中 + repeated Room rooms = 1; // 定制房间清扫该字段也要传,虽然和 stream 中的部分信息重复 [EN: This field must also be passed for custom room cleaning, although it overlaps with some information in stream] + uint32 clean_times = 2; // 通用清扫次数,非 0 有效。定制清扫次数放在 stream 中 [EN: General cleaning times, valid when non-zero. Custom cleaning times are in stream] - uint32 map_id = 3; // map 的 id 号 - uint32 releases = 4; // map 的大版本修正号 + uint32 map_id = 3; // map 的 id 号 [EN: Map ID number] + uint32 releases = 4; // map 的大版本修正号 [EN: Map major version revision number] enum Mode { - GENERAL = 0; // 通用清扫 - CUSTOMIZE = 1; // 定制清扫 + GENERAL = 0; // 通用清扫 [EN: General cleaning] + CUSTOMIZE = 1; // 定制清扫 [EN: Custom cleaning] } Mode mode = 5; } @@ -54,16 +54,16 @@ message SelectRoomsClean { message SelectZonesClean { message Zone { Quadrangle quadrangle = 1; - uint32 clean_times = 2; // 清扫次数,非 0 有效 + uint32 clean_times = 2; // 清扫次数,非 0 有效 [EN: Cleaning times, valid when non-zero] } repeated Zone zones = 1; - uint32 map_id = 2; // map 的 id 号 - uint32 releases = 3; // map 的大版本修正号 + uint32 map_id = 2; // map 的 id 号 [EN: Map ID number] + uint32 releases = 3; // map 的大版本修正号 [EN: Map major version revision number] enum Type { - NORMAL = 0; // 普通清扫 - POOP_CLEANING = 1; // 便便补扫 + NORMAL = 0; // 普通清扫 [EN: Normal cleaning] + POOP_CLEANING = 1; // 便便补扫 [EN: Poop re-cleaning] } Type type = 4; } @@ -73,22 +73,22 @@ message SceneClean { } message SpotClean { - uint32 clean_times = 1; // 清扫次数,非 0 有效 + uint32 clean_times = 1; // 清扫次数,非 0 有效 [EN: Cleaning times, valid when non-zero] } message Goto { Point destination = 1; enum Type { - GOTO_DESTINATION = 0; // 只去目的地 + GOTO_DESTINATION = 0; // 只去目的地 [EN: Go to destination only] GOTO_SPOT = 1; GOTO_AUTO = 2; } Type type = 2; - uint32 clean_times = 3; // 清扫次数,非 0 有效,SPOT 清扫才有效 + uint32 clean_times = 3; // 清扫次数,非 0 有效,SPOT 清扫才有效 [EN: Cleaning times, valid when non-zero, only effective for SPOT cleaning] - uint32 map_id = 4; // map 的 id 号 - uint32 releases = 5; // map 的大版本修正号 + uint32 map_id = 4; // map 的 id 号 [EN: Map ID number] + uint32 releases = 5; // map 的大版本修正号 [EN: Map major version revision number] } message ScheduleAutoClean { @@ -111,58 +111,58 @@ message ScheduleRoomsClean { repeated Room rooms = 5; uint32 map_id = 6; - uint32 releases = 7; // map 的大版本修正号 + uint32 releases = 7; // map 的大版本修正号 [EN: Map major version revision number] } -// 用户设置的全局巡航点通过地图编辑下发 +// 用户设置的全局巡航点通过地图编辑下发 [EN: User-set global cruise points are sent via map editing] message GlobalCruise { uint32 map_id = 1; - uint32 releases = 2; // map 的大版本修正号 + uint32 releases = 2; // map 的大版本修正号 [EN: Map major version revision number] } message PointCruise { Point points = 1; - uint32 map_id = 2; // map 的 id 号 - uint32 releases = 3; // map 的大版本修正号 + uint32 map_id = 2; // map 的 id 号 [EN: Map ID number] + uint32 releases = 3; // map 的大版本修正号 [EN: Map major version revision number] } message ZonesCruise { repeated Point points = 1; - uint32 map_id = 2; // map 的 id 号 - uint32 releases = 3; // map 的大版本修正号 + uint32 map_id = 2; // map 的 id 号 [EN: Map ID number] + uint32 releases = 3; // map 的大版本修正号 [EN: Map major version revision number] } message ScheduleCruise { uint32 map_id = 1; - uint32 releases = 2; // map 的大版本修正号 + uint32 releases = 2; // map 的大版本修正号 [EN: Map major version revision number] } message ModeCtrlRequest { enum Method { - START_AUTO_CLEAN = 0; // 开始全局自动清扫 - START_SELECT_ROOMS_CLEAN = 1; // 开始选房清扫 - START_SELECT_ZONES_CLEAN = 2; // 开始选区清扫 - START_SPOT_CLEAN = 3; // 开始当前位置局部清扫 - START_GOTO_CLEAN = 4; // 开始移动位置局部清扫 - START_RC_CLEAN = 5; // 开始遥控清扫 - START_GOHOME = 6; // 开始回充 - START_SCHEDULE_AUTO_CLEAN = 7; // 预约自动清扫,适用于定时下发消息的方案,后续项目不使用 - START_SCHEDULE_ROOMS_CLEAN = 8; // 预约房间清扫,适用于定时下发消息的方案,后续项目不使用 - START_FAST_MAPPING = 9; // 快速建图 - START_GOWASH = 10; // 开始回洗 - STOP_TASK = 12; // 停止清扫(巡航)任务 - PAUSE_TASK = 13; // 暂停清扫(巡航)任务 - RESUME_TASK = 14; // 恢复清扫(巡航)任务 - STOP_GOHOME = 15; // 停止回充 - STOP_RC_CLEAN = 16; // 停止遥控清扫 - STOP_GOWASH = 17; // 停止回洗 - STOP_SMART_FOLLOW = 18; // 停止智能跟随 - START_GLOBAL_CRUISE = 20; // 全屋巡航 - START_POINT_CRUISE = 21; // 精准巡航 - START_ZONES_CRUISE = 22; // 选区巡航 - START_SCHEDULE_CRUISE = 23; // 预约巡航,适用于定时下发消息的方案,后续项目不使用 - START_SCENE_CLEAN = 24; // 开始场景清扫 - START_MAPPING_THEN_CLEAN = 25; // 先建图再清扫 + START_AUTO_CLEAN = 0; // 开始全局自动清扫 [EN: Start global auto cleaning] + START_SELECT_ROOMS_CLEAN = 1; // 开始选房清扫 [EN: Start selected rooms cleaning] + START_SELECT_ZONES_CLEAN = 2; // 开始选区清扫 [EN: Start selected zones cleaning] + START_SPOT_CLEAN = 3; // 开始当前位置局部清扫 [EN: Start spot cleaning at current position] + START_GOTO_CLEAN = 4; // 开始移动位置局部清扫 [EN: Start spot cleaning at moved position] + START_RC_CLEAN = 5; // 开始遥控清扫 [EN: Start remote control cleaning] + START_GOHOME = 6; // 开始回充 [EN: Start return to charge] + START_SCHEDULE_AUTO_CLEAN = 7; // 预约自动清扫,适用于定时下发消息的方案,后续项目不使用 [EN: Scheduled auto cleaning, for timed message delivery schemes, not used in subsequent projects] + START_SCHEDULE_ROOMS_CLEAN = 8; // 预约房间清扫,适用于定时下发消息的方案,后续项目不使用 [EN: Scheduled rooms cleaning, for timed message delivery schemes, not used in subsequent projects] + START_FAST_MAPPING = 9; // 快速建图 [EN: Fast mapping] + START_GOWASH = 10; // 开始回洗 [EN: Start return to wash] + STOP_TASK = 12; // 停止清扫(巡航)任务 [EN: Stop cleaning (cruise) task] + PAUSE_TASK = 13; // 暂停清扫(巡航)任务 [EN: Pause cleaning (cruise) task] + RESUME_TASK = 14; // 恢复清扫(巡航)任务 [EN: Resume cleaning (cruise) task] + STOP_GOHOME = 15; // 停止回充 [EN: Stop return to charge] + STOP_RC_CLEAN = 16; // 停止遥控清扫 [EN: Stop remote control cleaning] + STOP_GOWASH = 17; // 停止回洗 [EN: Stop return to wash] + STOP_SMART_FOLLOW = 18; // 停止智能跟随 [EN: Stop smart follow] + START_GLOBAL_CRUISE = 20; // 全屋巡航 [EN: Whole house cruise] + START_POINT_CRUISE = 21; // 精准巡航 [EN: Precise cruise] + START_ZONES_CRUISE = 22; // 选区巡航 [EN: Selected zones cruise] + START_SCHEDULE_CRUISE = 23; // 预约巡航,适用于定时下发消息的方案,后续项目不使用 [EN: Scheduled cruise, for timed message delivery schemes, not used in subsequent projects] + START_SCENE_CLEAN = 24; // 开始场景清扫 [EN: Start scene cleaning] + START_MAPPING_THEN_CLEAN = 25; // 先建图再清扫 [EN: Map first then clean] } Method method = 1; @@ -184,10 +184,10 @@ message ModeCtrlRequest { } } -// TODO: 可以考虑不返回,执行成功后状态会相应改变. +// TODO: 可以考虑不返回,执行成功后状态会相应改变. [EN: TODO: Consider not returning, status will change accordingly after successful execution.] message ModeCtrlResponse { ModeCtrlRequest.Method method = 1; - uint32 seq = 2; // 返回 ModeCtrlRequest 相同的 seq 值. + uint32 seq = 2; // 返回 ModeCtrlRequest 相同的 seq 值. [EN: Returns the same seq value as ModeCtrlRequest.] enum Result { SUCCESS = 0; diff --git a/proto-reference/debug.proto b/proto-reference/debug.proto index e8d0869..30ec425 100644 --- a/proto-reference/debug.proto +++ b/proto-reference/debug.proto @@ -7,25 +7,25 @@ package proto.cloud; import "proto/cloud/common.proto"; message DebugRequest { - Switch log_sw = 1; // 日志开关 + Switch log_sw = 1; // 日志开关 [EN: Log switch] - // 用户在手机 app 主动反馈异常,这时设备可以单次上传日志 + // 用户在手机 app 主动反馈异常,这时设备可以单次上传日志 [EN: User actively reports exception in mobile app, device can upload logs once] message FaultReport { uint32 seq = 1; } FaultReport fault_report = 2; - Switch capture_sw = 3; // 数据采集开关(数据回流) + Switch capture_sw = 3; // 数据采集开关(数据回流) [EN: Data capture switch (data backflow)] - // 图像识别不准确时,用户可以在手机 app 上主动反馈 + // 图像识别不准确时,用户可以在手机 app 上主动反馈 [EN: When image recognition is inaccurate, user can actively provide feedback in mobile app] message ImageFeedback { string object_type = 1; - string photo_id = 2; // 照片 id + string photo_id = 2; // 照片 id [EN: Photo ID] } - ImageFeedback image_feedback = 4; // !!! 需求变更,此项废弃 + ImageFeedback image_feedback = 4; // !!! 需求变更,此项废弃 [EN: !!! Requirement changed, this item is deprecated] - Switch toggle_mop_raise = 11; // 翻转拖把抬起/下降,true 翻转,false 忽略 - Switch toggle_mop_spin = 12; // 翻转拖把旋转/停转,true 翻转,false 忽略 + Switch toggle_mop_raise = 11; // 翻转拖把抬起/下降,true 翻转,false 忽略 [EN: Toggle mop raise/lower, true to toggle, false to ignore] + Switch toggle_mop_spin = 12; // 翻转拖把旋转/停转,true 翻转,false 忽略 [EN: Toggle mop spin/stop, true to toggle, false to ignore] } message DebugResponse { @@ -41,5 +41,5 @@ message DebugResponse { } WebTtyInfo webtty_info = 3; - Switch capture_sw = 4; // 如果没有这个字段,app 上就不显示采集开关 + Switch capture_sw = 4; // 如果没有这个字段,app 上就不显示采集开关 [EN: If this field is absent, the capture switch is not displayed in app] } diff --git a/proto-reference/error_code.proto b/proto-reference/error_code.proto index 8b2864f..d3c74c2 100644 --- a/proto-reference/error_code.proto +++ b/proto-reference/error_code.proto @@ -6,28 +6,28 @@ package proto.cloud; import "proto/cloud/common.proto"; -// 云端下发给机器 +// 云端下发给机器 [EN: Cloud sends to device] message ErrorSetting { - repeated uint32 warn_mask = 1; // 警告码屏蔽,可多个 - repeated string obstacle_reminder_mask = 2; // obstacle_reminder 屏蔽,可多个 + repeated uint32 warn_mask = 1; // 警告码屏蔽,可多个 [EN: Warning code mask, can be multiple] + repeated string obstacle_reminder_mask = 2; // obstacle_reminder 屏蔽,可多个 [EN: obstacle_reminder mask, can be multiple] } -// 机器上报到云的错误警告码,包含云端下发的 mask 字段(二次触发需要清除相应的项),枚举来自 ErrorCodeList +// 机器上报到云的错误警告码,包含云端下发的 mask 字段(二次触发需要清除相应的项),枚举来自 ErrorCodeList [EN: Error/warning codes reported from device to cloud, contains mask field from cloud (need to clear corresponding items on second trigger), enum from ErrorCodeList] message ErrorCode { - uint64 last_time = 1; // 当前时间,单位是纳秒,开机到现在的单调时间 CLOCK_MONOTONIC + uint64 last_time = 1; // 当前时间,单位是纳秒,开机到现在的单调时间 CLOCK_MONOTONIC [EN: Current time, unit: nanoseconds, monotonic time since boot CLOCK_MONOTONIC] - repeated uint32 error = 2; // 可多个 - repeated uint32 warn = 3; // 可多个 - ErrorSetting setting = 4; // 可多个 + repeated uint32 error = 2; // 可多个 [EN: Can be multiple] + repeated uint32 warn = 3; // 可多个 [EN: Can be multiple] + ErrorSetting setting = 4; // 可多个 [EN: Can be multiple] message NewCode { - repeated uint32 error = 1; // 新上报的错误码 - repeated uint32 warn = 2; // 新上报的警告码 + repeated uint32 error = 1; // 新上报的错误码 [EN: Newly reported error codes] + repeated uint32 warn = 2; // 新上报的警告码 [EN: Newly reported warning codes] } NewCode new_code = 10; message Battery { - bool restored = 1; // 电池恢复(换电池标志) + bool restored = 1; // 电池恢复(换电池标志) [EN: Battery restored (battery replacement flag)] } Battery battery = 11; @@ -37,7 +37,7 @@ message ErrorCode { } Type type = 1; string photo_id = 2; - uint32 accuracy = 3; // 准确率,0~100,表示百分比(0 表示无效) + uint32 accuracy = 3; // 准确率,0~100,表示百分比(0 表示无效) [EN: Accuracy, 0~100, represents percentage (0 means invalid)] uint32 map_id = 4; oneof Description { @@ -47,9 +47,9 @@ message ErrorCode { repeated ObstacleReminder obstacle_reminder = 12; } -// 方向:机器上报到云的提醒(手机 app 显示 toast),枚举来自 PromptCodeList +// 方向:机器上报到云的提醒(手机 app 显示 toast),枚举来自 PromptCodeList [EN: Direction: Reminders reported from device to cloud (mobile app displays toast), enum from PromptCodeList] message PromptCode { - uint64 last_time = 1; // 当前时间,单位是纳秒,开机到现在的单调时间 CLOCK_MONOTONIC + uint64 last_time = 1; // 当前时间,单位是纳秒,开机到现在的单调时间 CLOCK_MONOTONIC [EN: Current time, unit: nanoseconds, monotonic time since boot CLOCK_MONOTONIC] repeated uint32 value = 2; } diff --git a/proto-reference/error_code_list_standard.proto b/proto-reference/error_code_list_standard.proto index c1224c4..3549e2f 100644 --- a/proto-reference/error_code_list_standard.proto +++ b/proto-reference/error_code_list_standard.proto @@ -7,183 +7,183 @@ package proto.cloud.std; enum ErrorCodeList { E0000_NONE = 0; - E1013_LEFT_WHEEL_OVERCURRENT = 1013; // 左轮过流 - E1023_RIGHT_WHEEL_OVERCURRENT = 1023; // 右轮过流 - E1033_LEFT_RIGHT_WHEEL_OVERCURRENT = 1033; // 左右轮过流 - E1010_LEFT_WHEEL_OPEN_CIRCUIT = 1010; // 左轮开路 - E1011_LEFT_WHEEL_SHORT_CIRCUIT = 1011; // 左轮短路 - E1012_LEFT_WHEEL_ABNORMAL = 1012; // 左轮异常(开短路无法区分) - E1020_RIGHT_WHEEL_OPEN_CIRCUIT = 1020; // 右轮开路 - E1021_RIGHT_WHEEL_SHORT_CIRCUIT = 1021; // 右轮短路 - E1022_RIGHT_WHEEL_ABNORMAL = 1022; // 右轮异常(开短路无法区分) - E1030_LEFT_RIGHT_WHEEL_OPEN_CIRCUIT = 1030; // 左右轮开路 - E1031_LEFT_RIGHT_WHEEL_SHORT_CIRCUIT = 1031; // 左右轮短路 - E1032_LEFT_RIGHT_WHEEL_ABNORMAL = 1032; // 左右轮异常(开短路无法区分) - E2013_SINGLE_FAN_ROTATION_ABNORMAL = 2013; // 单风机转数异常 - E2023_LEFT_FAN_ROTATION_ABNORMAL = 2023; // 左风机转数异常 - E2027_RIGHT_FAN_ROTATION_ABNORMAL = 2027; // 右风机转数异常 - E2010_SINGLE_FAN_OPEN_CIRCUIT = 2010; // 单风机开路 - E2011_SINGLE_FAN_SHORT_CIRCUIT = 2011; // 单风机短路 - E2012_SINGLE_FAN_ABNORMAL = 2012; // 单风机异常(开路或短路无法区分) - E2020_LEFT_FAN_OPEN_CIRCUIT = 2020; // 双风机-左风机开路 - E2021_LEFT_FAN_SHORT_CIRCUIT = 2021; // 双风机-左风机短路 - E2022_LEFT_FAN_ABNORMAL = 2022; // 双风机-左风机异常(开路或短路无法区分) - E2024_RIGHT_FAN_OPEN_CIRCUIT = 2024; // 双风机-右风机开路 - E2025_RIGHT_FAN_SHORT_CIRCUIT = 2025; // 双风机-右风机短路 - E2026_RIGHT_FAN_ABNORMAL = 2026; // 双风机-右风机异常(开路或短路无法区分) - E2112_SINGLE_BRUSH_OVERCURRENT = 2112; // 单滚刷过流 - E2122_DOUBLE_BRUSH_FRONT_OVERCURRENT = 2122; // 双滚刷-前过流 - E2125_DOUBLE_BRUSH_BACK_OVERCURRENT = 2125; // 双滚刷-后过流 - E2110_SINGLE_BRUSH_OPEN_CIRCUIT = 2110; // 单滚刷开路 - E2111_SINGLE_BRUSH_SHORT_CIRCUIT = 2111; // 单滚刷短路 - E2113_SINGLE_BRUSH_ABNORMAL = 2113; // 单滚刷异常(开路短路不能区分) - E2120_DOUBLE_BRUSH_FRONT_OPEN_CIRCUIT = 2120; // 双滚刷-前开路 - E2121_DOUBLE_BRUSH_FRONT_SHORT_CIRCUIT = 2121; // 双滚刷-前短路 - E2123_DOUBLE_BRUSH_BACK_OPEN_CIRCUIT = 2123; // 双滚刷-后开路 - E2124_DOUBLE_BRUSH_BACK_SHORT_CIRCUIT = 2124; // 双滚刷-后短路 - E2213_SINGLE_SIDE_BRUSH_OVERCURRENT = 2213; // 单边刷过流 - E2223_LEFT_SIDE_BRUSH_OVERCURRENT = 2223; // 左边刷过流 - E2227_RIGHT_SIDE_BRUSH_OVERCURRENT = 2227; // 右边刷过流 - E2210_SINGLE_SIDE_BRUSH_OPEN_CIRCUIT = 2210; // 单边刷开路 - E2211_SINGLE_SIDE_BRUSH_SHORT_CIRCUIT = 2211; // 单边刷短路 - E2212_SINGLE_SIDE_BRUSH_ABNORMAL = 2212; // 单边刷异常(开路或短路无法区分) - E2220_LEFT_SIDE_BRUSH_OPEN_CIRCUIT = 2220; // 左边刷开路 - E2221_LEFT_SIDE_BRUSH_SHORT_CIRCUIT = 2221; // 左边刷短路 - E2222_LEFT_SIDE_BRUSH_ABNORMAL = 2222; // 左边刷异常(开路或短路无法区分) - E2224_RIGHT_SIDE_BRUSH_OPEN_CIRCUIT = 2224; // 右边刷开路 - E2225_RIGHT_SIDE_BRUSH_SHORT_CIRCUIT = 2225; // 右边刷短路 - E2226_RIGHT_SIDE_BRUSH_ABNORMAL = 2226; // 右边刷异常(开路或短路无法区分) - E2310_DUSTBIN_NOT_INSTALLED = 2310; // 尘盒&滤网不在位 - E2311_DUSTBIN_INSTALLED_USE_TIME_EXCEEDS_10_HOURS = 2311; // 尘盒在位使用超过10小时提醒 - E3013_ROBOT_WATER_TANK_INSUFFICIENT = 3013; // 机器人水箱水量不足 - E3010_ROBOT_WATER_PUMP_OPEN_CIRCUIT = 3010; // 机器人水泵开路 - E3011_ROBOT_WATER_PUMP_SHORT_CIRCUIT = 3011; // 机器人水泵短路 - E3012_ROBOT_WATER_TANK_WATER_PUMP_ABNORMAL = 3012; // 机器人水箱水泵异常(开路或短路无法区分) - E3020_ROBOT_WATER_TANK_REMOVED_CANNOT_MOVE = 3020; // 机器人水箱移除,无法正常运动 - E3110_LEFT_MOP_NOT_INSTALLED = 3110; // 左边抹布不在位 - E3111_RIGHT_MOP_NOT_INSTALLED = 3111; // 右边抹布不在位 - E3123_ROTATING_MOTOR_JAMMED = 3123; // 旋转电机卡住 - E3133_LIFTING_MOTOR_JAMMED = 3133; // 升降电机卡住 - E3120_ROTATING_MOTOR_OPEN_CIRCUIT = 3120; // 旋转电机开路 - E3121_ROTATING_MOTOR_SHORT_CIRCUIT = 3121; // 旋转电机短路 - E3122_ROTATING_MOTOR_ABNORMAL = 3122; // 旋转电机异常(开路或短路无法区分) - E3130_LIFTING_MOTOR_OPEN_CIRCUIT = 3130; // 升降电机开路 - E3131_LIFTING_MOTOR_SHORT_CIRCUIT = 3131; // 升降电机短路 - E3132_LIFTING_MOTOR_ABNORMAL = 3132; // 升降电机异常(开路或短路无法区分) - E4012_RADAR_ROTATION_ABNORMAL = 4012; // 雷达转数异常 - E4011_RADAR_BLOCKED = 4011; // 雷达被遮挡 - E4010_RADAR_NO_SIGNAL_COMMUNICATION_POSSIBLY_DAMAGED = 4010; // 雷达无信号通讯(可能损坏) - E4020_GYROSCOPE_ABNORMAL = 4020; // 陀螺仪异常(开路或短路无法区分) - E4030_TOF_NO_SIGNAL_COMMUNICATION_POSSIBLY_DAMAGED = 4030; // Tof无信号通讯(可能损坏) - E4031_TOF_BLOCKED = 4031; // Tof被遮挡 - E4040_CAM_NO_SIGNAL_COMMUNICATION_POSSIBLY_DAMAGED = 4040; // Cam无信号通讯(可能损坏) - E4041_CAM_BLOCKED = 4041; // Cam被遮挡 - E4090_WALL_SENSOR_NO_SIGNAL_COMMUNICATION_POSSIBLY_DAMAGED = 4090; // 沿墙无信号通讯(可能损坏) - E4091_WALL_SENSOR_BLOCKED = 4091; // 沿墙被遮挡 - E4111_LEFT_FRONT_COLLISION_LONG_TRIGGER = 4111; // 左前撞长触发 - E4112_RIGHT_FRONT_COLLISION_LONG_TRIGGER = 4112; // 右前撞长触发 - E4120_ULTRASONIC_COMMUNICATION_INTERRUPTED_CLEANING_SCENE = 4120; // 超声通信中断(清洁场景) - E4121_ULTRASONIC_COMMUNICATION_INTERRUPTED_NON_CLEANING_SCENE = 4121; // 超声通信中断(非清洁场景) - E4130_LASER_SHIELD_LONG_TRIGGER = 4130; // 激光罩长触发 - E5012_BATTERY_CHARGING_CURRENT_TOO_SMALL = 5012; // 电池充电电流偏小 - E5010_BATTERY_OPEN_CIRCUIT = 5010; // 电池开路 - E5011_BATTERY_SHORT_CIRCUIT = 5011; // 电池短路 - E5013_BATTERY_DISCHARGE_CURRENT_TOO_LARGE = 5013; // 电池放电电流过大 - E5016_CHARGING_CURRENT_TOO_LARGE = 5016; // 充电电流过大 - E5017_CHARGING_VOLTAGE_ABNORMAL = 5017; // 充电电压异常 - E5018_BATTERY_TEMPERATURE_ABNORMAL = 5018; // 电池温度异常 - E5021_DISCHARGE_HIGH_TEMPERATURE = 5021; // 放电高温 - E5022_DISCHARGE_LOW_TEMPERATURE = 5022; // 放电低温 - E5023_CHARGING_HIGH_TEMPERATURE = 5023; // 充电高温 - E5024_CHARGING_LOW_TEMPERATURE = 5024; // 充电低温 - E5014_LOW_BATTERY_SHUTDOWN = 5014; // 电量低关机 - E5015_LOW_BATTERY_CANNOT_SCHEDULE_CLEANING = 5015; // 电量低不能预约清洁 - E5110_WIFI_ABNORMAL = 5110; // Wi-Fi异常 - E5111_BT_ABNORMAL = 5111; // BT异常 - E5112_INFRARED_COMMUNICATION_ABNORMAL = 5112; // 红外通讯异常 - E6010_CLEAN_WATER_TANK_NOT_INSTALLED = 6010; // 清水箱不在 - E6020_DIRTY_WATER_TANK_NOT_INSTALLED = 6020; // 污水箱不在 - E6025_DIRTY_WATER_TANK_ABNORMAL_FULL_OR_NOT_INSTALLED = 6025; // 污水箱异常(满或者不在位) - E6011_CLEAN_WATER_TANK_EMPTY = 6011; // 清水箱没水 - E6021_DIRTY_WATER_TANK_FULL = 6021; // 污水箱满 - E6012_CLEAN_WATER_PUMP_OPEN_CIRCUIT = 6012; // 清水泵开路 - E6013_CLEAN_WATER_PUMP_SHORT_CIRCUIT = 6013; // 清水泵短路 - E6014_THREE_WAY_VALVE_SHORT_CIRCUIT = 6014; // 三通阀短路 - E6022_DIRTY_WATER_PUMP_OPEN_CIRCUIT = 6022; // 污水泵开路 - E6023_DIRTY_WATER_PUMP_SHORT_CIRCUIT = 6023; // 污水泵短路 - E6024_DIRTY_WATER_TANK_NOT_CLOSED_TIGHTLY = 6024; // 污水箱未盖紧 - E6030_CLEANING_DISC_NOT_INSTALLED = 6030; // 清洗盘不在位 - E6031_CLEANING_DISC_WATER_FULL = 6031; // 清洗盘水满 - E6032_CLEANING_DISC_NOT_INSTALLED_OR_WATER_FULL = 6032; // 清洗盘不在位或者水满 - E6040_BLOWING_FAN_OPEN_CIRCUIT = 6040; // 吹干风扇开路 - E6041_BLOWING_FAN_SHORT_CIRCUIT = 6041; // 吹干风扇短路 - E6042_HEATING_MODULE_OPEN_CIRCUIT = 6042; // 加热模块开路 - E6043_NTC_OPEN_CIRCUIT = 6043; // NTC开路 - E6110_VOLTAGE_TRANSFORMER_DEGREE_ABNORMAL = 6110; // 电压互感器度数异常 - E6111_DUST_BIN_LEAKS_AIR = 6111; // 集尘漏风 - E6112_DUST_BIN_BLOCKED = 6112; // 集尘堵塞 - E6113_DUST_BAG_NOT_INSTALLED = 6113; // 未安装尘袋 - E6114_FAN_OVERHEATED = 6114; // 风机过热 - E6115_PRESSURE_GAUGE_ABNORMAL = 6115; // 气压计异常 - // E6300_HAIR_CLEANING_IN_PROGRESS = 6300; // 毛发清理中 - // E6301_LOW_BATTERY_CANNOT_START_HAIR_CUTTING = 6301; // 电量过低,无法启动毛发切割 - // E6310_POWER_FAILURE = 6310; // 断电 - E6311_HAIR_CUTTING_COMPONENT_ABNORMAL_OR_BLOCKED_CANNOT_START_WORK = 6311; // 割毛发组件异常或堵塞,无法启动工作 - E7000_SMALL_SPACE_TIMEOUT = 7000; // 小空间超时 - E7001_PART_OF_MACHINE_SUSPENDED = 7001; // 机器部分悬空 - E7004_MACHINE_STUCK = 7004; // 机器卡死 - E7002_MACHINE_PICKED_UP_EXCEEDING_3_GROUND_CHECKS_WHEEL_SUSPENDED = 7002; // 机器被抱起:超过3个地检判断轮子悬空 - E7003_STARTUP_FALLING_SUSPENDED = 7003; // 开机-跌落悬空 - E7010_ENTERED_FORBIDDEN_AREA = 7010; // 误入禁区 - E7011_ENTERED_CARPET = 7011; // 误入地毯 - // E7020_POSITIONING_FAILED_IN_GLOBAL_CLEANING = 7020; // 全局清洁时定位失败 - // E7021_POSITIONING_FAILED_IN_NON_GLOBAL_CLEANING = 7021; // 其他(非全局清洁)时定位失败 - E7031_RIDING_FAILURE = 7031; // 上座失败 - E7035_RIDING_FAILURE_BASE_STATION_NOT_POWERED_ON = 7035; // 上座失败(基站没通电) - E7036_RIDING_FAILURE_OMNIWHEEL_JAMMED = 7036; // 上座失败(万向轮卡住) - E7037_RIDING_FAILURE_INFRARED_REFLECTION = 7037; // 上座失败(红外反射) - E7033_EXPLORING_BASE_STATION_FAILURE_BASE_STATION_DEPARTURE = 7033; // 探索基站失败(基站出发) - E7034_CANNOT_FIND_STARTING_POINT = 7034; // 找不到起点 - E7040_DISMOUNT_FAILURE = 7040; // 下座失败 - // E7050_CANNOT_REACH = 7050; // 无法抵达 - // E7051_SCHEDULE_FAILURE = 7051; // 预约失败 - // E7052_PATH_PLANNING_FAILURE = 7052; // 路径规划失败 - E7053_MACHINE_TILTED = 7053; // 机器倾斜 - E7055_STATION_NOT_FOUND_CANNOT_MOP = 7055; // 未发现基站,无法加水洗拖布,清洁时只扫不拖 + E1013_LEFT_WHEEL_OVERCURRENT = 1013; // 左轮过流 [EN: Left wheel overcurrent] + E1023_RIGHT_WHEEL_OVERCURRENT = 1023; // 右轮过流 [EN: Right wheel overcurrent] + E1033_LEFT_RIGHT_WHEEL_OVERCURRENT = 1033; // 左右轮过流 [EN: Left and right wheel overcurrent] + E1010_LEFT_WHEEL_OPEN_CIRCUIT = 1010; // 左轮开路 [EN: Left wheel open circuit] + E1011_LEFT_WHEEL_SHORT_CIRCUIT = 1011; // 左轮短路 [EN: Left wheel short circuit] + E1012_LEFT_WHEEL_ABNORMAL = 1012; // 左轮异常(开短路无法区分) [EN: Left wheel abnormal (open/short circuit indistinguishable)] + E1020_RIGHT_WHEEL_OPEN_CIRCUIT = 1020; // 右轮开路 [EN: Right wheel open circuit] + E1021_RIGHT_WHEEL_SHORT_CIRCUIT = 1021; // 右轮短路 [EN: Right wheel short circuit] + E1022_RIGHT_WHEEL_ABNORMAL = 1022; // 右轮异常(开短路无法区分) [EN: Right wheel abnormal (open/short circuit indistinguishable)] + E1030_LEFT_RIGHT_WHEEL_OPEN_CIRCUIT = 1030; // 左右轮开路 [EN: Left and right wheel open circuit] + E1031_LEFT_RIGHT_WHEEL_SHORT_CIRCUIT = 1031; // 左右轮短路 [EN: Left and right wheel short circuit] + E1032_LEFT_RIGHT_WHEEL_ABNORMAL = 1032; // 左右轮异常(开短路无法区分) [EN: Left and right wheel abnormal (open/short circuit indistinguishable)] + E2013_SINGLE_FAN_ROTATION_ABNORMAL = 2013; // 单风机转数异常 [EN: Single fan rotation abnormal] + E2023_LEFT_FAN_ROTATION_ABNORMAL = 2023; // 左风机转数异常 [EN: Left fan rotation abnormal] + E2027_RIGHT_FAN_ROTATION_ABNORMAL = 2027; // 右风机转数异常 [EN: Right fan rotation abnormal] + E2010_SINGLE_FAN_OPEN_CIRCUIT = 2010; // 单风机开路 [EN: Single fan open circuit] + E2011_SINGLE_FAN_SHORT_CIRCUIT = 2011; // 单风机短路 [EN: Single fan short circuit] + E2012_SINGLE_FAN_ABNORMAL = 2012; // 单风机异常(开路或短路无法区分) [EN: Single fan abnormal (open/short circuit indistinguishable)] + E2020_LEFT_FAN_OPEN_CIRCUIT = 2020; // 双风机-左风机开路 [EN: Dual fan - left fan open circuit] + E2021_LEFT_FAN_SHORT_CIRCUIT = 2021; // 双风机-左风机短路 [EN: Dual fan - left fan short circuit] + E2022_LEFT_FAN_ABNORMAL = 2022; // 双风机-左风机异常(开路或短路无法区分) [EN: Dual fan - left fan abnormal (open/short circuit indistinguishable)] + E2024_RIGHT_FAN_OPEN_CIRCUIT = 2024; // 双风机-右风机开路 [EN: Dual fan - right fan open circuit] + E2025_RIGHT_FAN_SHORT_CIRCUIT = 2025; // 双风机-右风机短路 [EN: Dual fan - right fan short circuit] + E2026_RIGHT_FAN_ABNORMAL = 2026; // 双风机-右风机异常(开路或短路无法区分) [EN: Dual fan - right fan abnormal (open/short circuit indistinguishable)] + E2112_SINGLE_BRUSH_OVERCURRENT = 2112; // 单滚刷过流 [EN: Single roller brush overcurrent] + E2122_DOUBLE_BRUSH_FRONT_OVERCURRENT = 2122; // 双滚刷-前过流 [EN: Dual roller brush - front overcurrent] + E2125_DOUBLE_BRUSH_BACK_OVERCURRENT = 2125; // 双滚刷-后过流 [EN: Dual roller brush - rear overcurrent] + E2110_SINGLE_BRUSH_OPEN_CIRCUIT = 2110; // 单滚刷开路 [EN: Single roller brush open circuit] + E2111_SINGLE_BRUSH_SHORT_CIRCUIT = 2111; // 单滚刷短路 [EN: Single roller brush short circuit] + E2113_SINGLE_BRUSH_ABNORMAL = 2113; // 单滚刷异常(开路短路不能区分) [EN: Single roller brush abnormal (open/short circuit indistinguishable)] + E2120_DOUBLE_BRUSH_FRONT_OPEN_CIRCUIT = 2120; // 双滚刷-前开路 [EN: Dual roller brush - front open circuit] + E2121_DOUBLE_BRUSH_FRONT_SHORT_CIRCUIT = 2121; // 双滚刷-前短路 [EN: Dual roller brush - front short circuit] + E2123_DOUBLE_BRUSH_BACK_OPEN_CIRCUIT = 2123; // 双滚刷-后开路 [EN: Dual roller brush - rear open circuit] + E2124_DOUBLE_BRUSH_BACK_SHORT_CIRCUIT = 2124; // 双滚刷-后短路 [EN: Dual roller brush - rear short circuit] + E2213_SINGLE_SIDE_BRUSH_OVERCURRENT = 2213; // 单边刷过流 [EN: Single side brush overcurrent] + E2223_LEFT_SIDE_BRUSH_OVERCURRENT = 2223; // 左边刷过流 [EN: Left side brush overcurrent] + E2227_RIGHT_SIDE_BRUSH_OVERCURRENT = 2227; // 右边刷过流 [EN: Right side brush overcurrent] + E2210_SINGLE_SIDE_BRUSH_OPEN_CIRCUIT = 2210; // 单边刷开路 [EN: Single side brush open circuit] + E2211_SINGLE_SIDE_BRUSH_SHORT_CIRCUIT = 2211; // 单边刷短路 [EN: Single side brush short circuit] + E2212_SINGLE_SIDE_BRUSH_ABNORMAL = 2212; // 单边刷异常(开路或短路无法区分) [EN: Single side brush abnormal (open/short circuit indistinguishable)] + E2220_LEFT_SIDE_BRUSH_OPEN_CIRCUIT = 2220; // 左边刷开路 [EN: Left side brush open circuit] + E2221_LEFT_SIDE_BRUSH_SHORT_CIRCUIT = 2221; // 左边刷短路 [EN: Left side brush short circuit] + E2222_LEFT_SIDE_BRUSH_ABNORMAL = 2222; // 左边刷异常(开路或短路无法区分) [EN: Left side brush abnormal (open/short circuit indistinguishable)] + E2224_RIGHT_SIDE_BRUSH_OPEN_CIRCUIT = 2224; // 右边刷开路 [EN: Right side brush open circuit] + E2225_RIGHT_SIDE_BRUSH_SHORT_CIRCUIT = 2225; // 右边刷短路 [EN: Right side brush short circuit] + E2226_RIGHT_SIDE_BRUSH_ABNORMAL = 2226; // 右边刷异常(开路或短路无法区分) [EN: Right side brush abnormal (open/short circuit indistinguishable)] + E2310_DUSTBIN_NOT_INSTALLED = 2310; // 尘盒&滤网不在位 [EN: Dustbin and filter not in place] + E2311_DUSTBIN_INSTALLED_USE_TIME_EXCEEDS_10_HOURS = 2311; // 尘盒在位使用超过10小时提醒 [EN: Dustbin in place used over 10 hours reminder] + E3013_ROBOT_WATER_TANK_INSUFFICIENT = 3013; // 机器人水箱水量不足 [EN: Robot water tank insufficient] + E3010_ROBOT_WATER_PUMP_OPEN_CIRCUIT = 3010; // 机器人水泵开路 [EN: Robot water pump open circuit] + E3011_ROBOT_WATER_PUMP_SHORT_CIRCUIT = 3011; // 机器人水泵短路 [EN: Robot water pump short circuit] + E3012_ROBOT_WATER_TANK_WATER_PUMP_ABNORMAL = 3012; // 机器人水箱水泵异常(开路或短路无法区分) [EN: Robot water tank pump abnormal (open/short circuit indistinguishable)] + E3020_ROBOT_WATER_TANK_REMOVED_CANNOT_MOVE = 3020; // 机器人水箱移除,无法正常运动 [EN: Robot water tank removed, cannot move normally] + E3110_LEFT_MOP_NOT_INSTALLED = 3110; // 左边抹布不在位 [EN: Left mop not installed] + E3111_RIGHT_MOP_NOT_INSTALLED = 3111; // 右边抹布不在位 [EN: Right mop not installed] + E3123_ROTATING_MOTOR_JAMMED = 3123; // 旋转电机卡住 [EN: Rotating motor jammed] + E3133_LIFTING_MOTOR_JAMMED = 3133; // 升降电机卡住 [EN: Lifting motor jammed] + E3120_ROTATING_MOTOR_OPEN_CIRCUIT = 3120; // 旋转电机开路 [EN: Rotating motor open circuit] + E3121_ROTATING_MOTOR_SHORT_CIRCUIT = 3121; // 旋转电机短路 [EN: Rotating motor short circuit] + E3122_ROTATING_MOTOR_ABNORMAL = 3122; // 旋转电机异常(开路或短路无法区分) [EN: Rotating motor abnormal (open/short circuit indistinguishable)] + E3130_LIFTING_MOTOR_OPEN_CIRCUIT = 3130; // 升降电机开路 [EN: Lifting motor open circuit] + E3131_LIFTING_MOTOR_SHORT_CIRCUIT = 3131; // 升降电机短路 [EN: Lifting motor short circuit] + E3132_LIFTING_MOTOR_ABNORMAL = 3132; // 升降电机异常(开路或短路无法区分) [EN: Lifting motor abnormal (open/short circuit indistinguishable)] + E4012_RADAR_ROTATION_ABNORMAL = 4012; // 雷达转数异常 [EN: Radar rotation abnormal] + E4011_RADAR_BLOCKED = 4011; // 雷达被遮挡 [EN: Radar blocked] + E4010_RADAR_NO_SIGNAL_COMMUNICATION_POSSIBLY_DAMAGED = 4010; // 雷达无信号通讯(可能损坏) [EN: Radar no signal communication (possibly damaged)] + E4020_GYROSCOPE_ABNORMAL = 4020; // 陀螺仪异常(开路或短路无法区分) [EN: Gyroscope abnormal (open/short circuit indistinguishable)] + E4030_TOF_NO_SIGNAL_COMMUNICATION_POSSIBLY_DAMAGED = 4030; // Tof无信号通讯(可能损坏) [EN: TOF no signal communication (possibly damaged)] + E4031_TOF_BLOCKED = 4031; // Tof被遮挡 [EN: TOF blocked] + E4040_CAM_NO_SIGNAL_COMMUNICATION_POSSIBLY_DAMAGED = 4040; // Cam无信号通讯(可能损坏) [EN: Camera no signal communication (possibly damaged)] + E4041_CAM_BLOCKED = 4041; // Cam被遮挡 [EN: Camera blocked] + E4090_WALL_SENSOR_NO_SIGNAL_COMMUNICATION_POSSIBLY_DAMAGED = 4090; // 沿墙无信号通讯(可能损坏) [EN: Wall sensor no signal communication (possibly damaged)] + E4091_WALL_SENSOR_BLOCKED = 4091; // 沿墙被遮挡 [EN: Wall sensor blocked] + E4111_LEFT_FRONT_COLLISION_LONG_TRIGGER = 4111; // 左前撞长触发 [EN: Left front collision long trigger] + E4112_RIGHT_FRONT_COLLISION_LONG_TRIGGER = 4112; // 右前撞长触发 [EN: Right front collision long trigger] + E4120_ULTRASONIC_COMMUNICATION_INTERRUPTED_CLEANING_SCENE = 4120; // 超声通信中断(清洁场景) [EN: Ultrasonic communication interrupted (cleaning scene)] + E4121_ULTRASONIC_COMMUNICATION_INTERRUPTED_NON_CLEANING_SCENE = 4121; // 超声通信中断(非清洁场景) [EN: Ultrasonic communication interrupted (non-cleaning scene)] + E4130_LASER_SHIELD_LONG_TRIGGER = 4130; // 激光罩长触发 [EN: Laser shield long trigger] + E5012_BATTERY_CHARGING_CURRENT_TOO_SMALL = 5012; // 电池充电电流偏小 [EN: Battery charging current too small] + E5010_BATTERY_OPEN_CIRCUIT = 5010; // 电池开路 [EN: Battery open circuit] + E5011_BATTERY_SHORT_CIRCUIT = 5011; // 电池短路 [EN: Battery short circuit] + E5013_BATTERY_DISCHARGE_CURRENT_TOO_LARGE = 5013; // 电池放电电流过大 [EN: Battery discharge current too large] + E5016_CHARGING_CURRENT_TOO_LARGE = 5016; // 充电电流过大 [EN: Charging current too large] + E5017_CHARGING_VOLTAGE_ABNORMAL = 5017; // 充电电压异常 [EN: Charging voltage abnormal] + E5018_BATTERY_TEMPERATURE_ABNORMAL = 5018; // 电池温度异常 [EN: Battery temperature abnormal] + E5021_DISCHARGE_HIGH_TEMPERATURE = 5021; // 放电高温 [EN: Discharge high temperature] + E5022_DISCHARGE_LOW_TEMPERATURE = 5022; // 放电低温 [EN: Discharge low temperature] + E5023_CHARGING_HIGH_TEMPERATURE = 5023; // 充电高温 [EN: Charging high temperature] + E5024_CHARGING_LOW_TEMPERATURE = 5024; // 充电低温 [EN: Charging low temperature] + E5014_LOW_BATTERY_SHUTDOWN = 5014; // 电量低关机 [EN: Low battery shutdown] + E5015_LOW_BATTERY_CANNOT_SCHEDULE_CLEANING = 5015; // 电量低不能预约清洁 [EN: Low battery cannot schedule cleaning] + E5110_WIFI_ABNORMAL = 5110; // Wi-Fi异常 [EN: WiFi abnormal] + E5111_BT_ABNORMAL = 5111; // BT异常 [EN: Bluetooth abnormal] + E5112_INFRARED_COMMUNICATION_ABNORMAL = 5112; // 红外通讯异常 [EN: Infrared communication abnormal] + E6010_CLEAN_WATER_TANK_NOT_INSTALLED = 6010; // 清水箱不在 [EN: Clean water tank not installed] + E6020_DIRTY_WATER_TANK_NOT_INSTALLED = 6020; // 污水箱不在 [EN: Dirty water tank not installed] + E6025_DIRTY_WATER_TANK_ABNORMAL_FULL_OR_NOT_INSTALLED = 6025; // 污水箱异常(满或者不在位) [EN: Dirty water tank abnormal (full or not installed)] + E6011_CLEAN_WATER_TANK_EMPTY = 6011; // 清水箱没水 [EN: Clean water tank empty] + E6021_DIRTY_WATER_TANK_FULL = 6021; // 污水箱满 [EN: Dirty water tank full] + E6012_CLEAN_WATER_PUMP_OPEN_CIRCUIT = 6012; // 清水泵开路 [EN: Clean water pump open circuit] + E6013_CLEAN_WATER_PUMP_SHORT_CIRCUIT = 6013; // 清水泵短路 [EN: Clean water pump short circuit] + E6014_THREE_WAY_VALVE_SHORT_CIRCUIT = 6014; // 三通阀短路 [EN: Three-way valve short circuit] + E6022_DIRTY_WATER_PUMP_OPEN_CIRCUIT = 6022; // 污水泵开路 [EN: Dirty water pump open circuit] + E6023_DIRTY_WATER_PUMP_SHORT_CIRCUIT = 6023; // 污水泵短路 [EN: Dirty water pump short circuit] + E6024_DIRTY_WATER_TANK_NOT_CLOSED_TIGHTLY = 6024; // 污水箱未盖紧 [EN: Dirty water tank not closed tightly] + E6030_CLEANING_DISC_NOT_INSTALLED = 6030; // 清洗盘不在位 [EN: Cleaning disc not installed] + E6031_CLEANING_DISC_WATER_FULL = 6031; // 清洗盘水满 [EN: Cleaning disc water full] + E6032_CLEANING_DISC_NOT_INSTALLED_OR_WATER_FULL = 6032; // 清洗盘不在位或者水满 [EN: Cleaning disc not installed or water full] + E6040_BLOWING_FAN_OPEN_CIRCUIT = 6040; // 吹干风扇开路 [EN: Blowing fan open circuit] + E6041_BLOWING_FAN_SHORT_CIRCUIT = 6041; // 吹干风扇短路 [EN: Blowing fan short circuit] + E6042_HEATING_MODULE_OPEN_CIRCUIT = 6042; // 加热模块开路 [EN: Heating module open circuit] + E6043_NTC_OPEN_CIRCUIT = 6043; // NTC开路 [EN: NTC open circuit] + E6110_VOLTAGE_TRANSFORMER_DEGREE_ABNORMAL = 6110; // 电压互感器度数异常 [EN: Voltage transformer reading abnormal] + E6111_DUST_BIN_LEAKS_AIR = 6111; // 集尘漏风 [EN: Dust bin air leak] + E6112_DUST_BIN_BLOCKED = 6112; // 集尘堵塞 [EN: Dust bin blocked] + E6113_DUST_BAG_NOT_INSTALLED = 6113; // 未安装尘袋 [EN: Dust bag not installed] + E6114_FAN_OVERHEATED = 6114; // 风机过热 [EN: Fan overheated] + E6115_PRESSURE_GAUGE_ABNORMAL = 6115; // 气压计异常 [EN: Pressure gauge abnormal] + // E6300_HAIR_CLEANING_IN_PROGRESS = 6300; // 毛发清理中 [EN: Hair cleaning in progress] + // E6301_LOW_BATTERY_CANNOT_START_HAIR_CUTTING = 6301; // 电量过低,无法启动毛发切割 [EN: Battery too low, cannot start hair cutting] + // E6310_POWER_FAILURE = 6310; // 断电 [EN: Power failure] + E6311_HAIR_CUTTING_COMPONENT_ABNORMAL_OR_BLOCKED_CANNOT_START_WORK = 6311; // 割毛发组件异常或堵塞,无法启动工作 [EN: Hair cutting component abnormal or blocked, cannot start work] + E7000_SMALL_SPACE_TIMEOUT = 7000; // 小空间超时 [EN: Small space timeout] + E7001_PART_OF_MACHINE_SUSPENDED = 7001; // 机器部分悬空 [EN: Part of machine suspended] + E7004_MACHINE_STUCK = 7004; // 机器卡死 [EN: Machine stuck] + E7002_MACHINE_PICKED_UP_EXCEEDING_3_GROUND_CHECKS_WHEEL_SUSPENDED = 7002; // 机器被抱起:超过3个地检判断轮子悬空 [EN: Machine picked up: more than 3 ground checks determined wheels suspended] + E7003_STARTUP_FALLING_SUSPENDED = 7003; // 开机-跌落悬空 [EN: Startup - falling suspended] + E7010_ENTERED_FORBIDDEN_AREA = 7010; // 误入禁区 [EN: Entered forbidden area] + E7011_ENTERED_CARPET = 7011; // 误入地毯 [EN: Entered carpet] + // E7020_POSITIONING_FAILED_IN_GLOBAL_CLEANING = 7020; // 全局清洁时定位失败 [EN: Positioning failed during global cleaning] + // E7021_POSITIONING_FAILED_IN_NON_GLOBAL_CLEANING = 7021; // 其他(非全局清洁)时定位失败 [EN: Positioning failed during other (non-global cleaning)] + E7031_RIDING_FAILURE = 7031; // 上座失败 [EN: Docking failure] + E7035_RIDING_FAILURE_BASE_STATION_NOT_POWERED_ON = 7035; // 上座失败(基站没通电) [EN: Docking failure (station not powered on)] + E7036_RIDING_FAILURE_OMNIWHEEL_JAMMED = 7036; // 上座失败(万向轮卡住) [EN: Docking failure (omniwheel jammed)] + E7037_RIDING_FAILURE_INFRARED_REFLECTION = 7037; // 上座失败(红外反射) [EN: Docking failure (infrared reflection)] + E7033_EXPLORING_BASE_STATION_FAILURE_BASE_STATION_DEPARTURE = 7033; // 探索基站失败(基站出发) [EN: Exploring station failure (departing from station)] + E7034_CANNOT_FIND_STARTING_POINT = 7034; // 找不到起点 [EN: Cannot find starting point] + E7040_DISMOUNT_FAILURE = 7040; // 下座失败 [EN: Undocking failure] + // E7050_CANNOT_REACH = 7050; // 无法抵达 [EN: Cannot reach] + // E7051_SCHEDULE_FAILURE = 7051; // 预约失败 [EN: Schedule failure] + // E7052_PATH_PLANNING_FAILURE = 7052; // 路径规划失败 [EN: Path planning failure] + E7053_MACHINE_TILTED = 7053; // 机器倾斜 [EN: Machine tilted] + E7055_STATION_NOT_FOUND_CANNOT_MOP = 7055; // 未发现基站,无法加水洗拖布,清洁时只扫不拖 [EN: Station not found, cannot add water to wash mop, only sweeping during cleaning without mopping] } enum PromptCodeList { P0000_NONE = 0; - P0061_LOW_BATTERY_RECHARGE_NO_CLEAN = 61; // 低电回充(不继续清扫,断点续扫没开) - P0078_LOW_BATTERY_CANNOT_START_TASK = 78; // 电量不足无法启动任务 - P0065_LOW_BATTERY_30_PERCENT_NOT_ENOUGH = 65; // 电量不足,请充电至30%后再启动任务(30% 电量以下建图) - P0066_LOW_BATTERY_10_PERCENT_NOT_ENOUGH = 66; // 电量不足,请充电至10%后再启动任务(10% 电量以下清洁) - P0079_LOW_BATTERY_RECHARGE = 79; // 低电回充(会继续清扫,断点续扫打开) - P0083_CHILD_LOCK_ON_CANNOT_USE_POSITIONING = 83; // 童锁开,不可用(定点) - P0088_CHILD_LOCK_ON_CANNOT_USE_RECHARGE = 88; // 童锁开,不可用(回充) - P0024_NETWORK_PASSWORD_ERROR = 24; // 配网密码错误 - P0025_ROUTER_NOT_CONNECTED_TO_INTERNET = 25; // 路由器没有联网 - P0085_SCHEDULE_CLEAN_START = 85; // 预约清洁启动 - P0087_MAP_DATA_UPDATING_CANNOT_OPERATE = 87; // 地图数据更新中无法操作 - P0031_LOCATION_SUCCESS = 31; // 定位成功 - P0038_MOPPING_COMPLETED_IN_TASK = 38; // 任务中洗拖布完成 - P0039_MOPPING_COMPLETED_AFTER_TASK = 39; // 任务结束清洗拖布完成 - P0040_RETURN_TO_BASE_AFTER_TASK_COMPLETED = 40; // 任务完成返回基站 - P0045_TASK_COMPLETED = 45; // 任务完成 - P0076_CANNOT_EXECUTE_POSITIONING_RECHARGE_IN_BASE = 76; // 在基站无法执行定点/回充 - P0090_BASE_INSIDE_MOP_BUTTON_PRESSED = 90; // 基站内洗抹布点按键 - P0091_BASE_INSIDE_DUST_COLLECTING_BUTTON_PRESSED = 91; // 基站内集尘点按键 + P0061_LOW_BATTERY_RECHARGE_NO_CLEAN = 61; // 低电回充(不继续清扫,断点续扫没开) [EN: Low battery return to charge (no continued cleaning, resume cleaning not enabled)] + P0078_LOW_BATTERY_CANNOT_START_TASK = 78; // 电量不足无法启动任务 [EN: Battery insufficient cannot start task] + P0065_LOW_BATTERY_30_PERCENT_NOT_ENOUGH = 65; // 电量不足,请充电至30%后再启动任务(30% 电量以下建图) [EN: Battery insufficient, please charge to 30% before starting task (mapping below 30% battery)] + P0066_LOW_BATTERY_10_PERCENT_NOT_ENOUGH = 66; // 电量不足,请充电至10%后再启动任务(10% 电量以下清洁) [EN: Battery insufficient, please charge to 10% before starting task (cleaning below 10% battery)] + P0079_LOW_BATTERY_RECHARGE = 79; // 低电回充(会继续清扫,断点续扫打开) [EN: Low battery return to charge (will continue cleaning, resume cleaning enabled)] + P0083_CHILD_LOCK_ON_CANNOT_USE_POSITIONING = 83; // 童锁开,不可用(定点) [EN: Child lock on, unavailable (spot)] + P0088_CHILD_LOCK_ON_CANNOT_USE_RECHARGE = 88; // 童锁开,不可用(回充) [EN: Child lock on, unavailable (return to charge)] + P0024_NETWORK_PASSWORD_ERROR = 24; // 配网密码错误 [EN: Network configuration password error] + P0025_ROUTER_NOT_CONNECTED_TO_INTERNET = 25; // 路由器没有联网 [EN: Router not connected to internet] + P0085_SCHEDULE_CLEAN_START = 85; // 预约清洁启动 [EN: Scheduled cleaning start] + P0087_MAP_DATA_UPDATING_CANNOT_OPERATE = 87; // 地图数据更新中无法操作 [EN: Cannot operate while map data updating] + P0031_LOCATION_SUCCESS = 31; // 定位成功 [EN: Location success] + P0038_MOPPING_COMPLETED_IN_TASK = 38; // 任务中洗拖布完成 [EN: Mop washing completed during task] + P0039_MOPPING_COMPLETED_AFTER_TASK = 39; // 任务结束清洗拖布完成 [EN: Mop washing completed after task] + P0040_RETURN_TO_BASE_AFTER_TASK_COMPLETED = 40; // 任务完成返回基站 [EN: Return to station after task completed] + P0045_TASK_COMPLETED = 45; // 任务完成 [EN: Task completed] + P0076_CANNOT_EXECUTE_POSITIONING_RECHARGE_IN_BASE = 76; // 在基站无法执行定点/回充 [EN: Cannot execute spot/return to charge at station] + P0090_BASE_INSIDE_MOP_BUTTON_PRESSED = 90; // 基站内洗抹布点按键 [EN: Mop washing button pressed inside station] + P0091_BASE_INSIDE_DUST_COLLECTING_BUTTON_PRESSED = 91; // 基站内集尘点按键 [EN: Dust collection button pressed inside station] - P6117_LOW_BATTERY_CANNOT_START_DUST_COLLECTION = 6117; // 电量低无法启动自动集尘 - P6118_LOW_BATTERY_CANNOT_START_ROLLING_BRUSH_SELF_CLEANING = 6118; // 电量低无法启动滚刷自清洁 - P6300_HAIR_CLEANING_IN_PROGRESS = 6300; // 毛发清理中 - P6301_LOW_BATTERY_CANNOT_START_HAIR_CUTTING = 6301; // 电量过低,无法启动毛发切割 - P6310_POWER_FAILURE = 6310; // 断电 - P7020_POSITIONING_FAILED_IN_GLOBAL_CLEANING = 7020; // 全局清洁时定位失败 - P7021_POSITIONING_FAILED_IN_NON_GLOBAL_CLEANING = 7021; // 其他(非全局清洁)时定位失败 - P7050_CANNOT_REACH = 7050; // 无法抵达 - P7051_SCHEDULE_FAILURE = 7051; // 预约失败 - P7052_PATH_PLANNING_FAILURE = 7052; // 路径规划失败 - P7054_TARGET_NOT_FOUND_STOP_FOLLOWING = 7054; // 智能跟随未发现目标自动退出 -} \ No newline at end of file + P6117_LOW_BATTERY_CANNOT_START_DUST_COLLECTION = 6117; // 电量低无法启动自动集尘 [EN: Low battery cannot start automatic dust collection] + P6118_LOW_BATTERY_CANNOT_START_ROLLING_BRUSH_SELF_CLEANING = 6118; // 电量低无法启动滚刷自清洁 [EN: Low battery cannot start roller brush self-cleaning] + P6300_HAIR_CLEANING_IN_PROGRESS = 6300; // 毛发清理中 [EN: Hair cleaning in progress] + P6301_LOW_BATTERY_CANNOT_START_HAIR_CUTTING = 6301; // 电量过低,无法启动毛发切割 [EN: Battery too low, cannot start hair cutting] + P6310_POWER_FAILURE = 6310; // 断电 [EN: Power failure] + P7020_POSITIONING_FAILED_IN_GLOBAL_CLEANING = 7020; // 全局清洁时定位失败 [EN: Positioning failed during global cleaning] + P7021_POSITIONING_FAILED_IN_NON_GLOBAL_CLEANING = 7021; // 其他(非全局清洁)时定位失败 [EN: Positioning failed during other (non-global cleaning)] + P7050_CANNOT_REACH = 7050; // 无法抵达 [EN: Cannot reach] + P7051_SCHEDULE_FAILURE = 7051; // 预约失败 [EN: Schedule failure] + P7052_PATH_PLANNING_FAILURE = 7052; // 路径规划失败 [EN: Path planning failure] + P7054_TARGET_NOT_FOUND_STOP_FOLLOWING = 7054; // 智能跟随未发现目标自动退出 [EN: Smart follow target not found, auto exit] +} diff --git a/proto-reference/error_code_list_t2080.proto b/proto-reference/error_code_list_t2080.proto index b44fddf..102ca5c 100644 --- a/proto-reference/error_code_list_t2080.proto +++ b/proto-reference/error_code_list_t2080.proto @@ -6,102 +6,102 @@ package proto.cloud.t20xx; enum ErrorCodeList { E000_NONE = 0; - E001_THE_SIDE_BRUSH_IS_STUCK = 1; // 边刷被卡住 - E002_ROLLING_BRUSH_IS_STUCK = 2; // 滚刷被卡住 - E003_FAN_SPEED_IS_ABNORMAL = 3; // 风机转速异常 - E004_MICRO_SWITCH_IS_ABNORMAL = 4; // 微动开关异常 - E005_THE_WHEEL_IS_OVERHANGING = 5; // 轮子悬空 - E006_THE_RIGHT_SIDE_SENSOR_ALONG_THE_WALL_IS_BLOCKED = 6; // 右侧沿墙传感器被挡住 - E007_THE_COLLISION_BUFFER_IS_JAMMED = 7; // 碰撞缓冲器被卡住 - E008_THE_COLLISION_SWITCH_IS_ABNORMAL_THE_MANUAL_OR_APP = 8; // 碰撞开关异常 - E009_ULTRASONIC_SENSOR_IS_ABNORMAL_THE_MANUAL_OR_APP = 9; // 超声波传感器异常 - E010_LASER_PROTECTION_COVER_IS_STUCK = 10; // 激光保护罩被卡住 - E011_LASER_SENSOR_MAY_BE_BLOCKED = 11; // 激光传感器可能被遮挡 - E012_LASER_SENSOR_IS_STUCK_OR_ENTANGLED = 12; // 激光传感器被卡住或缠绕 - E013_COMMUNICATION_MODULE_IS_ABNORMAL = 13; // 通讯模块异常 - E014_THE_POWER_IS_TOO_LOW_THE_SYSTEM_IS_ABOUT_TO_SHUT_DOWN_AUTOMATICALLY = 14; // 电量过低,系统即将自动关机 - E015_PLEASE_PUT_BACK_THE_DUST_BOX_AND_FILTER = 15; // 请装回尘盒和滤网。 - E016_THE_WATER_TANK_IS_TAKEN_OUT = 16; // 水箱取出 - E017_THE_MOP_CLOTH_IS_OFF = 17; // 拖布脱落 - E018_THE_MACHINE_IS_TILTED = 18; // 机器倾斜 - E019_THE_MACHINE_IS_TRAPPED_PLEASE_CLEAR_THE_SURROUNDING_OBSTACLES = 19; // 机器被困 - E020_THE_MACHINE_IS_TRAPPED_PLEASE_MOVE_TO_THE_ORIGINAL_PLACE_NEAR_TO_START = 20; // 机器被困 - E021_THE_WATER_TANK_IS_NOT_ENOUGH = 21; // 清水箱水量不足 - E022_THE_SEWAGE_TANK_IS_FUL = 22; // 污水箱已满 - E023_WATER_TANK_IS_NOT_IN_POSITION = 23; // 水箱不在位 - E024_HEATER_IS_ABNORMAL = 24; // 加热器异常 - E025_THE_WATER_LEVEL_OF_CLEANING_TRAY_IS_ABNORMAL = 25; // 清洗盘水位异常 - E026_THE_CLEANING_TRAY_IS_NOT_INSTALLED = 26; // 清洗盘未安装 + E001_THE_SIDE_BRUSH_IS_STUCK = 1; // 边刷被卡住 [EN: Side brush is stuck] + E002_ROLLING_BRUSH_IS_STUCK = 2; // 滚刷被卡住 [EN: Rolling brush is stuck] + E003_FAN_SPEED_IS_ABNORMAL = 3; // 风机转速异常 [EN: Fan speed is abnormal] + E004_MICRO_SWITCH_IS_ABNORMAL = 4; // 微动开关异常 [EN: Micro switch is abnormal] + E005_THE_WHEEL_IS_OVERHANGING = 5; // 轮子悬空 [EN: Wheel is overhanging] + E006_THE_RIGHT_SIDE_SENSOR_ALONG_THE_WALL_IS_BLOCKED = 6; // 右侧沿墙传感器被挡住 [EN: Right side wall sensor is blocked] + E007_THE_COLLISION_BUFFER_IS_JAMMED = 7; // 碰撞缓冲器被卡住 [EN: Collision buffer is jammed] + E008_THE_COLLISION_SWITCH_IS_ABNORMAL_THE_MANUAL_OR_APP = 8; // 碰撞开关异常 [EN: Collision switch is abnormal] + E009_ULTRASONIC_SENSOR_IS_ABNORMAL_THE_MANUAL_OR_APP = 9; // 超声波传感器异常 [EN: Ultrasonic sensor is abnormal] + E010_LASER_PROTECTION_COVER_IS_STUCK = 10; // 激光保护罩被卡住 [EN: Laser protection cover is stuck] + E011_LASER_SENSOR_MAY_BE_BLOCKED = 11; // 激光传感器可能被遮挡 [EN: Laser sensor may be blocked] + E012_LASER_SENSOR_IS_STUCK_OR_ENTANGLED = 12; // 激光传感器被卡住或缠绕 [EN: Laser sensor is stuck or entangled] + E013_COMMUNICATION_MODULE_IS_ABNORMAL = 13; // 通讯模块异常 [EN: Communication module is abnormal] + E014_THE_POWER_IS_TOO_LOW_THE_SYSTEM_IS_ABOUT_TO_SHUT_DOWN_AUTOMATICALLY = 14; // 电量过低,系统即将自动关机 [EN: Battery too low, system will shut down automatically] + E015_PLEASE_PUT_BACK_THE_DUST_BOX_AND_FILTER = 15; // 请装回尘盒和滤网。 [EN: Please put back the dust box and filter.] + E016_THE_WATER_TANK_IS_TAKEN_OUT = 16; // 水箱取出 [EN: Water tank is taken out] + E017_THE_MOP_CLOTH_IS_OFF = 17; // 拖布脱落 [EN: Mop cloth is off] + E018_THE_MACHINE_IS_TILTED = 18; // 机器倾斜 [EN: Machine is tilted] + E019_THE_MACHINE_IS_TRAPPED_PLEASE_CLEAR_THE_SURROUNDING_OBSTACLES = 19; // 机器被困 [EN: Machine is trapped, please clear surrounding obstacles] + E020_THE_MACHINE_IS_TRAPPED_PLEASE_MOVE_TO_THE_ORIGINAL_PLACE_NEAR_TO_START = 20; // 机器被困 [EN: Machine is trapped, please move to the original place near to start] + E021_THE_WATER_TANK_IS_NOT_ENOUGH = 21; // 清水箱水量不足 [EN: Clean water tank is not enough] + E022_THE_SEWAGE_TANK_IS_FUL = 22; // 污水箱已满 [EN: Sewage tank is full] + E023_WATER_TANK_IS_NOT_IN_POSITION = 23; // 水箱不在位 [EN: Water tank is not in position] + E024_HEATER_IS_ABNORMAL = 24; // 加热器异常 [EN: Heater is abnormal] + E025_THE_WATER_LEVEL_OF_CLEANING_TRAY_IS_ABNORMAL = 25; // 清洗盘水位异常 [EN: Cleaning tray water level is abnormal] + E026_THE_CLEANING_TRAY_IS_NOT_INSTALLED = 26; // 清洗盘未安装 [EN: Cleaning tray is not installed] - E027_TRAVELING_WHEEL_IS_STUCK = 27; // 行走轮被卡住 - E029_NO_GO_ZONE_DETECTED_PLEASE_MOVE = 29; // 检测到禁区,请移动到新位置启动 - E030_VIRTUAL_WALL_MAGNETIC_STRIP_DETECTED_PLEASE_MOVE = 30; // 检测到虚拟墙磁条,请移动到新位置启动 - E031_ROTATING_MOTOR_IS_STUCK = 31; // 旋转电机被卡住 - E032_LIFT_MOTOR_IS_STUCK = 32; // 升降电机被卡住 + E027_TRAVELING_WHEEL_IS_STUCK = 27; // 行走轮被卡住 [EN: Traveling wheel is stuck] + E029_NO_GO_ZONE_DETECTED_PLEASE_MOVE = 29; // 检测到禁区,请移动到新位置启动 [EN: No-go zone detected, please move to new location to start] + E030_VIRTUAL_WALL_MAGNETIC_STRIP_DETECTED_PLEASE_MOVE = 30; // 检测到虚拟墙磁条,请移动到新位置启动 [EN: Virtual wall magnetic strip detected, please move to new location to start] + E031_ROTATING_MOTOR_IS_STUCK = 31; // 旋转电机被卡住 [EN: Rotating motor is stuck] + E032_LIFT_MOTOR_IS_STUCK = 32; // 升降电机被卡住 [EN: Lift motor is stuck] - E051_LONG_TIME_NOT_CLEAN_THE_DUST_BOX = 51; // 长时间未清理尘盒 - E052_CAMERA_LENS_IS_DIRTY = 52; // 摄像头镜头赃污 + E051_LONG_TIME_NOT_CLEAN_THE_DUST_BOX = 51; // 长时间未清理尘盒 [EN: Dust box not cleaned for long time] + E052_CAMERA_LENS_IS_DIRTY = 52; // 摄像头镜头赃污 [EN: Camera lens is dirty] - E101_THE_BATTERY_IS_ABNORMAL = 101; // 电池异常 - E102_THE_WHEEL_MODULE_IS_ABNORMAL = 102; // 轮子模组异常 - E103_THE_SIDE_BRUSH_MODULE_IS_ABNORMAL = 103; // 边刷模组异常 - E104_THE_ROLLER_BRUSH_IS_ABNORMAL = 104; // 滚刷异常 - E105_THE_FAN_IS_ABNORMAL = 105; // 风机异常 - E106_THE_WATER_PUMP_IS_ABNORMAL = 106; // 水泵异常 - E107_THE_LASER_SENSOR_IS_ABNORMAL = 107; // 激光传感器异常 - E108_THE_OPTICAL_FLOW_SENSOR_IS_ABNORMAL = 108; // 光流传感器异常 - E109_THE_GYROSCOPE_IS_ABNORMAL = 109; // 陀螺仪异常 - E110_CAMERA_IS_ABNORMAL = 110; // 摄像头异常 - E111_ROTATION_MOTOR_ABNORMAL = 111; // 旋转电机异常 - E112_LIFT_MOTOR_ABNORMAL = 112; // 升降电机异常 - E113_THE_WATER_SPRAYING_DEVICE_IS_ABNORMAL = 113; // 喷水装置异常 - E114_THE_WATER_PUMPING_DEVICE_IS_ABNORMAL = 114; // 抽水装置异常 - E115_THE_AIR_DRYING_DEVICE_IS_ABNORMAL = 115; // 风干装置异常 - E116_3D_TOF_ABNORMAL = 116; // 3D TOF 异常 - E117_ULTRASONIC_SENSOR_ABNORMAL = 117; // 超声波传感器异常 - E118_LASER_SHIELD_IS_JAMMED = 118; // 激光保护罩被卡住 + E101_THE_BATTERY_IS_ABNORMAL = 101; // 电池异常 [EN: Battery is abnormal] + E102_THE_WHEEL_MODULE_IS_ABNORMAL = 102; // 轮子模组异常 [EN: Wheel module is abnormal] + E103_THE_SIDE_BRUSH_MODULE_IS_ABNORMAL = 103; // 边刷模组异常 [EN: Side brush module is abnormal] + E104_THE_ROLLER_BRUSH_IS_ABNORMAL = 104; // 滚刷异常 [EN: Roller brush is abnormal] + E105_THE_FAN_IS_ABNORMAL = 105; // 风机异常 [EN: Fan is abnormal] + E106_THE_WATER_PUMP_IS_ABNORMAL = 106; // 水泵异常 [EN: Water pump is abnormal] + E107_THE_LASER_SENSOR_IS_ABNORMAL = 107; // 激光传感器异常 [EN: Laser sensor is abnormal] + E108_THE_OPTICAL_FLOW_SENSOR_IS_ABNORMAL = 108; // 光流传感器异常 [EN: Optical flow sensor is abnormal] + E109_THE_GYROSCOPE_IS_ABNORMAL = 109; // 陀螺仪异常 [EN: Gyroscope is abnormal] + E110_CAMERA_IS_ABNORMAL = 110; // 摄像头异常 [EN: Camera is abnormal] + E111_ROTATION_MOTOR_ABNORMAL = 111; // 旋转电机异常 [EN: Rotation motor abnormal] + E112_LIFT_MOTOR_ABNORMAL = 112; // 升降电机异常 [EN: Lift motor abnormal] + E113_THE_WATER_SPRAYING_DEVICE_IS_ABNORMAL = 113; // 喷水装置异常 [EN: Water spraying device is abnormal] + E114_THE_WATER_PUMPING_DEVICE_IS_ABNORMAL = 114; // 抽水装置异常 [EN: Water pumping device is abnormal] + E115_THE_AIR_DRYING_DEVICE_IS_ABNORMAL = 115; // 风干装置异常 [EN: Air drying device is abnormal] + E116_3D_TOF_ABNORMAL = 116; // 3D TOF 异常 [EN: 3D TOF abnormal] + E117_ULTRASONIC_SENSOR_ABNORMAL = 117; // 超声波传感器异常 [EN: Ultrasonic sensor abnormal] + E118_LASER_SHIELD_IS_JAMMED = 118; // 激光保护罩被卡住 [EN: Laser shield is jammed] - E119_MID_SWEEP_OPEN_CIRCUIT_PROTECTION_TEST = 119; // 中扫开路保护测试 - E120_LEFT_AND_RIGHT_WHEEL_OPEN_CIRCUIT_PROTECTION_TEST = 120; // 左右轮开路保护测试 - E121_SIDE_SWEEP_OPEN_CIRCUIT_PROTECTION_TEST = 121; // 边扫开路保护测试 - E122_FAN_OPEN_CIRCUIT_PROTECTION_TEST = 122; // 风机开路保护测试 - E123_RADAR_OPEN_CIRCUIT_PROTECTION_TEST = 123; // 雷达开路保护测试 - E124_TOF_OPEN_CIRCUIT_PROTECTION_TEST = 124; // TOF开路保护测试 - E125_TURNTABLE_MOTOR_OPEN_CIRCUIT = 125; // 转盘电机开路 - E126_LIFT_MOTOR_OPEN_CIRCUIT = 126; // 升降电机开路 - E127_MID_SWEEP_SHORT_CIRCUIT_PROTECTION_TEST = 127; // 中扫短路保护测试 - E128_LEFT_AND_RIGHT_WHEEL_SHORT_CIRCUIT_PROTECTION_TEST = 128; // 左右轮短路保护测试 - E129_SIDE_SWEEP_SHORT_CIRCUIT_PROTECTION_TEST = 129; // 边扫短路保护测试 - E130_TURNTABLE_MOTOR_SHORT_CIRCUIT = 130; // 转盘电机短路 - E131_LIFT_MOTOR_SHORT_CIRCUIT = 131; // 升降电机短路 - E132_MID_SWEEP_BLOCKING_PROTECTION_TEST = 132; // 中扫堵转保护测试 - E133_LEFT_AND_RIGHT_WHEEL_BLOCKING_PROTECTION_TEST = 133; // 左右轮堵转保护测试 - E134_SIDE_SWEEP_BLOCKING_PROTECTION_TEST = 134; // 边扫堵转保护测试 - E135_BLOWER_BLOCKING_PROTECTION_TEST = 135; // 风机堵转保护测试 - E136_TURNTABLE_MOTOR_BLOCKING_TEST = 136; // 转盘电机堵转测试 - E137_LIFTING_MOTOR_BLOCKING_TEST = 137; // 升降电机堵转测试 - E138_FORWARD_COLLISION_PROTECTION_TEST = 138; // 前撞保护测试 - E139_OFF_GROUND_PROTECTION_TEST = 139; // 离地保护测试 - E140_GRAY_LAYER_BOX_PROTECTION_TEST = 140; // 灰层盒保护测试 - E141_T2310_HOST_WATER_TANK_PROTECTION_TEST = 141; // T2310主机水箱保护测试 - E142_RADAR_COVER_MICRO_SWITCH_JAMMING_PROTECTION = 142; // 雷达盖微动开关卡死保护 - E143_T2320_BASE_STATION_WATER_TANK_IS_NOT_IN_POSITION = 143; // T2320基站清水箱不在位 - E144_T2320_BASE_STATION_SEWAGE_TANK_IS_NOT_IN_POSITION = 144; // T2320基站污水箱不在位 - E145_T2320_BASE_STATION_SEWAGE_TANK_FULL = 145; // T2320基站污水箱满 - E151_LEFT_WHEEL_OPEN_CIRCUIT_PROTECTION_TEST = 151; // 左轮开路保护测试 - E152_RIGHT_WHEEL_OPEN_CIRCUIT_PROTECTION_TEST = 152; // 右轮开路保护测试 + E119_MID_SWEEP_OPEN_CIRCUIT_PROTECTION_TEST = 119; // 中扫开路保护测试 [EN: Mid sweep open circuit protection test] + E120_LEFT_AND_RIGHT_WHEEL_OPEN_CIRCUIT_PROTECTION_TEST = 120; // 左右轮开路保护测试 [EN: Left and right wheel open circuit protection test] + E121_SIDE_SWEEP_OPEN_CIRCUIT_PROTECTION_TEST = 121; // 边扫开路保护测试 [EN: Side sweep open circuit protection test] + E122_FAN_OPEN_CIRCUIT_PROTECTION_TEST = 122; // 风机开路保护测试 [EN: Fan open circuit protection test] + E123_RADAR_OPEN_CIRCUIT_PROTECTION_TEST = 123; // 雷达开路保护测试 [EN: Radar open circuit protection test] + E124_TOF_OPEN_CIRCUIT_PROTECTION_TEST = 124; // TOF开路保护测试 [EN: TOF open circuit protection test] + E125_TURNTABLE_MOTOR_OPEN_CIRCUIT = 125; // 转盘电机开路 [EN: Turntable motor open circuit] + E126_LIFT_MOTOR_OPEN_CIRCUIT = 126; // 升降电机开路 [EN: Lift motor open circuit] + E127_MID_SWEEP_SHORT_CIRCUIT_PROTECTION_TEST = 127; // 中扫短路保护测试 [EN: Mid sweep short circuit protection test] + E128_LEFT_AND_RIGHT_WHEEL_SHORT_CIRCUIT_PROTECTION_TEST = 128; // 左右轮短路保护测试 [EN: Left and right wheel short circuit protection test] + E129_SIDE_SWEEP_SHORT_CIRCUIT_PROTECTION_TEST = 129; // 边扫短路保护测试 [EN: Side sweep short circuit protection test] + E130_TURNTABLE_MOTOR_SHORT_CIRCUIT = 130; // 转盘电机短路 [EN: Turntable motor short circuit] + E131_LIFT_MOTOR_SHORT_CIRCUIT = 131; // 升降电机短路 [EN: Lift motor short circuit] + E132_MID_SWEEP_BLOCKING_PROTECTION_TEST = 132; // 中扫堵转保护测试 [EN: Mid sweep blocking protection test] + E133_LEFT_AND_RIGHT_WHEEL_BLOCKING_PROTECTION_TEST = 133; // 左右轮堵转保护测试 [EN: Left and right wheel blocking protection test] + E134_SIDE_SWEEP_BLOCKING_PROTECTION_TEST = 134; // 边扫堵转保护测试 [EN: Side sweep blocking protection test] + E135_BLOWER_BLOCKING_PROTECTION_TEST = 135; // 风机堵转保护测试 [EN: Blower blocking protection test] + E136_TURNTABLE_MOTOR_BLOCKING_TEST = 136; // 转盘电机堵转测试 [EN: Turntable motor blocking test] + E137_LIFTING_MOTOR_BLOCKING_TEST = 137; // 升降电机堵转测试 [EN: Lifting motor blocking test] + E138_FORWARD_COLLISION_PROTECTION_TEST = 138; // 前撞保护测试 [EN: Forward collision protection test] + E139_OFF_GROUND_PROTECTION_TEST = 139; // 离地保护测试 [EN: Off ground protection test] + E140_GRAY_LAYER_BOX_PROTECTION_TEST = 140; // 灰层盒保护测试 [EN: Gray layer box protection test] + E141_T2310_HOST_WATER_TANK_PROTECTION_TEST = 141; // T2310主机水箱保护测试 [EN: T2310 host water tank protection test] + E142_RADAR_COVER_MICRO_SWITCH_JAMMING_PROTECTION = 142; // 雷达盖微动开关卡死保护 [EN: Radar cover micro switch jamming protection] + E143_T2320_BASE_STATION_WATER_TANK_IS_NOT_IN_POSITION = 143; // T2320基站清水箱不在位 [EN: T2320 base station clean water tank is not in position] + E144_T2320_BASE_STATION_SEWAGE_TANK_IS_NOT_IN_POSITION = 144; // T2320基站污水箱不在位 [EN: T2320 base station sewage tank is not in position] + E145_T2320_BASE_STATION_SEWAGE_TANK_FULL = 145; // T2320基站污水箱满 [EN: T2320 base station sewage tank full] + E151_LEFT_WHEEL_OPEN_CIRCUIT_PROTECTION_TEST = 151; // 左轮开路保护测试 [EN: Left wheel open circuit protection test] + E152_RIGHT_WHEEL_OPEN_CIRCUIT_PROTECTION_TEST = 152; // 右轮开路保护测试 [EN: Right wheel open circuit protection test] } enum PromptCodeList { P000_NONE = 0; - P001_START_SCHEDULED_CLEANING = 1; // 开始预约清洁 - P002_START_CRUISE_APPOINTMENT = 2; // 开始预约巡航 - P003_POWER_IS_LOW_RETURN_TO_BASE_STATION_IMMEDIATELY = 3; // 电量不足,立即返回基站 - P004_POSITIONING_FAILED_REBUILD_MAP_START_NEW_CLEANING = 4; // 定位失败,重新建图,开始新清洁 - P005_POSITIONING_FAILED_MISSION_ENDED_START_BACK_TO_BASE_STATION = 5; // 定位失败,任务结束,开始返回基站 - P006_SOME_AREAS_ARE_NOT_YET_CLEANED_BECAUSE_THEY_ARE_UNREACHABLE = 6; // 部分区域因为无法到达,还未清洁 - P007_PATH_PLANNING_FAILED_CANT_REACH_THE_DESIGNATED_AREA = 7; // 路径规划失败,无法到达指定区域 - P008_UNABLE_TO_REACH_THE_TARGET_POINT = 8; // 无法到达目标点 - P009_BASE_STATION_EXPLORATION_FAILED_THE_MACHINE_RETURNED_TO_THE_STARTING_POINT = 9; // 基站探索失败,机器返回起点 - P010_BASE_STATION_EXPLORATION_FAILED_MACHINE_STOPPED_WORKING = 10; // 基站探索失败,机器停止工作 + P001_START_SCHEDULED_CLEANING = 1; // 开始预约清洁 [EN: Start scheduled cleaning] + P002_START_CRUISE_APPOINTMENT = 2; // 开始预约巡航 [EN: Start scheduled cruise] + P003_POWER_IS_LOW_RETURN_TO_BASE_STATION_IMMEDIATELY = 3; // 电量不足,立即返回基站 [EN: Battery low, return to base station immediately] + P004_POSITIONING_FAILED_REBUILD_MAP_START_NEW_CLEANING = 4; // 定位失败,重新建图,开始新清洁 [EN: Positioning failed, rebuild map, start new cleaning] + P005_POSITIONING_FAILED_MISSION_ENDED_START_BACK_TO_BASE_STATION = 5; // 定位失败,任务结束,开始返回基站 [EN: Positioning failed, mission ended, start returning to base station] + P006_SOME_AREAS_ARE_NOT_YET_CLEANED_BECAUSE_THEY_ARE_UNREACHABLE = 6; // 部分区域因为无法到达,还未清洁 [EN: Some areas are not yet cleaned because they are unreachable] + P007_PATH_PLANNING_FAILED_CANT_REACH_THE_DESIGNATED_AREA = 7; // 路径规划失败,无法到达指定区域 [EN: Path planning failed, cannot reach the designated area] + P008_UNABLE_TO_REACH_THE_TARGET_POINT = 8; // 无法到达目标点 [EN: Unable to reach the target point] + P009_BASE_STATION_EXPLORATION_FAILED_THE_MACHINE_RETURNED_TO_THE_STARTING_POINT = 9; // 基站探索失败,机器返回起点 [EN: Base station exploration failed, machine returned to starting point] + P010_BASE_STATION_EXPLORATION_FAILED_MACHINE_STOPPED_WORKING = 10; // 基站探索失败,机器停止工作 [EN: Base station exploration failed, machine stopped working] } diff --git a/proto-reference/error_code_list_t2265.proto b/proto-reference/error_code_list_t2265.proto index 298c32d..224f04c 100644 --- a/proto-reference/error_code_list_t2265.proto +++ b/proto-reference/error_code_list_t2265.proto @@ -7,80 +7,80 @@ package proto.cloud.t22xx; enum ErrorCodeList { E0000_NONE = 0; - E1010_LEFT_WHEEL_OPEN_CIRCUIT = 1010; // 左轮开路 - E1011_LEFT_WHEEL_SHORT_CIRCUIT = 1011; // 左轮短路 - E1012_LEFT_WHEEL_ERROR = 1012; // 左轮异常 - E1013_LEFT_WHEEL_STUCK = 1013; // 左轮被卡住 - E1020_RIGHT_WHEEL_OPEN_CIRCUIT = 1020; // 右轮开路 - E1021_RIGHT_WHEEL_SHORT_CIRCUIT = 1021; // 右轮短路 - E1022_RIGHT_WHEEL_ERROR = 1022; // 右轮异常 - E1023_RIGHT_WHEEL_STUCK = 1023; // 右轮被卡住 - E1030_WHEELS_OPEN_CIRCUIT = 1030; // 双轮开路 - E1031_WHEELS_SHORT_CIRCUIT = 1031; // 双轮短路 - E1032_WHEELS_ERROR = 1032; // 双轮异常 - E1033_WHEELS_STUCK = 1033; // 双轮被卡住 + E1010_LEFT_WHEEL_OPEN_CIRCUIT = 1010; // 左轮开路 [EN: Left wheel open circuit] + E1011_LEFT_WHEEL_SHORT_CIRCUIT = 1011; // 左轮短路 [EN: Left wheel short circuit] + E1012_LEFT_WHEEL_ERROR = 1012; // 左轮异常 [EN: Left wheel error] + E1013_LEFT_WHEEL_STUCK = 1013; // 左轮被卡住 [EN: Left wheel stuck] + E1020_RIGHT_WHEEL_OPEN_CIRCUIT = 1020; // 右轮开路 [EN: Right wheel open circuit] + E1021_RIGHT_WHEEL_SHORT_CIRCUIT = 1021; // 右轮短路 [EN: Right wheel short circuit] + E1022_RIGHT_WHEEL_ERROR = 1022; // 右轮异常 [EN: Right wheel error] + E1023_RIGHT_WHEEL_STUCK = 1023; // 右轮被卡住 [EN: Right wheel stuck] + E1030_WHEELS_OPEN_CIRCUIT = 1030; // 双轮开路 [EN: Both wheels open circuit] + E1031_WHEELS_SHORT_CIRCUIT = 1031; // 双轮短路 [EN: Both wheels short circuit] + E1032_WHEELS_ERROR = 1032; // 双轮异常 [EN: Both wheels error] + E1033_WHEELS_STUCK = 1033; // 双轮被卡住 [EN: Both wheels stuck] - E2010_SUNCTION_FAN_OPEN_CIRCUIT = 2010; // 单风机开路 - E2013_SUNCTION_FAN_RPM_ERROR = 2013; // 单风机转数异常 - E2110_ROLLER_BRUSH_OPEN_CIRCUIT = 2110; // 滚刷开路 - E2111_ROLLER_BRUSH_SHORT_CIRCUIT = 2111; // 滚刷短路 - E2112_ROLLER_BRUSH_STUCK = 2112; // 滚刷被卡住 - E2210_SIDE_BRUSH_OPEN_CIRCUIT = 2210; // 边刷开路 - E2211_SIDE_BRUSH_SHORT_CIRCUIT = 2211; // 边刷短路 - E2212_SIDE_BRUSH_ERROR = 2212; // 边刷异常 - E2213_SIDE_BRUSH_STUCK = 2213; // 边刷被卡住 - E2310_DUSTBIN_NOT_INSTALLED = 2310; // 尘盒和滤网不在位 - E2311_DUSTBIN_NOT_CLEANED_FOR_TOO_LONG = 2311; // 长时间未清理尘盒 - E3010_ROBOT_WATER_PUMP_OPEN_CIRCUIT = 3010; // 机器人水泵开路 - E3013_ROBOT_WATER_INSUFFICIENT = 3013; // 机器人水量不足 + E2010_SUNCTION_FAN_OPEN_CIRCUIT = 2010; // 单风机开路 [EN: Single fan open circuit] + E2013_SUNCTION_FAN_RPM_ERROR = 2013; // 单风机转数异常 [EN: Single fan RPM error] + E2110_ROLLER_BRUSH_OPEN_CIRCUIT = 2110; // 滚刷开路 [EN: Roller brush open circuit] + E2111_ROLLER_BRUSH_SHORT_CIRCUIT = 2111; // 滚刷短路 [EN: Roller brush short circuit] + E2112_ROLLER_BRUSH_STUCK = 2112; // 滚刷被卡住 [EN: Roller brush stuck] + E2210_SIDE_BRUSH_OPEN_CIRCUIT = 2210; // 边刷开路 [EN: Side brush open circuit] + E2211_SIDE_BRUSH_SHORT_CIRCUIT = 2211; // 边刷短路 [EN: Side brush short circuit] + E2212_SIDE_BRUSH_ERROR = 2212; // 边刷异常 [EN: Side brush error] + E2213_SIDE_BRUSH_STUCK = 2213; // 边刷被卡住 [EN: Side brush stuck] + E2310_DUSTBIN_NOT_INSTALLED = 2310; // 尘盒和滤网不在位 [EN: Dustbin and filter not in place] + E2311_DUSTBIN_NOT_CLEANED_FOR_TOO_LONG = 2311; // 长时间未清理尘盒 [EN: Dustbin not cleaned for too long] + E3010_ROBOT_WATER_PUMP_OPEN_CIRCUIT = 3010; // 机器人水泵开路 [EN: Robot water pump open circuit] + E3013_ROBOT_WATER_INSUFFICIENT = 3013; // 机器人水量不足 [EN: Robot water insufficient] - E4010_LASER_ERROR = 4010; // 激光传感器异常 - E4011_LASER_BLOCKED = 4011; // 激光传感器被遮挡 - E4012_LASER_STUCK = 4012; // 激光传感器被卡住或缠绕 - E4111_LEFT_BUMPER_STUCK = 4111; // 左前撞被卡住 - E4112_RIGHT_BUMPER_STUCK = 4112; // 右前撞被卡住 - E4130_LASER_COVER_STUCK = 4130; // 激光罩被卡住 + E4010_LASER_ERROR = 4010; // 激光传感器异常 [EN: Laser sensor error] + E4011_LASER_BLOCKED = 4011; // 激光传感器被遮挡 [EN: Laser sensor blocked] + E4012_LASER_STUCK = 4012; // 激光传感器被卡住或缠绕 [EN: Laser sensor stuck or entangled] + E4111_LEFT_BUMPER_STUCK = 4111; // 左前撞被卡住 [EN: Left bumper stuck] + E4112_RIGHT_BUMPER_STUCK = 4112; // 右前撞被卡住 [EN: Right bumper stuck] + E4130_LASER_COVER_STUCK = 4130; // 激光罩被卡住 [EN: Laser cover stuck] - E5014_LOW_BATTERY_SHUT_DOWN = 5014; // 电量低关机 - E5015_LOW_BATTERY_SCHEDULES_FAILED = 5015; // 电量低不能预约清洁 - E5110_WIFI_OR_BLUETOOTH_ERROR = 5110; // WIFI或蓝牙异常 - E5112_STATION_COMMUNICATION_ERROR = 5112; // 基站通信异常 - E6113_NO_DUST_BAG_INSTALLED = 6113; // 未安装尘袋 - E6310_CUT_HAIR_INTERRUPTED = 6310; // 切割毛发被中断 - E6311_CUT_HAIR_STUCK = 6311; // 割毛发组件被卡住 + E5014_LOW_BATTERY_SHUT_DOWN = 5014; // 电量低关机 [EN: Low battery shutdown] + E5015_LOW_BATTERY_SCHEDULES_FAILED = 5015; // 电量低不能预约清洁 [EN: Low battery cannot schedule cleaning] + E5110_WIFI_OR_BLUETOOTH_ERROR = 5110; // WIFI或蓝牙异常 [EN: WiFi or Bluetooth error] + E5112_STATION_COMMUNICATION_ERROR = 5112; // 基站通信异常 [EN: Station communication error] + E6113_NO_DUST_BAG_INSTALLED = 6113; // 未安装尘袋 [EN: No dust bag installed] + E6310_CUT_HAIR_INTERRUPTED = 6310; // 切割毛发被中断 [EN: Hair cutting interrupted] + E6311_CUT_HAIR_STUCK = 6311; // 割毛发组件被卡住 [EN: Hair cutting component stuck] - E7000_ROBOT_TRAPPED = 7000; // 机器被困 - E7001_ROBOT_PARTLY_SUSPEND = 7001; // 机器部分悬空 - E7002_ROBOT_SUSPEND = 7002; // 机器完全悬空(被抬起) - E7003_ROBOT_STARTUP_SUSPEND = 7003; // 机器启动自检时检测到悬空 - E7010_ENTERED_NO_GO_ZONE = 7010; // 误入禁区 + E7000_ROBOT_TRAPPED = 7000; // 机器被困 [EN: Robot trapped] + E7001_ROBOT_PARTLY_SUSPEND = 7001; // 机器部分悬空 [EN: Robot partly suspended] + E7002_ROBOT_SUSPEND = 7002; // 机器完全悬空(被抬起) [EN: Robot fully suspended (picked up)] + E7003_ROBOT_STARTUP_SUSPEND = 7003; // 机器启动自检时检测到悬空 [EN: Robot detected suspended during startup self-check] + E7010_ENTERED_NO_GO_ZONE = 7010; // 误入禁区 [EN: Entered no-go zone] - E7020_POSITIONING_FAILED_AND_START_CLEANING = 7020; // 定位失败,开始新清洁 - E7021_POSITIONING_FAILED_AND_HEADING_HOME = 7021; // 定位失败,返回基站 + E7020_POSITIONING_FAILED_AND_START_CLEANING = 7020; // 定位失败,开始新清洁 [EN: Positioning failed, start new cleaning] + E7021_POSITIONING_FAILED_AND_HEADING_HOME = 7021; // 定位失败,返回基站 [EN: Positioning failed, returning to station] - E7031_RETURN_FAILED = 7031; // 上座失败 - E7032_FIND_STATION_FAILED_AND_RETURN_START_POINT = 7032; // 探索基站失败,返回起点 - E7033_RETURN_STATION_FAILED_AND_STOP = 7033; // 返回基站失败,停止工作 - E7034_FINE_START_POINT_FAILED_AND_STOP = 7034; // 找不到起点,停止工作 - E7040_LEAVE_STATION_FAILED = 7040; // 下座失败 - E7050_INACCESSIBLE_AREAS_NOT_CLEANED = 7050; // 部分区域无法到达,还未清洁 - E7051_IN_TASK_SCHEDULES_FAILED = 7051; // 任务中,预约清洁启动失败 - E7052_ROUTE_UNAVAILABLE = 7052; // 路径规划失败,无法到达指定区域 + E7031_RETURN_FAILED = 7031; // 上座失败 [EN: Docking failed] + E7032_FIND_STATION_FAILED_AND_RETURN_START_POINT = 7032; // 探索基站失败,返回起点 [EN: Station exploration failed, returning to start point] + E7033_RETURN_STATION_FAILED_AND_STOP = 7033; // 返回基站失败,停止工作 [EN: Return to station failed, stopped working] + E7034_FINE_START_POINT_FAILED_AND_STOP = 7034; // 找不到起点,停止工作 [EN: Cannot find start point, stopped working] + E7040_LEAVE_STATION_FAILED = 7040; // 下座失败 [EN: Undocking failed] + E7050_INACCESSIBLE_AREAS_NOT_CLEANED = 7050; // 部分区域无法到达,还未清洁 [EN: Some areas inaccessible, not cleaned] + E7051_IN_TASK_SCHEDULES_FAILED = 7051; // 任务中,预约清洁启动失败 [EN: During task, scheduled cleaning start failed] + E7052_ROUTE_UNAVAILABLE = 7052; // 路径规划失败,无法到达指定区域 [EN: Route planning failed, cannot reach designated area] } enum PromptCodeList { P0000_NONE = 0; - P0031_POSITIONING_SUCCESSFUL = 31; // 定位成功 - P0040_TASK_FINISHED_HEADING_HOME = 40; // 任务完成,开始返回 - P0076_NO_PERFORMANCE_AT_STATION = 76; // 在充电座或基站上无法执行任务 - P0078_LOW_BATTERY_NEED_CHARGING = 78; // 电量不足,请充电后再试 - P0079_LOW_BATTERY_HEADING_HOME = 79; // 电量不足,开始返回 - P0085_SCHEDULED_CLEANING = 85; // 开始预约清洁 - P0087_MAP_UPDATING_TRY_LATER = 87; // 地图数据更新中,请稍后再试 + P0031_POSITIONING_SUCCESSFUL = 31; // 定位成功 [EN: Positioning successful] + P0040_TASK_FINISHED_HEADING_HOME = 40; // 任务完成,开始返回 [EN: Task finished, heading home] + P0076_NO_PERFORMANCE_AT_STATION = 76; // 在充电座或基站上无法执行任务 [EN: Cannot perform task on charging dock or station] + P0078_LOW_BATTERY_NEED_CHARGING = 78; // 电量不足,请充电后再试 [EN: Low battery, please charge and try again] + P0079_LOW_BATTERY_HEADING_HOME = 79; // 电量不足,开始返回 [EN: Low battery, heading home] + P0085_SCHEDULED_CLEANING = 85; // 开始预约清洁 [EN: Start scheduled cleaning] + P0087_MAP_UPDATING_TRY_LATER = 87; // 地图数据更新中,请稍后再试 [EN: Map data updating, please try later] - P6301_LOW_BATTERY_CANT_CUT_HAIR = 6301; // 电量不足,无法割毛发 - P6300_CUTTING_HAIR = 6300; // 正在割毛发清理 + P6301_LOW_BATTERY_CANT_CUT_HAIR = 6301; // 电量不足,无法割毛发 [EN: Low battery, cannot cut hair] + P6300_CUTTING_HAIR = 6300; // 正在割毛发清理 [EN: Cutting hair cleaning] } diff --git a/proto-reference/error_code_list_t2320.proto b/proto-reference/error_code_list_t2320.proto index 38c6328..0629867 100644 --- a/proto-reference/error_code_list_t2320.proto +++ b/proto-reference/error_code_list_t2320.proto @@ -5,81 +5,81 @@ syntax = "proto3"; enum ErrorCodeList { E000_NONE = 0; - E001_CRASH_BUFFER_IS_STUCK = 1; // 碰撞缓冲器被卡住 - E002_WHEEL_IS_STUCK = 2; // 轮子被卡住 - E003_THE_SIDE_BRUSH_IS_STUCK = 3; // 边刷被卡住 - E004_ROLLING_BRUSH_IS_STUCK = 4; // 滚刷被卡住 - E005_THE_HOST_MACHINE_IS_TRAPPED_PLEASE_CLEAR_OBSTACLES = 5; // 主机被困,请清理周围障碍物 - E006_MACHINE_IS_TRAPPED_PLEASE_MOVE_TO_START = 6; // 机器被困,请移动到原地附近启动 - E007_THE_WHEEL_IS_OVERHANGING = 7; // 轮子悬空 - E008_THE_POWER_IS_TOO_LOW_THE_SYSTEM_IS_ABOUT_TO_SHUT_DOWN_AUTOMATICALLY = 8; // 电量过低,系统即将自动关机 + E001_CRASH_BUFFER_IS_STUCK = 1; // 碰撞缓冲器被卡住 [EN: Crash buffer is stuck] + E002_WHEEL_IS_STUCK = 2; // 轮子被卡住 [EN: Wheel is stuck] + E003_THE_SIDE_BRUSH_IS_STUCK = 3; // 边刷被卡住 [EN: Side brush is stuck] + E004_ROLLING_BRUSH_IS_STUCK = 4; // 滚刷被卡住 [EN: Rolling brush is stuck] + E005_THE_HOST_MACHINE_IS_TRAPPED_PLEASE_CLEAR_OBSTACLES = 5; // 主机被困,请清理周围障碍物 [EN: Host machine is trapped, please clear obstacles] + E006_MACHINE_IS_TRAPPED_PLEASE_MOVE_TO_START = 6; // 机器被困,请移动到原地附近启动 [EN: Machine is trapped, please move to original place nearby to start] + E007_THE_WHEEL_IS_OVERHANGING = 7; // 轮子悬空 [EN: Wheel is overhanging] + E008_THE_POWER_IS_TOO_LOW_THE_SYSTEM_IS_ABOUT_TO_SHUT_DOWN_AUTOMATICALLY = 8; // 电量过低,系统即将自动关机 [EN: Battery too low, system will shut down automatically] - E013_THE_HOST_IS_TILTED = 13; // 主机倾斜 - E014_THE_FAULT_NO_DUST_BOX = 14; // 请装回尘盒和滤网 - E017_FORBIDDEN_AREA_IS_DETECTED = 17; // 检测到禁区 - E018_THE_LASER_PROTECTION_COVER_IS_STUCK = 18; // 激光保护罩被卡住 - E019_LASER_SENSOR_IS_STUCK_OR_TANGLED = 19; // 激光传感器被卡住或缠绕 - E020_LASER_SENSOR_MAY_BE_BLOCKED = 20; // 激光传感器可能被遮挡 - E021_ON_DOCK_FAILED = 21; // 上座失败 - E026_INSUFFICIENT_POWER_APPOINTMENT_START_FAILED = 26; // 错误26: 电量不足,预约启动失败 - E031_FOREIGN_OBJECTS_STUCK_IN_SUCTION_PORT = 31; // 吸口卡主异物 - E032_THE_WIPE_HOLDER_ROTATING_MOTOR_IS_STUCK = 32; // 抹布支架旋转电机被卡住,请清除抹布上被缠绕的异物。 - E033_THE_WIPING_BRACKET_LIFT_MOTOR_IS_STUCK = 33; // 抹布支架升降电机被卡住,请清除升降支架内异物。 - E039_POSITIONING_FAILED_END_OF_CLEANING = 39; // 错误39:定位失败,结束清扫,请确认当前使用地图是否与家庭环境匹配。 - E040_THE_MOP_CLOTH_IS_DISLODGED = 40; // 拖布脱落 - E041_THE_AIRDRYING_DEVICE_HEATER_IS_ABNORMAL = 41; // 风干装置加热器异常 - E050_THE_MACHINE_IS_ON_THE_CARPET_BY_MISTAKE = 50; // 机器误上地毯,请检查 - E051_THE_CAMERA_BLOCK = 51; // 摄像头被遮挡,请检查 - E052_UNABLE_TO_LEAVE_THE_STATION = 52; // 机器下座失败,请检查周围环境 - E055_EXPLORING_STATION_FAILED = 55; // 探索基站失败 + E013_THE_HOST_IS_TILTED = 13; // 主机倾斜 [EN: Host is tilted] + E014_THE_FAULT_NO_DUST_BOX = 14; // 请装回尘盒和滤网 [EN: Please put back the dust box and filter] + E017_FORBIDDEN_AREA_IS_DETECTED = 17; // 检测到禁区 [EN: Forbidden area detected] + E018_THE_LASER_PROTECTION_COVER_IS_STUCK = 18; // 激光保护罩被卡住 [EN: Laser protection cover is stuck] + E019_LASER_SENSOR_IS_STUCK_OR_TANGLED = 19; // 激光传感器被卡住或缠绕 [EN: Laser sensor is stuck or tangled] + E020_LASER_SENSOR_MAY_BE_BLOCKED = 20; // 激光传感器可能被遮挡 [EN: Laser sensor may be blocked] + E021_ON_DOCK_FAILED = 21; // 上座失败 [EN: Docking failed] + E026_INSUFFICIENT_POWER_APPOINTMENT_START_FAILED = 26; // 错误26: 电量不足,预约启动失败 [EN: Error 26: Insufficient power, scheduled start failed] + E031_FOREIGN_OBJECTS_STUCK_IN_SUCTION_PORT = 31; // 吸口卡主异物 [EN: Foreign objects stuck in suction port] + E032_THE_WIPE_HOLDER_ROTATING_MOTOR_IS_STUCK = 32; // 抹布支架旋转电机被卡住,请清除抹布上被缠绕的异物。 [EN: Wipe holder rotating motor is stuck, please clear the foreign objects tangled on the mop.] + E033_THE_WIPING_BRACKET_LIFT_MOTOR_IS_STUCK = 33; // 抹布支架升降电机被卡住,请清除升降支架内异物。 [EN: Wiping bracket lift motor is stuck, please clear foreign objects inside the lifting bracket.] + E039_POSITIONING_FAILED_END_OF_CLEANING = 39; // 错误39:定位失败,结束清扫,请确认当前使用地图是否与家庭环境匹配。 [EN: Error 39: Positioning failed, cleaning ended, please confirm if the current map matches the home environment.] + E040_THE_MOP_CLOTH_IS_DISLODGED = 40; // 拖布脱落 [EN: Mop cloth is dislodged] + E041_THE_AIRDRYING_DEVICE_HEATER_IS_ABNORMAL = 41; // 风干装置加热器异常 [EN: Air drying device heater is abnormal] + E050_THE_MACHINE_IS_ON_THE_CARPET_BY_MISTAKE = 50; // 机器误上地毯,请检查 [EN: Machine accidentally on carpet, please check] + E051_THE_CAMERA_BLOCK = 51; // 摄像头被遮挡,请检查 [EN: Camera is blocked, please check] + E052_UNABLE_TO_LEAVE_THE_STATION = 52; // 机器下座失败,请检查周围环境 [EN: Unable to leave station, please check surroundings] + E055_EXPLORING_STATION_FAILED = 55; // 探索基站失败 [EN: Exploring station failed] - E070_CLEAN_DUST_COLLECTOR_AND_FITTER = 70; // 请清理尘盒和滤网 - E071_WALL_SENSOR_DO_NOT_WORK = 71; // 沿墙传感器异常 - E072_INSUFFICIENT_WATER_OF_ROBOVAC = 72; // 水箱水量不足 - E073_DIRTY_TANK_OF_STATION_IS_FULL = 73; // 污水箱满 - E074_CLEAN_WATER_OF_STATION_IS_INSUFFICIENT = 74; // 清水箱水量不足 - E075_WATER_TANK_IS_ABSENT = 75; // 基站内没有清水箱或者污水箱 - E076_CAMERA_IS_ABNORMAL = 76; // 摄像头异常 - E077_3D_TOF_IS_ABNORMAL = 77; // 3d tof异常 - E078_ULTRASONIC_SENSOR_IS_ABNORMAL = 78; // 超声波传感器异常 - E079_CLEAN_TRAY_OF_STATION_IS_NOT_INSTALLED = 79; // 清洗盘未安装 - E080_ROBOVAC_AND_STATION_COMMUNICATION_IS_ABNORMAL = 80; // 主机与基站通信异常 - E081_SEWAGE_TANK_IS_LEAKING_GAS = 81; // 污水箱漏气 - E082_CLEAN_TRAY_OF_STATION_NEED_CLEAN = 82; // 请清理清洗盘 - E083_POOR_CONTACT_DURING_CHARGING = 83; // 充电时接触不良,请检查 + E070_CLEAN_DUST_COLLECTOR_AND_FITTER = 70; // 请清理尘盒和滤网 [EN: Please clean dust collector and filter] + E071_WALL_SENSOR_DO_NOT_WORK = 71; // 沿墙传感器异常 [EN: Wall sensor does not work] + E072_INSUFFICIENT_WATER_OF_ROBOVAC = 72; // 水箱水量不足 [EN: Robovac water tank insufficient] + E073_DIRTY_TANK_OF_STATION_IS_FULL = 73; // 污水箱满 [EN: Station dirty tank is full] + E074_CLEAN_WATER_OF_STATION_IS_INSUFFICIENT = 74; // 清水箱水量不足 [EN: Station clean water insufficient] + E075_WATER_TANK_IS_ABSENT = 75; // 基站内没有清水箱或者污水箱 [EN: No clean water tank or dirty water tank in station] + E076_CAMERA_IS_ABNORMAL = 76; // 摄像头异常 [EN: Camera is abnormal] + E077_3D_TOF_IS_ABNORMAL = 77; // 3d tof异常 [EN: 3D TOF is abnormal] + E078_ULTRASONIC_SENSOR_IS_ABNORMAL = 78; // 超声波传感器异常 [EN: Ultrasonic sensor is abnormal] + E079_CLEAN_TRAY_OF_STATION_IS_NOT_INSTALLED = 79; // 清洗盘未安装 [EN: Station clean tray is not installed] + E080_ROBOVAC_AND_STATION_COMMUNICATION_IS_ABNORMAL = 80; // 主机与基站通信异常 [EN: Robovac and station communication is abnormal] + E081_SEWAGE_TANK_IS_LEAKING_GAS = 81; // 污水箱漏气 [EN: Sewage tank is leaking gas] + E082_CLEAN_TRAY_OF_STATION_NEED_CLEAN = 82; // 请清理清洗盘 [EN: Please clean station clean tray] + E083_POOR_CONTACT_DURING_CHARGING = 83; // 充电时接触不良,请检查 [EN: Poor contact during charging, please check] - E101_THE_BATTERY_IS_ABNORMAL = 101; // 电池异常 - E102_WHEEL_MODULE_IS_ABNORMAL = 102; // 轮子模组异常 - E103_THE_SIDE_BRUSH_MODULE_IS_ABNORMAL = 103; // 边刷模组异常 - E104_THE_FAN_IS_ABNORMAL = 104; // 风机异常 - E105_THE_ROLLER_BRUSH_MOTOR_IS_ABNORMAL = 105; // 滚刷电机异常 - E106_THE_HOST_PUMP_IS_ABNORMAL = 106; // 主机水泵异常 - E107_THE_LASER_SENSOR_IS_ABNORMAL = 107; // 激光传感器异常 - E111_ROTATION_MOTOR_ABNORMAL = 111; // 旋转电机异常 - E112_LIFT_MOTOR_ABNORMAL = 112; // 升降电机异常 - E113_THE_WATER_SPRAYING_DEVICE_IS_ABNORMAL = 113; // 喷水装置异常 - E114_THE_WATER_PUMPING_DEVICE_IS_ABNORMAL = 114; // 抽水装置异常 - E117_ULTRASONIC_SENSOR_IS_ABNORMAL = 117; // 超声波传感器异常 - E119_WIFI_OR_BLUETOOTH_ABNORMAL = 119; // Wi-Fi或蓝牙异常 + E101_THE_BATTERY_IS_ABNORMAL = 101; // 电池异常 [EN: Battery is abnormal] + E102_WHEEL_MODULE_IS_ABNORMAL = 102; // 轮子模组异常 [EN: Wheel module is abnormal] + E103_THE_SIDE_BRUSH_MODULE_IS_ABNORMAL = 103; // 边刷模组异常 [EN: Side brush module is abnormal] + E104_THE_FAN_IS_ABNORMAL = 104; // 风机异常 [EN: Fan is abnormal] + E105_THE_ROLLER_BRUSH_MOTOR_IS_ABNORMAL = 105; // 滚刷电机异常 [EN: Roller brush motor is abnormal] + E106_THE_HOST_PUMP_IS_ABNORMAL = 106; // 主机水泵异常 [EN: Host pump is abnormal] + E107_THE_LASER_SENSOR_IS_ABNORMAL = 107; // 激光传感器异常 [EN: Laser sensor is abnormal] + E111_ROTATION_MOTOR_ABNORMAL = 111; // 旋转电机异常 [EN: Rotation motor abnormal] + E112_LIFT_MOTOR_ABNORMAL = 112; // 升降电机异常 [EN: Lift motor abnormal] + E113_THE_WATER_SPRAYING_DEVICE_IS_ABNORMAL = 113; // 喷水装置异常 [EN: Water spraying device is abnormal] + E114_THE_WATER_PUMPING_DEVICE_IS_ABNORMAL = 114; // 抽水装置异常 [EN: Water pumping device is abnormal] + E117_ULTRASONIC_SENSOR_IS_ABNORMAL = 117; // 超声波传感器异常 [EN: Ultrasonic sensor is abnormal] + E119_WIFI_OR_BLUETOOTH_ABNORMAL = 119; // Wi-Fi或蓝牙异常 [EN: WiFi or Bluetooth abnormal] } enum PromptCodeList { P000_NONE = 0; - P001_START_SCHEDULED_CLEANING = 1; // 开始预约清洁 - P003_POWER_IS_LOW_RETURN_TO_BASE_STATION_IMMEDIATELY = 3; // 电量不足,立即返回基站 - P004_POSITIONING_FAILED_REBUILD_MAP_START_NEW_CLEANING = 4; // 定位失败,重新建图,开始新清洁 - P005_POSITIONING_FAILED_MISSION_ENDED_START_BACK_TO_BASE_STATION = 5; // 定位失败,任务结束,开始返回基站 - P006_SOME_AREAS_ARE_NOT_YET_CLEANED_BECAUSE_THEY_ARE_UNREACHABLE = 6; // 部分区域因为无法到达,还未清洁 - P007_PATH_PLANNING_FAILED_CANT_REACH_THE_DESIGNATED_AREA = 7; // 路径规划失败,无法到达指定区域 - P009_BASE_STATION_EXPLORATION_FAILED_THE_MACHINE_RETURNED_TO_THE_STARTING_POINT = 9; // 基站探索失败,机器返回起点 - P010_POSITION_SUCCESS = 10; // 定位成功 - P011_TASK_FINISHED_AND_RETURN = 11; // 任务完成,开始返回基站 - P012_START_TASK_FAILED_DUE_TO_ON_STATION = 12; // 在基站上无法执行任务 - P013_START_SCHEDULE_FAILED_DUE_TO_WORKING = 13; // 任务中,预约清洁启动失败 - P014_START_TASK_FAILED_DUE_TO_MAP_UPDATING = 14; // 地图数据更新中,请稍后再试 - P015_FINISHED_WASHING_MOP_AND_RESUME_TASK = 15; // 清洗拖布完成,继续清洁 - P016_LOW_BATTERY_PLZ_CHARGE_AND_TRY_AGAIN = 16; // 电量不足,请充电后再试 - P017_CLEAN_MOP_COMPLETED = 17; // 清洗拖布完成 + P001_START_SCHEDULED_CLEANING = 1; // 开始预约清洁 [EN: Start scheduled cleaning] + P003_POWER_IS_LOW_RETURN_TO_BASE_STATION_IMMEDIATELY = 3; // 电量不足,立即返回基站 [EN: Battery low, return to base station immediately] + P004_POSITIONING_FAILED_REBUILD_MAP_START_NEW_CLEANING = 4; // 定位失败,重新建图,开始新清洁 [EN: Positioning failed, rebuild map, start new cleaning] + P005_POSITIONING_FAILED_MISSION_ENDED_START_BACK_TO_BASE_STATION = 5; // 定位失败,任务结束,开始返回基站 [EN: Positioning failed, mission ended, returning to base station] + P006_SOME_AREAS_ARE_NOT_YET_CLEANED_BECAUSE_THEY_ARE_UNREACHABLE = 6; // 部分区域因为无法到达,还未清洁 [EN: Some areas not yet cleaned because they are unreachable] + P007_PATH_PLANNING_FAILED_CANT_REACH_THE_DESIGNATED_AREA = 7; // 路径规划失败,无法到达指定区域 [EN: Path planning failed, cannot reach designated area] + P009_BASE_STATION_EXPLORATION_FAILED_THE_MACHINE_RETURNED_TO_THE_STARTING_POINT = 9; // 基站探索失败,机器返回起点 [EN: Base station exploration failed, machine returned to starting point] + P010_POSITION_SUCCESS = 10; // 定位成功 [EN: Positioning successful] + P011_TASK_FINISHED_AND_RETURN = 11; // 任务完成,开始返回基站 [EN: Task finished, returning to base station] + P012_START_TASK_FAILED_DUE_TO_ON_STATION = 12; // 在基站上无法执行任务 [EN: Cannot start task while on station] + P013_START_SCHEDULE_FAILED_DUE_TO_WORKING = 13; // 任务中,预约清洁启动失败 [EN: During task, scheduled cleaning start failed] + P014_START_TASK_FAILED_DUE_TO_MAP_UPDATING = 14; // 地图数据更新中,请稍后再试 [EN: Map data updating, please try later] + P015_FINISHED_WASHING_MOP_AND_RESUME_TASK = 15; // 清洗拖布完成,继续清洁 [EN: Finished washing mop, resuming cleaning] + P016_LOW_BATTERY_PLZ_CHARGE_AND_TRY_AGAIN = 16; // 电量不足,请充电后再试 [EN: Low battery, please charge and try again] + P017_CLEAN_MOP_COMPLETED = 17; // 清洗拖布完成 [EN: Mop cleaning completed] } diff --git a/proto-reference/keepalive.proto b/proto-reference/keepalive.proto index 69eab04..caca7b4 100644 --- a/proto-reference/keepalive.proto +++ b/proto-reference/keepalive.proto @@ -7,7 +7,7 @@ package proto.cloud; message KeepAliveRequest { uint64 timestamp = 1; - // 强制同步机器中数据 - // 手机 app 上多次尝试都拿不到数据才考虑使用该标志 + // 强制同步机器中数据 [EN: Force sync data from device] + // 手机 app 上多次尝试都拿不到数据才考虑使用该标志 [EN: Consider using this flag only after multiple failed attempts to get data from mobile app] bool force_sync = 2; } diff --git a/proto-reference/map_edit.proto b/proto-reference/map_edit.proto index 474d980..61d098c 100644 --- a/proto-reference/map_edit.proto +++ b/proto-reference/map_edit.proto @@ -13,12 +13,12 @@ message MapEditRequest { MERGE_ROOMS = 0; DIVIDE_ROOM = 1; RESET_ROOMS = 2; - RENAME_ROOM = 3; // 房间描述 - SET_RESTRICTED_ZONES = 4; // 设置限制区域:虚拟墙、禁区、禁拖区; - SET_ROOMS_CUSTOM = 5; // 房间定制(个性化清洁) - SET_CRUISE_POINTS = 6; // 设置全局巡航点 - ROTATION = 7; // 地图旋转 - IGNORE_OBSTACLE = 8; // 忽略/恢复障碍物 + RENAME_ROOM = 3; // 房间描述 [EN: Room description] + SET_RESTRICTED_ZONES = 4; // 设置限制区域:虚拟墙、禁区、禁拖区; [EN: Set restricted zones: virtual walls, no-go zones, no-mop zones;] + SET_ROOMS_CUSTOM = 5; // 房间定制(个性化清洁) [EN: Room customization (personalized cleaning)] + SET_CRUISE_POINTS = 6; // 设置全局巡航点 [EN: Set global cruise points] + ROTATION = 7; // 地图旋转 [EN: Map rotation] + IGNORE_OBSTACLE = 8; // 忽略/恢复障碍物 [EN: Ignore/restore obstacle] } Method method = 1; @@ -31,17 +31,17 @@ message MapEditRequest { message DivideRoom { uint32 room_id = 1; - repeated Point points = 2; // 分房是两个点还是可以大于2个点??? + repeated Point points = 2; // 分房是两个点还是可以大于2个点??? [EN: Is room division two points or can it be more than 2 points???] } - // 房间定制(个性化清洁) + // 房间定制(个性化清洁) [EN: Room customization (personalized cleaning)] message RoomsCustom { message Enable { - bool value = 1; // false: 使用全局参数;true: 使用房间定制参数 + bool value = 1; // false: 使用全局参数;true: 使用房间定制参数 [EN: false: use global parameters; true: use room custom parameters] } - Enable custom_enable = 1; // x10 之后不再使用 + Enable custom_enable = 1; // x10 之后不再使用 [EN: No longer used after x10] - // 设置房间顺序 + // 设置房间顺序 [EN: Set room order] message Order { message Room { uint32 id = 1; @@ -51,7 +51,7 @@ message MapEditRequest { } Order rooms_order = 2; - // 设置房间定制参数 + // 设置房间定制参数 [EN: Set room custom parameters] message Parm { message Room { uint32 id = 1; @@ -61,7 +61,7 @@ message MapEditRequest { Fan fan = 2; MopMode mop_mode = 3; CleanExtent clean_extent = 4; - uint32 clean_times = 5; // 清扫次数,非 0 有效 + uint32 clean_times = 5; // 清扫次数,非 0 有效 [EN: Cleaning times, non-zero is valid] } Custom custom = 2; } @@ -69,11 +69,11 @@ message MapEditRequest { } Parm rooms_parm = 3; - Switch smart_mode_sw = 4; // 智能省心模式开关 + Switch smart_mode_sw = 4; // 智能省心模式开关 [EN: Smart hassle-free mode switch] enum Condition { - GENERAL = 0; // 通常设置房间定制参数 - RESERVATION_IN_PROGRESS = 1; // 预约房间清扫过程中设置房间定制参数 + GENERAL = 0; // 通常设置房间定制参数 [EN: Normally set room custom parameters] + RESERVATION_IN_PROGRESS = 1; // 预约房间清扫过程中设置房间定制参数 [EN: Set room custom parameters during scheduled room cleaning] } Condition condition = 5; } @@ -90,14 +90,14 @@ message MapEditRequest { } message Rotation { - uint32 angle = 1; // 顺时针的角度的度数,如 90,180 + uint32 angle = 1; // 顺时针的角度的度数,如 90,180 [EN: Clockwise angle in degrees, e.g. 90, 180] } message IgnoreObstacle { - bool valid = 1; // false: 设置无效;true: 设置有效 + bool valid = 1; // false: 设置无效;true: 设置有效 [EN: false: setting invalid; true: setting valid] string object_type = 2; - string photo_id = 3; // 照片 id(优先通过照片 id 进行匹配) - Point point = 4; // 障碍物中心点(其次搜索点的周围区域) + string photo_id = 3; // 照片 id(优先通过照片 id 进行匹配) [EN: Photo ID (priority matching by photo ID)] + Point point = 4; // 障碍物中心点(其次搜索点的周围区域) [EN: Obstacle center point (then search surrounding area of the point)] } oneof Param { @@ -125,10 +125,10 @@ message MapEditResponse { message FailCode{ enum Value { - UNKNOWN = 0; // 其他错误,非以下错误码 - AREA_SMALL = 1; // 分割后房间面积太小 - ROOM_UNADJACENT = 2; // 房间不相邻不能合并 - TOO_MANY_ROOMS = 3; // 分割后房间数太多 + UNKNOWN = 0; // 其他错误,非以下错误码 [EN: Other errors, not the following error codes] + AREA_SMALL = 1; // 分割后房间面积太小 [EN: Room area too small after division] + ROOM_UNADJACENT = 2; // 房间不相邻不能合并 [EN: Rooms not adjacent cannot be merged] + TOO_MANY_ROOMS = 3; // 分割后房间数太多 [EN: Too many rooms after division] } Value value = 1; } diff --git a/proto-reference/map_manage.proto b/proto-reference/map_manage.proto index 346b9d1..a1dbd29 100644 --- a/proto-reference/map_manage.proto +++ b/proto-reference/map_manage.proto @@ -1,9 +1,9 @@ /** - * 地图管理相关协议,存储在云端的地图文件信息. + * 地图管理相关协议,存储在云端的地图文件信息. [EN: Map management protocol, map file information stored in cloud.] * - * 此协议与云端存储方式相关,目前以涂鸦为例: - * 涂鸦地图可以存储多张,每张地图有两个通道,分别是显示地图通道和特征地图通道, - * 由于特征地图目前已经不需要,故将地图通道数据拆开分两部分:MapEntity 和 MapExtras. + * 此协议与云端存储方式相关,目前以涂鸦为例: [EN: This protocol is related to cloud storage method, currently using Tuya as example:] + * 涂鸦地图可以存储多张,每张地图有两个通道,分别是显示地图通道和特征地图通道, [EN: Tuya maps can store multiple maps, each map has two channels: display map channel and feature map channel,] + * 由于特征地图目前已经不需要,故将地图通道数据拆开分两部分:MapEntity 和 MapExtras. [EN: Since feature maps are no longer needed, map channel data is split into two parts: MapEntity and MapExtras.] */ syntax = "proto3"; @@ -15,9 +15,9 @@ import "proto/cloud/common.proto"; import "proto/cloud/stream.proto"; /** - * 地图实体数据,包括 - - 地图描述; - - 地图像素; + * 地图实体数据,包括 [EN: Map entity data, including] + - 地图描述; [EN: - Map description;] + - 地图像素; [EN: - Map pixels;] */ message MapEntity { message Desc { @@ -27,7 +27,7 @@ message MapEntity { uint32 height = 3; uint32 resolution = 4; - Point origin = 5; // 原点 + Point origin = 5; // 原点 [EN: Origin] repeated Pose docks = 6; } Desc desc = 1; @@ -36,11 +36,11 @@ message MapEntity { } /** - * 地图附加信息,包括 - * - 地图名称; - * - 房间轮廓; - * - 房间参数; - * - 禁区; + * 地图附加信息,包括 [EN: Map additional information, including] + * - 地图名称; [EN: - Map name;] + * - 房间轮廓; [EN: - Room outlines;] + * - 房间参数; [EN: - Room parameters;] + * - 禁区; [EN: - Restricted zones;] */ message MapExtras { string name = 1; diff --git a/proto-reference/media_manager.proto b/proto-reference/media_manager.proto index f811e0e..e6b9591 100644 --- a/proto-reference/media_manager.proto +++ b/proto-reference/media_manager.proto @@ -1,5 +1,5 @@ /** - * media控制协议; + * media控制协议; [EN: Media control protocol;] */ syntax = "proto3"; @@ -14,20 +14,20 @@ message MediaSetting { R_1080P = 2; } - // 实时视频流参数 + // 实时视频流参数 [EN: Real-time video stream parameters] message RTStream { Resolution resolution = 1; } RTStream rt_stream = 1; - // 录像参数 + // 录像参数 [EN: Recording parameters] message Record { Resolution resolution = 1; uint32 bitrate = 2; } Record record = 2; - // 拍照参数 + // 拍照参数 [EN: Photo capture parameters] message Capture { uint32 width = 1; uint32 height = 2; @@ -37,34 +37,34 @@ message MediaSetting { message MediaStatus { enum State { - IDLE = 0; // 空闲 - RECORDING = 1; // 录像中 + IDLE = 0; // 空闲 [EN: Idle] + RECORDING = 1; // 录像中 [EN: Recording] } State state = 1; enum Storage { NORMAL = 0; - THRESHOLD = 1; // 达到阈值 - FULL = 2; // 存储空间满 + THRESHOLD = 1; // 达到阈值 [EN: Reached threshold] + FULL = 2; // 存储空间满 [EN: Storage full] } Storage storage = 2; - uint32 total_space = 3; // 总空间大小(单位 kb,下同) - uint32 photo_space = 4; // 照片占用空间大小 - uint32 video_space = 5; // 视频占用空间大小 - bool bind_state = 6; // 是否已绑定云 + uint32 total_space = 3; // 总空间大小(单位 kb,下同) [EN: Total space size (unit: kb, same below)] + uint32 photo_space = 4; // 照片占用空间大小 [EN: Photo space usage] + uint32 video_space = 5; // 视频占用空间大小 [EN: Video space usage] + bool bind_state = 6; // 是否已绑定云 [EN: Whether bound to cloud] } message MediaManagerRequest { - // 媒体控制 + // 媒体控制 [EN: Media control] message Control { enum Method { - RECORD_START = 0; // 开始录像 - RECORD_STOP = 1; // 停止录像 - CAPTURE = 2; // 执行拍照 + RECORD_START = 0; // 开始录像 [EN: Start recording] + RECORD_STOP = 1; // 停止录像 [EN: Stop recording] + CAPTURE = 2; // 执行拍照 [EN: Take photo] } Method method = 1; - uint32 seq = 2; // 序号 + uint32 seq = 2; // 序号 [EN: Sequence number] } Control control = 1; @@ -82,10 +82,10 @@ message MediaManagerRequest { } message MediaManagerResponse { - // 媒体控制结果 + // 媒体控制结果 [EN: Media control result] message Control { MediaManagerRequest.Control.Method method = 1; - uint32 seq = 2; // 返回与Request相同的seq + uint32 seq = 2; // 返回与Request相同的seq [EN: Returns same seq as Request] enum Result { SUCCESS = 0; diff --git a/proto-reference/multi_maps.proto b/proto-reference/multi_maps.proto index 0db3c29..11e78f9 100644 --- a/proto-reference/multi_maps.proto +++ b/proto-reference/multi_maps.proto @@ -7,26 +7,26 @@ package proto.cloud; import "proto/cloud/common.proto"; import "proto/cloud/p2pdata.proto"; -// 所有的Request均使用tuya DP发送 +// 所有的Request均使用tuya DP发送 [EN: All Requests are sent using Tuya DP] message MultiMapsManageRequest { enum Method { - MAP_RESET = 0; // 不带参 + MAP_RESET = 0; // 不带参 [EN: No parameters] MAP_RENAME = 1; // message Rename MAP_LOAD = 2; // message Common MAP_REPLACE = 3; // message Common MAP_DELETE = 4; // message Common MAP_SAVE = 5; // message SaveOptions - MAP_IGNORE = 6; // 忽略当前地图(不保存),不带参 - MAP_GET_ALL = 7; // 获取所有地址, p2p同时加入 - MAP_GET_ONE = 8; // 获取单个地图, p2p同时加入 - MAP_RECOVERY = 9; // 恢复地图,message Common + MAP_IGNORE = 6; // 忽略当前地图(不保存),不带参 [EN: Ignore current map (don't save), no parameters] + MAP_GET_ALL = 7; // 获取所有地址, p2p同时加入 [EN: Get all maps, p2p also included] + MAP_GET_ONE = 8; // 获取单个地图, p2p同时加入 [EN: Get single map, p2p also included] + MAP_RECOVERY = 9; // 恢复地图,message Common [EN: Recover map, message Common] } Method method = 1; uint32 seq = 2; message Rename { - uint32 cloud_mapid = 1; // TODO: 是否使用cloud_mapid与多地图方案有关; + uint32 cloud_mapid = 1; // TODO: 是否使用cloud_mapid与多地图方案有关; [EN: TODO: Whether to use cloud_mapid is related to multi-map solution;] string new_name = 2; } @@ -45,8 +45,8 @@ message MultiMapsManageRequest { } } -// 请求中method == MAP_GET_ALL或MAP_GET_ONE时, 使用p2p传送 -// 其它使用tuya DP传送 +// 请求中method == MAP_GET_ALL或MAP_GET_ONE时, 使用p2p传送 [EN: When method == MAP_GET_ALL or MAP_GET_ONE in request, use p2p transmission] +// 其它使用tuya DP传送 [EN: Others use Tuya DP transmission] message MultiMapsManageResponse { MultiMapsManageRequest.Method method = 1; uint32 seq = 2; @@ -58,7 +58,7 @@ message MultiMapsManageResponse { } Result result = 3; - // p2p同时加入, 请求中method == MAP_GET_ALL或MAP_GET_ONE时使用. + // p2p同时加入, 请求中method == MAP_GET_ALL或MAP_GET_ONE时使用. [EN: p2p also included, used when method == MAP_GET_ALL or MAP_GET_ONE in request.] message CompleteMaps { repeated p2p.CompleteMap complete_map = 1; } diff --git a/proto-reference/p2pdata.proto b/proto-reference/p2pdata.proto index a545508..5a266d2 100644 --- a/proto-reference/p2pdata.proto +++ b/proto-reference/p2pdata.proto @@ -8,7 +8,7 @@ import "proto/cloud/common.proto"; import "proto/cloud/stream.proto"; /** - * 地图数据的统一入口, 包括实时地图数据, 多地图相关数据. + * 地图数据的统一入口, 包括实时地图数据, 多地图相关数据. [EN: Unified entry for map data, including real-time map data and multi-map related data.] */ message MapChannelMsg { enum MsgType { @@ -19,70 +19,70 @@ message MapChannelMsg { MsgType type = 1; oneof MsgData { /* - * 实时地图数据不需要发送请求(为实时推送) + * 实时地图数据不需要发送请求(为实时推送) [EN: Real-time map data doesn't need to send request (is real-time push)] */ MapInfo map_info = 2; /* - * 该成员解析为MultiMapsManageResponse类型, 需要发送相应DP请求. + * 该成员解析为MultiMapsManageResponse类型, 需要发送相应DP请求. [EN: This member parses to MultiMapsManageResponse type, needs to send corresponding DP request.] */ bytes multi_map_response = 3; } } /** - * 房间轮廓信息(使用包含分区信息的地图),单次上传. + * 房间轮廓信息(使用包含分区信息的地图),单次上传. [EN: Room outline information (using map with partition info), single upload.] * - * @note: Delimited 方式序列化. + * @note: Delimited 方式序列化. [EN: @note: Serialized in Delimited way.] */ message MapPixels { /** - * 地图像素数据,目前采用 LZ4 压缩; - * 地图更新采用SLAM地图+分区地图的方式维护,slam地图实时更新,分区地图仅在保存地图、用户手动调整分区时更新; - * 实时地图: - * 1byte表示4像素,即1个像素2bit: - * 0x00 为未知区域 - * 0x01 为张障碍物 - * 0x02 为可清扫区域 - * 0x03 为地毯 - * 分区地图: - * 1byte表示1像素的方式 - * 低2bit表示像素 - * 0x00 为未知区域 - * 0x01 为张障碍物 - * 0x02 为可清扫区域 - * 0x03 为地毯 - * 高6bit表示房间分区id - * 每个像素占 1byte,包含房间id、是否是背景等数据. - * 房间标识说明 - * 有效房间标识: 0 - 31 - * 无效房间标识: 大于等于32 - * 特殊房间标识: - * 60:没有房间数据 - * 61:房间间隙 - * 62:代表障碍物 - * 63:未知的房间标识 + * 地图像素数据,目前采用 LZ4 压缩; [EN: Map pixel data, currently using LZ4 compression;] + * 地图更新采用SLAM地图+分区地图的方式维护,slam地图实时更新,分区地图仅在保存地图、用户手动调整分区时更新; [EN: Map update uses SLAM map + partition map method, SLAM map updates in real-time, partition map only updates when saving map or user manually adjusts partitions;] + * 实时地图: [EN: Real-time map:] + * 1byte表示4像素,即1个像素2bit: [EN: 1 byte represents 4 pixels, i.e. 1 pixel is 2 bits:] + * 0x00 为未知区域 [EN: 0x00 is unknown area] + * 0x01 为张障碍物 [EN: 0x01 is obstacle] + * 0x02 为可清扫区域 [EN: 0x02 is sweepable area] + * 0x03 为地毯 [EN: 0x03 is carpet] + * 分区地图: [EN: Partition map:] + * 1byte表示1像素的方式 [EN: 1 byte represents 1 pixel] + * 低2bit表示像素 [EN: Lower 2 bits represent pixel] + * 0x00 为未知区域 [EN: 0x00 is unknown area] + * 0x01 为张障碍物 [EN: 0x01 is obstacle] + * 0x02 为可清扫区域 [EN: 0x02 is sweepable area] + * 0x03 为地毯 [EN: 0x03 is carpet] + * 高6bit表示房间分区id [EN: Upper 6 bits represent room partition ID] + * 每个像素占 1byte,包含房间id、是否是背景等数据. [EN: Each pixel occupies 1 byte, contains room ID, whether it's background, etc.] + * 房间标识说明 [EN: Room identifier description] + * 有效房间标识: 0 - 31 [EN: Valid room identifier: 0 - 31] + * 无效房间标识: 大于等于32 [EN: Invalid room identifier: greater than or equal to 32] + * 特殊房间标识: [EN: Special room identifiers:] + * 60:没有房间数据 [EN: 60: No room data] + * 61:房间间隙 [EN: 61: Room gap] + * 62:代表障碍物 [EN: 62: Represents obstacle] + * 63:未知的房间标识 [EN: 63: Unknown room identifier] */ - bytes pixels = 1; // 地图压缩 + bytes pixels = 1; // 地图压缩 [EN: Map compressed] /** - * 地图像素原始size, 如果pixels有压缩,则 pixel_size 表示解压后的长度. + * 地图像素原始size, 如果pixels有压缩,则 pixel_size 表示解压后的长度. [EN: Original map pixel size, if pixels are compressed, pixel_size represents the decompressed length.] */ uint32 pixel_size = 2; } /** - p2p数据相当于直播,不会在云端保存,每次可以直接传输全量数据 + p2p数据相当于直播,不会在云端保存,每次可以直接传输全量数据 [EN: p2p data is like live streaming, not saved in cloud, can transmit full data each time] */ message MapInfo { - uint32 releases = 1; //map 的大版本修正号, version - uint32 map_id = 2; // map 的 id 号, name/releases在后面 - bool map_stable = 3; // 地图是否稳定 + uint32 releases = 1; //map 的大版本修正号, version [EN: Map major version revision number, version] + uint32 map_id = 2; // map 的 id 号, name/releases在后面 [EN: Map ID number, name/releases are below] + bool map_stable = 3; // 地图是否稳定 [EN: Whether map is stable] uint32 map_width = 4; uint32 map_height = 5; - Point origin = 6; // 原点 - repeated Pose docks = 7; // 支持多个充电座/基站 + Point origin = 6; // 原点 [EN: Origin] + repeated Pose docks = 7; // 支持多个充电座/基站 [EN: Supports multiple charging docks/stations] enum MapMsgType{ MAP_REALTIME = 0; @@ -95,8 +95,8 @@ message MapInfo { }; MapMsgType msg_type = 8; - oneof MapMsg { // 由 msg_type 决定包含哪种数据 - MapPixels pixels = 9; // 实时地图信息或房间轮廓信息 + oneof MapMsg { // 由 msg_type 决定包含哪种数据 [EN: Determined by msg_type which data to include] + MapPixels pixels = 9; // 实时地图信息或房间轮廓信息 [EN: Real-time map info or room outline info] stream.ObstacleInfo obstacles = 10; stream.RestrictedZone restricted_zones = 11; stream.RoomParams room_params = 12; @@ -104,36 +104,36 @@ message MapInfo { stream.TemporaryData temporary_data = 14; } - uint32 is_new_map = 15; // p2p同时加入 - string name = 16; // map 的名称 + uint32 is_new_map = 15; // p2p同时加入 [EN: p2p also included] + string name = 16; // map 的名称 [EN: Map name] } message CompleteMap { - uint32 releases = 1; // map 的大版本修正号, version + uint32 releases = 1; // map 的大版本修正号, version [EN: Map major version revision number, version] uint32 map_id = 2; - bool map_stable = 3; // 地图是否稳定 + bool map_stable = 3; // 地图是否稳定 [EN: Whether map is stable] uint32 map_width = 4; uint32 map_height = 5; - Point origin = 6; // 原点 + Point origin = 6; // 原点 [EN: Origin] - repeated Pose docks = 7; // 支持多个充电座/基站 - MapPixels map = 8; // 实时地图信息 - MapPixels room_outline = 9; // 房间轮廓信息 + repeated Pose docks = 7; // 支持多个充电座/基站 [EN: Supports multiple charging docks/stations] + MapPixels map = 8; // 实时地图信息 [EN: Real-time map info] + MapPixels room_outline = 9; // 房间轮廓信息 [EN: Room outline info] stream.ObstacleInfo obstacles = 10; stream.RestrictedZone restricted_zones = 11; stream.RoomParams room_params = 12; stream.TemporaryData temporary_data = 13; - uint32 is_new_map = 14; // p2p同时加入 - string name = 15; // map 的名称 + uint32 is_new_map = 14; // p2p同时加入 [EN: p2p also included] + string name = 15; // map 的名称 [EN: Map name] } /** - 一个路径点包含 5 个字节: - byte 1-2: x 坐标, byte1高字节,最高位为符号位, byte2为低字节; - byte 3-4: y 坐标,byte3高字节,最高位为符号位, byte4为低字节; - byte 5: flags信息, - bit 0-3 类型,0 - 清扫,1 - 拖地,2 - 扫+拖,3 - 导航,4 - 回充 (TODO: 根据需求完善) - bit 4: 状态,0 - 继续上一轨迹点, 1 - 新轨迹点,与上一轨迹点不连续; + 一个路径点包含 5 个字节: [EN: A path point contains 5 bytes:] + byte 1-2: x 坐标, byte1高字节,最高位为符号位, byte2为低字节; [EN: byte 1-2: x coordinate, byte1 high byte, highest bit is sign bit, byte2 is low byte;] + byte 3-4: y 坐标,byte3高字节,最高位为符号位, byte4为低字节; [EN: byte 3-4: y coordinate, byte3 high byte, highest bit is sign bit, byte4 is low byte;] + byte 5: flags信息, [EN: byte 5: flags info,] + bit 0-3 类型,0 - 清扫,1 - 拖地,2 - 扫+拖,3 - 导航,4 - 回充 (TODO: 根据需求完善) [EN: bit 0-3 type, 0 - sweep, 1 - mop, 2 - sweep+mop, 3 - navigation, 4 - return to charge (TODO: refine based on requirements)] + bit 4: 状态,0 - 继续上一轨迹点, 1 - 新轨迹点,与上一轨迹点不连续; [EN: bit 4: state, 0 - continue from last path point, 1 - new path point, not continuous with last;] */ message CompletePath { enum Type{ @@ -144,9 +144,9 @@ message CompletePath { GOHOME = 4; }; enum State { - FOLLOW = 0; // 继续上一轨迹点 - NEW = 1; // 新轨迹点,与上一轨迹点不连续 + FOLLOW = 0; // 继续上一轨迹点 [EN: Continue from last path point] + NEW = 1; // 新轨迹点,与上一轨迹点不连续 [EN: New path point, not continuous with last] } - bytes path = 3; //lz4压缩 - uint32 path_lz4len = 4; //压缩原始长度 + bytes path = 3; //lz4压缩 [EN: lz4 compressed] + uint32 path_lz4len = 4; //压缩原始长度 [EN: Original length before compression] } diff --git a/proto-reference/scene.proto b/proto-reference/scene.proto index d41ad0b..ace519c 100644 --- a/proto-reference/scene.proto +++ b/proto-reference/scene.proto @@ -9,7 +9,7 @@ import "proto/cloud/clean_param.proto"; import "proto/cloud/timing.proto"; message SceneTask { - uint32 index = 1; // 顺序,从1开始 + uint32 index = 1; // 顺序,从1开始 [EN: Order, starting from 1] enum Type { CURRENT_ROOM = 0; @@ -18,14 +18,14 @@ message SceneTask { Type type = 2; enum CleanMode { - GENERAL = 0; // 通用模式 - SMART = 1; // 智能省心模式 + GENERAL = 0; // 通用模式 [EN: General mode] + SMART = 1; // 智能省心模式 [EN: Smart hassle-free mode] } - // 通用参数 + // 通用参数 [EN: General parameters] message General { CleanType clean_type = 1; - uint32 clean_times = 2; // 清扫次数,非 0 有效 + uint32 clean_times = 2; // 清扫次数,非 0 有效 [EN: Cleaning times, non-zero is valid] Fan fan = 3; MopMode mop_mode = 4; CleanExtent clean_extent = 5; @@ -33,7 +33,7 @@ message SceneTask { message CurrentRoom { message Unit { - General general = 1; // 通用模式会有这项 + General general = 1; // 通用模式会有这项 [EN: This is present in general mode] message RoomClean { uint32 room_id = 1; @@ -54,7 +54,7 @@ message SceneTask { message AllRooms { CleanMode mode = 1; - General general = 2; // 通用模式会有这项 + General general = 2; // 通用模式会有这项 [EN: This is present in general mode] } oneof Task { @@ -64,8 +64,8 @@ message SceneTask { } message SceneInfo { - // 手机 app 新建定时不需要该字段,设备返回 id - // 手机 app 其他操作需要该字段 + // 手机 app 新建定时不需要该字段,设备返回 id [EN: Mobile app doesn't need this field when creating new schedule, device returns id] + // 手机 app 其他操作需要该字段 [EN: Mobile app needs this field for other operations] message Id { uint32 value = 1; } @@ -73,28 +73,28 @@ message SceneInfo { bool valid = 2; enum InvalidReason { - NORMAL = 0; // 正常(非失效状态) - MAP_NOT_EXIST = 1; // 地图不存在 - MAP_NOT_AVAILABLE = 2; // 地图不可用(地图不完整) - MAP_NOT_MATCH = 3; // 地图不适配(缺少指定区域) - OTHER = 4; // 其他未分类的失效原因 - DEFAULT = 5; // 后续使用 type 字段,不再使用这个值表示默认场景 + NORMAL = 0; // 正常(非失效状态) [EN: Normal (not invalid state)] + MAP_NOT_EXIST = 1; // 地图不存在 [EN: Map does not exist] + MAP_NOT_AVAILABLE = 2; // 地图不可用(地图不完整) [EN: Map not available (map incomplete)] + MAP_NOT_MATCH = 3; // 地图不适配(缺少指定区域) [EN: Map not matching (missing specified area)] + OTHER = 4; // 其他未分类的失效原因 [EN: Other uncategorized invalid reasons] + DEFAULT = 5; // 后续使用 type 字段,不再使用这个值表示默认场景 [EN: Subsequently use type field, no longer use this value to represent default scene] } InvalidReason invalid_reason = 3; string name = 4; - uint32 mapid = 5; // 关联的地图id(无效:-2) + uint32 mapid = 5; // 关联的地图id(无效:-2) [EN: Associated map ID (invalid: -2)] - // 场景执行时的动态时间数据放 WorkStatus 中 - uint32 estimate_time = 6; // 执行前预估完成时间(无效:0) - uint32 index = 7; // 顺序,从1开始 + // 场景执行时的动态时间数据放 WorkStatus 中 [EN: Dynamic time data during scene execution is placed in WorkStatus] + uint32 estimate_time = 6; // 执行前预估完成时间(无效:0) [EN: Estimated completion time before execution (invalid: 0)] + uint32 index = 7; // 顺序,从1开始 [EN: Order, starting from 1] enum Type { - SCENE_NORMAL = 0; // 普通场景 - WHOLE_HOUSE_DAILY_CLEANING = 1; // 全屋日常清洁(默认) - WHOLE_HOUSE_DEEP_CLEANING = 2; // 全屋深度清洁(默认) - AFTER_DINNER_CLEANING = 3; // 饭后清洁(默认) - PET_AREA_CLEANING = 4; // 宠物区域清洁(默认) + SCENE_NORMAL = 0; // 普通场景 [EN: Normal scene] + WHOLE_HOUSE_DAILY_CLEANING = 1; // 全屋日常清洁(默认) [EN: Whole house daily cleaning (default)] + WHOLE_HOUSE_DEEP_CLEANING = 2; // 全屋深度清洁(默认) [EN: Whole house deep cleaning (default)] + AFTER_DINNER_CLEANING = 3; // 饭后清洁(默认) [EN: After dinner cleaning (default)] + PET_AREA_CLEANING = 4; // 宠物区域清洁(默认) [EN: Pet area cleaning (default)] } Type type = 8; } @@ -102,9 +102,9 @@ message SceneInfo { message SceneRequest { enum Method { DEFAULT = 0; - ADD_SCENE = 1; // 添加场景(可选设置定时、是否指定地图) - DELETE_SCENE = 2; // 删除场景,使用 message common - MODIFY_SCENE = 3; // 修改场景(可选设置定时、是否指定地图) + ADD_SCENE = 1; // 添加场景(可选设置定时、是否指定地图) [EN: Add scene (optional: set schedule, specify map)] + DELETE_SCENE = 2; // 删除场景,使用 message common [EN: Delete scene, use message common] + MODIFY_SCENE = 3; // 修改场景(可选设置定时、是否指定地图) [EN: Modify scene (optional: set schedule, specify map)] } Method method = 1; @@ -126,9 +126,9 @@ message SceneRequest { } } -// 通过 dp 传基础信息 +// 通过 dp 传基础信息 [EN: Basic information transmitted via dp] message SceneResponse { - SceneRequest.Method method = 1; // 开机/失效上报 DEFAULT,其他情况跟下发相同 + SceneRequest.Method method = 1; // 开机/失效上报 DEFAULT,其他情况跟下发相同 [EN: Report DEFAULT on boot/invalid, otherwise same as sent] uint32 seq = 2; message Result { @@ -142,4 +142,4 @@ message SceneResponse { } Result result = 3; repeated SceneInfo infos = 4; -} \ No newline at end of file +} diff --git a/proto-reference/socket.proto b/proto-reference/socket.proto index 8b43bcf..87dd806 100644 --- a/proto-reference/socket.proto +++ b/proto-reference/socket.proto @@ -1,5 +1,5 @@ /** - * tcp 服务和 udp 广播协议,通过 socket 进行通信; + * tcp 服务和 udp 广播协议,通过 socket 进行通信; [EN: TCP service and UDP broadcast protocol, communicates via socket;] */ syntax = "proto3"; // option optimize_for = LITE_RUNTIME; @@ -8,34 +8,34 @@ package proto.cloud; import "proto/cloud/ble.proto"; -// ==机器人定时向外广播== +// ==机器人定时向外广播== [EN: ==Robot periodically broadcasts outward==] message SocketBroadcast { - bool is_bind = 1; // 是否绑定 - string device_sn = 2; // 设备序列号 - string user_id = 3; // 用户id(绑定后才有这个字段) + bool is_bind = 1; // 是否绑定 [EN: Whether bound] + string device_sn = 2; // 设备序列号 [EN: Device serial number] + string user_id = 3; // 用户id(绑定后才有这个字段) [EN: User ID (this field exists only after binding)] } -// ==验证消息== -// 1. 客户端(手机 app)连接服务端(机器人) -// 2. 服务端(机器人)向客户端(手机 app)发送 12 位随机数 -// 3. 客户端(手机 app)向服务端(机器人)发送验证消息 -// 4. 服务端(机器人)向客户端(手机 app)发送验证结果(验证失败服务器会关闭 socket 连接) +// ==验证消息== [EN: ==Verification message==] +// 1. 客户端(手机 app)连接服务端(机器人) [EN: 1. Client (mobile app) connects to server (robot)] +// 2. 服务端(机器人)向客户端(手机 app)发送 12 位随机数 [EN: 2. Server (robot) sends 12-digit random number to client (mobile app)] +// 3. 客户端(手机 app)向服务端(机器人)发送验证消息 [EN: 3. Client (mobile app) sends verification message to server (robot)] +// 4. 服务端(机器人)向客户端(手机 app)发送验证结果(验证失败服务器会关闭 socket 连接) [EN: 4. Server (robot) sends verification result to client (mobile app) (server closes socket connection on verification failure)] -// 验证消息的 message 定义如下 +// 验证消息的 message 定义如下 [EN: Verification message definition is as follows] message SocketVerify { - string random = 1; // 12 位随机数 - string device_sn = 2; // 设备序列号 - string user_id = 3; // 用户id(绑定后才验证这个字段) + string random = 1; // 12 位随机数 [EN: 12-digit random number] + string device_sn = 2; // 设备序列号 [EN: Device serial number] + string user_id = 3; // 用户id(绑定后才验证这个字段) [EN: User ID (this field is verified only after binding)] } -// 验证结果的 message 返回 BtRobotMsg.ProductInfo 消息(消息体中有成功/失败) +// 验证结果的 message 返回 BtRobotMsg.ProductInfo 消息(消息体中有成功/失败) [EN: Verification result message returns BtRobotMsg.ProductInfo message (success/failure in message body)] -// ==手机 app 发送数据== +// ==手机 app 发送数据== [EN: ==Mobile app sends data==] message SocketTransData { enum Type { - E_DISTRIBUTE = 0; // 配网 - E_DP = 1; // 数据点 + E_DISTRIBUTE = 0; // 配网 [EN: Network configuration] + E_DP = 1; // 数据点 [EN: Data point] } Type type = 1; BtAppMsg.Distribute distribute = 2; -} \ No newline at end of file +} diff --git a/proto-reference/station.proto b/proto-reference/station.proto index 5588dcd..0aacd8e 100644 --- a/proto-reference/station.proto +++ b/proto-reference/station.proto @@ -1,5 +1,5 @@ /** - * 基站 Request 和 Response 协议; + * 基站 Request 和 Response 协议;[EN: Station Request and Response protocol;] */ syntax = "proto3"; // option optimize_for = LITE_RUNTIME; @@ -7,7 +7,7 @@ package proto.cloud; import "proto/cloud/common.proto"; -message Duration { // 时长档位分级 +message Duration { // 时长档位分级 [EN: Duration level grading] enum Level { SHORT = 0; MEDIUM = 1; @@ -16,89 +16,89 @@ message Duration { // 时长档位分级 Level level = 1; } -message CollectDustCfg { // 集尘配置 +message CollectDustCfg { // 集尘配置 [EN: Dust collection configuration] enum Cfg { - CLOSE = 0; // 关闭 - ONCE = 1; // 清扫1次就集尘 - TWICE = 2; // 清扫2次才集尘 + CLOSE = 0; // 关闭 [EN: Close] + ONCE = 1; // 清扫1次就集尘 [EN: Collect dust after 1 cleaning] + TWICE = 2; // 清扫2次才集尘 [EN: Collect dust after 2 cleanings] } Cfg cfg = 1; } -message CollectDustCfgV2 { // 集尘配置新版协议 +message CollectDustCfgV2 { // 集尘配置新版协议 [EN: Dust collection configuration new version protocol] Switch sw = 1; message Mode { enum Value { - BY_TASK = 0; // 按次数 - BY_TIME = 1; // 按时间 - SMART = 2; // 智能托管 + BY_TASK = 0; // 按次数 [EN: By task count] + BY_TIME = 1; // 按时间 [EN: By time] + SMART = 2; // 智能托管 [EN: Smart management] } Value value = 1; - uint32 task = 2; // 任务次数 - uint32 time = 3; // 清洁时间,单位分钟 + uint32 task = 2; // 任务次数 [EN: Task count] + uint32 time = 3; // 清洁时间,单位分钟 [EN: Cleaning time, unit minutes] } Mode mode = 2; } -message DryCfg { // 烘干配置 +message DryCfg { // 烘干配置 [EN: Drying configuration] enum Cfg { - CLOSE = 0; // 关闭 - STANDARD = 1; // 标准 - QUICK = 2; // 快速 + CLOSE = 0; // 关闭 [EN: Close] + STANDARD = 1; // 标准 [EN: Standard] + QUICK = 2; // 快速 [EN: Quick] } Cfg cfg = 1; Duration duration = 2; } -message WashCfg { // 洗拖布配置 +message WashCfg { // 洗拖布配置 [EN: Mop washing configuration] message BackwashFreq { enum Mode { - ByPartition = 0; // 按分区 - ByTime = 1; // 按时间 - ByArea = 2; // 按面积 + ByPartition = 0; // 按分区 [EN: By partition] + ByTime = 1; // 按时间 [EN: By time] + ByArea = 2; // 按面积 [EN: By area] } Mode mode = 1; - // 按档位需要传下面的值(档位表示不同时长或者不同面积) + // 按档位需要传下面的值(档位表示不同时长或者不同面积) [EN: When by level, need to pass below values (level represents different duration or area)] Duration duration = 2; - // 按数值需要传下面的值(表示不同时长或者不同面积) - Numerical time_or_area = 3; // 时长单位分钟,面积单位平方米 + // 按数值需要传下面的值(表示不同时长或者不同面积) [EN: When by value, need to pass below values (represents different duration or area)] + Numerical time_or_area = 3; // 时长单位分钟,面积单位平方米 [EN: Duration unit minutes, area unit square meters] } - BackwashFreq wash_freq = 1; // 回洗拖布的频率 - Duration wash_duration = 2; // 清洗拖布的时长 + BackwashFreq wash_freq = 1; // 回洗拖布的频率 [EN: Frequency of mop wash return] + Duration wash_duration = 2; // 清洗拖布的时长 [EN: Duration of mop washing] - // 自动洗拖布开关 + // 自动洗拖布开关 [EN: Auto mop washing switch] enum Cfg { - CLOSE = 0; // 关闭 - STANDARD = 1; // 标准 + CLOSE = 0; // 关闭 [EN: Close] + STANDARD = 1; // 标准 [EN: Standard] } Cfg cfg = 3; } -message CutHairCfg { // 割毛发配置 +message CutHairCfg { // 割毛发配置 [EN: Hair cutting configuration] Switch sw = 1; } -message SelfPurifyingCfg { // [废弃] 手动自净(集尘、滚刷清洁组合项) +message SelfPurifyingCfg { // [废弃] 手动自净(集尘、滚刷清洁组合项) [EN: [Deprecated] Manual self-purifying (dust collection, roller brush cleaning combo)] enum Type { - STANDARD = 0; // 标准 - STRONG = 1; // 强效 - ENERGY_SAVING = 2; // 节能 - CUSTOM = 3; // 自定义 + STANDARD = 0; // 标准 [EN: Standard] + STRONG = 1; // 强效 [EN: Strong] + ENERGY_SAVING = 2; // 节能 [EN: Energy saving] + CUSTOM = 3; // 自定义 [EN: Custom] } Type type = 1; message Config { message Frequency { enum Mode { - BY_TASK = 0; // 按次数 - BY_TIME = 1; // 按时间 + BY_TASK = 0; // 按次数 [EN: By task count] + BY_TIME = 1; // 按时间 [EN: By time] } Mode mode = 1; - uint32 task = 2; // 任务次数 - uint32 time = 3; // 清洁时间,单位分钟 + uint32 task = 2; // 任务次数 [EN: Task count] + uint32 time = 3; // 清洁时间,单位分钟 [EN: Cleaning time, unit minutes] } Frequency frequency = 1; @@ -113,40 +113,40 @@ message SelfPurifyingCfg { // [废弃] 手动自净(集尘、滚刷清洁组 Intensity intensity = 2; } - // 设备始终上报所有的配置 - // app 选择自定义时,需要下发 custom_cfg + // 设备始终上报所有的配置 [EN: Device always reports all configurations] + // app 选择自定义时,需要下发 custom_cfg [EN: When app selects custom, need to send custom_cfg] Config standard_cfg = 2; Config strong_cfg = 3; Config energy_saving_cfg = 4; Config custom_cfg = 5; } -message AutoActionCfg { // 扫拖过程自动进行的行为开关 - WashCfg wash = 1; //洗拖布 - DryCfg dry = 2; // 烘干 - CollectDustCfg collectdust = 3; // 集尘 - bool detergent = 4; // 添加清洁剂 - bool make_disinfectant = 5; // 自动制备消毒剂 - CollectDustCfgV2 collectdust_v2 = 6; // 集尘新版协议 - CutHairCfg cut_hair = 7; // 割毛发 - SelfPurifyingCfg self_purifying = 8; // [废弃] 手动自净(集尘、滚刷清洁组合项) +message AutoActionCfg { // 扫拖过程自动进行的行为开关 [EN: Auto action switches during sweep/mop process] + WashCfg wash = 1; //洗拖布 [EN: Mop washing] + DryCfg dry = 2; // 烘干 [EN: Drying] + CollectDustCfg collectdust = 3; // 集尘 [EN: Dust collection] + bool detergent = 4; // 添加清洁剂 [EN: Add detergent] + bool make_disinfectant = 5; // 自动制备消毒剂 [EN: Auto prepare disinfectant] + CollectDustCfgV2 collectdust_v2 = 6; // 集尘新版协议 [EN: Dust collection new version protocol] + CutHairCfg cut_hair = 7; // 割毛发 [EN: Hair cutting] + SelfPurifyingCfg self_purifying = 8; // [废弃] 手动自净(集尘、滚刷清洁组合项) [EN: [Deprecated] Manual self-purifying (dust collection, roller brush cleaning combo)] } message ManualActionCmd { oneof Cmd { - bool self_maintain = 1; // 按照设置完成返回基站后的自动维护操作(加污排污/集尘/洗拖把/烘干),即深度自清洁 - bool go_dry = 2; // 手动烘干开关 - bool go_collect_dust = 3; // 手动集尘 - bool go_selfcleaning = 4; // 手动洗拖把 - bool go_remove_scale = 5; // 手动除水垢 - bool go_cut_hair = 6; // 手动割毛发 - bool go_selfpurifying = 7; // [废弃] 手动自净(集尘、滚刷清洁组合项) + bool self_maintain = 1; // 按照设置完成返回基站后的自动维护操作(加污排污/集尘/洗拖把/烘干),即深度自清洁 [EN: Auto maintenance after returning to station per settings (add/drain water/dust collection/mop wash/dry), i.e., deep self-cleaning] + bool go_dry = 2; // 手动烘干开关 [EN: Manual drying switch] + bool go_collect_dust = 3; // 手动集尘 [EN: Manual dust collection] + bool go_selfcleaning = 4; // 手动洗拖把 [EN: Manual mop washing] + bool go_remove_scale = 5; // 手动除水垢 [EN: Manual descaling] + bool go_cut_hair = 6; // 手动割毛发 [EN: Manual hair cutting] + bool go_selfpurifying = 7; // [废弃] 手动自净(集尘、滚刷清洁组合项) [EN: [Deprecated] Manual self-purifying (dust collection, roller brush cleaning combo)] } } -// 拖地模式下: -// 回到基站自动触发清洗拖布; -// 需要设置自动烘干拖布,才能烘干拖布; +// 拖地模式下:[EN: In mopping mode:] +// 回到基站自动触发清洗拖布;[EN: Returning to station auto triggers mop washing;] +// 需要设置自动烘干拖布,才能烘干拖布;[EN: Need to set auto dry mop to dry the mop;] message StationRequest { AutoActionCfg auto_cfg = 1; ManualActionCmd manual_cmd = 2; @@ -156,23 +156,23 @@ message StationResponse { AutoActionCfg auto_cfg_status = 1; message StationStatus { - bool connected = 1; //基站是否已连接 + bool connected = 1; //基站是否已连接 [EN: Whether station is connected] - // 基站工作状态 + // 基站工作状态 [EN: Station working status] enum State { - IDLE = 0; // 空闲 - WASHING = 1; // 清洗拖布 - DRYING = 2; // 烘干拖布 - REMOVING_SCALE = 3; // 除水垢 + IDLE = 0; // 空闲 [EN: Idle] + WASHING = 1; // 清洗拖布 [EN: Washing mop] + DRYING = 2; // 烘干拖布 [EN: Drying mop] + REMOVING_SCALE = 3; // 除水垢 [EN: Descaling] } State state = 2; - // 各模块的状态 - bool collecting_dust = 3; // 集尘中 - bool clear_water_adding = 4; // 清水添加中 - bool waste_water_recycling = 5; // 污水回收中 - bool disinfectant_making = 6; // 消毒剂制备中 - bool cutting_hair = 7; // 割毛发 + // 各模块的状态 [EN: Status of each module] + bool collecting_dust = 3; // 集尘中 [EN: Collecting dust] + bool clear_water_adding = 4; // 清水添加中 [EN: Adding clean water] + bool waste_water_recycling = 5; // 污水回收中 [EN: Recycling waste water] + bool disinfectant_making = 6; // 消毒剂制备中 [EN: Making disinfectant] + bool cutting_hair = 7; // 割毛发 [EN: Cutting hair] } StationStatus status = 2; @@ -183,8 +183,8 @@ message StationResponse { MEDIUM = 3; // 50% < medium < 75% HIGH = 4; // >75% } - WaterLevel clean_level = 3; // 干净水量 - WaterLevel dirty_level = 4; // 污水水量 + WaterLevel clean_level = 3; // 干净水量 [EN: Clean water level] + WaterLevel dirty_level = 4; // 污水水量 [EN: Dirty water level] - Numerical clean_water = 5; // 干净水量,0%~100% + Numerical clean_water = 5; // 干净水量,0%~100% [EN: Clean water level, 0%~100%] } diff --git a/proto-reference/stream.proto b/proto-reference/stream.proto index 356e05e..e93c653 100644 --- a/proto-reference/stream.proto +++ b/proto-reference/stream.proto @@ -1,5 +1,5 @@ /** - * 流通道 + * 流通道 [EN: Stream channel] */ syntax = "proto3"; @@ -13,102 +13,102 @@ import "proto/cloud/control.proto"; import "proto/cloud/scene.proto"; /** - * 通道、版本信息. + * 通道、版本信息. [EN: Channel and version information.] * - * @note: Delimited 方式序列化. + * @note: Delimited 方式序列化. [EN: @note: Serialized in Delimited way.] */ message Metadata { message Versions { - // 只针对非 protobuf 格式的通道,protobuf协议本身是向下兼容的; + // 只针对非 protobuf 格式的通道,protobuf协议本身是向下兼容的; [EN: Only for non-protobuf format channels, protobuf protocol itself is backward compatible;] uint32 map_data = 1; } Versions versions = 1; message ChanIds { - // 地图信息通道,使用 message MapInfo 解析; + // 地图信息通道,使用 message MapInfo 解析; [EN: Map info channel, parse using message MapInfo;] uint32 map_info = 1; - // 路径数据通道,使用 message Path 解析; + // 路径数据通道,使用 message Path 解析; [EN: Path data channel, parse using message Path;] uint32 path = 2; - // 房间轮廓,使用 message RoomOutline 解析; + // 房间轮廓,使用 message RoomOutline 解析; [EN: Room outline, parse using message RoomOutline;] uint32 room_outline = 3; - // 房间参数信息,使用 message RoomParams 解析; + // 房间参数信息,使用 message RoomParams 解析; [EN: Room parameters info, parse using message RoomParams;] uint32 room_params = 4; - // 禁区信息,使用 message RestrictedZone 解析; + // 禁区信息,使用 message RestrictedZone 解析; [EN: Restricted zone info, parse using message RestrictedZone;] uint32 restricted_zone = 5; - // 动态数据,主要是位姿,使用 message DynamicData 解析; + // 动态数据,主要是位姿,使用 message DynamicData 解析; [EN: Dynamic data, mainly pose, parse using message DynamicData;] uint32 dynamic_data = 6; - // 临时数据通道,包括选区、指哪到哪等参数,使用 message TemporaryData 解析; + // 临时数据通道,包括选区、指哪到哪等参数,使用 message TemporaryData 解析; [EN: Temporary data channel, including zone selection, point-to-point, etc., parse using message TemporaryData;] uint32 temporary_data = 7; - // 视觉识别的物体信息,使用 message ObstacleInfo 解析; + // 视觉识别的物体信息,使用 message ObstacleInfo 解析; [EN: Visually recognized object info, parse using message ObstacleInfo;] uint32 obstacle_info = 8; - // 地图数据,使用 message Map 解析. + // 地图数据,使用 message Map 解析. [EN: Map data, parse using message Map.] uint32 map_data = 9; - // 巡航点数据,使用 message CruiseData 解析; + // 巡航点数据,使用 message CruiseData 解析; [EN: Cruise point data, parse using message CruiseData;] uint32 cruise_data = 10; } ChanIds chan_ids = 2; } /** - * 地图信息. + * 地图信息. [EN: Map information.] * - * @note: Delimited 方式序列化. + * @note: Delimited 方式序列化. [EN: @note: Serialized in Delimited way.] */ message MapInfo { - uint32 map_id = 1; // id 1 不再使用,兼容回放系统留到 2023/01/22 再删除 + uint32 map_id = 1; // id 1 不再使用,兼容回放系统留到 2023/01/22 再删除 [EN: id 1 no longer used, kept for playback system compatibility until 2023/01/22 then delete] uint32 width = 2; uint32 height = 3; - uint32 resolution = 4; // 单位: m x 100 + uint32 resolution = 4; // 单位: m x 100 [EN: Unit: m x 100] - Point origin = 5; // 原点 - repeated Pose docks = 6; // 支持多个充电座/基站 + Point origin = 5; // 原点 [EN: Origin] + repeated Pose docks = 6; // 支持多个充电座/基站 [EN: Supports multiple charging docks/stations] enum Type { - INCOMPLETE = 0; // 不完善的地图 - ROUGH = 1; // 粗糙的完整地图(快速产生的地图) - EFFECTIVE = 2; // 有效的完整地图(清洁建图、快速建图后继续清洁产生的地图) - LIST_FULL = 3; // 列表已满(通知 app 需要替换一张多地图或者忽略当前地图) + INCOMPLETE = 0; // 不完善的地图 [EN: Incomplete map] + ROUGH = 1; // 粗糙的完整地图(快速产生的地图) [EN: Rough complete map (quickly generated map)] + EFFECTIVE = 2; // 有效的完整地图(清洁建图、快速建图后继续清洁产生的地图) [EN: Effective complete map (map from cleaning mapping, or continued cleaning after fast mapping)] + LIST_FULL = 3; // 列表已满(通知 app 需要替换一张多地图或者忽略当前地图) [EN: List full (notify app to replace a multi-map or ignore current map)] } Type type = 7; - uint32 seq = 8; // id 8 不再使用,兼容回放系统留到 2023/01/22 再删除 - uint32 angle = 9; // 顺时针的角度的度数,如 90,180 + uint32 seq = 8; // id 8 不再使用,兼容回放系统留到 2023/01/22 再删除 [EN: id 8 no longer used, kept for playback system compatibility until 2023/01/22 then delete] + uint32 angle = 9; // 顺时针的角度的度数,如 90,180 [EN: Clockwise angle in degrees, e.g. 90, 180] message Dock { enum Type { - ADAPTER = 0; // 充电座 - STATION = 1; // 基站 + ADAPTER = 0; // 充电座 [EN: Charging dock] + STATION = 1; // 基站 [EN: Station] } Dock.Type type = 1; Pose pose = 2; } - repeated Dock docks_v2 = 10; // 支持多个充电座/基站 + repeated Dock docks_v2 = 10; // 支持多个充电座/基站 [EN: Supports multiple charging docks/stations] } /** - * 地图帧数据, 可全量和增量上传. - * 当 Frame 为 I 时,表示全量地图,机器端会先清除地图subid通道数据; - * 当 Frame 为 P 时,表示增量地图; + * 地图帧数据, 可全量和增量上传. [EN: Map frame data, can be full or incremental upload.] + * 当 Frame 为 I 时,表示全量地图,机器端会先清除地图subid通道数据; [EN: When Frame is I, it means full map, device will first clear map subid channel data;] + * 当 Frame 为 P 时,表示增量地图; [EN: When Frame is P, it means incremental map;] * - * @note: Delimited 方式序列化. + * @note: Delimited 方式序列化. [EN: @note: Serialized in Delimited way.] */ message Map { - uint32 map_id = 1; // id 1 不再使用,兼容回放系统留到 2023/01/22 再删除 - uint32 seq = 2; // id 2 不再使用,兼容回放系统留到 2023/01/22 再删除 + uint32 map_id = 1; // id 1 不再使用,兼容回放系统留到 2023/01/22 再删除 [EN: id 1 no longer used, kept for playback system compatibility until 2023/01/22 then delete] + uint32 seq = 2; // id 2 不再使用,兼容回放系统留到 2023/01/22 再删除 [EN: id 2 no longer used, kept for playback system compatibility until 2023/01/22 then delete] enum Frame { - I = 0; // 全量地图 - P = 1; // 增量地图 + I = 0; // 全量地图 [EN: Full map] + P = 1; // 增量地图 [EN: Incremental map] } Frame frame = 3; @@ -119,164 +119,164 @@ message Map { CARPET = 3; } /** - * 地图像素数据,目前采用 LZ4 压缩; - * 每个像素占 2bit,即4种值,与上面 enum PixelValue 对应. - * 像素从字节低位bit开始. + * 地图像素数据,目前采用 LZ4 压缩; [EN: Map pixel data, currently using LZ4 compression;] + * 每个像素占 2bit,即4种值,与上面 enum PixelValue 对应. [EN: Each pixel occupies 2 bits, i.e. 4 values, corresponding to enum PixelValue above.] + * 像素从字节低位bit开始. [EN: Pixels start from low bit of byte.] */ - bytes pixels = 4; // 地图压缩 + bytes pixels = 4; // 地图压缩 [EN: Map compressed] /** - * 地图像素原始size, 如果pixels有压缩,则 pixel_size 表示解压后的长度. + * 地图像素原始size, 如果pixels有压缩,则 pixel_size 表示解压后的长度. [EN: Original map pixel size, if pixels are compressed, pixel_size represents the decompressed length.] */ uint32 pixel_size = 5; - MapInfo info = 6; // map 的信息 - string name = 7; // map 的名称 - uint32 id = 8; // map 的 id 号 - uint32 releases = 9; // map 的大版本修正号 + MapInfo info = 6; // map 的信息 [EN: Map info] + string name = 7; // map 的名称 [EN: Map name] + uint32 id = 8; // map 的 id 号 [EN: Map ID number] + uint32 releases = 9; // map 的大版本修正号 [EN: Map major version revision number] message Index { - uint32 value = 1; // 地图索引,0 表示实时地图,1~MULTI_MAP_NUM 表示多地图中的地图索引 + uint32 value = 1; // 地图索引,0 表示实时地图,1~MULTI_MAP_NUM 表示多地图中的地图索引 [EN: Map index, 0 means real-time map, 1~MULTI_MAP_NUM means map index in multi-maps] } Index index = 10; } /** - * 路径数据,增量上传. + * 路径数据,增量上传. [EN: Path data, incremental upload.] * - * @note: Delimited 方式序列化. + * @note: Delimited 方式序列化. [EN: @note: Serialized in Delimited way.] */ -/** xy 信息如下: - byte 1-2: x 坐标, byte1高字节,最高位为符号位, byte2为低字节; - byte 3-4: y 坐标,byte3高字节,最高位为符号位, byte4为低字节; - flags 信息如下: - byte 1: flags信息, - bit 0-3 类型,见下方定义: - SWEEP = 0, // 纯扫 - MOP = 1, // 纯拖地 - SWEEP_MOP = 2, // 扫+拖地 - FAST_MAPPING = 3, // 快速建图运行轨迹 - CRUISIING = 4, // 全屋巡航运行轨迹 - POINT_TO_POINT = 5, // 指哪到哪运行轨迹 - REMOTE_CTRL = 6, // 遥控运行轨迹 - GO_CHARGE_IN_WORK = 7, // 任务中回充轨迹 - GO_CHARGE = 8, // 任务结束回充轨迹 - GO_WASH_IN_WORK = 9, // 任务中回洗轨迹 - GO_WASH = 10, // 任务结束回洗轨迹 - EXPLORE_STATIONS = 11, // 探索基站轨迹 - NAVIGATION = 12, // 分区之间导航轨迹 - RESUME_CLEANING = 13, // 回充回洗后的续扫轨迹 - RETURN_START_POINT = 14, // 回充失败再返回起点的轨迹 - HIDE = 15, // 隐藏轨迹(轨迹优化使用)同时需要使能 AppFunction.optimization.PATH_HIDE_TYPE - bit 4: 状态,0 - 继续上一轨迹点, 1 - 新轨迹点,与上一轨迹点不连续; - bit 5: 是否显示轨迹,0 - 不显示,1 - 显示; - bit 6: 是否显示机器人,0 - 不显示,1 - 显示; - bit 7: 预留; - byte 2: task_motion_type; - byte 3-4: 预留; +/** xy 信息如下: [EN: xy info as follows:] + byte 1-2: x 坐标, byte1高字节,最高位为符号位, byte2为低字节; [EN: byte 1-2: x coordinate, byte1 high byte, highest bit is sign bit, byte2 is low byte;] + byte 3-4: y 坐标,byte3高字节,最高位为符号位, byte4为低字节; [EN: byte 3-4: y coordinate, byte3 high byte, highest bit is sign bit, byte4 is low byte;] + flags 信息如下: [EN: flags info as follows:] + byte 1: flags信息, [EN: byte 1: flags info,] + bit 0-3 类型,见下方定义: [EN: bit 0-3 type, see definitions below:] + SWEEP = 0, // 纯扫 [EN: SWEEP = 0, // Sweep only] + MOP = 1, // 纯拖地 [EN: MOP = 1, // Mop only] + SWEEP_MOP = 2, // 扫+拖地 [EN: SWEEP_MOP = 2, // Sweep + mop] + FAST_MAPPING = 3, // 快速建图运行轨迹 [EN: FAST_MAPPING = 3, // Fast mapping path] + CRUISIING = 4, // 全屋巡航运行轨迹 [EN: CRUISIING = 4, // Whole house cruise path] + POINT_TO_POINT = 5, // 指哪到哪运行轨迹 [EN: POINT_TO_POINT = 5, // Point-to-point path] + REMOTE_CTRL = 6, // 遥控运行轨迹 [EN: REMOTE_CTRL = 6, // Remote control path] + GO_CHARGE_IN_WORK = 7, // 任务中回充轨迹 [EN: GO_CHARGE_IN_WORK = 7, // Return to charge path during task] + GO_CHARGE = 8, // 任务结束回充轨迹 [EN: GO_CHARGE = 8, // Return to charge path after task] + GO_WASH_IN_WORK = 9, // 任务中回洗轨迹 [EN: GO_WASH_IN_WORK = 9, // Return to wash path during task] + GO_WASH = 10, // 任务结束回洗轨迹 [EN: GO_WASH = 10, // Return to wash path after task] + EXPLORE_STATIONS = 11, // 探索基站轨迹 [EN: EXPLORE_STATIONS = 11, // Explore station path] + NAVIGATION = 12, // 分区之间导航轨迹 [EN: NAVIGATION = 12, // Navigation path between partitions] + RESUME_CLEANING = 13, // 回充回洗后的续扫轨迹 [EN: RESUME_CLEANING = 13, // Resume cleaning path after return to charge/wash] + RETURN_START_POINT = 14, // 回充失败再返回起点的轨迹 [EN: RETURN_START_POINT = 14, // Return to start point path after failed charge return] + HIDE = 15, // 隐藏轨迹(轨迹优化使用)同时需要使能 AppFunction.optimization.PATH_HIDE_TYPE [EN: HIDE = 15, // Hidden path (used for path optimization) also need to enable AppFunction.optimization.PATH_HIDE_TYPE] + bit 4: 状态,0 - 继续上一轨迹点, 1 - 新轨迹点,与上一轨迹点不连续; [EN: bit 4: state, 0 - continue from last path point, 1 - new path point, not continuous with last;] + bit 5: 是否显示轨迹,0 - 不显示,1 - 显示; [EN: bit 5: whether to show path, 0 - don't show, 1 - show;] + bit 6: 是否显示机器人,0 - 不显示,1 - 显示; [EN: bit 6: whether to show robot, 0 - don't show, 1 - show;] + bit 7: 预留; [EN: bit 7: reserved;] + byte 2: task_motion_type; [EN: byte 2: task_motion_type;] + byte 3-4: 预留; [EN: byte 3-4: reserved;] */ message PathPoint { - // bit0~15 为 x 坐标 - // bit16~31 为 y 坐标 + // bit0~15 为 x 坐标 [EN: bit0~15 is x coordinate] + // bit16~31 为 y 坐标 [EN: bit16~31 is y coordinate] uint32 xy = 1; - // bit0~3 为 point_type - // bit4 为 break_type - // bit5 为 show_trajectory_flag - // bit6 为 show_robot_flag - // bit7 预留 - // bit8~15 为 task_motion_type - // bit16~23 预留 - // bit24~31 预留 + // bit0~3 为 point_type [EN: bit0~3 is point_type] + // bit4 为 break_type [EN: bit4 is break_type] + // bit5 为 show_trajectory_flag [EN: bit5 is show_trajectory_flag] + // bit6 为 show_robot_flag [EN: bit6 is show_robot_flag] + // bit7 预留 [EN: bit7 reserved] + // bit8~15 为 task_motion_type [EN: bit8~15 is task_motion_type] + // bit16~23 预留 [EN: bit16~23 reserved] + // bit24~31 预留 [EN: bit24~31 reserved] uint32 flags = 2; } /** - * 房间轮廓信息(使用包含分区信息的地图),单次上传. + * 房间轮廓信息(使用包含分区信息的地图),单次上传. [EN: Room outline information (using map with partition info), single upload.] * - * @note: Delimited 方式序列化. + * @note: Delimited 方式序列化. [EN: @note: Serialized in Delimited way.] */ message RoomOutline { - uint32 map_id = 1; // map 的 id 号 - uint32 releases = 2; // map 的大版本修正号 + uint32 map_id = 1; // map 的 id 号 [EN: Map ID number] + uint32 releases = 2; // map 的大版本修正号 [EN: Map major version revision number] uint32 width = 3; uint32 height = 4; - uint32 resolution = 5; // 单位: m x 100 + uint32 resolution = 5; // 单位: m x 100 [EN: Unit: m x 100] Point origin = 6; /** - * 地图像素数据,目前采用 LZ4 压缩; - * 每个像素占 1byte,表示房间 id + * 地图像素数据,目前采用 LZ4 压缩; [EN: Map pixel data, currently using LZ4 compression;] + * 每个像素占 1byte,表示房间 id [EN: Each pixel occupies 1 byte, represents room ID] */ - bytes pixels = 7; // 地图压缩 + bytes pixels = 7; // 地图压缩 [EN: Map compressed] /** - * 地图像素原始size, 如果pixels有压缩,则 pixel_size 表示解压后的长度. + * 地图像素原始size, 如果pixels有压缩,则 pixel_size 表示解压后的长度. [EN: Original map pixel size, if pixels are compressed, pixel_size represents the decompressed length.] */ uint32 pixel_size = 8; } /** - * 房间参数,单次上传. + * 房间参数,单次上传. [EN: Room parameters, single upload.] * - * @note: Delimited 方式序列化. + * @note: Delimited 方式序列化. [EN: @note: Serialized in Delimited way.] */ message RoomParams { - // 定制化清扫参数使能. - bool custom_enable = 1; // x10 以后不再使用 + // 定制化清扫参数使能. [EN: Customized cleaning parameters enable.] + bool custom_enable = 1; // x10 以后不再使用 [EN: No longer used after x10] message Room { uint32 id = 1; - string name = 2; // 默认名称为 "",表示未命名 + string name = 2; // 默认名称为 "",表示未命名 [EN: Default name is "", means unnamed] Floor floor = 3; - RoomScene scene = 4; // 场景(类型+索引) + RoomScene scene = 4; // 场景(类型+索引) [EN: Scene (type + index)] - // 定制化顺序. + // 定制化顺序. [EN: Customized order.] message Order { uint32 value = 1; } Order order = 6; - // 定制化参数. + // 定制化参数. [EN: Customized parameters.] message Custom { CleanType clean_type = 1; Fan fan = 2; MopMode mop_mode = 3; CleanExtent clean_extent = 4; - uint32 clean_times = 5; // 清扫次数,非 0 有效 + uint32 clean_times = 5; // 清扫次数,非 0 有效 [EN: Cleaning times, non-zero is valid] } Custom custom = 7; } repeated Room rooms = 2; - uint32 map_id = 3; // map 的 id 号 - uint32 releases = 4; // map 的大版本修正号 + uint32 map_id = 3; // map 的 id 号 [EN: Map ID number] + uint32 releases = 4; // map 的大版本修正号 [EN: Map major version revision number] // enum ModeType { - // CUSTOM = 0; // 通用/定制模式,x10 以后不再使用 - // SMART = 1; // 智能模式 + // CUSTOM = 0; // 通用/定制模式,x10 以后不再使用 [EN: General/custom mode, no longer used after x10] + // SMART = 1; // 智能模式 [EN: Smart mode] // } // ModeType mode_type = 5; - Switch smart_mode_sw = 6; // 智能省心模式开关 + Switch smart_mode_sw = 6; // 智能省心模式开关 [EN: Smart hassle-free mode switch] } /** - * 禁区信息,单次上传. + * 禁区信息,单次上传. [EN: Restricted zone information, single upload.] * - * @note: Delimited 方式序列化. + * @note: Delimited 方式序列化. [EN: @note: Serialized in Delimited way.] */ message RestrictedZone { repeated Line virtual_walls = 1; repeated Quadrangle forbidden_zones = 2; repeated Quadrangle ban_mop_zones = 3; - uint32 map_id = 4; // map 的 id 号 - uint32 releases = 5; // map 的大版本修正号 + uint32 map_id = 4; // map 的 id 号 [EN: Map ID number] + uint32 releases = 5; // map 的大版本修正号 [EN: Map major version revision number] - // 自动推荐,只有推荐的禁区有 id 信息,由机器端生成,逐渐增加 - // 机器要做到: - // 1. 存在推荐禁区后,再收到一次编辑禁区消息,需要删除推荐禁区,将设置的推荐禁区转为编辑禁区 - // 2. 推荐的禁区没有被设置,那么机器后面就不应该再推荐这个禁区 + // 自动推荐,只有推荐的禁区有 id 信息,由机器端生成,逐渐增加 [EN: Auto recommendation, only recommended restricted zones have id info, generated by device, gradually increases] + // 机器要做到: [EN: Device should:] + // 1. 存在推荐禁区后,再收到一次编辑禁区消息,需要删除推荐禁区,将设置的推荐禁区转为编辑禁区 [EN: 1. After recommended restricted zone exists, upon receiving edit restricted zone message again, need to delete recommended zone and convert set recommended zone to edited zone] + // 2. 推荐的禁区没有被设置,那么机器后面就不应该再推荐这个禁区 [EN: 2. If recommended restricted zone is not set, device should not recommend this zone again later] message Suggestion { message LineWrap { uint32 id = 1; @@ -295,19 +295,19 @@ message RestrictedZone { } /** - * 动态数据,单次上传. + * 动态数据,单次上传. [EN: Dynamic data, single upload.] * - * @note: Delimited 方式序列化. + * @note: Delimited 方式序列化. [EN: @note: Serialized in Delimited way.] */ message DynamicData { - Pose cur_pose = 1; // 当前位姿 + Pose cur_pose = 1; // 当前位姿 [EN: Current pose] } /** - * 存储临时数据,机器端不主动清除,app根据workstatus自行判断数据是否有效. - * 单次上传. + * 存储临时数据,机器端不主动清除,app根据workstatus自行判断数据是否有效. [EN: Store temporary data, device doesn't proactively clear, app judges data validity based on workstatus.] + * 单次上传. [EN: Single upload.] * - * @note: Delimited 方式序列化. + * @note: Delimited 方式序列化. [EN: @note: Serialized in Delimited way.] */ message TemporaryData { .proto.cloud.SelectRoomsClean select_rooms_clean = 1; @@ -318,88 +318,88 @@ message TemporaryData { } /** - * 物体数据信息,单次上传. + * 物体数据信息,单次上传. [EN: Object data information, single upload.] * - * @note: Delimited 方式序列化. + * @note: Delimited 方式序列化. [EN: @note: Serialized in Delimited way.] */ message ObstacleInfo { - uint32 map_id = 1; // map 的 id 号 - uint32 releases = 2; // map 的大版本修正号 + uint32 map_id = 1; // map 的 id 号 [EN: Map ID number] + uint32 releases = 2; // map 的大版本修正号 [EN: Map major version revision number] message Obstacle { string object_type = 1; enum ShowType { - POSITION = 0; // 坐标: show_points 只有一个 - OUTLINE = 1; // 轮廓 - FILL = 2; // 填充 - BITMAP = 3; // 位图(左上坐标+长宽+mask序列,bit为0表示空,为1表示存在) + POSITION = 0; // 坐标: show_points 只有一个 [EN: Coordinate: show_points has only one] + OUTLINE = 1; // 轮廓 [EN: Outline] + FILL = 2; // 填充 [EN: Fill] + BITMAP = 3; // 位图(左上坐标+长宽+mask序列,bit为0表示空,为1表示存在) [EN: Bitmap (top-left coordinate + width/height + mask sequence, bit 0 means empty, 1 means exists)] } ShowType show_type = 2; - repeated Point show_points = 3; // TODO: 考虑 3D + repeated Point show_points = 3; // TODO: 考虑 3D [EN: TODO: Consider 3D] message Bitmap { - Point ref_point = 1; // 参考点,bitmap 以此为左上角 + Point ref_point = 1; // 参考点,bitmap 以此为左上角 [EN: Reference point, bitmap uses this as top-left corner] uint32 width = 2; uint32 height = 3; uint32 data_len = 4; - bytes data = 5; // 单bit描述一个点,bit为0表示空,为1表示存在 + bytes data = 5; // 单bit描述一个点,bit为0表示空,为1表示存在 [EN: Single bit describes one point, bit 0 means empty, 1 means exists] } Bitmap bitmap = 4; - sint32 theta = 5; // 物体方向,单位: rad * 100 + sint32 theta = 5; // 物体方向,单位: rad * 100 [EN: Object direction, unit: rad * 100] - string photo_id = 6; // 照片 id + string photo_id = 6; // 照片 id [EN: Photo ID] - uint32 accuracy = 7; // 准确率,0~100,表示百分比(0 表示无效) + uint32 accuracy = 7; // 准确率,0~100,表示百分比(0 表示无效) [EN: Accuracy, 0~100, represents percentage (0 means invalid)] message Valid { bool value = 1; } - Valid valid = 8; // 是否有效 + Valid valid = 8; // 是否有效 [EN: Whether valid] } repeated Obstacle obstacles = 3; } /** - * 巡航数据. - * 更新频率:巡航指令后更新一次(照片 id 为空),结束巡航后更新一次(一次性写入照片 id) + * 巡航数据. [EN: Cruise data.] + * 更新频率:巡航指令后更新一次(照片 id 为空),结束巡航后更新一次(一次性写入照片 id) [EN: Update frequency: update once after cruise command (photo id is empty), update once after cruise ends (write photo id all at once)] * - * @note: Delimited 方式序列化. + * @note: Delimited 方式序列化. [EN: @note: Serialized in Delimited way.] */ message CruiseData { message ProcessData { - Point points = 1; // 巡航点(收到巡航指令后更新一次,照片 id 可为空) + Point points = 1; // 巡航点(收到巡航指令后更新一次,照片 id 可为空) [EN: Cruise point (update once after receiving cruise command, photo id can be empty)] - repeated string photo_id = 2; // 每个巡航点关联的照片 id(结束巡航一次性写入) + repeated string photo_id = 2; // 每个巡航点关联的照片 id(结束巡航一次性写入) [EN: Photo ids associated with each cruise point (write all at once when cruise ends)] } repeated ProcessData cruise_data = 1; - uint32 map_id = 2; // map 的 id 号 - uint32 releases = 3; // map 的大版本修正号 + uint32 map_id = 2; // map 的 id 号 [EN: Map ID number] + uint32 releases = 3; // map 的大版本修正号 [EN: Map major version revision number] } /** - * 地图描述,单次上传. + * 地图描述,单次上传. [EN: Map description, single upload.] * - * @note: Delimited 方式序列化. + * @note: Delimited 方式序列化. [EN: @note: Serialized in Delimited way.] */ message MapDescription { - // id 1 不再使用 + // id 1 不再使用 [EN: id 1 no longer used] - string name = 2; // 地图名 + string name = 2; // 地图名 [EN: Map name] uint32 create_cause = 3; - uint64 create_time = 4; // 创建时间 - uint64 last_time = 5; // 最后更新时间 - uint32 map_id = 6; // map 的 id 号 - uint32 releases = 7; // map 的大版本修正号 + uint64 create_time = 4; // 创建时间 [EN: Creation time] + uint64 last_time = 5; // 最后更新时间 [EN: Last update time] + uint32 map_id = 6; // map 的 id 号 [EN: Map ID number] + uint32 releases = 7; // map 的大版本修正号 [EN: Map major version revision number] } /** - * 地图备份,单次上传. + * 地图备份,单次上传. [EN: Map backup, single upload.] * - * @note: Delimited 方式序列化. + * @note: Delimited 方式序列化. [EN: @note: Serialized in Delimited way.] */ message MapBackup { MapDescription desc = 1; @@ -410,9 +410,9 @@ message MapBackup { } /** - * 场景信息,单次上传. + * 场景信息,单次上传. [EN: Scene information, single upload.] * - * @note: Delimited 方式序列化. + * @note: Delimited 方式序列化. [EN: @note: Serialized in Delimited way.] */ message SceneWrap { message Scene { @@ -420,4 +420,4 @@ message SceneWrap { repeated SceneTask tasks = 2; } repeated Scene scenes = 1; -} \ No newline at end of file +} diff --git a/proto-reference/stream_wrap.proto b/proto-reference/stream_wrap.proto index 1f57059..385cefa 100644 --- a/proto-reference/stream_wrap.proto +++ b/proto-reference/stream_wrap.proto @@ -1,7 +1,7 @@ /** - * 流通道协议包装. + * 流通道协议包装. [EN: Stream channel protocol wrapper.] * - * @note: 机器端使用,app忽略 + * @note: 机器端使用,app忽略 [EN: @note: Used by device, app should ignore] */ syntax = "proto3"; diff --git a/proto-reference/timing.proto b/proto-reference/timing.proto index c7a1baf..af179a5 100644 --- a/proto-reference/timing.proto +++ b/proto-reference/timing.proto @@ -8,8 +8,8 @@ import "proto/cloud/common.proto"; import "proto/cloud/clean_param.proto"; message TimerInfo { - // 手机 app 新建定时不需要该字段,设备返回 id - // 手机 app 其他操作需要该字段 + // 手机 app 新建定时不需要该字段,设备返回 id [EN: Mobile app doesn't need this field when creating new schedule, device returns id] + // 手机 app 其他操作需要该字段 [EN: Mobile app needs this field for other operations] message Id { uint32 value = 1; } @@ -23,67 +23,67 @@ message TimerInfo { message Desc { enum Trigger { - SINGLE = 0; // 单次触发 - CYCLE = 1; // 周期触发 + SINGLE = 0; // 单次触发 [EN: Single trigger] + CYCLE = 1; // 周期触发 [EN: Cyclic trigger] } Trigger trigger = 1; message Timing { - uint32 user_tz = 1; // 用户时区,单位 s - bool summer = 2; // 用户是否处于夏令时的国家或地区 + uint32 user_tz = 1; // 用户时区,单位 s [EN: User timezone, unit: seconds] + bool summer = 2; // 用户是否处于夏令时的国家或地区 [EN: Whether user is in a country or region with daylight saving time] uint32 hours = 3; uint32 minutes = 4; } Timing timing = 2; - // 周期触发需要有以下字段描述周期 - // 这里的 week 指用户感知的周,机器需要结合用户时区来判断某天对应的时间 + // 周期触发需要有以下字段描述周期 [EN: Cyclic trigger requires the following fields to describe the cycle] + // 这里的 week 指用户感知的周,机器需要结合用户时区来判断某天对应的时间 [EN: The week here refers to the user-perceived week, device needs to combine user timezone to determine the time for a certain day] message Cycle { - uint32 week_bits = 1; // bit-0 周日 bit-1 ... bit-6 周一~周六 + uint32 week_bits = 1; // bit-0 周日 bit-1 ... bit-6 周一~周六 [EN: bit-0 Sunday bit-1 ... bit-6 Monday~Saturday] } Cycle cycle = 3; } Desc desc = 3; message Addition { - uint64 create_time = 1; // 创建时间 - string create_user_id = 2; // 创建用户 id - uint64 renew_time = 3; // 修改时间 - string renew_user_id = 4; // 修改用户 id + uint64 create_time = 1; // 创建时间 [EN: Creation time] + string create_user_id = 2; // 创建用户 id [EN: Creator user ID] + uint64 renew_time = 3; // 修改时间 [EN: Modification time] + string renew_user_id = 4; // 修改用户 id [EN: Modifier user ID] } Addition addition = 4; message Action { enum Type { - SCHEDULE_AUTO_CLEAN = 0; // 预约自动清扫 - SCHEDULE_ROOMS_CLEAN = 1; // 预约房间清扫 - SCHEDULE_CRUISE = 2; // 预约巡航 - SCHEDULE_SCENE_CLEAN = 3; // 预约场景清扫 + SCHEDULE_AUTO_CLEAN = 0; // 预约自动清扫 [EN: Scheduled automatic cleaning] + SCHEDULE_ROOMS_CLEAN = 1; // 预约房间清扫 [EN: Scheduled rooms cleaning] + SCHEDULE_CRUISE = 2; // 预约巡航 [EN: Scheduled cruise] + SCHEDULE_SCENE_CLEAN = 3; // 预约场景清扫 [EN: Scheduled scene cleaning] } Type type = 1; - // 前置操作 + // 前置操作 [EN: Pre-operation] message Precondition { // TODO } Precondition precondition = 2; enum Mode { - GENERAL = 0; // 通用模式 - CUSTOMIZE = 1; // x9 定制清洁和 stream 房间参数关联,x10 后和 ScheduleRoomsClean.Custom 关联 + GENERAL = 0; // 通用模式 [EN: General mode] + CUSTOMIZE = 1; // x9 定制清洁和 stream 房间参数关联,x10 后和 ScheduleRoomsClean.Custom 关联 [EN: x9 custom cleaning associated with stream room parameters, after x10 associated with ScheduleRoomsClean.Custom] } message ScheduleAutoClean { Mode mode = 1; message General { - // 智能省心模式开关关闭时才有下面 4 个字段 + // 智能省心模式开关关闭时才有下面 4 个字段 [EN: The following 4 fields exist only when smart hassle-free mode switch is off] Fan fan = 1; MopMode mop_mode = 2; CleanType clean_type = 3; CleanExtent clean_extent = 4; - Switch smart_mode_sw = 5; // 智能省心模式开关 + Switch smart_mode_sw = 5; // 智能省心模式开关 [EN: Smart hassle-free mode switch] } General general = 2; } @@ -91,7 +91,7 @@ message TimerInfo { message ScheduleRoomsClean { Mode mode = 1; - message General { // x9 通用模式有效,x10 之后不再使用 + message General { // x9 通用模式有效,x10 之后不再使用 [EN: x9 general mode valid, no longer used after x10] uint32 map_id = 1; Fan fan = 2; @@ -107,21 +107,21 @@ message TimerInfo { } General general = 2; - message Custom { // x9 定制模式不走这里,走 stream,x10 之后房间清洁走这里 + message Custom { // x9 定制模式不走这里,走 stream,x10 之后房间清洁走这里 [EN: x9 custom mode doesn't go here, goes to stream, after x10 room cleaning goes here] uint32 map_id = 1; - Switch smart_mode_sw = 2; // 智能省心模式开关 + Switch smart_mode_sw = 2; // 智能省心模式开关 [EN: Smart hassle-free mode switch] message Room { uint32 id = 1; uint32 order = 2; - // 智能省心模式开关关闭时才有下面 4 个字段 + // 智能省心模式开关关闭时才有下面 4 个字段 [EN: The following 4 fields exist only when smart hassle-free mode switch is off] CleanType clean_type = 6; Fan fan = 7; MopMode mop_mode = 8; CleanExtent clean_extent = 9; - uint32 clean_times = 10; // 清扫次数,非 0 有效 + uint32 clean_times = 10; // 清扫次数,非 0 有效 [EN: Cleaning times, non-zero is valid] } repeated Room rooms = 3; } @@ -134,7 +134,7 @@ message TimerInfo { message ScheduleSceneClean { uint32 scene_id = 1; - string scene_name = 2; // 场景被删除时还可以在定时中显示失效的场景名 + string scene_name = 2; // 场景被删除时还可以在定时中显示失效的场景名 [EN: When scene is deleted, the invalid scene name can still be displayed in schedule] } oneof Param { @@ -150,13 +150,13 @@ message TimerInfo { message TimerRequest { enum Method { DEFAULT = 0; - ADD = 1; // 下面 timer 字段中不带 id 字段,其他都要 - DELETE = 2; // 下面 timer 字段中只用带 id 字段 - MOTIFY = 3; // 下面 timer 字段中要完整的字段 - OPEN = 4; // 下面 timer 字段中只用带 id 字段 - CLOSE = 5; // 下面 timer 字段中只用带 id 字段 - INQUIRY = 6; // 查询/上报 - IGNORE_ONCE = 7; // 忽略一次,下面 timer 字段中只用带 id 字段 + ADD = 1; // 下面 timer 字段中不带 id 字段,其他都要 [EN: timer field below without id field, others are required] + DELETE = 2; // 下面 timer 字段中只用带 id 字段 [EN: timer field below only needs id field] + MOTIFY = 3; // 下面 timer 字段中要完整的字段 [EN: timer field below needs complete fields] + OPEN = 4; // 下面 timer 字段中只用带 id 字段 [EN: timer field below only needs id field] + CLOSE = 5; // 下面 timer 字段中只用带 id 字段 [EN: timer field below only needs id field] + INQUIRY = 6; // 查询/上报 [EN: Query/report] + IGNORE_ONCE = 7; // 忽略一次,下面 timer 字段中只用带 id 字段 [EN: Ignore once, timer field below only needs id field] } Method method = 1; @@ -166,7 +166,7 @@ message TimerRequest { } message TimerResponse { - TimerRequest.Method method = 1; // 开机/失效上报 DEFAULT,其他情况跟下发相同 + TimerRequest.Method method = 1; // 开机/失效上报 DEFAULT,其他情况跟下发相同 [EN: Report DEFAULT on boot/invalid, otherwise same as sent] uint32 seq = 2; message Result { @@ -180,6 +180,6 @@ message TimerResponse { } Result result = 3; - // 全量上报机器中所有的定时信息 + // 全量上报机器中所有的定时信息 [EN: Report all schedule information in device in full] repeated TimerInfo timers = 4; } diff --git a/proto-reference/undisturbed.proto b/proto-reference/undisturbed.proto index 4646feb..1bf103a 100644 --- a/proto-reference/undisturbed.proto +++ b/proto-reference/undisturbed.proto @@ -12,7 +12,7 @@ message Undisturbed { uint32 minute = 2; } - Switch sw = 1; // 勿扰使能开关 + Switch sw = 1; // 勿扰使能开关 [EN: Do not disturb enable switch] TimePoint begin = 2; TimePoint end = 3; @@ -23,7 +23,7 @@ message UndisturbedRequest { } message UndisturbedResponse { - Active active = 1; // 勿扰激活状态 + Active active = 1; // 勿扰激活状态 [EN: Do not disturb active state] Undisturbed undisturbed = 2; } diff --git a/proto-reference/unisetting.proto b/proto-reference/unisetting.proto index 9b2ed8c..1c1fc1e 100644 --- a/proto-reference/unisetting.proto +++ b/proto-reference/unisetting.proto @@ -6,58 +6,58 @@ package proto.cloud; import "proto/cloud/common.proto"; -// 设置项 +// 设置项 [EN: Settings] message UnisettingRequest { - Switch children_lock = 1; // 童锁开关 - Switch cruise_continue_sw = 2; // 断点巡航开关 - Switch multi_map_sw = 3; // 多地图开关 - Switch ai_see = 4; // AI See识别开关 + Switch children_lock = 1; // 童锁开关 [EN: Child lock switch] + Switch cruise_continue_sw = 2; // 断点巡航开关 [EN: Resume cruise switch] + Switch multi_map_sw = 3; // 多地图开关 [EN: Multi-map switch] + Switch ai_see = 4; // AI See识别开关 [EN: AI See recognition switch] message MultiMapOptions { message Retain { repeated uint32 map_id = 1; } - Retain retain = 1; // 多地图开关关闭时,可选带这个保留部分地图 + Retain retain = 1; // 多地图开关关闭时,可选带这个保留部分地图 [EN: When multi-map switch is off, optionally include this to retain some maps] } MultiMapOptions multi_map_options = 5; message WifiSetting { - message Deletion { // 删除指定 ssid,协议支持多个 + message Deletion { // 删除指定 ssid,协议支持多个 [EN: Delete specified ssid, protocol supports multiple] repeated string ssid = 1; } Deletion deletion = 1; } WifiSetting wifi_setting = 6; - Switch water_level_sw = 7; // 实验室功能——清水量显示开关 - Switch suggest_restricted_zone_sw = 8; // 实验室功能——自动推荐禁区开关 - Switch deep_mop_corner_sw = 9; // 实验室功能——深度拖墙角开关(扭屁股动作) + Switch water_level_sw = 7; // 实验室功能——清水量显示开关 [EN: Lab feature - clean water level display switch] + Switch suggest_restricted_zone_sw = 8; // 实验室功能——自动推荐禁区开关 [EN: Lab feature - auto suggest restricted zone switch] + Switch deep_mop_corner_sw = 9; // 实验室功能——深度拖墙角开关(扭屁股动作) [EN: Lab feature - deep mop corner switch (butt wiggle motion)] - Numerical dust_full_remind = 10; // 尘满提醒的时长,单位:分钟 - Switch live_photo_sw = 11; // 实景照片开关 - Switch smart_follow_sw = 12; // 实验室功能——智能跟随开关 - Switch poop_avoidance_sw = 13; // 便便避让开关 - Switch pet_mode_sw = 14; // 宠物模式开关 + Numerical dust_full_remind = 10; // 尘满提醒的时长,单位:分钟 [EN: Dust full reminder duration, unit: minutes] + Switch live_photo_sw = 11; // 实景照片开关 [EN: Live photo switch] + Switch smart_follow_sw = 12; // 实验室功能——智能跟随开关 [EN: Lab feature - smart follow switch] + Switch poop_avoidance_sw = 13; // 便便避让开关 [EN: Poop avoidance switch] + Switch pet_mode_sw = 14; // 宠物模式开关 [EN: Pet mode switch] } message Unistate { - Switch mop_holder_state_l = 1; // 左侧拖布状态(已安装或已取出) - Switch mop_holder_state_r = 2; // 右侧拖布状态(已安装或已取出) - Switch custom_clean_mode = 3; // 通用/定制的状态 - Active map_valid = 4; // 存在有效地图(设备至少存在一张有房间轮廓的地图) - Switch mop_state = 5; // 固定(不旋转)拖布状态(已安装或已取出) + Switch mop_holder_state_l = 1; // 左侧拖布状态(已安装或已取出) [EN: Left mop holder state (installed or removed)] + Switch mop_holder_state_r = 2; // 右侧拖布状态(已安装或已取出) [EN: Right mop holder state (installed or removed)] + Switch custom_clean_mode = 3; // 通用/定制的状态 [EN: General/custom mode state] + Active map_valid = 4; // 存在有效地图(设备至少存在一张有房间轮廓的地图) [EN: Valid map exists (device has at least one map with room outlines)] + Switch mop_state = 5; // 固定(不旋转)拖布状态(已安装或已取出) [EN: Fixed (non-rotating) mop state (installed or removed)] message LiveMap { - enum StateBit { // 多个值组合(用位运算) - BASE = 0; // 底图 - ROOM = 1; // 房间轮廓 - KITCHEN = 2; // 厨房 - PET = 3; // 宠物区 + enum StateBit { // 多个值组合(用位运算) [EN: Multiple values combined (using bitwise operations)] + BASE = 0; // 底图 [EN: Base map] + ROOM = 1; // 房间轮廓 [EN: Room outline] + KITCHEN = 2; // 厨房 [EN: Kitchen] + PET = 3; // 宠物区 [EN: Pet area] } uint32 state_bits = 1; } - LiveMap live_map = 6; // 实时地图有哪些组件信息 + LiveMap live_map = 6; // 实时地图有哪些组件信息 [EN: Which component info the real-time map has] - uint32 clean_strategy_version = 7; // 清洁策略版本(云端/本地) + uint32 clean_strategy_version = 7; // 清洁策略版本(云端/本地) [EN: Cleaning strategy version (cloud/local)] } message WifiData { @@ -73,34 +73,34 @@ message WifiData { PASSWD_ERR = 1; } Result result = 1; - uint64 timestamp = 2; // utc, 单位s + uint64 timestamp = 2; // utc, 单位s [EN: utc, unit: seconds] } string ssid = 1; Frequency frequency = 2; Connection connection = 3; } - repeated Ap ap = 1; // 第1个为当前连接的AP + repeated Ap ap = 1; // 第1个为当前连接的AP [EN: First one is the currently connected AP] } -// 设置项或状态项 +// 设置项或状态项 [EN: Settings or status items] message UnisettingResponse { - Switch children_lock = 1; // 童锁开关 - Switch cruise_continue_sw = 2; // 断点巡航开关 - Switch multi_map_sw = 3; // 多地图开关 - Switch ai_see = 4; // AI See识别开关 + Switch children_lock = 1; // 童锁开关 [EN: Child lock switch] + Switch cruise_continue_sw = 2; // 断点巡航开关 [EN: Resume cruise switch] + Switch multi_map_sw = 3; // 多地图开关 [EN: Multi-map switch] + Switch ai_see = 4; // AI See识别开关 [EN: AI See recognition switch] - Switch water_level_sw = 5; // 实验室功能——清水量显示开关 - Switch suggest_restricted_zone_sw = 6; // 实验室功能——自动推荐禁区开关 - Switch deep_mop_corner_sw = 7; // 实验室功能——深度拖墙角开关(扭屁股动作) + Switch water_level_sw = 5; // 实验室功能——清水量显示开关 [EN: Lab feature - clean water level display switch] + Switch suggest_restricted_zone_sw = 6; // 实验室功能——自动推荐禁区开关 [EN: Lab feature - auto suggest restricted zone switch] + Switch deep_mop_corner_sw = 7; // 实验室功能——深度拖墙角开关(扭屁股动作) [EN: Lab feature - deep mop corner switch (butt wiggle motion)] - Numerical dust_full_remind = 8; // 尘满提醒的时长,单位:分钟 - Switch live_photo_sw = 9; // 实景照片开关 + Numerical dust_full_remind = 8; // 尘满提醒的时长,单位:分钟 [EN: Dust full reminder duration, unit: minutes] + Switch live_photo_sw = 9; // 实景照片开关 [EN: Live photo switch] Unistate unistate = 10; - uint32 ap_signal_strength = 11; // 0 - 100,当前连接的wifi信号强度 + uint32 ap_signal_strength = 11; // 0 - 100,当前连接的wifi信号强度 [EN: 0 - 100, current connected WiFi signal strength] WifiData wifi_data = 12; - Switch smart_follow_sw = 13; // 实验室功能——智能跟随开关 - Switch poop_avoidance_sw = 14; // 便便避让开关 - Switch pet_mode_sw = 15; // 宠物模式开关 + Switch smart_follow_sw = 13; // 实验室功能——智能跟随开关 [EN: Lab feature - smart follow switch] + Switch poop_avoidance_sw = 14; // 便便避让开关 [EN: Poop avoidance switch] + Switch pet_mode_sw = 15; // 宠物模式开关 [EN: Pet mode switch] } diff --git a/proto-reference/universal_data.proto b/proto-reference/universal_data.proto index 3ea592c..ebd8503 100644 --- a/proto-reference/universal_data.proto +++ b/proto-reference/universal_data.proto @@ -1,5 +1,5 @@ /** - * 通用数据协议 + * 通用数据协议 [EN: Universal data protocol] */ syntax = "proto3"; diff --git a/proto-reference/upgrade.proto b/proto-reference/upgrade.proto index 2360e74..b82120d 100644 --- a/proto-reference/upgrade.proto +++ b/proto-reference/upgrade.proto @@ -4,31 +4,31 @@ package proto.cloud; // Request message QueryUpgradeStatus { - // 无参数 + // 无参数 [EN: No parameters] } // Response message UpgradeStatus { enum Status { - IDLE = 0; // 空闲状态 - DOWNLOADING = 1; // 下载中 - DOWNLOAD_COMPLETE = 2; // 下载完成 - DOWNLOAD_FAILED = 3; // 下载失败 - INSTALLING = 4; // 安装中 - INSTALL_COMPLETE = 5; // 安装完成 - INSTALL_FAILED = 6; // 安装失败 + IDLE = 0; // 空闲状态 [EN: Idle state] + DOWNLOADING = 1; // 下载中 [EN: Downloading] + DOWNLOAD_COMPLETE = 2; // 下载完成 [EN: Download complete] + DOWNLOAD_FAILED = 3; // 下载失败 [EN: Download failed] + INSTALLING = 4; // 安装中 [EN: Installing] + INSTALL_COMPLETE = 5; // 安装完成 [EN: Installation complete] + INSTALL_FAILED = 6; // 安装失败 [EN: Installation failed] } Status status = 1; - uint32 progress = 2; // 下载进度, 0-100% + uint32 progress = 2; // 下载进度, 0-100% [EN: Download progress, 0-100%] enum Error{ NONE = 0; - NOT_IN_STATION = 1; // 不在充电桩 - BATTERY_NOT_ENOUGH = 2; // 电量不足 - MCU_INSTALL_FAILED = 3; // MCU安装失败 - AP_INSTALL_FAILED = 4; // AP安装失败 - STATION_NOT_CONNECTED = 5; // 基站未连接 - STATION_INSTALL_FAILED = 6; // 基站安装失败 + NOT_IN_STATION = 1; // 不在充电桩 [EN: Not on charging dock] + BATTERY_NOT_ENOUGH = 2; // 电量不足 [EN: Battery not enough] + MCU_INSTALL_FAILED = 3; // MCU安装失败 [EN: MCU installation failed] + AP_INSTALL_FAILED = 4; // AP安装失败 [EN: AP installation failed] + STATION_NOT_CONNECTED = 5; // 基站未连接 [EN: Station not connected] + STATION_INSTALL_FAILED = 6; // 基站安装失败 [EN: Station installation failed] } string error = 3; } diff --git a/proto-reference/version.proto b/proto-reference/version.proto index 258cae7..d3ee6f2 100644 --- a/proto-reference/version.proto +++ b/proto-reference/version.proto @@ -6,12 +6,12 @@ package proto.cloud; enum Global { NONE = 0; - PROTO_VERSION = 1; // 目前是1,有变更则递增 + PROTO_VERSION = 1; // 目前是1,有变更则递增 [EN: Currently 1, increment on changes] } -// 设备支持的协议 +// 设备支持的协议 [EN: Protocols supported by device] message ProtoInfo { - uint32 global_verison = 1; // 使用 Global 的 PROTO_VERSION + uint32 global_verison = 1; // 使用 Global 的 PROTO_VERSION [EN: Use Global's PROTO_VERSION] message Module { uint32 version = 1; @@ -19,50 +19,50 @@ message ProtoInfo { } enum CollectDustOptionBit { - COLLECT_DUST_APP_START = 0; // 此位为1时表示带App一键启动集尘功能,0表示不带 + COLLECT_DUST_APP_START = 0; // 此位为1时表示带App一键启动集尘功能,0表示不带 [EN: When this bit is 1, it means with App one-click start dust collection feature, 0 means without] } /** - * 对应 station.proto 文件 - * version 1 使用 CollectDustCfg - * version 2 使用 CollectDustCfgV2, option定义见CollectDustOptionBit + * 对应 station.proto 文件 [EN: Corresponds to station.proto file] + * version 1 使用 CollectDustCfg [EN: version 1 uses CollectDustCfg] + * version 2 使用 CollectDustCfgV2, option定义见CollectDustOptionBit [EN: version 2 uses CollectDustCfgV2, option defined in CollectDustOptionBit] */ Module collect_dust = 2; enum MapFormatOptionBit { - MAP_FORMAT_ANGLE = 0; // 地图存在 angle 字段 - MAP_FORMAT_RESERVE_MAP = 1; // 固件适配关闭多地图能选择保留地图 - MAP_FORMAT_DEFAULT_NAME = 2; // 固件支持地图和房间默认名称 + MAP_FORMAT_ANGLE = 0; // 地图存在 angle 字段 [EN: Map has angle field] + MAP_FORMAT_RESERVE_MAP = 1; // 固件适配关闭多地图能选择保留地图 [EN: Firmware adapted to allow selecting reserved map when closing multi-map] + MAP_FORMAT_DEFAULT_NAME = 2; // 固件支持地图和房间默认名称 [EN: Firmware supports map and room default names] } /** - * version 1 地图增加 angle 字段(仅使用 Module.version) - * version 2 地图使用 option 定义见 MapFormatOptionBit + * version 1 地图增加 angle 字段(仅使用 Module.version) [EN: version 1 map adds angle field (only uses Module.version)] + * version 2 地图使用 option 定义见 MapFormatOptionBit [EN: version 2 map uses option defined in MapFormatOptionBit] */ Module map_format = 3; enum ContinueCleanOptionBit { - SMART_CONTINUE_CLEAN = 0; // 智能断点续扫 + SMART_CONTINUE_CLEAN = 0; // 智能断点续扫 [EN: Smart resume cleaning] } /** - * version 1 断点续扫使用 option 定义见 ContinueCleanOptionBit + * version 1 断点续扫使用 option 定义见 ContinueCleanOptionBit [EN: version 1 resume cleaning uses option defined in ContinueCleanOptionBit] */ Module continue_clean = 4; /** - * version 1 支持割毛发功能 + * version 1 支持割毛发功能 [EN: version 1 supports hair cutting feature] */ Module cut_hair = 5; enum TimingOptionBit { - SCHEDULE_ROOMS_CLEAN_CUSTOM = 0; // 预约房间清扫支持每个房间自定义参数 - SCHEDULE_SCENE_CLEAN = 1; // 预约场景清扫 + SCHEDULE_ROOMS_CLEAN_CUSTOM = 0; // 预约房间清扫支持每个房间自定义参数 [EN: Scheduled rooms cleaning supports custom parameters for each room] + SCHEDULE_SCENE_CLEAN = 1; // 预约场景清扫 [EN: Scheduled scene cleaning] } /** - * version 1 定时功能使用 option 定义见 TimingOptionBit + * version 1 定时功能使用 option 定义见 TimingOptionBit [EN: version 1 schedule feature uses option defined in TimingOptionBit] */ Module timing = 6; } -// App 支持的功能 +// App 支持的功能 [EN: Features supported by App] message AppFunction { message Module { uint32 version = 1; @@ -70,18 +70,18 @@ message AppFunction { } enum MultiMapsFunctionBit { - REMIND_MAP_SAVE = 0; // 此位为1时表示App的拥有能力是地图提醒保存 + REMIND_MAP_SAVE = 0; // 此位为1时表示App的拥有能力是地图提醒保存 [EN: When this bit is 1, it means App has the capability of map save reminder] } /** - * version 1 使用 option 定义见 MultiMapsFunctionBit + * version 1 使用 option 定义见 MultiMapsFunctionBit [EN: version 1 uses option defined in MultiMapsFunctionBit] */ Module multi_maps= 2; enum OptimizationFunctionBit { - PATH_HIDE_TYPE = 0; // 此位为1时表示App支持路径隐藏类型 + PATH_HIDE_TYPE = 0; // 此位为1时表示App支持路径隐藏类型 [EN: When this bit is 1, it means App supports path hide type] } /** - * version 1 使用 option 定义见 OptimizationFunctionBit + * version 1 使用 option 定义见 OptimizationFunctionBit [EN: version 1 uses option defined in OptimizationFunctionBit] */ Module optimization = 3; -} \ No newline at end of file +} diff --git a/proto-reference/work_status.proto b/proto-reference/work_status.proto index 638f4f7..b51940a 100644 --- a/proto-reference/work_status.proto +++ b/proto-reference/work_status.proto @@ -5,46 +5,46 @@ syntax = "proto3"; package proto.cloud; message WorkStatus { - // 刚开机时,不用传 mode,由手机 app 自行决定展示默认值 - // mode 由手机 app 下发或按键更改,回复值和上次相同 + // 刚开机时,不用传 mode,由手机 app 自行决定展示默认值 [EN: When just powered on, no need to send mode, mobile app decides the default display value] + // mode 由手机 app 下发或按键更改,回复值和上次相同 [EN: mode is sent by mobile app or changed by button, reply value is same as last time] message Mode { enum Value { - AUTO = 0; // 全局自动清洁 - SELECT_ROOM = 1; // 选房清洁 - SELECT_ZONE = 2; // 选区清洁 - SPOT = 3; // 定点清洁 - FAST_MAPPING = 4; // 快速建图 - GLOBAL_CRUISE = 5; // 全屋巡航 - ZONES_CRUISE = 6; // 选区巡航 - POINT_CRUISE = 7; // 指哪巡航(精准到达) - SCENE = 8; // 场景清洁 - SMART_FOLLOW = 9; // 智能跟随 + AUTO = 0; // 全局自动清洁 [EN: Global auto cleaning] + SELECT_ROOM = 1; // 选房清洁 [EN: Selected room cleaning] + SELECT_ZONE = 2; // 选区清洁 [EN: Selected zone cleaning] + SPOT = 3; // 定点清洁 [EN: Spot cleaning] + FAST_MAPPING = 4; // 快速建图 [EN: Fast mapping] + GLOBAL_CRUISE = 5; // 全屋巡航 [EN: Whole house cruise] + ZONES_CRUISE = 6; // 选区巡航 [EN: Selected zones cruise] + POINT_CRUISE = 7; // 指哪巡航(精准到达) [EN: Point cruise (precise arrival)] + SCENE = 8; // 场景清洁 [EN: Scene cleaning] + SMART_FOLLOW = 9; // 智能跟随 [EN: Smart follow] } Value value = 1; } Mode mode = 1; enum State { - STANDBY = 0; // 待机、建图暂停、暂停清洁、暂停回洗、暂停回充、暂停巡航、寻找机器人 - SLEEP = 1; // 休眠 - FAULT = 2; // 故障 - CHARGING = 3; // 升级中(未来可能考虑非充电状态也能升级)、充电中、充电完成、充电异常 - FAST_MAPPING = 4; // 定位中、快速建图 - CLEANING = 5; // 定位中、全局清洁、选区清洁、划区清洁、定点清洁、回洗拖布中、清洗拖布中 - REMOTE_CTRL = 6; // 遥控中 - GO_HOME = 7; // 定位中、回充中(包括清洁完成回充、低电回充) - CRUISIING = 8; // 定位中、巡航中 + STANDBY = 0; // 待机、建图暂停、暂停清洁、暂停回洗、暂停回充、暂停巡航、寻找机器人 [EN: Standby, mapping paused, cleaning paused, wash return paused, charge return paused, cruise paused, finding robot] + SLEEP = 1; // 休眠 [EN: Sleep] + FAULT = 2; // 故障 [EN: Fault] + CHARGING = 3; // 升级中(未来可能考虑非充电状态也能升级)、充电中、充电完成、充电异常 [EN: Upgrading (may consider non-charging upgrade in future), charging, charge complete, charging abnormal] + FAST_MAPPING = 4; // 定位中、快速建图 [EN: Positioning, fast mapping] + CLEANING = 5; // 定位中、全局清洁、选区清洁、划区清洁、定点清洁、回洗拖布中、清洗拖布中 [EN: Positioning, global cleaning, zone cleaning, area cleaning, spot cleaning, returning to wash mop, washing mop] + REMOTE_CTRL = 6; // 遥控中 [EN: Remote controlling] + GO_HOME = 7; // 定位中、回充中(包括清洁完成回充、低电回充) [EN: Positioning, returning to charge (including post-cleaning and low battery return)] + CRUISIING = 8; // 定位中、巡航中 [EN: Positioning, cruising] } State state = 2; - // 某一时刻以下子状态可能存在一个或同时存在多个 - // 隐含规则:下面 message 如果不存在表示该子状态为 IDLE + // 某一时刻以下子状态可能存在一个或同时存在多个 [EN: At any moment, one or more of the following sub-states may exist simultaneously] + // 隐含规则:下面 message 如果不存在表示该子状态为 IDLE [EN: Implicit rule: if the message below doesn't exist, that sub-state is IDLE] message Charging { enum State { DOING = 0; DONE = 1; - ABNORMAL = 2; // 充电异常(充电弹片接触但无法充电) + ABNORMAL = 2; // 充电异常(充电弹片接触但无法充电) [EN: Charging abnormal (charging contacts connected but cannot charge)] } State state = 1; } @@ -59,7 +59,7 @@ message WorkStatus { } Upgrading upgrading = 4; - message Mapping { // 快速建图、清洁建图都会有这个 message + message Mapping { // 快速建图、清洁建图都会有这个 message [EN: Both fast mapping and cleaning mapping will have this message] enum RunState { DOING = 0; PAUSED = 1; @@ -67,10 +67,10 @@ message WorkStatus { RunState state = 1; enum Mode { - MAPPING = 0; // [兼容字段,4.1 废弃] - RELOCATING = 1; // [兼容字段,4.1 废弃] + MAPPING = 0; // [兼容字段,4.1 废弃] [EN: Compatibility field, deprecated in 4.1] + RELOCATING = 1; // [兼容字段,4.1 废弃] [EN: Compatibility field, deprecated in 4.1] } - Mode mode = 2; // [兼容字段,4.1 废弃] + Mode mode = 2; // [兼容字段,4.1 废弃] [EN: Compatibility field, deprecated in 4.1] } Mapping mapping = 5; @@ -83,12 +83,12 @@ message WorkStatus { enum Mode { CLEANING = 0; - RELOCATING = 1; // [兼容字段,4.1 废弃] + RELOCATING = 1; // [兼容字段,4.1 废弃] [EN: Compatibility field, deprecated in 4.1] GOTO_POS = 2; - POOP_CLEANING = 3; // 便便补扫 + POOP_CLEANING = 3; // 便便补扫 [EN: Poop re-cleaning] } Mode mode = 2; - bool scheduled_task = 3; // 是否在执行预约定时任务 + bool scheduled_task = 3; // 是否在执行预约定时任务 [EN: Whether executing scheduled task] } Cleaning cleaning = 6; @@ -100,9 +100,9 @@ message WorkStatus { RunState state = 1; enum Mode { - NAVIGATION = 0; // 回洗 - WASHING = 1; // 清洗拖布中 - DRYING = 2; // 烘干拖布中(严格意义不属于回洗) + NAVIGATION = 0; // 回洗 [EN: Return to wash] + WASHING = 1; // 清洗拖布中 [EN: Washing mop] + DRYING = 2; // 烘干拖布中(严格意义不属于回洗) [EN: Drying mop (strictly not part of wash return)] } Mode mode = 2; } @@ -116,9 +116,9 @@ message WorkStatus { RunState state = 1; enum Mode { - COMPLETE_TASK = 0; // 完成任务回充 - COLLECT_DUST = 1; // 中途集尘回充 - OTHRERS = 10; // 其他回充 + COMPLETE_TASK = 0; // 完成任务回充 [EN: Return to charge after task completion] + COLLECT_DUST = 1; // 中途集尘回充 [EN: Mid-task dust collection return] + OTHRERS = 10; // 其他回充 [EN: Other returns to charge] } Mode mode = 2; } @@ -132,10 +132,10 @@ message WorkStatus { RunState state = 1; enum Mode { - RELOCATING = 0; // [兼容字段,4.1 废弃] - CRUISIING = 1; // [兼容字段,4.1 废弃] + RELOCATING = 0; // [兼容字段,4.1 废弃] [EN: Compatibility field, deprecated in 4.1] + CRUISIING = 1; // [兼容字段,4.1 废弃] [EN: Compatibility field, deprecated in 4.1] } - Mode mode = 2; // [兼容字段,4.1 废弃] + Mode mode = 2; // [兼容字段,4.1 废弃] [EN: Compatibility field, deprecated in 4.1] } Cruisiing cruisiing = 9; @@ -170,81 +170,81 @@ message WorkStatus { State state = 1; enum Mode { - FOLLOWING = 0; // 跟随中 - SEARCHING = 1; // 搜索目标中 + FOLLOWING = 0; // 跟随中 [EN: Following] + SEARCHING = 1; // 搜索目标中 [EN: Searching for target] } Mode mode = 2; - uint32 elapsed_time = 3; // 已执行时间 - uint32 area = 4; // 面积 + uint32 elapsed_time = 3; // 已执行时间 [EN: Elapsed time] + uint32 area = 4; // 面积 [EN: Area] } SmartFollow smart_follow = 13; message Station { - // 注水系统,操作对象:机器人水箱 + // 注水系统,操作对象:机器人水箱 [EN: Water injection system, operation target: robot water tank] message WaterInjectionSystem { enum State { - ADDING = 0; // 注水中 - EMPTYING = 1; // 排水中 + ADDING = 0; // 注水中 [EN: Adding water] + EMPTYING = 1; // 排水中 [EN: Draining water] } State state = 1; } WaterInjectionSystem water_injection_system = 1; - // 集尘系统,操作对象:机器人集尘盒 + // 集尘系统,操作对象:机器人集尘盒 [EN: Dust collection system, operation target: robot dust bin] message DustCollectionSystem { enum State { - EMPTYING = 0; // 排空中 + EMPTYING = 0; // 排空中 [EN: Emptying] } State state = 1; } DustCollectionSystem dust_collection_system = 2; - // 洗和烘干系统,操作对象:机器人拖布 + // 洗和烘干系统,操作对象:机器人拖布 [EN: Washing and drying system, operation target: robot mop] message WashingDryingSystem { enum State { - WASHING = 0; // 洗拖布中 - DRYING = 1; // 烘干拖布中 + WASHING = 0; // 洗拖布中 [EN: Washing mop] + DRYING = 1; // 烘干拖布中 [EN: Drying mop] } State state = 1; } WashingDryingSystem washing_drying_system = 3; - // 基站水箱状态 + // 基站水箱状态 [EN: Station water tank status] message WaterTankState { - bool clear_water_adding = 1; // 清水添加中 - bool waste_water_recycling = 2; // 污水回收中 + bool clear_water_adding = 1; // 清水添加中 [EN: Adding clean water] + bool waste_water_recycling = 2; // 污水回收中 [EN: Recycling waste water] } WaterTankState water_tank_state = 4; } - Station station = 14; // 从 x10 项目开始使用这里的基站状态,station dp 的状态保留但不做逻辑处理 + Station station = 14; // 从 x10 项目开始使用这里的基站状态,station dp 的状态保留但不做逻辑处理 [EN: From x10 project onwards use station status here, station dp status is retained but not logically processed] message Scene { uint32 id = 1; - uint32 elapsed_time = 2; // 已执行时间,0 有效 - uint32 estimate_time = 3; // 预估完成时间,0 无效 + uint32 elapsed_time = 2; // 已执行时间,0 有效 [EN: Elapsed time, 0 is valid] + uint32 estimate_time = 3; // 预估完成时间,0 无效 [EN: Estimated completion time, 0 is invalid] string name = 4; enum TaskMode { - AUTO = 0; // 全局自动清洁 - SELECT_ROOM = 1; // 选房清洁 - SELECT_ZONE = 2; // 选区清洁 + AUTO = 0; // 全局自动清洁 [EN: Global auto cleaning] + SELECT_ROOM = 1; // 选房清洁 [EN: Selected room cleaning] + SELECT_ZONE = 2; // 选区清洁 [EN: Selected zone cleaning] } TaskMode task_mode = 5; - // 后面这里加上场景的时间线 + // 后面这里加上场景的时间线 [EN: Add scene timeline here later] // ... } Scene current_scene = 19; message Trigger { enum Source { - UNKNOWN = 0; // 来源未知,如:刚开机 - APP = 1; // 手机 app 或者其他调试工具 - KEY = 2; // 按键,如:暂停、继续、停止、回充等 - TIMING = 3; // 定时,如:每天清洁、每周清洁等 - ROBOT = 4; // 机器人,如:低电、故障、清洁完成等 - REMOTE_CTRL = 5; // 遥控器, 如:遥控器按键 + UNKNOWN = 0; // 来源未知,如:刚开机 [EN: Unknown source, e.g., just powered on] + APP = 1; // 手机 app 或者其他调试工具 [EN: Mobile app or other debugging tools] + KEY = 2; // 按键,如:暂停、继续、停止、回充等 [EN: Button, e.g., pause, resume, stop, return to charge, etc.] + TIMING = 3; // 定时,如:每天清洁、每周清洁等 [EN: Scheduled, e.g., daily cleaning, weekly cleaning, etc.] + ROBOT = 4; // 机器人,如:低电、故障、清洁完成等 [EN: Robot, e.g., low battery, fault, cleaning complete, etc.] + REMOTE_CTRL = 5; // 遥控器, 如:遥控器按键 [EN: Remote control, e.g., remote control buttons] } Source source = 1; } From 7f18ca0a2336b313ccad30e6efd9567c35f3ef28 Mon Sep 17 00:00:00 2001 From: Jonathan Thompson Date: Fri, 23 Jan 2026 09:44:09 +0000 Subject: [PATCH 05/25] Adding new error codes from protobuf Summary Added T22xx series error codes to /workspaces/robovac/custom_components/robovac/errors.py based on proto-reference/error_code_list_t2265.proto. These error codes apply to the T2267 (RoboVac L60) and other T22xx series vacuums. Error Codes Added (40 new codes) Wheel errors (1xxx): - 1010-1013: Left wheel errors (open circuit, short circuit, error, stuck) - 1020-1023: Right wheel errors - 1030-1033: Both wheels errors Fan and brush errors (2xxx): - 2010, 2013: Suction fan errors - 2110-2112: Roller brush errors - 2210-2213: Side brush errors - 2310-2311: Dustbin/filter errors Water system errors (3xxx): - 3010: Water pump open circuit - 3013: Water tank insufficient Sensor errors (4xxx): - 4010-4012: Laser sensor errors - 4111-4112: Bumper stuck errors - 4130: Laser cover stuck Power and communication errors (5xxx): - 5014-5015: Low battery errors - 5110: WiFi/Bluetooth error - 5112: Station communication error Station errors (6xxx): - 6113: Dust bag not installed - 6310-6311: Hair cutting errors Navigation errors (7xxx): - 7000-7003: Robot trapped/suspended errors - 7010: Entered no-go zone - 7020-7021: Positioning failed errors - 7031-7034: Docking/undocking errors - 7040, 7050-7052: Navigation and route planning errors Troubleshooting Context Added Added detailed troubleshooting steps and common causes for 15 key error codes including wheel stuck, brush stuck, sensor blocked, docking failed, and robot trapped errors. --- custom_components/robovac/errors.py | 242 ++++++++++++++++++++++++++++ 1 file changed, 242 insertions(+) diff --git a/custom_components/robovac/errors.py b/custom_components/robovac/errors.py index e4dfe4a..182829c 100644 --- a/custom_components/robovac/errors.py +++ b/custom_components/robovac/errors.py @@ -3,6 +3,7 @@ "CONNECTION_FAILED": "Connection to the vacuum failed", "UNSUPPORTED_MODEL": "This model is not supported", "no_error": "None", + # Legacy error codes (T20xx and older models) 1: "Front bumper stuck", 2: "Wheel stuck", 3: "Side brush", @@ -20,6 +21,68 @@ 19: "Laser sensor stuck", 20: "Laser sensor blocked", 21: "Base blocked", + # T22xx series error codes (from proto-reference/error_code_list_t2265.proto) + # Wheel errors (1xxx) + 1010: "Left wheel open circuit", + 1011: "Left wheel short circuit", + 1012: "Left wheel error", + 1013: "Left wheel stuck", + 1020: "Right wheel open circuit", + 1021: "Right wheel short circuit", + 1022: "Right wheel error", + 1023: "Right wheel stuck", + 1030: "Both wheels open circuit", + 1031: "Both wheels short circuit", + 1032: "Both wheels error", + 1033: "Both wheels stuck", + # Fan and brush errors (2xxx) + 2010: "Suction fan open circuit", + 2013: "Suction fan RPM error", + 2110: "Roller brush open circuit", + 2111: "Roller brush short circuit", + 2112: "Roller brush stuck", + 2210: "Side brush open circuit", + 2211: "Side brush short circuit", + 2212: "Side brush error", + 2213: "Side brush stuck", + 2310: "Dustbin and filter not installed", + 2311: "Dustbin not cleaned for too long", + # Water system errors (3xxx) + 3010: "Water pump open circuit", + 3013: "Water tank insufficient", + # Sensor errors (4xxx) + 4010: "Laser sensor error", + 4011: "Laser sensor blocked", + 4012: "Laser sensor stuck or entangled", + 4111: "Left bumper stuck", + 4112: "Right bumper stuck", + 4130: "Laser cover stuck", + # Power and communication errors (5xxx) + 5014: "Low battery shutdown", + 5015: "Low battery - cannot schedule cleaning", + 5110: "WiFi or Bluetooth error", + 5112: "Station communication error", + # Station errors (6xxx) + 6113: "Dust bag not installed", + 6310: "Hair cutting interrupted", + 6311: "Hair cutting component stuck", + # Navigation and positioning errors (7xxx) + 7000: "Robot trapped", + 7001: "Robot partly suspended", + 7002: "Robot fully suspended (picked up)", + 7003: "Robot suspended during startup self-check", + 7010: "Entered no-go zone", + 7020: "Positioning failed - starting new cleaning", + 7021: "Positioning failed - returning to station", + 7031: "Docking failed", + 7032: "Station exploration failed - returning to start point", + 7033: "Return to station failed - stopped working", + 7034: "Cannot find start point - stopped working", + 7040: "Undocking failed", + 7050: "Some areas inaccessible - not cleaned", + 7051: "Scheduled cleaning failed - task in progress", + 7052: "Route planning failed - cannot reach designated area", + # String-based error codes "S1": "Battery", "S2": "Wheel Module", "S3": "Side Brush", @@ -38,6 +101,7 @@ TROUBLESHOOTING_CONTEXT = { + # Legacy error codes 1: { "troubleshooting": [ "Check front bumper for obstructions", @@ -87,6 +151,184 @@ "Physical damage to sensor cover", ], }, + # T22xx series error codes + 1013: { + "troubleshooting": [ + "Check left wheel for hair or debris", + "Ensure wheel rotates freely", + "Clean wheel axle area", + "Restart vacuum", + ], + "common_causes": [ + "Hair wrapped around wheel", + "Debris blocking wheel movement", + "Wheel motor issue", + ], + }, + 1023: { + "troubleshooting": [ + "Check right wheel for hair or debris", + "Ensure wheel rotates freely", + "Clean wheel axle area", + "Restart vacuum", + ], + "common_causes": [ + "Hair wrapped around wheel", + "Debris blocking wheel movement", + "Wheel motor issue", + ], + }, + 1033: { + "troubleshooting": [ + "Check both wheels for hair or debris", + "Ensure both wheels rotate freely", + "Clean wheel axle areas", + "Move vacuum to a flat surface", + ], + "common_causes": [ + "Hair wrapped around wheels", + "Vacuum stuck on obstacle", + "Both wheel motors affected", + ], + }, + 2112: { + "troubleshooting": [ + "Remove and clean the roller brush", + "Check for hair or string wrapped around brush", + "Inspect brush bearings", + "Reinstall brush securely", + ], + "common_causes": [ + "Hair tangled in roller brush", + "Debris blocking brush rotation", + "Worn brush bearings", + ], + }, + 2213: { + "troubleshooting": [ + "Remove and clean the side brush", + "Check for hair wrapped around brush stem", + "Ensure brush is properly attached", + ], + "common_causes": [ + "Hair or debris on side brush", + "Damaged side brush motor", + "Side brush not properly seated", + ], + }, + 2310: { + "troubleshooting": [ + "Ensure dustbin is properly installed", + "Check that filter is in place", + "Clean dustbin sensors", + "Reinstall dustbin securely", + ], + "common_causes": [ + "Dustbin not fully inserted", + "Filter missing or misaligned", + "Dirty dustbin sensors", + ], + }, + 4011: { + "troubleshooting": [ + "Clean the laser sensor cover", + "Remove any obstructions above laser turret", + "Check for dust or debris on sensor", + "Wipe with soft, dry cloth", + ], + "common_causes": [ + "Dust on laser sensor", + "Object blocking laser view", + "Dirty sensor cover", + ], + }, + 4012: { + "troubleshooting": [ + "Check laser turret can rotate freely", + "Remove any hair or debris from turret base", + "Ensure nothing is tangled around sensor", + "Restart vacuum", + ], + "common_causes": [ + "Hair wrapped around laser turret", + "Debris blocking turret rotation", + "Mechanical obstruction", + ], + }, + 4130: { + "troubleshooting": [ + "Check laser cover for obstructions", + "Ensure cover moves freely", + "Clean around laser cover area", + ], + "common_causes": [ + "Debris blocking laser cover", + "Cover mechanism jammed", + "Physical damage to cover", + ], + }, + 5014: { + "troubleshooting": [ + "Place vacuum on charging dock", + "Charge fully before next use", + "Check charging contacts are clean", + ], + "common_causes": [ + "Battery depleted during cleaning", + "Long cleaning session", + "Battery not holding charge", + ], + }, + 7000: { + "troubleshooting": [ + "Move vacuum to open area", + "Remove obstacles around vacuum", + "Check for narrow spaces vacuum cannot exit", + "Restart cleaning cycle", + ], + "common_causes": [ + "Vacuum stuck under furniture", + "Too many obstacles in area", + "Vacuum wedged in tight space", + ], + }, + 7002: { + "troubleshooting": [ + "Place vacuum on floor", + "Ensure all wheels touch ground", + "Start cleaning from flat surface", + ], + "common_causes": [ + "Vacuum lifted during operation", + "Vacuum balanced on obstacle edge", + "Cliff sensors triggered incorrectly", + ], + }, + 7010: { + "troubleshooting": [ + "Move vacuum outside no-go zone", + "Check no-go zone boundaries in app", + "Adjust no-go zone if needed", + ], + "common_causes": [ + "Vacuum drifted into restricted area", + "No-go zone boundaries too close to path", + "Mapping inaccuracy", + ], + }, + 7031: { + "troubleshooting": [ + "Clear area around charging dock", + "Ensure dock is against wall", + "Clean charging contacts on vacuum and dock", + "Check dock has power", + ], + "common_causes": [ + "Obstacles blocking dock access", + "Dirty charging contacts", + "Dock moved from mapped location", + ], + }, } From 82425136c578c73a5b13139e51d50fce590f2427 Mon Sep 17 00:00:00 2001 From: Jonathan Thompson Date: Fri, 23 Jan 2026 09:47:51 +0000 Subject: [PATCH 06/25] add additional error codes for x9 pro Summary Added T2320 (X9 Pro with Auto-Clean Station) specific error codes to /workspaces/robovac/custom_components/robovac/errors.py based on proto-reference/error_code_list_t2320.proto. Error Codes Added (32 new codes) Basic errors (26-55): - 26: Low battery - scheduled start failed - 31: Foreign objects stuck in suction port - 32: Mop holder rotating motor stuck - 33: Mop bracket lift motor stuck - 39: Positioning failed - check map - 40: Mop cloth dislodged - 41: Air drying device heater abnormal - 50: Machine accidentally on carpet - 51: Camera blocked - 52: Unable to leave station - 55: Station exploration failed Station and maintenance errors (70-83): - 70: Please clean dust collector and filter - 71: Wall sensor abnormal - 72: Robot water tank insufficient - 73: Station dirty water tank full - 74: Station clean water tank insufficient - 75: Station water tank missing - 76: Camera abnormal - 77: 3D TOF sensor abnormal - 78: Ultrasonic sensor abnormal - 79: Station clean tray not installed - 80: Robot and station communication abnormal - 81: Dirty water tank leaking - 82: Please clean station wash tray - 83: Poor charging contact Hardware module errors (101-119): - 101: Battery abnormal - 102: Wheel module abnormal - 103: Side brush module abnormal - 104: Fan abnormal - 105: Roller brush motor abnormal - 106: Water pump abnormal - 107: Laser sensor abnormal - 111: Rotation motor abnormal - 112: Lift motor abnormal - 113: Water spraying device abnormal - 114: Water pumping device abnormal - 117: Ultrasonic sensor abnormal - 119: WiFi or Bluetooth abnormal Troubleshooting Context Added Added detailed troubleshooting steps for 12 key T2320 error codes including mop holder issues, station water tanks, wash tray, and charging contact problems. --- custom_components/robovac/errors.py | 181 ++++++++++++++++++++++++++++ 1 file changed, 181 insertions(+) diff --git a/custom_components/robovac/errors.py b/custom_components/robovac/errors.py index 182829c..53ffae3 100644 --- a/custom_components/robovac/errors.py +++ b/custom_components/robovac/errors.py @@ -21,6 +21,46 @@ 19: "Laser sensor stuck", 20: "Laser sensor blocked", 21: "Base blocked", + # T2320 (X9 Pro) specific error codes (from proto-reference/error_code_list_t2320.proto) + # These codes are used by vacuums with auto-clean stations + 26: "Low battery - scheduled start failed", + 31: "Foreign objects stuck in suction port", + 32: "Mop holder rotating motor stuck - clear tangled objects from mop", + 33: "Mop bracket lift motor stuck - clear foreign objects from lifting bracket", + 39: "Positioning failed - cleaning ended, check if map matches environment", + 40: "Mop cloth dislodged", + 41: "Air drying device heater abnormal", + 50: "Machine accidentally on carpet", + 51: "Camera blocked", + 52: "Unable to leave station - check surroundings", + 55: "Station exploration failed", + 70: "Please clean dust collector and filter", + 71: "Wall sensor abnormal", + 72: "Robot water tank insufficient", + 73: "Station dirty water tank full", + 74: "Station clean water tank insufficient", + 75: "Station water tank missing", + 76: "Camera abnormal", + 77: "3D TOF sensor abnormal", + 78: "Ultrasonic sensor abnormal", + 79: "Station clean tray not installed", + 80: "Robot and station communication abnormal", + 81: "Dirty water tank leaking", + 82: "Please clean station wash tray", + 83: "Poor charging contact", + 101: "Battery abnormal", + 102: "Wheel module abnormal", + 103: "Side brush module abnormal", + 104: "Fan abnormal", + 105: "Roller brush motor abnormal", + 106: "Water pump abnormal", + 107: "Laser sensor abnormal", + 111: "Rotation motor abnormal", + 112: "Lift motor abnormal", + 113: "Water spraying device abnormal", + 114: "Water pumping device abnormal", + 117: "Ultrasonic sensor abnormal", + 119: "WiFi or Bluetooth abnormal", # T22xx series error codes (from proto-reference/error_code_list_t2265.proto) # Wheel errors (1xxx) 1010: "Left wheel open circuit", @@ -329,6 +369,147 @@ "Dock moved from mapped location", ], }, + # T2320 (X9 Pro) specific error codes + 32: { + "troubleshooting": [ + "Remove mop pads and check for tangled hair or debris", + "Clean the mop holder rotating mechanism", + "Ensure mop pads are properly attached", + "Restart vacuum", + ], + "common_causes": [ + "Hair or string wrapped around mop holder", + "Debris blocking rotation", + "Mop pads incorrectly installed", + ], + }, + 33: { + "troubleshooting": [ + "Check mop lifting bracket for foreign objects", + "Clean around lift motor area", + "Ensure nothing is blocking the lift mechanism", + "Restart vacuum", + ], + "common_causes": [ + "Debris in lifting mechanism", + "Foreign objects blocking lift", + "Mechanical obstruction", + ], + }, + 40: { + "troubleshooting": [ + "Reattach mop cloth securely", + "Check mop holder clips are engaged", + "Inspect mop cloth for damage", + "Replace mop cloth if worn", + ], + "common_causes": [ + "Mop cloth not properly attached", + "Worn mop cloth velcro", + "Mop holder clips damaged", + ], + }, + 52: { + "troubleshooting": [ + "Clear area around station", + "Check for obstacles blocking exit path", + "Ensure station is on flat surface", + "Clean station sensors", + ], + "common_causes": [ + "Obstacles blocking station exit", + "Station misaligned", + "Dirty sensors", + ], + }, + 73: { + "troubleshooting": [ + "Empty the dirty water tank", + "Clean dirty water tank", + "Ensure tank is properly seated", + "Check tank sensors are clean", + ], + "common_causes": [ + "Dirty water tank full", + "Tank sensor dirty", + "Tank not properly inserted", + ], + }, + 74: { + "troubleshooting": [ + "Refill station clean water tank", + "Check tank is properly seated", + "Ensure water inlet is not blocked", + ], + "common_causes": [ + "Clean water tank empty", + "Tank not properly inserted", + "Water inlet blocked", + ], + }, + 75: { + "troubleshooting": [ + "Install clean water tank in station", + "Install dirty water tank in station", + "Ensure both tanks are properly seated", + ], + "common_causes": [ + "Water tank removed for cleaning", + "Tank not properly inserted", + "Tank detection sensor dirty", + ], + }, + 79: { + "troubleshooting": [ + "Install wash tray in station", + "Ensure tray is properly seated", + "Clean tray sensors", + ], + "common_causes": [ + "Wash tray removed for cleaning", + "Tray not properly inserted", + "Tray sensor dirty", + ], + }, + 80: { + "troubleshooting": [ + "Ensure vacuum is properly docked", + "Clean charging contacts", + "Restart both vacuum and station", + "Check station power connection", + ], + "common_causes": [ + "Poor contact between vacuum and station", + "Dirty charging contacts", + "Station power issue", + ], + }, + 82: { + "troubleshooting": [ + "Remove and clean station wash tray", + "Rinse tray thoroughly", + "Check for debris buildup", + "Reinstall tray", + ], + "common_causes": [ + "Accumulated dirt on wash tray", + "Mop debris buildup", + "Regular maintenance needed", + ], + }, + 83: { + "troubleshooting": [ + "Clean charging contacts on vacuum", + "Clean charging pins on station", + "Ensure vacuum is properly aligned on dock", + "Check for debris on dock", + ], + "common_causes": [ + "Dirty charging contacts", + "Vacuum misaligned on dock", + "Debris on charging area", + ], + }, } From ca57bdc8fbf236f1d325727db7347b5da5a6e5ed Mon Sep 17 00:00:00 2001 From: Jonathan Thompson Date: Fri, 23 Jan 2026 11:25:41 +0000 Subject: [PATCH 07/25] Adding new codes for 2267 Using claude code to add new codes for the 2267 vaccum. --- custom_components/robovac/vacuums/T2267.py | 76 +++++-- docs/T2267_CONFIGURATION_ANALYSIS.md | 209 ++++++++++++++++++ .../test_t2267_command_mappings.py | 85 ++++++- 3 files changed, 347 insertions(+), 23 deletions(-) create mode 100644 docs/T2267_CONFIGURATION_ANALYSIS.md diff --git a/custom_components/robovac/vacuums/T2267.py b/custom_components/robovac/vacuums/T2267.py index 072130e..55c0176 100644 --- a/custom_components/robovac/vacuums/T2267.py +++ b/custom_components/robovac/vacuums/T2267.py @@ -1,11 +1,12 @@ """RoboVac L60 (T2267)""" -from homeassistant.components.vacuum import VacuumEntityFeature +from homeassistant.components.vacuum import (VacuumEntityFeature, VacuumActivity) from .base import RoboVacEntityFeature, RobovacCommand, RobovacModelDetails class T2267(RobovacModelDetails): homeassistant_features = ( - VacuumEntityFeature.FAN_SPEED + VacuumEntityFeature.CLEAN_SPOT + | VacuumEntityFeature.FAN_SPEED | VacuumEntityFeature.LOCATE | VacuumEntityFeature.PAUSE | VacuumEntityFeature.RETURN_HOME @@ -24,30 +25,40 @@ class T2267(RobovacModelDetails): "values": { "auto": "BBoCCAE=", "pause": "AggN", - "Spot": "AA==", + "spot": "AA==", "return": "AggG", - "Nosweep": "AggO", + "nosweep": "AggO", }, }, RobovacCommand.STATUS: { "code": 153, - "values": [ - "BgoAEAUyAA===", - "BgoAEAVSAA===", - "CAoAEAUyAggB", - "CAoCCAEQBTIA", - "CAoCCAEQBVIA", - "CgoCCAEQBTICCAE=", - "CAoCCAIQBTIA", - "CAoCCAIQBVIA", - "CgoCCAIQBTICCAE=", - "BAoAEAY=", - "BBAHQgA=", - "BBADGgA=", - "BhADGgIIAQ==", - "AA==", - "AhAB", - ], + "values": { + # Cleaning states + "BgoAEAUyAA==": "Cleaning", + "BgoAEAVSAA==": "Positioning", + # Paused states + "CAoAEAUyAggB": "Paused", + "AggB": "Paused", + # Room cleaning states + "CAoCCAEQBTIA": "Room Cleaning", + "CAoCCAEQBVIA": "Room Positioning", + "CgoCCAEQBTICCAE=": "Room Paused", + # Zone cleaning states + "CAoCCAIQBTIA": "Zone Cleaning", + "CAoCCAIQBVIA": "Zone Positioning", + "CgoCCAIQBTICCAE=": "Zone Paused", + # Navigation states + "BAoAEAY=": "Remote Control", + "BBAHQgA=": "Heading Home", + # Charging/docked states + "BBADGgA=": "Charging", + "BhADGgIIAQ==": "Completed", + # Idle states + "AA==": "Standby", + "AhAB": "Sleeping", + # User-reported status codes (contain embedded timestamp/stats) + "DAi73ou93qHyzgFSAA==": "Positioning", # Reported via HA, likely positioning with timestamp + }, }, RobovacCommand.DIRECTION: { "code": 155, @@ -94,3 +105,26 @@ class T2267(RobovacModelDetails): "code": 177, } } + + activity_mapping = { + # Cleaning states + "Cleaning": VacuumActivity.CLEANING, + "Positioning": VacuumActivity.CLEANING, + "Room Cleaning": VacuumActivity.CLEANING, + "Room Positioning": VacuumActivity.CLEANING, + "Zone Cleaning": VacuumActivity.CLEANING, + "Zone Positioning": VacuumActivity.CLEANING, + "Remote Control": VacuumActivity.CLEANING, + # Paused states + "Paused": VacuumActivity.PAUSED, + "Room Paused": VacuumActivity.PAUSED, + "Zone Paused": VacuumActivity.PAUSED, + # Returning states + "Heading Home": VacuumActivity.RETURNING, + # Docked states + "Charging": VacuumActivity.DOCKED, + "Completed": VacuumActivity.DOCKED, + # Idle states + "Standby": VacuumActivity.IDLE, + "Sleeping": VacuumActivity.IDLE, + } diff --git a/docs/T2267_CONFIGURATION_ANALYSIS.md b/docs/T2267_CONFIGURATION_ANALYSIS.md new file mode 100644 index 0000000..8096660 --- /dev/null +++ b/docs/T2267_CONFIGURATION_ANALYSIS.md @@ -0,0 +1,209 @@ +# T2267 (RoboVac L60) Configuration Analysis + +This document analyzes the T2267 vacuum configuration against the proto-reference files to identify potentially missing settings and features. + +## Current Configuration + +### DPS Codes Defined + +| Command | Code | Has Values | +|---------|------|------------| +| MODE | 152 | ✓ (auto, pause, Spot, return, Nosweep) | +| STATUS | 153 | ✓ (base64 encoded states) | +| DIRECTION | 155 | ✓ (brake, forward, back, left, right) | +| START_PAUSE | 156 | ✗ | +| DO_NOT_DISTURB | 157 | ✗ | +| FAN_SPEED | 158 | ✓ (quiet, standard, turbo, max, boost_iq) | +| BOOST_IQ | 159 | ✗ | +| LOCATE | 160 | ✗ | +| BATTERY | 163 | ✗ | +| CONSUMABLES | 168 | ✗ | +| RETURN_HOME | 173 | ✗ | +| ERROR | 177 | ✗ | + +### Features Enabled + +**Home Assistant Features:** +- `VacuumEntityFeature.FAN_SPEED` +- `VacuumEntityFeature.LOCATE` +- `VacuumEntityFeature.PAUSE` +- `VacuumEntityFeature.RETURN_HOME` +- `VacuumEntityFeature.SEND_COMMAND` +- `VacuumEntityFeature.START` +- `VacuumEntityFeature.STATE` +- `VacuumEntityFeature.STOP` + +**RoboVac Features:** +- `RoboVacEntityFeature.DO_NOT_DISTURB` +- `RoboVacEntityFeature.BOOST_IQ` + +--- + +## Missing Commands (from proto-reference) + +### 1. CLEANING_TIME / CLEANING_AREA +**Source:** `work_status.proto` + +The proto shows `elapsed_time` and `area` fields in cleaning status messages. The T2268 model has these features enabled, but T2267 does not. + +Would require DPS codes for time/area tracking to be identified. + +### 2. MOP_LEVEL +**Source:** `clean_param.proto` + +If the model supports mopping, the following levels are available: +- LOW = 0 +- MIDDLE = 1 +- HIGH = 2 + +Not present in T2267 configuration. + +### 3. AUTO_RETURN +**Source:** `control.proto` + +Resume cleaning after charging (breakpoint continuation). The T2268 model has this feature; T2267 does not. + +--- + +## Missing Features + +### 1. VacuumEntityFeature.CLEAN_SPOT +T2267 has "Spot" mode value defined but doesn't expose the `CLEAN_SPOT` feature flag. + +**Comparison:** T2268 has `VacuumEntityFeature.CLEAN_SPOT` enabled. + +### 2. RoboVacEntityFeature.CLEANING_TIME +**Proto reference:** `elapsed_time` in WorkStatus message + +Not enabled in T2267. + +### 3. RoboVacEntityFeature.CLEANING_AREA +**Proto reference:** `area` field in cleaning status + +Not enabled in T2267. + +### 4. RoboVacEntityFeature.CONSUMABLES +T2267 has CONSUMABLES command defined (code 168) but the feature flag is not set in `robovac_features`. + +**Proto reference** (`consumable.proto`) shows available consumables: +- Side brush +- Rolling brush +- Filter mesh +- Scraper +- Sensor +- Mop +- Dust bag + +### 5. RoboVacEntityFeature.EDGE / SMALL_ROOM +T2267 MODE has "Nosweep" but no edge or small room modes. + +Could potentially add edge cleaning support if the device supports it. + +--- + +## Missing Mode Values + +Based on `control.proto` ModeCtrlRequest: + +| T2267 Mode | Proto Equivalent | Status | +|------------|------------------|--------| +| auto | START_AUTO_CLEAN | ✓ Present | +| pause | PAUSE_TASK | ✓ Present | +| Spot | START_SPOT_CLEAN | ✓ Present | +| return | START_GOHOME | ✓ Present | +| Nosweep | - | ✓ Present | +| - | edge | **Missing** | +| - | small_room | **Missing** | + +### Additional Modes from Proto (if supported by hardware) + +From `work_status.proto` WorkStatus.Mode: +- `AUTO` - Global auto cleaning +- `SELECT_ROOM` - Selected room cleaning +- `SELECT_ZONE` - Selected zone cleaning +- `SPOT` - Spot cleaning +- `FAST_MAPPING` - Fast mapping +- `GLOBAL_CRUISE` - Whole house cruise +- `ZONES_CRUISE` - Selected zones cruise +- `POINT_CRUISE` - Point cruise (precise arrival) +- `SCENE` - Scene cleaning +- `SMART_FOLLOW` - Smart follow + +--- + +## Missing Activity Mapping + +T2267 lacks an `activity_mapping` dictionary to translate STATUS values to `VacuumActivity` states. + +Based on `work_status.proto`, a suggested mapping would be: + +```python +activity_mapping = { + "Standby": VacuumActivity.IDLE, + "Sleep": VacuumActivity.IDLE, + "Charging": VacuumActivity.DOCKED, + "Cleaning": VacuumActivity.CLEANING, + "GoHome": VacuumActivity.RETURNING, + "Paused": VacuumActivity.PAUSED, + "Fault": VacuumActivity.ERROR, + "RemoteCtrl": VacuumActivity.CLEANING, + "FastMapping": VacuumActivity.CLEANING, + "Cruising": VacuumActivity.CLEANING, +} +``` + +**Note:** The T2267 uses base64-encoded protobuf STATUS values, so the mapping would need to decode these values first. + +--- + +## Missing Settings (from unisetting.proto) + +The following settings are available in the proto but not exposed in T2267: + +| Setting | Description | Proto Field | +|---------|-------------|-------------| +| Child Lock | Prevent accidental button presses | `children_lock` | +| AI See | AI object recognition | `ai_see` | +| Pet Mode | Pet-specific cleaning behavior | `pet_mode_sw` | +| Poop Avoidance | Avoid pet waste | `poop_avoidance_sw` | +| Multi-map | Support multiple floor maps | `multi_map_sw` | +| Cruise Continue | Resume cruise after interruption | `cruise_continue_sw` | + +--- + +## Summary + +| Category | Missing Item | Priority | Notes | +|----------|--------------|----------|-------| +| Config | `activity_mapping` | **High** | Would improve state reporting | +| Feature | `CLEAN_SPOT` | Medium | Mode exists, feature flag missing | +| Mode | `edge` | Medium | Common cleaning mode | +| Mode | `small_room` | Medium | Common cleaning mode | +| Feature | `CONSUMABLES` flag | Low | Command exists, flag missing | +| Feature | `CLEANING_TIME` | Low | Requires DPS code discovery | +| Feature | `CLEANING_AREA` | Low | Requires DPS code discovery | +| Command | `AUTO_RETURN` | Low | Breakpoint continuation | +| Command | `MOP_LEVEL` | Unknown | Only if hardware supports mopping | + +--- + +## Recommendations + +1. **Add `activity_mapping`** - This would significantly improve Home Assistant state reporting. Requires decoding the base64 STATUS values to understand the state format. + +2. **Enable `CLEAN_SPOT` feature** - The "Spot" mode already exists; just need to add the feature flag. + +3. **Enable `CONSUMABLES` feature** - The command is already defined (code 168); add the feature flag to expose consumable data. + +4. **Test edge/small_room modes** - Try adding these mode values to see if the device responds. + +--- + +## References + +- `proto-reference/work_status.proto` - Work status and state definitions +- `proto-reference/clean_param.proto` - Cleaning parameters (fan, mop, carpet strategy) +- `proto-reference/control.proto` - Mode control commands +- `proto-reference/consumable.proto` - Consumables tracking +- `proto-reference/unisetting.proto` - Device settings +- `proto-reference/error_code_list_t2265.proto` - T22xx series error codes diff --git a/tests/test_vacuum/test_t2267_command_mappings.py b/tests/test_vacuum/test_t2267_command_mappings.py index 038e848..82174f3 100644 --- a/tests/test_vacuum/test_t2267_command_mappings.py +++ b/tests/test_vacuum/test_t2267_command_mappings.py @@ -3,6 +3,8 @@ import pytest from unittest.mock import patch +from homeassistant.components.vacuum import VacuumActivity + from custom_components.robovac.robovac import RoboVac from custom_components.robovac.vacuums.base import RobovacCommand @@ -42,9 +44,9 @@ def test_t2267_mode_command_values(mock_t2267_robovac: RoboVac) -> None: """Test T2267 MODE command value mappings.""" assert mock_t2267_robovac.getRoboVacCommandValue(RobovacCommand.MODE, "auto") == "BBoCCAE=" assert mock_t2267_robovac.getRoboVacCommandValue(RobovacCommand.MODE, "pause") == "AggN" - assert mock_t2267_robovac.getRoboVacCommandValue(RobovacCommand.MODE, "Spot") == "AA==" + assert mock_t2267_robovac.getRoboVacCommandValue(RobovacCommand.MODE, "spot") == "AA==" assert mock_t2267_robovac.getRoboVacCommandValue(RobovacCommand.MODE, "return") == "AggG" - assert mock_t2267_robovac.getRoboVacCommandValue(RobovacCommand.MODE, "Nosweep") == "AggO" + assert mock_t2267_robovac.getRoboVacCommandValue(RobovacCommand.MODE, "nosweep") == "AggO" # Unknown returns as-is assert mock_t2267_robovac.getRoboVacCommandValue(RobovacCommand.MODE, "unknown") == "unknown" @@ -90,3 +92,82 @@ def test_t2267_command_codes(mock_t2267_robovac: RoboVac) -> None: assert commands[RobovacCommand.CONSUMABLES]["code"] == 168 assert commands[RobovacCommand.RETURN_HOME]["code"] == 173 assert commands[RobovacCommand.ERROR]["code"] == 177 + + +def test_t2267_status_values(mock_t2267_robovac: RoboVac) -> None: + """Test T2267 STATUS command value mappings.""" + # Cleaning states + assert mock_t2267_robovac.getRoboVacHumanReadableValue( + RobovacCommand.STATUS, "BgoAEAUyAA==" + ) == "Cleaning" + assert mock_t2267_robovac.getRoboVacHumanReadableValue( + RobovacCommand.STATUS, "BgoAEAVSAA==" + ) == "Positioning" + + # Room cleaning states + assert mock_t2267_robovac.getRoboVacHumanReadableValue( + RobovacCommand.STATUS, "CAoCCAEQBTIA" + ) == "Room Cleaning" + assert mock_t2267_robovac.getRoboVacHumanReadableValue( + RobovacCommand.STATUS, "CgoCCAEQBTICCAE=" + ) == "Room Paused" + + # Zone cleaning states + assert mock_t2267_robovac.getRoboVacHumanReadableValue( + RobovacCommand.STATUS, "CAoCCAIQBTIA" + ) == "Zone Cleaning" + assert mock_t2267_robovac.getRoboVacHumanReadableValue( + RobovacCommand.STATUS, "CgoCCAIQBTICCAE=" + ) == "Zone Paused" + + # Docked/charging states + assert mock_t2267_robovac.getRoboVacHumanReadableValue( + RobovacCommand.STATUS, "BBADGgA=" + ) == "Charging" + assert mock_t2267_robovac.getRoboVacHumanReadableValue( + RobovacCommand.STATUS, "BhADGgIIAQ==" + ) == "Completed" + + # Navigation states + assert mock_t2267_robovac.getRoboVacHumanReadableValue( + RobovacCommand.STATUS, "BBAHQgA=" + ) == "Heading Home" + + # Idle states + assert mock_t2267_robovac.getRoboVacHumanReadableValue( + RobovacCommand.STATUS, "AA==" + ) == "Standby" + assert mock_t2267_robovac.getRoboVacHumanReadableValue( + RobovacCommand.STATUS, "AhAB" + ) == "Sleeping" + + +def test_t2267_activity_mapping(mock_t2267_robovac: RoboVac) -> None: + """Test T2267 activity_mapping for VacuumActivity states.""" + activity_mapping = mock_t2267_robovac.model_details.activity_mapping + + # Verify activity_mapping exists + assert activity_mapping is not None + + # Cleaning states map to CLEANING + assert activity_mapping["Cleaning"] == VacuumActivity.CLEANING + assert activity_mapping["Positioning"] == VacuumActivity.CLEANING + assert activity_mapping["Room Cleaning"] == VacuumActivity.CLEANING + assert activity_mapping["Zone Cleaning"] == VacuumActivity.CLEANING + assert activity_mapping["Remote Control"] == VacuumActivity.CLEANING + + # Paused states map to PAUSED + assert activity_mapping["Paused"] == VacuumActivity.PAUSED + assert activity_mapping["Room Paused"] == VacuumActivity.PAUSED + assert activity_mapping["Zone Paused"] == VacuumActivity.PAUSED + + # Returning states map to RETURNING + assert activity_mapping["Heading Home"] == VacuumActivity.RETURNING + + # Docked states map to DOCKED + assert activity_mapping["Charging"] == VacuumActivity.DOCKED + assert activity_mapping["Completed"] == VacuumActivity.DOCKED + + # Idle states map to IDLE + assert activity_mapping["Standby"] == VacuumActivity.IDLE + assert activity_mapping["Sleeping"] == VacuumActivity.IDLE From 02476ff097dcb2312e055a2d0a45d09bd45d7eed Mon Sep 17 00:00:00 2001 From: Jonathan Thompson Date: Fri, 23 Jan 2026 11:44:05 +0000 Subject: [PATCH 08/25] Status pattern for positioning Implemented pattern-based matching for STATUS codes with dynamic timestamps. Changes Made 1. custom_components/robovac/vacuums/base.py - Added status_patterns field to RobovacModelDetails protocol - Format: List[tuple[prefix, suffix, status_name]] 2. custom_components/robovac/robovac.py - Added _match_status_pattern() method to match STATUS values against patterns - Updated getRoboVacHumanReadableValue() to try pattern matching when exact lookup fails 3. custom_components/robovac/vacuums/T2267.py - Removed individual timestamp codes - Added status_patterns list with the positioning pattern: status_patterns = [ ("DA", "FSAA==", "Positioning"), ] --- custom_components/robovac/robovac.py | 33 ++++++++++++++++++- custom_components/robovac/vacuums/T2267.py | 10 ++++-- custom_components/robovac/vacuums/base.py | 4 +++ .../test_t2267_command_mappings.py | 30 +++++++++++++++++ 4 files changed, 74 insertions(+), 3 deletions(-) diff --git a/custom_components/robovac/robovac.py b/custom_components/robovac/robovac.py index fcd430b..24b01a9 100644 --- a/custom_components/robovac/robovac.py +++ b/custom_components/robovac/robovac.py @@ -251,7 +251,14 @@ def getRoboVacHumanReadableValue(self, command_name: RobovacCommand, value: str) if result is not None: return str(result) - # Only log if values dict exists but value not found + # For STATUS commands, try pattern matching if exact lookup failed + if cmd == RobovacCommand.STATUS: + pattern_result = self._match_status_pattern(value) + if pattern_result is not None: + return pattern_result + + # Only log if values dict exists but value not found + if values is not None: _LOGGER.debug( "Command %s with value %r (type: %s) not found for model %s. " "Available keys: %r", @@ -266,3 +273,27 @@ def getRoboVacHumanReadableValue(self, command_name: RobovacCommand, value: str) pass return value + + def _match_status_pattern(self, value: str) -> str | None: + """Match a STATUS value against defined patterns. + + Some STATUS codes contain dynamic content like timestamps that change + with each update. This method matches such codes using prefix/suffix patterns. + + Args: + value: The base64-encoded status value from the device. + + Returns: + The human-readable status if a pattern matches, None otherwise. + """ + status_patterns: list[tuple[str, str, str]] | None = getattr( + self.model_details, 'status_patterns', None + ) + if not status_patterns: + return None + + for prefix, suffix, status_name in status_patterns: + if value.startswith(prefix) and value.endswith(suffix): + return status_name + + return None diff --git a/custom_components/robovac/vacuums/T2267.py b/custom_components/robovac/vacuums/T2267.py index 55c0176..a931346 100644 --- a/custom_components/robovac/vacuums/T2267.py +++ b/custom_components/robovac/vacuums/T2267.py @@ -56,8 +56,6 @@ class T2267(RobovacModelDetails): # Idle states "AA==": "Standby", "AhAB": "Sleeping", - # User-reported status codes (contain embedded timestamp/stats) - "DAi73ou93qHyzgFSAA==": "Positioning", # Reported via HA, likely positioning with timestamp }, }, RobovacCommand.DIRECTION: { @@ -128,3 +126,11 @@ class T2267(RobovacModelDetails): "Standby": VacuumActivity.IDLE, "Sleeping": VacuumActivity.IDLE, } + + # Patterns for STATUS codes with dynamic content (prefix, suffix, status_name) + # These match base64-encoded protobuf messages with embedded timestamps + status_patterns = [ + # Positioning codes: start with "DA" (0c08), end with "FSAA==" (5200) + # The middle bytes contain a timestamp that changes with each update + ("DA", "FSAA==", "Positioning"), + ] diff --git a/custom_components/robovac/vacuums/base.py b/custom_components/robovac/vacuums/base.py index d30e80a..7dd396b 100644 --- a/custom_components/robovac/vacuums/base.py +++ b/custom_components/robovac/vacuums/base.py @@ -70,3 +70,7 @@ class RobovacModelDetails(Protocol): commands: Dict[RobovacCommand, Any] dps_codes: Dict[str, str] = {} # Optional model-specific DPS codes activity_mapping: Dict[str, VacuumActivity] | None = None + # Optional patterns for STATUS codes with dynamic content (e.g., timestamps) + # List of tuples: (prefix, suffix, human_readable_status) + # Example: [("DA", "FSAA==", "Positioning")] matches any base64 starting with DA, ending with FSAA== + status_patterns: List[tuple[str, str, str]] | None = None diff --git a/tests/test_vacuum/test_t2267_command_mappings.py b/tests/test_vacuum/test_t2267_command_mappings.py index 82174f3..29c2007 100644 --- a/tests/test_vacuum/test_t2267_command_mappings.py +++ b/tests/test_vacuum/test_t2267_command_mappings.py @@ -171,3 +171,33 @@ def test_t2267_activity_mapping(mock_t2267_robovac: RoboVac) -> None: # Idle states map to IDLE assert activity_mapping["Standby"] == VacuumActivity.IDLE assert activity_mapping["Sleeping"] == VacuumActivity.IDLE + + +def test_t2267_status_patterns(mock_t2267_robovac: RoboVac) -> None: + """Test T2267 status pattern matching for dynamic STATUS codes.""" + # Verify status_patterns exists + status_patterns = mock_t2267_robovac.model_details.status_patterns + assert status_patterns is not None + assert len(status_patterns) > 0 + + # Test pattern matching for positioning codes with different timestamps + # These codes follow the pattern: DA...FSAA== (start with DA, end with FSAA==) + positioning_codes = [ + "DAi73ou93qHyzgFSAA==", # Different timestamps + "DAjE74KF76HyzgFSAA==", + "DAiCobvM+KHyzgFSAA==", + "DAxxxxxxxxxxxxxxFSAA==", # Any content in middle should match + ] + + for code in positioning_codes: + result = mock_t2267_robovac.getRoboVacHumanReadableValue( + RobovacCommand.STATUS, code + ) + assert result == "Positioning", f"Expected 'Positioning' for {code}, got {result}" + + # Test that non-matching codes are returned as-is + non_matching = "XYZabc123==" + result = mock_t2267_robovac.getRoboVacHumanReadableValue( + RobovacCommand.STATUS, non_matching + ) + assert result == non_matching From d3c92aee52fa2a09d2e3ae1fd4426f1c57fa9016 Mon Sep 17 00:00:00 2001 From: Jonathan Thompson Date: Fri, 23 Jan 2026 12:13:46 +0000 Subject: [PATCH 09/25] Implement new solution for error messages. 1. Added error pattern matching to robovac.py - Added a new _match_error_pattern() method and integrated it into getRoboVacHumanReadableValue() for ERROR commands. 2. Added error_patterns to T2267.py - Added a pattern that matches positioning/relocating status messages (starting with "DA", ending with "FSAA==") and maps them to "no_error". The value DAi65cqGwqLyzgFSAA== is a protobuf message indicating the vacuum is relocating/positioning. Your device is sending this on the ERROR DPS code (177) instead of STATUS (153). With this fix, the pattern is recognized and mapped to "no_error", which prevents it from triggering the error state in Home Assistant. --- custom_components/robovac/robovac.py | 31 ++++++++++++++++++++++ custom_components/robovac/vacuums/T2267.py | 11 ++++++++ 2 files changed, 42 insertions(+) diff --git a/custom_components/robovac/robovac.py b/custom_components/robovac/robovac.py index 24b01a9..0ca285f 100644 --- a/custom_components/robovac/robovac.py +++ b/custom_components/robovac/robovac.py @@ -257,6 +257,12 @@ def getRoboVacHumanReadableValue(self, command_name: RobovacCommand, value: str) if pattern_result is not None: return pattern_result + # For ERROR commands, try pattern matching if exact lookup failed + if cmd == RobovacCommand.ERROR: + pattern_result = self._match_error_pattern(value) + if pattern_result is not None: + return pattern_result + # Only log if values dict exists but value not found if values is not None: _LOGGER.debug( @@ -297,3 +303,28 @@ def _match_status_pattern(self, value: str) -> str | None: return status_name return None + + def _match_error_pattern(self, value: str) -> str | None: + """Match an ERROR value against defined patterns. + + Some devices send status-like protobuf messages on the ERROR DPS code. + This method matches such codes using prefix/suffix patterns to prevent + them from being incorrectly treated as errors. + + Args: + value: The base64-encoded error value from the device. + + Returns: + The mapped value if a pattern matches (e.g., "no_error"), None otherwise. + """ + error_patterns: list[tuple[str, str, str]] | None = getattr( + self.model_details, 'error_patterns', None + ) + if not error_patterns: + return None + + for prefix, suffix, error_name in error_patterns: + if value.startswith(prefix) and value.endswith(suffix): + return error_name + + return None diff --git a/custom_components/robovac/vacuums/T2267.py b/custom_components/robovac/vacuums/T2267.py index a931346..ffabfc6 100644 --- a/custom_components/robovac/vacuums/T2267.py +++ b/custom_components/robovac/vacuums/T2267.py @@ -56,6 +56,8 @@ class T2267(RobovacModelDetails): # Idle states "AA==": "Standby", "AhAB": "Sleeping", + # Error states + "BQgNEIsB": "Off Ground", }, }, RobovacCommand.DIRECTION: { @@ -125,6 +127,8 @@ class T2267(RobovacModelDetails): # Idle states "Standby": VacuumActivity.IDLE, "Sleeping": VacuumActivity.IDLE, + # Error states + "Off Ground": VacuumActivity.ERROR, } # Patterns for STATUS codes with dynamic content (prefix, suffix, status_name) @@ -134,3 +138,10 @@ class T2267(RobovacModelDetails): # The middle bytes contain a timestamp that changes with each update ("DA", "FSAA==", "Positioning"), ] + + # Patterns for ERROR codes - some devices send status messages on the ERROR DPS + # These patterns map such messages to "no_error" to prevent false error states + error_patterns = [ + # Positioning/relocating status sent on ERROR DPS - not an actual error + ("DA", "FSAA==", "no_error"), + ] From 7fd1610e299b646763b1f5684747505df0096847 Mon Sep 17 00:00:00 2001 From: Jonathan Thompson Date: Fri, 23 Jan 2026 20:24:50 +0000 Subject: [PATCH 10/25] fix(T2267): Fix pause, stop, and return home commands The T2267 vacuum commands were broken because they used incorrect DPS codes without proper protobuf-encoded values. Changes: - START_PAUSE: Changed from code 156 (no values) to code 152 with protobuf values for pause (AggN) and resume (AggO) - STOP: Added new command using code 152 with protobuf value (AggM) for STOP_TASK - RETURN_HOME: Changed from code 173 (no values) to code 152 with protobuf value (AggG) for START_GOHOME All commands now correctly use the MODE DPS code (152) with their respective ModeCtrlRequest.Method protobuf encodings: - PAUSE_TASK (13) = "AggN" - RESUME_TASK (14) = "AggO" - STOP_TASK (12) = "AggM" - START_GOHOME (6) = "AggG" --- custom_components/robovac/vacuum.py | 13 ++++- custom_components/robovac/vacuums/T2267.py | 24 +++++++- custom_components/robovac/vacuums/base.py | 1 + .../test_t2267_command_mappings.py | 55 +++++++++++++++++-- 4 files changed, 86 insertions(+), 7 deletions(-) diff --git a/custom_components/robovac/vacuum.py b/custom_components/robovac/vacuum.py index b5e1487..2c0c70e 100644 --- a/custom_components/robovac/vacuum.py +++ b/custom_components/robovac/vacuum.py @@ -773,7 +773,18 @@ async def async_stop(self, **kwargs: Any) -> None: Args: **kwargs: Additional arguments passed from Home Assistant. """ - await self.async_return_to_base() + if self.vacuum is None: + _LOGGER.error("Cannot stop vacuum: vacuum not initialized") + return + + # Use STOP command if model supports it, otherwise fall back to return_to_base + stop_code = self._get_dps_code("STOP") + if stop_code: + await self.vacuum.async_set({ + stop_code: self.vacuum.getRoboVacCommandValue(RobovacCommand.STOP, "stop") + }) + else: + await self.async_return_to_base() async def async_clean_spot(self, **kwargs: Any) -> None: """Perform a spot clean. diff --git a/custom_components/robovac/vacuums/T2267.py b/custom_components/robovac/vacuums/T2267.py index ffabfc6..945bd08 100644 --- a/custom_components/robovac/vacuums/T2267.py +++ b/custom_components/robovac/vacuums/T2267.py @@ -71,7 +71,22 @@ class T2267(RobovacModelDetails): }, }, RobovacCommand.START_PAUSE: { - "code": 156, + # Pause is sent via MODE command (code 152) with protobuf-encoded value + # "AggN" encodes ModeCtrlRequest.Method.PAUSE_TASK (13) + # "AggO" encodes ModeCtrlRequest.Method.RESUME_TASK (14) + "code": 152, + "values": { + "pause": "AggN", + "resume": "AggO", + }, + }, + RobovacCommand.STOP: { + # Stop is sent via MODE command (code 152) with protobuf-encoded value + # "AggM" encodes ModeCtrlRequest.Method.STOP_TASK (12) + "code": 152, + "values": { + "stop": "AggM", + }, }, RobovacCommand.DO_NOT_DISTURB: { "code": 157, @@ -99,7 +114,12 @@ class T2267(RobovacModelDetails): "code": 168, }, RobovacCommand.RETURN_HOME: { - "code": 173, + # Return home is sent via MODE command (code 152) with protobuf-encoded value + # "AggG" encodes ModeCtrlRequest.Method.START_GOHOME (6) + "code": 152, + "values": { + "return": "AggG", + }, }, RobovacCommand.ERROR: { "code": 177, diff --git a/custom_components/robovac/vacuums/base.py b/custom_components/robovac/vacuums/base.py index 7dd396b..129cb8a 100644 --- a/custom_components/robovac/vacuums/base.py +++ b/custom_components/robovac/vacuums/base.py @@ -21,6 +21,7 @@ class RoboVacEntityFeature(IntEnum): class RobovacCommand(StrEnum): START_PAUSE = "start_pause" + STOP = "stop" DIRECTION = "direction" MODE = "mode" STATUS = "status" diff --git a/tests/test_vacuum/test_t2267_command_mappings.py b/tests/test_vacuum/test_t2267_command_mappings.py index 29c2007..b7faf31 100644 --- a/tests/test_vacuum/test_t2267_command_mappings.py +++ b/tests/test_vacuum/test_t2267_command_mappings.py @@ -29,14 +29,16 @@ def test_t2267_dps_codes(mock_t2267_robovac: RoboVac) -> None: assert dps_codes["MODE"] == "152" assert dps_codes["STATUS"] == "153" assert dps_codes["DIRECTION"] == "155" - assert dps_codes["START_PAUSE"] == "156" + # START_PAUSE uses MODE command (code 152) for protobuf models + assert dps_codes["START_PAUSE"] == "152" assert dps_codes["DO_NOT_DISTURB"] == "157" assert dps_codes["FAN_SPEED"] == "158" assert dps_codes["BOOST_IQ"] == "159" assert dps_codes["LOCATE"] == "160" assert dps_codes["BATTERY_LEVEL"] == "163" assert dps_codes["CONSUMABLES"] == "168" - assert dps_codes["RETURN_HOME"] == "173" + # RETURN_HOME uses MODE command (code 152) for protobuf models + assert dps_codes["RETURN_HOME"] == "152" assert dps_codes["ERROR_CODE"] == "177" @@ -76,6 +78,49 @@ def test_t2267_direction_command_values(mock_t2267_robovac: RoboVac) -> None: assert mock_t2267_robovac.getRoboVacCommandValue(RobovacCommand.DIRECTION, "unknown") == "unknown" +def test_t2267_start_pause_command_values(mock_t2267_robovac: RoboVac) -> None: + """Test T2267 START_PAUSE command value mappings. + + START_PAUSE uses the MODE DPS code (152) with protobuf-encoded values: + - "AggN" encodes ModeCtrlRequest.Method.PAUSE_TASK (13) + - "AggO" encodes ModeCtrlRequest.Method.RESUME_TASK (14) + """ + # Pause command - encodes PAUSE_TASK (method=13) + assert mock_t2267_robovac.getRoboVacCommandValue(RobovacCommand.START_PAUSE, "pause") == "AggN" + + # Resume command - encodes RESUME_TASK (method=14) + assert mock_t2267_robovac.getRoboVacCommandValue(RobovacCommand.START_PAUSE, "resume") == "AggO" + + # Unknown returns as-is + assert mock_t2267_robovac.getRoboVacCommandValue(RobovacCommand.START_PAUSE, "unknown") == "unknown" + + +def test_t2267_return_home_command_values(mock_t2267_robovac: RoboVac) -> None: + """Test T2267 RETURN_HOME command value mappings. + + RETURN_HOME uses the MODE DPS code (152) with protobuf-encoded value: + - "AggG" encodes ModeCtrlRequest.Method.START_GOHOME (6) + """ + # Return home command - encodes START_GOHOME (method=6) + assert mock_t2267_robovac.getRoboVacCommandValue(RobovacCommand.RETURN_HOME, "return") == "AggG" + + # Unknown returns as-is + assert mock_t2267_robovac.getRoboVacCommandValue(RobovacCommand.RETURN_HOME, "unknown") == "unknown" + + +def test_t2267_stop_command_values(mock_t2267_robovac: RoboVac) -> None: + """Test T2267 STOP command value mappings. + + STOP uses the MODE DPS code (152) with protobuf-encoded value: + - "AggM" encodes ModeCtrlRequest.Method.STOP_TASK (12) + """ + # Stop command - encodes STOP_TASK (method=12) + assert mock_t2267_robovac.getRoboVacCommandValue(RobovacCommand.STOP, "stop") == "AggM" + + # Unknown returns as-is + assert mock_t2267_robovac.getRoboVacCommandValue(RobovacCommand.STOP, "unknown") == "unknown" + + def test_t2267_command_codes(mock_t2267_robovac: RoboVac) -> None: """Test that T2267 command codes are correctly defined on model.""" commands = mock_t2267_robovac.model_details.commands @@ -83,14 +128,16 @@ def test_t2267_command_codes(mock_t2267_robovac: RoboVac) -> None: assert commands[RobovacCommand.MODE]["code"] == 152 assert commands[RobovacCommand.STATUS]["code"] == 153 assert commands[RobovacCommand.DIRECTION]["code"] == 155 - assert commands[RobovacCommand.START_PAUSE]["code"] == 156 + # START_PAUSE uses MODE command (code 152) for protobuf models + assert commands[RobovacCommand.START_PAUSE]["code"] == 152 assert commands[RobovacCommand.DO_NOT_DISTURB]["code"] == 157 assert commands[RobovacCommand.FAN_SPEED]["code"] == 158 assert commands[RobovacCommand.BOOST_IQ]["code"] == 159 assert commands[RobovacCommand.LOCATE]["code"] == 160 assert commands[RobovacCommand.BATTERY]["code"] == 163 assert commands[RobovacCommand.CONSUMABLES]["code"] == 168 - assert commands[RobovacCommand.RETURN_HOME]["code"] == 173 + # RETURN_HOME uses MODE command (code 152) for protobuf models + assert commands[RobovacCommand.RETURN_HOME]["code"] == 152 assert commands[RobovacCommand.ERROR]["code"] == 177 From 67146c3b4015054b054d778e7be0f38146942593 Mon Sep 17 00:00:00 2001 From: Jonathan Thompson Date: Fri, 23 Jan 2026 20:37:26 +0000 Subject: [PATCH 11/25] Document Claudes potential improvements for 2267 --- docs/T2267_CONFIGURATION_ANALYSIS.md | 432 +++++++++++++++------------ 1 file changed, 237 insertions(+), 195 deletions(-) diff --git a/docs/T2267_CONFIGURATION_ANALYSIS.md b/docs/T2267_CONFIGURATION_ANALYSIS.md index 8096660..aba8efa 100644 --- a/docs/T2267_CONFIGURATION_ANALYSIS.md +++ b/docs/T2267_CONFIGURATION_ANALYSIS.md @@ -1,209 +1,251 @@ # T2267 (RoboVac L60) Configuration Analysis -This document analyzes the T2267 vacuum configuration against the proto-reference files to identify potentially missing settings and features. - -## Current Configuration - -### DPS Codes Defined - -| Command | Code | Has Values | -|---------|------|------------| -| MODE | 152 | ✓ (auto, pause, Spot, return, Nosweep) | -| STATUS | 153 | ✓ (base64 encoded states) | -| DIRECTION | 155 | ✓ (brake, forward, back, left, right) | -| START_PAUSE | 156 | ✗ | -| DO_NOT_DISTURB | 157 | ✗ | -| FAN_SPEED | 158 | ✓ (quiet, standard, turbo, max, boost_iq) | -| BOOST_IQ | 159 | ✗ | -| LOCATE | 160 | ✗ | -| BATTERY | 163 | ✗ | -| CONSUMABLES | 168 | ✗ | -| RETURN_HOME | 173 | ✗ | -| ERROR | 177 | ✗ | - -### Features Enabled - -**Home Assistant Features:** -- `VacuumEntityFeature.FAN_SPEED` -- `VacuumEntityFeature.LOCATE` -- `VacuumEntityFeature.PAUSE` -- `VacuumEntityFeature.RETURN_HOME` -- `VacuumEntityFeature.SEND_COMMAND` -- `VacuumEntityFeature.START` -- `VacuumEntityFeature.STATE` -- `VacuumEntityFeature.STOP` - -**RoboVac Features:** -- `RoboVacEntityFeature.DO_NOT_DISTURB` -- `RoboVacEntityFeature.BOOST_IQ` - ---- - -## Missing Commands (from proto-reference) - -### 1. CLEANING_TIME / CLEANING_AREA -**Source:** `work_status.proto` - -The proto shows `elapsed_time` and `area` fields in cleaning status messages. The T2268 model has these features enabled, but T2267 does not. - -Would require DPS codes for time/area tracking to be identified. - -### 2. MOP_LEVEL -**Source:** `clean_param.proto` - -If the model supports mopping, the following levels are available: -- LOW = 0 -- MIDDLE = 1 -- HIGH = 2 - -Not present in T2267 configuration. - -### 3. AUTO_RETURN -**Source:** `control.proto` - -Resume cleaning after charging (breakpoint continuation). The T2268 model has this feature; T2267 does not. - ---- - -## Missing Features - -### 1. VacuumEntityFeature.CLEAN_SPOT -T2267 has "Spot" mode value defined but doesn't expose the `CLEAN_SPOT` feature flag. - -**Comparison:** T2268 has `VacuumEntityFeature.CLEAN_SPOT` enabled. - -### 2. RoboVacEntityFeature.CLEANING_TIME -**Proto reference:** `elapsed_time` in WorkStatus message - -Not enabled in T2267. - -### 3. RoboVacEntityFeature.CLEANING_AREA -**Proto reference:** `area` field in cleaning status - -Not enabled in T2267. - -### 4. RoboVacEntityFeature.CONSUMABLES -T2267 has CONSUMABLES command defined (code 168) but the feature flag is not set in `robovac_features`. - -**Proto reference** (`consumable.proto`) shows available consumables: -- Side brush -- Rolling brush -- Filter mesh -- Scraper -- Sensor -- Mop -- Dust bag - -### 5. RoboVacEntityFeature.EDGE / SMALL_ROOM -T2267 MODE has "Nosweep" but no edge or small room modes. - -Could potentially add edge cleaning support if the device supports it. - ---- - -## Missing Mode Values - -Based on `control.proto` ModeCtrlRequest: - -| T2267 Mode | Proto Equivalent | Status | -|------------|------------------|--------| -| auto | START_AUTO_CLEAN | ✓ Present | -| pause | PAUSE_TASK | ✓ Present | -| Spot | START_SPOT_CLEAN | ✓ Present | -| return | START_GOHOME | ✓ Present | -| Nosweep | - | ✓ Present | -| - | edge | **Missing** | -| - | small_room | **Missing** | +This document reviews the T2267 vacuum configuration and identifies missing or incorrect features. + +## Current Features + +### Home Assistant Features (`VacuumEntityFeature`) + +| Feature | Status | Notes | +|---------|--------|-------| +| CLEAN_SPOT | ✓ | | +| FAN_SPEED | ✓ | | +| LOCATE | ✓ | | +| PAUSE | ✓ | Fixed - uses code 152 with "AggN" | +| RETURN_HOME | ✓ | Fixed - uses code 152 with "AggG" | +| SEND_COMMAND | ✓ | | +| START | ✓ | | +| STATE | ✓ | | +| STOP | ✓ | Fixed - uses code 152 with "AggM" | +| BATTERY | ❌ Missing | Command exists (code 163) but feature flag not set | + +### RoboVac Features (`RoboVacEntityFeature`) + +| Feature | Status | Notes | +|---------|--------|-------| +| DO_NOT_DISTURB | ✓ | Code 157 | +| BOOST_IQ | ✓ | Code 159 | +| CLEANING_TIME | ❌ Missing | T2278 has this | +| CLEANING_AREA | ❌ Missing | T2278 has this | +| ROOM | ❌ Missing | Device supports room cleaning (status values exist) | +| ZONE | ❌ Missing | Device supports zone cleaning (status values exist) | +| MAP | ❌ Missing | | +| CONSUMABLES | ⚠️ Partial | Command exists (code 168) but feature flag not set | + +## Current Commands + +| Command | DPS Code | Values | Status | +|---------|----------|--------|--------| +| MODE | 152 | auto, pause, spot, return, nosweep | ⚠️ Issues | +| STATUS | 153 | Multiple protobuf-encoded values | ✓ | +| DIRECTION | 155 | brake, forward, back, left, right | ✓ | +| START_PAUSE | 152 | pause, resume | ✓ Fixed | +| STOP | 152 | stop | ✓ Fixed | +| DO_NOT_DISTURB | 157 | - | ✓ | +| FAN_SPEED | 158 | quiet, standard, turbo, max, boost_iq | ✓ | +| BOOST_IQ | 159 | - | ✓ | +| LOCATE | 160 | - | ⚠️ Missing value | +| BATTERY | 163 | - | ✓ | +| CONSUMABLES | 168 | - | ✓ | +| RETURN_HOME | 152 | return | ✓ Fixed | +| ERROR | 177 | - | ✓ | + +## Issues Found + +### 1. MODE "spot" value is incorrect + +**Current:** +```python +"spot": "AA==" # WRONG - AA== decodes to standby/empty +``` -### Additional Modes from Proto (if supported by hardware) +**Should be:** +```python +"spot": "AggD" # Correct - encodes START_SPOT_CLEAN (method=3) +``` -From `work_status.proto` WorkStatus.Mode: -- `AUTO` - Global auto cleaning -- `SELECT_ROOM` - Selected room cleaning -- `SELECT_ZONE` - Selected zone cleaning -- `SPOT` - Spot cleaning -- `FAST_MAPPING` - Fast mapping -- `GLOBAL_CRUISE` - Whole house cruise -- `ZONES_CRUISE` - Selected zones cruise -- `POINT_CRUISE` - Point cruise (precise arrival) -- `SCENE` - Scene cleaning -- `SMART_FOLLOW` - Smart follow +The value "AA==" (base64) decodes to a zero byte, which represents standby, not spot cleaning. The correct encoding for `ModeCtrlRequest.Method.START_SPOT_CLEAN` (value 3) is "AggD". ---- +### 2. MODE "nosweep" is misleading -## Missing Activity Mapping +**Current:** +```python +"nosweep": "AggO" # Encodes RESUME_TASK (14), not a cleaning mode +``` -T2267 lacks an `activity_mapping` dictionary to translate STATUS values to `VacuumActivity` states. +The value "AggO" encodes `ModeCtrlRequest.Method.RESUME_TASK` (value 14), which resumes a paused task. This should either be: +- Renamed to "resume" for clarity, or +- Replaced with proper mop-only mode encoding if that's the intent -Based on `work_status.proto`, a suggested mapping would be: +### 3. LOCATE missing value +**T2278 has:** ```python -activity_mapping = { - "Standby": VacuumActivity.IDLE, - "Sleep": VacuumActivity.IDLE, - "Charging": VacuumActivity.DOCKED, - "Cleaning": VacuumActivity.CLEANING, - "GoHome": VacuumActivity.RETURNING, - "Paused": VacuumActivity.PAUSED, - "Fault": VacuumActivity.ERROR, - "RemoteCtrl": VacuumActivity.CLEANING, - "FastMapping": VacuumActivity.CLEANING, - "Cruising": VacuumActivity.CLEANING, +RobovacCommand.LOCATE: { + "code": 160, + "values": {"locate": "true"}, } ``` -**Note:** The T2267 uses base64-encoded protobuf STATUS values, so the mapping would need to decode these values first. - ---- - -## Missing Settings (from unisetting.proto) - -The following settings are available in the proto but not exposed in T2267: - -| Setting | Description | Proto Field | -|---------|-------------|-------------| -| Child Lock | Prevent accidental button presses | `children_lock` | -| AI See | AI object recognition | `ai_see` | -| Pet Mode | Pet-specific cleaning behavior | `pet_mode_sw` | -| Poop Avoidance | Avoid pet waste | `poop_avoidance_sw` | -| Multi-map | Support multiple floor maps | `multi_map_sw` | -| Cruise Continue | Resume cruise after interruption | `cruise_continue_sw` | - ---- - -## Summary - -| Category | Missing Item | Priority | Notes | -|----------|--------------|----------|-------| -| Config | `activity_mapping` | **High** | Would improve state reporting | -| Feature | `CLEAN_SPOT` | Medium | Mode exists, feature flag missing | -| Mode | `edge` | Medium | Common cleaning mode | -| Mode | `small_room` | Medium | Common cleaning mode | -| Feature | `CONSUMABLES` flag | Low | Command exists, flag missing | -| Feature | `CLEANING_TIME` | Low | Requires DPS code discovery | -| Feature | `CLEANING_AREA` | Low | Requires DPS code discovery | -| Command | `AUTO_RETURN` | Low | Breakpoint continuation | -| Command | `MOP_LEVEL` | Unknown | Only if hardware supports mopping | - ---- - -## Recommendations - -1. **Add `activity_mapping`** - This would significantly improve Home Assistant state reporting. Requires decoding the base64 STATUS values to understand the state format. - -2. **Enable `CLEAN_SPOT` feature** - The "Spot" mode already exists; just need to add the feature flag. - -3. **Enable `CONSUMABLES` feature** - The command is already defined (code 168); add the feature flag to expose consumable data. - -4. **Test edge/small_room modes** - Try adding these mode values to see if the device responds. - ---- - -## References +**T2267 has:** +```python +RobovacCommand.LOCATE: { + "code": 160, +} +``` -- `proto-reference/work_status.proto` - Work status and state definitions -- `proto-reference/clean_param.proto` - Cleaning parameters (fan, mop, carpet strategy) -- `proto-reference/control.proto` - Mode control commands -- `proto-reference/consumable.proto` - Consumables tracking -- `proto-reference/unisetting.proto` - Device settings -- `proto-reference/error_code_list_t2265.proto` - T22xx series error codes +The LOCATE command should have a value defined. + +### 4. FAN_SPEED missing MAX_PLUS + +Protobuf defines these fan suction levels: +- QUIET = 0 +- STANDARD = 1 +- TURBO = 2 +- MAX = 3 +- MAX_PLUS = 4 + +T2267 is missing MAX_PLUS if the device hardware supports it. + +## Missing Commands + +| Command | Expected Code | Notes | +|---------|--------------|-------| +| CLEANING_TIME | 6 | For tracking cleaning duration | +| CLEANING_AREA | 7 | For tracking cleaning area (m²) | + +## Protobuf Methods Reference + +From `control.proto` - `ModeCtrlRequest.Method`: + +| Method | Value | Base64 Encoding | T2267 Status | +|--------|-------|-----------------|--------------| +| START_AUTO_CLEAN | 0 | BBoCCAE= | ✓ ("auto") | +| START_SELECT_ROOMS_CLEAN | 1 | Complex* | ❌ Not implemented | +| START_SELECT_ZONES_CLEAN | 2 | Complex* | ❌ Not implemented | +| START_SPOT_CLEAN | 3 | AggD | ❌ Wrong value (uses AA==) | +| START_GOTO_CLEAN | 4 | AggE | ❌ Not implemented | +| START_RC_CLEAN | 5 | AggF | ❌ Not implemented | +| START_GOHOME | 6 | AggG | ✓ ("return") | +| START_SCHEDULE_AUTO_CLEAN | 7 | AggH | ❌ Not implemented | +| START_SCHEDULE_ROOMS_CLEAN | 8 | AggI | ❌ Not implemented | +| START_FAST_MAPPING | 9 | AggJ | ❌ Not implemented | +| START_GOWASH | 10 | AggK | ❌ Not implemented | +| STOP_TASK | 12 | AggM | ✓ (STOP command) | +| PAUSE_TASK | 13 | AggN | ✓ ("pause") | +| RESUME_TASK | 14 | AggO | ✓ (labeled "nosweep") | +| STOP_GOHOME | 15 | AggP | ❌ Not implemented | +| STOP_RC_CLEAN | 16 | AggQ | ❌ Not implemented | + +*Complex methods require additional parameters (room IDs, zone coordinates, etc.) + +## Base64 Encoding Pattern + +The simple method-only commands follow this pattern: +- 2 bytes length prefix + field 1 (method) as varint +- Example: Method 13 (PAUSE_TASK) = `02 08 0D` = "AggN" + +| Method Value | Hex Bytes | Base64 | +|--------------|-----------|--------| +| 0 | 02 08 00 | AggA | +| 3 | 02 08 03 | AggD | +| 6 | 02 08 06 | AggG | +| 12 | 02 08 0C | AggM | +| 13 | 02 08 0D | AggN | +| 14 | 02 08 0E | AggO | + +## Recommended Fixes + +### Priority 1 - Critical Fixes + +1. **Fix spot mode encoding** + ```python + "spot": "AggD" # START_SPOT_CLEAN (method=3) + ``` + +2. **Rename "nosweep" to "resume"** (or implement proper mop-only mode) + ```python + "resume": "AggO" # RESUME_TASK (method=14) + ``` + +### Priority 2 - Feature Additions + +3. **Add BATTERY to homeassistant_features** + ```python + homeassistant_features = ( + ... + | VacuumEntityFeature.BATTERY + ) + ``` + +4. **Add LOCATE value** + ```python + RobovacCommand.LOCATE: { + "code": 160, + "values": {"locate": True}, + }, + ``` + +### Priority 3 - Enhanced Features + +5. **Add CLEANING_TIME and CLEANING_AREA** + ```python + robovac_features = ( + ... + | RoboVacEntityFeature.CLEANING_TIME + | RoboVacEntityFeature.CLEANING_AREA + ) + + # Commands + RobovacCommand.CLEANING_TIME: {"code": 6}, + RobovacCommand.CLEANING_AREA: {"code": 7}, + ``` + +6. **Add ROOM and ZONE features** if device supports room/zone cleaning + ```python + robovac_features = ( + ... + | RoboVacEntityFeature.ROOM + | RoboVacEntityFeature.ZONE + ) + ``` + +## Status Values Reference + +T2267 currently supports these status values: + +| Base64 Code | Human Readable | Activity | +|-------------|----------------|----------| +| BgoAEAUyAA== | Cleaning | CLEANING | +| BgoAEAVSAA== | Positioning | CLEANING | +| CAoAEAUyAggB | Paused | PAUSED | +| AggB | Paused | PAUSED | +| CAoCCAEQBTIA | Room Cleaning | CLEANING | +| CAoCCAEQBVIA | Room Positioning | CLEANING | +| CgoCCAEQBTICCAE= | Room Paused | PAUSED | +| CAoCCAIQBTIA | Zone Cleaning | CLEANING | +| CAoCCAIQBVIA | Zone Positioning | CLEANING | +| CgoCCAIQBTICCAE= | Zone Paused | PAUSED | +| BAoAEAY= | Remote Control | CLEANING | +| BBAHQgA= | Heading Home | RETURNING | +| BBADGgA= | Charging | DOCKED | +| BhADGgIIAQ== | Completed | DOCKED | +| AA== | Standby | IDLE | +| AhAB | Sleeping | IDLE | +| BQgNEIsB | Off Ground | ERROR | + +## Comparison with Similar Models + +### T2278 (L60 Hybrid SES) has additional: +- CLEANING_TIME feature +- CLEANING_AREA feature +- AUTO_RETURN feature +- ROOM feature +- ZONE feature +- MAP feature +- STOP command in MODE values + +### T2080 (S1 Pro) has additional: +- Station-related status values (Adding Water, Drying Mop, Washing Mop, etc.) +- MOP_LEVEL command +- More comprehensive error handling From 8816d570ceaf23c0ddaf1ad0c9eaa33d123f5ade Mon Sep 17 00:00:00 2001 From: Jonathan Thompson Date: Sat, 24 Jan 2026 00:38:43 +0000 Subject: [PATCH 12/25] Analysis of T2320 --- docs/T2320_CONFIGURATION_ANALYSIS.md | 380 +++++++++++++++++++++++++++ 1 file changed, 380 insertions(+) create mode 100644 docs/T2320_CONFIGURATION_ANALYSIS.md diff --git a/docs/T2320_CONFIGURATION_ANALYSIS.md b/docs/T2320_CONFIGURATION_ANALYSIS.md new file mode 100644 index 0000000..652fd6e --- /dev/null +++ b/docs/T2320_CONFIGURATION_ANALYSIS.md @@ -0,0 +1,380 @@ +# T2320 (Eufy X9 Pro with Auto-Clean Station) Configuration Analysis + +This document reviews the T2320 vacuum configuration and identifies missing or incorrect features. + +## Device Overview + +The T2320 is the Eufy Robot Vacuum and Mop X9 Pro with Auto-Clean Station. It features: + +- Auto-clean station with mop washing and drying +- Dust collection +- Water tank management (clean and dirty water) +- Advanced navigation with LiDAR, camera, and 3D TOF sensors + +## Current Features + +### Home Assistant Features (`VacuumEntityFeature`) + +| Feature | Status | Notes | +|---------|--------|-------| +| FAN_SPEED | ✓ | Code 154 | +| LOCATE | ✓ | Code 160, Fixed - was conflicting with RETURN_HOME | +| PAUSE | ✓ | Via START_PAUSE code 2 | +| RETURN_HOME | ✓ | Code 153 with boolean | +| SEND_COMMAND | ✓ | | +| START | ✓ | Via START_PAUSE code 2 | +| STATE | ✓ | Code 173 with protobuf values | +| STOP | ✓ | | +| BATTERY | ❌ Missing | Command exists (code 172) but feature flag not set | +| CLEAN_SPOT | ❌ Missing | Device likely supports spot cleaning | + +### RoboVac Features (`RoboVacEntityFeature`) + +| Feature | Status | Notes | +|---------|--------|-------| +| DO_NOT_DISTURB | ✓ | | +| BOOST_IQ | ✓ | Code 159 | +| CLEANING_TIME | ✓ | Code 6 | +| CLEANING_AREA | ✓ | Code 7 | +| MAP | ✓ | | +| ROOM | ❌ Missing | Device supports room cleaning (status values exist) | +| ZONE | ❌ Missing | Device supports zone cleaning (status values exist) | +| CONSUMABLES | ❌ Missing | X9 Pro has consumables tracking | +| AUTO_RETURN | ❌ Missing | | + +## Current Commands + +| Command | DPS Code | Values | Status | +|---------|----------|--------|--------| +| START_PAUSE | 2 | start=True, pause=False | ✓ | +| MODE | 152 | auto, return, pause, small_room, single_room | ⚠️ String values | +| STATUS | 173 | Multiple protobuf-encoded values | ✓ | +| RETURN_HOME | 153 | return_home=True | ✓ | +| FAN_SPEED | 154 | quiet, standard, turbo, max, boost_iq | ✓ | +| LOCATE | 160 | locate=True | ✓ Fixed | +| BATTERY | 172 | - | ✓ | +| ERROR | 169 | - | ✓ | +| BOOST_IQ | 159 | - | ✓ | +| CLEANING_TIME | 6 | - | ✓ | +| CLEANING_AREA | 7 | - | ✓ | + +## DPS Code Differences from Other Models + +T2320 uses a different DPS code scheme than T2267/T2278: + +| Command | T2267/T2278 | T2320 | Notes | +|---------|-------------|-------|-------| +| STATUS | 153 | 173 | Different code | +| FAN_SPEED | 158 | 154 | Different code | +| BATTERY | 163 | 172 | Different code | +| ERROR | 177 | 169 | Different code | +| RETURN_HOME | 152 (via MODE) | 153 (boolean) | Different approach | + +## Issues Found + +### 1. MODE uses string values instead of protobuf + +T2320 uses plain string values for MODE: + +```python +"values": { + "auto": "auto", + "return": "return", + "pause": "pause", + "small_room": "small_room", + "single_room": "single_room" +} +``` + +This differs from T2267/T2278 which use protobuf-encoded values. This may be correct for T2320's firmware, but should be verified. + +### 2. Missing STOP command + +Unlike T2267 which has a dedicated STOP command with protobuf encoding, T2320 relies on `async_stop()` calling `async_return_to_base()`. Consider adding: + +```python +RobovacCommand.STOP: { + "code": 152, # or appropriate code + "values": { + "stop": "stop", # or protobuf value if supported + }, +}, +``` + +### 3. Missing MOP_LEVEL command + +The X9 Pro has mopping capabilities but no MOP_LEVEL command is defined. Based on T2080: + +```python +RobovacCommand.MOP_LEVEL: { + "code": 10, # verify correct code for T2320 + "values": { + "low": "low", + "middle": "middle", + "high": "high", + }, +}, +``` + +### 4. Missing DIRECTION command + +No remote control direction command is defined: + +```python +RobovacCommand.DIRECTION: { + "code": ???, # needs discovery + "values": { + "forward": "forward", + "back": "back", + "left": "left", + "right": "right", + "brake": "brake", + }, +}, +``` + +### 5. Missing CONSUMABLES command + +The X9 Pro tracks consumables but no command is defined: + +```python +RobovacCommand.CONSUMABLES: { + "code": ???, # needs discovery +}, +``` + +## Missing Features Compared to T2080 (S1 Pro) + +T2080 has these additional features that T2320 might support: + +| Feature | T2080 Code | T2320 Status | +|---------|------------|--------------| +| MOP_LEVEL | 10 | ❌ Not implemented | +| DIRECTION | 176 | ❌ Not implemented | + +## Error Codes Reference + +From `error_code_list_t2320.proto`, the X9 Pro supports these error categories: + +### Robot Errors (E001-E055) + +| Code | Description | +|------|-------------| +| E001 | Crash buffer is stuck | +| E002 | Wheel is stuck | +| E003 | Side brush is stuck | +| E004 | Rolling brush is stuck | +| E005 | Host machine is trapped | +| E006 | Machine is trapped, move to start | +| E007 | Wheel is overhanging | +| E008 | Battery too low, shutting down | +| E013 | Host is tilted | +| E014 | Dust box/filter missing | +| E017 | Forbidden area detected | +| E018 | Laser protection cover stuck | +| E019 | Laser sensor stuck or tangled | +| E020 | Laser sensor blocked | +| E021 | Docking failed | +| E026 | Insufficient power for scheduled start | +| E031 | Foreign objects in suction port | +| E032 | Mop holder rotating motor stuck | +| E033 | Mop bracket lift motor stuck | +| E039 | Positioning failed | +| E040 | Mop cloth dislodged | +| E041 | Air drying heater abnormal | +| E050 | Accidentally on carpet | +| E051 | Camera blocked | +| E052 | Unable to leave station | +| E055 | Exploring station failed | + +### Station Errors (E070-E083) + +| Code | Description | +|------|-------------| +| E070 | Clean dust collector and filter | +| E071 | Wall sensor abnormal | +| E072 | Robot water tank insufficient | +| E073 | Station dirty tank full | +| E074 | Station clean water insufficient | +| E075 | Water tank absent | +| E076 | Camera abnormal | +| E077 | 3D TOF abnormal | +| E078 | Ultrasonic sensor abnormal | +| E079 | Station clean tray not installed | +| E080 | Robot-station communication abnormal | +| E081 | Sewage tank leaking | +| E082 | Clean station tray | +| E083 | Poor charging contact | + +### Hardware Errors (E101-E119) + +| Code | Description | +|------|-------------| +| E101 | Battery abnormal | +| E102 | Wheel module abnormal | +| E103 | Side brush module abnormal | +| E104 | Fan abnormal | +| E105 | Roller brush motor abnormal | +| E106 | Host pump abnormal | +| E107 | Laser sensor abnormal | +| E111 | Rotation motor abnormal | +| E112 | Lift motor abnormal | +| E113 | Water spraying device abnormal | +| E114 | Water pumping device abnormal | +| E117 | Ultrasonic sensor abnormal | +| E119 | WiFi or Bluetooth abnormal | + +## Prompt Codes Reference + +| Code | Description | +|------|-------------| +| P001 | Start scheduled cleaning | +| P003 | Battery low, returning to base | +| P004 | Positioning failed, rebuilding map | +| P005 | Positioning failed, mission ended | +| P006 | Some areas unreachable | +| P007 | Path planning failed | +| P009 | Base station exploration failed | +| P010 | Positioning successful | +| P011 | Task finished, returning | +| P012 | Cannot start task while on station | +| P013 | Scheduled cleaning failed (busy) | +| P014 | Map updating, try later | +| P015 | Mop washing complete, resuming | +| P016 | Low battery, charge first | +| P017 | Mop cleaning completed | + +## Status Values Reference + +T2320 supports these status values: + +### Cleaning States + +| Base64 Code | Human Readable | +|-------------|----------------| +| BgoAEAUyAA== | Auto Cleaning | +| BgoAEAVSAA== | Positioning | +| CgoAEAUyAhABUgA= | Auto Cleaning | +| CgoAEAkaAggBMgA= | Auto Cleaning | +| CAoCCAEQBTIA | Room Cleaning | +| CAoCCAEQBVIA | Room Positioning | +| CgoCCAEQBTICCAE= | Room Paused | +| CAoCCAIQBTIA | Zone Cleaning | +| CAoCCAIQBVIA | Zone Positioning | +| CgoCCAIQBTICCAE= | Zone Paused | + +### Navigation States + +| Base64 Code | Human Readable | +|-------------|----------------| +| BBAHQgA= | Heading Home | +| AgoA | Heading Home | +| CgoAEAcyAggBQgA= | Temporary Return | +| DAoCCAEQBzICCAFCAA== | Temporary Return | + +### Docked/Station States + +| Base64 Code | Human Readable | +|-------------|----------------| +| BBADGgA= | Charging | +| BhADGgIIAQ== | Completed | +| DAoCCAEQAxoAMgIIAQ== | Charge Mid-Clean | +| DAoAEAUaADICEAFSAA== | Adding Water | +| BhAJOgIQAg== | Drying Mop | +| BhAJOgIQAQ== | Washing Mop | +| AhAJ | Removing Dirty Water | +| BRAJ+gEA | Emptying Dust | +| DQoCCAEQCTICCAH6AQA= | Remove Dust Mid-Clean | + +### Other States + +| Base64 Code | Human Readable | +|-------------|----------------| +| CAoAEAUyAggB | Paused | +| AggB | Paused | +| AA== | Standby | +| BhAHQgBSAA== | Standby | +| AhAB | Sleeping | +| BhAGGgIIAQ== | Manual Control | +| BAoAEAY= | Remote Control | +| CAoAEAIyAggB | Error | + +## Recommended Fixes + +### Priority 1 - Critical + +1. **Add BATTERY to homeassistant_features** + + ```python + homeassistant_features = ( + ... + | VacuumEntityFeature.BATTERY + ) + ``` + +2. **Add CLEAN_SPOT feature and command** (if device supports it) + +### Priority 2 - Feature Additions + +3. **Add ROOM and ZONE features** + + ```python + robovac_features = ( + ... + | RoboVacEntityFeature.ROOM + | RoboVacEntityFeature.ZONE + ) + ``` + +4. **Add MOP_LEVEL command** (verify DPS code) + + ```python + RobovacCommand.MOP_LEVEL: { + "code": 10, + "values": { + "low": "low", + "middle": "middle", + "high": "high", + }, + }, + ``` + +5. **Add CONSUMABLES command and feature** + +### Priority 3 - Enhanced Features + +6. **Add DIRECTION command** for remote control + +7. **Add DO_NOT_DISTURB command with DPS code** + + Currently listed in features but no command defined with a code. + +## Comparison with Similar Models + +### T2080 (S1 Pro) Differences + +| Feature | T2080 | T2320 | +|---------|-------|-------| +| STATUS code | 153 | 173 | +| FAN_SPEED code | 158 | 154 | +| BATTERY code | 163 | 172 | +| ERROR code | 106 | 169 | +| LOCATE code | 103 | 160 | +| MODE encoding | Protobuf | String | +| RETURN_HOME | Via MODE (152) | Boolean (153) | + +### T2267 (L60) Differences + +| Feature | T2267 | T2320 | +|---------|-------|-------| +| MODE encoding | Protobuf | String | +| START_PAUSE | Via MODE (152) | Boolean (2) | +| RETURN_HOME | Via MODE (152) | Boolean (153) | +| Station features | No | Yes (washing, drying, dust) | + +## Notes + +- T2320 uses a hybrid approach: some commands use protobuf-encoded STATUS values while MODE uses plain strings +- The DPS code scheme differs significantly from T2267/T2278 family +- Station-related status values are comprehensive for the auto-clean station features +- Error codes are specific to the X9 Pro model with station-related errors From 927aaa1647be2c98674352f5fec1afbce105a195 Mon Sep 17 00:00:00 2001 From: Jonathan Thompson Date: Sat, 24 Jan 2026 00:43:23 +0000 Subject: [PATCH 13/25] Add more error codes. Added Troubleshooting Context for T2320 Error Codes Added troubleshooting steps and common causes for 23 additional error codes: - Station errors: 26, 55, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83 - Robot errors: 31, 39, 41, 50, 51 - Hardware errors: 101, 102, 103, 104, 105, 106, 107, 111, 112, 113, 114, 117, 119 --- custom_components/robovac/errors.py | 348 ++++++++++++++++++++++++++++ 1 file changed, 348 insertions(+) diff --git a/custom_components/robovac/errors.py b/custom_components/robovac/errors.py index 53ffae3..21d5f46 100644 --- a/custom_components/robovac/errors.py +++ b/custom_components/robovac/errors.py @@ -61,6 +61,23 @@ 114: "Water pumping device abnormal", 117: "Ultrasonic sensor abnormal", 119: "WiFi or Bluetooth abnormal", + # T2320 (X9 Pro) prompt codes (informational messages from error_code_list_t2320.proto) + # These are sent on the ERROR DPS but are status messages, not errors + "P001": "Starting scheduled cleaning", + "P003": "Battery low - returning to base station", + "P004": "Positioning failed - rebuilding map, starting new cleaning", + "P005": "Positioning failed - returning to base station", + "P006": "Some areas unreachable - not cleaned", + "P007": "Path planning failed - cannot reach designated area", + "P009": "Base station exploration failed - returned to starting point", + "P010": "Positioning successful", + "P011": "Task finished - returning to base station", + "P012": "Cannot start task while on station", + "P013": "Scheduled cleaning failed - task in progress", + "P014": "Map data updating - please try again later", + "P015": "Mop washing complete - resuming cleaning", + "P016": "Low battery - please charge and try again", + "P017": "Mop cleaning completed", # T22xx series error codes (from proto-reference/error_code_list_t2265.proto) # Wheel errors (1xxx) 1010: "Left wheel open circuit", @@ -510,6 +527,337 @@ "Debris on charging area", ], }, + # Additional T2320 (X9 Pro) troubleshooting contexts + 26: { + "troubleshooting": [ + "Charge vacuum before scheduled cleaning time", + "Adjust schedule to allow more charging time", + "Check if battery is holding charge properly", + ], + "common_causes": [ + "Vacuum not docked before scheduled time", + "Battery not fully charged", + "Short charging window before schedule", + ], + }, + 31: { + "troubleshooting": [ + "Check suction port for debris", + "Remove any stuck objects from suction area", + "Clean around the suction inlet", + "Restart vacuum", + ], + "common_causes": [ + "Large debris blocking suction", + "Foreign object stuck in inlet", + "Hair or string wrapped around inlet", + ], + }, + 39: { + "troubleshooting": [ + "Verify map matches current room layout", + "Delete and rebuild map if furniture moved", + "Ensure good lighting for camera-based positioning", + "Clean sensors and camera lens", + ], + "common_causes": [ + "Room layout changed since mapping", + "Furniture moved significantly", + "Poor lighting conditions", + "Dirty camera or sensors", + ], + }, + 41: { + "troubleshooting": [ + "Check air drying unit for blockages", + "Ensure station has proper ventilation", + "Contact support if error persists", + ], + "common_causes": [ + "Heater malfunction", + "Blocked ventilation", + "Hardware fault", + ], + }, + 50: { + "troubleshooting": [ + "Move vacuum off carpet manually", + "Update carpet avoidance settings in app", + "Check if mop is attached (should avoid carpet when mopping)", + ], + "common_causes": [ + "Vacuum drifted onto carpet while mopping", + "Carpet detection settings incorrect", + "Mop attached with carpet in cleaning area", + ], + }, + 51: { + "troubleshooting": [ + "Clean camera lens with soft dry cloth", + "Remove any obstructions above camera", + "Check for protective film on camera", + ], + "common_causes": [ + "Dirty camera lens", + "Object blocking camera view", + "Protective film not removed", + ], + }, + 55: { + "troubleshooting": [ + "Clear area around station", + "Ensure station is properly positioned against wall", + "Restart vacuum and station", + "Try manual docking first", + ], + "common_causes": [ + "Obstacles near station", + "Station moved from mapped location", + "Poor lighting for navigation", + ], + }, + 70: { + "troubleshooting": [ + "Remove and empty dust collector", + "Clean or replace filter", + "Check filter is properly installed", + ], + "common_causes": [ + "Dust collector full", + "Filter clogged with dust", + "Regular maintenance needed", + ], + }, + 71: { + "troubleshooting": [ + "Clean wall sensor on side of vacuum", + "Check for debris blocking sensor", + "Restart vacuum", + ], + "common_causes": [ + "Dirty wall sensor", + "Debris blocking sensor", + "Sensor malfunction", + ], + }, + 72: { + "troubleshooting": [ + "Refill robot's onboard water tank", + "Check water tank is properly seated", + "Ensure water inlet is not blocked", + ], + "common_causes": [ + "Water tank empty", + "Tank not properly inserted", + "Water consumption higher than expected", + ], + }, + 76: { + "troubleshooting": [ + "Clean camera lens", + "Restart vacuum", + "Contact support if error persists", + ], + "common_causes": [ + "Camera hardware issue", + "Software glitch", + "Camera damaged", + ], + }, + 77: { + "troubleshooting": [ + "Clean 3D TOF sensor area", + "Restart vacuum", + "Contact support if error persists", + ], + "common_causes": [ + "Sensor obstruction", + "Hardware malfunction", + "Sensor damaged", + ], + }, + 78: { + "troubleshooting": [ + "Clean ultrasonic sensors", + "Check for damage to sensor covers", + "Restart vacuum", + ], + "common_causes": [ + "Dirty ultrasonic sensors", + "Sensor obstruction", + "Hardware malfunction", + ], + }, + 81: { + "troubleshooting": [ + "Check dirty water tank seal", + "Ensure tank is properly seated", + "Inspect tank for cracks or damage", + "Replace tank if damaged", + ], + "common_causes": [ + "Tank seal damaged", + "Tank not properly seated", + "Cracked tank", + ], + }, + 101: { + "troubleshooting": [ + "Restart vacuum", + "Let battery fully discharge then recharge", + "Contact support if error persists", + ], + "common_causes": [ + "Battery communication error", + "Battery degradation", + "Temperature extreme", + ], + }, + 102: { + "troubleshooting": [ + "Check wheels for obstructions", + "Clean wheel axles", + "Restart vacuum", + ], + "common_causes": [ + "Wheel motor issue", + "Debris in wheel mechanism", + "Wheel sensor malfunction", + ], + }, + 103: { + "troubleshooting": [ + "Remove and clean side brush", + "Check side brush motor area for debris", + "Replace side brush if worn", + ], + "common_causes": [ + "Side brush motor issue", + "Debris blocking brush", + "Worn side brush", + ], + }, + 104: { + "troubleshooting": [ + "Clean dust collector and filter", + "Check for blockages in airway", + "Restart vacuum", + ], + "common_causes": [ + "Clogged filter restricting airflow", + "Fan motor issue", + "Debris in fan housing", + ], + }, + 105: { + "troubleshooting": [ + "Remove and clean roller brush", + "Check brush bearings", + "Remove hair and debris from brush area", + ], + "common_causes": [ + "Roller brush motor strain", + "Excessive debris buildup", + "Worn brush bearings", + ], + }, + 106: { + "troubleshooting": [ + "Check water tank is properly seated", + "Ensure water lines are not kinked", + "Restart vacuum", + ], + "common_causes": [ + "Water pump malfunction", + "Air in water lines", + "Blocked water pathway", + ], + }, + 107: { + "troubleshooting": [ + "Clean laser sensor cover", + "Check laser turret rotates freely", + "Remove any obstructions from turret", + ], + "common_causes": [ + "Laser sensor malfunction", + "Turret motor issue", + "Sensor damage", + ], + }, + 111: { + "troubleshooting": [ + "Check mop pad attachment area", + "Remove debris from rotation mechanism", + "Restart vacuum", + ], + "common_causes": [ + "Rotation motor malfunction", + "Debris blocking rotation", + "Motor strain from obstruction", + ], + }, + 112: { + "troubleshooting": [ + "Check mop lifting mechanism for obstructions", + "Remove debris from lift area", + "Restart vacuum", + ], + "common_causes": [ + "Lift motor malfunction", + "Debris blocking lift mechanism", + "Motor strain", + ], + }, + 113: { + "troubleshooting": [ + "Check water spray nozzles for blockages", + "Ensure water tank has water", + "Restart vacuum", + ], + "common_causes": [ + "Spray nozzle clogged", + "Water pump issue", + "Empty water tank", + ], + }, + 114: { + "troubleshooting": [ + "Check water pumping mechanism", + "Ensure water tank is properly seated", + "Restart vacuum", + ], + "common_causes": [ + "Pump malfunction", + "Blocked water lines", + "Air in system", + ], + }, + 117: { + "troubleshooting": [ + "Clean ultrasonic sensors", + "Check for debris or damage", + "Restart vacuum", + ], + "common_causes": [ + "Sensor obstruction", + "Sensor damage", + "Hardware malfunction", + ], + }, + 119: { + "troubleshooting": [ + "Restart vacuum", + "Check WiFi signal strength", + "Re-pair vacuum with app if needed", + "Restart router", + ], + "common_causes": [ + "WiFi connectivity issue", + "Bluetooth interference", + "Communication module fault", + ], + }, } From 5ad2f14ebec9f3ea19b0c55006cf51b51847de68 Mon Sep 17 00:00:00 2001 From: Jonathan Thompson Date: Sat, 24 Jan 2026 09:52:32 +0000 Subject: [PATCH 14/25] Update progress in docs for 2267 and 2230 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit T2230 1. Home Assistant Features table - Changed BATTERY status from "❌ Missing" to "✓ Via Sensor" with note about HA 2025.8+ compliance 2. Current Commands table - Updated BATTERY row to indicate it's exposed via sensor entity 3. Recommended Fixes section - Marked the BATTERY fix as ✅ COMPLETED with details: - Explanation of the deprecation in HA 2025.8 - Changes made to sensor.py - Link to Home Assistant developer documentation 4. Notes section - Added note about battery sensor pattern T2267 1. Home Assistant Features table - Changed BATTERY status from "❌ Missing" to "✓ Via Sensor" with HA 2025.8+ compliance note 2. Recommended Fixes section - Marked the BATTERY fix as ✅ COMPLETED with: - Explanation of the deprecation in HA 2025.8 - Changes made to sensor.py - Link to Home Assistant developer documentation 3. Added Notes section with: - Battery sensor pattern note (DPS code 163) - Note about T2267's protobuf encoding vs T2320's string values --- custom_components/robovac/sensor.py | 5 +++-- docs/T2267_CONFIGURATION_ANALYSIS.md | 24 ++++++++++++++++-------- docs/T2320_CONFIGURATION_ANALYSIS.md | 21 ++++++++++++--------- 3 files changed, 31 insertions(+), 19 deletions(-) diff --git a/custom_components/robovac/sensor.py b/custom_components/robovac/sensor.py index ea14e22..62d28f6 100644 --- a/custom_components/robovac/sensor.py +++ b/custom_components/robovac/sensor.py @@ -9,7 +9,6 @@ from homeassistant.helpers.device_registry import DeviceInfo from .const import CONF_VACS, DOMAIN, REFRESH_RATE -from .vacuums.base import TuyaCodes _LOGGER = logging.getLogger(__name__) @@ -63,7 +62,9 @@ async def async_update(self) -> None: try: vacuum_entity = self.hass.data[DOMAIN][CONF_VACS].get(self.robovac_id) if vacuum_entity and vacuum_entity.tuyastatus: - self._attr_native_value = vacuum_entity.tuyastatus.get(TuyaCodes.BATTERY_LEVEL) + # Use model-specific battery DPS code instead of hardcoded TuyaCodes.BATTERY_LEVEL + battery_code = vacuum_entity._get_dps_code("BATTERY_LEVEL") + self._attr_native_value = vacuum_entity.tuyastatus.get(battery_code) self._attr_available = True else: _LOGGER.debug("Vacuum entity or status not available for %s", self.robovac_id) diff --git a/docs/T2267_CONFIGURATION_ANALYSIS.md b/docs/T2267_CONFIGURATION_ANALYSIS.md index aba8efa..5b0a42a 100644 --- a/docs/T2267_CONFIGURATION_ANALYSIS.md +++ b/docs/T2267_CONFIGURATION_ANALYSIS.md @@ -17,7 +17,7 @@ This document reviews the T2267 vacuum configuration and identifies missing or i | START | ✓ | | | STATE | ✓ | | | STOP | ✓ | Fixed - uses code 152 with "AggM" | -| BATTERY | ❌ Missing | Command exists (code 163) but feature flag not set | +| BATTERY | ✓ Via Sensor | Command exists (code 163), exposed via dedicated sensor entity (HA 2025.8+ compliant) | ### RoboVac Features (`RoboVacEntityFeature`) @@ -170,13 +170,16 @@ The simple method-only commands follow this pattern: ### Priority 2 - Feature Additions -3. **Add BATTERY to homeassistant_features** - ```python - homeassistant_features = ( - ... - | VacuumEntityFeature.BATTERY - ) - ``` +3. **~~Add BATTERY to homeassistant_features~~** ✅ COMPLETED (2025-01) + + `VacuumEntityFeature.BATTERY` was deprecated in Home Assistant 2025.8 and will stop working in 2026.8. Instead, the integration now uses a dedicated battery sensor entity with `SensorDeviceClass.BATTERY`. + + **Changes made:** + - `sensor.py`: Updated to use model-specific DPS codes via `vacuum_entity._get_dps_code("BATTERY_LEVEL")` instead of hardcoded `TuyaCodes.BATTERY_LEVEL` + - T2267 correctly defines `RobovacCommand.BATTERY` with code `163` + - Battery level is now exposed as a separate sensor entity linked to the vacuum device + + See: [Vacuum battery properties are deprecated](https://developers.home-assistant.io/blog/2025/07/02/vacuum-battery-properties-deprecated/) 4. **Add LOCATE value** ```python @@ -249,3 +252,8 @@ T2267 currently supports these status values: - Station-related status values (Adding Water, Drying Mop, Washing Mop, etc.) - MOP_LEVEL command - More comprehensive error handling + +## Notes + +- Battery level is exposed via a dedicated sensor entity (Home Assistant 2025.8+ pattern) using model-specific DPS code 163 +- T2267 uses protobuf-encoded values for MODE commands (unlike T2320 which uses plain strings) diff --git a/docs/T2320_CONFIGURATION_ANALYSIS.md b/docs/T2320_CONFIGURATION_ANALYSIS.md index 652fd6e..ea95b9a 100644 --- a/docs/T2320_CONFIGURATION_ANALYSIS.md +++ b/docs/T2320_CONFIGURATION_ANALYSIS.md @@ -25,7 +25,7 @@ The T2320 is the Eufy Robot Vacuum and Mop X9 Pro with Auto-Clean Station. It fe | START | ✓ | Via START_PAUSE code 2 | | STATE | ✓ | Code 173 with protobuf values | | STOP | ✓ | | -| BATTERY | ❌ Missing | Command exists (code 172) but feature flag not set | +| BATTERY | ✓ Via Sensor | Command exists (code 172), exposed via dedicated sensor entity (HA 2025.8+ compliant) | | CLEAN_SPOT | ❌ Missing | Device likely supports spot cleaning | ### RoboVac Features (`RoboVacEntityFeature`) @@ -52,7 +52,7 @@ The T2320 is the Eufy Robot Vacuum and Mop X9 Pro with Auto-Clean Station. It fe | RETURN_HOME | 153 | return_home=True | ✓ | | FAN_SPEED | 154 | quiet, standard, turbo, max, boost_iq | ✓ | | LOCATE | 160 | locate=True | ✓ Fixed | -| BATTERY | 172 | - | ✓ | +| BATTERY | 172 | - | ✓ Via sensor entity | | ERROR | 169 | - | ✓ | | BOOST_IQ | 159 | - | ✓ | | CLEANING_TIME | 6 | - | ✓ | @@ -303,14 +303,16 @@ T2320 supports these status values: ### Priority 1 - Critical -1. **Add BATTERY to homeassistant_features** +1. **~~Add BATTERY to homeassistant_features~~** ✅ COMPLETED (2025-01) - ```python - homeassistant_features = ( - ... - | VacuumEntityFeature.BATTERY - ) - ``` + `VacuumEntityFeature.BATTERY` was deprecated in Home Assistant 2025.8 and will stop working in 2026.8. Instead, the integration now uses a dedicated battery sensor entity with `SensorDeviceClass.BATTERY`. + + **Changes made:** + - `sensor.py`: Updated to use model-specific DPS codes via `vacuum_entity._get_dps_code("BATTERY_LEVEL")` instead of hardcoded `TuyaCodes.BATTERY_LEVEL` + - T2320 correctly defines `RobovacCommand.BATTERY` with code `172` + - Battery level is now exposed as a separate sensor entity linked to the vacuum device + + See: [Vacuum battery properties are deprecated](https://developers.home-assistant.io/blog/2025/07/02/vacuum-battery-properties-deprecated/) 2. **Add CLEAN_SPOT feature and command** (if device supports it) @@ -378,3 +380,4 @@ T2320 supports these status values: - The DPS code scheme differs significantly from T2267/T2278 family - Station-related status values are comprehensive for the auto-clean station features - Error codes are specific to the X9 Pro model with station-related errors +- Battery level is exposed via a dedicated sensor entity (Home Assistant 2025.8+ pattern) using model-specific DPS code 172 From 2ffe6ed9d3ed46a3a442b9bc87b96249c4573d6f Mon Sep 17 00:00:00 2001 From: Jonathan Thompson Date: Sat, 24 Jan 2026 10:46:39 +0000 Subject: [PATCH 15/25] Start and Pause working for T2320 Porting functionality from T2267, which appears to be the same. --- custom_components/robovac/vacuum.py | 23 ++- custom_components/robovac/vacuums/T2320.py | 153 +++++++++++++++--- tests/test_vacuum/test_sensor.py | 1 + .../test_t2320_command_mappings.py | 138 ++++++++++++++-- 4 files changed, 277 insertions(+), 38 deletions(-) diff --git a/custom_components/robovac/vacuum.py b/custom_components/robovac/vacuum.py index 2c0c70e..9dc29a2 100644 --- a/custom_components/robovac/vacuum.py +++ b/custom_components/robovac/vacuum.py @@ -749,9 +749,26 @@ async def async_start(self, **kwargs: Any) -> None: _LOGGER.error("Cannot start vacuum: vacuum not initialized") return - await self.vacuum.async_set({ - self._get_dps_code("MODE"): self.vacuum.getRoboVacCommandValue(RobovacCommand.MODE, "auto") - }) + mode_code = self._get_dps_code("MODE") + + # Build command payload + payload = { + mode_code: self.vacuum.getRoboVacCommandValue(RobovacCommand.MODE, "auto") + } + + # Some models (e.g., T2320) use a separate START_PAUSE DPS code to trigger cleaning + # MODE sets the cleaning mode, START_PAUSE triggers the action + # Only add START_PAUSE if the model explicitly defines it with a different code + model_dps_codes = self.vacuum.getDpsCodes() + if "START_PAUSE" in model_dps_codes: + start_pause_code = model_dps_codes["START_PAUSE"] + if start_pause_code != mode_code: + start_value = self.vacuum.getRoboVacCommandValue(RobovacCommand.START_PAUSE, "start") + if start_value != "start": + # Model has a mapped "start" value for START_PAUSE, include it + payload[start_pause_code] = start_value + + await self.vacuum.async_set(payload) async def async_pause(self, **kwargs: Any) -> None: """Pause the vacuum cleaner. diff --git a/custom_components/robovac/vacuums/T2320.py b/custom_components/robovac/vacuums/T2320.py index df5c6e7..55f5978 100644 --- a/custom_components/robovac/vacuums/T2320.py +++ b/custom_components/robovac/vacuums/T2320.py @@ -1,6 +1,8 @@ """Eufy Robot Vacuum and Mop X9 Pro with Auto-Clean Station (T2320)""" -from homeassistant.components.vacuum import VacuumEntityFeature -from .base import RoboVacEntityFeature, RobovacCommand, RobovacModelDetails + +from homeassistant.components.vacuum import VacuumActivity, VacuumEntityFeature + +from .base import RobovacCommand, RoboVacEntityFeature, RobovacModelDetails class T2320(RobovacModelDetails): @@ -17,53 +19,156 @@ class T2320(RobovacModelDetails): robovac_features = ( RoboVacEntityFeature.DO_NOT_DISTURB | RoboVacEntityFeature.BOOST_IQ + | RoboVacEntityFeature.CLEANING_TIME + | RoboVacEntityFeature.CLEANING_AREA + | RoboVacEntityFeature.MAP ) commands = { RobovacCommand.START_PAUSE: { - "code": 2, + "code": 152, # Same as MODE, uses protobuf-encoded values like T2267 "values": { - "start": True, - "pause": False + "pause": "AggN", # Protobuf: ModeCtrlRequest.Method.PAUSE_TASK + "resume": "AggO", # Protobuf: ModeCtrlRequest.Method.RESUME_TASK }, }, RobovacCommand.MODE: { "code": 152, "values": { - "auto": "auto", - "return": "return", - "pause": "pause", + "auto": "BBoCCAE=", # Protobuf: ModeCtrlRequest.Method.START_AUTO_CLEAN + "pause": "AggN", # Protobuf: ModeCtrlRequest.Method.PAUSE_TASK + "return": "AggG", # Protobuf: ModeCtrlRequest.Method.START_GOHOME "small_room": "small_room", - "single_room": "single_room" + "single_room": "single_room", }, }, RobovacCommand.STATUS: { "code": 173, - }, - RobovacCommand.RETURN_HOME: { - "code": 153, "values": { - "return_home": True - } + # Protobuf-encoded status values (similar to T2080/T2267) + # Cleaning states + "BgoAEAUyAA==": "Auto Cleaning", + "BgoAEAVSAA==": "Positioning", + "CgoAEAUyAhABUgA=": "Auto Cleaning", + "CgoAEAkaAggBMgA=": "Auto Cleaning", + # Room cleaning states + "CAoCCAEQBTIA": "Room Cleaning", + "CAoCCAEQBVIA": "Room Positioning", + "CgoCCAEQBTICCAE=": "Room Paused", + "DAoCCAEQBTICEAFSAA==": "Room Positioning", + # Zone cleaning states + "CAoCCAIQBTIA": "Zone Cleaning", + "CAoCCAIQBVIA": "Zone Positioning", + "CgoCCAIQBTICCAE=": "Zone Paused", + # Paused states + "CAoAEAUyAggB": "Paused", + "AggB": "Paused", + # Navigation states + "BBAHQgA=": "Heading Home", + "AgoA": "Heading Home", + "CgoAEAcyAggBQgA=": "Temporary Return", + "DAoCCAEQBzICCAFCAA==": "Temporary Return", + # Charging/docked states + "BBADGgA=": "Charging", + "BhADGgIIAQ==": "Completed", + "DAoCCAEQAxoAMgIIAQ==": "Charge Mid-Clean", + # Idle states + "AA==": "Standby", + "BhAHQgBSAA==": "Standby", + "AhAB": "Sleeping", + # Station states (X9 Pro has auto-clean station) + "DAoAEAUaADICEAFSAA==": "Adding Water", + "DAoCCAEQCRoCCAEyAA==": "Adding Water", + "DgoAEAkaAggBMgA6AhAB": "Adding Water", + "BhAJOgIQAg==": "Drying Mop", + "CBAJGgA6AhAC": "Drying Mop", + "ChAJGgIIAToCEAI=": "Drying Mop", + "DgoAEAUaAggBMgIQAVIA": "Washing Mop", + "EAoCCAEQCRoCCAEyADoCEAE=": "Washing Mop", + "BhAJOgIQAQ==": "Washing Mop", + "AhAJ": "Removing Dirty Water", + "BRAJ+gEA": "Emptying Dust", + "DQoCCAEQCTICCAH6AQA=": "Remove Dust Mid-Clean", + # Manual control + "BhAGGgIIAQ==": "Manual Control", + "BAoAEAY=": "Remote Control", + # Error state + "CAoAEAIyAggB": "Error", + }, }, + RobovacCommand.RETURN_HOME: {"code": 153, "values": {"return_home": True}}, RobovacCommand.FAN_SPEED: { "code": 154, "values": { - "Standard": "standard", - "Boost IQ": "boost_iq", - "Max": "max", - "Quiet": "Quiet", + "quiet": "Quiet", + "standard": "Standard", + "turbo": "Turbo", + "max": "Max", + "boost_iq": "Boost_IQ", }, }, - RobovacCommand.LOCATE: { - "code": 153, - "values": { - "locate": True - } - }, + RobovacCommand.LOCATE: {"code": 160, "values": {"locate": True}}, RobovacCommand.BATTERY: { "code": 172, }, RobovacCommand.ERROR: { "code": 169, }, + RobovacCommand.BOOST_IQ: { + "code": 159, + }, + RobovacCommand.CLEANING_TIME: { + "code": 6, + }, + RobovacCommand.CLEANING_AREA: { + "code": 7, + }, + } + + activity_mapping = { + # Cleaning states + "Auto Cleaning": VacuumActivity.CLEANING, + "Positioning": VacuumActivity.CLEANING, + "Room Cleaning": VacuumActivity.CLEANING, + "Room Positioning": VacuumActivity.CLEANING, + "Zone Cleaning": VacuumActivity.CLEANING, + "Zone Positioning": VacuumActivity.CLEANING, + "Manual Control": VacuumActivity.CLEANING, + "Remote Control": VacuumActivity.CLEANING, + # Paused states + "Paused": VacuumActivity.PAUSED, + "Room Paused": VacuumActivity.PAUSED, + "Zone Paused": VacuumActivity.PAUSED, + # Returning states + "Heading Home": VacuumActivity.RETURNING, + "Temporary Return": VacuumActivity.RETURNING, + # Docked states + "Charging": VacuumActivity.DOCKED, + "Completed": VacuumActivity.DOCKED, + "Charge Mid-Clean": VacuumActivity.DOCKED, + "Adding Water": VacuumActivity.DOCKED, + "Drying Mop": VacuumActivity.DOCKED, + "Washing Mop": VacuumActivity.DOCKED, + "Removing Dirty Water": VacuumActivity.DOCKED, + "Emptying Dust": VacuumActivity.DOCKED, + "Remove Dust Mid-Clean": VacuumActivity.DOCKED, + # Idle states + "Standby": VacuumActivity.IDLE, + "Sleeping": VacuumActivity.IDLE, + # Error state + "Error": VacuumActivity.ERROR, } + + # Patterns for STATUS codes with dynamic content (prefix, suffix, status_name) + # These match base64-encoded protobuf messages with embedded timestamps + status_patterns = [ + # Positioning codes: start with "DA" (0c08), end with "FSAA==" (5200) + # The middle bytes contain a timestamp that changes with each update + ("DA", "FSAA==", "Positioning"), + ] + + # Patterns for ERROR codes - some devices send status messages on the ERROR DPS + # These patterns map such messages to "no_error" to prevent false error states + error_patterns = [ + # Positioning/relocating status sent on ERROR DPS - not an actual error + ("DA", "FSAA==", "no_error"), + ] diff --git a/tests/test_vacuum/test_sensor.py b/tests/test_vacuum/test_sensor.py index bd45cbe..3b6cb53 100644 --- a/tests/test_vacuum/test_sensor.py +++ b/tests/test_vacuum/test_sensor.py @@ -39,6 +39,7 @@ async def test_battery_sensor_update_success(): # Create mock vacuum entity mock_vacuum_entity = MagicMock() + mock_vacuum_entity._get_dps_code.return_value = TuyaCodes.BATTERY_LEVEL mock_vacuum_entity.tuyastatus = {TuyaCodes.BATTERY_LEVEL: 85} # Create mock hass data structure diff --git a/tests/test_vacuum/test_t2320_command_mappings.py b/tests/test_vacuum/test_t2320_command_mappings.py index c681321..2032ff8 100644 --- a/tests/test_vacuum/test_t2320_command_mappings.py +++ b/tests/test_vacuum/test_t2320_command_mappings.py @@ -36,19 +36,19 @@ def test_start_pause_command_exists(self, t2320_robovac): assert RobovacCommand.START_PAUSE in commands def test_start_pause_command_value(self, t2320_robovac): - """Test START_PAUSE command returns boolean values.""" - # Debug log shows: "dps": {"2": false} + """Test START_PAUSE command returns protobuf-encoded values like T2267.""" + # T2320 uses same protobuf encoding as T2267 for pause/resume pause_result = t2320_robovac.getRoboVacCommandValue(RobovacCommand.START_PAUSE, "pause") - assert pause_result is False or pause_result == "False" or pause_result == "false" + assert pause_result == "AggN" # Protobuf: ModeCtrlRequest.Method.PAUSE_TASK - start_result = t2320_robovac.getRoboVacCommandValue(RobovacCommand.START_PAUSE, "start") - assert start_result is True or start_result == "True" or start_result == "true" + resume_result = t2320_robovac.getRoboVacCommandValue(RobovacCommand.START_PAUSE, "resume") + assert resume_result == "AggO" # Protobuf: ModeCtrlRequest.Method.RESUME_TASK def test_mode_command_value(self, t2320_robovac): - """Test MODE command returns plain string values as seen in debug logs.""" - # Debug log shows: "dps": {"152": "auto"} + """Test MODE command returns protobuf-encoded values like T2267.""" + # T2320 uses same protobuf encoding as T2267 for mode commands result = t2320_robovac.getRoboVacCommandValue(RobovacCommand.MODE, "auto") - assert result == "auto" + assert result == "BBoCCAE=" # Protobuf: ModeCtrlRequest.Method.START_AUTO_CLEAN def test_fan_speed_command_has_multiple_options(self, t2320_robovac): """Test FAN_SPEED command has multiple readable options.""" @@ -61,13 +61,16 @@ def test_fan_speed_command_has_multiple_options(self, t2320_robovac): assert len(speed) < 20 # Reasonable length for human-readable names def test_dps_codes_mapping(self, t2320_robovac): - """Test DPS codes match debug log expectations.""" + """Test DPS codes match expected values.""" dps_codes = t2320_robovac.getDpsCodes() - # Based on debug logs assert dps_codes.get("RETURN_HOME") == "153" - assert dps_codes.get("START_PAUSE") == "2" + assert dps_codes.get("START_PAUSE") == "152" # Same as MODE, uses protobuf like T2267 assert dps_codes.get("MODE") == "152" assert dps_codes.get("FAN_SPEED") == "154" + assert dps_codes.get("LOCATE") == "160" # Fixed: was 153 (conflict with RETURN_HOME) + assert dps_codes.get("STATUS") == "173" + assert dps_codes.get("BATTERY_LEVEL") == "172" + assert dps_codes.get("ERROR_CODE") == "169" def test_status_command_exists(self, t2320_robovac): """Test STATUS command is defined for state polling.""" @@ -78,3 +81,116 @@ def test_locate_command_exists(self, t2320_robovac): """Test LOCATE command is defined.""" commands = t2320_robovac.getSupportedCommands() assert RobovacCommand.LOCATE in commands + + def test_locate_uses_different_code_than_return_home(self, t2320_robovac): + """Test LOCATE and RETURN_HOME use different DPS codes.""" + dps_codes = t2320_robovac.getDpsCodes() + # LOCATE should NOT share the same code as RETURN_HOME + assert dps_codes.get("LOCATE") != dps_codes.get("RETURN_HOME") + + def test_status_values_mapping(self, t2320_robovac): + """Test STATUS command has value mappings for protobuf-encoded states.""" + # Test that STATUS has value mappings + commands = t2320_robovac.model_details.commands + status_cmd = commands.get(RobovacCommand.STATUS) + assert status_cmd is not None + assert "values" in status_cmd + + # Test common status values exist + status_values = status_cmd["values"] + # Check charging state exists + assert "BBADGgA=" in status_values + assert status_values["BBADGgA="] == "Charging" + # Check standby state exists + assert "AA==" in status_values + assert status_values["AA=="] == "Standby" + + def test_activity_mapping_exists(self, t2320_robovac): + """Test T2320 has activity_mapping for Home Assistant states.""" + activity_mapping = t2320_robovac.model_details.activity_mapping + assert activity_mapping is not None + assert len(activity_mapping) > 0 + + def test_activity_mapping_contains_station_states(self, t2320_robovac): + """Test activity_mapping includes X9 Pro auto-clean station states.""" + from homeassistant.components.vacuum import VacuumActivity + activity_mapping = t2320_robovac.model_details.activity_mapping + + # X9 Pro has auto-clean station - verify station states are mapped + assert "Washing Mop" in activity_mapping + assert activity_mapping["Washing Mop"] == VacuumActivity.DOCKED + assert "Drying Mop" in activity_mapping + assert activity_mapping["Drying Mop"] == VacuumActivity.DOCKED + assert "Emptying Dust" in activity_mapping + assert activity_mapping["Emptying Dust"] == VacuumActivity.DOCKED + + def test_human_readable_status_conversion(self, t2320_robovac): + """Test STATUS values are converted to human-readable strings.""" + # Test protobuf-encoded status -> human readable + result = t2320_robovac.getRoboVacHumanReadableValue( + RobovacCommand.STATUS, "BBADGgA=" + ) + assert result == "Charging" + + result = t2320_robovac.getRoboVacHumanReadableValue( + RobovacCommand.STATUS, "AA==" + ) + assert result == "Standby" + + result = t2320_robovac.getRoboVacHumanReadableValue( + RobovacCommand.STATUS, "BhAJOgIQAQ==" + ) + assert result == "Washing Mop" + + def test_fan_speed_values(self, t2320_robovac): + """Test FAN_SPEED command value mappings.""" + # Test snake_case input -> PascalCase output + assert t2320_robovac.getRoboVacCommandValue(RobovacCommand.FAN_SPEED, "quiet") == "Quiet" + assert t2320_robovac.getRoboVacCommandValue(RobovacCommand.FAN_SPEED, "standard") == "Standard" + assert t2320_robovac.getRoboVacCommandValue(RobovacCommand.FAN_SPEED, "turbo") == "Turbo" + assert t2320_robovac.getRoboVacCommandValue(RobovacCommand.FAN_SPEED, "max") == "Max" + + def test_status_patterns_exist(self, t2320_robovac): + """Test T2320 has status_patterns for dynamic STATUS codes.""" + status_patterns = t2320_robovac.model_details.status_patterns + assert status_patterns is not None + assert len(status_patterns) > 0 + # Verify positioning pattern exists + assert ("DA", "FSAA==", "Positioning") in status_patterns + + def test_error_patterns_exist(self, t2320_robovac): + """Test T2320 has error_patterns to prevent false error states.""" + error_patterns = t2320_robovac.model_details.error_patterns + assert error_patterns is not None + assert len(error_patterns) > 0 + # Verify positioning-on-error pattern exists + assert ("DA", "FSAA==", "no_error") in error_patterns + + def test_status_pattern_matching(self, t2320_robovac): + """Test STATUS pattern matching for dynamic positioning codes.""" + # These codes have dynamic timestamps in the middle + positioning_codes = [ + "DAi73ou93qHyzgFSAA==", + "DAjE74KF76HyzgFSAA==", + "DAiCobvM+KHyzgFSAA==", + ] + + for code in positioning_codes: + result = t2320_robovac.getRoboVacHumanReadableValue( + RobovacCommand.STATUS, code + ) + assert result == "Positioning", f"Expected 'Positioning' for {code}, got {result}" + + def test_error_pattern_matching(self, t2320_robovac): + """Test ERROR pattern matching prevents false error states.""" + # Positioning status sent on ERROR DPS should return "no_error" + positioning_codes = [ + "DAi73ou93qHyzgFSAA==", + "DAjE74KF76HyzgFSAA==", + ] + + for code in positioning_codes: + result = t2320_robovac.getRoboVacHumanReadableValue( + RobovacCommand.ERROR, code + ) + assert result == "no_error", f"Expected 'no_error' for {code} on ERROR DPS, got {result}" From cf9670c00dba71e54d62c2d22377aec09c8d85c8 Mon Sep 17 00:00:00 2001 From: Jonathan Thompson Date: Sat, 24 Jan 2026 11:00:10 +0000 Subject: [PATCH 16/25] T2330 - Fix return home, stop and locate Changes Made to T2320 RETURN_HOME - Before: Code 153 with boolean {"return_home": True} - After: Code 152 with protobuf {"return": "AggG"} (START_GOHOME) STOP (new) - Added: Code 152 with protobuf {"stop": "AggM"} (STOP_TASK) LOCATE - Before: Code 160 with boolean {"locate": True} - After: Code 160 (no values, same as T2267) All commands now use the same protobuf-encoded approach as T2267, sending commands via DPS code 152. --- custom_components/robovac/vacuums/T2320.py | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/custom_components/robovac/vacuums/T2320.py b/custom_components/robovac/vacuums/T2320.py index 55f5978..8e225fd 100644 --- a/custom_components/robovac/vacuums/T2320.py +++ b/custom_components/robovac/vacuums/T2320.py @@ -95,7 +95,22 @@ class T2320(RobovacModelDetails): "CAoAEAIyAggB": "Error", }, }, - RobovacCommand.RETURN_HOME: {"code": 153, "values": {"return_home": True}}, + RobovacCommand.RETURN_HOME: { + # Return home is sent via MODE command (code 152) with protobuf-encoded value + # "AggG" encodes ModeCtrlRequest.Method.START_GOHOME (6) + "code": 152, + "values": { + "return": "AggG", + }, + }, + RobovacCommand.STOP: { + # Stop is sent via MODE command (code 152) with protobuf-encoded value + # "AggM" encodes ModeCtrlRequest.Method.STOP_TASK (12) + "code": 152, + "values": { + "stop": "AggM", + }, + }, RobovacCommand.FAN_SPEED: { "code": 154, "values": { @@ -106,7 +121,9 @@ class T2320(RobovacModelDetails): "boost_iq": "Boost_IQ", }, }, - RobovacCommand.LOCATE: {"code": 160, "values": {"locate": True}}, + RobovacCommand.LOCATE: { + "code": 160, + }, RobovacCommand.BATTERY: { "code": 172, }, From 7576fa0c1c2da111bcbc0671903e31f2a0fa9cfe Mon Sep 17 00:00:00 2001 From: Jonathan Thompson Date: Sat, 24 Jan 2026 11:45:09 +0000 Subject: [PATCH 17/25] Small changes to T2320 to get status to work. I've seen that 177 reports errors, but they don't seem like errors. Adding ("Dw", "BSAA==", "Washing Mop"). Which appears to work. The mop is noisy, difficult to test with my partner hating the constant water noises. --- custom_components/robovac/vacuums/T2320.py | 13 +++++++++---- tests/test_vacuum/test_dps_command_mapping.py | 2 +- tests/test_vacuum/test_t2320_command_mappings.py | 13 +++++++------ 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/custom_components/robovac/vacuums/T2320.py b/custom_components/robovac/vacuums/T2320.py index 8e225fd..3744fea 100644 --- a/custom_components/robovac/vacuums/T2320.py +++ b/custom_components/robovac/vacuums/T2320.py @@ -27,7 +27,7 @@ class T2320(RobovacModelDetails): RobovacCommand.START_PAUSE: { "code": 152, # Same as MODE, uses protobuf-encoded values like T2267 "values": { - "pause": "AggN", # Protobuf: ModeCtrlRequest.Method.PAUSE_TASK + "pause": "AggN", # Protobuf: ModeCtrlRequest.Method.PAUSE_TASK "resume": "AggO", # Protobuf: ModeCtrlRequest.Method.RESUME_TASK }, }, @@ -35,14 +35,14 @@ class T2320(RobovacModelDetails): "code": 152, "values": { "auto": "BBoCCAE=", # Protobuf: ModeCtrlRequest.Method.START_AUTO_CLEAN - "pause": "AggN", # Protobuf: ModeCtrlRequest.Method.PAUSE_TASK - "return": "AggG", # Protobuf: ModeCtrlRequest.Method.START_GOHOME + "pause": "AggN", # Protobuf: ModeCtrlRequest.Method.PAUSE_TASK + "return": "AggG", # Protobuf: ModeCtrlRequest.Method.START_GOHOME "small_room": "small_room", "single_room": "single_room", }, }, RobovacCommand.STATUS: { - "code": 173, + "code": 177, # Same as T2267 "values": { # Protobuf-encoded status values (similar to T2080/T2267) # Cleaning states @@ -139,6 +139,9 @@ class T2320(RobovacModelDetails): RobovacCommand.CLEANING_AREA: { "code": 7, }, + RobovacCommand.ERROR: { + "code": 177, + }, } activity_mapping = { @@ -181,6 +184,7 @@ class T2320(RobovacModelDetails): # Positioning codes: start with "DA" (0c08), end with "FSAA==" (5200) # The middle bytes contain a timestamp that changes with each update ("DA", "FSAA==", "Positioning"), + ("Dw", "BSAA==", "Washing Mop"), ] # Patterns for ERROR codes - some devices send status messages on the ERROR DPS @@ -188,4 +192,5 @@ class T2320(RobovacModelDetails): error_patterns = [ # Positioning/relocating status sent on ERROR DPS - not an actual error ("DA", "FSAA==", "no_error"), + ("Dw", "BSAA==", "no_error"), ] diff --git a/tests/test_vacuum/test_dps_command_mapping.py b/tests/test_vacuum/test_dps_command_mapping.py index ce7b79f..dfce6b0 100644 --- a/tests/test_vacuum/test_dps_command_mapping.py +++ b/tests/test_vacuum/test_dps_command_mapping.py @@ -124,7 +124,7 @@ def test_getDpsCodes_extraction_method() -> None: # Verify T2320 has different codes too assert "STATUS" in t2320_dps_codes - assert t2320_dps_codes["STATUS"] == "173" # Non-default code + assert t2320_dps_codes["STATUS"] == "153" # Same as T2267, non-default code assert t2320_dps_codes["STATUS"] != TuyaCodes.STATUS assert "BATTERY_LEVEL" in t2320_dps_codes assert t2320_dps_codes["BATTERY_LEVEL"] == "172" # Non-default code diff --git a/tests/test_vacuum/test_t2320_command_mappings.py b/tests/test_vacuum/test_t2320_command_mappings.py index 2032ff8..5cfb89e 100644 --- a/tests/test_vacuum/test_t2320_command_mappings.py +++ b/tests/test_vacuum/test_t2320_command_mappings.py @@ -24,10 +24,10 @@ class TestT2320CommandMappings: """Test T2320 command mappings match debug log expectations.""" def test_return_home_command_value(self, t2320_robovac): - """Test RETURN_HOME command returns boolean true as seen in debug logs.""" - # Debug log shows: "dps": {"153": true} - result = t2320_robovac.getRoboVacCommandValue(RobovacCommand.RETURN_HOME, "return_home") - assert result is True or result == "True" or result == "true" + """Test RETURN_HOME command returns protobuf-encoded value like T2267.""" + # T2320 uses same protobuf encoding as T2267 for return home + result = t2320_robovac.getRoboVacCommandValue(RobovacCommand.RETURN_HOME, "return") + assert result == "AggG" # Protobuf: ModeCtrlRequest.Method.START_GOHOME def test_start_pause_command_exists(self, t2320_robovac): """Test START_PAUSE command is defined for T2320.""" @@ -63,12 +63,13 @@ def test_fan_speed_command_has_multiple_options(self, t2320_robovac): def test_dps_codes_mapping(self, t2320_robovac): """Test DPS codes match expected values.""" dps_codes = t2320_robovac.getDpsCodes() - assert dps_codes.get("RETURN_HOME") == "153" + assert dps_codes.get("RETURN_HOME") == "152" # Same as MODE, uses protobuf like T2267 assert dps_codes.get("START_PAUSE") == "152" # Same as MODE, uses protobuf like T2267 assert dps_codes.get("MODE") == "152" + assert dps_codes.get("STOP") == "152" # Same as MODE, uses protobuf like T2267 assert dps_codes.get("FAN_SPEED") == "154" assert dps_codes.get("LOCATE") == "160" # Fixed: was 153 (conflict with RETURN_HOME) - assert dps_codes.get("STATUS") == "173" + assert dps_codes.get("STATUS") == "153" # Same as T2267 assert dps_codes.get("BATTERY_LEVEL") == "172" assert dps_codes.get("ERROR_CODE") == "169" From 96cb532b48491c198e38f9ad6710b4e512fc69a2 Mon Sep 17 00:00:00 2001 From: Jonathan Thompson Date: Sat, 24 Jan 2026 11:48:20 +0000 Subject: [PATCH 18/25] claude updating itself --- CLAUDE.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index a582148..90c095c 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -70,7 +70,7 @@ Device responses use case-insensitive matching - "AUTO", "auto", "Auto" all reso ## Proto Reference (Reference Only) -The `proto-reference/` directory contains Protocol Buffer definitions that document the communication protocol used by newer Eufy vacuums. **This is reference material only and is not part of the Home Assistant integration.** +The `proto-reference/` directory contains Protocol Buffer definitions that document the communication protocol used by newer Eufy vacuums. **This is reference material only and is not part of the Home Assistant integration.** The proto-reference is more accurate than the Home Assistant integration. Key proto files: @@ -82,7 +82,7 @@ Key proto files: - **`consumable.proto`**: Part wear tracking (brushes, filters, mop, dust bag in hours) - **`error_code.proto`**: Error/warning reporting with obstacle detection (e.g., poop detection) -These protos use the `proto.cloud` package and include Chinese comments from original development. The generated `*_pb2.py` files are Python protobuf outputs. Coordinates use centimeters (meters × 100). +These protos use the `proto.cloud` package and include Chinese comments from original development, followed by english translation within square brackets. The generated `*_pb2.py` files are Python protobuf outputs. Coordinates use centimeters (meters × 100). ## Adding a New Vacuum Model From 30892c869e4bf9c8caadbc7dceac9fa6b66edb97 Mon Sep 17 00:00:00 2001 From: Jonathan Thompson Date: Sat, 24 Jan 2026 22:05:38 +0000 Subject: [PATCH 19/25] Removing proto-reference folder. This was taken from https://github.com/jeppesens/eufy-clean/tree/main/custom_components/robovac_mqtt/proto/cloud removing it from this repo. Doesn't need to be tracked, I will keep it local. --- proto-reference/alarm.proto | 27 -- proto-reference/alarm_pb2.py | 28 -- proto-reference/alarm_pb2.pyi | 35 -- proto-reference/analysis.proto | 196 -------- proto-reference/analysis_pb2.py | 65 --- proto-reference/analysis_pb2.pyi | 220 --------- proto-reference/app_device_info.proto | 54 --- proto-reference/app_device_info_pb2.py | 34 -- proto-reference/app_device_info_pb2.pyi | 72 --- proto-reference/ble.proto | 134 ------ proto-reference/ble_pb2.py | 57 --- proto-reference/ble_pb2.pyi | 172 ------- proto-reference/clean_param.proto | 94 ---- proto-reference/clean_param_pb2.py | 54 --- proto-reference/clean_param_pb2.pyi | 124 ----- proto-reference/clean_record.proto | 135 ------ proto-reference/clean_record_pb2.py | 49 -- proto-reference/clean_record_pb2.pyi | 143 ------ proto-reference/clean_record_wrap.proto | 14 - proto-reference/clean_record_wrap_pb2.py | 25 -- proto-reference/clean_record_wrap_pb2.pyi | 15 - proto-reference/clean_statistics.proto | 24 - proto-reference/clean_statistics_pb2.py | 29 -- proto-reference/clean_statistics_pb2.pyi | 31 -- proto-reference/common.proto | 80 ---- proto-reference/common_pb2.py | 51 --- proto-reference/common_pb2.pyi | 108 ----- proto-reference/consumable.proto | 45 -- proto-reference/consumable_pb2.py | 33 -- proto-reference/consumable_pb2.pyi | 59 --- proto-reference/control.proto | 197 -------- proto-reference/control_pb2.py | 74 --- proto-reference/control_pb2.pyi | 260 ----------- proto-reference/debug.proto | 45 -- proto-reference/debug_pb2.py | 36 -- proto-reference/debug_pb2.pyi | 61 --- proto-reference/error_code.proto | 55 --- .../error_code_list_standard.proto | 189 -------- .../error_code_list_standard_pb2.py | 27 -- .../error_code_list_standard_pb2.pyi | 178 -------- proto-reference/error_code_list_t2080.proto | 107 ----- proto-reference/error_code_list_t2080_pb2.py | 27 -- proto-reference/error_code_list_t2080_pb2.pyi | 103 ----- proto-reference/error_code_list_t2265.proto | 86 ---- proto-reference/error_code_list_t2265_pb2.py | 27 -- proto-reference/error_code_list_t2265_pb2.pyi | 75 ---- proto-reference/error_code_list_t2320.proto | 85 ---- proto-reference/error_code_list_t2320_pb2.py | 27 -- proto-reference/error_code_list_t2320_pb2.pyi | 81 ---- proto-reference/error_code_pb2.py | 38 -- proto-reference/error_code_pb2.pyi | 76 ---- proto-reference/keepalive.proto | 13 - proto-reference/keepalive_pb2.py | 25 -- proto-reference/keepalive_pb2.pyi | 13 - proto-reference/language.proto | 40 -- proto-reference/language_pb2.py | 35 -- proto-reference/language_pb2.pyi | 56 --- proto-reference/map_edit.proto | 136 ------ proto-reference/map_edit_pb2.py | 67 --- proto-reference/map_edit_pb2.pyi | 184 -------- proto-reference/map_manage.proto | 50 --- proto-reference/map_manage_pb2.py | 31 -- proto-reference/map_manage_pb2.pyi | 49 -- proto-reference/media_manager.proto | 116 ----- proto-reference/media_manager_pb2.py | 59 --- proto-reference/media_manager_pb2.pyi | 147 ------ proto-reference/misc.proto | 19 - proto-reference/misc_pb2.py | 30 -- proto-reference/misc_pb2.pyi | 29 -- proto-reference/multi_maps.proto | 70 --- proto-reference/multi_maps_pb2.py | 41 -- proto-reference/multi_maps_pb2.pyi | 82 ---- proto-reference/p2pdata.proto | 152 ------- proto-reference/p2pdata_pb2.py | 43 -- proto-reference/p2pdata_pb2.pyi | 135 ------ proto-reference/scene.proto | 145 ------ proto-reference/scene_pb2.py | 67 --- proto-reference/scene_pb2.pyi | 179 -------- proto-reference/socket.proto | 41 -- proto-reference/socket_pb2.py | 32 -- proto-reference/socket_pb2.pyi | 44 -- proto-reference/station.proto | 190 -------- proto-reference/station_pb2.py | 80 ---- proto-reference/station_pb2.pyi | 242 ---------- proto-reference/stream.proto | 423 ------------------ proto-reference/stream_pb2.py | 96 ---- proto-reference/stream_pb2.pyi | 380 ---------------- proto-reference/stream_wrap.proto | 20 - proto-reference/stream_wrap_pb2.py | 28 -- proto-reference/stream_wrap_pb2.pyi | 25 -- proto-reference/timing.proto | 185 -------- proto-reference/timing_pb2.py | 78 ---- proto-reference/timing_pb2.pyi | 241 ---------- proto-reference/undisturbed.proto | 29 -- proto-reference/undisturbed_pb2.py | 32 -- proto-reference/undisturbed_pb2.pyi | 42 -- proto-reference/unisetting.proto | 106 ----- proto-reference/unisetting_pb2.py | 52 --- proto-reference/unisetting_pb2.pyi | 159 ------- proto-reference/universal_data.proto | 27 -- proto-reference/universal_data_pb2.py | 32 -- proto-reference/universal_data_pb2.pyi | 39 -- proto-reference/upgrade.proto | 34 -- proto-reference/upgrade_pb2.py | 31 -- proto-reference/upgrade_pb2.pyi | 38 -- proto-reference/version.proto | 87 ---- proto-reference/version_pb2.py | 45 -- proto-reference/version_pb2.pyi | 70 --- proto-reference/work_status.proto | 252 ----------- proto-reference/work_status_pb2.py | 111 ----- proto-reference/work_status_pb2.pyi | 287 ------------ 111 files changed, 9652 deletions(-) delete mode 100644 proto-reference/alarm.proto delete mode 100644 proto-reference/alarm_pb2.py delete mode 100644 proto-reference/alarm_pb2.pyi delete mode 100644 proto-reference/analysis.proto delete mode 100644 proto-reference/analysis_pb2.py delete mode 100644 proto-reference/analysis_pb2.pyi delete mode 100644 proto-reference/app_device_info.proto delete mode 100644 proto-reference/app_device_info_pb2.py delete mode 100644 proto-reference/app_device_info_pb2.pyi delete mode 100644 proto-reference/ble.proto delete mode 100644 proto-reference/ble_pb2.py delete mode 100644 proto-reference/ble_pb2.pyi delete mode 100644 proto-reference/clean_param.proto delete mode 100644 proto-reference/clean_param_pb2.py delete mode 100644 proto-reference/clean_param_pb2.pyi delete mode 100644 proto-reference/clean_record.proto delete mode 100644 proto-reference/clean_record_pb2.py delete mode 100644 proto-reference/clean_record_pb2.pyi delete mode 100644 proto-reference/clean_record_wrap.proto delete mode 100644 proto-reference/clean_record_wrap_pb2.py delete mode 100644 proto-reference/clean_record_wrap_pb2.pyi delete mode 100644 proto-reference/clean_statistics.proto delete mode 100644 proto-reference/clean_statistics_pb2.py delete mode 100644 proto-reference/clean_statistics_pb2.pyi delete mode 100644 proto-reference/common.proto delete mode 100644 proto-reference/common_pb2.py delete mode 100644 proto-reference/common_pb2.pyi delete mode 100644 proto-reference/consumable.proto delete mode 100644 proto-reference/consumable_pb2.py delete mode 100644 proto-reference/consumable_pb2.pyi delete mode 100644 proto-reference/control.proto delete mode 100644 proto-reference/control_pb2.py delete mode 100644 proto-reference/control_pb2.pyi delete mode 100644 proto-reference/debug.proto delete mode 100644 proto-reference/debug_pb2.py delete mode 100644 proto-reference/debug_pb2.pyi delete mode 100644 proto-reference/error_code.proto delete mode 100644 proto-reference/error_code_list_standard.proto delete mode 100644 proto-reference/error_code_list_standard_pb2.py delete mode 100644 proto-reference/error_code_list_standard_pb2.pyi delete mode 100644 proto-reference/error_code_list_t2080.proto delete mode 100644 proto-reference/error_code_list_t2080_pb2.py delete mode 100644 proto-reference/error_code_list_t2080_pb2.pyi delete mode 100644 proto-reference/error_code_list_t2265.proto delete mode 100644 proto-reference/error_code_list_t2265_pb2.py delete mode 100644 proto-reference/error_code_list_t2265_pb2.pyi delete mode 100644 proto-reference/error_code_list_t2320.proto delete mode 100644 proto-reference/error_code_list_t2320_pb2.py delete mode 100644 proto-reference/error_code_list_t2320_pb2.pyi delete mode 100644 proto-reference/error_code_pb2.py delete mode 100644 proto-reference/error_code_pb2.pyi delete mode 100644 proto-reference/keepalive.proto delete mode 100644 proto-reference/keepalive_pb2.py delete mode 100644 proto-reference/keepalive_pb2.pyi delete mode 100644 proto-reference/language.proto delete mode 100644 proto-reference/language_pb2.py delete mode 100644 proto-reference/language_pb2.pyi delete mode 100644 proto-reference/map_edit.proto delete mode 100644 proto-reference/map_edit_pb2.py delete mode 100644 proto-reference/map_edit_pb2.pyi delete mode 100644 proto-reference/map_manage.proto delete mode 100644 proto-reference/map_manage_pb2.py delete mode 100644 proto-reference/map_manage_pb2.pyi delete mode 100644 proto-reference/media_manager.proto delete mode 100644 proto-reference/media_manager_pb2.py delete mode 100644 proto-reference/media_manager_pb2.pyi delete mode 100644 proto-reference/misc.proto delete mode 100644 proto-reference/misc_pb2.py delete mode 100644 proto-reference/misc_pb2.pyi delete mode 100644 proto-reference/multi_maps.proto delete mode 100644 proto-reference/multi_maps_pb2.py delete mode 100644 proto-reference/multi_maps_pb2.pyi delete mode 100644 proto-reference/p2pdata.proto delete mode 100644 proto-reference/p2pdata_pb2.py delete mode 100644 proto-reference/p2pdata_pb2.pyi delete mode 100644 proto-reference/scene.proto delete mode 100644 proto-reference/scene_pb2.py delete mode 100644 proto-reference/scene_pb2.pyi delete mode 100644 proto-reference/socket.proto delete mode 100644 proto-reference/socket_pb2.py delete mode 100644 proto-reference/socket_pb2.pyi delete mode 100644 proto-reference/station.proto delete mode 100644 proto-reference/station_pb2.py delete mode 100644 proto-reference/station_pb2.pyi delete mode 100644 proto-reference/stream.proto delete mode 100644 proto-reference/stream_pb2.py delete mode 100644 proto-reference/stream_pb2.pyi delete mode 100644 proto-reference/stream_wrap.proto delete mode 100644 proto-reference/stream_wrap_pb2.py delete mode 100644 proto-reference/stream_wrap_pb2.pyi delete mode 100644 proto-reference/timing.proto delete mode 100644 proto-reference/timing_pb2.py delete mode 100644 proto-reference/timing_pb2.pyi delete mode 100644 proto-reference/undisturbed.proto delete mode 100644 proto-reference/undisturbed_pb2.py delete mode 100644 proto-reference/undisturbed_pb2.pyi delete mode 100644 proto-reference/unisetting.proto delete mode 100644 proto-reference/unisetting_pb2.py delete mode 100644 proto-reference/unisetting_pb2.pyi delete mode 100644 proto-reference/universal_data.proto delete mode 100644 proto-reference/universal_data_pb2.py delete mode 100644 proto-reference/universal_data_pb2.pyi delete mode 100644 proto-reference/upgrade.proto delete mode 100644 proto-reference/upgrade_pb2.py delete mode 100644 proto-reference/upgrade_pb2.pyi delete mode 100644 proto-reference/version.proto delete mode 100644 proto-reference/version_pb2.py delete mode 100644 proto-reference/version_pb2.pyi delete mode 100644 proto-reference/work_status.proto delete mode 100644 proto-reference/work_status_pb2.py delete mode 100644 proto-reference/work_status_pb2.pyi diff --git a/proto-reference/alarm.proto b/proto-reference/alarm.proto deleted file mode 100644 index 7adcf4c..0000000 --- a/proto-reference/alarm.proto +++ /dev/null @@ -1,27 +0,0 @@ -syntax = "proto2"; -package alarm.message; - -option java_package = "com.eufylife.smarthome.protobuftool"; -option java_outer_classname = "AlarmInfo"; -/*VER0.1*/ -/*author : bruce.yin@oceanwing.com*/ - - - -message Alarm { - required uint32 hours = 1;//range 0~23 - required uint32 minutes = 2;//range 0~59 - required bool repetition = 3;//1-enable weekly repetition 0-execute only once When only once, week_info can only have one valid BIT - required uint32 week_info = 4;//Monday to Sunday occupy BIT0-BIT6 in sequence, BIT7 is reserved as 0 -} - - -message SyncTime { - required uint32 year = 1;//example :2017 - required uint32 month = 2;//range 1~12 - required uint32 day = 3;//rang 1~31 - required uint32 weekday = 4;//rang 1~7 - required uint32 hours = 5;//range 0~23 - required uint32 minutes = 6;//range 0~59 - required uint32 seconds = 7;//range 0~59 -} \ No newline at end of file diff --git a/proto-reference/alarm_pb2.py b/proto-reference/alarm_pb2.py deleted file mode 100644 index c5646d0..0000000 --- a/proto-reference/alarm_pb2.py +++ /dev/null @@ -1,28 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: proto/cloud/alarm.proto -"""Generated protocol buffer code.""" -from google.protobuf.internal import builder as _builder -from google.protobuf import descriptor as _descriptor -from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import symbol_database as _symbol_database -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - - - -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x17proto/cloud/alarm.proto\x12\ralarm.message\"N\n\x05\x41larm\x12\r\n\x05hours\x18\x01 \x02(\r\x12\x0f\n\x07minutes\x18\x02 \x02(\r\x12\x12\n\nrepetition\x18\x03 \x02(\x08\x12\x11\n\tweek_info\x18\x04 \x02(\r\"v\n\x08SyncTime\x12\x0c\n\x04year\x18\x01 \x02(\r\x12\r\n\x05month\x18\x02 \x02(\r\x12\x0b\n\x03\x64\x61y\x18\x03 \x02(\r\x12\x0f\n\x07weekday\x18\x04 \x02(\r\x12\r\n\x05hours\x18\x05 \x02(\r\x12\x0f\n\x07minutes\x18\x06 \x02(\r\x12\x0f\n\x07seconds\x18\x07 \x02(\rB0\n#com.eufylife.smarthome.protobuftoolB\tAlarmInfo') - -_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'proto.cloud.alarm_pb2', globals()) -if _descriptor._USE_C_DESCRIPTORS == False: - - DESCRIPTOR._options = None - DESCRIPTOR._serialized_options = b'\n#com.eufylife.smarthome.protobuftoolB\tAlarmInfo' - _ALARM._serialized_start=42 - _ALARM._serialized_end=120 - _SYNCTIME._serialized_start=122 - _SYNCTIME._serialized_end=240 -# @@protoc_insertion_point(module_scope) diff --git a/proto-reference/alarm_pb2.pyi b/proto-reference/alarm_pb2.pyi deleted file mode 100644 index 5ea495f..0000000 --- a/proto-reference/alarm_pb2.pyi +++ /dev/null @@ -1,35 +0,0 @@ -from google.protobuf import descriptor as _descriptor -from google.protobuf import message as _message -from typing import ClassVar as _ClassVar, Optional as _Optional - -DESCRIPTOR: _descriptor.FileDescriptor - -class Alarm(_message.Message): - __slots__ = ["hours", "minutes", "repetition", "week_info"] - HOURS_FIELD_NUMBER: _ClassVar[int] - MINUTES_FIELD_NUMBER: _ClassVar[int] - REPETITION_FIELD_NUMBER: _ClassVar[int] - WEEK_INFO_FIELD_NUMBER: _ClassVar[int] - hours: int - minutes: int - repetition: bool - week_info: int - def __init__(self, hours: _Optional[int] = ..., minutes: _Optional[int] = ..., repetition: bool = ..., week_info: _Optional[int] = ...) -> None: ... - -class SyncTime(_message.Message): - __slots__ = ["day", "hours", "minutes", "month", "seconds", "weekday", "year"] - DAY_FIELD_NUMBER: _ClassVar[int] - HOURS_FIELD_NUMBER: _ClassVar[int] - MINUTES_FIELD_NUMBER: _ClassVar[int] - MONTH_FIELD_NUMBER: _ClassVar[int] - SECONDS_FIELD_NUMBER: _ClassVar[int] - WEEKDAY_FIELD_NUMBER: _ClassVar[int] - YEAR_FIELD_NUMBER: _ClassVar[int] - day: int - hours: int - minutes: int - month: int - seconds: int - weekday: int - year: int - def __init__(self, year: _Optional[int] = ..., month: _Optional[int] = ..., day: _Optional[int] = ..., weekday: _Optional[int] = ..., hours: _Optional[int] = ..., minutes: _Optional[int] = ..., seconds: _Optional[int] = ...) -> None: ... diff --git a/proto-reference/analysis.proto b/proto-reference/analysis.proto deleted file mode 100644 index 5f104b5..0000000 --- a/proto-reference/analysis.proto +++ /dev/null @@ -1,196 +0,0 @@ -syntax = "proto3"; - -// option optimize_for = LITE_RUNTIME; - -package proto.cloud; - -message AnalysisRequest { -} - -message AnalysisInternalStatus { - string robotapp_state = 1; - string motion_state = 2; -} - -message AnalysisStatistics { - // Cleaning record, reported at the end of cleaning (including automatic and manual intervention). - message CleanRecord { - uint32 clean_id = 1; // 清洁id,每次清洁id++,id从1开始,0为无效. [EN: Cleaning ID, increments with each cleaning, starts from 1, 0 is invalid.] - - bool result = 2; // 清洁结果,true - 成功,反之失败 [EN: Cleaning result, true - success, otherwise failure] - - enum FailCode { - UNKNOW = 0; // 未知原因,下面原因都不是 [EN: Unknown reason, none of the reasons below] - - /** - 清洁过程机器原因触发异常导致停机,用户介入恢复清洁并成功后也判断为清洁失败; [EN: Machine-triggered exception during cleaning causing shutdown; even if user intervenes to resume and complete cleaning, it's still considered a failure;] - 下面情况也算: [EN: The following situations also count:] - 脱困失败; [EN: Escape failure;] - 断点续扫回充失败; [EN: Resume cleaning return-to-charge failure;] - 回洗失败; [EN: Return-to-wash failure;] - */ - ROBOT_FAULT = 1; - - /** - 不受机器控制的报警,比如水箱满、托盘不在位等 [EN: Alarms not controlled by the machine, such as water tank full, tray not in position, etc.] - */ - ROBOT_ALERT = 2; - - /** - 用户干预,比如清洁中暂停按回充(或直接搬到基站上)、清洁中切换模式等 [EN: User intervention, such as pausing during cleaning and pressing return-to-charge (or moving directly to the station), switching modes during cleaning, etc.] - */ - MANUAL_BREAK = 3; - } - FailCode fail_code = 3; // 失败原因,当 result == false 有效 [EN: Failure reason, valid when result == false] - - enum Mode { - AUTO_CLEAN = 0; // 全局自动清洁 [EN: Global automatic cleaning] - SELECT_ROOMS_CLEAN = 1; // 选房清洁 [EN: Selected rooms cleaning] - SELECT_ZONES_CLEAN = 2; // 选区清洁 [EN: Selected zones cleaning] - SPOT_CLEAN = 3; // 定点清洁 [EN: Spot cleaning] - FAST_MAPPING = 4; // 快速建图 [EN: Fast mapping] - } - Mode mode = 4; - - enum Type { - SWEEP_ONLY = 0; - MOP_ONLY = 1; - SWEEP_AND_MOP = 2; - } - Type type = 5; - - uint64 start_time = 6; // 清洁开始时间,单位s,不带时区 [EN: Cleaning start time, unit: seconds, without timezone] - uint64 end_time = 7; // 清洁结束时间,单位s,不带时区 [EN: Cleaning end time, unit: seconds, without timezone] - uint32 clean_time = 8; // 清洁时间,去除断点回充/回洗、暂停时间,不包括回充导航和上座, 单位s [EN: Cleaning duration, excluding resume charging/washing and pause time, not including return-to-charge navigation and docking, unit: seconds] - uint32 clean_area = 9; // 清洁面积,清洁过的栅格面积,单位 m2 [EN: Cleaning area, grid area cleaned, unit: m2] - uint32 slam_area = 10; // slam建图面积,不包括障碍物面积,单位 m2 [EN: SLAM mapping area, excluding obstacle area, unit: m2] - uint32 map_id = 11; // 当前清洁地图的id [EN: Current cleaning map ID] - uint32 room_count = 12; // 当前清洁地图中房间总数 [EN: Total number of rooms in current cleaning map] - - message RollBrush { - // 单次清扫地毯过流次数,特指机器为了在长毛地毯上能正常清扫(没有卡住异物),采取的保护电机策略, [EN: Single sweep carpet overcurrent count, specifically refers to the motor protection strategy adopted by the machine to sweep normally on long-pile carpet (without getting stuck on foreign objects),] - // 例如 L60 长毛地毯电流在 800mA-1100mA之间采取开1s停2s策略. [EN: for example, L60 adopts a 1s on, 2s off strategy when long-pile carpet current is between 800mA-1100mA.] - uint32 protect_count = 1; - - // 单次清扫堵转过流次数,堵转后机器采取类似开1s停3s策略. [EN: Single sweep stall overcurrent count, after stall the machine adopts a strategy similar to 1s on, 3s off.] - uint32 stalled_count = 2; - } - RollBrush roll_brush = 13; // 单次清扫过程滚刷停转的次数 [EN: Number of times the roller brush stopped during a single sweep] - } - CleanRecord clean = 1; - - // 回充记录,回充上座完成或回充失败时上报 [EN: Return-to-charge record, reported when return-to-charge docking is complete or failed] - message GoHomeRecord { - uint32 clean_id = 1; // 清洁id, 清洁后回充与CleanRecord中的clean_id相同,无清洁的回充设置为0 [EN: Cleaning ID, same as clean_id in CleanRecord for return-to-charge after cleaning, set to 0 for return-to-charge without cleaning] - bool result = 2; // 回充结果,true - 成功,反之失败 [EN: Return-to-charge result, true - success, otherwise failure] - - enum FailCode { - UNKNOW = 0; // 未知,以下原因都不是. [EN: Unknown, none of the following reasons.] - MANUAL_BREAK = 1; // 人工手动停止 [EN: Manual stop by user] - NAVIGATE_FAIL = 2; // 导航到充电座附件失败 [EN: Navigation to charging dock vicinity failed] - ENTER_HOME_FAIL = 3; // 上座失败 [EN: Docking failed] - } - FailCode fail_code = 3; // 失败原因,当 result == false 有效 [EN: Failure reason, valid when result == false] - - uint64 power_level = 4; // 开始回充的电量百分比,0 - 100 [EN: Battery percentage when starting return-to-charge, 0 - 100] - uint64 start_time = 5; // 回充开始时间,单位s,不带时区 [EN: Return-to-charge start time, unit: seconds, without timezone] - uint64 end_time = 6; // 回充结束时间,单位s,不带时区 [EN: Return-to-charge end time, unit: seconds, without timezone] - } - GoHomeRecord gohome = 2; - - // 重定位记录,重定位成功或失败时上报 [EN: Relocalization record, reported when relocalization succeeds or fails] - message RelocateRecord { - uint32 clean_id = 1; // 清洁id, 清洁后回充与CleanRecord中的clean_id相同 [EN: Cleaning ID, same as clean_id in CleanRecord for return-to-charge after cleaning] - bool result = 2; // 重定位结果,true - 成功,反之失败 [EN: Relocalization result, true - success, otherwise failure] - uint32 map_count = 3; // 当前地图数量 [EN: Current map count] - uint64 start_time = 4; // 重定位开始时间,单位s,不带时区 [EN: Relocalization start time, unit: seconds, without timezone] - uint64 end_time = 5; // 重定位结束时间,单位s,不带时区 [EN: Relocalization end time, unit: seconds, without timezone] - } - RelocateRecord relocate = 3; - - // 集尘记录,集尘完成或失败时上报 [EN: Dust collection record, reported when dust collection completes or fails] - message CollectRecord { - uint32 clean_id = 1; // 清洁id, 清洁后回充与CleanRecord中的clean_id相同 [EN: Cleaning ID, same as clean_id in CleanRecord for return-to-charge after cleaning] - bool result = 2; // 集尘结果,true - 成功,反之失败 [EN: Dust collection result, true - success, otherwise failure] - uint64 start_time = 3; // 集尘开始时间,单位s,不带时区 [EN: Dust collection start time, unit: seconds, without timezone] - } - CollectRecord collect = 4; - - // 控制事件 [EN: Control event] - message ControlEvent { - uint32 clean_id = 1; // 清洁id, 清洁后回充与CleanRecord中的clean_id相同,无清洁的回充设置为0 [EN: Cleaning ID, same as clean_id in CleanRecord for return-to-charge after cleaning, set to 0 for return-to-charge without cleaning] - - enum Type { - AUTO_CLEAN = 0; // 自动清洁 [EN: Automatic cleaning] - SPOT_CLEAN = 1; // 定点清洁 [EN: Spot cleaning] - GOHOME = 2; // 回充 [EN: Return to charge] - CLEAN_PAUSE = 3; // 清洁(包括自动清洁、选房、选区、定点)暂停 [EN: Cleaning pause (including automatic cleaning, room selection, zone selection, spot)] - CLEAN_RESUME = 4; // 清洁(包括自动清洁、选房、选区、定点)恢复 [EN: Cleaning resume (including automatic cleaning, room selection, zone selection, spot)] - } - Type type = 2; - - enum Source { - KEY = 0; // 机身按键 [EN: Device button] - APP = 1; // APP控制 [EN: APP control] - TIMER = 2; // 预约定时 [EN: Scheduled timer] - } - Source source = 3; - - uint64 timestamp = 4; // 时间戳,单位s,不带时区 [EN: Timestamp, unit: seconds, without timezone] - } - ControlEvent ctrl_event = 5; - - // 配网事件 [EN: Network configuration event] - message DistributeEvent { - message TimeStamp { - uint64 value = 1; // 时间戳,单位s,不带时区 [EN: Timestamp, unit: seconds, without timezone] - } - TimeStamp timestamp = 1; // 配网结束时间,仅配网成功有这个字段 [EN: Network configuration end time, only present when configuration succeeds] - - enum Mode { - AP = 0; // AP - BLE = 1; // 蓝牙 [EN: Bluetooth] - } - Mode mode = 2; - - enum Result { - E_OK = 0; // 成功 [EN: Success] - E_SRV_ERR = 1; // 服务异常(连路由器超时) [EN: Service error (router connection timeout)] - E_AP_NOT_FOUND = 2; // 没有找到 ap [EN: AP not found] - E_PASSWD_ERR = 3; // 密码错误 [EN: Password error] - E_DHCP_ERR = 4; // dhcp 错误 [EN: DHCP error] - E_GW_ERR = 5; // 网关错误 [EN: Gateway error] - E_DNS_ERR = 6; // dns 错误 [EN: DNS error] - E_NET_ERR = 7; // 网络错误 [EN: Network error] - } - Result result = 3; - - string software_version = 4; // 固件版本 [EN: Firmware version] - string sn = 7; // sn - string mac = 5; // mac 地址 [EN: MAC address] - string uuid = 6; // uuid - - string country_code = 8; // 国家地区码 https://datahub.io/core/country-list [EN: Country/region code https://datahub.io/core/country-list] - string token = 9; // token - } - DistributeEvent distribute_event = 6; - - // 电池信息 [EN: Battery information] - message BatteryInfo { - uint64 update_time = 1; // 更新时间,单位s,不带时区 [EN: Update time, unit: seconds, without timezone] - uint32 show_level = 2; // 显示电量百分比,0 - 100 [EN: Display battery percentage, 0 - 100] - uint32 real_level = 3; // 真实电量百分比,0 - 100 [EN: Actual battery percentage, 0 - 100] - uint32 voltage = 4; // 电压,单位mV [EN: Voltage, unit: mV] - sint32 current = 5; // 电流,单位mA [EN: Current, unit: mA] - repeated sint32 temperature = 6; // 温度,单位0.1摄氏度(支持单个或多个电池) [EN: Temperature, unit: 0.1 degrees Celsius (supports single or multiple batteries)] - } - BatteryInfo battery_info = 7; -} - -message AnalysisResponse { - // 机器人内部状态信息,不做缓存,变化比较频繁时将只上传最后的状态 [EN: Robot internal status information, not cached, will only upload the last status when changes are frequent] - AnalysisInternalStatus internal_status = 1; - - // 数据分析信息,做缓存,保证数据不丢失 [EN: Data analysis information, cached to ensure data is not lost] - AnalysisStatistics statistics = 2; -} diff --git a/proto-reference/analysis_pb2.py b/proto-reference/analysis_pb2.py deleted file mode 100644 index 27807ac..0000000 --- a/proto-reference/analysis_pb2.py +++ /dev/null @@ -1,65 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: proto/cloud/analysis.proto -"""Generated protocol buffer code.""" -from google.protobuf.internal import builder as _builder -from google.protobuf import descriptor as _descriptor -from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import symbol_database as _symbol_database -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - - - -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1aproto/cloud/analysis.proto\x12\x0bproto.cloud\"\x11\n\x0f\x41nalysisRequest\"F\n\x16\x41nalysisInternalStatus\x12\x16\n\x0erobotapp_state\x18\x01 \x01(\t\x12\x14\n\x0cmotion_state\x18\x02 \x01(\t\"\xe0\x14\n\x12\x41nalysisStatistics\x12:\n\x05\x63lean\x18\x01 \x01(\x0b\x32+.proto.cloud.AnalysisStatistics.CleanRecord\x12<\n\x06gohome\x18\x02 \x01(\x0b\x32,.proto.cloud.AnalysisStatistics.GoHomeRecord\x12@\n\x08relocate\x18\x03 \x01(\x0b\x32..proto.cloud.AnalysisStatistics.RelocateRecord\x12>\n\x07\x63ollect\x18\x04 \x01(\x0b\x32-.proto.cloud.AnalysisStatistics.CollectRecord\x12@\n\nctrl_event\x18\x05 \x01(\x0b\x32,.proto.cloud.AnalysisStatistics.ControlEvent\x12I\n\x10\x64istribute_event\x18\x06 \x01(\x0b\x32/.proto.cloud.AnalysisStatistics.DistributeEvent\x12\x41\n\x0c\x62\x61ttery_info\x18\x07 \x01(\x0b\x32+.proto.cloud.AnalysisStatistics.BatteryInfo\x1a\xf2\x05\n\x0b\x43leanRecord\x12\x10\n\x08\x63lean_id\x18\x01 \x01(\r\x12\x0e\n\x06result\x18\x02 \x01(\x08\x12G\n\tfail_code\x18\x03 \x01(\x0e\x32\x34.proto.cloud.AnalysisStatistics.CleanRecord.FailCode\x12>\n\x04mode\x18\x04 \x01(\x0e\x32\x30.proto.cloud.AnalysisStatistics.CleanRecord.Mode\x12>\n\x04type\x18\x05 \x01(\x0e\x32\x30.proto.cloud.AnalysisStatistics.CleanRecord.Type\x12\x12\n\nstart_time\x18\x06 \x01(\x04\x12\x10\n\x08\x65nd_time\x18\x07 \x01(\x04\x12\x12\n\nclean_time\x18\x08 \x01(\r\x12\x12\n\nclean_area\x18\t \x01(\r\x12\x11\n\tslam_area\x18\n \x01(\r\x12\x0e\n\x06map_id\x18\x0b \x01(\r\x12\x12\n\nroom_count\x18\x0c \x01(\r\x12I\n\nroll_brush\x18\r \x01(\x0b\x32\x35.proto.cloud.AnalysisStatistics.CleanRecord.RollBrush\x1a\x39\n\tRollBrush\x12\x15\n\rprotect_count\x18\x01 \x01(\r\x12\x15\n\rstalled_count\x18\x02 \x01(\r\"J\n\x08\x46\x61ilCode\x12\n\n\x06UNKNOW\x10\x00\x12\x0f\n\x0bROBOT_FAULT\x10\x01\x12\x0f\n\x0bROBOT_ALERT\x10\x02\x12\x10\n\x0cMANUAL_BREAK\x10\x03\"h\n\x04Mode\x12\x0e\n\nAUTO_CLEAN\x10\x00\x12\x16\n\x12SELECT_ROOMS_CLEAN\x10\x01\x12\x16\n\x12SELECT_ZONES_CLEAN\x10\x02\x12\x0e\n\nSPOT_CLEAN\x10\x03\x12\x10\n\x0c\x46\x41ST_MAPPING\x10\x04\"7\n\x04Type\x12\x0e\n\nSWEEP_ONLY\x10\x00\x12\x0c\n\x08MOP_ONLY\x10\x01\x12\x11\n\rSWEEP_AND_MOP\x10\x02\x1a\x87\x02\n\x0cGoHomeRecord\x12\x10\n\x08\x63lean_id\x18\x01 \x01(\r\x12\x0e\n\x06result\x18\x02 \x01(\x08\x12H\n\tfail_code\x18\x03 \x01(\x0e\x32\x35.proto.cloud.AnalysisStatistics.GoHomeRecord.FailCode\x12\x13\n\x0bpower_level\x18\x04 \x01(\x04\x12\x12\n\nstart_time\x18\x05 \x01(\x04\x12\x10\n\x08\x65nd_time\x18\x06 \x01(\x04\"P\n\x08\x46\x61ilCode\x12\n\n\x06UNKNOW\x10\x00\x12\x10\n\x0cMANUAL_BREAK\x10\x01\x12\x11\n\rNAVIGATE_FAIL\x10\x02\x12\x13\n\x0f\x45NTER_HOME_FAIL\x10\x03\x1ak\n\x0eRelocateRecord\x12\x10\n\x08\x63lean_id\x18\x01 \x01(\r\x12\x0e\n\x06result\x18\x02 \x01(\x08\x12\x11\n\tmap_count\x18\x03 \x01(\r\x12\x12\n\nstart_time\x18\x04 \x01(\x04\x12\x10\n\x08\x65nd_time\x18\x05 \x01(\x04\x1a\x45\n\rCollectRecord\x12\x10\n\x08\x63lean_id\x18\x01 \x01(\r\x12\x0e\n\x06result\x18\x02 \x01(\x08\x12\x12\n\nstart_time\x18\x03 \x01(\x04\x1a\xb7\x02\n\x0c\x43ontrolEvent\x12\x10\n\x08\x63lean_id\x18\x01 \x01(\r\x12?\n\x04type\x18\x02 \x01(\x0e\x32\x31.proto.cloud.AnalysisStatistics.ControlEvent.Type\x12\x43\n\x06source\x18\x03 \x01(\x0e\x32\x33.proto.cloud.AnalysisStatistics.ControlEvent.Source\x12\x11\n\ttimestamp\x18\x04 \x01(\x04\"U\n\x04Type\x12\x0e\n\nAUTO_CLEAN\x10\x00\x12\x0e\n\nSPOT_CLEAN\x10\x01\x12\n\n\x06GOHOME\x10\x02\x12\x0f\n\x0b\x43LEAN_PAUSE\x10\x03\x12\x10\n\x0c\x43LEAN_RESUME\x10\x04\"%\n\x06Source\x12\x07\n\x03KEY\x10\x00\x12\x07\n\x03\x41PP\x10\x01\x12\t\n\x05TIMER\x10\x02\x1a\x8c\x04\n\x0f\x44istributeEvent\x12L\n\ttimestamp\x18\x01 \x01(\x0b\x32\x39.proto.cloud.AnalysisStatistics.DistributeEvent.TimeStamp\x12\x42\n\x04mode\x18\x02 \x01(\x0e\x32\x34.proto.cloud.AnalysisStatistics.DistributeEvent.Mode\x12\x46\n\x06result\x18\x03 \x01(\x0e\x32\x36.proto.cloud.AnalysisStatistics.DistributeEvent.Result\x12\x18\n\x10software_version\x18\x04 \x01(\t\x12\n\n\x02sn\x18\x07 \x01(\t\x12\x0b\n\x03mac\x18\x05 \x01(\t\x12\x0c\n\x04uuid\x18\x06 \x01(\t\x12\x14\n\x0c\x63ountry_code\x18\x08 \x01(\t\x12\r\n\x05token\x18\t \x01(\t\x1a\x1a\n\tTimeStamp\x12\r\n\x05value\x18\x01 \x01(\x04\"\x17\n\x04Mode\x12\x06\n\x02\x41P\x10\x00\x12\x07\n\x03\x42LE\x10\x01\"\x83\x01\n\x06Result\x12\x08\n\x04\x45_OK\x10\x00\x12\r\n\tE_SRV_ERR\x10\x01\x12\x12\n\x0e\x45_AP_NOT_FOUND\x10\x02\x12\x10\n\x0c\x45_PASSWD_ERR\x10\x03\x12\x0e\n\nE_DHCP_ERR\x10\x04\x12\x0c\n\x08\x45_GW_ERR\x10\x05\x12\r\n\tE_DNS_ERR\x10\x06\x12\r\n\tE_NET_ERR\x10\x07\x1a\x81\x01\n\x0b\x42\x61tteryInfo\x12\x13\n\x0bupdate_time\x18\x01 \x01(\x04\x12\x12\n\nshow_level\x18\x02 \x01(\r\x12\x12\n\nreal_level\x18\x03 \x01(\r\x12\x0f\n\x07voltage\x18\x04 \x01(\r\x12\x0f\n\x07\x63urrent\x18\x05 \x01(\x11\x12\x13\n\x0btemperature\x18\x06 \x03(\x11\"\x85\x01\n\x10\x41nalysisResponse\x12<\n\x0finternal_status\x18\x01 \x01(\x0b\x32#.proto.cloud.AnalysisInternalStatus\x12\x33\n\nstatistics\x18\x02 \x01(\x0b\x32\x1f.proto.cloud.AnalysisStatisticsb\x06proto3') - -_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'proto.cloud.analysis_pb2', globals()) -if _descriptor._USE_C_DESCRIPTORS == False: - - DESCRIPTOR._options = None - _ANALYSISREQUEST._serialized_start=43 - _ANALYSISREQUEST._serialized_end=60 - _ANALYSISINTERNALSTATUS._serialized_start=62 - _ANALYSISINTERNALSTATUS._serialized_end=132 - _ANALYSISSTATISTICS._serialized_start=135 - _ANALYSISSTATISTICS._serialized_end=2791 - _ANALYSISSTATISTICS_CLEANRECORD._serialized_start=618 - _ANALYSISSTATISTICS_CLEANRECORD._serialized_end=1372 - _ANALYSISSTATISTICS_CLEANRECORD_ROLLBRUSH._serialized_start=1076 - _ANALYSISSTATISTICS_CLEANRECORD_ROLLBRUSH._serialized_end=1133 - _ANALYSISSTATISTICS_CLEANRECORD_FAILCODE._serialized_start=1135 - _ANALYSISSTATISTICS_CLEANRECORD_FAILCODE._serialized_end=1209 - _ANALYSISSTATISTICS_CLEANRECORD_MODE._serialized_start=1211 - _ANALYSISSTATISTICS_CLEANRECORD_MODE._serialized_end=1315 - _ANALYSISSTATISTICS_CLEANRECORD_TYPE._serialized_start=1317 - _ANALYSISSTATISTICS_CLEANRECORD_TYPE._serialized_end=1372 - _ANALYSISSTATISTICS_GOHOMERECORD._serialized_start=1375 - _ANALYSISSTATISTICS_GOHOMERECORD._serialized_end=1638 - _ANALYSISSTATISTICS_GOHOMERECORD_FAILCODE._serialized_start=1558 - _ANALYSISSTATISTICS_GOHOMERECORD_FAILCODE._serialized_end=1638 - _ANALYSISSTATISTICS_RELOCATERECORD._serialized_start=1640 - _ANALYSISSTATISTICS_RELOCATERECORD._serialized_end=1747 - _ANALYSISSTATISTICS_COLLECTRECORD._serialized_start=1749 - _ANALYSISSTATISTICS_COLLECTRECORD._serialized_end=1818 - _ANALYSISSTATISTICS_CONTROLEVENT._serialized_start=1821 - _ANALYSISSTATISTICS_CONTROLEVENT._serialized_end=2132 - _ANALYSISSTATISTICS_CONTROLEVENT_TYPE._serialized_start=2008 - _ANALYSISSTATISTICS_CONTROLEVENT_TYPE._serialized_end=2093 - _ANALYSISSTATISTICS_CONTROLEVENT_SOURCE._serialized_start=2095 - _ANALYSISSTATISTICS_CONTROLEVENT_SOURCE._serialized_end=2132 - _ANALYSISSTATISTICS_DISTRIBUTEEVENT._serialized_start=2135 - _ANALYSISSTATISTICS_DISTRIBUTEEVENT._serialized_end=2659 - _ANALYSISSTATISTICS_DISTRIBUTEEVENT_TIMESTAMP._serialized_start=2474 - _ANALYSISSTATISTICS_DISTRIBUTEEVENT_TIMESTAMP._serialized_end=2500 - _ANALYSISSTATISTICS_DISTRIBUTEEVENT_MODE._serialized_start=2502 - _ANALYSISSTATISTICS_DISTRIBUTEEVENT_MODE._serialized_end=2525 - _ANALYSISSTATISTICS_DISTRIBUTEEVENT_RESULT._serialized_start=2528 - _ANALYSISSTATISTICS_DISTRIBUTEEVENT_RESULT._serialized_end=2659 - _ANALYSISSTATISTICS_BATTERYINFO._serialized_start=2662 - _ANALYSISSTATISTICS_BATTERYINFO._serialized_end=2791 - _ANALYSISRESPONSE._serialized_start=2794 - _ANALYSISRESPONSE._serialized_end=2927 -# @@protoc_insertion_point(module_scope) diff --git a/proto-reference/analysis_pb2.pyi b/proto-reference/analysis_pb2.pyi deleted file mode 100644 index fd36dbc..0000000 --- a/proto-reference/analysis_pb2.pyi +++ /dev/null @@ -1,220 +0,0 @@ -from google.protobuf.internal import containers as _containers -from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper -from google.protobuf import descriptor as _descriptor -from google.protobuf import message as _message -from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union - -DESCRIPTOR: _descriptor.FileDescriptor - -class AnalysisInternalStatus(_message.Message): - __slots__ = ["motion_state", "robotapp_state"] - MOTION_STATE_FIELD_NUMBER: _ClassVar[int] - ROBOTAPP_STATE_FIELD_NUMBER: _ClassVar[int] - motion_state: str - robotapp_state: str - def __init__(self, robotapp_state: _Optional[str] = ..., motion_state: _Optional[str] = ...) -> None: ... - -class AnalysisRequest(_message.Message): - __slots__ = [] - def __init__(self) -> None: ... - -class AnalysisResponse(_message.Message): - __slots__ = ["internal_status", "statistics"] - INTERNAL_STATUS_FIELD_NUMBER: _ClassVar[int] - STATISTICS_FIELD_NUMBER: _ClassVar[int] - internal_status: AnalysisInternalStatus - statistics: AnalysisStatistics - def __init__(self, internal_status: _Optional[_Union[AnalysisInternalStatus, _Mapping]] = ..., statistics: _Optional[_Union[AnalysisStatistics, _Mapping]] = ...) -> None: ... - -class AnalysisStatistics(_message.Message): - __slots__ = ["battery_info", "clean", "collect", "ctrl_event", "distribute_event", "gohome", "relocate"] - class BatteryInfo(_message.Message): - __slots__ = ["current", "real_level", "show_level", "temperature", "update_time", "voltage"] - CURRENT_FIELD_NUMBER: _ClassVar[int] - REAL_LEVEL_FIELD_NUMBER: _ClassVar[int] - SHOW_LEVEL_FIELD_NUMBER: _ClassVar[int] - TEMPERATURE_FIELD_NUMBER: _ClassVar[int] - UPDATE_TIME_FIELD_NUMBER: _ClassVar[int] - VOLTAGE_FIELD_NUMBER: _ClassVar[int] - current: int - real_level: int - show_level: int - temperature: _containers.RepeatedScalarFieldContainer[int] - update_time: int - voltage: int - def __init__(self, update_time: _Optional[int] = ..., show_level: _Optional[int] = ..., real_level: _Optional[int] = ..., voltage: _Optional[int] = ..., current: _Optional[int] = ..., temperature: _Optional[_Iterable[int]] = ...) -> None: ... - class CleanRecord(_message.Message): - __slots__ = ["clean_area", "clean_id", "clean_time", "end_time", "fail_code", "map_id", "mode", "result", "roll_brush", "room_count", "slam_area", "start_time", "type"] - class FailCode(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - class Mode(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - class Type(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - class RollBrush(_message.Message): - __slots__ = ["protect_count", "stalled_count"] - PROTECT_COUNT_FIELD_NUMBER: _ClassVar[int] - STALLED_COUNT_FIELD_NUMBER: _ClassVar[int] - protect_count: int - stalled_count: int - def __init__(self, protect_count: _Optional[int] = ..., stalled_count: _Optional[int] = ...) -> None: ... - AUTO_CLEAN: AnalysisStatistics.CleanRecord.Mode - CLEAN_AREA_FIELD_NUMBER: _ClassVar[int] - CLEAN_ID_FIELD_NUMBER: _ClassVar[int] - CLEAN_TIME_FIELD_NUMBER: _ClassVar[int] - END_TIME_FIELD_NUMBER: _ClassVar[int] - FAIL_CODE_FIELD_NUMBER: _ClassVar[int] - FAST_MAPPING: AnalysisStatistics.CleanRecord.Mode - MANUAL_BREAK: AnalysisStatistics.CleanRecord.FailCode - MAP_ID_FIELD_NUMBER: _ClassVar[int] - MODE_FIELD_NUMBER: _ClassVar[int] - MOP_ONLY: AnalysisStatistics.CleanRecord.Type - RESULT_FIELD_NUMBER: _ClassVar[int] - ROBOT_ALERT: AnalysisStatistics.CleanRecord.FailCode - ROBOT_FAULT: AnalysisStatistics.CleanRecord.FailCode - ROLL_BRUSH_FIELD_NUMBER: _ClassVar[int] - ROOM_COUNT_FIELD_NUMBER: _ClassVar[int] - SELECT_ROOMS_CLEAN: AnalysisStatistics.CleanRecord.Mode - SELECT_ZONES_CLEAN: AnalysisStatistics.CleanRecord.Mode - SLAM_AREA_FIELD_NUMBER: _ClassVar[int] - SPOT_CLEAN: AnalysisStatistics.CleanRecord.Mode - START_TIME_FIELD_NUMBER: _ClassVar[int] - SWEEP_AND_MOP: AnalysisStatistics.CleanRecord.Type - SWEEP_ONLY: AnalysisStatistics.CleanRecord.Type - TYPE_FIELD_NUMBER: _ClassVar[int] - UNKNOW: AnalysisStatistics.CleanRecord.FailCode - clean_area: int - clean_id: int - clean_time: int - end_time: int - fail_code: AnalysisStatistics.CleanRecord.FailCode - map_id: int - mode: AnalysisStatistics.CleanRecord.Mode - result: bool - roll_brush: AnalysisStatistics.CleanRecord.RollBrush - room_count: int - slam_area: int - start_time: int - type: AnalysisStatistics.CleanRecord.Type - def __init__(self, clean_id: _Optional[int] = ..., result: bool = ..., fail_code: _Optional[_Union[AnalysisStatistics.CleanRecord.FailCode, str]] = ..., mode: _Optional[_Union[AnalysisStatistics.CleanRecord.Mode, str]] = ..., type: _Optional[_Union[AnalysisStatistics.CleanRecord.Type, str]] = ..., start_time: _Optional[int] = ..., end_time: _Optional[int] = ..., clean_time: _Optional[int] = ..., clean_area: _Optional[int] = ..., slam_area: _Optional[int] = ..., map_id: _Optional[int] = ..., room_count: _Optional[int] = ..., roll_brush: _Optional[_Union[AnalysisStatistics.CleanRecord.RollBrush, _Mapping]] = ...) -> None: ... - class CollectRecord(_message.Message): - __slots__ = ["clean_id", "result", "start_time"] - CLEAN_ID_FIELD_NUMBER: _ClassVar[int] - RESULT_FIELD_NUMBER: _ClassVar[int] - START_TIME_FIELD_NUMBER: _ClassVar[int] - clean_id: int - result: bool - start_time: int - def __init__(self, clean_id: _Optional[int] = ..., result: bool = ..., start_time: _Optional[int] = ...) -> None: ... - class ControlEvent(_message.Message): - __slots__ = ["clean_id", "source", "timestamp", "type"] - class Source(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - class Type(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - APP: AnalysisStatistics.ControlEvent.Source - AUTO_CLEAN: AnalysisStatistics.ControlEvent.Type - CLEAN_ID_FIELD_NUMBER: _ClassVar[int] - CLEAN_PAUSE: AnalysisStatistics.ControlEvent.Type - CLEAN_RESUME: AnalysisStatistics.ControlEvent.Type - GOHOME: AnalysisStatistics.ControlEvent.Type - KEY: AnalysisStatistics.ControlEvent.Source - SOURCE_FIELD_NUMBER: _ClassVar[int] - SPOT_CLEAN: AnalysisStatistics.ControlEvent.Type - TIMER: AnalysisStatistics.ControlEvent.Source - TIMESTAMP_FIELD_NUMBER: _ClassVar[int] - TYPE_FIELD_NUMBER: _ClassVar[int] - clean_id: int - source: AnalysisStatistics.ControlEvent.Source - timestamp: int - type: AnalysisStatistics.ControlEvent.Type - def __init__(self, clean_id: _Optional[int] = ..., type: _Optional[_Union[AnalysisStatistics.ControlEvent.Type, str]] = ..., source: _Optional[_Union[AnalysisStatistics.ControlEvent.Source, str]] = ..., timestamp: _Optional[int] = ...) -> None: ... - class DistributeEvent(_message.Message): - __slots__ = ["country_code", "mac", "mode", "result", "sn", "software_version", "timestamp", "token", "uuid"] - class Mode(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - class Result(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - class TimeStamp(_message.Message): - __slots__ = ["value"] - VALUE_FIELD_NUMBER: _ClassVar[int] - value: int - def __init__(self, value: _Optional[int] = ...) -> None: ... - AP: AnalysisStatistics.DistributeEvent.Mode - BLE: AnalysisStatistics.DistributeEvent.Mode - COUNTRY_CODE_FIELD_NUMBER: _ClassVar[int] - E_AP_NOT_FOUND: AnalysisStatistics.DistributeEvent.Result - E_DHCP_ERR: AnalysisStatistics.DistributeEvent.Result - E_DNS_ERR: AnalysisStatistics.DistributeEvent.Result - E_GW_ERR: AnalysisStatistics.DistributeEvent.Result - E_NET_ERR: AnalysisStatistics.DistributeEvent.Result - E_OK: AnalysisStatistics.DistributeEvent.Result - E_PASSWD_ERR: AnalysisStatistics.DistributeEvent.Result - E_SRV_ERR: AnalysisStatistics.DistributeEvent.Result - MAC_FIELD_NUMBER: _ClassVar[int] - MODE_FIELD_NUMBER: _ClassVar[int] - RESULT_FIELD_NUMBER: _ClassVar[int] - SN_FIELD_NUMBER: _ClassVar[int] - SOFTWARE_VERSION_FIELD_NUMBER: _ClassVar[int] - TIMESTAMP_FIELD_NUMBER: _ClassVar[int] - TOKEN_FIELD_NUMBER: _ClassVar[int] - UUID_FIELD_NUMBER: _ClassVar[int] - country_code: str - mac: str - mode: AnalysisStatistics.DistributeEvent.Mode - result: AnalysisStatistics.DistributeEvent.Result - sn: str - software_version: str - timestamp: AnalysisStatistics.DistributeEvent.TimeStamp - token: str - uuid: str - def __init__(self, timestamp: _Optional[_Union[AnalysisStatistics.DistributeEvent.TimeStamp, _Mapping]] = ..., mode: _Optional[_Union[AnalysisStatistics.DistributeEvent.Mode, str]] = ..., result: _Optional[_Union[AnalysisStatistics.DistributeEvent.Result, str]] = ..., software_version: _Optional[str] = ..., sn: _Optional[str] = ..., mac: _Optional[str] = ..., uuid: _Optional[str] = ..., country_code: _Optional[str] = ..., token: _Optional[str] = ...) -> None: ... - class GoHomeRecord(_message.Message): - __slots__ = ["clean_id", "end_time", "fail_code", "power_level", "result", "start_time"] - class FailCode(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - CLEAN_ID_FIELD_NUMBER: _ClassVar[int] - END_TIME_FIELD_NUMBER: _ClassVar[int] - ENTER_HOME_FAIL: AnalysisStatistics.GoHomeRecord.FailCode - FAIL_CODE_FIELD_NUMBER: _ClassVar[int] - MANUAL_BREAK: AnalysisStatistics.GoHomeRecord.FailCode - NAVIGATE_FAIL: AnalysisStatistics.GoHomeRecord.FailCode - POWER_LEVEL_FIELD_NUMBER: _ClassVar[int] - RESULT_FIELD_NUMBER: _ClassVar[int] - START_TIME_FIELD_NUMBER: _ClassVar[int] - UNKNOW: AnalysisStatistics.GoHomeRecord.FailCode - clean_id: int - end_time: int - fail_code: AnalysisStatistics.GoHomeRecord.FailCode - power_level: int - result: bool - start_time: int - def __init__(self, clean_id: _Optional[int] = ..., result: bool = ..., fail_code: _Optional[_Union[AnalysisStatistics.GoHomeRecord.FailCode, str]] = ..., power_level: _Optional[int] = ..., start_time: _Optional[int] = ..., end_time: _Optional[int] = ...) -> None: ... - class RelocateRecord(_message.Message): - __slots__ = ["clean_id", "end_time", "map_count", "result", "start_time"] - CLEAN_ID_FIELD_NUMBER: _ClassVar[int] - END_TIME_FIELD_NUMBER: _ClassVar[int] - MAP_COUNT_FIELD_NUMBER: _ClassVar[int] - RESULT_FIELD_NUMBER: _ClassVar[int] - START_TIME_FIELD_NUMBER: _ClassVar[int] - clean_id: int - end_time: int - map_count: int - result: bool - start_time: int - def __init__(self, clean_id: _Optional[int] = ..., result: bool = ..., map_count: _Optional[int] = ..., start_time: _Optional[int] = ..., end_time: _Optional[int] = ...) -> None: ... - BATTERY_INFO_FIELD_NUMBER: _ClassVar[int] - CLEAN_FIELD_NUMBER: _ClassVar[int] - COLLECT_FIELD_NUMBER: _ClassVar[int] - CTRL_EVENT_FIELD_NUMBER: _ClassVar[int] - DISTRIBUTE_EVENT_FIELD_NUMBER: _ClassVar[int] - GOHOME_FIELD_NUMBER: _ClassVar[int] - RELOCATE_FIELD_NUMBER: _ClassVar[int] - battery_info: AnalysisStatistics.BatteryInfo - clean: AnalysisStatistics.CleanRecord - collect: AnalysisStatistics.CollectRecord - ctrl_event: AnalysisStatistics.ControlEvent - distribute_event: AnalysisStatistics.DistributeEvent - gohome: AnalysisStatistics.GoHomeRecord - relocate: AnalysisStatistics.RelocateRecord - def __init__(self, clean: _Optional[_Union[AnalysisStatistics.CleanRecord, _Mapping]] = ..., gohome: _Optional[_Union[AnalysisStatistics.GoHomeRecord, _Mapping]] = ..., relocate: _Optional[_Union[AnalysisStatistics.RelocateRecord, _Mapping]] = ..., collect: _Optional[_Union[AnalysisStatistics.CollectRecord, _Mapping]] = ..., ctrl_event: _Optional[_Union[AnalysisStatistics.ControlEvent, _Mapping]] = ..., distribute_event: _Optional[_Union[AnalysisStatistics.DistributeEvent, _Mapping]] = ..., battery_info: _Optional[_Union[AnalysisStatistics.BatteryInfo, _Mapping]] = ...) -> None: ... diff --git a/proto-reference/app_device_info.proto b/proto-reference/app_device_info.proto deleted file mode 100644 index 2fb7df4..0000000 --- a/proto-reference/app_device_info.proto +++ /dev/null @@ -1,54 +0,0 @@ -syntax = "proto3"; - -// option optimize_for = LITE_RUNTIME; - -package proto.cloud; - -import "proto/cloud/version.proto"; - -// 手机 app 每次进入实时地图控制面板后有且仅下发一次 [EN: Mobile app sends this exactly once each time entering the real-time map control panel] -// 手机 app 主用户和分享用户都需要发送这个消息,其中 user_id 必须填主用户的 [EN: Both main user and shared user of mobile app need to send this message, where user_id must be the main user's] -message AppInfo { - enum Platform { - PF_OTHER = 0; - PF_ANDROID = 1; - PF_IOS = 2; - PF_CLOUD = 3; - } - Platform platform = 1; - - string app_version = 2; // App 版本,如 "3.3.60" [EN: App version, e.g. "3.3.60"] - string family_id = 3; // 主用户 family_id [EN: Main user family_id] - string user_id = 4; // 主用户 user_id [EN: Main user user_id] - - enum DataCenter { - EU = 0; // 欧洲数据中心 [EN: European data center] - AZ = 1; // 美国数据中心 [EN: US data center] - AY = 2; // 亚洲数据中心 [EN: Asian data center] - } - DataCenter data_center = 5; - - AppFunction app_function = 6; - - string time_zone_id = 7; // 时区 id,如 "Asia/Shanghai" [EN: Timezone ID, e.g. "Asia/Shanghai"] -} - -// 机器上线时上报一次或者 ip、user_id 变更上报 [EN: Reported once when device comes online or when ip/user_id changes] -message DeviceInfo { - string product_name = 1; // 产品名称,如 eufy Clean xxx [EN: Product name, e.g. eufy Clean xxx] - string video_sn = 2; // 序列号(video 相关服务使用) [EN: Serial number (used by video-related services)] - string device_mac = 3; // 设备 mac [EN: Device MAC] - string software = 4; // 软件版本,如 "1.2.3" [EN: Software version, e.g. "1.2.3"] - uint32 hardware = 5; // 硬件版本,如 2 [EN: Hardware version, e.g. 2] - string wifi_name = 6; // 已连接的 wifi 名称 [EN: Connected WiFi name] - string wifi_ip = 7; // 当前 wifi 的 ip [EN: Current WiFi IP] - string last_user_id = 8; // 机器上存储的最新 user_id(用于 app 判断是否相同账户) [EN: Latest user_id stored on device (used by app to determine if same account)] - - message Station { - string software = 1; // 软件版本,如 "1.2.3" [EN: Software version, e.g. "1.2.3"] - uint32 hardware = 2; // 硬件版本,如 400 [EN: Hardware version, e.g. 400] - } - Station station = 11; // 基站信息(机器在基站开机才有这个字段) [EN: Station information (this field exists only when device boots on station)] - - ProtoInfo proto_info = 12; -} diff --git a/proto-reference/app_device_info_pb2.py b/proto-reference/app_device_info_pb2.py deleted file mode 100644 index c4194a4..0000000 --- a/proto-reference/app_device_info_pb2.py +++ /dev/null @@ -1,34 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: proto/cloud/app_device_info.proto -"""Generated protocol buffer code.""" -from google.protobuf import descriptor as _descriptor -from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import symbol_database as _symbol_database -from google.protobuf.internal import builder as _builder - -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - -from ...proto.cloud import version_pb2 as proto_dot_cloud_dot_version__pb2 - -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!proto/cloud/app_device_info.proto\x12\x0bproto.cloud\x1a\x19proto/cloud/version.proto\"\xd9\x02\n\x07\x41ppInfo\x12/\n\x08platform\x18\x01 \x01(\x0e\x32\x1d.proto.cloud.AppInfo.Platform\x12\x13\n\x0b\x61pp_version\x18\x02 \x01(\t\x12\x11\n\tfamily_id\x18\x03 \x01(\t\x12\x0f\n\x07user_id\x18\x04 \x01(\t\x12\x34\n\x0b\x64\x61ta_center\x18\x05 \x01(\x0e\x32\x1f.proto.cloud.AppInfo.DataCenter\x12.\n\x0c\x61pp_function\x18\x06 \x01(\x0b\x32\x18.proto.cloud.AppFunction\x12\x14\n\x0ctime_zone_id\x18\x07 \x01(\t\"B\n\x08Platform\x12\x0c\n\x08PF_OTHER\x10\x00\x12\x0e\n\nPF_ANDROID\x10\x01\x12\n\n\x06PF_IOS\x10\x02\x12\x0c\n\x08PF_CLOUD\x10\x03\"$\n\nDataCenter\x12\x06\n\x02\x45U\x10\x00\x12\x06\n\x02\x41Z\x10\x01\x12\x06\n\x02\x41Y\x10\x02\"\xb3\x02\n\nDeviceInfo\x12\x14\n\x0cproduct_name\x18\x01 \x01(\t\x12\x10\n\x08video_sn\x18\x02 \x01(\t\x12\x12\n\ndevice_mac\x18\x03 \x01(\t\x12\x10\n\x08software\x18\x04 \x01(\t\x12\x10\n\x08hardware\x18\x05 \x01(\r\x12\x11\n\twifi_name\x18\x06 \x01(\t\x12\x0f\n\x07wifi_ip\x18\x07 \x01(\t\x12\x14\n\x0clast_user_id\x18\x08 \x01(\t\x12\x30\n\x07station\x18\x0b \x01(\x0b\x32\x1f.proto.cloud.DeviceInfo.Station\x12*\n\nproto_info\x18\x0c \x01(\x0b\x32\x16.proto.cloud.ProtoInfo\x1a-\n\x07Station\x12\x10\n\x08software\x18\x01 \x01(\t\x12\x10\n\x08hardware\x18\x02 \x01(\rb\x06proto3') - -_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'proto.cloud.app_device_info_pb2', globals()) -if _descriptor._USE_C_DESCRIPTORS == False: - - DESCRIPTOR._options = None - _APPINFO._serialized_start=78 - _APPINFO._serialized_end=423 - _APPINFO_PLATFORM._serialized_start=319 - _APPINFO_PLATFORM._serialized_end=385 - _APPINFO_DATACENTER._serialized_start=387 - _APPINFO_DATACENTER._serialized_end=423 - _DEVICEINFO._serialized_start=426 - _DEVICEINFO._serialized_end=733 - _DEVICEINFO_STATION._serialized_start=688 - _DEVICEINFO_STATION._serialized_end=733 -# @@protoc_insertion_point(module_scope) diff --git a/proto-reference/app_device_info_pb2.pyi b/proto-reference/app_device_info_pb2.pyi deleted file mode 100644 index 1463c3a..0000000 --- a/proto-reference/app_device_info_pb2.pyi +++ /dev/null @@ -1,72 +0,0 @@ -from typing import ClassVar as _ClassVar -from typing import Mapping as _Mapping -from typing import Optional as _Optional -from typing import Union as _Union - -from google.protobuf import descriptor as _descriptor -from google.protobuf import message as _message -from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper - -from ...proto.cloud import version_pb2 as _version_pb2 - -DESCRIPTOR: _descriptor.FileDescriptor - -class AppInfo(_message.Message): - __slots__ = ["app_function", "app_version", "data_center", "family_id", "platform", "time_zone_id", "user_id"] - class DataCenter(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - class Platform(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - APP_FUNCTION_FIELD_NUMBER: _ClassVar[int] - APP_VERSION_FIELD_NUMBER: _ClassVar[int] - AY: AppInfo.DataCenter - AZ: AppInfo.DataCenter - DATA_CENTER_FIELD_NUMBER: _ClassVar[int] - EU: AppInfo.DataCenter - FAMILY_ID_FIELD_NUMBER: _ClassVar[int] - PF_ANDROID: AppInfo.Platform - PF_CLOUD: AppInfo.Platform - PF_IOS: AppInfo.Platform - PF_OTHER: AppInfo.Platform - PLATFORM_FIELD_NUMBER: _ClassVar[int] - TIME_ZONE_ID_FIELD_NUMBER: _ClassVar[int] - USER_ID_FIELD_NUMBER: _ClassVar[int] - app_function: _version_pb2.AppFunction - app_version: str - data_center: AppInfo.DataCenter - family_id: str - platform: AppInfo.Platform - time_zone_id: str - user_id: str - def __init__(self, platform: _Optional[_Union[AppInfo.Platform, str]] = ..., app_version: _Optional[str] = ..., family_id: _Optional[str] = ..., user_id: _Optional[str] = ..., data_center: _Optional[_Union[AppInfo.DataCenter, str]] = ..., app_function: _Optional[_Union[_version_pb2.AppFunction, _Mapping]] = ..., time_zone_id: _Optional[str] = ...) -> None: ... - -class DeviceInfo(_message.Message): - __slots__ = ["device_mac", "hardware", "last_user_id", "product_name", "proto_info", "software", "station", "video_sn", "wifi_ip", "wifi_name"] - class Station(_message.Message): - __slots__ = ["hardware", "software"] - HARDWARE_FIELD_NUMBER: _ClassVar[int] - SOFTWARE_FIELD_NUMBER: _ClassVar[int] - hardware: int - software: str - def __init__(self, software: _Optional[str] = ..., hardware: _Optional[int] = ...) -> None: ... - DEVICE_MAC_FIELD_NUMBER: _ClassVar[int] - HARDWARE_FIELD_NUMBER: _ClassVar[int] - LAST_USER_ID_FIELD_NUMBER: _ClassVar[int] - PRODUCT_NAME_FIELD_NUMBER: _ClassVar[int] - PROTO_INFO_FIELD_NUMBER: _ClassVar[int] - SOFTWARE_FIELD_NUMBER: _ClassVar[int] - STATION_FIELD_NUMBER: _ClassVar[int] - VIDEO_SN_FIELD_NUMBER: _ClassVar[int] - WIFI_IP_FIELD_NUMBER: _ClassVar[int] - WIFI_NAME_FIELD_NUMBER: _ClassVar[int] - device_mac: str - hardware: int - last_user_id: str - product_name: str - proto_info: _version_pb2.ProtoInfo - software: str - station: DeviceInfo.Station - video_sn: str - wifi_ip: str - wifi_name: str - def __init__(self, product_name: _Optional[str] = ..., video_sn: _Optional[str] = ..., device_mac: _Optional[str] = ..., software: _Optional[str] = ..., hardware: _Optional[int] = ..., wifi_name: _Optional[str] = ..., wifi_ip: _Optional[str] = ..., last_user_id: _Optional[str] = ..., station: _Optional[_Union[DeviceInfo.Station, _Mapping]] = ..., proto_info: _Optional[_Union[_version_pb2.ProtoInfo, _Mapping]] = ...) -> None: ... diff --git a/proto-reference/ble.proto b/proto-reference/ble.proto deleted file mode 100644 index 9a66fec..0000000 --- a/proto-reference/ble.proto +++ /dev/null @@ -1,134 +0,0 @@ -/** - * 蓝牙协议,通过 btgatt 进行通信; [EN: Bluetooth protocol, communicates via btgatt;] - */ -syntax = "proto3"; - -// option optimize_for = LITE_RUNTIME; - -package proto.cloud; - -// 手机 app 发给机器人 [EN: Mobile app sends to robot] -message BtAppMsg { - message GetProductInfo { - bool get = 1; // 该字段随意填入 [EN: This field can be filled arbitrarily] - - // 手机端配网功能的版本 [EN: Mobile device network configuration feature version] - // 设备根据获取的版本使用不同的配网方法 [EN: Device uses different network configuration methods based on the version obtained] - // 目前:版本=0 蓝牙配网不加密 [EN: Currently: version=0 Bluetooth configuration without encryption] - // 版本=1 蓝牙配网的 ssid、passwd 使用 AesCbc128 加密 [EN: version=1 Bluetooth configuration ssid and passwd use AesCbc128 encryption] - uint32 distribute_version = 2; - - message RemedyField { - uint32 distribute_version2 = 1; // distribute_version 必须传 0 时使用该字段 [EN: Use this field when distribute_version must be 0] - } - RemedyField remedy_field = 3; // X10 Pro Omni 项目错误使用了 distribute_version 需要补救,其他项目不需要该字段 [EN: X10 Pro Omni project mistakenly used distribute_version and needs remedy, other projects don't need this field] - - // WiFi 合规需要country code,如 CN、US、JP [EN: WiFi compliance requires country code, e.g. CN, US, JP] - message Country { - string code = 1; // https://datahub.io/core/country-list - } - Country country = 4; - } - GetProductInfo get_product_info = 1; - - message GetApList { - uint32 max_num = 1; - } - GetApList get_ap_list = 2; - - message Distribute { - string ssid = 1; - string passwd = 2; - string token = 3; - string user_id = 4; - string time_zone_id = 5; // 时区 id,如 "Asia/Shanghai" [EN: Timezone ID, e.g. "Asia/Shanghai"] - - string domain = 6; // 服务器域名,如 "https://vsaas-api-ci.eufylife.com" [EN: Server domain, e.g. "https://vsaas-api-ci.eufylife.com"] - string app_id = 7; // app id,如 "eufy_home" [EN: App ID, e.g. "eufy_home"] - string house_id = 8; - string dev_name = 9; - string hub_name = 10; - } - Distribute distribute = 3; - - // id 4 已不再使用 [EN: id 4 is no longer used] - - message Debug { - string d_data = 1; - } - Debug req = 5; -} - -// 机器人发给手机 App [EN: Robot sends to mobile App] -message BtRobotMsg { - message ProductInfo { - enum Result { - E_OK = 0; - E_FAIL = 1; - } - Result ret = 1; // 该字段为 E_OK 时其他字段才有非零值 [EN: Other fields have non-zero values only when this field is E_OK] - string brand = 2; // 如 eufy [EN: e.g. eufy] - string code_name = 3; // 如 T2320 [EN: e.g. T2320] - string model = 4; // 如 mopper [EN: e.g. mopper] - string name = 5; // 如 Eufyclean M61 [EN: e.g. Eufyclean M61] - string alisa_name = 6; // 如 Eufyclean M61 [EN: e.g. Eufyclean M61] - string cloud_pid = 7; - string mac = 8; // 使用 AesCbc128 加密 [EN: Encrypted with AesCbc128] - - // 机器端配网功能的版本 [EN: Device-side network configuration feature version] - // 手机 app 根据获取的版本使用不同的配网方法 [EN: Mobile app uses different network configuration methods based on the version obtained] - // 目前:版本=0 蓝牙配网不加密 [EN: Currently: version=0 Bluetooth configuration without encryption] - // 版本=1 蓝牙配网的 ssid、passwd 使用 AesCbc128 加密 [EN: version=1 Bluetooth configuration ssid and passwd use AesCbc128 encryption] - uint32 distribute_version = 10; - - message RemedyField { - uint32 distribute_version2 = 1; // distribute_version 必须传 0 时使用该字段 [EN: Use this field when distribute_version must be 0] - } - RemedyField remedy_field = 11; // X10 Pro Omni 项目错误使用了 distribute_version 需要补救,其他项目不需要该字段 [EN: X10 Pro Omni project mistakenly used distribute_version and needs remedy, other projects don't need this field] - } - ProductInfo product_info = 1; - - message ApList { - message ApInfo { - string ssid = 1; - int32 dbm = 2; - } - repeated ApInfo ap_info = 1; - } - ApList ap_list = 2; - - message DistributeResult { - enum Value { - E_OK = 0; // 成功 [EN: Success] - E_SRV_ERR = 1; // 服务异常 [EN: Service error] - E_AP_NOT_FOUND = 2; // 没有找到 ap [EN: AP not found] - E_PASSWD_ERR = 3; // 密码错误 [EN: Password error] - E_DHCP_ERR = 4; // dhcp 错误 [EN: DHCP error] - E_GW_ERR = 5; // 网关错误 [EN: Gateway error] - E_DNS_ERR = 6; // dns 错误 [EN: DNS error] - E_NET_ERR = 7; // 网络错误 [EN: Network error] - } - Value value = 1; - string mac = 2; // 使用 AesCbc128 加密 [EN: Encrypted with AesCbc128] - string pid = 3; - string uuid = 4; // SN - string authkey = 5; // chip_id - int32 dbm = 6; // 选择 ap 的信号强度 [EN: Signal strength of selected AP] - - message AiotResult { - int32 get_mqtt_info_ret = 1; - int32 get_data_point_ret = 2; - int32 connect_mqtt_ret = 3; - int32 bind_ret = 4; - } - AiotResult aiot_result = 7; - } - DistributeResult distribute_result = 3; - - // id 4 已不再使用 [EN: id 4 is no longer used] - - message Debug { - string d_data = 1; - } - Debug ack = 5; -} diff --git a/proto-reference/ble_pb2.py b/proto-reference/ble_pb2.py deleted file mode 100644 index 2ad7019..0000000 --- a/proto-reference/ble_pb2.py +++ /dev/null @@ -1,57 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: proto/cloud/ble.proto -"""Generated protocol buffer code.""" -from google.protobuf.internal import builder as _builder -from google.protobuf import descriptor as _descriptor -from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import symbol_database as _symbol_database -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - - - -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x15proto/cloud/ble.proto\x12\x0bproto.cloud\"\xd8\x05\n\x08\x42tAppMsg\x12>\n\x10get_product_info\x18\x01 \x01(\x0b\x32$.proto.cloud.BtAppMsg.GetProductInfo\x12\x34\n\x0bget_ap_list\x18\x02 \x01(\x0b\x32\x1f.proto.cloud.BtAppMsg.GetApList\x12\x34\n\ndistribute\x18\x03 \x01(\x0b\x32 .proto.cloud.BtAppMsg.Distribute\x12(\n\x03req\x18\x05 \x01(\x0b\x32\x1b.proto.cloud.BtAppMsg.Debug\x1a\x85\x02\n\x0eGetProductInfo\x12\x0b\n\x03get\x18\x01 \x01(\x08\x12\x1a\n\x12\x64istribute_version\x18\x02 \x01(\r\x12\x46\n\x0cremedy_field\x18\x03 \x01(\x0b\x32\x30.proto.cloud.BtAppMsg.GetProductInfo.RemedyField\x12=\n\x07\x63ountry\x18\x04 \x01(\x0b\x32,.proto.cloud.BtAppMsg.GetProductInfo.Country\x1a*\n\x0bRemedyField\x12\x1b\n\x13\x64istribute_version2\x18\x01 \x01(\r\x1a\x17\n\x07\x43ountry\x12\x0c\n\x04\x63ode\x18\x01 \x01(\t\x1a\x1c\n\tGetApList\x12\x0f\n\x07max_num\x18\x01 \x01(\r\x1a\xb6\x01\n\nDistribute\x12\x0c\n\x04ssid\x18\x01 \x01(\t\x12\x0e\n\x06passwd\x18\x02 \x01(\t\x12\r\n\x05token\x18\x03 \x01(\t\x12\x0f\n\x07user_id\x18\x04 \x01(\t\x12\x14\n\x0ctime_zone_id\x18\x05 \x01(\t\x12\x0e\n\x06\x64omain\x18\x06 \x01(\t\x12\x0e\n\x06\x61pp_id\x18\x07 \x01(\t\x12\x10\n\x08house_id\x18\x08 \x01(\t\x12\x10\n\x08\x64\x65v_name\x18\t \x01(\t\x12\x10\n\x08hub_name\x18\n \x01(\t\x1a\x17\n\x05\x44\x65\x62ug\x12\x0e\n\x06\x64_data\x18\x01 \x01(\t\"\xae\t\n\nBtRobotMsg\x12\x39\n\x0cproduct_info\x18\x01 \x01(\x0b\x32#.proto.cloud.BtRobotMsg.ProductInfo\x12/\n\x07\x61p_list\x18\x02 \x01(\x0b\x32\x1e.proto.cloud.BtRobotMsg.ApList\x12\x43\n\x11\x64istribute_result\x18\x03 \x01(\x0b\x32(.proto.cloud.BtRobotMsg.DistributeResult\x12*\n\x03\x61\x63k\x18\x05 \x01(\x0b\x32\x1d.proto.cloud.BtRobotMsg.Debug\x1a\xe8\x02\n\x0bProductInfo\x12\x37\n\x03ret\x18\x01 \x01(\x0e\x32*.proto.cloud.BtRobotMsg.ProductInfo.Result\x12\r\n\x05\x62rand\x18\x02 \x01(\t\x12\x11\n\tcode_name\x18\x03 \x01(\t\x12\r\n\x05model\x18\x04 \x01(\t\x12\x0c\n\x04name\x18\x05 \x01(\t\x12\x12\n\nalisa_name\x18\x06 \x01(\t\x12\x11\n\tcloud_pid\x18\x07 \x01(\t\x12\x0b\n\x03mac\x18\x08 \x01(\t\x12\x1a\n\x12\x64istribute_version\x18\n \x01(\r\x12\x45\n\x0cremedy_field\x18\x0b \x01(\x0b\x32/.proto.cloud.BtRobotMsg.ProductInfo.RemedyField\x1a*\n\x0bRemedyField\x12\x1b\n\x13\x64istribute_version2\x18\x01 \x01(\r\"\x1e\n\x06Result\x12\x08\n\x04\x45_OK\x10\x00\x12\n\n\x06\x45_FAIL\x10\x01\x1a\x65\n\x06\x41pList\x12\x36\n\x07\x61p_info\x18\x01 \x03(\x0b\x32%.proto.cloud.BtRobotMsg.ApList.ApInfo\x1a#\n\x06\x41pInfo\x12\x0c\n\x04ssid\x18\x01 \x01(\t\x12\x0b\n\x03\x64\x62m\x18\x02 \x01(\x05\x1a\xd7\x03\n\x10\x44istributeResult\x12=\n\x05value\x18\x01 \x01(\x0e\x32..proto.cloud.BtRobotMsg.DistributeResult.Value\x12\x0b\n\x03mac\x18\x02 \x01(\t\x12\x0b\n\x03pid\x18\x03 \x01(\t\x12\x0c\n\x04uuid\x18\x04 \x01(\t\x12\x0f\n\x07\x61uthkey\x18\x05 \x01(\t\x12\x0b\n\x03\x64\x62m\x18\x06 \x01(\x05\x12H\n\x0b\x61iot_result\x18\x07 \x01(\x0b\x32\x33.proto.cloud.BtRobotMsg.DistributeResult.AiotResult\x1ao\n\nAiotResult\x12\x19\n\x11get_mqtt_info_ret\x18\x01 \x01(\x05\x12\x1a\n\x12get_data_point_ret\x18\x02 \x01(\x05\x12\x18\n\x10\x63onnect_mqtt_ret\x18\x03 \x01(\x05\x12\x10\n\x08\x62ind_ret\x18\x04 \x01(\x05\"\x82\x01\n\x05Value\x12\x08\n\x04\x45_OK\x10\x00\x12\r\n\tE_SRV_ERR\x10\x01\x12\x12\n\x0e\x45_AP_NOT_FOUND\x10\x02\x12\x10\n\x0c\x45_PASSWD_ERR\x10\x03\x12\x0e\n\nE_DHCP_ERR\x10\x04\x12\x0c\n\x08\x45_GW_ERR\x10\x05\x12\r\n\tE_DNS_ERR\x10\x06\x12\r\n\tE_NET_ERR\x10\x07\x1a\x17\n\x05\x44\x65\x62ug\x12\x0e\n\x06\x64_data\x18\x01 \x01(\tb\x06proto3') - -_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'proto.cloud.ble_pb2', globals()) -if _descriptor._USE_C_DESCRIPTORS == False: - - DESCRIPTOR._options = None - _BTAPPMSG._serialized_start=39 - _BTAPPMSG._serialized_end=767 - _BTAPPMSG_GETPRODUCTINFO._serialized_start=266 - _BTAPPMSG_GETPRODUCTINFO._serialized_end=527 - _BTAPPMSG_GETPRODUCTINFO_REMEDYFIELD._serialized_start=460 - _BTAPPMSG_GETPRODUCTINFO_REMEDYFIELD._serialized_end=502 - _BTAPPMSG_GETPRODUCTINFO_COUNTRY._serialized_start=504 - _BTAPPMSG_GETPRODUCTINFO_COUNTRY._serialized_end=527 - _BTAPPMSG_GETAPLIST._serialized_start=529 - _BTAPPMSG_GETAPLIST._serialized_end=557 - _BTAPPMSG_DISTRIBUTE._serialized_start=560 - _BTAPPMSG_DISTRIBUTE._serialized_end=742 - _BTAPPMSG_DEBUG._serialized_start=744 - _BTAPPMSG_DEBUG._serialized_end=767 - _BTROBOTMSG._serialized_start=770 - _BTROBOTMSG._serialized_end=1968 - _BTROBOTMSG_PRODUCTINFO._serialized_start=1006 - _BTROBOTMSG_PRODUCTINFO._serialized_end=1366 - _BTROBOTMSG_PRODUCTINFO_REMEDYFIELD._serialized_start=460 - _BTROBOTMSG_PRODUCTINFO_REMEDYFIELD._serialized_end=502 - _BTROBOTMSG_PRODUCTINFO_RESULT._serialized_start=1336 - _BTROBOTMSG_PRODUCTINFO_RESULT._serialized_end=1366 - _BTROBOTMSG_APLIST._serialized_start=1368 - _BTROBOTMSG_APLIST._serialized_end=1469 - _BTROBOTMSG_APLIST_APINFO._serialized_start=1434 - _BTROBOTMSG_APLIST_APINFO._serialized_end=1469 - _BTROBOTMSG_DISTRIBUTERESULT._serialized_start=1472 - _BTROBOTMSG_DISTRIBUTERESULT._serialized_end=1943 - _BTROBOTMSG_DISTRIBUTERESULT_AIOTRESULT._serialized_start=1699 - _BTROBOTMSG_DISTRIBUTERESULT_AIOTRESULT._serialized_end=1810 - _BTROBOTMSG_DISTRIBUTERESULT_VALUE._serialized_start=1813 - _BTROBOTMSG_DISTRIBUTERESULT_VALUE._serialized_end=1943 - _BTROBOTMSG_DEBUG._serialized_start=744 - _BTROBOTMSG_DEBUG._serialized_end=767 -# @@protoc_insertion_point(module_scope) diff --git a/proto-reference/ble_pb2.pyi b/proto-reference/ble_pb2.pyi deleted file mode 100644 index a74a6c5..0000000 --- a/proto-reference/ble_pb2.pyi +++ /dev/null @@ -1,172 +0,0 @@ -from google.protobuf.internal import containers as _containers -from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper -from google.protobuf import descriptor as _descriptor -from google.protobuf import message as _message -from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union - -DESCRIPTOR: _descriptor.FileDescriptor - -class BtAppMsg(_message.Message): - __slots__ = ["distribute", "get_ap_list", "get_product_info", "req"] - class Debug(_message.Message): - __slots__ = ["d_data"] - D_DATA_FIELD_NUMBER: _ClassVar[int] - d_data: str - def __init__(self, d_data: _Optional[str] = ...) -> None: ... - class Distribute(_message.Message): - __slots__ = ["app_id", "dev_name", "domain", "house_id", "hub_name", "passwd", "ssid", "time_zone_id", "token", "user_id"] - APP_ID_FIELD_NUMBER: _ClassVar[int] - DEV_NAME_FIELD_NUMBER: _ClassVar[int] - DOMAIN_FIELD_NUMBER: _ClassVar[int] - HOUSE_ID_FIELD_NUMBER: _ClassVar[int] - HUB_NAME_FIELD_NUMBER: _ClassVar[int] - PASSWD_FIELD_NUMBER: _ClassVar[int] - SSID_FIELD_NUMBER: _ClassVar[int] - TIME_ZONE_ID_FIELD_NUMBER: _ClassVar[int] - TOKEN_FIELD_NUMBER: _ClassVar[int] - USER_ID_FIELD_NUMBER: _ClassVar[int] - app_id: str - dev_name: str - domain: str - house_id: str - hub_name: str - passwd: str - ssid: str - time_zone_id: str - token: str - user_id: str - def __init__(self, ssid: _Optional[str] = ..., passwd: _Optional[str] = ..., token: _Optional[str] = ..., user_id: _Optional[str] = ..., time_zone_id: _Optional[str] = ..., domain: _Optional[str] = ..., app_id: _Optional[str] = ..., house_id: _Optional[str] = ..., dev_name: _Optional[str] = ..., hub_name: _Optional[str] = ...) -> None: ... - class GetApList(_message.Message): - __slots__ = ["max_num"] - MAX_NUM_FIELD_NUMBER: _ClassVar[int] - max_num: int - def __init__(self, max_num: _Optional[int] = ...) -> None: ... - class GetProductInfo(_message.Message): - __slots__ = ["country", "distribute_version", "get", "remedy_field"] - class Country(_message.Message): - __slots__ = ["code"] - CODE_FIELD_NUMBER: _ClassVar[int] - code: str - def __init__(self, code: _Optional[str] = ...) -> None: ... - class RemedyField(_message.Message): - __slots__ = ["distribute_version2"] - DISTRIBUTE_VERSION2_FIELD_NUMBER: _ClassVar[int] - distribute_version2: int - def __init__(self, distribute_version2: _Optional[int] = ...) -> None: ... - COUNTRY_FIELD_NUMBER: _ClassVar[int] - DISTRIBUTE_VERSION_FIELD_NUMBER: _ClassVar[int] - GET_FIELD_NUMBER: _ClassVar[int] - REMEDY_FIELD_FIELD_NUMBER: _ClassVar[int] - country: BtAppMsg.GetProductInfo.Country - distribute_version: int - get: bool - remedy_field: BtAppMsg.GetProductInfo.RemedyField - def __init__(self, get: bool = ..., distribute_version: _Optional[int] = ..., remedy_field: _Optional[_Union[BtAppMsg.GetProductInfo.RemedyField, _Mapping]] = ..., country: _Optional[_Union[BtAppMsg.GetProductInfo.Country, _Mapping]] = ...) -> None: ... - DISTRIBUTE_FIELD_NUMBER: _ClassVar[int] - GET_AP_LIST_FIELD_NUMBER: _ClassVar[int] - GET_PRODUCT_INFO_FIELD_NUMBER: _ClassVar[int] - REQ_FIELD_NUMBER: _ClassVar[int] - distribute: BtAppMsg.Distribute - get_ap_list: BtAppMsg.GetApList - get_product_info: BtAppMsg.GetProductInfo - req: BtAppMsg.Debug - def __init__(self, get_product_info: _Optional[_Union[BtAppMsg.GetProductInfo, _Mapping]] = ..., get_ap_list: _Optional[_Union[BtAppMsg.GetApList, _Mapping]] = ..., distribute: _Optional[_Union[BtAppMsg.Distribute, _Mapping]] = ..., req: _Optional[_Union[BtAppMsg.Debug, _Mapping]] = ...) -> None: ... - -class BtRobotMsg(_message.Message): - __slots__ = ["ack", "ap_list", "distribute_result", "product_info"] - class ApList(_message.Message): - __slots__ = ["ap_info"] - class ApInfo(_message.Message): - __slots__ = ["dbm", "ssid"] - DBM_FIELD_NUMBER: _ClassVar[int] - SSID_FIELD_NUMBER: _ClassVar[int] - dbm: int - ssid: str - def __init__(self, ssid: _Optional[str] = ..., dbm: _Optional[int] = ...) -> None: ... - AP_INFO_FIELD_NUMBER: _ClassVar[int] - ap_info: _containers.RepeatedCompositeFieldContainer[BtRobotMsg.ApList.ApInfo] - def __init__(self, ap_info: _Optional[_Iterable[_Union[BtRobotMsg.ApList.ApInfo, _Mapping]]] = ...) -> None: ... - class Debug(_message.Message): - __slots__ = ["d_data"] - D_DATA_FIELD_NUMBER: _ClassVar[int] - d_data: str - def __init__(self, d_data: _Optional[str] = ...) -> None: ... - class DistributeResult(_message.Message): - __slots__ = ["aiot_result", "authkey", "dbm", "mac", "pid", "uuid", "value"] - class Value(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - class AiotResult(_message.Message): - __slots__ = ["bind_ret", "connect_mqtt_ret", "get_data_point_ret", "get_mqtt_info_ret"] - BIND_RET_FIELD_NUMBER: _ClassVar[int] - CONNECT_MQTT_RET_FIELD_NUMBER: _ClassVar[int] - GET_DATA_POINT_RET_FIELD_NUMBER: _ClassVar[int] - GET_MQTT_INFO_RET_FIELD_NUMBER: _ClassVar[int] - bind_ret: int - connect_mqtt_ret: int - get_data_point_ret: int - get_mqtt_info_ret: int - def __init__(self, get_mqtt_info_ret: _Optional[int] = ..., get_data_point_ret: _Optional[int] = ..., connect_mqtt_ret: _Optional[int] = ..., bind_ret: _Optional[int] = ...) -> None: ... - AIOT_RESULT_FIELD_NUMBER: _ClassVar[int] - AUTHKEY_FIELD_NUMBER: _ClassVar[int] - DBM_FIELD_NUMBER: _ClassVar[int] - E_AP_NOT_FOUND: BtRobotMsg.DistributeResult.Value - E_DHCP_ERR: BtRobotMsg.DistributeResult.Value - E_DNS_ERR: BtRobotMsg.DistributeResult.Value - E_GW_ERR: BtRobotMsg.DistributeResult.Value - E_NET_ERR: BtRobotMsg.DistributeResult.Value - E_OK: BtRobotMsg.DistributeResult.Value - E_PASSWD_ERR: BtRobotMsg.DistributeResult.Value - E_SRV_ERR: BtRobotMsg.DistributeResult.Value - MAC_FIELD_NUMBER: _ClassVar[int] - PID_FIELD_NUMBER: _ClassVar[int] - UUID_FIELD_NUMBER: _ClassVar[int] - VALUE_FIELD_NUMBER: _ClassVar[int] - aiot_result: BtRobotMsg.DistributeResult.AiotResult - authkey: str - dbm: int - mac: str - pid: str - uuid: str - value: BtRobotMsg.DistributeResult.Value - def __init__(self, value: _Optional[_Union[BtRobotMsg.DistributeResult.Value, str]] = ..., mac: _Optional[str] = ..., pid: _Optional[str] = ..., uuid: _Optional[str] = ..., authkey: _Optional[str] = ..., dbm: _Optional[int] = ..., aiot_result: _Optional[_Union[BtRobotMsg.DistributeResult.AiotResult, _Mapping]] = ...) -> None: ... - class ProductInfo(_message.Message): - __slots__ = ["alisa_name", "brand", "cloud_pid", "code_name", "distribute_version", "mac", "model", "name", "remedy_field", "ret"] - class Result(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - class RemedyField(_message.Message): - __slots__ = ["distribute_version2"] - DISTRIBUTE_VERSION2_FIELD_NUMBER: _ClassVar[int] - distribute_version2: int - def __init__(self, distribute_version2: _Optional[int] = ...) -> None: ... - ALISA_NAME_FIELD_NUMBER: _ClassVar[int] - BRAND_FIELD_NUMBER: _ClassVar[int] - CLOUD_PID_FIELD_NUMBER: _ClassVar[int] - CODE_NAME_FIELD_NUMBER: _ClassVar[int] - DISTRIBUTE_VERSION_FIELD_NUMBER: _ClassVar[int] - E_FAIL: BtRobotMsg.ProductInfo.Result - E_OK: BtRobotMsg.ProductInfo.Result - MAC_FIELD_NUMBER: _ClassVar[int] - MODEL_FIELD_NUMBER: _ClassVar[int] - NAME_FIELD_NUMBER: _ClassVar[int] - REMEDY_FIELD_FIELD_NUMBER: _ClassVar[int] - RET_FIELD_NUMBER: _ClassVar[int] - alisa_name: str - brand: str - cloud_pid: str - code_name: str - distribute_version: int - mac: str - model: str - name: str - remedy_field: BtRobotMsg.ProductInfo.RemedyField - ret: BtRobotMsg.ProductInfo.Result - def __init__(self, ret: _Optional[_Union[BtRobotMsg.ProductInfo.Result, str]] = ..., brand: _Optional[str] = ..., code_name: _Optional[str] = ..., model: _Optional[str] = ..., name: _Optional[str] = ..., alisa_name: _Optional[str] = ..., cloud_pid: _Optional[str] = ..., mac: _Optional[str] = ..., distribute_version: _Optional[int] = ..., remedy_field: _Optional[_Union[BtRobotMsg.ProductInfo.RemedyField, _Mapping]] = ...) -> None: ... - ACK_FIELD_NUMBER: _ClassVar[int] - AP_LIST_FIELD_NUMBER: _ClassVar[int] - DISTRIBUTE_RESULT_FIELD_NUMBER: _ClassVar[int] - PRODUCT_INFO_FIELD_NUMBER: _ClassVar[int] - ack: BtRobotMsg.Debug - ap_list: BtRobotMsg.ApList - distribute_result: BtRobotMsg.DistributeResult - product_info: BtRobotMsg.ProductInfo - def __init__(self, product_info: _Optional[_Union[BtRobotMsg.ProductInfo, _Mapping]] = ..., ap_list: _Optional[_Union[BtRobotMsg.ApList, _Mapping]] = ..., distribute_result: _Optional[_Union[BtRobotMsg.DistributeResult, _Mapping]] = ..., ack: _Optional[_Union[BtRobotMsg.Debug, _Mapping]] = ...) -> None: ... diff --git a/proto-reference/clean_param.proto b/proto-reference/clean_param.proto deleted file mode 100644 index dd4d0e6..0000000 --- a/proto-reference/clean_param.proto +++ /dev/null @@ -1,94 +0,0 @@ -/** - * 清洁参数 Request 和 Response 协议;[EN: Cleaning parameters Request and Response protocol;] - */ -syntax = "proto3"; - -// option optimize_for = LITE_RUNTIME; - -package proto.cloud; -import "proto/cloud/common.proto"; - -message Fan { - enum Suction { // 风机吸力 [EN: Fan suction power] - QUIET = 0; - STANDARD = 1; - TURBO = 2; - MAX = 3; - MAX_PLUS = 4; - } - Suction suction = 1; -} - -message MopMode { - enum Level { // 拖地档位 [EN: Mopping level] - LOW = 0; - MIDDLE = 1; - HIGH = 2; - } - Level level = 1; - - enum CornerClean { - NORMAL = 0; // 普通 [EN: Normal] - DEEP = 1; // 扭屁股动作 [EN: Twist butt motion] - } - CornerClean corner_clean = 2; -} - -message CleanCarpet { - enum Strategy { - AUTO_RAISE = 0; // 遇地毯自动抬升 [EN: Auto raise when encountering carpet] - AVOID = 1; // 规避地毯 [EN: Avoid carpet] - IGNORE = 2; // 忽略(无视)地毯 [EN: Ignore carpet] - } - Strategy strategy = 1; // 遇地毯策略 [EN: Carpet encounter strategy] -} - -message CleanType { - enum Value { - SWEEP_ONLY = 0; - MOP_ONLY = 1; - SWEEP_AND_MOP = 2; - SWEEP_THEN_MOP = 3; // 先扫后拖 [EN: Sweep first then mop] - } - Value value = 1; -} - -message CleanExtent { // 清洁程度 [EN: Cleaning extent] - enum Value { // 注意和 app 上的显示顺序不一样 [EN: Note the display order is different from the app] - NORMAL = 0; // 普通 [EN: Normal] - NARROW = 1; // 精(窄)扫/拖 [EN: Fine (narrow) sweep/mop] - QUICK = 2; // 快速清理(只弓扫/拖,不沿边) [EN: Quick clean (bow sweep/mop only, no edge following)] - } - Value value = 1; -} - -message CleanTimes { - uint32 auto_clean = 1; - uint32 select_rooms = 2; - // id 3 已不再使用 [EN: id 3 is no longer used] - uint32 spot_clean = 4; -} - -// 吸力档位 Fan 来自单独的 dp,不放在 CleanParam [EN: Suction level Fan comes from a separate dp, not in CleanParam] -message CleanParam { - CleanType clean_type = 1; - CleanCarpet clean_carpet = 2; - CleanExtent clean_extent = 3; - MopMode mop_mode = 4; - Switch smart_mode_sw = 5; // 智能省心模式开关 [EN: Smart easy mode switch] - Fan fan = 6; // 从 x10 项目开始使用这里的风机档位,旧项目使用单独 dp [EN: From x10 project onwards use fan level here, old projects use separate dp] - uint32 clean_times = 7; // 清扫次数,非 0 有效 [EN: Cleaning times, valid when non-zero] -} - -message CleanParamRequest { - CleanParam clean_param = 1; - CleanParam area_clean_param = 2; -} - -// 清洁参数,需要保存 [EN: Cleaning parameters, need to save] -message CleanParamResponse { - CleanParam clean_param = 1; - CleanTimes clean_times = 2; // 总清扫次数. x10 项目后废弃 [EN: Total cleaning times. Deprecated after x10 project] - CleanParam area_clean_param = 3; - CleanParam running_clean_param = 4; // 执行过程中使用的清洁参数(状态) [EN: Cleaning parameters used during execution (status)] -} diff --git a/proto-reference/clean_param_pb2.py b/proto-reference/clean_param_pb2.py deleted file mode 100644 index 65543cd..0000000 --- a/proto-reference/clean_param_pb2.py +++ /dev/null @@ -1,54 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: proto/cloud/clean_param.proto -"""Generated protocol buffer code.""" -from google.protobuf import descriptor as _descriptor -from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import symbol_database as _symbol_database -from google.protobuf.internal import builder as _builder - -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - -from ...proto.cloud import common_pb2 as proto_dot_cloud_dot_common__pb2 - -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1dproto/cloud/clean_param.proto\x12\x0bproto.cloud\x1a\x18proto/cloud/common.proto\"v\n\x03\x46\x61n\x12)\n\x07suction\x18\x01 \x01(\x0e\x32\x18.proto.cloud.Fan.Suction\"D\n\x07Suction\x12\t\n\x05QUIET\x10\x00\x12\x0c\n\x08STANDARD\x10\x01\x12\t\n\x05TURBO\x10\x02\x12\x07\n\x03MAX\x10\x03\x12\x0c\n\x08MAX_PLUS\x10\x04\"\xb9\x01\n\x07MopMode\x12)\n\x05level\x18\x01 \x01(\x0e\x32\x1a.proto.cloud.MopMode.Level\x12\x36\n\x0c\x63orner_clean\x18\x02 \x01(\x0e\x32 .proto.cloud.MopMode.CornerClean\"&\n\x05Level\x12\x07\n\x03LOW\x10\x00\x12\n\n\x06MIDDLE\x10\x01\x12\x08\n\x04HIGH\x10\x02\"#\n\x0b\x43ornerClean\x12\n\n\x06NORMAL\x10\x00\x12\x08\n\x04\x44\x45\x45P\x10\x01\"u\n\x0b\x43leanCarpet\x12\x33\n\x08strategy\x18\x01 \x01(\x0e\x32!.proto.cloud.CleanCarpet.Strategy\"1\n\x08Strategy\x12\x0e\n\nAUTO_RAISE\x10\x00\x12\t\n\x05\x41VOID\x10\x01\x12\n\n\x06IGNORE\x10\x02\"\x86\x01\n\tCleanType\x12+\n\x05value\x18\x01 \x01(\x0e\x32\x1c.proto.cloud.CleanType.Value\"L\n\x05Value\x12\x0e\n\nSWEEP_ONLY\x10\x00\x12\x0c\n\x08MOP_ONLY\x10\x01\x12\x11\n\rSWEEP_AND_MOP\x10\x02\x12\x12\n\x0eSWEEP_THEN_MOP\x10\x03\"h\n\x0b\x43leanExtent\x12-\n\x05value\x18\x01 \x01(\x0e\x32\x1e.proto.cloud.CleanExtent.Value\"*\n\x05Value\x12\n\n\x06NORMAL\x10\x00\x12\n\n\x06NARROW\x10\x01\x12\t\n\x05QUICK\x10\x02\"J\n\nCleanTimes\x12\x12\n\nauto_clean\x18\x01 \x01(\r\x12\x14\n\x0cselect_rooms\x18\x02 \x01(\r\x12\x12\n\nspot_clean\x18\x04 \x01(\r\"\xa0\x02\n\nCleanParam\x12*\n\nclean_type\x18\x01 \x01(\x0b\x32\x16.proto.cloud.CleanType\x12.\n\x0c\x63lean_carpet\x18\x02 \x01(\x0b\x32\x18.proto.cloud.CleanCarpet\x12.\n\x0c\x63lean_extent\x18\x03 \x01(\x0b\x32\x18.proto.cloud.CleanExtent\x12&\n\x08mop_mode\x18\x04 \x01(\x0b\x32\x14.proto.cloud.MopMode\x12*\n\rsmart_mode_sw\x18\x05 \x01(\x0b\x32\x13.proto.cloud.Switch\x12\x1d\n\x03\x66\x61n\x18\x06 \x01(\x0b\x32\x10.proto.cloud.Fan\x12\x13\n\x0b\x63lean_times\x18\x07 \x01(\r\"t\n\x11\x43leanParamRequest\x12,\n\x0b\x63lean_param\x18\x01 \x01(\x0b\x32\x17.proto.cloud.CleanParam\x12\x31\n\x10\x61rea_clean_param\x18\x02 \x01(\x0b\x32\x17.proto.cloud.CleanParam\"\xd9\x01\n\x12\x43leanParamResponse\x12,\n\x0b\x63lean_param\x18\x01 \x01(\x0b\x32\x17.proto.cloud.CleanParam\x12,\n\x0b\x63lean_times\x18\x02 \x01(\x0b\x32\x17.proto.cloud.CleanTimes\x12\x31\n\x10\x61rea_clean_param\x18\x03 \x01(\x0b\x32\x17.proto.cloud.CleanParam\x12\x34\n\x13running_clean_param\x18\x04 \x01(\x0b\x32\x17.proto.cloud.CleanParamb\x06proto3') - -_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'proto.cloud.clean_param_pb2', globals()) -if _descriptor._USE_C_DESCRIPTORS == False: - - DESCRIPTOR._options = None - _FAN._serialized_start=72 - _FAN._serialized_end=190 - _FAN_SUCTION._serialized_start=122 - _FAN_SUCTION._serialized_end=190 - _MOPMODE._serialized_start=193 - _MOPMODE._serialized_end=378 - _MOPMODE_LEVEL._serialized_start=303 - _MOPMODE_LEVEL._serialized_end=341 - _MOPMODE_CORNERCLEAN._serialized_start=343 - _MOPMODE_CORNERCLEAN._serialized_end=378 - _CLEANCARPET._serialized_start=380 - _CLEANCARPET._serialized_end=497 - _CLEANCARPET_STRATEGY._serialized_start=448 - _CLEANCARPET_STRATEGY._serialized_end=497 - _CLEANTYPE._serialized_start=500 - _CLEANTYPE._serialized_end=634 - _CLEANTYPE_VALUE._serialized_start=558 - _CLEANTYPE_VALUE._serialized_end=634 - _CLEANEXTENT._serialized_start=636 - _CLEANEXTENT._serialized_end=740 - _CLEANEXTENT_VALUE._serialized_start=698 - _CLEANEXTENT_VALUE._serialized_end=740 - _CLEANTIMES._serialized_start=742 - _CLEANTIMES._serialized_end=816 - _CLEANPARAM._serialized_start=819 - _CLEANPARAM._serialized_end=1107 - _CLEANPARAMREQUEST._serialized_start=1109 - _CLEANPARAMREQUEST._serialized_end=1225 - _CLEANPARAMRESPONSE._serialized_start=1228 - _CLEANPARAMRESPONSE._serialized_end=1445 -# @@protoc_insertion_point(module_scope) diff --git a/proto-reference/clean_param_pb2.pyi b/proto-reference/clean_param_pb2.pyi deleted file mode 100644 index 4e073c0..0000000 --- a/proto-reference/clean_param_pb2.pyi +++ /dev/null @@ -1,124 +0,0 @@ -from typing import ClassVar as _ClassVar -from typing import Mapping as _Mapping -from typing import Optional as _Optional -from typing import Union as _Union - -from google.protobuf import descriptor as _descriptor -from google.protobuf import message as _message -from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper - -from ...proto.cloud import common_pb2 as _common_pb2 - -DESCRIPTOR: _descriptor.FileDescriptor - -class CleanCarpet(_message.Message): - __slots__ = ["strategy"] - class Strategy(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - AUTO_RAISE: CleanCarpet.Strategy - AVOID: CleanCarpet.Strategy - IGNORE: CleanCarpet.Strategy - STRATEGY_FIELD_NUMBER: _ClassVar[int] - strategy: CleanCarpet.Strategy - def __init__(self, strategy: _Optional[_Union[CleanCarpet.Strategy, str]] = ...) -> None: ... - -class CleanExtent(_message.Message): - __slots__ = ["value"] - class Value(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - NARROW: CleanExtent.Value - NORMAL: CleanExtent.Value - QUICK: CleanExtent.Value - VALUE_FIELD_NUMBER: _ClassVar[int] - value: CleanExtent.Value - def __init__(self, value: _Optional[_Union[CleanExtent.Value, str]] = ...) -> None: ... - -class CleanParam(_message.Message): - __slots__ = ["clean_carpet", "clean_extent", "clean_times", "clean_type", "fan", "mop_mode", "smart_mode_sw"] - CLEAN_CARPET_FIELD_NUMBER: _ClassVar[int] - CLEAN_EXTENT_FIELD_NUMBER: _ClassVar[int] - CLEAN_TIMES_FIELD_NUMBER: _ClassVar[int] - CLEAN_TYPE_FIELD_NUMBER: _ClassVar[int] - FAN_FIELD_NUMBER: _ClassVar[int] - MOP_MODE_FIELD_NUMBER: _ClassVar[int] - SMART_MODE_SW_FIELD_NUMBER: _ClassVar[int] - clean_carpet: CleanCarpet - clean_extent: CleanExtent - clean_times: int - clean_type: CleanType - fan: Fan - mop_mode: MopMode - smart_mode_sw: _common_pb2.Switch - def __init__(self, clean_type: _Optional[_Union[CleanType, _Mapping]] = ..., clean_carpet: _Optional[_Union[CleanCarpet, _Mapping]] = ..., clean_extent: _Optional[_Union[CleanExtent, _Mapping]] = ..., mop_mode: _Optional[_Union[MopMode, _Mapping]] = ..., smart_mode_sw: _Optional[_Union[_common_pb2.Switch, _Mapping]] = ..., fan: _Optional[_Union[Fan, _Mapping]] = ..., clean_times: _Optional[int] = ...) -> None: ... - -class CleanParamRequest(_message.Message): - __slots__ = ["area_clean_param", "clean_param"] - AREA_CLEAN_PARAM_FIELD_NUMBER: _ClassVar[int] - CLEAN_PARAM_FIELD_NUMBER: _ClassVar[int] - area_clean_param: CleanParam - clean_param: CleanParam - def __init__(self, clean_param: _Optional[_Union[CleanParam, _Mapping]] = ..., area_clean_param: _Optional[_Union[CleanParam, _Mapping]] = ...) -> None: ... - -class CleanParamResponse(_message.Message): - __slots__ = ["area_clean_param", "clean_param", "clean_times", "running_clean_param"] - AREA_CLEAN_PARAM_FIELD_NUMBER: _ClassVar[int] - CLEAN_PARAM_FIELD_NUMBER: _ClassVar[int] - CLEAN_TIMES_FIELD_NUMBER: _ClassVar[int] - RUNNING_CLEAN_PARAM_FIELD_NUMBER: _ClassVar[int] - area_clean_param: CleanParam - clean_param: CleanParam - clean_times: CleanTimes - running_clean_param: CleanParam - def __init__(self, clean_param: _Optional[_Union[CleanParam, _Mapping]] = ..., clean_times: _Optional[_Union[CleanTimes, _Mapping]] = ..., area_clean_param: _Optional[_Union[CleanParam, _Mapping]] = ..., running_clean_param: _Optional[_Union[CleanParam, _Mapping]] = ...) -> None: ... - -class CleanTimes(_message.Message): - __slots__ = ["auto_clean", "select_rooms", "spot_clean"] - AUTO_CLEAN_FIELD_NUMBER: _ClassVar[int] - SELECT_ROOMS_FIELD_NUMBER: _ClassVar[int] - SPOT_CLEAN_FIELD_NUMBER: _ClassVar[int] - auto_clean: int - select_rooms: int - spot_clean: int - def __init__(self, auto_clean: _Optional[int] = ..., select_rooms: _Optional[int] = ..., spot_clean: _Optional[int] = ...) -> None: ... - -class CleanType(_message.Message): - __slots__ = ["value"] - class Value(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - MOP_ONLY: CleanType.Value - SWEEP_AND_MOP: CleanType.Value - SWEEP_ONLY: CleanType.Value - SWEEP_THEN_MOP: CleanType.Value - VALUE_FIELD_NUMBER: _ClassVar[int] - value: CleanType.Value - def __init__(self, value: _Optional[_Union[CleanType.Value, str]] = ...) -> None: ... - -class Fan(_message.Message): - __slots__ = ["suction"] - class Suction(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - MAX: Fan.Suction - MAX_PLUS: Fan.Suction - QUIET: Fan.Suction - STANDARD: Fan.Suction - SUCTION_FIELD_NUMBER: _ClassVar[int] - TURBO: Fan.Suction - suction: Fan.Suction - def __init__(self, suction: _Optional[_Union[Fan.Suction, str]] = ...) -> None: ... - -class MopMode(_message.Message): - __slots__ = ["corner_clean", "level"] - class CornerClean(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - class Level(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - CORNER_CLEAN_FIELD_NUMBER: _ClassVar[int] - DEEP: MopMode.CornerClean - HIGH: MopMode.Level - LEVEL_FIELD_NUMBER: _ClassVar[int] - LOW: MopMode.Level - MIDDLE: MopMode.Level - NORMAL: MopMode.CornerClean - corner_clean: MopMode.CornerClean - level: MopMode.Level - def __init__(self, level: _Optional[_Union[MopMode.Level, str]] = ..., corner_clean: _Optional[_Union[MopMode.CornerClean, str]] = ...) -> None: ... diff --git a/proto-reference/clean_record.proto b/proto-reference/clean_record.proto deleted file mode 100644 index 5b0bc23..0000000 --- a/proto-reference/clean_record.proto +++ /dev/null @@ -1,135 +0,0 @@ -/** - * 清洁记录. [EN: Cleaning records.] - */ -syntax = "proto3"; - -// option optimize_for = LITE_RUNTIME; - -package proto.cloud; - -import "proto/cloud/clean_param.proto"; -import "proto/cloud/stream.proto"; -import "proto/cloud/p2pdata.proto"; - -// 手机 app 优先获取 xxxRecordDesc [EN: Mobile app prioritizes fetching xxxRecordDesc] -// CleanRecordDesc 数据格式: [EN: CleanRecordDesc data format:] -// 0xAA 0x01 len(1 byte 数据段的长度) ... checksum(2 byte 除 checksum 外所有字节的和,高字节先发) [EN: 0xAA 0x01 len(1 byte data segment length) ... checksum(2 byte sum of all bytes except checksum, high byte first)] -// CruiseRecordDesc 数据格式: [EN: CruiseRecordDesc data format:] -// 0xAA 0x02 len(1 byte 数据段的长度) ... checksum(2 byte 除 checksum 外所有字节的和,高字节先发) [EN: 0xAA 0x02 len(1 byte data segment length) ... checksum(2 byte sum of all bytes except checksum, high byte first)] - -message CleanRecordDesc { - uint64 start_time = 1; // 不加时区,单位: s [EN: Without timezone, unit: seconds] - uint64 end_time = 2; // 不加时区,单位: s [EN: Without timezone, unit: seconds] - uint32 duration = 3; // 清洁时长,单位:s [EN: Cleaning duration, unit: seconds] - uint32 area = 4; // 清洁面积,单位: m2 [EN: Cleaning area, unit: m2] - CleanType clean_type = 5; // 扫、拖、扫+拖 [EN: Sweep, mop, sweep+mop] - - enum FinishReason { - COMPLETED = 0; // 自动清扫完成 [EN: Automatic cleaning completed] - MANUDAL = 1; // 人为停止 [EN: Manually stopped] - LOW_POWER = 2; // 低电 [EN: Low battery] - EXCEPTION = 3; // 异常中断(需要填充 Extra 中 error_code 或 warn_code) [EN: Exception interrupted (need to fill error_code or warn_code in Extra)] - } - FinishReason finish_reason = 6; - - message Extra { - enum Mode { - AUTO = 0; // 全局自动清洁 [EN: Global automatic cleaning] - SELECT_ROOM = 1; // 选房清洁 [EN: Selected rooms cleaning] - SELECT_ZONE = 2; // 选区清洁 [EN: Selected zones cleaning] - SPOT = 3; // 定点清洁 [EN: Spot cleaning] - SCHEDULE_AUTO_CLEAN = 4; // 预约自动清扫 [EN: Scheduled automatic cleaning] - SCHEDULE_ROOMS_CLEAN = 5; // 预约房间清扫 [EN: Scheduled rooms cleaning] - } - Mode mode = 1; - - // MUS 功能(根据项目定义进行选配) [EN: MUS feature (optional based on project definition)] - // bit-0: 执行过洗拖布 [EN: bit-0: Mop washing executed] - // bit-1: 执行过烘干拖布 [EN: bit-1: Mop drying executed] - // bit-2: 执行过集尘 [EN: bit-2: Dust collection executed] - // bit-3: 执行过滚刷自清洁 [EN: bit-3: Roller brush self-cleaning executed] - uint32 mus = 2; - - // 清扫错误码,正常为 0 [EN: Cleaning error code, 0 for normal] - // 值来自 error_code_list_xxx.proto [EN: Values from error_code_list_xxx.proto] - uint32 error_code = 3; - - // 清扫警告码,正常为 0 [EN: Cleaning warning code, 0 for normal] - // 值来自 error_code_list_xxx.proto [EN: Values from error_code_list_xxx.proto] - uint32 prompt_code = 4; - } - Extra extra = 7; -} - -message CleanRecordData { - stream.RestrictedZone restricted_zone = 1; - stream.TemporaryData temp_data = 2; - stream.RoomParams room_params = 3; - - // id 4 不再使用 [EN: id 4 no longer used] - // id 5 不再使用 [EN: id 5 no longer used] - - // 上传格式: 头部 Point Point Point Point ... Point [EN: Upload format: header Point Point Point Point ... Point] - // 其中头部格式: 0xAA 0x03 [4字节 map_id] [4字节 releases] [EN: header format: 0xAA 0x03 [4 bytes map_id] [4 bytes releases]] - bytes path_data = 6; // 轨迹(目前未压缩) [EN: Path (currently uncompressed)] - - // id 7 不再使用 [EN: id 7 no longer used] - // id 8 不再使用 [EN: id 8 no longer used] - // id 9 不再使用 [EN: id 9 no longer used] - - stream.Map map = 10; - stream.RoomOutline room_outline = 11; - stream.ObstacleInfo obstacle_info = 12; - - message PathData { - repeated stream.PathPoint points = 1; - } - PathData path_data_v2 = 13; // 存在该字段使用新的轨迹数据格式 [EN: Use new path data format when this field exists] - - /* p2p通道 清扫记录使用以下参数,不使用上述参数 */ // [EN: p2p channel cleaning records use the following parameters, not the above parameters] - p2p.CompleteMap map_p2p = 20; //完整地图 [EN: Complete map] - p2p.CompletePath path_p2p = 21; //完整路径 [EN: Complete path] -} - -message CruiseRecordDesc { - uint64 start_time = 1; // 不加时区,单位: s [EN: Without timezone, unit: seconds] - uint64 end_time = 2; // 不加时区,单位: s [EN: Without timezone, unit: seconds] - uint32 duration = 3; // 巡航时长,单位:s [EN: Cruise duration, unit: seconds] - - enum FinishReason { - COMPLETED = 0; // 自动巡航完成 [EN: Automatic cruise completed] - MANUDAL = 1; // 人为停止 [EN: Manually stopped] - LOW_POWER = 2; // 低电 [EN: Low battery] - EXCEPTION = 3; // 异常中断 [EN: Exception interrupted] - } - FinishReason finish_reason = 4; - - message Extra { - enum Mode { - GLOBAL_CRUISE = 0; // 全屋巡航 [EN: Whole house cruise] - POINT_CRUISE = 1; // 精准巡航 [EN: Precise cruise] - ZONES_CRUISE = 2; // 选区巡航 [EN: Selected zones cruise] - SCHEDULE_CRUISE = 3; // 预约巡航 [EN: Scheduled cruise] - } - Mode mode = 1; - } - Extra extra = 7; -} - -message CruiseRecordData { - stream.RestrictedZone restricted_zone = 1; - stream.TemporaryData temp_data = 2; - stream.RoomParams room_params = 3; - stream.ObstacleInfo obstacle_info = 4; - - // 上传格式: 头部 Point Point Point Point ... Point [EN: Upload format: header Point Point Point Point ... Point] - // 其中头部格式: 0xAA 0x03 [4字节 map_id] [4字节 releases] [EN: header format: 0xAA 0x03 [4 bytes map_id] [4 bytes releases]] - bytes path_data = 5; // 轨迹(目前未压缩) [EN: Path (currently uncompressed)] - stream.CruiseData cruise_data = 6; - stream.Map map = 7; - stream.RoomOutline room_outline = 8; - - /* p2p通道 使用以下参数,不使用 除 cruise_data 以外的上述参数 */ // [EN: p2p channel uses the following parameters, not the above parameters except cruise_data] - p2p.CompleteMap map_p2p = 20; //完整地图 [EN: Complete map] - p2p.CompletePath path_p2p = 21; //完整路径 [EN: Complete path] -} diff --git a/proto-reference/clean_record_pb2.py b/proto-reference/clean_record_pb2.py deleted file mode 100644 index c2958e6..0000000 --- a/proto-reference/clean_record_pb2.py +++ /dev/null @@ -1,49 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: proto/cloud/clean_record.proto -"""Generated protocol buffer code.""" -from google.protobuf import descriptor as _descriptor -from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import symbol_database as _symbol_database -from google.protobuf.internal import builder as _builder - -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - -from ...proto.cloud import \ - clean_param_pb2 as proto_dot_cloud_dot_clean__param__pb2 -from ...proto.cloud import p2pdata_pb2 as proto_dot_cloud_dot_p2pdata__pb2 -from ...proto.cloud import stream_pb2 as proto_dot_cloud_dot_stream__pb2 - -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1eproto/cloud/clean_record.proto\x12\x0bproto.cloud\x1a\x1dproto/cloud/clean_param.proto\x1a\x18proto/cloud/stream.proto\x1a\x19proto/cloud/p2pdata.proto\"\xaa\x04\n\x0f\x43leanRecordDesc\x12\x12\n\nstart_time\x18\x01 \x01(\x04\x12\x10\n\x08\x65nd_time\x18\x02 \x01(\x04\x12\x10\n\x08\x64uration\x18\x03 \x01(\r\x12\x0c\n\x04\x61rea\x18\x04 \x01(\r\x12*\n\nclean_type\x18\x05 \x01(\x0b\x32\x16.proto.cloud.CleanType\x12@\n\rfinish_reason\x18\x06 \x01(\x0e\x32).proto.cloud.CleanRecordDesc.FinishReason\x12\x31\n\x05\x65xtra\x18\x07 \x01(\x0b\x32\".proto.cloud.CleanRecordDesc.Extra\x1a\xe5\x01\n\x05\x45xtra\x12\x35\n\x04mode\x18\x01 \x01(\x0e\x32\'.proto.cloud.CleanRecordDesc.Extra.Mode\x12\x0b\n\x03mus\x18\x02 \x01(\r\x12\x12\n\nerror_code\x18\x03 \x01(\r\x12\x13\n\x0bprompt_code\x18\x04 \x01(\r\"o\n\x04Mode\x12\x08\n\x04\x41UTO\x10\x00\x12\x0f\n\x0bSELECT_ROOM\x10\x01\x12\x0f\n\x0bSELECT_ZONE\x10\x02\x12\x08\n\x04SPOT\x10\x03\x12\x17\n\x13SCHEDULE_AUTO_CLEAN\x10\x04\x12\x18\n\x14SCHEDULE_ROOMS_CLEAN\x10\x05\"H\n\x0c\x46inishReason\x12\r\n\tCOMPLETED\x10\x00\x12\x0b\n\x07MANUDAL\x10\x01\x12\r\n\tLOW_POWER\x10\x02\x12\r\n\tEXCEPTION\x10\x03\"\xba\x04\n\x0f\x43leanRecordData\x12;\n\x0frestricted_zone\x18\x01 \x01(\x0b\x32\".proto.cloud.stream.RestrictedZone\x12\x34\n\ttemp_data\x18\x02 \x01(\x0b\x32!.proto.cloud.stream.TemporaryData\x12\x33\n\x0broom_params\x18\x03 \x01(\x0b\x32\x1e.proto.cloud.stream.RoomParams\x12\x11\n\tpath_data\x18\x06 \x01(\x0c\x12$\n\x03map\x18\n \x01(\x0b\x32\x17.proto.cloud.stream.Map\x12\x35\n\x0croom_outline\x18\x0b \x01(\x0b\x32\x1f.proto.cloud.stream.RoomOutline\x12\x37\n\robstacle_info\x18\x0c \x01(\x0b\x32 .proto.cloud.stream.ObstacleInfo\x12;\n\x0cpath_data_v2\x18\r \x01(\x0b\x32%.proto.cloud.CleanRecordData.PathData\x12-\n\x07map_p2p\x18\x14 \x01(\x0b\x32\x1c.proto.cloud.p2p.CompleteMap\x12/\n\x08path_p2p\x18\x15 \x01(\x0b\x32\x1d.proto.cloud.p2p.CompletePath\x1a\x39\n\x08PathData\x12-\n\x06points\x18\x01 \x03(\x0b\x32\x1d.proto.cloud.stream.PathPoint\"\xa1\x03\n\x10\x43ruiseRecordDesc\x12\x12\n\nstart_time\x18\x01 \x01(\x04\x12\x10\n\x08\x65nd_time\x18\x02 \x01(\x04\x12\x10\n\x08\x64uration\x18\x03 \x01(\r\x12\x41\n\rfinish_reason\x18\x04 \x01(\x0e\x32*.proto.cloud.CruiseRecordDesc.FinishReason\x12\x32\n\x05\x65xtra\x18\x07 \x01(\x0b\x32#.proto.cloud.CruiseRecordDesc.Extra\x1a\x93\x01\n\x05\x45xtra\x12\x36\n\x04mode\x18\x01 \x01(\x0e\x32(.proto.cloud.CruiseRecordDesc.Extra.Mode\"R\n\x04Mode\x12\x11\n\rGLOBAL_CRUISE\x10\x00\x12\x10\n\x0cPOINT_CRUISE\x10\x01\x12\x10\n\x0cZONES_CRUISE\x10\x02\x12\x13\n\x0fSCHEDULE_CRUISE\x10\x03\"H\n\x0c\x46inishReason\x12\r\n\tCOMPLETED\x10\x00\x12\x0b\n\x07MANUDAL\x10\x01\x12\r\n\tLOW_POWER\x10\x02\x12\r\n\tEXCEPTION\x10\x03\"\xf8\x03\n\x10\x43ruiseRecordData\x12;\n\x0frestricted_zone\x18\x01 \x01(\x0b\x32\".proto.cloud.stream.RestrictedZone\x12\x34\n\ttemp_data\x18\x02 \x01(\x0b\x32!.proto.cloud.stream.TemporaryData\x12\x33\n\x0broom_params\x18\x03 \x01(\x0b\x32\x1e.proto.cloud.stream.RoomParams\x12\x37\n\robstacle_info\x18\x04 \x01(\x0b\x32 .proto.cloud.stream.ObstacleInfo\x12\x11\n\tpath_data\x18\x05 \x01(\x0c\x12\x33\n\x0b\x63ruise_data\x18\x06 \x01(\x0b\x32\x1e.proto.cloud.stream.CruiseData\x12$\n\x03map\x18\x07 \x01(\x0b\x32\x17.proto.cloud.stream.Map\x12\x35\n\x0croom_outline\x18\x08 \x01(\x0b\x32\x1f.proto.cloud.stream.RoomOutline\x12-\n\x07map_p2p\x18\x14 \x01(\x0b\x32\x1c.proto.cloud.p2p.CompleteMap\x12/\n\x08path_p2p\x18\x15 \x01(\x0b\x32\x1d.proto.cloud.p2p.CompletePathb\x06proto3') - -_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'proto.cloud.clean_record_pb2', globals()) -if _descriptor._USE_C_DESCRIPTORS == False: - - DESCRIPTOR._options = None - _CLEANRECORDDESC._serialized_start=132 - _CLEANRECORDDESC._serialized_end=686 - _CLEANRECORDDESC_EXTRA._serialized_start=383 - _CLEANRECORDDESC_EXTRA._serialized_end=612 - _CLEANRECORDDESC_EXTRA_MODE._serialized_start=501 - _CLEANRECORDDESC_EXTRA_MODE._serialized_end=612 - _CLEANRECORDDESC_FINISHREASON._serialized_start=614 - _CLEANRECORDDESC_FINISHREASON._serialized_end=686 - _CLEANRECORDDATA._serialized_start=689 - _CLEANRECORDDATA._serialized_end=1259 - _CLEANRECORDDATA_PATHDATA._serialized_start=1202 - _CLEANRECORDDATA_PATHDATA._serialized_end=1259 - _CRUISERECORDDESC._serialized_start=1262 - _CRUISERECORDDESC._serialized_end=1679 - _CRUISERECORDDESC_EXTRA._serialized_start=1458 - _CRUISERECORDDESC_EXTRA._serialized_end=1605 - _CRUISERECORDDESC_EXTRA_MODE._serialized_start=1523 - _CRUISERECORDDESC_EXTRA_MODE._serialized_end=1605 - _CRUISERECORDDESC_FINISHREASON._serialized_start=614 - _CRUISERECORDDESC_FINISHREASON._serialized_end=686 - _CRUISERECORDDATA._serialized_start=1682 - _CRUISERECORDDATA._serialized_end=2186 -# @@protoc_insertion_point(module_scope) diff --git a/proto-reference/clean_record_pb2.pyi b/proto-reference/clean_record_pb2.pyi deleted file mode 100644 index f8c20ef..0000000 --- a/proto-reference/clean_record_pb2.pyi +++ /dev/null @@ -1,143 +0,0 @@ -from typing import ClassVar as _ClassVar -from typing import Iterable as _Iterable -from typing import Mapping as _Mapping -from typing import Optional as _Optional -from typing import Union as _Union - -from google.protobuf import descriptor as _descriptor -from google.protobuf import message as _message -from google.protobuf.internal import containers as _containers -from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper - -from ...proto.cloud import clean_param_pb2 as _clean_param_pb2 -from ...proto.cloud import p2pdata_pb2 as _p2pdata_pb2 -from ...proto.cloud import stream_pb2 as _stream_pb2 - -DESCRIPTOR: _descriptor.FileDescriptor - -class CleanRecordData(_message.Message): - __slots__ = ["map", "map_p2p", "obstacle_info", "path_data", "path_data_v2", "path_p2p", "restricted_zone", "room_outline", "room_params", "temp_data"] - class PathData(_message.Message): - __slots__ = ["points"] - POINTS_FIELD_NUMBER: _ClassVar[int] - points: _containers.RepeatedCompositeFieldContainer[_stream_pb2.PathPoint] - def __init__(self, points: _Optional[_Iterable[_Union[_stream_pb2.PathPoint, _Mapping]]] = ...) -> None: ... - MAP_FIELD_NUMBER: _ClassVar[int] - MAP_P2P_FIELD_NUMBER: _ClassVar[int] - OBSTACLE_INFO_FIELD_NUMBER: _ClassVar[int] - PATH_DATA_FIELD_NUMBER: _ClassVar[int] - PATH_DATA_V2_FIELD_NUMBER: _ClassVar[int] - PATH_P2P_FIELD_NUMBER: _ClassVar[int] - RESTRICTED_ZONE_FIELD_NUMBER: _ClassVar[int] - ROOM_OUTLINE_FIELD_NUMBER: _ClassVar[int] - ROOM_PARAMS_FIELD_NUMBER: _ClassVar[int] - TEMP_DATA_FIELD_NUMBER: _ClassVar[int] - map: _stream_pb2.Map - map_p2p: _p2pdata_pb2.CompleteMap - obstacle_info: _stream_pb2.ObstacleInfo - path_data: bytes - path_data_v2: CleanRecordData.PathData - path_p2p: _p2pdata_pb2.CompletePath - restricted_zone: _stream_pb2.RestrictedZone - room_outline: _stream_pb2.RoomOutline - room_params: _stream_pb2.RoomParams - temp_data: _stream_pb2.TemporaryData - def __init__(self, restricted_zone: _Optional[_Union[_stream_pb2.RestrictedZone, _Mapping]] = ..., temp_data: _Optional[_Union[_stream_pb2.TemporaryData, _Mapping]] = ..., room_params: _Optional[_Union[_stream_pb2.RoomParams, _Mapping]] = ..., path_data: _Optional[bytes] = ..., map: _Optional[_Union[_stream_pb2.Map, _Mapping]] = ..., room_outline: _Optional[_Union[_stream_pb2.RoomOutline, _Mapping]] = ..., obstacle_info: _Optional[_Union[_stream_pb2.ObstacleInfo, _Mapping]] = ..., path_data_v2: _Optional[_Union[CleanRecordData.PathData, _Mapping]] = ..., map_p2p: _Optional[_Union[_p2pdata_pb2.CompleteMap, _Mapping]] = ..., path_p2p: _Optional[_Union[_p2pdata_pb2.CompletePath, _Mapping]] = ...) -> None: ... - -class CleanRecordDesc(_message.Message): - __slots__ = ["area", "clean_type", "duration", "end_time", "extra", "finish_reason", "start_time"] - class FinishReason(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - class Extra(_message.Message): - __slots__ = ["error_code", "mode", "mus", "prompt_code"] - class Mode(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - AUTO: CleanRecordDesc.Extra.Mode - ERROR_CODE_FIELD_NUMBER: _ClassVar[int] - MODE_FIELD_NUMBER: _ClassVar[int] - MUS_FIELD_NUMBER: _ClassVar[int] - PROMPT_CODE_FIELD_NUMBER: _ClassVar[int] - SCHEDULE_AUTO_CLEAN: CleanRecordDesc.Extra.Mode - SCHEDULE_ROOMS_CLEAN: CleanRecordDesc.Extra.Mode - SELECT_ROOM: CleanRecordDesc.Extra.Mode - SELECT_ZONE: CleanRecordDesc.Extra.Mode - SPOT: CleanRecordDesc.Extra.Mode - error_code: int - mode: CleanRecordDesc.Extra.Mode - mus: int - prompt_code: int - def __init__(self, mode: _Optional[_Union[CleanRecordDesc.Extra.Mode, str]] = ..., mus: _Optional[int] = ..., error_code: _Optional[int] = ..., prompt_code: _Optional[int] = ...) -> None: ... - AREA_FIELD_NUMBER: _ClassVar[int] - CLEAN_TYPE_FIELD_NUMBER: _ClassVar[int] - COMPLETED: CleanRecordDesc.FinishReason - DURATION_FIELD_NUMBER: _ClassVar[int] - END_TIME_FIELD_NUMBER: _ClassVar[int] - EXCEPTION: CleanRecordDesc.FinishReason - EXTRA_FIELD_NUMBER: _ClassVar[int] - FINISH_REASON_FIELD_NUMBER: _ClassVar[int] - LOW_POWER: CleanRecordDesc.FinishReason - MANUDAL: CleanRecordDesc.FinishReason - START_TIME_FIELD_NUMBER: _ClassVar[int] - area: int - clean_type: _clean_param_pb2.CleanType - duration: int - end_time: int - extra: CleanRecordDesc.Extra - finish_reason: CleanRecordDesc.FinishReason - start_time: int - def __init__(self, start_time: _Optional[int] = ..., end_time: _Optional[int] = ..., duration: _Optional[int] = ..., area: _Optional[int] = ..., clean_type: _Optional[_Union[_clean_param_pb2.CleanType, _Mapping]] = ..., finish_reason: _Optional[_Union[CleanRecordDesc.FinishReason, str]] = ..., extra: _Optional[_Union[CleanRecordDesc.Extra, _Mapping]] = ...) -> None: ... - -class CruiseRecordData(_message.Message): - __slots__ = ["cruise_data", "map", "map_p2p", "obstacle_info", "path_data", "path_p2p", "restricted_zone", "room_outline", "room_params", "temp_data"] - CRUISE_DATA_FIELD_NUMBER: _ClassVar[int] - MAP_FIELD_NUMBER: _ClassVar[int] - MAP_P2P_FIELD_NUMBER: _ClassVar[int] - OBSTACLE_INFO_FIELD_NUMBER: _ClassVar[int] - PATH_DATA_FIELD_NUMBER: _ClassVar[int] - PATH_P2P_FIELD_NUMBER: _ClassVar[int] - RESTRICTED_ZONE_FIELD_NUMBER: _ClassVar[int] - ROOM_OUTLINE_FIELD_NUMBER: _ClassVar[int] - ROOM_PARAMS_FIELD_NUMBER: _ClassVar[int] - TEMP_DATA_FIELD_NUMBER: _ClassVar[int] - cruise_data: _stream_pb2.CruiseData - map: _stream_pb2.Map - map_p2p: _p2pdata_pb2.CompleteMap - obstacle_info: _stream_pb2.ObstacleInfo - path_data: bytes - path_p2p: _p2pdata_pb2.CompletePath - restricted_zone: _stream_pb2.RestrictedZone - room_outline: _stream_pb2.RoomOutline - room_params: _stream_pb2.RoomParams - temp_data: _stream_pb2.TemporaryData - def __init__(self, restricted_zone: _Optional[_Union[_stream_pb2.RestrictedZone, _Mapping]] = ..., temp_data: _Optional[_Union[_stream_pb2.TemporaryData, _Mapping]] = ..., room_params: _Optional[_Union[_stream_pb2.RoomParams, _Mapping]] = ..., obstacle_info: _Optional[_Union[_stream_pb2.ObstacleInfo, _Mapping]] = ..., path_data: _Optional[bytes] = ..., cruise_data: _Optional[_Union[_stream_pb2.CruiseData, _Mapping]] = ..., map: _Optional[_Union[_stream_pb2.Map, _Mapping]] = ..., room_outline: _Optional[_Union[_stream_pb2.RoomOutline, _Mapping]] = ..., map_p2p: _Optional[_Union[_p2pdata_pb2.CompleteMap, _Mapping]] = ..., path_p2p: _Optional[_Union[_p2pdata_pb2.CompletePath, _Mapping]] = ...) -> None: ... - -class CruiseRecordDesc(_message.Message): - __slots__ = ["duration", "end_time", "extra", "finish_reason", "start_time"] - class FinishReason(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - class Extra(_message.Message): - __slots__ = ["mode"] - class Mode(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - GLOBAL_CRUISE: CruiseRecordDesc.Extra.Mode - MODE_FIELD_NUMBER: _ClassVar[int] - POINT_CRUISE: CruiseRecordDesc.Extra.Mode - SCHEDULE_CRUISE: CruiseRecordDesc.Extra.Mode - ZONES_CRUISE: CruiseRecordDesc.Extra.Mode - mode: CruiseRecordDesc.Extra.Mode - def __init__(self, mode: _Optional[_Union[CruiseRecordDesc.Extra.Mode, str]] = ...) -> None: ... - COMPLETED: CruiseRecordDesc.FinishReason - DURATION_FIELD_NUMBER: _ClassVar[int] - END_TIME_FIELD_NUMBER: _ClassVar[int] - EXCEPTION: CruiseRecordDesc.FinishReason - EXTRA_FIELD_NUMBER: _ClassVar[int] - FINISH_REASON_FIELD_NUMBER: _ClassVar[int] - LOW_POWER: CruiseRecordDesc.FinishReason - MANUDAL: CruiseRecordDesc.FinishReason - START_TIME_FIELD_NUMBER: _ClassVar[int] - duration: int - end_time: int - extra: CruiseRecordDesc.Extra - finish_reason: CruiseRecordDesc.FinishReason - start_time: int - def __init__(self, start_time: _Optional[int] = ..., end_time: _Optional[int] = ..., duration: _Optional[int] = ..., finish_reason: _Optional[_Union[CruiseRecordDesc.FinishReason, str]] = ..., extra: _Optional[_Union[CruiseRecordDesc.Extra, _Mapping]] = ...) -> None: ... diff --git a/proto-reference/clean_record_wrap.proto b/proto-reference/clean_record_wrap.proto deleted file mode 100644 index 3e1c503..0000000 --- a/proto-reference/clean_record_wrap.proto +++ /dev/null @@ -1,14 +0,0 @@ -/** - * 清洁记录包装,调试专用,APP 忽略. [EN: Cleaning record wrapper, for debugging only, APP should ignore.] - */ -syntax = "proto3"; - -// option optimize_for = LITE_RUNTIME; - -package proto.cloud; - -message CleanRecordWrap { - uint32 id = 1; - bytes desc = 2; // CleanRecordDesc 序列化结果 [EN: CleanRecordDesc serialization result] - bytes data = 3; // CleanRecordData 序列化结果 [EN: CleanRecordData serialization result] -} diff --git a/proto-reference/clean_record_wrap_pb2.py b/proto-reference/clean_record_wrap_pb2.py deleted file mode 100644 index 96a2fde..0000000 --- a/proto-reference/clean_record_wrap_pb2.py +++ /dev/null @@ -1,25 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: proto/cloud/clean_record_wrap.proto -"""Generated protocol buffer code.""" -from google.protobuf.internal import builder as _builder -from google.protobuf import descriptor as _descriptor -from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import symbol_database as _symbol_database -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - - - -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n#proto/cloud/clean_record_wrap.proto\x12\x0bproto.cloud\"9\n\x0f\x43leanRecordWrap\x12\n\n\x02id\x18\x01 \x01(\r\x12\x0c\n\x04\x64\x65sc\x18\x02 \x01(\x0c\x12\x0c\n\x04\x64\x61ta\x18\x03 \x01(\x0c\x62\x06proto3') - -_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'proto.cloud.clean_record_wrap_pb2', globals()) -if _descriptor._USE_C_DESCRIPTORS == False: - - DESCRIPTOR._options = None - _CLEANRECORDWRAP._serialized_start=52 - _CLEANRECORDWRAP._serialized_end=109 -# @@protoc_insertion_point(module_scope) diff --git a/proto-reference/clean_record_wrap_pb2.pyi b/proto-reference/clean_record_wrap_pb2.pyi deleted file mode 100644 index 8c10186..0000000 --- a/proto-reference/clean_record_wrap_pb2.pyi +++ /dev/null @@ -1,15 +0,0 @@ -from google.protobuf import descriptor as _descriptor -from google.protobuf import message as _message -from typing import ClassVar as _ClassVar, Optional as _Optional - -DESCRIPTOR: _descriptor.FileDescriptor - -class CleanRecordWrap(_message.Message): - __slots__ = ["data", "desc", "id"] - DATA_FIELD_NUMBER: _ClassVar[int] - DESC_FIELD_NUMBER: _ClassVar[int] - ID_FIELD_NUMBER: _ClassVar[int] - data: bytes - desc: bytes - id: int - def __init__(self, id: _Optional[int] = ..., desc: _Optional[bytes] = ..., data: _Optional[bytes] = ...) -> None: ... diff --git a/proto-reference/clean_statistics.proto b/proto-reference/clean_statistics.proto deleted file mode 100644 index d29424e..0000000 --- a/proto-reference/clean_statistics.proto +++ /dev/null @@ -1,24 +0,0 @@ -/** - * 清洁统计信息 [EN: Cleaning statistics information] - */ -syntax = "proto3"; - -// option optimize_for = LITE_RUNTIME; - -package proto.cloud; - -message CleanStatistics { - message Single { // 当次清扫统计 [EN: Current cleaning statistics] - uint32 clean_duration = 1; // 当前清扫时长 [EN: Current cleaning duration] - uint32 clean_area = 2; // 当前清扫面积 [EN: Current cleaning area] - } - message Total { // 总的清扫统计 [EN: Total cleaning statistics] - uint32 clean_duration = 1; // 总的清扫时长 [EN: Total cleaning duration] - uint32 clean_area = 2; // 总的清扫面积 [EN: Total cleaning area] - uint32 clean_count = 3; // 总的清扫次数 [EN: Total cleaning count] - } - - Single single = 1; - Total total = 2; // 恢复出厂时不清零,用于机器老化的考量指标 [EN: Not reset on factory restore, used as a metric for machine aging consideration] - Total user_total = 3; // 不同用户时清零 [EN: Reset when user changes] -} diff --git a/proto-reference/clean_statistics_pb2.py b/proto-reference/clean_statistics_pb2.py deleted file mode 100644 index 911d3ab..0000000 --- a/proto-reference/clean_statistics_pb2.py +++ /dev/null @@ -1,29 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: proto/cloud/clean_statistics.proto -"""Generated protocol buffer code.""" -from google.protobuf.internal import builder as _builder -from google.protobuf import descriptor as _descriptor -from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import symbol_database as _symbol_database -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - - - -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"proto/cloud/clean_statistics.proto\x12\x0bproto.cloud\"\xb1\x02\n\x0f\x43leanStatistics\x12\x33\n\x06single\x18\x01 \x01(\x0b\x32#.proto.cloud.CleanStatistics.Single\x12\x31\n\x05total\x18\x02 \x01(\x0b\x32\".proto.cloud.CleanStatistics.Total\x12\x36\n\nuser_total\x18\x03 \x01(\x0b\x32\".proto.cloud.CleanStatistics.Total\x1a\x34\n\x06Single\x12\x16\n\x0e\x63lean_duration\x18\x01 \x01(\r\x12\x12\n\nclean_area\x18\x02 \x01(\r\x1aH\n\x05Total\x12\x16\n\x0e\x63lean_duration\x18\x01 \x01(\r\x12\x12\n\nclean_area\x18\x02 \x01(\r\x12\x13\n\x0b\x63lean_count\x18\x03 \x01(\rb\x06proto3') - -_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'proto.cloud.clean_statistics_pb2', globals()) -if _descriptor._USE_C_DESCRIPTORS == False: - - DESCRIPTOR._options = None - _CLEANSTATISTICS._serialized_start=52 - _CLEANSTATISTICS._serialized_end=357 - _CLEANSTATISTICS_SINGLE._serialized_start=231 - _CLEANSTATISTICS_SINGLE._serialized_end=283 - _CLEANSTATISTICS_TOTAL._serialized_start=285 - _CLEANSTATISTICS_TOTAL._serialized_end=357 -# @@protoc_insertion_point(module_scope) diff --git a/proto-reference/clean_statistics_pb2.pyi b/proto-reference/clean_statistics_pb2.pyi deleted file mode 100644 index b66db79..0000000 --- a/proto-reference/clean_statistics_pb2.pyi +++ /dev/null @@ -1,31 +0,0 @@ -from google.protobuf import descriptor as _descriptor -from google.protobuf import message as _message -from typing import ClassVar as _ClassVar, Mapping as _Mapping, Optional as _Optional, Union as _Union - -DESCRIPTOR: _descriptor.FileDescriptor - -class CleanStatistics(_message.Message): - __slots__ = ["single", "total", "user_total"] - class Single(_message.Message): - __slots__ = ["clean_area", "clean_duration"] - CLEAN_AREA_FIELD_NUMBER: _ClassVar[int] - CLEAN_DURATION_FIELD_NUMBER: _ClassVar[int] - clean_area: int - clean_duration: int - def __init__(self, clean_duration: _Optional[int] = ..., clean_area: _Optional[int] = ...) -> None: ... - class Total(_message.Message): - __slots__ = ["clean_area", "clean_count", "clean_duration"] - CLEAN_AREA_FIELD_NUMBER: _ClassVar[int] - CLEAN_COUNT_FIELD_NUMBER: _ClassVar[int] - CLEAN_DURATION_FIELD_NUMBER: _ClassVar[int] - clean_area: int - clean_count: int - clean_duration: int - def __init__(self, clean_duration: _Optional[int] = ..., clean_area: _Optional[int] = ..., clean_count: _Optional[int] = ...) -> None: ... - SINGLE_FIELD_NUMBER: _ClassVar[int] - TOTAL_FIELD_NUMBER: _ClassVar[int] - USER_TOTAL_FIELD_NUMBER: _ClassVar[int] - single: CleanStatistics.Single - total: CleanStatistics.Total - user_total: CleanStatistics.Total - def __init__(self, single: _Optional[_Union[CleanStatistics.Single, _Mapping]] = ..., total: _Optional[_Union[CleanStatistics.Total, _Mapping]] = ..., user_total: _Optional[_Union[CleanStatistics.Total, _Mapping]] = ...) -> None: ... diff --git a/proto-reference/common.proto b/proto-reference/common.proto deleted file mode 100644 index 0aa035c..0000000 --- a/proto-reference/common.proto +++ /dev/null @@ -1,80 +0,0 @@ -syntax = "proto3"; - -// option optimize_for = LITE_RUNTIME; - -package proto.cloud; - -message Empty { - -} - -message Point { - sint32 x = 1; // 单位: m x 100 [EN: Unit: m x 100] - sint32 y = 2; -} - -message Pose { - sint32 x = 1; // 单位: m x 100 [EN: Unit: m x 100] - sint32 y = 2; - sint32 theta = 3; // 单位: rad * 100 [EN: Unit: rad * 100] -} - -message Line { - Point p0 = 1; - Point p1 = 2; -} - -message Quadrangle { - Point p0 = 1; - Point p1 = 2; - Point p2 = 3; - Point p3 = 4; -} - -message Polygon { - repeated Point points = 1; -} - -message Switch { - bool value = 1; -} - -message Active { - bool value = 1; -} - -message Numerical { // 数值分级 [EN: Numerical grading] - uint32 value = 1; -} - -// 地面类型 [EN: Floor type] -message Floor { - enum Type { - UNKNOW = 0; - BLANKET = 1; // 毛毯 [EN: Carpet] - WOOD = 2; // 木质 [EN: Wood] - CERAMIC = 3; // 瓷砖 [EN: Ceramic tile] - } - Type type = 1; -} - -// 房间类型 [EN: Room type] -// 当房间未命名时,手机 app 根据类型和索引值自动多语言命名,如 "厨房1"、"Kitchen1" 等 [EN: When room is unnamed, mobile app automatically names it in multiple languages based on type and index, such as "厨房1", "Kitchen1", etc.] -message RoomScene { - enum Type { - UNKNOW = 0; - STUDYROOM = 1; - BEDROOM = 2; - RESTROOM = 3; - KITCHEN = 4; - LIVINGROOM = 5; - DININGROOM = 6; - CORRIDOR = 7; - } - Type type = 1; - - message Index { - uint32 value = 1; // 从1开始 [EN: Starting from 1] - } - Index index = 2; -} diff --git a/proto-reference/common_pb2.py b/proto-reference/common_pb2.py deleted file mode 100644 index a2d0e6e..0000000 --- a/proto-reference/common_pb2.py +++ /dev/null @@ -1,51 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: proto/cloud/common.proto -"""Generated protocol buffer code.""" -from google.protobuf.internal import builder as _builder -from google.protobuf import descriptor as _descriptor -from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import symbol_database as _symbol_database -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - - - -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x18proto/cloud/common.proto\x12\x0bproto.cloud\"\x07\n\x05\x45mpty\"\x1d\n\x05Point\x12\t\n\x01x\x18\x01 \x01(\x11\x12\t\n\x01y\x18\x02 \x01(\x11\"+\n\x04Pose\x12\t\n\x01x\x18\x01 \x01(\x11\x12\t\n\x01y\x18\x02 \x01(\x11\x12\r\n\x05theta\x18\x03 \x01(\x11\"F\n\x04Line\x12\x1e\n\x02p0\x18\x01 \x01(\x0b\x32\x12.proto.cloud.Point\x12\x1e\n\x02p1\x18\x02 \x01(\x0b\x32\x12.proto.cloud.Point\"\x8c\x01\n\nQuadrangle\x12\x1e\n\x02p0\x18\x01 \x01(\x0b\x32\x12.proto.cloud.Point\x12\x1e\n\x02p1\x18\x02 \x01(\x0b\x32\x12.proto.cloud.Point\x12\x1e\n\x02p2\x18\x03 \x01(\x0b\x32\x12.proto.cloud.Point\x12\x1e\n\x02p3\x18\x04 \x01(\x0b\x32\x12.proto.cloud.Point\"-\n\x07Polygon\x12\"\n\x06points\x18\x01 \x03(\x0b\x32\x12.proto.cloud.Point\"\x17\n\x06Switch\x12\r\n\x05value\x18\x01 \x01(\x08\"\x17\n\x06\x41\x63tive\x12\r\n\x05value\x18\x01 \x01(\x08\"\x1a\n\tNumerical\x12\r\n\x05value\x18\x01 \x01(\r\"f\n\x05\x46loor\x12%\n\x04type\x18\x01 \x01(\x0e\x32\x17.proto.cloud.Floor.Type\"6\n\x04Type\x12\n\n\x06UNKNOW\x10\x00\x12\x0b\n\x07\x42LANKET\x10\x01\x12\x08\n\x04WOOD\x10\x02\x12\x0b\n\x07\x43\x45RAMIC\x10\x03\"\xf4\x01\n\tRoomScene\x12)\n\x04type\x18\x01 \x01(\x0e\x32\x1b.proto.cloud.RoomScene.Type\x12+\n\x05index\x18\x02 \x01(\x0b\x32\x1c.proto.cloud.RoomScene.Index\x1a\x16\n\x05Index\x12\r\n\x05value\x18\x01 \x01(\r\"w\n\x04Type\x12\n\n\x06UNKNOW\x10\x00\x12\r\n\tSTUDYROOM\x10\x01\x12\x0b\n\x07\x42\x45\x44ROOM\x10\x02\x12\x0c\n\x08RESTROOM\x10\x03\x12\x0b\n\x07KITCHEN\x10\x04\x12\x0e\n\nLIVINGROOM\x10\x05\x12\x0e\n\nDININGROOM\x10\x06\x12\x0c\n\x08\x43ORRIDOR\x10\x07\x62\x06proto3') - -_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'proto.cloud.common_pb2', globals()) -if _descriptor._USE_C_DESCRIPTORS == False: - - DESCRIPTOR._options = None - _EMPTY._serialized_start=41 - _EMPTY._serialized_end=48 - _POINT._serialized_start=50 - _POINT._serialized_end=79 - _POSE._serialized_start=81 - _POSE._serialized_end=124 - _LINE._serialized_start=126 - _LINE._serialized_end=196 - _QUADRANGLE._serialized_start=199 - _QUADRANGLE._serialized_end=339 - _POLYGON._serialized_start=341 - _POLYGON._serialized_end=386 - _SWITCH._serialized_start=388 - _SWITCH._serialized_end=411 - _ACTIVE._serialized_start=413 - _ACTIVE._serialized_end=436 - _NUMERICAL._serialized_start=438 - _NUMERICAL._serialized_end=464 - _FLOOR._serialized_start=466 - _FLOOR._serialized_end=568 - _FLOOR_TYPE._serialized_start=514 - _FLOOR_TYPE._serialized_end=568 - _ROOMSCENE._serialized_start=571 - _ROOMSCENE._serialized_end=815 - _ROOMSCENE_INDEX._serialized_start=672 - _ROOMSCENE_INDEX._serialized_end=694 - _ROOMSCENE_TYPE._serialized_start=696 - _ROOMSCENE_TYPE._serialized_end=815 -# @@protoc_insertion_point(module_scope) diff --git a/proto-reference/common_pb2.pyi b/proto-reference/common_pb2.pyi deleted file mode 100644 index fd1acb7..0000000 --- a/proto-reference/common_pb2.pyi +++ /dev/null @@ -1,108 +0,0 @@ -from google.protobuf.internal import containers as _containers -from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper -from google.protobuf import descriptor as _descriptor -from google.protobuf import message as _message -from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union - -DESCRIPTOR: _descriptor.FileDescriptor - -class Active(_message.Message): - __slots__ = ["value"] - VALUE_FIELD_NUMBER: _ClassVar[int] - value: bool - def __init__(self, value: bool = ...) -> None: ... - -class Empty(_message.Message): - __slots__ = [] - def __init__(self) -> None: ... - -class Floor(_message.Message): - __slots__ = ["type"] - class Type(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - BLANKET: Floor.Type - CERAMIC: Floor.Type - TYPE_FIELD_NUMBER: _ClassVar[int] - UNKNOW: Floor.Type - WOOD: Floor.Type - type: Floor.Type - def __init__(self, type: _Optional[_Union[Floor.Type, str]] = ...) -> None: ... - -class Line(_message.Message): - __slots__ = ["p0", "p1"] - P0_FIELD_NUMBER: _ClassVar[int] - P1_FIELD_NUMBER: _ClassVar[int] - p0: Point - p1: Point - def __init__(self, p0: _Optional[_Union[Point, _Mapping]] = ..., p1: _Optional[_Union[Point, _Mapping]] = ...) -> None: ... - -class Numerical(_message.Message): - __slots__ = ["value"] - VALUE_FIELD_NUMBER: _ClassVar[int] - value: int - def __init__(self, value: _Optional[int] = ...) -> None: ... - -class Point(_message.Message): - __slots__ = ["x", "y"] - X_FIELD_NUMBER: _ClassVar[int] - Y_FIELD_NUMBER: _ClassVar[int] - x: int - y: int - def __init__(self, x: _Optional[int] = ..., y: _Optional[int] = ...) -> None: ... - -class Polygon(_message.Message): - __slots__ = ["points"] - POINTS_FIELD_NUMBER: _ClassVar[int] - points: _containers.RepeatedCompositeFieldContainer[Point] - def __init__(self, points: _Optional[_Iterable[_Union[Point, _Mapping]]] = ...) -> None: ... - -class Pose(_message.Message): - __slots__ = ["theta", "x", "y"] - THETA_FIELD_NUMBER: _ClassVar[int] - X_FIELD_NUMBER: _ClassVar[int] - Y_FIELD_NUMBER: _ClassVar[int] - theta: int - x: int - y: int - def __init__(self, x: _Optional[int] = ..., y: _Optional[int] = ..., theta: _Optional[int] = ...) -> None: ... - -class Quadrangle(_message.Message): - __slots__ = ["p0", "p1", "p2", "p3"] - P0_FIELD_NUMBER: _ClassVar[int] - P1_FIELD_NUMBER: _ClassVar[int] - P2_FIELD_NUMBER: _ClassVar[int] - P3_FIELD_NUMBER: _ClassVar[int] - p0: Point - p1: Point - p2: Point - p3: Point - def __init__(self, p0: _Optional[_Union[Point, _Mapping]] = ..., p1: _Optional[_Union[Point, _Mapping]] = ..., p2: _Optional[_Union[Point, _Mapping]] = ..., p3: _Optional[_Union[Point, _Mapping]] = ...) -> None: ... - -class RoomScene(_message.Message): - __slots__ = ["index", "type"] - class Type(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - class Index(_message.Message): - __slots__ = ["value"] - VALUE_FIELD_NUMBER: _ClassVar[int] - value: int - def __init__(self, value: _Optional[int] = ...) -> None: ... - BEDROOM: RoomScene.Type - CORRIDOR: RoomScene.Type - DININGROOM: RoomScene.Type - INDEX_FIELD_NUMBER: _ClassVar[int] - KITCHEN: RoomScene.Type - LIVINGROOM: RoomScene.Type - RESTROOM: RoomScene.Type - STUDYROOM: RoomScene.Type - TYPE_FIELD_NUMBER: _ClassVar[int] - UNKNOW: RoomScene.Type - index: RoomScene.Index - type: RoomScene.Type - def __init__(self, type: _Optional[_Union[RoomScene.Type, str]] = ..., index: _Optional[_Union[RoomScene.Index, _Mapping]] = ...) -> None: ... - -class Switch(_message.Message): - __slots__ = ["value"] - VALUE_FIELD_NUMBER: _ClassVar[int] - value: bool - def __init__(self, value: bool = ...) -> None: ... diff --git a/proto-reference/consumable.proto b/proto-reference/consumable.proto deleted file mode 100644 index 00b2d33..0000000 --- a/proto-reference/consumable.proto +++ /dev/null @@ -1,45 +0,0 @@ -/** - * 耗材统计. [EN: Consumables statistics.] - */ -syntax = "proto3"; - -// option optimize_for = LITE_RUNTIME; - -package proto.cloud; - -message ConsumableRequest { - enum Type { - SIDE_BRUSH = 0; - ROLLING_BRUSH = 1; - FILTER_MESH = 2; - SCRAPE = 3; - SENSOR = 4; - MOP = 5; - DUSTBAG = 6; - DIRTY_WATERTANK = 7; - DIRTY_WATERFILTER = 8; - } - repeated Type reset_types = 1; -} - -message ConsumableRuntime { - message Duration { - uint32 duration = 1; // 单位:hour [EN: Unit: hour] - } - - Duration side_brush = 1; //边刷 [EN: Side brush] - Duration rolling_brush = 2; //滚刷 [EN: Rolling brush] - Duration filter_mesh = 3; //滤网 [EN: Filter mesh] - Duration scrape = 4; //刮条 [EN: Scraper] - Duration sensor = 5; //传感器 [EN: Sensor] - Duration mop = 6; //拖布 [EN: Mop] - Duration dustbag = 7; //尘袋 [EN: Dust bag] - Duration dirty_watertank = 10; //污水预存水槽 [EN: Dirty water pre-storage tank] - Duration dirty_waterfilter = 11; //污水泵滤芯 [EN: Dirty water pump filter] - - uint64 last_time = 20; // 需要带上时间,单位纳秒,从1970.1.1开始的纳秒数。[EN: Needs to include time, unit nanoseconds, nanoseconds since 1970.1.1.] -} - -message ConsumableResponse { - ConsumableRuntime runtime = 1; -} diff --git a/proto-reference/consumable_pb2.py b/proto-reference/consumable_pb2.py deleted file mode 100644 index 4e6e2b2..0000000 --- a/proto-reference/consumable_pb2.py +++ /dev/null @@ -1,33 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: proto/cloud/consumable.proto -"""Generated protocol buffer code.""" -from google.protobuf.internal import builder as _builder -from google.protobuf import descriptor as _descriptor -from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import symbol_database as _symbol_database -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - - - -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1cproto/cloud/consumable.proto\x12\x0bproto.cloud\"\xe4\x01\n\x11\x43onsumableRequest\x12\x38\n\x0breset_types\x18\x01 \x03(\x0e\x32#.proto.cloud.ConsumableRequest.Type\"\x94\x01\n\x04Type\x12\x0e\n\nSIDE_BRUSH\x10\x00\x12\x11\n\rROLLING_BRUSH\x10\x01\x12\x0f\n\x0b\x46ILTER_MESH\x10\x02\x12\n\n\x06SCRAPE\x10\x03\x12\n\n\x06SENSOR\x10\x04\x12\x07\n\x03MOP\x10\x05\x12\x0b\n\x07\x44USTBAG\x10\x06\x12\x13\n\x0f\x44IRTY_WATERTANK\x10\x07\x12\x15\n\x11\x44IRTY_WATERFILTER\x10\x08\"\xe7\x04\n\x11\x43onsumableRuntime\x12;\n\nside_brush\x18\x01 \x01(\x0b\x32\'.proto.cloud.ConsumableRuntime.Duration\x12>\n\rrolling_brush\x18\x02 \x01(\x0b\x32\'.proto.cloud.ConsumableRuntime.Duration\x12<\n\x0b\x66ilter_mesh\x18\x03 \x01(\x0b\x32\'.proto.cloud.ConsumableRuntime.Duration\x12\x37\n\x06scrape\x18\x04 \x01(\x0b\x32\'.proto.cloud.ConsumableRuntime.Duration\x12\x37\n\x06sensor\x18\x05 \x01(\x0b\x32\'.proto.cloud.ConsumableRuntime.Duration\x12\x34\n\x03mop\x18\x06 \x01(\x0b\x32\'.proto.cloud.ConsumableRuntime.Duration\x12\x38\n\x07\x64ustbag\x18\x07 \x01(\x0b\x32\'.proto.cloud.ConsumableRuntime.Duration\x12@\n\x0f\x64irty_watertank\x18\n \x01(\x0b\x32\'.proto.cloud.ConsumableRuntime.Duration\x12\x42\n\x11\x64irty_waterfilter\x18\x0b \x01(\x0b\x32\'.proto.cloud.ConsumableRuntime.Duration\x12\x11\n\tlast_time\x18\x14 \x01(\x04\x1a\x1c\n\x08\x44uration\x12\x10\n\x08\x64uration\x18\x01 \x01(\r\"E\n\x12\x43onsumableResponse\x12/\n\x07runtime\x18\x01 \x01(\x0b\x32\x1e.proto.cloud.ConsumableRuntimeb\x06proto3') - -_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'proto.cloud.consumable_pb2', globals()) -if _descriptor._USE_C_DESCRIPTORS == False: - - DESCRIPTOR._options = None - _CONSUMABLEREQUEST._serialized_start=46 - _CONSUMABLEREQUEST._serialized_end=274 - _CONSUMABLEREQUEST_TYPE._serialized_start=126 - _CONSUMABLEREQUEST_TYPE._serialized_end=274 - _CONSUMABLERUNTIME._serialized_start=277 - _CONSUMABLERUNTIME._serialized_end=892 - _CONSUMABLERUNTIME_DURATION._serialized_start=864 - _CONSUMABLERUNTIME_DURATION._serialized_end=892 - _CONSUMABLERESPONSE._serialized_start=894 - _CONSUMABLERESPONSE._serialized_end=963 -# @@protoc_insertion_point(module_scope) diff --git a/proto-reference/consumable_pb2.pyi b/proto-reference/consumable_pb2.pyi deleted file mode 100644 index b26f984..0000000 --- a/proto-reference/consumable_pb2.pyi +++ /dev/null @@ -1,59 +0,0 @@ -from google.protobuf.internal import containers as _containers -from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper -from google.protobuf import descriptor as _descriptor -from google.protobuf import message as _message -from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union - -DESCRIPTOR: _descriptor.FileDescriptor - -class ConsumableRequest(_message.Message): - __slots__ = ["reset_types"] - class Type(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - DIRTY_WATERFILTER: ConsumableRequest.Type - DIRTY_WATERTANK: ConsumableRequest.Type - DUSTBAG: ConsumableRequest.Type - FILTER_MESH: ConsumableRequest.Type - MOP: ConsumableRequest.Type - RESET_TYPES_FIELD_NUMBER: _ClassVar[int] - ROLLING_BRUSH: ConsumableRequest.Type - SCRAPE: ConsumableRequest.Type - SENSOR: ConsumableRequest.Type - SIDE_BRUSH: ConsumableRequest.Type - reset_types: _containers.RepeatedScalarFieldContainer[ConsumableRequest.Type] - def __init__(self, reset_types: _Optional[_Iterable[_Union[ConsumableRequest.Type, str]]] = ...) -> None: ... - -class ConsumableResponse(_message.Message): - __slots__ = ["runtime"] - RUNTIME_FIELD_NUMBER: _ClassVar[int] - runtime: ConsumableRuntime - def __init__(self, runtime: _Optional[_Union[ConsumableRuntime, _Mapping]] = ...) -> None: ... - -class ConsumableRuntime(_message.Message): - __slots__ = ["dirty_waterfilter", "dirty_watertank", "dustbag", "filter_mesh", "last_time", "mop", "rolling_brush", "scrape", "sensor", "side_brush"] - class Duration(_message.Message): - __slots__ = ["duration"] - DURATION_FIELD_NUMBER: _ClassVar[int] - duration: int - def __init__(self, duration: _Optional[int] = ...) -> None: ... - DIRTY_WATERFILTER_FIELD_NUMBER: _ClassVar[int] - DIRTY_WATERTANK_FIELD_NUMBER: _ClassVar[int] - DUSTBAG_FIELD_NUMBER: _ClassVar[int] - FILTER_MESH_FIELD_NUMBER: _ClassVar[int] - LAST_TIME_FIELD_NUMBER: _ClassVar[int] - MOP_FIELD_NUMBER: _ClassVar[int] - ROLLING_BRUSH_FIELD_NUMBER: _ClassVar[int] - SCRAPE_FIELD_NUMBER: _ClassVar[int] - SENSOR_FIELD_NUMBER: _ClassVar[int] - SIDE_BRUSH_FIELD_NUMBER: _ClassVar[int] - dirty_waterfilter: ConsumableRuntime.Duration - dirty_watertank: ConsumableRuntime.Duration - dustbag: ConsumableRuntime.Duration - filter_mesh: ConsumableRuntime.Duration - last_time: int - mop: ConsumableRuntime.Duration - rolling_brush: ConsumableRuntime.Duration - scrape: ConsumableRuntime.Duration - sensor: ConsumableRuntime.Duration - side_brush: ConsumableRuntime.Duration - def __init__(self, side_brush: _Optional[_Union[ConsumableRuntime.Duration, _Mapping]] = ..., rolling_brush: _Optional[_Union[ConsumableRuntime.Duration, _Mapping]] = ..., filter_mesh: _Optional[_Union[ConsumableRuntime.Duration, _Mapping]] = ..., scrape: _Optional[_Union[ConsumableRuntime.Duration, _Mapping]] = ..., sensor: _Optional[_Union[ConsumableRuntime.Duration, _Mapping]] = ..., mop: _Optional[_Union[ConsumableRuntime.Duration, _Mapping]] = ..., dustbag: _Optional[_Union[ConsumableRuntime.Duration, _Mapping]] = ..., dirty_watertank: _Optional[_Union[ConsumableRuntime.Duration, _Mapping]] = ..., dirty_waterfilter: _Optional[_Union[ConsumableRuntime.Duration, _Mapping]] = ..., last_time: _Optional[int] = ...) -> None: ... diff --git a/proto-reference/control.proto b/proto-reference/control.proto deleted file mode 100644 index 313b4ac..0000000 --- a/proto-reference/control.proto +++ /dev/null @@ -1,197 +0,0 @@ -syntax = "proto3"; - -// option optimize_for = LITE_RUNTIME; - -package proto.cloud; - -import "proto/cloud/common.proto"; -import "proto/cloud/clean_param.proto"; - -// 遥控器方向 [EN: Remote control direction] -message RemoteCtrl { - enum Direction { - BRAKE = 0; // App可及时停止前面的遥控指令紧急刹车(不是退出遥控模式),比如在按键抬起时下发 [EN: App can immediately stop the previous remote control command for emergency braking (not exiting remote control mode), such as when a button is released] - FORWARD = 1; - BACK = 2; - LEFT = 3; - RIGHT = 4; - } - // App下发任意FORWARD/BACK/LEFT/RIGHT即进入遥控模式 [EN: App sends any FORWARD/BACK/LEFT/RIGHT to enter remote control mode] - Direction direction = 1; -} - -// 通用全局清扫,清洁参数走 clean_param 中 clean_param 参数 [EN: General global cleaning, cleaning parameters use clean_param from clean_param] -// 定制全局清扫,设置每个房间不同的清扫参数走 stream 定制参数 - x10 开始不受支持 [EN: Custom global cleaning, setting different cleaning parameters for each room uses stream custom parameters - not supported from x10 onwards] -// 通过 MapEditRequest.RoomsCustom.custom_enable 判断使用哪种参数 - x10 开始不受支持 [EN: Use MapEditRequest.RoomsCustom.custom_enable to determine which parameters to use - not supported from x10 onwards] -message AutoClean { - // 总清扫次数 [EN: Total cleaning times] - uint32 clean_times = 1; // 清扫次数,非 0 有效 [EN: Cleaning times, valid when non-zero] - // 强制建图(即使当前有图也会重新建图) [EN: Force mapping (will remap even if current map exists)] - bool force_mapping = 2; -} - -// 通用房间清扫,清洁参数走 clean_param 中 area_clean_param 参数 [EN: General room cleaning, cleaning parameters use area_clean_param from clean_param] -// 定制房间清扫,设置每个房间不同的清扫参数走 stream 定制参数(通过 MapEditRequest.RoomsCustom 设置) [EN: Custom room cleaning, setting different cleaning parameters for each room uses stream custom parameters (set via MapEditRequest.RoomsCustom)] -// 通过 type 判断使用哪种参数 [EN: Use type to determine which parameters to use] -message SelectRoomsClean { - message Room { - uint32 id = 1; - uint32 order = 2; - } - repeated Room rooms = 1; // 定制房间清扫该字段也要传,虽然和 stream 中的部分信息重复 [EN: This field must also be passed for custom room cleaning, although it overlaps with some information in stream] - uint32 clean_times = 2; // 通用清扫次数,非 0 有效。定制清扫次数放在 stream 中 [EN: General cleaning times, valid when non-zero. Custom cleaning times are in stream] - - uint32 map_id = 3; // map 的 id 号 [EN: Map ID number] - uint32 releases = 4; // map 的大版本修正号 [EN: Map major version revision number] - - enum Mode { - GENERAL = 0; // 通用清扫 [EN: General cleaning] - CUSTOMIZE = 1; // 定制清扫 [EN: Custom cleaning] - } - Mode mode = 5; -} - -message SelectZonesClean { - message Zone { - Quadrangle quadrangle = 1; - uint32 clean_times = 2; // 清扫次数,非 0 有效 [EN: Cleaning times, valid when non-zero] - } - repeated Zone zones = 1; - - uint32 map_id = 2; // map 的 id 号 [EN: Map ID number] - uint32 releases = 3; // map 的大版本修正号 [EN: Map major version revision number] - - enum Type { - NORMAL = 0; // 普通清扫 [EN: Normal cleaning] - POOP_CLEANING = 1; // 便便补扫 [EN: Poop re-cleaning] - } - Type type = 4; -} - -message SceneClean { - uint32 scene_id = 1; -} - -message SpotClean { - uint32 clean_times = 1; // 清扫次数,非 0 有效 [EN: Cleaning times, valid when non-zero] -} - -message Goto { - Point destination = 1; - - enum Type { - GOTO_DESTINATION = 0; // 只去目的地 [EN: Go to destination only] - GOTO_SPOT = 1; - GOTO_AUTO = 2; - } - Type type = 2; - uint32 clean_times = 3; // 清扫次数,非 0 有效,SPOT 清扫才有效 [EN: Cleaning times, valid when non-zero, only effective for SPOT cleaning] - - uint32 map_id = 4; // map 的 id 号 [EN: Map ID number] - uint32 releases = 5; // map 的大版本修正号 [EN: Map major version revision number] -} - -message ScheduleAutoClean { - Fan fan = 1; - MopMode mop_mode = 2; - CleanType clean_type = 3; - CleanExtent clean_extent = 4; -} - -message ScheduleRoomsClean { - Fan fan = 1; - MopMode mop_mode = 2; - CleanType clean_type = 3; - CleanExtent clean_extent = 4; - - message Room { - uint32 id = 1; - uint32 order = 2; - } - repeated Room rooms = 5; - - uint32 map_id = 6; - uint32 releases = 7; // map 的大版本修正号 [EN: Map major version revision number] -} - -// 用户设置的全局巡航点通过地图编辑下发 [EN: User-set global cruise points are sent via map editing] -message GlobalCruise { - uint32 map_id = 1; - uint32 releases = 2; // map 的大版本修正号 [EN: Map major version revision number] -} - -message PointCruise { - Point points = 1; - uint32 map_id = 2; // map 的 id 号 [EN: Map ID number] - uint32 releases = 3; // map 的大版本修正号 [EN: Map major version revision number] -} - -message ZonesCruise { - repeated Point points = 1; - uint32 map_id = 2; // map 的 id 号 [EN: Map ID number] - uint32 releases = 3; // map 的大版本修正号 [EN: Map major version revision number] -} - -message ScheduleCruise { - uint32 map_id = 1; - uint32 releases = 2; // map 的大版本修正号 [EN: Map major version revision number] -} - -message ModeCtrlRequest { - enum Method { - START_AUTO_CLEAN = 0; // 开始全局自动清扫 [EN: Start global auto cleaning] - START_SELECT_ROOMS_CLEAN = 1; // 开始选房清扫 [EN: Start selected rooms cleaning] - START_SELECT_ZONES_CLEAN = 2; // 开始选区清扫 [EN: Start selected zones cleaning] - START_SPOT_CLEAN = 3; // 开始当前位置局部清扫 [EN: Start spot cleaning at current position] - START_GOTO_CLEAN = 4; // 开始移动位置局部清扫 [EN: Start spot cleaning at moved position] - START_RC_CLEAN = 5; // 开始遥控清扫 [EN: Start remote control cleaning] - START_GOHOME = 6; // 开始回充 [EN: Start return to charge] - START_SCHEDULE_AUTO_CLEAN = 7; // 预约自动清扫,适用于定时下发消息的方案,后续项目不使用 [EN: Scheduled auto cleaning, for timed message delivery schemes, not used in subsequent projects] - START_SCHEDULE_ROOMS_CLEAN = 8; // 预约房间清扫,适用于定时下发消息的方案,后续项目不使用 [EN: Scheduled rooms cleaning, for timed message delivery schemes, not used in subsequent projects] - START_FAST_MAPPING = 9; // 快速建图 [EN: Fast mapping] - START_GOWASH = 10; // 开始回洗 [EN: Start return to wash] - STOP_TASK = 12; // 停止清扫(巡航)任务 [EN: Stop cleaning (cruise) task] - PAUSE_TASK = 13; // 暂停清扫(巡航)任务 [EN: Pause cleaning (cruise) task] - RESUME_TASK = 14; // 恢复清扫(巡航)任务 [EN: Resume cleaning (cruise) task] - STOP_GOHOME = 15; // 停止回充 [EN: Stop return to charge] - STOP_RC_CLEAN = 16; // 停止遥控清扫 [EN: Stop remote control cleaning] - STOP_GOWASH = 17; // 停止回洗 [EN: Stop return to wash] - STOP_SMART_FOLLOW = 18; // 停止智能跟随 [EN: Stop smart follow] - START_GLOBAL_CRUISE = 20; // 全屋巡航 [EN: Whole house cruise] - START_POINT_CRUISE = 21; // 精准巡航 [EN: Precise cruise] - START_ZONES_CRUISE = 22; // 选区巡航 [EN: Selected zones cruise] - START_SCHEDULE_CRUISE = 23; // 预约巡航,适用于定时下发消息的方案,后续项目不使用 [EN: Scheduled cruise, for timed message delivery schemes, not used in subsequent projects] - START_SCENE_CLEAN = 24; // 开始场景清扫 [EN: Start scene cleaning] - START_MAPPING_THEN_CLEAN = 25; // 先建图再清扫 [EN: Map first then clean] - } - - Method method = 1; - uint32 seq = 2; - - oneof Param { - AutoClean auto_clean = 3; - SelectRoomsClean select_rooms_clean = 4; - SelectZonesClean select_zones_clean = 5; - SpotClean spot_clean = 6; - Goto go_to = 7; - ScheduleAutoClean sche_auto_clean = 8; - ScheduleRoomsClean sche_rooms_clean = 9; - GlobalCruise global_cruise = 10; - PointCruise point_cruise = 11; - ZonesCruise zones_cruise = 12; - ScheduleCruise sche_cruise = 13; - SceneClean scene_clean = 14; - } -} - -// TODO: 可以考虑不返回,执行成功后状态会相应改变. [EN: TODO: Consider not returning, status will change accordingly after successful execution.] -message ModeCtrlResponse { - ModeCtrlRequest.Method method = 1; - uint32 seq = 2; // 返回 ModeCtrlRequest 相同的 seq 值. [EN: Returns the same seq value as ModeCtrlRequest.] - - enum Result { - SUCCESS = 0; - FAILED = 1; - } - Result result = 3; -} diff --git a/proto-reference/control_pb2.py b/proto-reference/control_pb2.py deleted file mode 100644 index 110beb4..0000000 --- a/proto-reference/control_pb2.py +++ /dev/null @@ -1,74 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: proto/cloud/control.proto -"""Generated protocol buffer code.""" -from google.protobuf import descriptor as _descriptor -from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import symbol_database as _symbol_database -from google.protobuf.internal import builder as _builder - -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - -from ...proto.cloud import \ - clean_param_pb2 as proto_dot_cloud_dot_clean__param__pb2 -from ...proto.cloud import common_pb2 as proto_dot_cloud_dot_common__pb2 - -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x19proto/cloud/control.proto\x12\x0bproto.cloud\x1a\x18proto/cloud/common.proto\x1a\x1dproto/cloud/clean_param.proto\"\x86\x01\n\nRemoteCtrl\x12\x34\n\tdirection\x18\x01 \x01(\x0e\x32!.proto.cloud.RemoteCtrl.Direction\"B\n\tDirection\x12\t\n\x05\x42RAKE\x10\x00\x12\x0b\n\x07\x46ORWARD\x10\x01\x12\x08\n\x04\x42\x41\x43K\x10\x02\x12\x08\n\x04LEFT\x10\x03\x12\t\n\x05RIGHT\x10\x04\"7\n\tAutoClean\x12\x13\n\x0b\x63lean_times\x18\x01 \x01(\r\x12\x15\n\rforce_mapping\x18\x02 \x01(\x08\"\xf5\x01\n\x10SelectRoomsClean\x12\x31\n\x05rooms\x18\x01 \x03(\x0b\x32\".proto.cloud.SelectRoomsClean.Room\x12\x13\n\x0b\x63lean_times\x18\x02 \x01(\r\x12\x0e\n\x06map_id\x18\x03 \x01(\r\x12\x10\n\x08releases\x18\x04 \x01(\r\x12\x30\n\x04mode\x18\x05 \x01(\x0e\x32\".proto.cloud.SelectRoomsClean.Mode\x1a!\n\x04Room\x12\n\n\x02id\x18\x01 \x01(\r\x12\r\n\x05order\x18\x02 \x01(\r\"\"\n\x04Mode\x12\x0b\n\x07GENERAL\x10\x00\x12\r\n\tCUSTOMIZE\x10\x01\"\x8a\x02\n\x10SelectZonesClean\x12\x31\n\x05zones\x18\x01 \x03(\x0b\x32\".proto.cloud.SelectZonesClean.Zone\x12\x0e\n\x06map_id\x18\x02 \x01(\r\x12\x10\n\x08releases\x18\x03 \x01(\r\x12\x30\n\x04type\x18\x04 \x01(\x0e\x32\".proto.cloud.SelectZonesClean.Type\x1aH\n\x04Zone\x12+\n\nquadrangle\x18\x01 \x01(\x0b\x32\x17.proto.cloud.Quadrangle\x12\x13\n\x0b\x63lean_times\x18\x02 \x01(\r\"%\n\x04Type\x12\n\n\x06NORMAL\x10\x00\x12\x11\n\rPOOP_CLEANING\x10\x01\"\x1e\n\nSceneClean\x12\x10\n\x08scene_id\x18\x01 \x01(\r\" \n\tSpotClean\x12\x13\n\x0b\x63lean_times\x18\x01 \x01(\r\"\xc8\x01\n\x04Goto\x12\'\n\x0b\x64\x65stination\x18\x01 \x01(\x0b\x32\x12.proto.cloud.Point\x12$\n\x04type\x18\x02 \x01(\x0e\x32\x16.proto.cloud.Goto.Type\x12\x13\n\x0b\x63lean_times\x18\x03 \x01(\r\x12\x0e\n\x06map_id\x18\x04 \x01(\r\x12\x10\n\x08releases\x18\x05 \x01(\r\":\n\x04Type\x12\x14\n\x10GOTO_DESTINATION\x10\x00\x12\r\n\tGOTO_SPOT\x10\x01\x12\r\n\tGOTO_AUTO\x10\x02\"\xb6\x01\n\x11ScheduleAutoClean\x12\x1d\n\x03\x66\x61n\x18\x01 \x01(\x0b\x32\x10.proto.cloud.Fan\x12&\n\x08mop_mode\x18\x02 \x01(\x0b\x32\x14.proto.cloud.MopMode\x12*\n\nclean_type\x18\x03 \x01(\x0b\x32\x16.proto.cloud.CleanType\x12.\n\x0c\x63lean_extent\x18\x04 \x01(\x0b\x32\x18.proto.cloud.CleanExtent\"\xb1\x02\n\x12ScheduleRoomsClean\x12\x1d\n\x03\x66\x61n\x18\x01 \x01(\x0b\x32\x10.proto.cloud.Fan\x12&\n\x08mop_mode\x18\x02 \x01(\x0b\x32\x14.proto.cloud.MopMode\x12*\n\nclean_type\x18\x03 \x01(\x0b\x32\x16.proto.cloud.CleanType\x12.\n\x0c\x63lean_extent\x18\x04 \x01(\x0b\x32\x18.proto.cloud.CleanExtent\x12\x33\n\x05rooms\x18\x05 \x03(\x0b\x32$.proto.cloud.ScheduleRoomsClean.Room\x12\x0e\n\x06map_id\x18\x06 \x01(\r\x12\x10\n\x08releases\x18\x07 \x01(\r\x1a!\n\x04Room\x12\n\n\x02id\x18\x01 \x01(\r\x12\r\n\x05order\x18\x02 \x01(\r\"0\n\x0cGlobalCruise\x12\x0e\n\x06map_id\x18\x01 \x01(\r\x12\x10\n\x08releases\x18\x02 \x01(\r\"S\n\x0bPointCruise\x12\"\n\x06points\x18\x01 \x01(\x0b\x32\x12.proto.cloud.Point\x12\x0e\n\x06map_id\x18\x02 \x01(\r\x12\x10\n\x08releases\x18\x03 \x01(\r\"S\n\x0bZonesCruise\x12\"\n\x06points\x18\x01 \x03(\x0b\x32\x12.proto.cloud.Point\x12\x0e\n\x06map_id\x18\x02 \x01(\r\x12\x10\n\x08releases\x18\x03 \x01(\r\"2\n\x0eScheduleCruise\x12\x0e\n\x06map_id\x18\x01 \x01(\r\x12\x10\n\x08releases\x18\x02 \x01(\r\"\xf7\t\n\x0fModeCtrlRequest\x12\x33\n\x06method\x18\x01 \x01(\x0e\x32#.proto.cloud.ModeCtrlRequest.Method\x12\x0b\n\x03seq\x18\x02 \x01(\r\x12,\n\nauto_clean\x18\x03 \x01(\x0b\x32\x16.proto.cloud.AutoCleanH\x00\x12;\n\x12select_rooms_clean\x18\x04 \x01(\x0b\x32\x1d.proto.cloud.SelectRoomsCleanH\x00\x12;\n\x12select_zones_clean\x18\x05 \x01(\x0b\x32\x1d.proto.cloud.SelectZonesCleanH\x00\x12,\n\nspot_clean\x18\x06 \x01(\x0b\x32\x16.proto.cloud.SpotCleanH\x00\x12\"\n\x05go_to\x18\x07 \x01(\x0b\x32\x11.proto.cloud.GotoH\x00\x12\x39\n\x0fsche_auto_clean\x18\x08 \x01(\x0b\x32\x1e.proto.cloud.ScheduleAutoCleanH\x00\x12;\n\x10sche_rooms_clean\x18\t \x01(\x0b\x32\x1f.proto.cloud.ScheduleRoomsCleanH\x00\x12\x32\n\rglobal_cruise\x18\n \x01(\x0b\x32\x19.proto.cloud.GlobalCruiseH\x00\x12\x30\n\x0cpoint_cruise\x18\x0b \x01(\x0b\x32\x18.proto.cloud.PointCruiseH\x00\x12\x30\n\x0czones_cruise\x18\x0c \x01(\x0b\x32\x18.proto.cloud.ZonesCruiseH\x00\x12\x32\n\x0bsche_cruise\x18\r \x01(\x0b\x32\x1b.proto.cloud.ScheduleCruiseH\x00\x12.\n\x0bscene_clean\x18\x0e \x01(\x0b\x32\x17.proto.cloud.SceneCleanH\x00\"\xaa\x04\n\x06Method\x12\x14\n\x10START_AUTO_CLEAN\x10\x00\x12\x1c\n\x18START_SELECT_ROOMS_CLEAN\x10\x01\x12\x1c\n\x18START_SELECT_ZONES_CLEAN\x10\x02\x12\x14\n\x10START_SPOT_CLEAN\x10\x03\x12\x14\n\x10START_GOTO_CLEAN\x10\x04\x12\x12\n\x0eSTART_RC_CLEAN\x10\x05\x12\x10\n\x0cSTART_GOHOME\x10\x06\x12\x1d\n\x19START_SCHEDULE_AUTO_CLEAN\x10\x07\x12\x1e\n\x1aSTART_SCHEDULE_ROOMS_CLEAN\x10\x08\x12\x16\n\x12START_FAST_MAPPING\x10\t\x12\x10\n\x0cSTART_GOWASH\x10\n\x12\r\n\tSTOP_TASK\x10\x0c\x12\x0e\n\nPAUSE_TASK\x10\r\x12\x0f\n\x0bRESUME_TASK\x10\x0e\x12\x0f\n\x0bSTOP_GOHOME\x10\x0f\x12\x11\n\rSTOP_RC_CLEAN\x10\x10\x12\x0f\n\x0bSTOP_GOWASH\x10\x11\x12\x15\n\x11STOP_SMART_FOLLOW\x10\x12\x12\x17\n\x13START_GLOBAL_CRUISE\x10\x14\x12\x16\n\x12START_POINT_CRUISE\x10\x15\x12\x16\n\x12START_ZONES_CRUISE\x10\x16\x12\x19\n\x15START_SCHEDULE_CRUISE\x10\x17\x12\x15\n\x11START_SCENE_CLEAN\x10\x18\x12\x1c\n\x18START_MAPPING_THEN_CLEAN\x10\x19\x42\x07\n\x05Param\"\xad\x01\n\x10ModeCtrlResponse\x12\x33\n\x06method\x18\x01 \x01(\x0e\x32#.proto.cloud.ModeCtrlRequest.Method\x12\x0b\n\x03seq\x18\x02 \x01(\r\x12\x34\n\x06result\x18\x03 \x01(\x0e\x32$.proto.cloud.ModeCtrlResponse.Result\"!\n\x06Result\x12\x0b\n\x07SUCCESS\x10\x00\x12\n\n\x06\x46\x41ILED\x10\x01\x62\x06proto3') - -_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'proto.cloud.control_pb2', globals()) -if _descriptor._USE_C_DESCRIPTORS == False: - - DESCRIPTOR._options = None - _REMOTECTRL._serialized_start=100 - _REMOTECTRL._serialized_end=234 - _REMOTECTRL_DIRECTION._serialized_start=168 - _REMOTECTRL_DIRECTION._serialized_end=234 - _AUTOCLEAN._serialized_start=236 - _AUTOCLEAN._serialized_end=291 - _SELECTROOMSCLEAN._serialized_start=294 - _SELECTROOMSCLEAN._serialized_end=539 - _SELECTROOMSCLEAN_ROOM._serialized_start=470 - _SELECTROOMSCLEAN_ROOM._serialized_end=503 - _SELECTROOMSCLEAN_MODE._serialized_start=505 - _SELECTROOMSCLEAN_MODE._serialized_end=539 - _SELECTZONESCLEAN._serialized_start=542 - _SELECTZONESCLEAN._serialized_end=808 - _SELECTZONESCLEAN_ZONE._serialized_start=697 - _SELECTZONESCLEAN_ZONE._serialized_end=769 - _SELECTZONESCLEAN_TYPE._serialized_start=771 - _SELECTZONESCLEAN_TYPE._serialized_end=808 - _SCENECLEAN._serialized_start=810 - _SCENECLEAN._serialized_end=840 - _SPOTCLEAN._serialized_start=842 - _SPOTCLEAN._serialized_end=874 - _GOTO._serialized_start=877 - _GOTO._serialized_end=1077 - _GOTO_TYPE._serialized_start=1019 - _GOTO_TYPE._serialized_end=1077 - _SCHEDULEAUTOCLEAN._serialized_start=1080 - _SCHEDULEAUTOCLEAN._serialized_end=1262 - _SCHEDULEROOMSCLEAN._serialized_start=1265 - _SCHEDULEROOMSCLEAN._serialized_end=1570 - _SCHEDULEROOMSCLEAN_ROOM._serialized_start=470 - _SCHEDULEROOMSCLEAN_ROOM._serialized_end=503 - _GLOBALCRUISE._serialized_start=1572 - _GLOBALCRUISE._serialized_end=1620 - _POINTCRUISE._serialized_start=1622 - _POINTCRUISE._serialized_end=1705 - _ZONESCRUISE._serialized_start=1707 - _ZONESCRUISE._serialized_end=1790 - _SCHEDULECRUISE._serialized_start=1792 - _SCHEDULECRUISE._serialized_end=1842 - _MODECTRLREQUEST._serialized_start=1845 - _MODECTRLREQUEST._serialized_end=3116 - _MODECTRLREQUEST_METHOD._serialized_start=2553 - _MODECTRLREQUEST_METHOD._serialized_end=3107 - _MODECTRLRESPONSE._serialized_start=3119 - _MODECTRLRESPONSE._serialized_end=3292 - _MODECTRLRESPONSE_RESULT._serialized_start=3259 - _MODECTRLRESPONSE_RESULT._serialized_end=3292 -# @@protoc_insertion_point(module_scope) diff --git a/proto-reference/control_pb2.pyi b/proto-reference/control_pb2.pyi deleted file mode 100644 index fff5902..0000000 --- a/proto-reference/control_pb2.pyi +++ /dev/null @@ -1,260 +0,0 @@ -from typing import ClassVar as _ClassVar -from typing import Iterable as _Iterable -from typing import Mapping as _Mapping -from typing import Optional as _Optional -from typing import Union as _Union - -from google.protobuf import descriptor as _descriptor -from google.protobuf import message as _message -from google.protobuf.internal import containers as _containers -from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper - -from ...proto.cloud import clean_param_pb2 as _clean_param_pb2 -from ...proto.cloud import common_pb2 as _common_pb2 - -DESCRIPTOR: _descriptor.FileDescriptor - -class AutoClean(_message.Message): - __slots__ = ["clean_times", "force_mapping"] - CLEAN_TIMES_FIELD_NUMBER: _ClassVar[int] - FORCE_MAPPING_FIELD_NUMBER: _ClassVar[int] - clean_times: int - force_mapping: bool - def __init__(self, clean_times: _Optional[int] = ..., force_mapping: bool = ...) -> None: ... - -class GlobalCruise(_message.Message): - __slots__ = ["map_id", "releases"] - MAP_ID_FIELD_NUMBER: _ClassVar[int] - RELEASES_FIELD_NUMBER: _ClassVar[int] - map_id: int - releases: int - def __init__(self, map_id: _Optional[int] = ..., releases: _Optional[int] = ...) -> None: ... - -class Goto(_message.Message): - __slots__ = ["clean_times", "destination", "map_id", "releases", "type"] - class Type(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - CLEAN_TIMES_FIELD_NUMBER: _ClassVar[int] - DESTINATION_FIELD_NUMBER: _ClassVar[int] - GOTO_AUTO: Goto.Type - GOTO_DESTINATION: Goto.Type - GOTO_SPOT: Goto.Type - MAP_ID_FIELD_NUMBER: _ClassVar[int] - RELEASES_FIELD_NUMBER: _ClassVar[int] - TYPE_FIELD_NUMBER: _ClassVar[int] - clean_times: int - destination: _common_pb2.Point - map_id: int - releases: int - type: Goto.Type - def __init__(self, destination: _Optional[_Union[_common_pb2.Point, _Mapping]] = ..., type: _Optional[_Union[Goto.Type, str]] = ..., clean_times: _Optional[int] = ..., map_id: _Optional[int] = ..., releases: _Optional[int] = ...) -> None: ... - -class ModeCtrlRequest(_message.Message): - __slots__ = ["auto_clean", "global_cruise", "go_to", "method", "point_cruise", "scene_clean", "sche_auto_clean", "sche_cruise", "sche_rooms_clean", "select_rooms_clean", "select_zones_clean", "seq", "spot_clean", "zones_cruise"] - class Method(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - AUTO_CLEAN_FIELD_NUMBER: _ClassVar[int] - GLOBAL_CRUISE_FIELD_NUMBER: _ClassVar[int] - GO_TO_FIELD_NUMBER: _ClassVar[int] - METHOD_FIELD_NUMBER: _ClassVar[int] - PAUSE_TASK: ModeCtrlRequest.Method - POINT_CRUISE_FIELD_NUMBER: _ClassVar[int] - RESUME_TASK: ModeCtrlRequest.Method - SCENE_CLEAN_FIELD_NUMBER: _ClassVar[int] - SCHE_AUTO_CLEAN_FIELD_NUMBER: _ClassVar[int] - SCHE_CRUISE_FIELD_NUMBER: _ClassVar[int] - SCHE_ROOMS_CLEAN_FIELD_NUMBER: _ClassVar[int] - SELECT_ROOMS_CLEAN_FIELD_NUMBER: _ClassVar[int] - SELECT_ZONES_CLEAN_FIELD_NUMBER: _ClassVar[int] - SEQ_FIELD_NUMBER: _ClassVar[int] - SPOT_CLEAN_FIELD_NUMBER: _ClassVar[int] - START_AUTO_CLEAN: ModeCtrlRequest.Method - START_FAST_MAPPING: ModeCtrlRequest.Method - START_GLOBAL_CRUISE: ModeCtrlRequest.Method - START_GOHOME: ModeCtrlRequest.Method - START_GOTO_CLEAN: ModeCtrlRequest.Method - START_GOWASH: ModeCtrlRequest.Method - START_MAPPING_THEN_CLEAN: ModeCtrlRequest.Method - START_POINT_CRUISE: ModeCtrlRequest.Method - START_RC_CLEAN: ModeCtrlRequest.Method - START_SCENE_CLEAN: ModeCtrlRequest.Method - START_SCHEDULE_AUTO_CLEAN: ModeCtrlRequest.Method - START_SCHEDULE_CRUISE: ModeCtrlRequest.Method - START_SCHEDULE_ROOMS_CLEAN: ModeCtrlRequest.Method - START_SELECT_ROOMS_CLEAN: ModeCtrlRequest.Method - START_SELECT_ZONES_CLEAN: ModeCtrlRequest.Method - START_SPOT_CLEAN: ModeCtrlRequest.Method - START_ZONES_CRUISE: ModeCtrlRequest.Method - STOP_GOHOME: ModeCtrlRequest.Method - STOP_GOWASH: ModeCtrlRequest.Method - STOP_RC_CLEAN: ModeCtrlRequest.Method - STOP_SMART_FOLLOW: ModeCtrlRequest.Method - STOP_TASK: ModeCtrlRequest.Method - ZONES_CRUISE_FIELD_NUMBER: _ClassVar[int] - auto_clean: AutoClean - global_cruise: GlobalCruise - go_to: Goto - method: ModeCtrlRequest.Method - point_cruise: PointCruise - scene_clean: SceneClean - sche_auto_clean: ScheduleAutoClean - sche_cruise: ScheduleCruise - sche_rooms_clean: ScheduleRoomsClean - select_rooms_clean: SelectRoomsClean - select_zones_clean: SelectZonesClean - seq: int - spot_clean: SpotClean - zones_cruise: ZonesCruise - def __init__(self, method: _Optional[_Union[ModeCtrlRequest.Method, str]] = ..., seq: _Optional[int] = ..., auto_clean: _Optional[_Union[AutoClean, _Mapping]] = ..., select_rooms_clean: _Optional[_Union[SelectRoomsClean, _Mapping]] = ..., select_zones_clean: _Optional[_Union[SelectZonesClean, _Mapping]] = ..., spot_clean: _Optional[_Union[SpotClean, _Mapping]] = ..., go_to: _Optional[_Union[Goto, _Mapping]] = ..., sche_auto_clean: _Optional[_Union[ScheduleAutoClean, _Mapping]] = ..., sche_rooms_clean: _Optional[_Union[ScheduleRoomsClean, _Mapping]] = ..., global_cruise: _Optional[_Union[GlobalCruise, _Mapping]] = ..., point_cruise: _Optional[_Union[PointCruise, _Mapping]] = ..., zones_cruise: _Optional[_Union[ZonesCruise, _Mapping]] = ..., sche_cruise: _Optional[_Union[ScheduleCruise, _Mapping]] = ..., scene_clean: _Optional[_Union[SceneClean, _Mapping]] = ...) -> None: ... - -class ModeCtrlResponse(_message.Message): - __slots__ = ["method", "result", "seq"] - class Result(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - FAILED: ModeCtrlResponse.Result - METHOD_FIELD_NUMBER: _ClassVar[int] - RESULT_FIELD_NUMBER: _ClassVar[int] - SEQ_FIELD_NUMBER: _ClassVar[int] - SUCCESS: ModeCtrlResponse.Result - method: ModeCtrlRequest.Method - result: ModeCtrlResponse.Result - seq: int - def __init__(self, method: _Optional[_Union[ModeCtrlRequest.Method, str]] = ..., seq: _Optional[int] = ..., result: _Optional[_Union[ModeCtrlResponse.Result, str]] = ...) -> None: ... - -class PointCruise(_message.Message): - __slots__ = ["map_id", "points", "releases"] - MAP_ID_FIELD_NUMBER: _ClassVar[int] - POINTS_FIELD_NUMBER: _ClassVar[int] - RELEASES_FIELD_NUMBER: _ClassVar[int] - map_id: int - points: _common_pb2.Point - releases: int - def __init__(self, points: _Optional[_Union[_common_pb2.Point, _Mapping]] = ..., map_id: _Optional[int] = ..., releases: _Optional[int] = ...) -> None: ... - -class RemoteCtrl(_message.Message): - __slots__ = ["direction"] - class Direction(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - BACK: RemoteCtrl.Direction - BRAKE: RemoteCtrl.Direction - DIRECTION_FIELD_NUMBER: _ClassVar[int] - FORWARD: RemoteCtrl.Direction - LEFT: RemoteCtrl.Direction - RIGHT: RemoteCtrl.Direction - direction: RemoteCtrl.Direction - def __init__(self, direction: _Optional[_Union[RemoteCtrl.Direction, str]] = ...) -> None: ... - -class SceneClean(_message.Message): - __slots__ = ["scene_id"] - SCENE_ID_FIELD_NUMBER: _ClassVar[int] - scene_id: int - def __init__(self, scene_id: _Optional[int] = ...) -> None: ... - -class ScheduleAutoClean(_message.Message): - __slots__ = ["clean_extent", "clean_type", "fan", "mop_mode"] - CLEAN_EXTENT_FIELD_NUMBER: _ClassVar[int] - CLEAN_TYPE_FIELD_NUMBER: _ClassVar[int] - FAN_FIELD_NUMBER: _ClassVar[int] - MOP_MODE_FIELD_NUMBER: _ClassVar[int] - clean_extent: _clean_param_pb2.CleanExtent - clean_type: _clean_param_pb2.CleanType - fan: _clean_param_pb2.Fan - mop_mode: _clean_param_pb2.MopMode - def __init__(self, fan: _Optional[_Union[_clean_param_pb2.Fan, _Mapping]] = ..., mop_mode: _Optional[_Union[_clean_param_pb2.MopMode, _Mapping]] = ..., clean_type: _Optional[_Union[_clean_param_pb2.CleanType, _Mapping]] = ..., clean_extent: _Optional[_Union[_clean_param_pb2.CleanExtent, _Mapping]] = ...) -> None: ... - -class ScheduleCruise(_message.Message): - __slots__ = ["map_id", "releases"] - MAP_ID_FIELD_NUMBER: _ClassVar[int] - RELEASES_FIELD_NUMBER: _ClassVar[int] - map_id: int - releases: int - def __init__(self, map_id: _Optional[int] = ..., releases: _Optional[int] = ...) -> None: ... - -class ScheduleRoomsClean(_message.Message): - __slots__ = ["clean_extent", "clean_type", "fan", "map_id", "mop_mode", "releases", "rooms"] - class Room(_message.Message): - __slots__ = ["id", "order"] - ID_FIELD_NUMBER: _ClassVar[int] - ORDER_FIELD_NUMBER: _ClassVar[int] - id: int - order: int - def __init__(self, id: _Optional[int] = ..., order: _Optional[int] = ...) -> None: ... - CLEAN_EXTENT_FIELD_NUMBER: _ClassVar[int] - CLEAN_TYPE_FIELD_NUMBER: _ClassVar[int] - FAN_FIELD_NUMBER: _ClassVar[int] - MAP_ID_FIELD_NUMBER: _ClassVar[int] - MOP_MODE_FIELD_NUMBER: _ClassVar[int] - RELEASES_FIELD_NUMBER: _ClassVar[int] - ROOMS_FIELD_NUMBER: _ClassVar[int] - clean_extent: _clean_param_pb2.CleanExtent - clean_type: _clean_param_pb2.CleanType - fan: _clean_param_pb2.Fan - map_id: int - mop_mode: _clean_param_pb2.MopMode - releases: int - rooms: _containers.RepeatedCompositeFieldContainer[ScheduleRoomsClean.Room] - def __init__(self, fan: _Optional[_Union[_clean_param_pb2.Fan, _Mapping]] = ..., mop_mode: _Optional[_Union[_clean_param_pb2.MopMode, _Mapping]] = ..., clean_type: _Optional[_Union[_clean_param_pb2.CleanType, _Mapping]] = ..., clean_extent: _Optional[_Union[_clean_param_pb2.CleanExtent, _Mapping]] = ..., rooms: _Optional[_Iterable[_Union[ScheduleRoomsClean.Room, _Mapping]]] = ..., map_id: _Optional[int] = ..., releases: _Optional[int] = ...) -> None: ... - -class SelectRoomsClean(_message.Message): - __slots__ = ["clean_times", "map_id", "mode", "releases", "rooms"] - class Mode(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - class Room(_message.Message): - __slots__ = ["id", "order"] - ID_FIELD_NUMBER: _ClassVar[int] - ORDER_FIELD_NUMBER: _ClassVar[int] - id: int - order: int - def __init__(self, id: _Optional[int] = ..., order: _Optional[int] = ...) -> None: ... - CLEAN_TIMES_FIELD_NUMBER: _ClassVar[int] - CUSTOMIZE: SelectRoomsClean.Mode - GENERAL: SelectRoomsClean.Mode - MAP_ID_FIELD_NUMBER: _ClassVar[int] - MODE_FIELD_NUMBER: _ClassVar[int] - RELEASES_FIELD_NUMBER: _ClassVar[int] - ROOMS_FIELD_NUMBER: _ClassVar[int] - clean_times: int - map_id: int - mode: SelectRoomsClean.Mode - releases: int - rooms: _containers.RepeatedCompositeFieldContainer[SelectRoomsClean.Room] - def __init__(self, rooms: _Optional[_Iterable[_Union[SelectRoomsClean.Room, _Mapping]]] = ..., clean_times: _Optional[int] = ..., map_id: _Optional[int] = ..., releases: _Optional[int] = ..., mode: _Optional[_Union[SelectRoomsClean.Mode, str]] = ...) -> None: ... - -class SelectZonesClean(_message.Message): - __slots__ = ["map_id", "releases", "type", "zones"] - class Type(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - class Zone(_message.Message): - __slots__ = ["clean_times", "quadrangle"] - CLEAN_TIMES_FIELD_NUMBER: _ClassVar[int] - QUADRANGLE_FIELD_NUMBER: _ClassVar[int] - clean_times: int - quadrangle: _common_pb2.Quadrangle - def __init__(self, quadrangle: _Optional[_Union[_common_pb2.Quadrangle, _Mapping]] = ..., clean_times: _Optional[int] = ...) -> None: ... - MAP_ID_FIELD_NUMBER: _ClassVar[int] - NORMAL: SelectZonesClean.Type - POOP_CLEANING: SelectZonesClean.Type - RELEASES_FIELD_NUMBER: _ClassVar[int] - TYPE_FIELD_NUMBER: _ClassVar[int] - ZONES_FIELD_NUMBER: _ClassVar[int] - map_id: int - releases: int - type: SelectZonesClean.Type - zones: _containers.RepeatedCompositeFieldContainer[SelectZonesClean.Zone] - def __init__(self, zones: _Optional[_Iterable[_Union[SelectZonesClean.Zone, _Mapping]]] = ..., map_id: _Optional[int] = ..., releases: _Optional[int] = ..., type: _Optional[_Union[SelectZonesClean.Type, str]] = ...) -> None: ... - -class SpotClean(_message.Message): - __slots__ = ["clean_times"] - CLEAN_TIMES_FIELD_NUMBER: _ClassVar[int] - clean_times: int - def __init__(self, clean_times: _Optional[int] = ...) -> None: ... - -class ZonesCruise(_message.Message): - __slots__ = ["map_id", "points", "releases"] - MAP_ID_FIELD_NUMBER: _ClassVar[int] - POINTS_FIELD_NUMBER: _ClassVar[int] - RELEASES_FIELD_NUMBER: _ClassVar[int] - map_id: int - points: _containers.RepeatedCompositeFieldContainer[_common_pb2.Point] - releases: int - def __init__(self, points: _Optional[_Iterable[_Union[_common_pb2.Point, _Mapping]]] = ..., map_id: _Optional[int] = ..., releases: _Optional[int] = ...) -> None: ... diff --git a/proto-reference/debug.proto b/proto-reference/debug.proto deleted file mode 100644 index 30ec425..0000000 --- a/proto-reference/debug.proto +++ /dev/null @@ -1,45 +0,0 @@ -syntax = "proto3"; - -// option optimize_for = LITE_RUNTIME; - -package proto.cloud; - -import "proto/cloud/common.proto"; - -message DebugRequest { - Switch log_sw = 1; // 日志开关 [EN: Log switch] - - // 用户在手机 app 主动反馈异常,这时设备可以单次上传日志 [EN: User actively reports exception in mobile app, device can upload logs once] - message FaultReport { - uint32 seq = 1; - } - FaultReport fault_report = 2; - - Switch capture_sw = 3; // 数据采集开关(数据回流) [EN: Data capture switch (data backflow)] - - // 图像识别不准确时,用户可以在手机 app 上主动反馈 [EN: When image recognition is inaccurate, user can actively provide feedback in mobile app] - message ImageFeedback { - string object_type = 1; - string photo_id = 2; // 照片 id [EN: Photo ID] - } - ImageFeedback image_feedback = 4; // !!! 需求变更,此项废弃 [EN: !!! Requirement changed, this item is deprecated] - - Switch toggle_mop_raise = 11; // 翻转拖把抬起/下降,true 翻转,false 忽略 [EN: Toggle mop raise/lower, true to toggle, false to ignore] - Switch toggle_mop_spin = 12; // 翻转拖把旋转/停转,true 翻转,false 忽略 [EN: Toggle mop spin/stop, true to toggle, false to ignore] -} - -message DebugResponse { - Switch log_sw = 1; - - message UpdateInfo { - uint32 err_code = 1; - } - UpdateInfo update_info = 2; - - message WebTtyInfo { - string connection_data = 1; - } - WebTtyInfo webtty_info = 3; - - Switch capture_sw = 4; // 如果没有这个字段,app 上就不显示采集开关 [EN: If this field is absent, the capture switch is not displayed in app] -} diff --git a/proto-reference/debug_pb2.py b/proto-reference/debug_pb2.py deleted file mode 100644 index c0c3d79..0000000 --- a/proto-reference/debug_pb2.py +++ /dev/null @@ -1,36 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: proto/cloud/debug.proto -"""Generated protocol buffer code.""" -from google.protobuf import descriptor as _descriptor -from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import symbol_database as _symbol_database -from google.protobuf.internal import builder as _builder - -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - -from ...proto.cloud import common_pb2 as proto_dot_cloud_dot_common__pb2 - -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x17proto/cloud/debug.proto\x12\x0bproto.cloud\x1a\x18proto/cloud/common.proto\"\x8b\x03\n\x0c\x44\x65\x62ugRequest\x12#\n\x06log_sw\x18\x01 \x01(\x0b\x32\x13.proto.cloud.Switch\x12;\n\x0c\x66\x61ult_report\x18\x02 \x01(\x0b\x32%.proto.cloud.DebugRequest.FaultReport\x12\'\n\ncapture_sw\x18\x03 \x01(\x0b\x32\x13.proto.cloud.Switch\x12?\n\x0eimage_feedback\x18\x04 \x01(\x0b\x32\'.proto.cloud.DebugRequest.ImageFeedback\x12-\n\x10toggle_mop_raise\x18\x0b \x01(\x0b\x32\x13.proto.cloud.Switch\x12,\n\x0ftoggle_mop_spin\x18\x0c \x01(\x0b\x32\x13.proto.cloud.Switch\x1a\x1a\n\x0b\x46\x61ultReport\x12\x0b\n\x03seq\x18\x01 \x01(\r\x1a\x36\n\rImageFeedback\x12\x13\n\x0bobject_type\x18\x01 \x01(\t\x12\x10\n\x08photo_id\x18\x02 \x01(\t\"\x9c\x02\n\rDebugResponse\x12#\n\x06log_sw\x18\x01 \x01(\x0b\x32\x13.proto.cloud.Switch\x12:\n\x0bupdate_info\x18\x02 \x01(\x0b\x32%.proto.cloud.DebugResponse.UpdateInfo\x12:\n\x0bwebtty_info\x18\x03 \x01(\x0b\x32%.proto.cloud.DebugResponse.WebTtyInfo\x12\'\n\ncapture_sw\x18\x04 \x01(\x0b\x32\x13.proto.cloud.Switch\x1a\x1e\n\nUpdateInfo\x12\x10\n\x08\x65rr_code\x18\x01 \x01(\r\x1a%\n\nWebTtyInfo\x12\x17\n\x0f\x63onnection_data\x18\x01 \x01(\tb\x06proto3') - -_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'proto.cloud.debug_pb2', globals()) -if _descriptor._USE_C_DESCRIPTORS == False: - - DESCRIPTOR._options = None - _DEBUGREQUEST._serialized_start=67 - _DEBUGREQUEST._serialized_end=462 - _DEBUGREQUEST_FAULTREPORT._serialized_start=380 - _DEBUGREQUEST_FAULTREPORT._serialized_end=406 - _DEBUGREQUEST_IMAGEFEEDBACK._serialized_start=408 - _DEBUGREQUEST_IMAGEFEEDBACK._serialized_end=462 - _DEBUGRESPONSE._serialized_start=465 - _DEBUGRESPONSE._serialized_end=749 - _DEBUGRESPONSE_UPDATEINFO._serialized_start=680 - _DEBUGRESPONSE_UPDATEINFO._serialized_end=710 - _DEBUGRESPONSE_WEBTTYINFO._serialized_start=712 - _DEBUGRESPONSE_WEBTTYINFO._serialized_end=749 -# @@protoc_insertion_point(module_scope) diff --git a/proto-reference/debug_pb2.pyi b/proto-reference/debug_pb2.pyi deleted file mode 100644 index 1aa6d14..0000000 --- a/proto-reference/debug_pb2.pyi +++ /dev/null @@ -1,61 +0,0 @@ -from typing import ClassVar as _ClassVar -from typing import Mapping as _Mapping -from typing import Optional as _Optional -from typing import Union as _Union - -from google.protobuf import descriptor as _descriptor -from google.protobuf import message as _message - -from ...proto.cloud import common_pb2 as _common_pb2 - -DESCRIPTOR: _descriptor.FileDescriptor - -class DebugRequest(_message.Message): - __slots__ = ["capture_sw", "fault_report", "image_feedback", "log_sw", "toggle_mop_raise", "toggle_mop_spin"] - class FaultReport(_message.Message): - __slots__ = ["seq"] - SEQ_FIELD_NUMBER: _ClassVar[int] - seq: int - def __init__(self, seq: _Optional[int] = ...) -> None: ... - class ImageFeedback(_message.Message): - __slots__ = ["object_type", "photo_id"] - OBJECT_TYPE_FIELD_NUMBER: _ClassVar[int] - PHOTO_ID_FIELD_NUMBER: _ClassVar[int] - object_type: str - photo_id: str - def __init__(self, object_type: _Optional[str] = ..., photo_id: _Optional[str] = ...) -> None: ... - CAPTURE_SW_FIELD_NUMBER: _ClassVar[int] - FAULT_REPORT_FIELD_NUMBER: _ClassVar[int] - IMAGE_FEEDBACK_FIELD_NUMBER: _ClassVar[int] - LOG_SW_FIELD_NUMBER: _ClassVar[int] - TOGGLE_MOP_RAISE_FIELD_NUMBER: _ClassVar[int] - TOGGLE_MOP_SPIN_FIELD_NUMBER: _ClassVar[int] - capture_sw: _common_pb2.Switch - fault_report: DebugRequest.FaultReport - image_feedback: DebugRequest.ImageFeedback - log_sw: _common_pb2.Switch - toggle_mop_raise: _common_pb2.Switch - toggle_mop_spin: _common_pb2.Switch - def __init__(self, log_sw: _Optional[_Union[_common_pb2.Switch, _Mapping]] = ..., fault_report: _Optional[_Union[DebugRequest.FaultReport, _Mapping]] = ..., capture_sw: _Optional[_Union[_common_pb2.Switch, _Mapping]] = ..., image_feedback: _Optional[_Union[DebugRequest.ImageFeedback, _Mapping]] = ..., toggle_mop_raise: _Optional[_Union[_common_pb2.Switch, _Mapping]] = ..., toggle_mop_spin: _Optional[_Union[_common_pb2.Switch, _Mapping]] = ...) -> None: ... - -class DebugResponse(_message.Message): - __slots__ = ["capture_sw", "log_sw", "update_info", "webtty_info"] - class UpdateInfo(_message.Message): - __slots__ = ["err_code"] - ERR_CODE_FIELD_NUMBER: _ClassVar[int] - err_code: int - def __init__(self, err_code: _Optional[int] = ...) -> None: ... - class WebTtyInfo(_message.Message): - __slots__ = ["connection_data"] - CONNECTION_DATA_FIELD_NUMBER: _ClassVar[int] - connection_data: str - def __init__(self, connection_data: _Optional[str] = ...) -> None: ... - CAPTURE_SW_FIELD_NUMBER: _ClassVar[int] - LOG_SW_FIELD_NUMBER: _ClassVar[int] - UPDATE_INFO_FIELD_NUMBER: _ClassVar[int] - WEBTTY_INFO_FIELD_NUMBER: _ClassVar[int] - capture_sw: _common_pb2.Switch - log_sw: _common_pb2.Switch - update_info: DebugResponse.UpdateInfo - webtty_info: DebugResponse.WebTtyInfo - def __init__(self, log_sw: _Optional[_Union[_common_pb2.Switch, _Mapping]] = ..., update_info: _Optional[_Union[DebugResponse.UpdateInfo, _Mapping]] = ..., webtty_info: _Optional[_Union[DebugResponse.WebTtyInfo, _Mapping]] = ..., capture_sw: _Optional[_Union[_common_pb2.Switch, _Mapping]] = ...) -> None: ... diff --git a/proto-reference/error_code.proto b/proto-reference/error_code.proto deleted file mode 100644 index d3c74c2..0000000 --- a/proto-reference/error_code.proto +++ /dev/null @@ -1,55 +0,0 @@ -syntax = "proto3"; - -// option optimize_for = LITE_RUNTIME; - -package proto.cloud; - -import "proto/cloud/common.proto"; - -// 云端下发给机器 [EN: Cloud sends to device] -message ErrorSetting { - repeated uint32 warn_mask = 1; // 警告码屏蔽,可多个 [EN: Warning code mask, can be multiple] - repeated string obstacle_reminder_mask = 2; // obstacle_reminder 屏蔽,可多个 [EN: obstacle_reminder mask, can be multiple] -} - -// 机器上报到云的错误警告码,包含云端下发的 mask 字段(二次触发需要清除相应的项),枚举来自 ErrorCodeList [EN: Error/warning codes reported from device to cloud, contains mask field from cloud (need to clear corresponding items on second trigger), enum from ErrorCodeList] -message ErrorCode { - uint64 last_time = 1; // 当前时间,单位是纳秒,开机到现在的单调时间 CLOCK_MONOTONIC [EN: Current time, unit: nanoseconds, monotonic time since boot CLOCK_MONOTONIC] - - repeated uint32 error = 2; // 可多个 [EN: Can be multiple] - repeated uint32 warn = 3; // 可多个 [EN: Can be multiple] - ErrorSetting setting = 4; // 可多个 [EN: Can be multiple] - - message NewCode { - repeated uint32 error = 1; // 新上报的错误码 [EN: Newly reported error codes] - repeated uint32 warn = 2; // 新上报的警告码 [EN: Newly reported warning codes] - } - NewCode new_code = 10; - - message Battery { - bool restored = 1; // 电池恢复(换电池标志) [EN: Battery restored (battery replacement flag)] - } - Battery battery = 11; - - message ObstacleReminder { - enum Type { - POOP = 0; - } - Type type = 1; - string photo_id = 2; - uint32 accuracy = 3; // 准确率,0~100,表示百分比(0 表示无效) [EN: Accuracy, 0~100, represents percentage (0 means invalid)] - uint32 map_id = 4; - - oneof Description { - Point point = 5; - } - } - repeated ObstacleReminder obstacle_reminder = 12; -} - -// 方向:机器上报到云的提醒(手机 app 显示 toast),枚举来自 PromptCodeList [EN: Direction: Reminders reported from device to cloud (mobile app displays toast), enum from PromptCodeList] -message PromptCode { - uint64 last_time = 1; // 当前时间,单位是纳秒,开机到现在的单调时间 CLOCK_MONOTONIC [EN: Current time, unit: nanoseconds, monotonic time since boot CLOCK_MONOTONIC] - - repeated uint32 value = 2; -} diff --git a/proto-reference/error_code_list_standard.proto b/proto-reference/error_code_list_standard.proto deleted file mode 100644 index 3549e2f..0000000 --- a/proto-reference/error_code_list_standard.proto +++ /dev/null @@ -1,189 +0,0 @@ -syntax = "proto3"; - -// option optimize_for = LITE_RUNTIME; - -package proto.cloud.std; - -enum ErrorCodeList { - E0000_NONE = 0; - - E1013_LEFT_WHEEL_OVERCURRENT = 1013; // 左轮过流 [EN: Left wheel overcurrent] - E1023_RIGHT_WHEEL_OVERCURRENT = 1023; // 右轮过流 [EN: Right wheel overcurrent] - E1033_LEFT_RIGHT_WHEEL_OVERCURRENT = 1033; // 左右轮过流 [EN: Left and right wheel overcurrent] - E1010_LEFT_WHEEL_OPEN_CIRCUIT = 1010; // 左轮开路 [EN: Left wheel open circuit] - E1011_LEFT_WHEEL_SHORT_CIRCUIT = 1011; // 左轮短路 [EN: Left wheel short circuit] - E1012_LEFT_WHEEL_ABNORMAL = 1012; // 左轮异常(开短路无法区分) [EN: Left wheel abnormal (open/short circuit indistinguishable)] - E1020_RIGHT_WHEEL_OPEN_CIRCUIT = 1020; // 右轮开路 [EN: Right wheel open circuit] - E1021_RIGHT_WHEEL_SHORT_CIRCUIT = 1021; // 右轮短路 [EN: Right wheel short circuit] - E1022_RIGHT_WHEEL_ABNORMAL = 1022; // 右轮异常(开短路无法区分) [EN: Right wheel abnormal (open/short circuit indistinguishable)] - E1030_LEFT_RIGHT_WHEEL_OPEN_CIRCUIT = 1030; // 左右轮开路 [EN: Left and right wheel open circuit] - E1031_LEFT_RIGHT_WHEEL_SHORT_CIRCUIT = 1031; // 左右轮短路 [EN: Left and right wheel short circuit] - E1032_LEFT_RIGHT_WHEEL_ABNORMAL = 1032; // 左右轮异常(开短路无法区分) [EN: Left and right wheel abnormal (open/short circuit indistinguishable)] - E2013_SINGLE_FAN_ROTATION_ABNORMAL = 2013; // 单风机转数异常 [EN: Single fan rotation abnormal] - E2023_LEFT_FAN_ROTATION_ABNORMAL = 2023; // 左风机转数异常 [EN: Left fan rotation abnormal] - E2027_RIGHT_FAN_ROTATION_ABNORMAL = 2027; // 右风机转数异常 [EN: Right fan rotation abnormal] - E2010_SINGLE_FAN_OPEN_CIRCUIT = 2010; // 单风机开路 [EN: Single fan open circuit] - E2011_SINGLE_FAN_SHORT_CIRCUIT = 2011; // 单风机短路 [EN: Single fan short circuit] - E2012_SINGLE_FAN_ABNORMAL = 2012; // 单风机异常(开路或短路无法区分) [EN: Single fan abnormal (open/short circuit indistinguishable)] - E2020_LEFT_FAN_OPEN_CIRCUIT = 2020; // 双风机-左风机开路 [EN: Dual fan - left fan open circuit] - E2021_LEFT_FAN_SHORT_CIRCUIT = 2021; // 双风机-左风机短路 [EN: Dual fan - left fan short circuit] - E2022_LEFT_FAN_ABNORMAL = 2022; // 双风机-左风机异常(开路或短路无法区分) [EN: Dual fan - left fan abnormal (open/short circuit indistinguishable)] - E2024_RIGHT_FAN_OPEN_CIRCUIT = 2024; // 双风机-右风机开路 [EN: Dual fan - right fan open circuit] - E2025_RIGHT_FAN_SHORT_CIRCUIT = 2025; // 双风机-右风机短路 [EN: Dual fan - right fan short circuit] - E2026_RIGHT_FAN_ABNORMAL = 2026; // 双风机-右风机异常(开路或短路无法区分) [EN: Dual fan - right fan abnormal (open/short circuit indistinguishable)] - E2112_SINGLE_BRUSH_OVERCURRENT = 2112; // 单滚刷过流 [EN: Single roller brush overcurrent] - E2122_DOUBLE_BRUSH_FRONT_OVERCURRENT = 2122; // 双滚刷-前过流 [EN: Dual roller brush - front overcurrent] - E2125_DOUBLE_BRUSH_BACK_OVERCURRENT = 2125; // 双滚刷-后过流 [EN: Dual roller brush - rear overcurrent] - E2110_SINGLE_BRUSH_OPEN_CIRCUIT = 2110; // 单滚刷开路 [EN: Single roller brush open circuit] - E2111_SINGLE_BRUSH_SHORT_CIRCUIT = 2111; // 单滚刷短路 [EN: Single roller brush short circuit] - E2113_SINGLE_BRUSH_ABNORMAL = 2113; // 单滚刷异常(开路短路不能区分) [EN: Single roller brush abnormal (open/short circuit indistinguishable)] - E2120_DOUBLE_BRUSH_FRONT_OPEN_CIRCUIT = 2120; // 双滚刷-前开路 [EN: Dual roller brush - front open circuit] - E2121_DOUBLE_BRUSH_FRONT_SHORT_CIRCUIT = 2121; // 双滚刷-前短路 [EN: Dual roller brush - front short circuit] - E2123_DOUBLE_BRUSH_BACK_OPEN_CIRCUIT = 2123; // 双滚刷-后开路 [EN: Dual roller brush - rear open circuit] - E2124_DOUBLE_BRUSH_BACK_SHORT_CIRCUIT = 2124; // 双滚刷-后短路 [EN: Dual roller brush - rear short circuit] - E2213_SINGLE_SIDE_BRUSH_OVERCURRENT = 2213; // 单边刷过流 [EN: Single side brush overcurrent] - E2223_LEFT_SIDE_BRUSH_OVERCURRENT = 2223; // 左边刷过流 [EN: Left side brush overcurrent] - E2227_RIGHT_SIDE_BRUSH_OVERCURRENT = 2227; // 右边刷过流 [EN: Right side brush overcurrent] - E2210_SINGLE_SIDE_BRUSH_OPEN_CIRCUIT = 2210; // 单边刷开路 [EN: Single side brush open circuit] - E2211_SINGLE_SIDE_BRUSH_SHORT_CIRCUIT = 2211; // 单边刷短路 [EN: Single side brush short circuit] - E2212_SINGLE_SIDE_BRUSH_ABNORMAL = 2212; // 单边刷异常(开路或短路无法区分) [EN: Single side brush abnormal (open/short circuit indistinguishable)] - E2220_LEFT_SIDE_BRUSH_OPEN_CIRCUIT = 2220; // 左边刷开路 [EN: Left side brush open circuit] - E2221_LEFT_SIDE_BRUSH_SHORT_CIRCUIT = 2221; // 左边刷短路 [EN: Left side brush short circuit] - E2222_LEFT_SIDE_BRUSH_ABNORMAL = 2222; // 左边刷异常(开路或短路无法区分) [EN: Left side brush abnormal (open/short circuit indistinguishable)] - E2224_RIGHT_SIDE_BRUSH_OPEN_CIRCUIT = 2224; // 右边刷开路 [EN: Right side brush open circuit] - E2225_RIGHT_SIDE_BRUSH_SHORT_CIRCUIT = 2225; // 右边刷短路 [EN: Right side brush short circuit] - E2226_RIGHT_SIDE_BRUSH_ABNORMAL = 2226; // 右边刷异常(开路或短路无法区分) [EN: Right side brush abnormal (open/short circuit indistinguishable)] - E2310_DUSTBIN_NOT_INSTALLED = 2310; // 尘盒&滤网不在位 [EN: Dustbin and filter not in place] - E2311_DUSTBIN_INSTALLED_USE_TIME_EXCEEDS_10_HOURS = 2311; // 尘盒在位使用超过10小时提醒 [EN: Dustbin in place used over 10 hours reminder] - E3013_ROBOT_WATER_TANK_INSUFFICIENT = 3013; // 机器人水箱水量不足 [EN: Robot water tank insufficient] - E3010_ROBOT_WATER_PUMP_OPEN_CIRCUIT = 3010; // 机器人水泵开路 [EN: Robot water pump open circuit] - E3011_ROBOT_WATER_PUMP_SHORT_CIRCUIT = 3011; // 机器人水泵短路 [EN: Robot water pump short circuit] - E3012_ROBOT_WATER_TANK_WATER_PUMP_ABNORMAL = 3012; // 机器人水箱水泵异常(开路或短路无法区分) [EN: Robot water tank pump abnormal (open/short circuit indistinguishable)] - E3020_ROBOT_WATER_TANK_REMOVED_CANNOT_MOVE = 3020; // 机器人水箱移除,无法正常运动 [EN: Robot water tank removed, cannot move normally] - E3110_LEFT_MOP_NOT_INSTALLED = 3110; // 左边抹布不在位 [EN: Left mop not installed] - E3111_RIGHT_MOP_NOT_INSTALLED = 3111; // 右边抹布不在位 [EN: Right mop not installed] - E3123_ROTATING_MOTOR_JAMMED = 3123; // 旋转电机卡住 [EN: Rotating motor jammed] - E3133_LIFTING_MOTOR_JAMMED = 3133; // 升降电机卡住 [EN: Lifting motor jammed] - E3120_ROTATING_MOTOR_OPEN_CIRCUIT = 3120; // 旋转电机开路 [EN: Rotating motor open circuit] - E3121_ROTATING_MOTOR_SHORT_CIRCUIT = 3121; // 旋转电机短路 [EN: Rotating motor short circuit] - E3122_ROTATING_MOTOR_ABNORMAL = 3122; // 旋转电机异常(开路或短路无法区分) [EN: Rotating motor abnormal (open/short circuit indistinguishable)] - E3130_LIFTING_MOTOR_OPEN_CIRCUIT = 3130; // 升降电机开路 [EN: Lifting motor open circuit] - E3131_LIFTING_MOTOR_SHORT_CIRCUIT = 3131; // 升降电机短路 [EN: Lifting motor short circuit] - E3132_LIFTING_MOTOR_ABNORMAL = 3132; // 升降电机异常(开路或短路无法区分) [EN: Lifting motor abnormal (open/short circuit indistinguishable)] - E4012_RADAR_ROTATION_ABNORMAL = 4012; // 雷达转数异常 [EN: Radar rotation abnormal] - E4011_RADAR_BLOCKED = 4011; // 雷达被遮挡 [EN: Radar blocked] - E4010_RADAR_NO_SIGNAL_COMMUNICATION_POSSIBLY_DAMAGED = 4010; // 雷达无信号通讯(可能损坏) [EN: Radar no signal communication (possibly damaged)] - E4020_GYROSCOPE_ABNORMAL = 4020; // 陀螺仪异常(开路或短路无法区分) [EN: Gyroscope abnormal (open/short circuit indistinguishable)] - E4030_TOF_NO_SIGNAL_COMMUNICATION_POSSIBLY_DAMAGED = 4030; // Tof无信号通讯(可能损坏) [EN: TOF no signal communication (possibly damaged)] - E4031_TOF_BLOCKED = 4031; // Tof被遮挡 [EN: TOF blocked] - E4040_CAM_NO_SIGNAL_COMMUNICATION_POSSIBLY_DAMAGED = 4040; // Cam无信号通讯(可能损坏) [EN: Camera no signal communication (possibly damaged)] - E4041_CAM_BLOCKED = 4041; // Cam被遮挡 [EN: Camera blocked] - E4090_WALL_SENSOR_NO_SIGNAL_COMMUNICATION_POSSIBLY_DAMAGED = 4090; // 沿墙无信号通讯(可能损坏) [EN: Wall sensor no signal communication (possibly damaged)] - E4091_WALL_SENSOR_BLOCKED = 4091; // 沿墙被遮挡 [EN: Wall sensor blocked] - E4111_LEFT_FRONT_COLLISION_LONG_TRIGGER = 4111; // 左前撞长触发 [EN: Left front collision long trigger] - E4112_RIGHT_FRONT_COLLISION_LONG_TRIGGER = 4112; // 右前撞长触发 [EN: Right front collision long trigger] - E4120_ULTRASONIC_COMMUNICATION_INTERRUPTED_CLEANING_SCENE = 4120; // 超声通信中断(清洁场景) [EN: Ultrasonic communication interrupted (cleaning scene)] - E4121_ULTRASONIC_COMMUNICATION_INTERRUPTED_NON_CLEANING_SCENE = 4121; // 超声通信中断(非清洁场景) [EN: Ultrasonic communication interrupted (non-cleaning scene)] - E4130_LASER_SHIELD_LONG_TRIGGER = 4130; // 激光罩长触发 [EN: Laser shield long trigger] - E5012_BATTERY_CHARGING_CURRENT_TOO_SMALL = 5012; // 电池充电电流偏小 [EN: Battery charging current too small] - E5010_BATTERY_OPEN_CIRCUIT = 5010; // 电池开路 [EN: Battery open circuit] - E5011_BATTERY_SHORT_CIRCUIT = 5011; // 电池短路 [EN: Battery short circuit] - E5013_BATTERY_DISCHARGE_CURRENT_TOO_LARGE = 5013; // 电池放电电流过大 [EN: Battery discharge current too large] - E5016_CHARGING_CURRENT_TOO_LARGE = 5016; // 充电电流过大 [EN: Charging current too large] - E5017_CHARGING_VOLTAGE_ABNORMAL = 5017; // 充电电压异常 [EN: Charging voltage abnormal] - E5018_BATTERY_TEMPERATURE_ABNORMAL = 5018; // 电池温度异常 [EN: Battery temperature abnormal] - E5021_DISCHARGE_HIGH_TEMPERATURE = 5021; // 放电高温 [EN: Discharge high temperature] - E5022_DISCHARGE_LOW_TEMPERATURE = 5022; // 放电低温 [EN: Discharge low temperature] - E5023_CHARGING_HIGH_TEMPERATURE = 5023; // 充电高温 [EN: Charging high temperature] - E5024_CHARGING_LOW_TEMPERATURE = 5024; // 充电低温 [EN: Charging low temperature] - E5014_LOW_BATTERY_SHUTDOWN = 5014; // 电量低关机 [EN: Low battery shutdown] - E5015_LOW_BATTERY_CANNOT_SCHEDULE_CLEANING = 5015; // 电量低不能预约清洁 [EN: Low battery cannot schedule cleaning] - E5110_WIFI_ABNORMAL = 5110; // Wi-Fi异常 [EN: WiFi abnormal] - E5111_BT_ABNORMAL = 5111; // BT异常 [EN: Bluetooth abnormal] - E5112_INFRARED_COMMUNICATION_ABNORMAL = 5112; // 红外通讯异常 [EN: Infrared communication abnormal] - E6010_CLEAN_WATER_TANK_NOT_INSTALLED = 6010; // 清水箱不在 [EN: Clean water tank not installed] - E6020_DIRTY_WATER_TANK_NOT_INSTALLED = 6020; // 污水箱不在 [EN: Dirty water tank not installed] - E6025_DIRTY_WATER_TANK_ABNORMAL_FULL_OR_NOT_INSTALLED = 6025; // 污水箱异常(满或者不在位) [EN: Dirty water tank abnormal (full or not installed)] - E6011_CLEAN_WATER_TANK_EMPTY = 6011; // 清水箱没水 [EN: Clean water tank empty] - E6021_DIRTY_WATER_TANK_FULL = 6021; // 污水箱满 [EN: Dirty water tank full] - E6012_CLEAN_WATER_PUMP_OPEN_CIRCUIT = 6012; // 清水泵开路 [EN: Clean water pump open circuit] - E6013_CLEAN_WATER_PUMP_SHORT_CIRCUIT = 6013; // 清水泵短路 [EN: Clean water pump short circuit] - E6014_THREE_WAY_VALVE_SHORT_CIRCUIT = 6014; // 三通阀短路 [EN: Three-way valve short circuit] - E6022_DIRTY_WATER_PUMP_OPEN_CIRCUIT = 6022; // 污水泵开路 [EN: Dirty water pump open circuit] - E6023_DIRTY_WATER_PUMP_SHORT_CIRCUIT = 6023; // 污水泵短路 [EN: Dirty water pump short circuit] - E6024_DIRTY_WATER_TANK_NOT_CLOSED_TIGHTLY = 6024; // 污水箱未盖紧 [EN: Dirty water tank not closed tightly] - E6030_CLEANING_DISC_NOT_INSTALLED = 6030; // 清洗盘不在位 [EN: Cleaning disc not installed] - E6031_CLEANING_DISC_WATER_FULL = 6031; // 清洗盘水满 [EN: Cleaning disc water full] - E6032_CLEANING_DISC_NOT_INSTALLED_OR_WATER_FULL = 6032; // 清洗盘不在位或者水满 [EN: Cleaning disc not installed or water full] - E6040_BLOWING_FAN_OPEN_CIRCUIT = 6040; // 吹干风扇开路 [EN: Blowing fan open circuit] - E6041_BLOWING_FAN_SHORT_CIRCUIT = 6041; // 吹干风扇短路 [EN: Blowing fan short circuit] - E6042_HEATING_MODULE_OPEN_CIRCUIT = 6042; // 加热模块开路 [EN: Heating module open circuit] - E6043_NTC_OPEN_CIRCUIT = 6043; // NTC开路 [EN: NTC open circuit] - E6110_VOLTAGE_TRANSFORMER_DEGREE_ABNORMAL = 6110; // 电压互感器度数异常 [EN: Voltage transformer reading abnormal] - E6111_DUST_BIN_LEAKS_AIR = 6111; // 集尘漏风 [EN: Dust bin air leak] - E6112_DUST_BIN_BLOCKED = 6112; // 集尘堵塞 [EN: Dust bin blocked] - E6113_DUST_BAG_NOT_INSTALLED = 6113; // 未安装尘袋 [EN: Dust bag not installed] - E6114_FAN_OVERHEATED = 6114; // 风机过热 [EN: Fan overheated] - E6115_PRESSURE_GAUGE_ABNORMAL = 6115; // 气压计异常 [EN: Pressure gauge abnormal] - // E6300_HAIR_CLEANING_IN_PROGRESS = 6300; // 毛发清理中 [EN: Hair cleaning in progress] - // E6301_LOW_BATTERY_CANNOT_START_HAIR_CUTTING = 6301; // 电量过低,无法启动毛发切割 [EN: Battery too low, cannot start hair cutting] - // E6310_POWER_FAILURE = 6310; // 断电 [EN: Power failure] - E6311_HAIR_CUTTING_COMPONENT_ABNORMAL_OR_BLOCKED_CANNOT_START_WORK = 6311; // 割毛发组件异常或堵塞,无法启动工作 [EN: Hair cutting component abnormal or blocked, cannot start work] - E7000_SMALL_SPACE_TIMEOUT = 7000; // 小空间超时 [EN: Small space timeout] - E7001_PART_OF_MACHINE_SUSPENDED = 7001; // 机器部分悬空 [EN: Part of machine suspended] - E7004_MACHINE_STUCK = 7004; // 机器卡死 [EN: Machine stuck] - E7002_MACHINE_PICKED_UP_EXCEEDING_3_GROUND_CHECKS_WHEEL_SUSPENDED = 7002; // 机器被抱起:超过3个地检判断轮子悬空 [EN: Machine picked up: more than 3 ground checks determined wheels suspended] - E7003_STARTUP_FALLING_SUSPENDED = 7003; // 开机-跌落悬空 [EN: Startup - falling suspended] - E7010_ENTERED_FORBIDDEN_AREA = 7010; // 误入禁区 [EN: Entered forbidden area] - E7011_ENTERED_CARPET = 7011; // 误入地毯 [EN: Entered carpet] - // E7020_POSITIONING_FAILED_IN_GLOBAL_CLEANING = 7020; // 全局清洁时定位失败 [EN: Positioning failed during global cleaning] - // E7021_POSITIONING_FAILED_IN_NON_GLOBAL_CLEANING = 7021; // 其他(非全局清洁)时定位失败 [EN: Positioning failed during other (non-global cleaning)] - E7031_RIDING_FAILURE = 7031; // 上座失败 [EN: Docking failure] - E7035_RIDING_FAILURE_BASE_STATION_NOT_POWERED_ON = 7035; // 上座失败(基站没通电) [EN: Docking failure (station not powered on)] - E7036_RIDING_FAILURE_OMNIWHEEL_JAMMED = 7036; // 上座失败(万向轮卡住) [EN: Docking failure (omniwheel jammed)] - E7037_RIDING_FAILURE_INFRARED_REFLECTION = 7037; // 上座失败(红外反射) [EN: Docking failure (infrared reflection)] - E7033_EXPLORING_BASE_STATION_FAILURE_BASE_STATION_DEPARTURE = 7033; // 探索基站失败(基站出发) [EN: Exploring station failure (departing from station)] - E7034_CANNOT_FIND_STARTING_POINT = 7034; // 找不到起点 [EN: Cannot find starting point] - E7040_DISMOUNT_FAILURE = 7040; // 下座失败 [EN: Undocking failure] - // E7050_CANNOT_REACH = 7050; // 无法抵达 [EN: Cannot reach] - // E7051_SCHEDULE_FAILURE = 7051; // 预约失败 [EN: Schedule failure] - // E7052_PATH_PLANNING_FAILURE = 7052; // 路径规划失败 [EN: Path planning failure] - E7053_MACHINE_TILTED = 7053; // 机器倾斜 [EN: Machine tilted] - E7055_STATION_NOT_FOUND_CANNOT_MOP = 7055; // 未发现基站,无法加水洗拖布,清洁时只扫不拖 [EN: Station not found, cannot add water to wash mop, only sweeping during cleaning without mopping] -} - -enum PromptCodeList { - P0000_NONE = 0; - - P0061_LOW_BATTERY_RECHARGE_NO_CLEAN = 61; // 低电回充(不继续清扫,断点续扫没开) [EN: Low battery return to charge (no continued cleaning, resume cleaning not enabled)] - P0078_LOW_BATTERY_CANNOT_START_TASK = 78; // 电量不足无法启动任务 [EN: Battery insufficient cannot start task] - P0065_LOW_BATTERY_30_PERCENT_NOT_ENOUGH = 65; // 电量不足,请充电至30%后再启动任务(30% 电量以下建图) [EN: Battery insufficient, please charge to 30% before starting task (mapping below 30% battery)] - P0066_LOW_BATTERY_10_PERCENT_NOT_ENOUGH = 66; // 电量不足,请充电至10%后再启动任务(10% 电量以下清洁) [EN: Battery insufficient, please charge to 10% before starting task (cleaning below 10% battery)] - P0079_LOW_BATTERY_RECHARGE = 79; // 低电回充(会继续清扫,断点续扫打开) [EN: Low battery return to charge (will continue cleaning, resume cleaning enabled)] - P0083_CHILD_LOCK_ON_CANNOT_USE_POSITIONING = 83; // 童锁开,不可用(定点) [EN: Child lock on, unavailable (spot)] - P0088_CHILD_LOCK_ON_CANNOT_USE_RECHARGE = 88; // 童锁开,不可用(回充) [EN: Child lock on, unavailable (return to charge)] - P0024_NETWORK_PASSWORD_ERROR = 24; // 配网密码错误 [EN: Network configuration password error] - P0025_ROUTER_NOT_CONNECTED_TO_INTERNET = 25; // 路由器没有联网 [EN: Router not connected to internet] - P0085_SCHEDULE_CLEAN_START = 85; // 预约清洁启动 [EN: Scheduled cleaning start] - P0087_MAP_DATA_UPDATING_CANNOT_OPERATE = 87; // 地图数据更新中无法操作 [EN: Cannot operate while map data updating] - P0031_LOCATION_SUCCESS = 31; // 定位成功 [EN: Location success] - P0038_MOPPING_COMPLETED_IN_TASK = 38; // 任务中洗拖布完成 [EN: Mop washing completed during task] - P0039_MOPPING_COMPLETED_AFTER_TASK = 39; // 任务结束清洗拖布完成 [EN: Mop washing completed after task] - P0040_RETURN_TO_BASE_AFTER_TASK_COMPLETED = 40; // 任务完成返回基站 [EN: Return to station after task completed] - P0045_TASK_COMPLETED = 45; // 任务完成 [EN: Task completed] - P0076_CANNOT_EXECUTE_POSITIONING_RECHARGE_IN_BASE = 76; // 在基站无法执行定点/回充 [EN: Cannot execute spot/return to charge at station] - P0090_BASE_INSIDE_MOP_BUTTON_PRESSED = 90; // 基站内洗抹布点按键 [EN: Mop washing button pressed inside station] - P0091_BASE_INSIDE_DUST_COLLECTING_BUTTON_PRESSED = 91; // 基站内集尘点按键 [EN: Dust collection button pressed inside station] - - P6117_LOW_BATTERY_CANNOT_START_DUST_COLLECTION = 6117; // 电量低无法启动自动集尘 [EN: Low battery cannot start automatic dust collection] - P6118_LOW_BATTERY_CANNOT_START_ROLLING_BRUSH_SELF_CLEANING = 6118; // 电量低无法启动滚刷自清洁 [EN: Low battery cannot start roller brush self-cleaning] - P6300_HAIR_CLEANING_IN_PROGRESS = 6300; // 毛发清理中 [EN: Hair cleaning in progress] - P6301_LOW_BATTERY_CANNOT_START_HAIR_CUTTING = 6301; // 电量过低,无法启动毛发切割 [EN: Battery too low, cannot start hair cutting] - P6310_POWER_FAILURE = 6310; // 断电 [EN: Power failure] - P7020_POSITIONING_FAILED_IN_GLOBAL_CLEANING = 7020; // 全局清洁时定位失败 [EN: Positioning failed during global cleaning] - P7021_POSITIONING_FAILED_IN_NON_GLOBAL_CLEANING = 7021; // 其他(非全局清洁)时定位失败 [EN: Positioning failed during other (non-global cleaning)] - P7050_CANNOT_REACH = 7050; // 无法抵达 [EN: Cannot reach] - P7051_SCHEDULE_FAILURE = 7051; // 预约失败 [EN: Schedule failure] - P7052_PATH_PLANNING_FAILURE = 7052; // 路径规划失败 [EN: Path planning failure] - P7054_TARGET_NOT_FOUND_STOP_FOLLOWING = 7054; // 智能跟随未发现目标自动退出 [EN: Smart follow target not found, auto exit] -} diff --git a/proto-reference/error_code_list_standard_pb2.py b/proto-reference/error_code_list_standard_pb2.py deleted file mode 100644 index 371725a..0000000 --- a/proto-reference/error_code_list_standard_pb2.py +++ /dev/null @@ -1,27 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: proto/cloud/error_code_list_standard.proto -"""Generated protocol buffer code.""" -from google.protobuf.internal import builder as _builder -from google.protobuf import descriptor as _descriptor -from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import symbol_database as _symbol_database -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - - - -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n*proto/cloud/error_code_list_standard.proto\x12\x0fproto.cloud.std*\xc4*\n\rErrorCodeList\x12\x0e\n\nE0000_NONE\x10\x00\x12!\n\x1c\x45\x31\x30\x31\x33_LEFT_WHEEL_OVERCURRENT\x10\xf5\x07\x12\"\n\x1d\x45\x31\x30\x32\x33_RIGHT_WHEEL_OVERCURRENT\x10\xff\x07\x12\'\n\"E1033_LEFT_RIGHT_WHEEL_OVERCURRENT\x10\x89\x08\x12\"\n\x1d\x45\x31\x30\x31\x30_LEFT_WHEEL_OPEN_CIRCUIT\x10\xf2\x07\x12#\n\x1e\x45\x31\x30\x31\x31_LEFT_WHEEL_SHORT_CIRCUIT\x10\xf3\x07\x12\x1e\n\x19\x45\x31\x30\x31\x32_LEFT_WHEEL_ABNORMAL\x10\xf4\x07\x12#\n\x1e\x45\x31\x30\x32\x30_RIGHT_WHEEL_OPEN_CIRCUIT\x10\xfc\x07\x12$\n\x1f\x45\x31\x30\x32\x31_RIGHT_WHEEL_SHORT_CIRCUIT\x10\xfd\x07\x12\x1f\n\x1a\x45\x31\x30\x32\x32_RIGHT_WHEEL_ABNORMAL\x10\xfe\x07\x12(\n#E1030_LEFT_RIGHT_WHEEL_OPEN_CIRCUIT\x10\x86\x08\x12)\n$E1031_LEFT_RIGHT_WHEEL_SHORT_CIRCUIT\x10\x87\x08\x12$\n\x1f\x45\x31\x30\x33\x32_LEFT_RIGHT_WHEEL_ABNORMAL\x10\x88\x08\x12\'\n\"E2013_SINGLE_FAN_ROTATION_ABNORMAL\x10\xdd\x0f\x12%\n E2023_LEFT_FAN_ROTATION_ABNORMAL\x10\xe7\x0f\x12&\n!E2027_RIGHT_FAN_ROTATION_ABNORMAL\x10\xeb\x0f\x12\"\n\x1d\x45\x32\x30\x31\x30_SINGLE_FAN_OPEN_CIRCUIT\x10\xda\x0f\x12#\n\x1e\x45\x32\x30\x31\x31_SINGLE_FAN_SHORT_CIRCUIT\x10\xdb\x0f\x12\x1e\n\x19\x45\x32\x30\x31\x32_SINGLE_FAN_ABNORMAL\x10\xdc\x0f\x12 \n\x1b\x45\x32\x30\x32\x30_LEFT_FAN_OPEN_CIRCUIT\x10\xe4\x0f\x12!\n\x1c\x45\x32\x30\x32\x31_LEFT_FAN_SHORT_CIRCUIT\x10\xe5\x0f\x12\x1c\n\x17\x45\x32\x30\x32\x32_LEFT_FAN_ABNORMAL\x10\xe6\x0f\x12!\n\x1c\x45\x32\x30\x32\x34_RIGHT_FAN_OPEN_CIRCUIT\x10\xe8\x0f\x12\"\n\x1d\x45\x32\x30\x32\x35_RIGHT_FAN_SHORT_CIRCUIT\x10\xe9\x0f\x12\x1d\n\x18\x45\x32\x30\x32\x36_RIGHT_FAN_ABNORMAL\x10\xea\x0f\x12#\n\x1e\x45\x32\x31\x31\x32_SINGLE_BRUSH_OVERCURRENT\x10\xc0\x10\x12)\n$E2122_DOUBLE_BRUSH_FRONT_OVERCURRENT\x10\xca\x10\x12(\n#E2125_DOUBLE_BRUSH_BACK_OVERCURRENT\x10\xcd\x10\x12$\n\x1f\x45\x32\x31\x31\x30_SINGLE_BRUSH_OPEN_CIRCUIT\x10\xbe\x10\x12%\n E2111_SINGLE_BRUSH_SHORT_CIRCUIT\x10\xbf\x10\x12 \n\x1b\x45\x32\x31\x31\x33_SINGLE_BRUSH_ABNORMAL\x10\xc1\x10\x12*\n%E2120_DOUBLE_BRUSH_FRONT_OPEN_CIRCUIT\x10\xc8\x10\x12+\n&E2121_DOUBLE_BRUSH_FRONT_SHORT_CIRCUIT\x10\xc9\x10\x12)\n$E2123_DOUBLE_BRUSH_BACK_OPEN_CIRCUIT\x10\xcb\x10\x12*\n%E2124_DOUBLE_BRUSH_BACK_SHORT_CIRCUIT\x10\xcc\x10\x12(\n#E2213_SINGLE_SIDE_BRUSH_OVERCURRENT\x10\xa5\x11\x12&\n!E2223_LEFT_SIDE_BRUSH_OVERCURRENT\x10\xaf\x11\x12\'\n\"E2227_RIGHT_SIDE_BRUSH_OVERCURRENT\x10\xb3\x11\x12)\n$E2210_SINGLE_SIDE_BRUSH_OPEN_CIRCUIT\x10\xa2\x11\x12*\n%E2211_SINGLE_SIDE_BRUSH_SHORT_CIRCUIT\x10\xa3\x11\x12%\n E2212_SINGLE_SIDE_BRUSH_ABNORMAL\x10\xa4\x11\x12\'\n\"E2220_LEFT_SIDE_BRUSH_OPEN_CIRCUIT\x10\xac\x11\x12(\n#E2221_LEFT_SIDE_BRUSH_SHORT_CIRCUIT\x10\xad\x11\x12#\n\x1e\x45\x32\x32\x32\x32_LEFT_SIDE_BRUSH_ABNORMAL\x10\xae\x11\x12(\n#E2224_RIGHT_SIDE_BRUSH_OPEN_CIRCUIT\x10\xb0\x11\x12)\n$E2225_RIGHT_SIDE_BRUSH_SHORT_CIRCUIT\x10\xb1\x11\x12$\n\x1f\x45\x32\x32\x32\x36_RIGHT_SIDE_BRUSH_ABNORMAL\x10\xb2\x11\x12 \n\x1b\x45\x32\x33\x31\x30_DUSTBIN_NOT_INSTALLED\x10\x86\x12\x12\x36\n1E2311_DUSTBIN_INSTALLED_USE_TIME_EXCEEDS_10_HOURS\x10\x87\x12\x12(\n#E3013_ROBOT_WATER_TANK_INSUFFICIENT\x10\xc5\x17\x12(\n#E3010_ROBOT_WATER_PUMP_OPEN_CIRCUIT\x10\xc2\x17\x12)\n$E3011_ROBOT_WATER_PUMP_SHORT_CIRCUIT\x10\xc3\x17\x12/\n*E3012_ROBOT_WATER_TANK_WATER_PUMP_ABNORMAL\x10\xc4\x17\x12/\n*E3020_ROBOT_WATER_TANK_REMOVED_CANNOT_MOVE\x10\xcc\x17\x12!\n\x1c\x45\x33\x31\x31\x30_LEFT_MOP_NOT_INSTALLED\x10\xa6\x18\x12\"\n\x1d\x45\x33\x31\x31\x31_RIGHT_MOP_NOT_INSTALLED\x10\xa7\x18\x12 \n\x1b\x45\x33\x31\x32\x33_ROTATING_MOTOR_JAMMED\x10\xb3\x18\x12\x1f\n\x1a\x45\x33\x31\x33\x33_LIFTING_MOTOR_JAMMED\x10\xbd\x18\x12&\n!E3120_ROTATING_MOTOR_OPEN_CIRCUIT\x10\xb0\x18\x12\'\n\"E3121_ROTATING_MOTOR_SHORT_CIRCUIT\x10\xb1\x18\x12\"\n\x1d\x45\x33\x31\x32\x32_ROTATING_MOTOR_ABNORMAL\x10\xb2\x18\x12%\n E3130_LIFTING_MOTOR_OPEN_CIRCUIT\x10\xba\x18\x12&\n!E3131_LIFTING_MOTOR_SHORT_CIRCUIT\x10\xbb\x18\x12!\n\x1c\x45\x33\x31\x33\x32_LIFTING_MOTOR_ABNORMAL\x10\xbc\x18\x12\"\n\x1d\x45\x34\x30\x31\x32_RADAR_ROTATION_ABNORMAL\x10\xac\x1f\x12\x18\n\x13\x45\x34\x30\x31\x31_RADAR_BLOCKED\x10\xab\x1f\x12\x39\n4E4010_RADAR_NO_SIGNAL_COMMUNICATION_POSSIBLY_DAMAGED\x10\xaa\x1f\x12\x1d\n\x18\x45\x34\x30\x32\x30_GYROSCOPE_ABNORMAL\x10\xb4\x1f\x12\x37\n2E4030_TOF_NO_SIGNAL_COMMUNICATION_POSSIBLY_DAMAGED\x10\xbe\x1f\x12\x16\n\x11\x45\x34\x30\x33\x31_TOF_BLOCKED\x10\xbf\x1f\x12\x37\n2E4040_CAM_NO_SIGNAL_COMMUNICATION_POSSIBLY_DAMAGED\x10\xc8\x1f\x12\x16\n\x11\x45\x34\x30\x34\x31_CAM_BLOCKED\x10\xc9\x1f\x12?\n:E4090_WALL_SENSOR_NO_SIGNAL_COMMUNICATION_POSSIBLY_DAMAGED\x10\xfa\x1f\x12\x1e\n\x19\x45\x34\x30\x39\x31_WALL_SENSOR_BLOCKED\x10\xfb\x1f\x12,\n\'E4111_LEFT_FRONT_COLLISION_LONG_TRIGGER\x10\x8f \x12-\n(E4112_RIGHT_FRONT_COLLISION_LONG_TRIGGER\x10\x90 \x12>\n9E4120_ULTRASONIC_COMMUNICATION_INTERRUPTED_CLEANING_SCENE\x10\x98 \x12\x42\n=E4121_ULTRASONIC_COMMUNICATION_INTERRUPTED_NON_CLEANING_SCENE\x10\x99 \x12$\n\x1f\x45\x34\x31\x33\x30_LASER_SHIELD_LONG_TRIGGER\x10\xa2 \x12-\n(E5012_BATTERY_CHARGING_CURRENT_TOO_SMALL\x10\x94\'\x12\x1f\n\x1a\x45\x35\x30\x31\x30_BATTERY_OPEN_CIRCUIT\x10\x92\'\x12 \n\x1b\x45\x35\x30\x31\x31_BATTERY_SHORT_CIRCUIT\x10\x93\'\x12.\n)E5013_BATTERY_DISCHARGE_CURRENT_TOO_LARGE\x10\x95\'\x12%\n E5016_CHARGING_CURRENT_TOO_LARGE\x10\x98\'\x12$\n\x1f\x45\x35\x30\x31\x37_CHARGING_VOLTAGE_ABNORMAL\x10\x99\'\x12\'\n\"E5018_BATTERY_TEMPERATURE_ABNORMAL\x10\x9a\'\x12%\n E5021_DISCHARGE_HIGH_TEMPERATURE\x10\x9d\'\x12$\n\x1f\x45\x35\x30\x32\x32_DISCHARGE_LOW_TEMPERATURE\x10\x9e\'\x12$\n\x1f\x45\x35\x30\x32\x33_CHARGING_HIGH_TEMPERATURE\x10\x9f\'\x12#\n\x1e\x45\x35\x30\x32\x34_CHARGING_LOW_TEMPERATURE\x10\xa0\'\x12\x1f\n\x1a\x45\x35\x30\x31\x34_LOW_BATTERY_SHUTDOWN\x10\x96\'\x12/\n*E5015_LOW_BATTERY_CANNOT_SCHEDULE_CLEANING\x10\x97\'\x12\x18\n\x13\x45\x35\x31\x31\x30_WIFI_ABNORMAL\x10\xf6\'\x12\x16\n\x11\x45\x35\x31\x31\x31_BT_ABNORMAL\x10\xf7\'\x12*\n%E5112_INFRARED_COMMUNICATION_ABNORMAL\x10\xf8\'\x12)\n$E6010_CLEAN_WATER_TANK_NOT_INSTALLED\x10\xfa.\x12)\n$E6020_DIRTY_WATER_TANK_NOT_INSTALLED\x10\x84/\x12:\n5E6025_DIRTY_WATER_TANK_ABNORMAL_FULL_OR_NOT_INSTALLED\x10\x89/\x12!\n\x1c\x45\x36\x30\x31\x31_CLEAN_WATER_TANK_EMPTY\x10\xfb.\x12 \n\x1b\x45\x36\x30\x32\x31_DIRTY_WATER_TANK_FULL\x10\x85/\x12(\n#E6012_CLEAN_WATER_PUMP_OPEN_CIRCUIT\x10\xfc.\x12)\n$E6013_CLEAN_WATER_PUMP_SHORT_CIRCUIT\x10\xfd.\x12(\n#E6014_THREE_WAY_VALVE_SHORT_CIRCUIT\x10\xfe.\x12(\n#E6022_DIRTY_WATER_PUMP_OPEN_CIRCUIT\x10\x86/\x12)\n$E6023_DIRTY_WATER_PUMP_SHORT_CIRCUIT\x10\x87/\x12.\n)E6024_DIRTY_WATER_TANK_NOT_CLOSED_TIGHTLY\x10\x88/\x12&\n!E6030_CLEANING_DISC_NOT_INSTALLED\x10\x8e/\x12#\n\x1e\x45\x36\x30\x33\x31_CLEANING_DISC_WATER_FULL\x10\x8f/\x12\x34\n/E6032_CLEANING_DISC_NOT_INSTALLED_OR_WATER_FULL\x10\x90/\x12#\n\x1e\x45\x36\x30\x34\x30_BLOWING_FAN_OPEN_CIRCUIT\x10\x98/\x12$\n\x1f\x45\x36\x30\x34\x31_BLOWING_FAN_SHORT_CIRCUIT\x10\x99/\x12&\n!E6042_HEATING_MODULE_OPEN_CIRCUIT\x10\x9a/\x12\x1b\n\x16\x45\x36\x30\x34\x33_NTC_OPEN_CIRCUIT\x10\x9b/\x12.\n)E6110_VOLTAGE_TRANSFORMER_DEGREE_ABNORMAL\x10\xde/\x12\x1d\n\x18\x45\x36\x31\x31\x31_DUST_BIN_LEAKS_AIR\x10\xdf/\x12\x1b\n\x16\x45\x36\x31\x31\x32_DUST_BIN_BLOCKED\x10\xe0/\x12!\n\x1c\x45\x36\x31\x31\x33_DUST_BAG_NOT_INSTALLED\x10\xe1/\x12\x19\n\x14\x45\x36\x31\x31\x34_FAN_OVERHEATED\x10\xe2/\x12\"\n\x1d\x45\x36\x31\x31\x35_PRESSURE_GAUGE_ABNORMAL\x10\xe3/\x12G\nBE6311_HAIR_CUTTING_COMPONENT_ABNORMAL_OR_BLOCKED_CANNOT_START_WORK\x10\xa7\x31\x12\x1e\n\x19\x45\x37\x30\x30\x30_SMALL_SPACE_TIMEOUT\x10\xd8\x36\x12$\n\x1f\x45\x37\x30\x30\x31_PART_OF_MACHINE_SUSPENDED\x10\xd9\x36\x12\x18\n\x13\x45\x37\x30\x30\x34_MACHINE_STUCK\x10\xdc\x36\x12\x46\nAE7002_MACHINE_PICKED_UP_EXCEEDING_3_GROUND_CHECKS_WHEEL_SUSPENDED\x10\xda\x36\x12$\n\x1f\x45\x37\x30\x30\x33_STARTUP_FALLING_SUSPENDED\x10\xdb\x36\x12!\n\x1c\x45\x37\x30\x31\x30_ENTERED_FORBIDDEN_AREA\x10\xe2\x36\x12\x19\n\x14\x45\x37\x30\x31\x31_ENTERED_CARPET\x10\xe3\x36\x12\x19\n\x14\x45\x37\x30\x33\x31_RIDING_FAILURE\x10\xf7\x36\x12\x35\n0E7035_RIDING_FAILURE_BASE_STATION_NOT_POWERED_ON\x10\xfb\x36\x12*\n%E7036_RIDING_FAILURE_OMNIWHEEL_JAMMED\x10\xfc\x36\x12-\n(E7037_RIDING_FAILURE_INFRARED_REFLECTION\x10\xfd\x36\x12@\n;E7033_EXPLORING_BASE_STATION_FAILURE_BASE_STATION_DEPARTURE\x10\xf9\x36\x12%\n E7034_CANNOT_FIND_STARTING_POINT\x10\xfa\x36\x12\x1b\n\x16\x45\x37\x30\x34\x30_DISMOUNT_FAILURE\x10\x80\x37\x12\x19\n\x14\x45\x37\x30\x35\x33_MACHINE_TILTED\x10\x8d\x37\x12\'\n\"E7055_STATION_NOT_FOUND_CANNOT_MOP\x10\x8f\x37*\x80\n\n\x0ePromptCodeList\x12\x0e\n\nP0000_NONE\x10\x00\x12\'\n#P0061_LOW_BATTERY_RECHARGE_NO_CLEAN\x10=\x12\'\n#P0078_LOW_BATTERY_CANNOT_START_TASK\x10N\x12+\n\'P0065_LOW_BATTERY_30_PERCENT_NOT_ENOUGH\x10\x41\x12+\n\'P0066_LOW_BATTERY_10_PERCENT_NOT_ENOUGH\x10\x42\x12\x1e\n\x1aP0079_LOW_BATTERY_RECHARGE\x10O\x12.\n*P0083_CHILD_LOCK_ON_CANNOT_USE_POSITIONING\x10S\x12+\n\'P0088_CHILD_LOCK_ON_CANNOT_USE_RECHARGE\x10X\x12 \n\x1cP0024_NETWORK_PASSWORD_ERROR\x10\x18\x12*\n&P0025_ROUTER_NOT_CONNECTED_TO_INTERNET\x10\x19\x12\x1e\n\x1aP0085_SCHEDULE_CLEAN_START\x10U\x12*\n&P0087_MAP_DATA_UPDATING_CANNOT_OPERATE\x10W\x12\x1a\n\x16P0031_LOCATION_SUCCESS\x10\x1f\x12#\n\x1fP0038_MOPPING_COMPLETED_IN_TASK\x10&\x12&\n\"P0039_MOPPING_COMPLETED_AFTER_TASK\x10\'\x12-\n)P0040_RETURN_TO_BASE_AFTER_TASK_COMPLETED\x10(\x12\x18\n\x14P0045_TASK_COMPLETED\x10-\x12\x35\n1P0076_CANNOT_EXECUTE_POSITIONING_RECHARGE_IN_BASE\x10L\x12(\n$P0090_BASE_INSIDE_MOP_BUTTON_PRESSED\x10Z\x12\x34\n0P0091_BASE_INSIDE_DUST_COLLECTING_BUTTON_PRESSED\x10[\x12\x33\n.P6117_LOW_BATTERY_CANNOT_START_DUST_COLLECTION\x10\xe5/\x12?\n:P6118_LOW_BATTERY_CANNOT_START_ROLLING_BRUSH_SELF_CLEANING\x10\xe6/\x12$\n\x1fP6300_HAIR_CLEANING_IN_PROGRESS\x10\x9c\x31\x12\x30\n+P6301_LOW_BATTERY_CANNOT_START_HAIR_CUTTING\x10\x9d\x31\x12\x18\n\x13P6310_POWER_FAILURE\x10\xa6\x31\x12\x30\n+P7020_POSITIONING_FAILED_IN_GLOBAL_CLEANING\x10\xec\x36\x12\x34\n/P7021_POSITIONING_FAILED_IN_NON_GLOBAL_CLEANING\x10\xed\x36\x12\x17\n\x12P7050_CANNOT_REACH\x10\x8a\x37\x12\x1b\n\x16P7051_SCHEDULE_FAILURE\x10\x8b\x37\x12 \n\x1bP7052_PATH_PLANNING_FAILURE\x10\x8c\x37\x12*\n%P7054_TARGET_NOT_FOUND_STOP_FOLLOWING\x10\x8e\x37\x62\x06proto3') - -_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'proto.cloud.error_code_list_standard_pb2', globals()) -if _descriptor._USE_C_DESCRIPTORS == False: - - DESCRIPTOR._options = None - _ERRORCODELIST._serialized_start=64 - _ERRORCODELIST._serialized_end=5508 - _PROMPTCODELIST._serialized_start=5511 - _PROMPTCODELIST._serialized_end=6791 -# @@protoc_insertion_point(module_scope) diff --git a/proto-reference/error_code_list_standard_pb2.pyi b/proto-reference/error_code_list_standard_pb2.pyi deleted file mode 100644 index 7c85a76..0000000 --- a/proto-reference/error_code_list_standard_pb2.pyi +++ /dev/null @@ -1,178 +0,0 @@ -from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper -from google.protobuf import descriptor as _descriptor -from typing import ClassVar as _ClassVar - -DESCRIPTOR: _descriptor.FileDescriptor -E0000_NONE: ErrorCodeList -E1010_LEFT_WHEEL_OPEN_CIRCUIT: ErrorCodeList -E1011_LEFT_WHEEL_SHORT_CIRCUIT: ErrorCodeList -E1012_LEFT_WHEEL_ABNORMAL: ErrorCodeList -E1013_LEFT_WHEEL_OVERCURRENT: ErrorCodeList -E1020_RIGHT_WHEEL_OPEN_CIRCUIT: ErrorCodeList -E1021_RIGHT_WHEEL_SHORT_CIRCUIT: ErrorCodeList -E1022_RIGHT_WHEEL_ABNORMAL: ErrorCodeList -E1023_RIGHT_WHEEL_OVERCURRENT: ErrorCodeList -E1030_LEFT_RIGHT_WHEEL_OPEN_CIRCUIT: ErrorCodeList -E1031_LEFT_RIGHT_WHEEL_SHORT_CIRCUIT: ErrorCodeList -E1032_LEFT_RIGHT_WHEEL_ABNORMAL: ErrorCodeList -E1033_LEFT_RIGHT_WHEEL_OVERCURRENT: ErrorCodeList -E2010_SINGLE_FAN_OPEN_CIRCUIT: ErrorCodeList -E2011_SINGLE_FAN_SHORT_CIRCUIT: ErrorCodeList -E2012_SINGLE_FAN_ABNORMAL: ErrorCodeList -E2013_SINGLE_FAN_ROTATION_ABNORMAL: ErrorCodeList -E2020_LEFT_FAN_OPEN_CIRCUIT: ErrorCodeList -E2021_LEFT_FAN_SHORT_CIRCUIT: ErrorCodeList -E2022_LEFT_FAN_ABNORMAL: ErrorCodeList -E2023_LEFT_FAN_ROTATION_ABNORMAL: ErrorCodeList -E2024_RIGHT_FAN_OPEN_CIRCUIT: ErrorCodeList -E2025_RIGHT_FAN_SHORT_CIRCUIT: ErrorCodeList -E2026_RIGHT_FAN_ABNORMAL: ErrorCodeList -E2027_RIGHT_FAN_ROTATION_ABNORMAL: ErrorCodeList -E2110_SINGLE_BRUSH_OPEN_CIRCUIT: ErrorCodeList -E2111_SINGLE_BRUSH_SHORT_CIRCUIT: ErrorCodeList -E2112_SINGLE_BRUSH_OVERCURRENT: ErrorCodeList -E2113_SINGLE_BRUSH_ABNORMAL: ErrorCodeList -E2120_DOUBLE_BRUSH_FRONT_OPEN_CIRCUIT: ErrorCodeList -E2121_DOUBLE_BRUSH_FRONT_SHORT_CIRCUIT: ErrorCodeList -E2122_DOUBLE_BRUSH_FRONT_OVERCURRENT: ErrorCodeList -E2123_DOUBLE_BRUSH_BACK_OPEN_CIRCUIT: ErrorCodeList -E2124_DOUBLE_BRUSH_BACK_SHORT_CIRCUIT: ErrorCodeList -E2125_DOUBLE_BRUSH_BACK_OVERCURRENT: ErrorCodeList -E2210_SINGLE_SIDE_BRUSH_OPEN_CIRCUIT: ErrorCodeList -E2211_SINGLE_SIDE_BRUSH_SHORT_CIRCUIT: ErrorCodeList -E2212_SINGLE_SIDE_BRUSH_ABNORMAL: ErrorCodeList -E2213_SINGLE_SIDE_BRUSH_OVERCURRENT: ErrorCodeList -E2220_LEFT_SIDE_BRUSH_OPEN_CIRCUIT: ErrorCodeList -E2221_LEFT_SIDE_BRUSH_SHORT_CIRCUIT: ErrorCodeList -E2222_LEFT_SIDE_BRUSH_ABNORMAL: ErrorCodeList -E2223_LEFT_SIDE_BRUSH_OVERCURRENT: ErrorCodeList -E2224_RIGHT_SIDE_BRUSH_OPEN_CIRCUIT: ErrorCodeList -E2225_RIGHT_SIDE_BRUSH_SHORT_CIRCUIT: ErrorCodeList -E2226_RIGHT_SIDE_BRUSH_ABNORMAL: ErrorCodeList -E2227_RIGHT_SIDE_BRUSH_OVERCURRENT: ErrorCodeList -E2310_DUSTBIN_NOT_INSTALLED: ErrorCodeList -E2311_DUSTBIN_INSTALLED_USE_TIME_EXCEEDS_10_HOURS: ErrorCodeList -E3010_ROBOT_WATER_PUMP_OPEN_CIRCUIT: ErrorCodeList -E3011_ROBOT_WATER_PUMP_SHORT_CIRCUIT: ErrorCodeList -E3012_ROBOT_WATER_TANK_WATER_PUMP_ABNORMAL: ErrorCodeList -E3013_ROBOT_WATER_TANK_INSUFFICIENT: ErrorCodeList -E3020_ROBOT_WATER_TANK_REMOVED_CANNOT_MOVE: ErrorCodeList -E3110_LEFT_MOP_NOT_INSTALLED: ErrorCodeList -E3111_RIGHT_MOP_NOT_INSTALLED: ErrorCodeList -E3120_ROTATING_MOTOR_OPEN_CIRCUIT: ErrorCodeList -E3121_ROTATING_MOTOR_SHORT_CIRCUIT: ErrorCodeList -E3122_ROTATING_MOTOR_ABNORMAL: ErrorCodeList -E3123_ROTATING_MOTOR_JAMMED: ErrorCodeList -E3130_LIFTING_MOTOR_OPEN_CIRCUIT: ErrorCodeList -E3131_LIFTING_MOTOR_SHORT_CIRCUIT: ErrorCodeList -E3132_LIFTING_MOTOR_ABNORMAL: ErrorCodeList -E3133_LIFTING_MOTOR_JAMMED: ErrorCodeList -E4010_RADAR_NO_SIGNAL_COMMUNICATION_POSSIBLY_DAMAGED: ErrorCodeList -E4011_RADAR_BLOCKED: ErrorCodeList -E4012_RADAR_ROTATION_ABNORMAL: ErrorCodeList -E4020_GYROSCOPE_ABNORMAL: ErrorCodeList -E4030_TOF_NO_SIGNAL_COMMUNICATION_POSSIBLY_DAMAGED: ErrorCodeList -E4031_TOF_BLOCKED: ErrorCodeList -E4040_CAM_NO_SIGNAL_COMMUNICATION_POSSIBLY_DAMAGED: ErrorCodeList -E4041_CAM_BLOCKED: ErrorCodeList -E4090_WALL_SENSOR_NO_SIGNAL_COMMUNICATION_POSSIBLY_DAMAGED: ErrorCodeList -E4091_WALL_SENSOR_BLOCKED: ErrorCodeList -E4111_LEFT_FRONT_COLLISION_LONG_TRIGGER: ErrorCodeList -E4112_RIGHT_FRONT_COLLISION_LONG_TRIGGER: ErrorCodeList -E4120_ULTRASONIC_COMMUNICATION_INTERRUPTED_CLEANING_SCENE: ErrorCodeList -E4121_ULTRASONIC_COMMUNICATION_INTERRUPTED_NON_CLEANING_SCENE: ErrorCodeList -E4130_LASER_SHIELD_LONG_TRIGGER: ErrorCodeList -E5010_BATTERY_OPEN_CIRCUIT: ErrorCodeList -E5011_BATTERY_SHORT_CIRCUIT: ErrorCodeList -E5012_BATTERY_CHARGING_CURRENT_TOO_SMALL: ErrorCodeList -E5013_BATTERY_DISCHARGE_CURRENT_TOO_LARGE: ErrorCodeList -E5014_LOW_BATTERY_SHUTDOWN: ErrorCodeList -E5015_LOW_BATTERY_CANNOT_SCHEDULE_CLEANING: ErrorCodeList -E5016_CHARGING_CURRENT_TOO_LARGE: ErrorCodeList -E5017_CHARGING_VOLTAGE_ABNORMAL: ErrorCodeList -E5018_BATTERY_TEMPERATURE_ABNORMAL: ErrorCodeList -E5021_DISCHARGE_HIGH_TEMPERATURE: ErrorCodeList -E5022_DISCHARGE_LOW_TEMPERATURE: ErrorCodeList -E5023_CHARGING_HIGH_TEMPERATURE: ErrorCodeList -E5024_CHARGING_LOW_TEMPERATURE: ErrorCodeList -E5110_WIFI_ABNORMAL: ErrorCodeList -E5111_BT_ABNORMAL: ErrorCodeList -E5112_INFRARED_COMMUNICATION_ABNORMAL: ErrorCodeList -E6010_CLEAN_WATER_TANK_NOT_INSTALLED: ErrorCodeList -E6011_CLEAN_WATER_TANK_EMPTY: ErrorCodeList -E6012_CLEAN_WATER_PUMP_OPEN_CIRCUIT: ErrorCodeList -E6013_CLEAN_WATER_PUMP_SHORT_CIRCUIT: ErrorCodeList -E6014_THREE_WAY_VALVE_SHORT_CIRCUIT: ErrorCodeList -E6020_DIRTY_WATER_TANK_NOT_INSTALLED: ErrorCodeList -E6021_DIRTY_WATER_TANK_FULL: ErrorCodeList -E6022_DIRTY_WATER_PUMP_OPEN_CIRCUIT: ErrorCodeList -E6023_DIRTY_WATER_PUMP_SHORT_CIRCUIT: ErrorCodeList -E6024_DIRTY_WATER_TANK_NOT_CLOSED_TIGHTLY: ErrorCodeList -E6025_DIRTY_WATER_TANK_ABNORMAL_FULL_OR_NOT_INSTALLED: ErrorCodeList -E6030_CLEANING_DISC_NOT_INSTALLED: ErrorCodeList -E6031_CLEANING_DISC_WATER_FULL: ErrorCodeList -E6032_CLEANING_DISC_NOT_INSTALLED_OR_WATER_FULL: ErrorCodeList -E6040_BLOWING_FAN_OPEN_CIRCUIT: ErrorCodeList -E6041_BLOWING_FAN_SHORT_CIRCUIT: ErrorCodeList -E6042_HEATING_MODULE_OPEN_CIRCUIT: ErrorCodeList -E6043_NTC_OPEN_CIRCUIT: ErrorCodeList -E6110_VOLTAGE_TRANSFORMER_DEGREE_ABNORMAL: ErrorCodeList -E6111_DUST_BIN_LEAKS_AIR: ErrorCodeList -E6112_DUST_BIN_BLOCKED: ErrorCodeList -E6113_DUST_BAG_NOT_INSTALLED: ErrorCodeList -E6114_FAN_OVERHEATED: ErrorCodeList -E6115_PRESSURE_GAUGE_ABNORMAL: ErrorCodeList -E6311_HAIR_CUTTING_COMPONENT_ABNORMAL_OR_BLOCKED_CANNOT_START_WORK: ErrorCodeList -E7000_SMALL_SPACE_TIMEOUT: ErrorCodeList -E7001_PART_OF_MACHINE_SUSPENDED: ErrorCodeList -E7002_MACHINE_PICKED_UP_EXCEEDING_3_GROUND_CHECKS_WHEEL_SUSPENDED: ErrorCodeList -E7003_STARTUP_FALLING_SUSPENDED: ErrorCodeList -E7004_MACHINE_STUCK: ErrorCodeList -E7010_ENTERED_FORBIDDEN_AREA: ErrorCodeList -E7011_ENTERED_CARPET: ErrorCodeList -E7031_RIDING_FAILURE: ErrorCodeList -E7033_EXPLORING_BASE_STATION_FAILURE_BASE_STATION_DEPARTURE: ErrorCodeList -E7034_CANNOT_FIND_STARTING_POINT: ErrorCodeList -E7035_RIDING_FAILURE_BASE_STATION_NOT_POWERED_ON: ErrorCodeList -E7036_RIDING_FAILURE_OMNIWHEEL_JAMMED: ErrorCodeList -E7037_RIDING_FAILURE_INFRARED_REFLECTION: ErrorCodeList -E7040_DISMOUNT_FAILURE: ErrorCodeList -E7053_MACHINE_TILTED: ErrorCodeList -E7055_STATION_NOT_FOUND_CANNOT_MOP: ErrorCodeList -P0000_NONE: PromptCodeList -P0024_NETWORK_PASSWORD_ERROR: PromptCodeList -P0025_ROUTER_NOT_CONNECTED_TO_INTERNET: PromptCodeList -P0031_LOCATION_SUCCESS: PromptCodeList -P0038_MOPPING_COMPLETED_IN_TASK: PromptCodeList -P0039_MOPPING_COMPLETED_AFTER_TASK: PromptCodeList -P0040_RETURN_TO_BASE_AFTER_TASK_COMPLETED: PromptCodeList -P0045_TASK_COMPLETED: PromptCodeList -P0061_LOW_BATTERY_RECHARGE_NO_CLEAN: PromptCodeList -P0065_LOW_BATTERY_30_PERCENT_NOT_ENOUGH: PromptCodeList -P0066_LOW_BATTERY_10_PERCENT_NOT_ENOUGH: PromptCodeList -P0076_CANNOT_EXECUTE_POSITIONING_RECHARGE_IN_BASE: PromptCodeList -P0078_LOW_BATTERY_CANNOT_START_TASK: PromptCodeList -P0079_LOW_BATTERY_RECHARGE: PromptCodeList -P0083_CHILD_LOCK_ON_CANNOT_USE_POSITIONING: PromptCodeList -P0085_SCHEDULE_CLEAN_START: PromptCodeList -P0087_MAP_DATA_UPDATING_CANNOT_OPERATE: PromptCodeList -P0088_CHILD_LOCK_ON_CANNOT_USE_RECHARGE: PromptCodeList -P0090_BASE_INSIDE_MOP_BUTTON_PRESSED: PromptCodeList -P0091_BASE_INSIDE_DUST_COLLECTING_BUTTON_PRESSED: PromptCodeList -P6117_LOW_BATTERY_CANNOT_START_DUST_COLLECTION: PromptCodeList -P6118_LOW_BATTERY_CANNOT_START_ROLLING_BRUSH_SELF_CLEANING: PromptCodeList -P6300_HAIR_CLEANING_IN_PROGRESS: PromptCodeList -P6301_LOW_BATTERY_CANNOT_START_HAIR_CUTTING: PromptCodeList -P6310_POWER_FAILURE: PromptCodeList -P7020_POSITIONING_FAILED_IN_GLOBAL_CLEANING: PromptCodeList -P7021_POSITIONING_FAILED_IN_NON_GLOBAL_CLEANING: PromptCodeList -P7050_CANNOT_REACH: PromptCodeList -P7051_SCHEDULE_FAILURE: PromptCodeList -P7052_PATH_PLANNING_FAILURE: PromptCodeList -P7054_TARGET_NOT_FOUND_STOP_FOLLOWING: PromptCodeList - -class ErrorCodeList(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - -class PromptCodeList(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] diff --git a/proto-reference/error_code_list_t2080.proto b/proto-reference/error_code_list_t2080.proto deleted file mode 100644 index 102ca5c..0000000 --- a/proto-reference/error_code_list_t2080.proto +++ /dev/null @@ -1,107 +0,0 @@ -syntax = "proto3"; - -// option optimize_for = LITE_RUNTIME; - -package proto.cloud.t20xx; - -enum ErrorCodeList { - E000_NONE = 0; - E001_THE_SIDE_BRUSH_IS_STUCK = 1; // 边刷被卡住 [EN: Side brush is stuck] - E002_ROLLING_BRUSH_IS_STUCK = 2; // 滚刷被卡住 [EN: Rolling brush is stuck] - E003_FAN_SPEED_IS_ABNORMAL = 3; // 风机转速异常 [EN: Fan speed is abnormal] - E004_MICRO_SWITCH_IS_ABNORMAL = 4; // 微动开关异常 [EN: Micro switch is abnormal] - E005_THE_WHEEL_IS_OVERHANGING = 5; // 轮子悬空 [EN: Wheel is overhanging] - E006_THE_RIGHT_SIDE_SENSOR_ALONG_THE_WALL_IS_BLOCKED = 6; // 右侧沿墙传感器被挡住 [EN: Right side wall sensor is blocked] - E007_THE_COLLISION_BUFFER_IS_JAMMED = 7; // 碰撞缓冲器被卡住 [EN: Collision buffer is jammed] - E008_THE_COLLISION_SWITCH_IS_ABNORMAL_THE_MANUAL_OR_APP = 8; // 碰撞开关异常 [EN: Collision switch is abnormal] - E009_ULTRASONIC_SENSOR_IS_ABNORMAL_THE_MANUAL_OR_APP = 9; // 超声波传感器异常 [EN: Ultrasonic sensor is abnormal] - E010_LASER_PROTECTION_COVER_IS_STUCK = 10; // 激光保护罩被卡住 [EN: Laser protection cover is stuck] - E011_LASER_SENSOR_MAY_BE_BLOCKED = 11; // 激光传感器可能被遮挡 [EN: Laser sensor may be blocked] - E012_LASER_SENSOR_IS_STUCK_OR_ENTANGLED = 12; // 激光传感器被卡住或缠绕 [EN: Laser sensor is stuck or entangled] - E013_COMMUNICATION_MODULE_IS_ABNORMAL = 13; // 通讯模块异常 [EN: Communication module is abnormal] - E014_THE_POWER_IS_TOO_LOW_THE_SYSTEM_IS_ABOUT_TO_SHUT_DOWN_AUTOMATICALLY = 14; // 电量过低,系统即将自动关机 [EN: Battery too low, system will shut down automatically] - E015_PLEASE_PUT_BACK_THE_DUST_BOX_AND_FILTER = 15; // 请装回尘盒和滤网。 [EN: Please put back the dust box and filter.] - E016_THE_WATER_TANK_IS_TAKEN_OUT = 16; // 水箱取出 [EN: Water tank is taken out] - E017_THE_MOP_CLOTH_IS_OFF = 17; // 拖布脱落 [EN: Mop cloth is off] - E018_THE_MACHINE_IS_TILTED = 18; // 机器倾斜 [EN: Machine is tilted] - E019_THE_MACHINE_IS_TRAPPED_PLEASE_CLEAR_THE_SURROUNDING_OBSTACLES = 19; // 机器被困 [EN: Machine is trapped, please clear surrounding obstacles] - E020_THE_MACHINE_IS_TRAPPED_PLEASE_MOVE_TO_THE_ORIGINAL_PLACE_NEAR_TO_START = 20; // 机器被困 [EN: Machine is trapped, please move to the original place near to start] - E021_THE_WATER_TANK_IS_NOT_ENOUGH = 21; // 清水箱水量不足 [EN: Clean water tank is not enough] - E022_THE_SEWAGE_TANK_IS_FUL = 22; // 污水箱已满 [EN: Sewage tank is full] - E023_WATER_TANK_IS_NOT_IN_POSITION = 23; // 水箱不在位 [EN: Water tank is not in position] - E024_HEATER_IS_ABNORMAL = 24; // 加热器异常 [EN: Heater is abnormal] - E025_THE_WATER_LEVEL_OF_CLEANING_TRAY_IS_ABNORMAL = 25; // 清洗盘水位异常 [EN: Cleaning tray water level is abnormal] - E026_THE_CLEANING_TRAY_IS_NOT_INSTALLED = 26; // 清洗盘未安装 [EN: Cleaning tray is not installed] - - E027_TRAVELING_WHEEL_IS_STUCK = 27; // 行走轮被卡住 [EN: Traveling wheel is stuck] - E029_NO_GO_ZONE_DETECTED_PLEASE_MOVE = 29; // 检测到禁区,请移动到新位置启动 [EN: No-go zone detected, please move to new location to start] - E030_VIRTUAL_WALL_MAGNETIC_STRIP_DETECTED_PLEASE_MOVE = 30; // 检测到虚拟墙磁条,请移动到新位置启动 [EN: Virtual wall magnetic strip detected, please move to new location to start] - E031_ROTATING_MOTOR_IS_STUCK = 31; // 旋转电机被卡住 [EN: Rotating motor is stuck] - E032_LIFT_MOTOR_IS_STUCK = 32; // 升降电机被卡住 [EN: Lift motor is stuck] - - E051_LONG_TIME_NOT_CLEAN_THE_DUST_BOX = 51; // 长时间未清理尘盒 [EN: Dust box not cleaned for long time] - E052_CAMERA_LENS_IS_DIRTY = 52; // 摄像头镜头赃污 [EN: Camera lens is dirty] - - E101_THE_BATTERY_IS_ABNORMAL = 101; // 电池异常 [EN: Battery is abnormal] - E102_THE_WHEEL_MODULE_IS_ABNORMAL = 102; // 轮子模组异常 [EN: Wheel module is abnormal] - E103_THE_SIDE_BRUSH_MODULE_IS_ABNORMAL = 103; // 边刷模组异常 [EN: Side brush module is abnormal] - E104_THE_ROLLER_BRUSH_IS_ABNORMAL = 104; // 滚刷异常 [EN: Roller brush is abnormal] - E105_THE_FAN_IS_ABNORMAL = 105; // 风机异常 [EN: Fan is abnormal] - E106_THE_WATER_PUMP_IS_ABNORMAL = 106; // 水泵异常 [EN: Water pump is abnormal] - E107_THE_LASER_SENSOR_IS_ABNORMAL = 107; // 激光传感器异常 [EN: Laser sensor is abnormal] - E108_THE_OPTICAL_FLOW_SENSOR_IS_ABNORMAL = 108; // 光流传感器异常 [EN: Optical flow sensor is abnormal] - E109_THE_GYROSCOPE_IS_ABNORMAL = 109; // 陀螺仪异常 [EN: Gyroscope is abnormal] - E110_CAMERA_IS_ABNORMAL = 110; // 摄像头异常 [EN: Camera is abnormal] - E111_ROTATION_MOTOR_ABNORMAL = 111; // 旋转电机异常 [EN: Rotation motor abnormal] - E112_LIFT_MOTOR_ABNORMAL = 112; // 升降电机异常 [EN: Lift motor abnormal] - E113_THE_WATER_SPRAYING_DEVICE_IS_ABNORMAL = 113; // 喷水装置异常 [EN: Water spraying device is abnormal] - E114_THE_WATER_PUMPING_DEVICE_IS_ABNORMAL = 114; // 抽水装置异常 [EN: Water pumping device is abnormal] - E115_THE_AIR_DRYING_DEVICE_IS_ABNORMAL = 115; // 风干装置异常 [EN: Air drying device is abnormal] - E116_3D_TOF_ABNORMAL = 116; // 3D TOF 异常 [EN: 3D TOF abnormal] - E117_ULTRASONIC_SENSOR_ABNORMAL = 117; // 超声波传感器异常 [EN: Ultrasonic sensor abnormal] - E118_LASER_SHIELD_IS_JAMMED = 118; // 激光保护罩被卡住 [EN: Laser shield is jammed] - - E119_MID_SWEEP_OPEN_CIRCUIT_PROTECTION_TEST = 119; // 中扫开路保护测试 [EN: Mid sweep open circuit protection test] - E120_LEFT_AND_RIGHT_WHEEL_OPEN_CIRCUIT_PROTECTION_TEST = 120; // 左右轮开路保护测试 [EN: Left and right wheel open circuit protection test] - E121_SIDE_SWEEP_OPEN_CIRCUIT_PROTECTION_TEST = 121; // 边扫开路保护测试 [EN: Side sweep open circuit protection test] - E122_FAN_OPEN_CIRCUIT_PROTECTION_TEST = 122; // 风机开路保护测试 [EN: Fan open circuit protection test] - E123_RADAR_OPEN_CIRCUIT_PROTECTION_TEST = 123; // 雷达开路保护测试 [EN: Radar open circuit protection test] - E124_TOF_OPEN_CIRCUIT_PROTECTION_TEST = 124; // TOF开路保护测试 [EN: TOF open circuit protection test] - E125_TURNTABLE_MOTOR_OPEN_CIRCUIT = 125; // 转盘电机开路 [EN: Turntable motor open circuit] - E126_LIFT_MOTOR_OPEN_CIRCUIT = 126; // 升降电机开路 [EN: Lift motor open circuit] - E127_MID_SWEEP_SHORT_CIRCUIT_PROTECTION_TEST = 127; // 中扫短路保护测试 [EN: Mid sweep short circuit protection test] - E128_LEFT_AND_RIGHT_WHEEL_SHORT_CIRCUIT_PROTECTION_TEST = 128; // 左右轮短路保护测试 [EN: Left and right wheel short circuit protection test] - E129_SIDE_SWEEP_SHORT_CIRCUIT_PROTECTION_TEST = 129; // 边扫短路保护测试 [EN: Side sweep short circuit protection test] - E130_TURNTABLE_MOTOR_SHORT_CIRCUIT = 130; // 转盘电机短路 [EN: Turntable motor short circuit] - E131_LIFT_MOTOR_SHORT_CIRCUIT = 131; // 升降电机短路 [EN: Lift motor short circuit] - E132_MID_SWEEP_BLOCKING_PROTECTION_TEST = 132; // 中扫堵转保护测试 [EN: Mid sweep blocking protection test] - E133_LEFT_AND_RIGHT_WHEEL_BLOCKING_PROTECTION_TEST = 133; // 左右轮堵转保护测试 [EN: Left and right wheel blocking protection test] - E134_SIDE_SWEEP_BLOCKING_PROTECTION_TEST = 134; // 边扫堵转保护测试 [EN: Side sweep blocking protection test] - E135_BLOWER_BLOCKING_PROTECTION_TEST = 135; // 风机堵转保护测试 [EN: Blower blocking protection test] - E136_TURNTABLE_MOTOR_BLOCKING_TEST = 136; // 转盘电机堵转测试 [EN: Turntable motor blocking test] - E137_LIFTING_MOTOR_BLOCKING_TEST = 137; // 升降电机堵转测试 [EN: Lifting motor blocking test] - E138_FORWARD_COLLISION_PROTECTION_TEST = 138; // 前撞保护测试 [EN: Forward collision protection test] - E139_OFF_GROUND_PROTECTION_TEST = 139; // 离地保护测试 [EN: Off ground protection test] - E140_GRAY_LAYER_BOX_PROTECTION_TEST = 140; // 灰层盒保护测试 [EN: Gray layer box protection test] - E141_T2310_HOST_WATER_TANK_PROTECTION_TEST = 141; // T2310主机水箱保护测试 [EN: T2310 host water tank protection test] - E142_RADAR_COVER_MICRO_SWITCH_JAMMING_PROTECTION = 142; // 雷达盖微动开关卡死保护 [EN: Radar cover micro switch jamming protection] - E143_T2320_BASE_STATION_WATER_TANK_IS_NOT_IN_POSITION = 143; // T2320基站清水箱不在位 [EN: T2320 base station clean water tank is not in position] - E144_T2320_BASE_STATION_SEWAGE_TANK_IS_NOT_IN_POSITION = 144; // T2320基站污水箱不在位 [EN: T2320 base station sewage tank is not in position] - E145_T2320_BASE_STATION_SEWAGE_TANK_FULL = 145; // T2320基站污水箱满 [EN: T2320 base station sewage tank full] - E151_LEFT_WHEEL_OPEN_CIRCUIT_PROTECTION_TEST = 151; // 左轮开路保护测试 [EN: Left wheel open circuit protection test] - E152_RIGHT_WHEEL_OPEN_CIRCUIT_PROTECTION_TEST = 152; // 右轮开路保护测试 [EN: Right wheel open circuit protection test] -} - -enum PromptCodeList { - P000_NONE = 0; - P001_START_SCHEDULED_CLEANING = 1; // 开始预约清洁 [EN: Start scheduled cleaning] - P002_START_CRUISE_APPOINTMENT = 2; // 开始预约巡航 [EN: Start scheduled cruise] - P003_POWER_IS_LOW_RETURN_TO_BASE_STATION_IMMEDIATELY = 3; // 电量不足,立即返回基站 [EN: Battery low, return to base station immediately] - P004_POSITIONING_FAILED_REBUILD_MAP_START_NEW_CLEANING = 4; // 定位失败,重新建图,开始新清洁 [EN: Positioning failed, rebuild map, start new cleaning] - P005_POSITIONING_FAILED_MISSION_ENDED_START_BACK_TO_BASE_STATION = 5; // 定位失败,任务结束,开始返回基站 [EN: Positioning failed, mission ended, start returning to base station] - P006_SOME_AREAS_ARE_NOT_YET_CLEANED_BECAUSE_THEY_ARE_UNREACHABLE = 6; // 部分区域因为无法到达,还未清洁 [EN: Some areas are not yet cleaned because they are unreachable] - P007_PATH_PLANNING_FAILED_CANT_REACH_THE_DESIGNATED_AREA = 7; // 路径规划失败,无法到达指定区域 [EN: Path planning failed, cannot reach the designated area] - P008_UNABLE_TO_REACH_THE_TARGET_POINT = 8; // 无法到达目标点 [EN: Unable to reach the target point] - P009_BASE_STATION_EXPLORATION_FAILED_THE_MACHINE_RETURNED_TO_THE_STARTING_POINT = 9; // 基站探索失败,机器返回起点 [EN: Base station exploration failed, machine returned to starting point] - P010_BASE_STATION_EXPLORATION_FAILED_MACHINE_STOPPED_WORKING = 10; // 基站探索失败,机器停止工作 [EN: Base station exploration failed, machine stopped working] -} diff --git a/proto-reference/error_code_list_t2080_pb2.py b/proto-reference/error_code_list_t2080_pb2.py deleted file mode 100644 index 8421166..0000000 --- a/proto-reference/error_code_list_t2080_pb2.py +++ /dev/null @@ -1,27 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: proto/cloud/error_code_list_t2080.proto -"""Generated protocol buffer code.""" -from google.protobuf.internal import builder as _builder -from google.protobuf import descriptor as _descriptor -from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import symbol_database as _symbol_database -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - - - -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\'proto/cloud/error_code_list_t2080.proto\x12\x11proto.cloud.t20xx*\xcb\x1b\n\rErrorCodeList\x12\r\n\tE000_NONE\x10\x00\x12 \n\x1c\x45\x30\x30\x31_THE_SIDE_BRUSH_IS_STUCK\x10\x01\x12\x1f\n\x1b\x45\x30\x30\x32_ROLLING_BRUSH_IS_STUCK\x10\x02\x12\x1e\n\x1a\x45\x30\x30\x33_FAN_SPEED_IS_ABNORMAL\x10\x03\x12!\n\x1d\x45\x30\x30\x34_MICRO_SWITCH_IS_ABNORMAL\x10\x04\x12!\n\x1d\x45\x30\x30\x35_THE_WHEEL_IS_OVERHANGING\x10\x05\x12\x38\n4E006_THE_RIGHT_SIDE_SENSOR_ALONG_THE_WALL_IS_BLOCKED\x10\x06\x12\'\n#E007_THE_COLLISION_BUFFER_IS_JAMMED\x10\x07\x12;\n7E008_THE_COLLISION_SWITCH_IS_ABNORMAL_THE_MANUAL_OR_APP\x10\x08\x12\x38\n4E009_ULTRASONIC_SENSOR_IS_ABNORMAL_THE_MANUAL_OR_APP\x10\t\x12(\n$E010_LASER_PROTECTION_COVER_IS_STUCK\x10\n\x12$\n E011_LASER_SENSOR_MAY_BE_BLOCKED\x10\x0b\x12+\n\'E012_LASER_SENSOR_IS_STUCK_OR_ENTANGLED\x10\x0c\x12)\n%E013_COMMUNICATION_MODULE_IS_ABNORMAL\x10\r\x12L\nHE014_THE_POWER_IS_TOO_LOW_THE_SYSTEM_IS_ABOUT_TO_SHUT_DOWN_AUTOMATICALLY\x10\x0e\x12\x30\n,E015_PLEASE_PUT_BACK_THE_DUST_BOX_AND_FILTER\x10\x0f\x12$\n E016_THE_WATER_TANK_IS_TAKEN_OUT\x10\x10\x12\x1d\n\x19\x45\x30\x31\x37_THE_MOP_CLOTH_IS_OFF\x10\x11\x12\x1e\n\x1a\x45\x30\x31\x38_THE_MACHINE_IS_TILTED\x10\x12\x12\x46\nBE019_THE_MACHINE_IS_TRAPPED_PLEASE_CLEAR_THE_SURROUNDING_OBSTACLES\x10\x13\x12O\nKE020_THE_MACHINE_IS_TRAPPED_PLEASE_MOVE_TO_THE_ORIGINAL_PLACE_NEAR_TO_START\x10\x14\x12%\n!E021_THE_WATER_TANK_IS_NOT_ENOUGH\x10\x15\x12\x1f\n\x1b\x45\x30\x32\x32_THE_SEWAGE_TANK_IS_FUL\x10\x16\x12&\n\"E023_WATER_TANK_IS_NOT_IN_POSITION\x10\x17\x12\x1b\n\x17\x45\x30\x32\x34_HEATER_IS_ABNORMAL\x10\x18\x12\x35\n1E025_THE_WATER_LEVEL_OF_CLEANING_TRAY_IS_ABNORMAL\x10\x19\x12+\n\'E026_THE_CLEANING_TRAY_IS_NOT_INSTALLED\x10\x1a\x12!\n\x1d\x45\x30\x32\x37_TRAVELING_WHEEL_IS_STUCK\x10\x1b\x12(\n$E029_NO_GO_ZONE_DETECTED_PLEASE_MOVE\x10\x1d\x12\x39\n5E030_VIRTUAL_WALL_MAGNETIC_STRIP_DETECTED_PLEASE_MOVE\x10\x1e\x12 \n\x1c\x45\x30\x33\x31_ROTATING_MOTOR_IS_STUCK\x10\x1f\x12\x1c\n\x18\x45\x30\x33\x32_LIFT_MOTOR_IS_STUCK\x10 \x12)\n%E051_LONG_TIME_NOT_CLEAN_THE_DUST_BOX\x10\x33\x12\x1d\n\x19\x45\x30\x35\x32_CAMERA_LENS_IS_DIRTY\x10\x34\x12 \n\x1c\x45\x31\x30\x31_THE_BATTERY_IS_ABNORMAL\x10\x65\x12%\n!E102_THE_WHEEL_MODULE_IS_ABNORMAL\x10\x66\x12*\n&E103_THE_SIDE_BRUSH_MODULE_IS_ABNORMAL\x10g\x12%\n!E104_THE_ROLLER_BRUSH_IS_ABNORMAL\x10h\x12\x1c\n\x18\x45\x31\x30\x35_THE_FAN_IS_ABNORMAL\x10i\x12#\n\x1f\x45\x31\x30\x36_THE_WATER_PUMP_IS_ABNORMAL\x10j\x12%\n!E107_THE_LASER_SENSOR_IS_ABNORMAL\x10k\x12,\n(E108_THE_OPTICAL_FLOW_SENSOR_IS_ABNORMAL\x10l\x12\"\n\x1e\x45\x31\x30\x39_THE_GYROSCOPE_IS_ABNORMAL\x10m\x12\x1b\n\x17\x45\x31\x31\x30_CAMERA_IS_ABNORMAL\x10n\x12 \n\x1c\x45\x31\x31\x31_ROTATION_MOTOR_ABNORMAL\x10o\x12\x1c\n\x18\x45\x31\x31\x32_LIFT_MOTOR_ABNORMAL\x10p\x12.\n*E113_THE_WATER_SPRAYING_DEVICE_IS_ABNORMAL\x10q\x12-\n)E114_THE_WATER_PUMPING_DEVICE_IS_ABNORMAL\x10r\x12*\n&E115_THE_AIR_DRYING_DEVICE_IS_ABNORMAL\x10s\x12\x18\n\x14\x45\x31\x31\x36_3D_TOF_ABNORMAL\x10t\x12#\n\x1f\x45\x31\x31\x37_ULTRASONIC_SENSOR_ABNORMAL\x10u\x12\x1f\n\x1b\x45\x31\x31\x38_LASER_SHIELD_IS_JAMMED\x10v\x12/\n+E119_MID_SWEEP_OPEN_CIRCUIT_PROTECTION_TEST\x10w\x12:\n6E120_LEFT_AND_RIGHT_WHEEL_OPEN_CIRCUIT_PROTECTION_TEST\x10x\x12\x30\n,E121_SIDE_SWEEP_OPEN_CIRCUIT_PROTECTION_TEST\x10y\x12)\n%E122_FAN_OPEN_CIRCUIT_PROTECTION_TEST\x10z\x12+\n\'E123_RADAR_OPEN_CIRCUIT_PROTECTION_TEST\x10{\x12)\n%E124_TOF_OPEN_CIRCUIT_PROTECTION_TEST\x10|\x12%\n!E125_TURNTABLE_MOTOR_OPEN_CIRCUIT\x10}\x12 \n\x1c\x45\x31\x32\x36_LIFT_MOTOR_OPEN_CIRCUIT\x10~\x12\x30\n,E127_MID_SWEEP_SHORT_CIRCUIT_PROTECTION_TEST\x10\x7f\x12<\n7E128_LEFT_AND_RIGHT_WHEEL_SHORT_CIRCUIT_PROTECTION_TEST\x10\x80\x01\x12\x32\n-E129_SIDE_SWEEP_SHORT_CIRCUIT_PROTECTION_TEST\x10\x81\x01\x12\'\n\"E130_TURNTABLE_MOTOR_SHORT_CIRCUIT\x10\x82\x01\x12\"\n\x1d\x45\x31\x33\x31_LIFT_MOTOR_SHORT_CIRCUIT\x10\x83\x01\x12,\n\'E132_MID_SWEEP_BLOCKING_PROTECTION_TEST\x10\x84\x01\x12\x37\n2E133_LEFT_AND_RIGHT_WHEEL_BLOCKING_PROTECTION_TEST\x10\x85\x01\x12-\n(E134_SIDE_SWEEP_BLOCKING_PROTECTION_TEST\x10\x86\x01\x12)\n$E135_BLOWER_BLOCKING_PROTECTION_TEST\x10\x87\x01\x12\'\n\"E136_TURNTABLE_MOTOR_BLOCKING_TEST\x10\x88\x01\x12%\n E137_LIFTING_MOTOR_BLOCKING_TEST\x10\x89\x01\x12+\n&E138_FORWARD_COLLISION_PROTECTION_TEST\x10\x8a\x01\x12$\n\x1f\x45\x31\x33\x39_OFF_GROUND_PROTECTION_TEST\x10\x8b\x01\x12(\n#E140_GRAY_LAYER_BOX_PROTECTION_TEST\x10\x8c\x01\x12/\n*E141_T2310_HOST_WATER_TANK_PROTECTION_TEST\x10\x8d\x01\x12\x35\n0E142_RADAR_COVER_MICRO_SWITCH_JAMMING_PROTECTION\x10\x8e\x01\x12:\n5E143_T2320_BASE_STATION_WATER_TANK_IS_NOT_IN_POSITION\x10\x8f\x01\x12;\n6E144_T2320_BASE_STATION_SEWAGE_TANK_IS_NOT_IN_POSITION\x10\x90\x01\x12-\n(E145_T2320_BASE_STATION_SEWAGE_TANK_FULL\x10\x91\x01\x12\x31\n,E151_LEFT_WHEEL_OPEN_CIRCUIT_PROTECTION_TEST\x10\x97\x01\x12\x32\n-E152_RIGHT_WHEEL_OPEN_CIRCUIT_PROTECTION_TEST\x10\x98\x01*\xe7\x04\n\x0ePromptCodeList\x12\r\n\tP000_NONE\x10\x00\x12!\n\x1dP001_START_SCHEDULED_CLEANING\x10\x01\x12!\n\x1dP002_START_CRUISE_APPOINTMENT\x10\x02\x12\x38\n4P003_POWER_IS_LOW_RETURN_TO_BASE_STATION_IMMEDIATELY\x10\x03\x12:\n6P004_POSITIONING_FAILED_REBUILD_MAP_START_NEW_CLEANING\x10\x04\x12\x44\n@P005_POSITIONING_FAILED_MISSION_ENDED_START_BACK_TO_BASE_STATION\x10\x05\x12\x44\n@P006_SOME_AREAS_ARE_NOT_YET_CLEANED_BECAUSE_THEY_ARE_UNREACHABLE\x10\x06\x12<\n8P007_PATH_PLANNING_FAILED_CANT_REACH_THE_DESIGNATED_AREA\x10\x07\x12)\n%P008_UNABLE_TO_REACH_THE_TARGET_POINT\x10\x08\x12S\nOP009_BASE_STATION_EXPLORATION_FAILED_THE_MACHINE_RETURNED_TO_THE_STARTING_POINT\x10\t\x12@\n None: ... - class NewCode(_message.Message): - __slots__ = ["error", "warn"] - ERROR_FIELD_NUMBER: _ClassVar[int] - WARN_FIELD_NUMBER: _ClassVar[int] - error: _containers.RepeatedScalarFieldContainer[int] - warn: _containers.RepeatedScalarFieldContainer[int] - def __init__(self, error: _Optional[_Iterable[int]] = ..., warn: _Optional[_Iterable[int]] = ...) -> None: ... - class ObstacleReminder(_message.Message): - __slots__ = ["accuracy", "map_id", "photo_id", "point", "type"] - class Type(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - ACCURACY_FIELD_NUMBER: _ClassVar[int] - MAP_ID_FIELD_NUMBER: _ClassVar[int] - PHOTO_ID_FIELD_NUMBER: _ClassVar[int] - POINT_FIELD_NUMBER: _ClassVar[int] - POOP: ErrorCode.ObstacleReminder.Type - TYPE_FIELD_NUMBER: _ClassVar[int] - accuracy: int - map_id: int - photo_id: str - point: _common_pb2.Point - type: ErrorCode.ObstacleReminder.Type - def __init__(self, type: _Optional[_Union[ErrorCode.ObstacleReminder.Type, str]] = ..., photo_id: _Optional[str] = ..., accuracy: _Optional[int] = ..., map_id: _Optional[int] = ..., point: _Optional[_Union[_common_pb2.Point, _Mapping]] = ...) -> None: ... - BATTERY_FIELD_NUMBER: _ClassVar[int] - ERROR_FIELD_NUMBER: _ClassVar[int] - LAST_TIME_FIELD_NUMBER: _ClassVar[int] - NEW_CODE_FIELD_NUMBER: _ClassVar[int] - OBSTACLE_REMINDER_FIELD_NUMBER: _ClassVar[int] - SETTING_FIELD_NUMBER: _ClassVar[int] - WARN_FIELD_NUMBER: _ClassVar[int] - battery: ErrorCode.Battery - error: _containers.RepeatedScalarFieldContainer[int] - last_time: int - new_code: ErrorCode.NewCode - obstacle_reminder: _containers.RepeatedCompositeFieldContainer[ErrorCode.ObstacleReminder] - setting: ErrorSetting - warn: _containers.RepeatedScalarFieldContainer[int] - def __init__(self, last_time: _Optional[int] = ..., error: _Optional[_Iterable[int]] = ..., warn: _Optional[_Iterable[int]] = ..., setting: _Optional[_Union[ErrorSetting, _Mapping]] = ..., new_code: _Optional[_Union[ErrorCode.NewCode, _Mapping]] = ..., battery: _Optional[_Union[ErrorCode.Battery, _Mapping]] = ..., obstacle_reminder: _Optional[_Iterable[_Union[ErrorCode.ObstacleReminder, _Mapping]]] = ...) -> None: ... - -class ErrorSetting(_message.Message): - __slots__ = ["obstacle_reminder_mask", "warn_mask"] - OBSTACLE_REMINDER_MASK_FIELD_NUMBER: _ClassVar[int] - WARN_MASK_FIELD_NUMBER: _ClassVar[int] - obstacle_reminder_mask: _containers.RepeatedScalarFieldContainer[str] - warn_mask: _containers.RepeatedScalarFieldContainer[int] - def __init__(self, warn_mask: _Optional[_Iterable[int]] = ..., obstacle_reminder_mask: _Optional[_Iterable[str]] = ...) -> None: ... - -class PromptCode(_message.Message): - __slots__ = ["last_time", "value"] - LAST_TIME_FIELD_NUMBER: _ClassVar[int] - VALUE_FIELD_NUMBER: _ClassVar[int] - last_time: int - value: _containers.RepeatedScalarFieldContainer[int] - def __init__(self, last_time: _Optional[int] = ..., value: _Optional[_Iterable[int]] = ...) -> None: ... diff --git a/proto-reference/keepalive.proto b/proto-reference/keepalive.proto deleted file mode 100644 index caca7b4..0000000 --- a/proto-reference/keepalive.proto +++ /dev/null @@ -1,13 +0,0 @@ -syntax = "proto3"; - -// option optimize_for = LITE_RUNTIME; - -package proto.cloud; - -message KeepAliveRequest { - uint64 timestamp = 1; - - // 强制同步机器中数据 [EN: Force sync data from device] - // 手机 app 上多次尝试都拿不到数据才考虑使用该标志 [EN: Consider using this flag only after multiple failed attempts to get data from mobile app] - bool force_sync = 2; -} diff --git a/proto-reference/keepalive_pb2.py b/proto-reference/keepalive_pb2.py deleted file mode 100644 index a4f2033..0000000 --- a/proto-reference/keepalive_pb2.py +++ /dev/null @@ -1,25 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: proto/cloud/keepalive.proto -"""Generated protocol buffer code.""" -from google.protobuf.internal import builder as _builder -from google.protobuf import descriptor as _descriptor -from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import symbol_database as _symbol_database -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - - - -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1bproto/cloud/keepalive.proto\x12\x0bproto.cloud\"9\n\x10KeepAliveRequest\x12\x11\n\ttimestamp\x18\x01 \x01(\x04\x12\x12\n\nforce_sync\x18\x02 \x01(\x08\x62\x06proto3') - -_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'proto.cloud.keepalive_pb2', globals()) -if _descriptor._USE_C_DESCRIPTORS == False: - - DESCRIPTOR._options = None - _KEEPALIVEREQUEST._serialized_start=44 - _KEEPALIVEREQUEST._serialized_end=101 -# @@protoc_insertion_point(module_scope) diff --git a/proto-reference/keepalive_pb2.pyi b/proto-reference/keepalive_pb2.pyi deleted file mode 100644 index efdfda0..0000000 --- a/proto-reference/keepalive_pb2.pyi +++ /dev/null @@ -1,13 +0,0 @@ -from google.protobuf import descriptor as _descriptor -from google.protobuf import message as _message -from typing import ClassVar as _ClassVar, Optional as _Optional - -DESCRIPTOR: _descriptor.FileDescriptor - -class KeepAliveRequest(_message.Message): - __slots__ = ["force_sync", "timestamp"] - FORCE_SYNC_FIELD_NUMBER: _ClassVar[int] - TIMESTAMP_FIELD_NUMBER: _ClassVar[int] - force_sync: bool - timestamp: int - def __init__(self, timestamp: _Optional[int] = ..., force_sync: bool = ...) -> None: ... diff --git a/proto-reference/language.proto b/proto-reference/language.proto deleted file mode 100644 index 321395d..0000000 --- a/proto-reference/language.proto +++ /dev/null @@ -1,40 +0,0 @@ -syntax = "proto3"; - -// option optimize_for = LITE_RUNTIME; - -package proto.cloud; - -message LanguageRequest { - message Desc { - uint32 set_id = 1; - string url = 2; - string md5 = 3; - uint32 version = 4; - uint32 size = 5; - } - Desc desc = 1; - - message Selection { - enum Value { - DEFAULT = 0; - USER = 1; - } - Value value = 1; - } - Selection selection = 2; -} - -message LanguageResponse { - uint32 default_id = 1; - uint32 current_id = 2; - uint32 version = 3; - uint32 set_id = 4; - - enum State { - IDLE = 0; - UPDATING = 1; - SUCCESS = 2; - FAILURE = 3; - } - State state = 5; -} diff --git a/proto-reference/language_pb2.py b/proto-reference/language_pb2.py deleted file mode 100644 index 0f76965..0000000 --- a/proto-reference/language_pb2.py +++ /dev/null @@ -1,35 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: proto/cloud/language.proto -"""Generated protocol buffer code.""" -from google.protobuf.internal import builder as _builder -from google.protobuf import descriptor as _descriptor -from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import symbol_database as _symbol_database -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - - - -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1aproto/cloud/language.proto\x12\x0bproto.cloud\"\xb8\x02\n\x0fLanguageRequest\x12/\n\x04\x64\x65sc\x18\x01 \x01(\x0b\x32!.proto.cloud.LanguageRequest.Desc\x12\x39\n\tselection\x18\x02 \x01(\x0b\x32&.proto.cloud.LanguageRequest.Selection\x1aO\n\x04\x44\x65sc\x12\x0e\n\x06set_id\x18\x01 \x01(\r\x12\x0b\n\x03url\x18\x02 \x01(\t\x12\x0b\n\x03md5\x18\x03 \x01(\t\x12\x0f\n\x07version\x18\x04 \x01(\r\x12\x0c\n\x04size\x18\x05 \x01(\r\x1ah\n\tSelection\x12;\n\x05value\x18\x01 \x01(\x0e\x32,.proto.cloud.LanguageRequest.Selection.Value\"\x1e\n\x05Value\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10\x00\x12\x08\n\x04USER\x10\x01\"\xca\x01\n\x10LanguageResponse\x12\x12\n\ndefault_id\x18\x01 \x01(\r\x12\x12\n\ncurrent_id\x18\x02 \x01(\r\x12\x0f\n\x07version\x18\x03 \x01(\r\x12\x0e\n\x06set_id\x18\x04 \x01(\r\x12\x32\n\x05state\x18\x05 \x01(\x0e\x32#.proto.cloud.LanguageResponse.State\"9\n\x05State\x12\x08\n\x04IDLE\x10\x00\x12\x0c\n\x08UPDATING\x10\x01\x12\x0b\n\x07SUCCESS\x10\x02\x12\x0b\n\x07\x46\x41ILURE\x10\x03\x62\x06proto3') - -_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'proto.cloud.language_pb2', globals()) -if _descriptor._USE_C_DESCRIPTORS == False: - - DESCRIPTOR._options = None - _LANGUAGEREQUEST._serialized_start=44 - _LANGUAGEREQUEST._serialized_end=356 - _LANGUAGEREQUEST_DESC._serialized_start=171 - _LANGUAGEREQUEST_DESC._serialized_end=250 - _LANGUAGEREQUEST_SELECTION._serialized_start=252 - _LANGUAGEREQUEST_SELECTION._serialized_end=356 - _LANGUAGEREQUEST_SELECTION_VALUE._serialized_start=326 - _LANGUAGEREQUEST_SELECTION_VALUE._serialized_end=356 - _LANGUAGERESPONSE._serialized_start=359 - _LANGUAGERESPONSE._serialized_end=561 - _LANGUAGERESPONSE_STATE._serialized_start=504 - _LANGUAGERESPONSE_STATE._serialized_end=561 -# @@protoc_insertion_point(module_scope) diff --git a/proto-reference/language_pb2.pyi b/proto-reference/language_pb2.pyi deleted file mode 100644 index 429f49a..0000000 --- a/proto-reference/language_pb2.pyi +++ /dev/null @@ -1,56 +0,0 @@ -from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper -from google.protobuf import descriptor as _descriptor -from google.protobuf import message as _message -from typing import ClassVar as _ClassVar, Mapping as _Mapping, Optional as _Optional, Union as _Union - -DESCRIPTOR: _descriptor.FileDescriptor - -class LanguageRequest(_message.Message): - __slots__ = ["desc", "selection"] - class Desc(_message.Message): - __slots__ = ["md5", "set_id", "size", "url", "version"] - MD5_FIELD_NUMBER: _ClassVar[int] - SET_ID_FIELD_NUMBER: _ClassVar[int] - SIZE_FIELD_NUMBER: _ClassVar[int] - URL_FIELD_NUMBER: _ClassVar[int] - VERSION_FIELD_NUMBER: _ClassVar[int] - md5: str - set_id: int - size: int - url: str - version: int - def __init__(self, set_id: _Optional[int] = ..., url: _Optional[str] = ..., md5: _Optional[str] = ..., version: _Optional[int] = ..., size: _Optional[int] = ...) -> None: ... - class Selection(_message.Message): - __slots__ = ["value"] - class Value(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - DEFAULT: LanguageRequest.Selection.Value - USER: LanguageRequest.Selection.Value - VALUE_FIELD_NUMBER: _ClassVar[int] - value: LanguageRequest.Selection.Value - def __init__(self, value: _Optional[_Union[LanguageRequest.Selection.Value, str]] = ...) -> None: ... - DESC_FIELD_NUMBER: _ClassVar[int] - SELECTION_FIELD_NUMBER: _ClassVar[int] - desc: LanguageRequest.Desc - selection: LanguageRequest.Selection - def __init__(self, desc: _Optional[_Union[LanguageRequest.Desc, _Mapping]] = ..., selection: _Optional[_Union[LanguageRequest.Selection, _Mapping]] = ...) -> None: ... - -class LanguageResponse(_message.Message): - __slots__ = ["current_id", "default_id", "set_id", "state", "version"] - class State(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - CURRENT_ID_FIELD_NUMBER: _ClassVar[int] - DEFAULT_ID_FIELD_NUMBER: _ClassVar[int] - FAILURE: LanguageResponse.State - IDLE: LanguageResponse.State - SET_ID_FIELD_NUMBER: _ClassVar[int] - STATE_FIELD_NUMBER: _ClassVar[int] - SUCCESS: LanguageResponse.State - UPDATING: LanguageResponse.State - VERSION_FIELD_NUMBER: _ClassVar[int] - current_id: int - default_id: int - set_id: int - state: LanguageResponse.State - version: int - def __init__(self, default_id: _Optional[int] = ..., current_id: _Optional[int] = ..., version: _Optional[int] = ..., set_id: _Optional[int] = ..., state: _Optional[_Union[LanguageResponse.State, str]] = ...) -> None: ... diff --git a/proto-reference/map_edit.proto b/proto-reference/map_edit.proto deleted file mode 100644 index 61d098c..0000000 --- a/proto-reference/map_edit.proto +++ /dev/null @@ -1,136 +0,0 @@ -syntax = "proto3"; - -// option optimize_for = LITE_RUNTIME; - -package proto.cloud; - -import "proto/cloud/common.proto"; -import "proto/cloud/stream.proto"; -import "proto/cloud/clean_param.proto"; - -message MapEditRequest { - enum Method { - MERGE_ROOMS = 0; - DIVIDE_ROOM = 1; - RESET_ROOMS = 2; - RENAME_ROOM = 3; // 房间描述 [EN: Room description] - SET_RESTRICTED_ZONES = 4; // 设置限制区域:虚拟墙、禁区、禁拖区; [EN: Set restricted zones: virtual walls, no-go zones, no-mop zones;] - SET_ROOMS_CUSTOM = 5; // 房间定制(个性化清洁) [EN: Room customization (personalized cleaning)] - SET_CRUISE_POINTS = 6; // 设置全局巡航点 [EN: Set global cruise points] - ROTATION = 7; // 地图旋转 [EN: Map rotation] - IGNORE_OBSTACLE = 8; // 忽略/恢复障碍物 [EN: Ignore/restore obstacle] - } - - Method method = 1; - uint32 seq = 2; - uint32 map_id = 3; - - message MergeRooms { - repeated uint32 room_ids = 1; - } - - message DivideRoom { - uint32 room_id = 1; - repeated Point points = 2; // 分房是两个点还是可以大于2个点??? [EN: Is room division two points or can it be more than 2 points???] - } - - // 房间定制(个性化清洁) [EN: Room customization (personalized cleaning)] - message RoomsCustom { - message Enable { - bool value = 1; // false: 使用全局参数;true: 使用房间定制参数 [EN: false: use global parameters; true: use room custom parameters] - } - Enable custom_enable = 1; // x10 之后不再使用 [EN: No longer used after x10] - - // 设置房间顺序 [EN: Set room order] - message Order { - message Room { - uint32 id = 1; - uint32 order = 2; - } - repeated Room rooms = 1; - } - Order rooms_order = 2; - - // 设置房间定制参数 [EN: Set room custom parameters] - message Parm { - message Room { - uint32 id = 1; - - message Custom { - CleanType clean_type = 1; - Fan fan = 2; - MopMode mop_mode = 3; - CleanExtent clean_extent = 4; - uint32 clean_times = 5; // 清扫次数,非 0 有效 [EN: Cleaning times, non-zero is valid] - } - Custom custom = 2; - } - repeated Room rooms = 1; - } - Parm rooms_parm = 3; - - Switch smart_mode_sw = 4; // 智能省心模式开关 [EN: Smart hassle-free mode switch] - - enum Condition { - GENERAL = 0; // 通常设置房间定制参数 [EN: Normally set room custom parameters] - RESERVATION_IN_PROGRESS = 1; // 预约房间清扫过程中设置房间定制参数 [EN: Set room custom parameters during scheduled room cleaning] - } - Condition condition = 5; - } - - message RoomDesc { - uint32 id = 1; - string name = 2; - Floor floor = 3; - RoomScene scene = 4; - } - - message CruisePoints { - repeated Point points = 1; - } - - message Rotation { - uint32 angle = 1; // 顺时针的角度的度数,如 90,180 [EN: Clockwise angle in degrees, e.g. 90, 180] - } - - message IgnoreObstacle { - bool valid = 1; // false: 设置无效;true: 设置有效 [EN: false: setting invalid; true: setting valid] - string object_type = 2; - string photo_id = 3; // 照片 id(优先通过照片 id 进行匹配) [EN: Photo ID (priority matching by photo ID)] - Point point = 4; // 障碍物中心点(其次搜索点的周围区域) [EN: Obstacle center point (then search surrounding area of the point)] - } - - oneof Param { - MergeRooms merge_rooms = 6; - DivideRoom divide_room = 7; - stream.RestrictedZone restricted_zone = 8; - RoomDesc room_desc = 9; - RoomsCustom rooms_custom = 10; - CruisePoints cruise_points = 11; - Rotation rotation = 12; - IgnoreObstacle ignore_obstacle = 13; - } -} - -message MapEditResponse { - MapEditRequest.Method method = 1; - uint32 seq = 2; - - enum Result { - SUCCESS = 0; - STARTED = 1; - FAILED = 2; - } - Result result = 3; - - message FailCode{ - enum Value { - UNKNOWN = 0; // 其他错误,非以下错误码 [EN: Other errors, not the following error codes] - AREA_SMALL = 1; // 分割后房间面积太小 [EN: Room area too small after division] - ROOM_UNADJACENT = 2; // 房间不相邻不能合并 [EN: Rooms not adjacent cannot be merged] - TOO_MANY_ROOMS = 3; // 分割后房间数太多 [EN: Too many rooms after division] - } - Value value = 1; - } - FailCode fail_code = 4; -} diff --git a/proto-reference/map_edit_pb2.py b/proto-reference/map_edit_pb2.py deleted file mode 100644 index 5b8a365..0000000 --- a/proto-reference/map_edit_pb2.py +++ /dev/null @@ -1,67 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: proto/cloud/map_edit.proto -"""Generated protocol buffer code.""" -from google.protobuf import descriptor as _descriptor -from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import symbol_database as _symbol_database -from google.protobuf.internal import builder as _builder - -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - -from ...proto.cloud import \ - clean_param_pb2 as proto_dot_cloud_dot_clean__param__pb2 -from ...proto.cloud import common_pb2 as proto_dot_cloud_dot_common__pb2 -from ...proto.cloud import stream_pb2 as proto_dot_cloud_dot_stream__pb2 - -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1aproto/cloud/map_edit.proto\x12\x0bproto.cloud\x1a\x18proto/cloud/common.proto\x1a\x18proto/cloud/stream.proto\x1a\x1dproto/cloud/clean_param.proto\"\xa8\x10\n\x0eMapEditRequest\x12\x32\n\x06method\x18\x01 \x01(\x0e\x32\".proto.cloud.MapEditRequest.Method\x12\x0b\n\x03seq\x18\x02 \x01(\r\x12\x0e\n\x06map_id\x18\x03 \x01(\r\x12=\n\x0bmerge_rooms\x18\x06 \x01(\x0b\x32&.proto.cloud.MapEditRequest.MergeRoomsH\x00\x12=\n\x0b\x64ivide_room\x18\x07 \x01(\x0b\x32&.proto.cloud.MapEditRequest.DivideRoomH\x00\x12=\n\x0frestricted_zone\x18\x08 \x01(\x0b\x32\".proto.cloud.stream.RestrictedZoneH\x00\x12\x39\n\troom_desc\x18\t \x01(\x0b\x32$.proto.cloud.MapEditRequest.RoomDescH\x00\x12?\n\x0crooms_custom\x18\n \x01(\x0b\x32\'.proto.cloud.MapEditRequest.RoomsCustomH\x00\x12\x41\n\rcruise_points\x18\x0b \x01(\x0b\x32(.proto.cloud.MapEditRequest.CruisePointsH\x00\x12\x38\n\x08rotation\x18\x0c \x01(\x0b\x32$.proto.cloud.MapEditRequest.RotationH\x00\x12\x45\n\x0fignore_obstacle\x18\r \x01(\x0b\x32*.proto.cloud.MapEditRequest.IgnoreObstacleH\x00\x1a\x1e\n\nMergeRooms\x12\x10\n\x08room_ids\x18\x01 \x03(\r\x1a\x41\n\nDivideRoom\x12\x0f\n\x07room_id\x18\x01 \x01(\r\x12\"\n\x06points\x18\x02 \x03(\x0b\x32\x12.proto.cloud.Point\x1a\xf8\x06\n\x0bRoomsCustom\x12\x45\n\rcustom_enable\x18\x01 \x01(\x0b\x32..proto.cloud.MapEditRequest.RoomsCustom.Enable\x12\x42\n\x0brooms_order\x18\x02 \x01(\x0b\x32-.proto.cloud.MapEditRequest.RoomsCustom.Order\x12@\n\nrooms_parm\x18\x03 \x01(\x0b\x32,.proto.cloud.MapEditRequest.RoomsCustom.Parm\x12*\n\rsmart_mode_sw\x18\x04 \x01(\x0b\x32\x13.proto.cloud.Switch\x12\x44\n\tcondition\x18\x05 \x01(\x0e\x32\x31.proto.cloud.MapEditRequest.RoomsCustom.Condition\x1a\x17\n\x06\x45nable\x12\r\n\x05value\x18\x01 \x01(\x08\x1am\n\x05Order\x12\x41\n\x05rooms\x18\x01 \x03(\x0b\x32\x32.proto.cloud.MapEditRequest.RoomsCustom.Order.Room\x1a!\n\x04Room\x12\n\n\x02id\x18\x01 \x01(\r\x12\r\n\x05order\x18\x02 \x01(\r\x1a\xea\x02\n\x04Parm\x12@\n\x05rooms\x18\x01 \x03(\x0b\x32\x31.proto.cloud.MapEditRequest.RoomsCustom.Parm.Room\x1a\x9f\x02\n\x04Room\x12\n\n\x02id\x18\x01 \x01(\r\x12H\n\x06\x63ustom\x18\x02 \x01(\x0b\x32\x38.proto.cloud.MapEditRequest.RoomsCustom.Parm.Room.Custom\x1a\xc0\x01\n\x06\x43ustom\x12*\n\nclean_type\x18\x01 \x01(\x0b\x32\x16.proto.cloud.CleanType\x12\x1d\n\x03\x66\x61n\x18\x02 \x01(\x0b\x32\x10.proto.cloud.Fan\x12&\n\x08mop_mode\x18\x03 \x01(\x0b\x32\x14.proto.cloud.MopMode\x12.\n\x0c\x63lean_extent\x18\x04 \x01(\x0b\x32\x18.proto.cloud.CleanExtent\x12\x13\n\x0b\x63lean_times\x18\x05 \x01(\r\"5\n\tCondition\x12\x0b\n\x07GENERAL\x10\x00\x12\x1b\n\x17RESERVATION_IN_PROGRESS\x10\x01\x1an\n\x08RoomDesc\x12\n\n\x02id\x18\x01 \x01(\r\x12\x0c\n\x04name\x18\x02 \x01(\t\x12!\n\x05\x66loor\x18\x03 \x01(\x0b\x32\x12.proto.cloud.Floor\x12%\n\x05scene\x18\x04 \x01(\x0b\x32\x16.proto.cloud.RoomScene\x1a\x32\n\x0c\x43ruisePoints\x12\"\n\x06points\x18\x01 \x03(\x0b\x32\x12.proto.cloud.Point\x1a\x19\n\x08Rotation\x12\r\n\x05\x61ngle\x18\x01 \x01(\r\x1ai\n\x0eIgnoreObstacle\x12\r\n\x05valid\x18\x01 \x01(\x08\x12\x13\n\x0bobject_type\x18\x02 \x01(\t\x12\x10\n\x08photo_id\x18\x03 \x01(\t\x12!\n\x05point\x18\x04 \x01(\x0b\x32\x12.proto.cloud.Point\"\xb6\x01\n\x06Method\x12\x0f\n\x0bMERGE_ROOMS\x10\x00\x12\x0f\n\x0b\x44IVIDE_ROOM\x10\x01\x12\x0f\n\x0bRESET_ROOMS\x10\x02\x12\x0f\n\x0bRENAME_ROOM\x10\x03\x12\x18\n\x14SET_RESTRICTED_ZONES\x10\x04\x12\x14\n\x10SET_ROOMS_CUSTOM\x10\x05\x12\x15\n\x11SET_CRUISE_POINTS\x10\x06\x12\x0c\n\x08ROTATION\x10\x07\x12\x13\n\x0fIGNORE_OBSTACLE\x10\x08\x42\x07\n\x05Param\"\x89\x03\n\x0fMapEditResponse\x12\x32\n\x06method\x18\x01 \x01(\x0e\x32\".proto.cloud.MapEditRequest.Method\x12\x0b\n\x03seq\x18\x02 \x01(\r\x12\x33\n\x06result\x18\x03 \x01(\x0e\x32#.proto.cloud.MapEditResponse.Result\x12\x38\n\tfail_code\x18\x04 \x01(\x0b\x32%.proto.cloud.MapEditResponse.FailCode\x1a\x95\x01\n\x08\x46\x61ilCode\x12:\n\x05value\x18\x01 \x01(\x0e\x32+.proto.cloud.MapEditResponse.FailCode.Value\"M\n\x05Value\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x0e\n\nAREA_SMALL\x10\x01\x12\x13\n\x0fROOM_UNADJACENT\x10\x02\x12\x12\n\x0eTOO_MANY_ROOMS\x10\x03\".\n\x06Result\x12\x0b\n\x07SUCCESS\x10\x00\x12\x0b\n\x07STARTED\x10\x01\x12\n\n\x06\x46\x41ILED\x10\x02\x62\x06proto3') - -_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'proto.cloud.map_edit_pb2', globals()) -if _descriptor._USE_C_DESCRIPTORS == False: - - DESCRIPTOR._options = None - _MAPEDITREQUEST._serialized_start=127 - _MAPEDITREQUEST._serialized_end=2215 - _MAPEDITREQUEST_MERGEROOMS._serialized_start=735 - _MAPEDITREQUEST_MERGEROOMS._serialized_end=765 - _MAPEDITREQUEST_DIVIDEROOM._serialized_start=767 - _MAPEDITREQUEST_DIVIDEROOM._serialized_end=832 - _MAPEDITREQUEST_ROOMSCUSTOM._serialized_start=835 - _MAPEDITREQUEST_ROOMSCUSTOM._serialized_end=1723 - _MAPEDITREQUEST_ROOMSCUSTOM_ENABLE._serialized_start=1169 - _MAPEDITREQUEST_ROOMSCUSTOM_ENABLE._serialized_end=1192 - _MAPEDITREQUEST_ROOMSCUSTOM_ORDER._serialized_start=1194 - _MAPEDITREQUEST_ROOMSCUSTOM_ORDER._serialized_end=1303 - _MAPEDITREQUEST_ROOMSCUSTOM_ORDER_ROOM._serialized_start=1270 - _MAPEDITREQUEST_ROOMSCUSTOM_ORDER_ROOM._serialized_end=1303 - _MAPEDITREQUEST_ROOMSCUSTOM_PARM._serialized_start=1306 - _MAPEDITREQUEST_ROOMSCUSTOM_PARM._serialized_end=1668 - _MAPEDITREQUEST_ROOMSCUSTOM_PARM_ROOM._serialized_start=1381 - _MAPEDITREQUEST_ROOMSCUSTOM_PARM_ROOM._serialized_end=1668 - _MAPEDITREQUEST_ROOMSCUSTOM_PARM_ROOM_CUSTOM._serialized_start=1476 - _MAPEDITREQUEST_ROOMSCUSTOM_PARM_ROOM_CUSTOM._serialized_end=1668 - _MAPEDITREQUEST_ROOMSCUSTOM_CONDITION._serialized_start=1670 - _MAPEDITREQUEST_ROOMSCUSTOM_CONDITION._serialized_end=1723 - _MAPEDITREQUEST_ROOMDESC._serialized_start=1725 - _MAPEDITREQUEST_ROOMDESC._serialized_end=1835 - _MAPEDITREQUEST_CRUISEPOINTS._serialized_start=1837 - _MAPEDITREQUEST_CRUISEPOINTS._serialized_end=1887 - _MAPEDITREQUEST_ROTATION._serialized_start=1889 - _MAPEDITREQUEST_ROTATION._serialized_end=1914 - _MAPEDITREQUEST_IGNOREOBSTACLE._serialized_start=1916 - _MAPEDITREQUEST_IGNOREOBSTACLE._serialized_end=2021 - _MAPEDITREQUEST_METHOD._serialized_start=2024 - _MAPEDITREQUEST_METHOD._serialized_end=2206 - _MAPEDITRESPONSE._serialized_start=2218 - _MAPEDITRESPONSE._serialized_end=2611 - _MAPEDITRESPONSE_FAILCODE._serialized_start=2414 - _MAPEDITRESPONSE_FAILCODE._serialized_end=2563 - _MAPEDITRESPONSE_FAILCODE_VALUE._serialized_start=2486 - _MAPEDITRESPONSE_FAILCODE_VALUE._serialized_end=2563 - _MAPEDITRESPONSE_RESULT._serialized_start=2565 - _MAPEDITRESPONSE_RESULT._serialized_end=2611 -# @@protoc_insertion_point(module_scope) diff --git a/proto-reference/map_edit_pb2.pyi b/proto-reference/map_edit_pb2.pyi deleted file mode 100644 index fc58f99..0000000 --- a/proto-reference/map_edit_pb2.pyi +++ /dev/null @@ -1,184 +0,0 @@ -from typing import ClassVar as _ClassVar -from typing import Iterable as _Iterable -from typing import Mapping as _Mapping -from typing import Optional as _Optional -from typing import Union as _Union - -from google.protobuf import descriptor as _descriptor -from google.protobuf import message as _message -from google.protobuf.internal import containers as _containers -from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper - -from ...proto.cloud import clean_param_pb2 as _clean_param_pb2 -from ...proto.cloud import common_pb2 as _common_pb2 -from ...proto.cloud import stream_pb2 as _stream_pb2 - -DESCRIPTOR: _descriptor.FileDescriptor - -class MapEditRequest(_message.Message): - __slots__ = ["cruise_points", "divide_room", "ignore_obstacle", "map_id", "merge_rooms", "method", "restricted_zone", "room_desc", "rooms_custom", "rotation", "seq"] - class Method(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - class CruisePoints(_message.Message): - __slots__ = ["points"] - POINTS_FIELD_NUMBER: _ClassVar[int] - points: _containers.RepeatedCompositeFieldContainer[_common_pb2.Point] - def __init__(self, points: _Optional[_Iterable[_Union[_common_pb2.Point, _Mapping]]] = ...) -> None: ... - class DivideRoom(_message.Message): - __slots__ = ["points", "room_id"] - POINTS_FIELD_NUMBER: _ClassVar[int] - ROOM_ID_FIELD_NUMBER: _ClassVar[int] - points: _containers.RepeatedCompositeFieldContainer[_common_pb2.Point] - room_id: int - def __init__(self, room_id: _Optional[int] = ..., points: _Optional[_Iterable[_Union[_common_pb2.Point, _Mapping]]] = ...) -> None: ... - class IgnoreObstacle(_message.Message): - __slots__ = ["object_type", "photo_id", "point", "valid"] - OBJECT_TYPE_FIELD_NUMBER: _ClassVar[int] - PHOTO_ID_FIELD_NUMBER: _ClassVar[int] - POINT_FIELD_NUMBER: _ClassVar[int] - VALID_FIELD_NUMBER: _ClassVar[int] - object_type: str - photo_id: str - point: _common_pb2.Point - valid: bool - def __init__(self, valid: bool = ..., object_type: _Optional[str] = ..., photo_id: _Optional[str] = ..., point: _Optional[_Union[_common_pb2.Point, _Mapping]] = ...) -> None: ... - class MergeRooms(_message.Message): - __slots__ = ["room_ids"] - ROOM_IDS_FIELD_NUMBER: _ClassVar[int] - room_ids: _containers.RepeatedScalarFieldContainer[int] - def __init__(self, room_ids: _Optional[_Iterable[int]] = ...) -> None: ... - class RoomDesc(_message.Message): - __slots__ = ["floor", "id", "name", "scene"] - FLOOR_FIELD_NUMBER: _ClassVar[int] - ID_FIELD_NUMBER: _ClassVar[int] - NAME_FIELD_NUMBER: _ClassVar[int] - SCENE_FIELD_NUMBER: _ClassVar[int] - floor: _common_pb2.Floor - id: int - name: str - scene: _common_pb2.RoomScene - def __init__(self, id: _Optional[int] = ..., name: _Optional[str] = ..., floor: _Optional[_Union[_common_pb2.Floor, _Mapping]] = ..., scene: _Optional[_Union[_common_pb2.RoomScene, _Mapping]] = ...) -> None: ... - class RoomsCustom(_message.Message): - __slots__ = ["condition", "custom_enable", "rooms_order", "rooms_parm", "smart_mode_sw"] - class Condition(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - class Enable(_message.Message): - __slots__ = ["value"] - VALUE_FIELD_NUMBER: _ClassVar[int] - value: bool - def __init__(self, value: bool = ...) -> None: ... - class Order(_message.Message): - __slots__ = ["rooms"] - class Room(_message.Message): - __slots__ = ["id", "order"] - ID_FIELD_NUMBER: _ClassVar[int] - ORDER_FIELD_NUMBER: _ClassVar[int] - id: int - order: int - def __init__(self, id: _Optional[int] = ..., order: _Optional[int] = ...) -> None: ... - ROOMS_FIELD_NUMBER: _ClassVar[int] - rooms: _containers.RepeatedCompositeFieldContainer[MapEditRequest.RoomsCustom.Order.Room] - def __init__(self, rooms: _Optional[_Iterable[_Union[MapEditRequest.RoomsCustom.Order.Room, _Mapping]]] = ...) -> None: ... - class Parm(_message.Message): - __slots__ = ["rooms"] - class Room(_message.Message): - __slots__ = ["custom", "id"] - class Custom(_message.Message): - __slots__ = ["clean_extent", "clean_times", "clean_type", "fan", "mop_mode"] - CLEAN_EXTENT_FIELD_NUMBER: _ClassVar[int] - CLEAN_TIMES_FIELD_NUMBER: _ClassVar[int] - CLEAN_TYPE_FIELD_NUMBER: _ClassVar[int] - FAN_FIELD_NUMBER: _ClassVar[int] - MOP_MODE_FIELD_NUMBER: _ClassVar[int] - clean_extent: _clean_param_pb2.CleanExtent - clean_times: int - clean_type: _clean_param_pb2.CleanType - fan: _clean_param_pb2.Fan - mop_mode: _clean_param_pb2.MopMode - def __init__(self, clean_type: _Optional[_Union[_clean_param_pb2.CleanType, _Mapping]] = ..., fan: _Optional[_Union[_clean_param_pb2.Fan, _Mapping]] = ..., mop_mode: _Optional[_Union[_clean_param_pb2.MopMode, _Mapping]] = ..., clean_extent: _Optional[_Union[_clean_param_pb2.CleanExtent, _Mapping]] = ..., clean_times: _Optional[int] = ...) -> None: ... - CUSTOM_FIELD_NUMBER: _ClassVar[int] - ID_FIELD_NUMBER: _ClassVar[int] - custom: MapEditRequest.RoomsCustom.Parm.Room.Custom - id: int - def __init__(self, id: _Optional[int] = ..., custom: _Optional[_Union[MapEditRequest.RoomsCustom.Parm.Room.Custom, _Mapping]] = ...) -> None: ... - ROOMS_FIELD_NUMBER: _ClassVar[int] - rooms: _containers.RepeatedCompositeFieldContainer[MapEditRequest.RoomsCustom.Parm.Room] - def __init__(self, rooms: _Optional[_Iterable[_Union[MapEditRequest.RoomsCustom.Parm.Room, _Mapping]]] = ...) -> None: ... - CONDITION_FIELD_NUMBER: _ClassVar[int] - CUSTOM_ENABLE_FIELD_NUMBER: _ClassVar[int] - GENERAL: MapEditRequest.RoomsCustom.Condition - RESERVATION_IN_PROGRESS: MapEditRequest.RoomsCustom.Condition - ROOMS_ORDER_FIELD_NUMBER: _ClassVar[int] - ROOMS_PARM_FIELD_NUMBER: _ClassVar[int] - SMART_MODE_SW_FIELD_NUMBER: _ClassVar[int] - condition: MapEditRequest.RoomsCustom.Condition - custom_enable: MapEditRequest.RoomsCustom.Enable - rooms_order: MapEditRequest.RoomsCustom.Order - rooms_parm: MapEditRequest.RoomsCustom.Parm - smart_mode_sw: _common_pb2.Switch - def __init__(self, custom_enable: _Optional[_Union[MapEditRequest.RoomsCustom.Enable, _Mapping]] = ..., rooms_order: _Optional[_Union[MapEditRequest.RoomsCustom.Order, _Mapping]] = ..., rooms_parm: _Optional[_Union[MapEditRequest.RoomsCustom.Parm, _Mapping]] = ..., smart_mode_sw: _Optional[_Union[_common_pb2.Switch, _Mapping]] = ..., condition: _Optional[_Union[MapEditRequest.RoomsCustom.Condition, str]] = ...) -> None: ... - class Rotation(_message.Message): - __slots__ = ["angle"] - ANGLE_FIELD_NUMBER: _ClassVar[int] - angle: int - def __init__(self, angle: _Optional[int] = ...) -> None: ... - CRUISE_POINTS_FIELD_NUMBER: _ClassVar[int] - DIVIDE_ROOM: MapEditRequest.Method - DIVIDE_ROOM_FIELD_NUMBER: _ClassVar[int] - IGNORE_OBSTACLE: MapEditRequest.Method - IGNORE_OBSTACLE_FIELD_NUMBER: _ClassVar[int] - MAP_ID_FIELD_NUMBER: _ClassVar[int] - MERGE_ROOMS: MapEditRequest.Method - MERGE_ROOMS_FIELD_NUMBER: _ClassVar[int] - METHOD_FIELD_NUMBER: _ClassVar[int] - RENAME_ROOM: MapEditRequest.Method - RESET_ROOMS: MapEditRequest.Method - RESTRICTED_ZONE_FIELD_NUMBER: _ClassVar[int] - ROOMS_CUSTOM_FIELD_NUMBER: _ClassVar[int] - ROOM_DESC_FIELD_NUMBER: _ClassVar[int] - ROTATION: MapEditRequest.Method - ROTATION_FIELD_NUMBER: _ClassVar[int] - SEQ_FIELD_NUMBER: _ClassVar[int] - SET_CRUISE_POINTS: MapEditRequest.Method - SET_RESTRICTED_ZONES: MapEditRequest.Method - SET_ROOMS_CUSTOM: MapEditRequest.Method - cruise_points: MapEditRequest.CruisePoints - divide_room: MapEditRequest.DivideRoom - ignore_obstacle: MapEditRequest.IgnoreObstacle - map_id: int - merge_rooms: MapEditRequest.MergeRooms - method: MapEditRequest.Method - restricted_zone: _stream_pb2.RestrictedZone - room_desc: MapEditRequest.RoomDesc - rooms_custom: MapEditRequest.RoomsCustom - rotation: MapEditRequest.Rotation - seq: int - def __init__(self, method: _Optional[_Union[MapEditRequest.Method, str]] = ..., seq: _Optional[int] = ..., map_id: _Optional[int] = ..., merge_rooms: _Optional[_Union[MapEditRequest.MergeRooms, _Mapping]] = ..., divide_room: _Optional[_Union[MapEditRequest.DivideRoom, _Mapping]] = ..., restricted_zone: _Optional[_Union[_stream_pb2.RestrictedZone, _Mapping]] = ..., room_desc: _Optional[_Union[MapEditRequest.RoomDesc, _Mapping]] = ..., rooms_custom: _Optional[_Union[MapEditRequest.RoomsCustom, _Mapping]] = ..., cruise_points: _Optional[_Union[MapEditRequest.CruisePoints, _Mapping]] = ..., rotation: _Optional[_Union[MapEditRequest.Rotation, _Mapping]] = ..., ignore_obstacle: _Optional[_Union[MapEditRequest.IgnoreObstacle, _Mapping]] = ...) -> None: ... - -class MapEditResponse(_message.Message): - __slots__ = ["fail_code", "method", "result", "seq"] - class Result(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - class FailCode(_message.Message): - __slots__ = ["value"] - class Value(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - AREA_SMALL: MapEditResponse.FailCode.Value - ROOM_UNADJACENT: MapEditResponse.FailCode.Value - TOO_MANY_ROOMS: MapEditResponse.FailCode.Value - UNKNOWN: MapEditResponse.FailCode.Value - VALUE_FIELD_NUMBER: _ClassVar[int] - value: MapEditResponse.FailCode.Value - def __init__(self, value: _Optional[_Union[MapEditResponse.FailCode.Value, str]] = ...) -> None: ... - FAILED: MapEditResponse.Result - FAIL_CODE_FIELD_NUMBER: _ClassVar[int] - METHOD_FIELD_NUMBER: _ClassVar[int] - RESULT_FIELD_NUMBER: _ClassVar[int] - SEQ_FIELD_NUMBER: _ClassVar[int] - STARTED: MapEditResponse.Result - SUCCESS: MapEditResponse.Result - fail_code: MapEditResponse.FailCode - method: MapEditRequest.Method - result: MapEditResponse.Result - seq: int - def __init__(self, method: _Optional[_Union[MapEditRequest.Method, str]] = ..., seq: _Optional[int] = ..., result: _Optional[_Union[MapEditResponse.Result, str]] = ..., fail_code: _Optional[_Union[MapEditResponse.FailCode, _Mapping]] = ...) -> None: ... diff --git a/proto-reference/map_manage.proto b/proto-reference/map_manage.proto deleted file mode 100644 index a1dbd29..0000000 --- a/proto-reference/map_manage.proto +++ /dev/null @@ -1,50 +0,0 @@ -/** - * 地图管理相关协议,存储在云端的地图文件信息. [EN: Map management protocol, map file information stored in cloud.] - * - * 此协议与云端存储方式相关,目前以涂鸦为例: [EN: This protocol is related to cloud storage method, currently using Tuya as example:] - * 涂鸦地图可以存储多张,每张地图有两个通道,分别是显示地图通道和特征地图通道, [EN: Tuya maps can store multiple maps, each map has two channels: display map channel and feature map channel,] - * 由于特征地图目前已经不需要,故将地图通道数据拆开分两部分:MapEntity 和 MapExtras. [EN: Since feature maps are no longer needed, map channel data is split into two parts: MapEntity and MapExtras.] - */ -syntax = "proto3"; - -// option optimize_for = LITE_RUNTIME; - -package proto.cloud; - -import "proto/cloud/common.proto"; -import "proto/cloud/stream.proto"; - -/** - * 地图实体数据,包括 [EN: Map entity data, including] - - 地图描述; [EN: - Map description;] - - 地图像素; [EN: - Map pixels;] - */ -message MapEntity { - message Desc { - uint32 map_id = 1; - - uint32 width = 2; - uint32 height = 3; - uint32 resolution = 4; - - Point origin = 5; // 原点 [EN: Origin] - repeated Pose docks = 6; - } - Desc desc = 1; - - bytes pixel = 2; -} - -/** - * 地图附加信息,包括 [EN: Map additional information, including] - * - 地图名称; [EN: - Map name;] - * - 房间轮廓; [EN: - Room outlines;] - * - 房间参数; [EN: - Room parameters;] - * - 禁区; [EN: - Restricted zones;] - */ -message MapExtras { - string name = 1; - repeated stream.RoomOutline room_outline = 2; - repeated stream.RoomParams room_params = 3; - stream.RestrictedZone restricted_zone = 4; -} diff --git a/proto-reference/map_manage_pb2.py b/proto-reference/map_manage_pb2.py deleted file mode 100644 index e4df161..0000000 --- a/proto-reference/map_manage_pb2.py +++ /dev/null @@ -1,31 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: proto/cloud/map_manage.proto -"""Generated protocol buffer code.""" -from google.protobuf import descriptor as _descriptor -from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import symbol_database as _symbol_database -from google.protobuf.internal import builder as _builder - -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - -from ...proto.cloud import common_pb2 as proto_dot_cloud_dot_common__pb2 -from ...proto.cloud import stream_pb2 as proto_dot_cloud_dot_stream__pb2 - -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1cproto/cloud/map_manage.proto\x12\x0bproto.cloud\x1a\x18proto/cloud/common.proto\x1a\x18proto/cloud/stream.proto\"\xd7\x01\n\tMapEntity\x12)\n\x04\x64\x65sc\x18\x01 \x01(\x0b\x32\x1b.proto.cloud.MapEntity.Desc\x12\r\n\x05pixel\x18\x02 \x01(\x0c\x1a\x8f\x01\n\x04\x44\x65sc\x12\x0e\n\x06map_id\x18\x01 \x01(\r\x12\r\n\x05width\x18\x02 \x01(\r\x12\x0e\n\x06height\x18\x03 \x01(\r\x12\x12\n\nresolution\x18\x04 \x01(\r\x12\"\n\x06origin\x18\x05 \x01(\x0b\x32\x12.proto.cloud.Point\x12 \n\x05\x64ocks\x18\x06 \x03(\x0b\x32\x11.proto.cloud.Pose\"\xc2\x01\n\tMapExtras\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x35\n\x0croom_outline\x18\x02 \x03(\x0b\x32\x1f.proto.cloud.stream.RoomOutline\x12\x33\n\x0broom_params\x18\x03 \x03(\x0b\x32\x1e.proto.cloud.stream.RoomParams\x12;\n\x0frestricted_zone\x18\x04 \x01(\x0b\x32\".proto.cloud.stream.RestrictedZoneb\x06proto3') - -_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'proto.cloud.map_manage_pb2', globals()) -if _descriptor._USE_C_DESCRIPTORS == False: - - DESCRIPTOR._options = None - _MAPENTITY._serialized_start=98 - _MAPENTITY._serialized_end=313 - _MAPENTITY_DESC._serialized_start=170 - _MAPENTITY_DESC._serialized_end=313 - _MAPEXTRAS._serialized_start=316 - _MAPEXTRAS._serialized_end=510 -# @@protoc_insertion_point(module_scope) diff --git a/proto-reference/map_manage_pb2.pyi b/proto-reference/map_manage_pb2.pyi deleted file mode 100644 index 8b2ddcc..0000000 --- a/proto-reference/map_manage_pb2.pyi +++ /dev/null @@ -1,49 +0,0 @@ -from typing import ClassVar as _ClassVar -from typing import Iterable as _Iterable -from typing import Mapping as _Mapping -from typing import Optional as _Optional -from typing import Union as _Union - -from google.protobuf import descriptor as _descriptor -from google.protobuf import message as _message -from google.protobuf.internal import containers as _containers - -from ...proto.cloud import common_pb2 as _common_pb2 -from ...proto.cloud import stream_pb2 as _stream_pb2 - -DESCRIPTOR: _descriptor.FileDescriptor - -class MapEntity(_message.Message): - __slots__ = ["desc", "pixel"] - class Desc(_message.Message): - __slots__ = ["docks", "height", "map_id", "origin", "resolution", "width"] - DOCKS_FIELD_NUMBER: _ClassVar[int] - HEIGHT_FIELD_NUMBER: _ClassVar[int] - MAP_ID_FIELD_NUMBER: _ClassVar[int] - ORIGIN_FIELD_NUMBER: _ClassVar[int] - RESOLUTION_FIELD_NUMBER: _ClassVar[int] - WIDTH_FIELD_NUMBER: _ClassVar[int] - docks: _containers.RepeatedCompositeFieldContainer[_common_pb2.Pose] - height: int - map_id: int - origin: _common_pb2.Point - resolution: int - width: int - def __init__(self, map_id: _Optional[int] = ..., width: _Optional[int] = ..., height: _Optional[int] = ..., resolution: _Optional[int] = ..., origin: _Optional[_Union[_common_pb2.Point, _Mapping]] = ..., docks: _Optional[_Iterable[_Union[_common_pb2.Pose, _Mapping]]] = ...) -> None: ... - DESC_FIELD_NUMBER: _ClassVar[int] - PIXEL_FIELD_NUMBER: _ClassVar[int] - desc: MapEntity.Desc - pixel: bytes - def __init__(self, desc: _Optional[_Union[MapEntity.Desc, _Mapping]] = ..., pixel: _Optional[bytes] = ...) -> None: ... - -class MapExtras(_message.Message): - __slots__ = ["name", "restricted_zone", "room_outline", "room_params"] - NAME_FIELD_NUMBER: _ClassVar[int] - RESTRICTED_ZONE_FIELD_NUMBER: _ClassVar[int] - ROOM_OUTLINE_FIELD_NUMBER: _ClassVar[int] - ROOM_PARAMS_FIELD_NUMBER: _ClassVar[int] - name: str - restricted_zone: _stream_pb2.RestrictedZone - room_outline: _containers.RepeatedCompositeFieldContainer[_stream_pb2.RoomOutline] - room_params: _containers.RepeatedCompositeFieldContainer[_stream_pb2.RoomParams] - def __init__(self, name: _Optional[str] = ..., room_outline: _Optional[_Iterable[_Union[_stream_pb2.RoomOutline, _Mapping]]] = ..., room_params: _Optional[_Iterable[_Union[_stream_pb2.RoomParams, _Mapping]]] = ..., restricted_zone: _Optional[_Union[_stream_pb2.RestrictedZone, _Mapping]] = ...) -> None: ... diff --git a/proto-reference/media_manager.proto b/proto-reference/media_manager.proto deleted file mode 100644 index e6b9591..0000000 --- a/proto-reference/media_manager.proto +++ /dev/null @@ -1,116 +0,0 @@ -/** - * media控制协议; [EN: Media control protocol;] - */ -syntax = "proto3"; - -// option optimize_for = LITE_RUNTIME; - -package proto.cloud; - -message MediaSetting { - enum Resolution { - R_480P = 0; - R_720P = 1; - R_1080P = 2; - } - - // 实时视频流参数 [EN: Real-time video stream parameters] - message RTStream { - Resolution resolution = 1; - } - RTStream rt_stream = 1; - - // 录像参数 [EN: Recording parameters] - message Record { - Resolution resolution = 1; - uint32 bitrate = 2; - } - Record record = 2; - - // 拍照参数 [EN: Photo capture parameters] - message Capture { - uint32 width = 1; - uint32 height = 2; - } - Capture capture = 3; -} - -message MediaStatus { - enum State { - IDLE = 0; // 空闲 [EN: Idle] - RECORDING = 1; // 录像中 [EN: Recording] - } - State state = 1; - - enum Storage { - NORMAL = 0; - THRESHOLD = 1; // 达到阈值 [EN: Reached threshold] - FULL = 2; // 存储空间满 [EN: Storage full] - } - Storage storage = 2; - - uint32 total_space = 3; // 总空间大小(单位 kb,下同) [EN: Total space size (unit: kb, same below)] - uint32 photo_space = 4; // 照片占用空间大小 [EN: Photo space usage] - uint32 video_space = 5; // 视频占用空间大小 [EN: Video space usage] - bool bind_state = 6; // 是否已绑定云 [EN: Whether bound to cloud] -} - -message MediaManagerRequest { - // 媒体控制 [EN: Media control] - message Control { - enum Method { - RECORD_START = 0; // 开始录像 [EN: Start recording] - RECORD_STOP = 1; // 停止录像 [EN: Stop recording] - CAPTURE = 2; // 执行拍照 [EN: Take photo] - } - Method method = 1; - uint32 seq = 2; // 序号 [EN: Sequence number] - } - Control control = 1; - - MediaSetting setting = 2; - - message BindMediaSvc { - uint32 seq = 1; - uint32 c = 2; - uint32 d = 3; - string g = 4; - uint32 j = 5; - string user_account = 6; - } - BindMediaSvc bind_media_svc_data = 3; -} - -message MediaManagerResponse { - // 媒体控制结果 [EN: Media control result] - message Control { - MediaManagerRequest.Control.Method method = 1; - uint32 seq = 2; // 返回与Request相同的seq [EN: Returns same seq as Request] - - enum Result { - SUCCESS = 0; - FAIL = 1; - } - Result result = 3; - - message FileInfo { - string filepath = 1; - string id = 2; - } - FileInfo file_info = 4; - } - Control control = 1; - - MediaSetting setting = 2; - MediaStatus status = 3; - - message BindMediaSvc { - uint32 seq = 1; - enum Result { - SUCCESS = 0; - FAIL = 1; - } - Result result = 2; - } - BindMediaSvc bind_media_svc = 4; -} diff --git a/proto-reference/media_manager_pb2.py b/proto-reference/media_manager_pb2.py deleted file mode 100644 index 9951edf..0000000 --- a/proto-reference/media_manager_pb2.py +++ /dev/null @@ -1,59 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: proto/cloud/media_manager.proto -"""Generated protocol buffer code.""" -from google.protobuf.internal import builder as _builder -from google.protobuf import descriptor as _descriptor -from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import symbol_database as _symbol_database -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - - - -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1fproto/cloud/media_manager.proto\x12\x0bproto.cloud\"\xa3\x03\n\x0cMediaSetting\x12\x35\n\trt_stream\x18\x01 \x01(\x0b\x32\".proto.cloud.MediaSetting.RTStream\x12\x30\n\x06record\x18\x02 \x01(\x0b\x32 .proto.cloud.MediaSetting.Record\x12\x32\n\x07\x63\x61pture\x18\x03 \x01(\x0b\x32!.proto.cloud.MediaSetting.Capture\x1a\x44\n\x08RTStream\x12\x38\n\nresolution\x18\x01 \x01(\x0e\x32$.proto.cloud.MediaSetting.Resolution\x1aS\n\x06Record\x12\x38\n\nresolution\x18\x01 \x01(\x0e\x32$.proto.cloud.MediaSetting.Resolution\x12\x0f\n\x07\x62itrate\x18\x02 \x01(\r\x1a(\n\x07\x43\x61pture\x12\r\n\x05width\x18\x01 \x01(\r\x12\x0e\n\x06height\x18\x02 \x01(\r\"1\n\nResolution\x12\n\n\x06R_480P\x10\x00\x12\n\n\x06R_720P\x10\x01\x12\x0b\n\x07R_1080P\x10\x02\"\x94\x02\n\x0bMediaStatus\x12-\n\x05state\x18\x01 \x01(\x0e\x32\x1e.proto.cloud.MediaStatus.State\x12\x31\n\x07storage\x18\x02 \x01(\x0e\x32 .proto.cloud.MediaStatus.Storage\x12\x13\n\x0btotal_space\x18\x03 \x01(\r\x12\x13\n\x0bphoto_space\x18\x04 \x01(\r\x12\x13\n\x0bvideo_space\x18\x05 \x01(\r\x12\x12\n\nbind_state\x18\x06 \x01(\x08\" \n\x05State\x12\x08\n\x04IDLE\x10\x00\x12\r\n\tRECORDING\x10\x01\".\n\x07Storage\x12\n\n\x06NORMAL\x10\x00\x12\r\n\tTHRESHOLD\x10\x01\x12\x08\n\x04\x46ULL\x10\x02\"\xbb\x03\n\x13MediaManagerRequest\x12\x39\n\x07\x63ontrol\x18\x01 \x01(\x0b\x32(.proto.cloud.MediaManagerRequest.Control\x12*\n\x07setting\x18\x02 \x01(\x0b\x32\x19.proto.cloud.MediaSetting\x12J\n\x13\x62ind_media_svc_data\x18\x03 \x01(\x0b\x32-.proto.cloud.MediaManagerRequest.BindMediaSvc\x1a\x91\x01\n\x07\x43ontrol\x12?\n\x06method\x18\x01 \x01(\x0e\x32/.proto.cloud.MediaManagerRequest.Control.Method\x12\x0b\n\x03seq\x18\x02 \x01(\r\"8\n\x06Method\x12\x10\n\x0cRECORD_START\x10\x00\x12\x0f\n\x0bRECORD_STOP\x10\x01\x12\x0b\n\x07\x43\x41PTURE\x10\x02\x1a]\n\x0c\x42indMediaSvc\x12\x0b\n\x03seq\x18\x01 \x01(\r\x12\t\n\x01\x63\x18\x02 \x01(\r\x12\t\n\x01\x64\x18\x03 \x01(\r\x12\t\n\x01g\x18\x04 \x01(\t\x12\t\n\x01j\x18\x05 \x01(\r\x12\x14\n\x0cuser_account\x18\x06 \x01(\t\"\xa4\x05\n\x14MediaManagerResponse\x12:\n\x07\x63ontrol\x18\x01 \x01(\x0b\x32).proto.cloud.MediaManagerResponse.Control\x12*\n\x07setting\x18\x02 \x01(\x0b\x32\x19.proto.cloud.MediaSetting\x12(\n\x06status\x18\x03 \x01(\x0b\x32\x18.proto.cloud.MediaStatus\x12\x46\n\x0e\x62ind_media_svc\x18\x04 \x01(\x0b\x32..proto.cloud.MediaManagerResponse.BindMediaSvc\x1a\xab\x02\n\x07\x43ontrol\x12?\n\x06method\x18\x01 \x01(\x0e\x32/.proto.cloud.MediaManagerRequest.Control.Method\x12\x0b\n\x03seq\x18\x02 \x01(\r\x12@\n\x06result\x18\x03 \x01(\x0e\x32\x30.proto.cloud.MediaManagerResponse.Control.Result\x12\x45\n\tfile_info\x18\x04 \x01(\x0b\x32\x32.proto.cloud.MediaManagerResponse.Control.FileInfo\x1a(\n\x08\x46ileInfo\x12\x10\n\x08\x66ilepath\x18\x01 \x01(\t\x12\n\n\x02id\x18\x02 \x01(\t\"\x1f\n\x06Result\x12\x0b\n\x07SUCCESS\x10\x00\x12\x08\n\x04\x46\x41IL\x10\x01\x1a\x83\x01\n\x0c\x42indMediaSvc\x12\x0b\n\x03seq\x18\x01 \x01(\r\x12\x45\n\x06result\x18\x02 \x01(\x0e\x32\x35.proto.cloud.MediaManagerResponse.BindMediaSvc.Result\"\x1f\n\x06Result\x12\x0b\n\x07SUCCESS\x10\x00\x12\x08\n\x04\x46\x41IL\x10\x01\x62\x06proto3') - -_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'proto.cloud.media_manager_pb2', globals()) -if _descriptor._USE_C_DESCRIPTORS == False: - - DESCRIPTOR._options = None - _MEDIASETTING._serialized_start=49 - _MEDIASETTING._serialized_end=468 - _MEDIASETTING_RTSTREAM._serialized_start=222 - _MEDIASETTING_RTSTREAM._serialized_end=290 - _MEDIASETTING_RECORD._serialized_start=292 - _MEDIASETTING_RECORD._serialized_end=375 - _MEDIASETTING_CAPTURE._serialized_start=377 - _MEDIASETTING_CAPTURE._serialized_end=417 - _MEDIASETTING_RESOLUTION._serialized_start=419 - _MEDIASETTING_RESOLUTION._serialized_end=468 - _MEDIASTATUS._serialized_start=471 - _MEDIASTATUS._serialized_end=747 - _MEDIASTATUS_STATE._serialized_start=667 - _MEDIASTATUS_STATE._serialized_end=699 - _MEDIASTATUS_STORAGE._serialized_start=701 - _MEDIASTATUS_STORAGE._serialized_end=747 - _MEDIAMANAGERREQUEST._serialized_start=750 - _MEDIAMANAGERREQUEST._serialized_end=1193 - _MEDIAMANAGERREQUEST_CONTROL._serialized_start=953 - _MEDIAMANAGERREQUEST_CONTROL._serialized_end=1098 - _MEDIAMANAGERREQUEST_CONTROL_METHOD._serialized_start=1042 - _MEDIAMANAGERREQUEST_CONTROL_METHOD._serialized_end=1098 - _MEDIAMANAGERREQUEST_BINDMEDIASVC._serialized_start=1100 - _MEDIAMANAGERREQUEST_BINDMEDIASVC._serialized_end=1193 - _MEDIAMANAGERRESPONSE._serialized_start=1196 - _MEDIAMANAGERRESPONSE._serialized_end=1872 - _MEDIAMANAGERRESPONSE_CONTROL._serialized_start=1439 - _MEDIAMANAGERRESPONSE_CONTROL._serialized_end=1738 - _MEDIAMANAGERRESPONSE_CONTROL_FILEINFO._serialized_start=1665 - _MEDIAMANAGERRESPONSE_CONTROL_FILEINFO._serialized_end=1705 - _MEDIAMANAGERRESPONSE_CONTROL_RESULT._serialized_start=1707 - _MEDIAMANAGERRESPONSE_CONTROL_RESULT._serialized_end=1738 - _MEDIAMANAGERRESPONSE_BINDMEDIASVC._serialized_start=1741 - _MEDIAMANAGERRESPONSE_BINDMEDIASVC._serialized_end=1872 - _MEDIAMANAGERRESPONSE_BINDMEDIASVC_RESULT._serialized_start=1707 - _MEDIAMANAGERRESPONSE_BINDMEDIASVC_RESULT._serialized_end=1738 -# @@protoc_insertion_point(module_scope) diff --git a/proto-reference/media_manager_pb2.pyi b/proto-reference/media_manager_pb2.pyi deleted file mode 100644 index ec1467c..0000000 --- a/proto-reference/media_manager_pb2.pyi +++ /dev/null @@ -1,147 +0,0 @@ -from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper -from google.protobuf import descriptor as _descriptor -from google.protobuf import message as _message -from typing import ClassVar as _ClassVar, Mapping as _Mapping, Optional as _Optional, Union as _Union - -DESCRIPTOR: _descriptor.FileDescriptor - -class MediaManagerRequest(_message.Message): - __slots__ = ["bind_media_svc_data", "control", "setting"] - class BindMediaSvc(_message.Message): - __slots__ = ["c", "d", "g", "j", "seq", "user_account"] - C_FIELD_NUMBER: _ClassVar[int] - D_FIELD_NUMBER: _ClassVar[int] - G_FIELD_NUMBER: _ClassVar[int] - J_FIELD_NUMBER: _ClassVar[int] - SEQ_FIELD_NUMBER: _ClassVar[int] - USER_ACCOUNT_FIELD_NUMBER: _ClassVar[int] - c: int - d: int - g: str - j: int - seq: int - user_account: str - def __init__(self, seq: _Optional[int] = ..., c: _Optional[int] = ..., d: _Optional[int] = ..., g: _Optional[str] = ..., j: _Optional[int] = ..., user_account: _Optional[str] = ...) -> None: ... - class Control(_message.Message): - __slots__ = ["method", "seq"] - class Method(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - CAPTURE: MediaManagerRequest.Control.Method - METHOD_FIELD_NUMBER: _ClassVar[int] - RECORD_START: MediaManagerRequest.Control.Method - RECORD_STOP: MediaManagerRequest.Control.Method - SEQ_FIELD_NUMBER: _ClassVar[int] - method: MediaManagerRequest.Control.Method - seq: int - def __init__(self, method: _Optional[_Union[MediaManagerRequest.Control.Method, str]] = ..., seq: _Optional[int] = ...) -> None: ... - BIND_MEDIA_SVC_DATA_FIELD_NUMBER: _ClassVar[int] - CONTROL_FIELD_NUMBER: _ClassVar[int] - SETTING_FIELD_NUMBER: _ClassVar[int] - bind_media_svc_data: MediaManagerRequest.BindMediaSvc - control: MediaManagerRequest.Control - setting: MediaSetting - def __init__(self, control: _Optional[_Union[MediaManagerRequest.Control, _Mapping]] = ..., setting: _Optional[_Union[MediaSetting, _Mapping]] = ..., bind_media_svc_data: _Optional[_Union[MediaManagerRequest.BindMediaSvc, _Mapping]] = ...) -> None: ... - -class MediaManagerResponse(_message.Message): - __slots__ = ["bind_media_svc", "control", "setting", "status"] - class BindMediaSvc(_message.Message): - __slots__ = ["result", "seq"] - class Result(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - FAIL: MediaManagerResponse.BindMediaSvc.Result - RESULT_FIELD_NUMBER: _ClassVar[int] - SEQ_FIELD_NUMBER: _ClassVar[int] - SUCCESS: MediaManagerResponse.BindMediaSvc.Result - result: MediaManagerResponse.BindMediaSvc.Result - seq: int - def __init__(self, seq: _Optional[int] = ..., result: _Optional[_Union[MediaManagerResponse.BindMediaSvc.Result, str]] = ...) -> None: ... - class Control(_message.Message): - __slots__ = ["file_info", "method", "result", "seq"] - class Result(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - class FileInfo(_message.Message): - __slots__ = ["filepath", "id"] - FILEPATH_FIELD_NUMBER: _ClassVar[int] - ID_FIELD_NUMBER: _ClassVar[int] - filepath: str - id: str - def __init__(self, filepath: _Optional[str] = ..., id: _Optional[str] = ...) -> None: ... - FAIL: MediaManagerResponse.Control.Result - FILE_INFO_FIELD_NUMBER: _ClassVar[int] - METHOD_FIELD_NUMBER: _ClassVar[int] - RESULT_FIELD_NUMBER: _ClassVar[int] - SEQ_FIELD_NUMBER: _ClassVar[int] - SUCCESS: MediaManagerResponse.Control.Result - file_info: MediaManagerResponse.Control.FileInfo - method: MediaManagerRequest.Control.Method - result: MediaManagerResponse.Control.Result - seq: int - def __init__(self, method: _Optional[_Union[MediaManagerRequest.Control.Method, str]] = ..., seq: _Optional[int] = ..., result: _Optional[_Union[MediaManagerResponse.Control.Result, str]] = ..., file_info: _Optional[_Union[MediaManagerResponse.Control.FileInfo, _Mapping]] = ...) -> None: ... - BIND_MEDIA_SVC_FIELD_NUMBER: _ClassVar[int] - CONTROL_FIELD_NUMBER: _ClassVar[int] - SETTING_FIELD_NUMBER: _ClassVar[int] - STATUS_FIELD_NUMBER: _ClassVar[int] - bind_media_svc: MediaManagerResponse.BindMediaSvc - control: MediaManagerResponse.Control - setting: MediaSetting - status: MediaStatus - def __init__(self, control: _Optional[_Union[MediaManagerResponse.Control, _Mapping]] = ..., setting: _Optional[_Union[MediaSetting, _Mapping]] = ..., status: _Optional[_Union[MediaStatus, _Mapping]] = ..., bind_media_svc: _Optional[_Union[MediaManagerResponse.BindMediaSvc, _Mapping]] = ...) -> None: ... - -class MediaSetting(_message.Message): - __slots__ = ["capture", "record", "rt_stream"] - class Resolution(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - class Capture(_message.Message): - __slots__ = ["height", "width"] - HEIGHT_FIELD_NUMBER: _ClassVar[int] - WIDTH_FIELD_NUMBER: _ClassVar[int] - height: int - width: int - def __init__(self, width: _Optional[int] = ..., height: _Optional[int] = ...) -> None: ... - class RTStream(_message.Message): - __slots__ = ["resolution"] - RESOLUTION_FIELD_NUMBER: _ClassVar[int] - resolution: MediaSetting.Resolution - def __init__(self, resolution: _Optional[_Union[MediaSetting.Resolution, str]] = ...) -> None: ... - class Record(_message.Message): - __slots__ = ["bitrate", "resolution"] - BITRATE_FIELD_NUMBER: _ClassVar[int] - RESOLUTION_FIELD_NUMBER: _ClassVar[int] - bitrate: int - resolution: MediaSetting.Resolution - def __init__(self, resolution: _Optional[_Union[MediaSetting.Resolution, str]] = ..., bitrate: _Optional[int] = ...) -> None: ... - CAPTURE_FIELD_NUMBER: _ClassVar[int] - RECORD_FIELD_NUMBER: _ClassVar[int] - RT_STREAM_FIELD_NUMBER: _ClassVar[int] - R_1080P: MediaSetting.Resolution - R_480P: MediaSetting.Resolution - R_720P: MediaSetting.Resolution - capture: MediaSetting.Capture - record: MediaSetting.Record - rt_stream: MediaSetting.RTStream - def __init__(self, rt_stream: _Optional[_Union[MediaSetting.RTStream, _Mapping]] = ..., record: _Optional[_Union[MediaSetting.Record, _Mapping]] = ..., capture: _Optional[_Union[MediaSetting.Capture, _Mapping]] = ...) -> None: ... - -class MediaStatus(_message.Message): - __slots__ = ["bind_state", "photo_space", "state", "storage", "total_space", "video_space"] - class State(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - class Storage(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - BIND_STATE_FIELD_NUMBER: _ClassVar[int] - FULL: MediaStatus.Storage - IDLE: MediaStatus.State - NORMAL: MediaStatus.Storage - PHOTO_SPACE_FIELD_NUMBER: _ClassVar[int] - RECORDING: MediaStatus.State - STATE_FIELD_NUMBER: _ClassVar[int] - STORAGE_FIELD_NUMBER: _ClassVar[int] - THRESHOLD: MediaStatus.Storage - TOTAL_SPACE_FIELD_NUMBER: _ClassVar[int] - VIDEO_SPACE_FIELD_NUMBER: _ClassVar[int] - bind_state: bool - photo_space: int - state: MediaStatus.State - storage: MediaStatus.Storage - total_space: int - video_space: int - def __init__(self, state: _Optional[_Union[MediaStatus.State, str]] = ..., storage: _Optional[_Union[MediaStatus.Storage, str]] = ..., total_space: _Optional[int] = ..., photo_space: _Optional[int] = ..., video_space: _Optional[int] = ..., bind_state: bool = ...) -> None: ... diff --git a/proto-reference/misc.proto b/proto-reference/misc.proto deleted file mode 100644 index 5b7494f..0000000 --- a/proto-reference/misc.proto +++ /dev/null @@ -1,19 +0,0 @@ -syntax = "proto3"; - -// option optimize_for = LITE_RUNTIME; - -package proto.cloud; - -import "proto/cloud/common.proto"; - -message Volume { - uint32 value = 1; // 0 - 100 -} - -message Power { - Switch sw = 1; -} - -message Battery { - uint32 level = 1; // 0 - 100 -} diff --git a/proto-reference/misc_pb2.py b/proto-reference/misc_pb2.py deleted file mode 100644 index 9e2702d..0000000 --- a/proto-reference/misc_pb2.py +++ /dev/null @@ -1,30 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: proto/cloud/misc.proto -"""Generated protocol buffer code.""" -from google.protobuf import descriptor as _descriptor -from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import symbol_database as _symbol_database -from google.protobuf.internal import builder as _builder - -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - -from ...proto.cloud import common_pb2 as proto_dot_cloud_dot_common__pb2 - -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x16proto/cloud/misc.proto\x12\x0bproto.cloud\x1a\x18proto/cloud/common.proto\"\x17\n\x06Volume\x12\r\n\x05value\x18\x01 \x01(\r\"(\n\x05Power\x12\x1f\n\x02sw\x18\x01 \x01(\x0b\x32\x13.proto.cloud.Switch\"\x18\n\x07\x42\x61ttery\x12\r\n\x05level\x18\x01 \x01(\rb\x06proto3') - -_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'proto.cloud.misc_pb2', globals()) -if _descriptor._USE_C_DESCRIPTORS == False: - - DESCRIPTOR._options = None - _VOLUME._serialized_start=65 - _VOLUME._serialized_end=88 - _POWER._serialized_start=90 - _POWER._serialized_end=130 - _BATTERY._serialized_start=132 - _BATTERY._serialized_end=156 -# @@protoc_insertion_point(module_scope) diff --git a/proto-reference/misc_pb2.pyi b/proto-reference/misc_pb2.pyi deleted file mode 100644 index e76366d..0000000 --- a/proto-reference/misc_pb2.pyi +++ /dev/null @@ -1,29 +0,0 @@ -from typing import ClassVar as _ClassVar -from typing import Mapping as _Mapping -from typing import Optional as _Optional -from typing import Union as _Union - -from google.protobuf import descriptor as _descriptor -from google.protobuf import message as _message - -from ...proto.cloud import common_pb2 as _common_pb2 - -DESCRIPTOR: _descriptor.FileDescriptor - -class Battery(_message.Message): - __slots__ = ["level"] - LEVEL_FIELD_NUMBER: _ClassVar[int] - level: int - def __init__(self, level: _Optional[int] = ...) -> None: ... - -class Power(_message.Message): - __slots__ = ["sw"] - SW_FIELD_NUMBER: _ClassVar[int] - sw: _common_pb2.Switch - def __init__(self, sw: _Optional[_Union[_common_pb2.Switch, _Mapping]] = ...) -> None: ... - -class Volume(_message.Message): - __slots__ = ["value"] - VALUE_FIELD_NUMBER: _ClassVar[int] - value: int - def __init__(self, value: _Optional[int] = ...) -> None: ... diff --git a/proto-reference/multi_maps.proto b/proto-reference/multi_maps.proto deleted file mode 100644 index 11e78f9..0000000 --- a/proto-reference/multi_maps.proto +++ /dev/null @@ -1,70 +0,0 @@ -syntax = "proto3"; - -// option optimize_for = LITE_RUNTIME; - -package proto.cloud; - -import "proto/cloud/common.proto"; -import "proto/cloud/p2pdata.proto"; - -// 所有的Request均使用tuya DP发送 [EN: All Requests are sent using Tuya DP] -message MultiMapsManageRequest { - enum Method { - MAP_RESET = 0; // 不带参 [EN: No parameters] - MAP_RENAME = 1; // message Rename - MAP_LOAD = 2; // message Common - MAP_REPLACE = 3; // message Common - MAP_DELETE = 4; // message Common - MAP_SAVE = 5; // message SaveOptions - MAP_IGNORE = 6; // 忽略当前地图(不保存),不带参 [EN: Ignore current map (don't save), no parameters] - MAP_GET_ALL = 7; // 获取所有地址, p2p同时加入 [EN: Get all maps, p2p also included] - MAP_GET_ONE = 8; // 获取单个地图, p2p同时加入 [EN: Get single map, p2p also included] - MAP_RECOVERY = 9; // 恢复地图,message Common [EN: Recover map, message Common] - } - - Method method = 1; - uint32 seq = 2; - - message Rename { - uint32 cloud_mapid = 1; // TODO: 是否使用cloud_mapid与多地图方案有关; [EN: TODO: Whether to use cloud_mapid is related to multi-map solution;] - string new_name = 2; - } - - message Common { - uint32 cloud_mapid = 1; - } - - message SaveOptions { - Switch multi_map_sw = 1; - } - - oneof Param { - Rename rename = 3; - Common common = 4; - SaveOptions save_options = 5; - } -} - -// 请求中method == MAP_GET_ALL或MAP_GET_ONE时, 使用p2p传送 [EN: When method == MAP_GET_ALL or MAP_GET_ONE in request, use p2p transmission] -// 其它使用tuya DP传送 [EN: Others use Tuya DP transmission] -message MultiMapsManageResponse { - MultiMapsManageRequest.Method method = 1; - uint32 seq = 2; - - enum Result { - SUCCESS = 0; - FAILED = 1; - STARTED = 2; - } - Result result = 3; - - // p2p同时加入, 请求中method == MAP_GET_ALL或MAP_GET_ONE时使用. [EN: p2p also included, used when method == MAP_GET_ALL or MAP_GET_ONE in request.] - message CompleteMaps { - repeated p2p.CompleteMap complete_map = 1; - } - - oneof Param { - p2p.MapInfo map_infos = 11; - CompleteMaps complete_maps = 12; - } -} diff --git a/proto-reference/multi_maps_pb2.py b/proto-reference/multi_maps_pb2.py deleted file mode 100644 index 2f251c8..0000000 --- a/proto-reference/multi_maps_pb2.py +++ /dev/null @@ -1,41 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: proto/cloud/multi_maps.proto -"""Generated protocol buffer code.""" -from google.protobuf import descriptor as _descriptor -from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import symbol_database as _symbol_database -from google.protobuf.internal import builder as _builder - -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - -from ...proto.cloud import common_pb2 as proto_dot_cloud_dot_common__pb2 -from ...proto.cloud import p2pdata_pb2 as proto_dot_cloud_dot_p2pdata__pb2 - -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1cproto/cloud/multi_maps.proto\x12\x0bproto.cloud\x1a\x18proto/cloud/common.proto\x1a\x19proto/cloud/p2pdata.proto\"\xe4\x04\n\x16MultiMapsManageRequest\x12:\n\x06method\x18\x01 \x01(\x0e\x32*.proto.cloud.MultiMapsManageRequest.Method\x12\x0b\n\x03seq\x18\x02 \x01(\r\x12<\n\x06rename\x18\x03 \x01(\x0b\x32*.proto.cloud.MultiMapsManageRequest.RenameH\x00\x12<\n\x06\x63ommon\x18\x04 \x01(\x0b\x32*.proto.cloud.MultiMapsManageRequest.CommonH\x00\x12G\n\x0csave_options\x18\x05 \x01(\x0b\x32/.proto.cloud.MultiMapsManageRequest.SaveOptionsH\x00\x1a/\n\x06Rename\x12\x13\n\x0b\x63loud_mapid\x18\x01 \x01(\r\x12\x10\n\x08new_name\x18\x02 \x01(\t\x1a\x1d\n\x06\x43ommon\x12\x13\n\x0b\x63loud_mapid\x18\x01 \x01(\r\x1a\x38\n\x0bSaveOptions\x12)\n\x0cmulti_map_sw\x18\x01 \x01(\x0b\x32\x13.proto.cloud.Switch\"\xa8\x01\n\x06Method\x12\r\n\tMAP_RESET\x10\x00\x12\x0e\n\nMAP_RENAME\x10\x01\x12\x0c\n\x08MAP_LOAD\x10\x02\x12\x0f\n\x0bMAP_REPLACE\x10\x03\x12\x0e\n\nMAP_DELETE\x10\x04\x12\x0c\n\x08MAP_SAVE\x10\x05\x12\x0e\n\nMAP_IGNORE\x10\x06\x12\x0f\n\x0bMAP_GET_ALL\x10\x07\x12\x0f\n\x0bMAP_GET_ONE\x10\x08\x12\x10\n\x0cMAP_RECOVERY\x10\tB\x07\n\x05Param\"\x97\x03\n\x17MultiMapsManageResponse\x12:\n\x06method\x18\x01 \x01(\x0e\x32*.proto.cloud.MultiMapsManageRequest.Method\x12\x0b\n\x03seq\x18\x02 \x01(\r\x12;\n\x06result\x18\x03 \x01(\x0e\x32+.proto.cloud.MultiMapsManageResponse.Result\x12-\n\tmap_infos\x18\x0b \x01(\x0b\x32\x18.proto.cloud.p2p.MapInfoH\x00\x12J\n\rcomplete_maps\x18\x0c \x01(\x0b\x32\x31.proto.cloud.MultiMapsManageResponse.CompleteMapsH\x00\x1a\x42\n\x0c\x43ompleteMaps\x12\x32\n\x0c\x63omplete_map\x18\x01 \x03(\x0b\x32\x1c.proto.cloud.p2p.CompleteMap\".\n\x06Result\x12\x0b\n\x07SUCCESS\x10\x00\x12\n\n\x06\x46\x41ILED\x10\x01\x12\x0b\n\x07STARTED\x10\x02\x42\x07\n\x05Paramb\x06proto3') - -_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'proto.cloud.multi_maps_pb2', globals()) -if _descriptor._USE_C_DESCRIPTORS == False: - - DESCRIPTOR._options = None - _MULTIMAPSMANAGEREQUEST._serialized_start=99 - _MULTIMAPSMANAGEREQUEST._serialized_end=711 - _MULTIMAPSMANAGEREQUEST_RENAME._serialized_start=395 - _MULTIMAPSMANAGEREQUEST_RENAME._serialized_end=442 - _MULTIMAPSMANAGEREQUEST_COMMON._serialized_start=444 - _MULTIMAPSMANAGEREQUEST_COMMON._serialized_end=473 - _MULTIMAPSMANAGEREQUEST_SAVEOPTIONS._serialized_start=475 - _MULTIMAPSMANAGEREQUEST_SAVEOPTIONS._serialized_end=531 - _MULTIMAPSMANAGEREQUEST_METHOD._serialized_start=534 - _MULTIMAPSMANAGEREQUEST_METHOD._serialized_end=702 - _MULTIMAPSMANAGERESPONSE._serialized_start=714 - _MULTIMAPSMANAGERESPONSE._serialized_end=1121 - _MULTIMAPSMANAGERESPONSE_COMPLETEMAPS._serialized_start=998 - _MULTIMAPSMANAGERESPONSE_COMPLETEMAPS._serialized_end=1064 - _MULTIMAPSMANAGERESPONSE_RESULT._serialized_start=1066 - _MULTIMAPSMANAGERESPONSE_RESULT._serialized_end=1112 -# @@protoc_insertion_point(module_scope) diff --git a/proto-reference/multi_maps_pb2.pyi b/proto-reference/multi_maps_pb2.pyi deleted file mode 100644 index 2ee10b2..0000000 --- a/proto-reference/multi_maps_pb2.pyi +++ /dev/null @@ -1,82 +0,0 @@ -from typing import ClassVar as _ClassVar -from typing import Iterable as _Iterable -from typing import Mapping as _Mapping -from typing import Optional as _Optional -from typing import Union as _Union - -from google.protobuf import descriptor as _descriptor -from google.protobuf import message as _message -from google.protobuf.internal import containers as _containers -from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper - -from ...proto.cloud import common_pb2 as _common_pb2 -from ...proto.cloud import p2pdata_pb2 as _p2pdata_pb2 - -DESCRIPTOR: _descriptor.FileDescriptor - -class MultiMapsManageRequest(_message.Message): - __slots__ = ["common", "method", "rename", "save_options", "seq"] - class Method(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - class Common(_message.Message): - __slots__ = ["cloud_mapid"] - CLOUD_MAPID_FIELD_NUMBER: _ClassVar[int] - cloud_mapid: int - def __init__(self, cloud_mapid: _Optional[int] = ...) -> None: ... - class Rename(_message.Message): - __slots__ = ["cloud_mapid", "new_name"] - CLOUD_MAPID_FIELD_NUMBER: _ClassVar[int] - NEW_NAME_FIELD_NUMBER: _ClassVar[int] - cloud_mapid: int - new_name: str - def __init__(self, cloud_mapid: _Optional[int] = ..., new_name: _Optional[str] = ...) -> None: ... - class SaveOptions(_message.Message): - __slots__ = ["multi_map_sw"] - MULTI_MAP_SW_FIELD_NUMBER: _ClassVar[int] - multi_map_sw: _common_pb2.Switch - def __init__(self, multi_map_sw: _Optional[_Union[_common_pb2.Switch, _Mapping]] = ...) -> None: ... - COMMON_FIELD_NUMBER: _ClassVar[int] - MAP_DELETE: MultiMapsManageRequest.Method - MAP_GET_ALL: MultiMapsManageRequest.Method - MAP_GET_ONE: MultiMapsManageRequest.Method - MAP_IGNORE: MultiMapsManageRequest.Method - MAP_LOAD: MultiMapsManageRequest.Method - MAP_RECOVERY: MultiMapsManageRequest.Method - MAP_RENAME: MultiMapsManageRequest.Method - MAP_REPLACE: MultiMapsManageRequest.Method - MAP_RESET: MultiMapsManageRequest.Method - MAP_SAVE: MultiMapsManageRequest.Method - METHOD_FIELD_NUMBER: _ClassVar[int] - RENAME_FIELD_NUMBER: _ClassVar[int] - SAVE_OPTIONS_FIELD_NUMBER: _ClassVar[int] - SEQ_FIELD_NUMBER: _ClassVar[int] - common: MultiMapsManageRequest.Common - method: MultiMapsManageRequest.Method - rename: MultiMapsManageRequest.Rename - save_options: MultiMapsManageRequest.SaveOptions - seq: int - def __init__(self, method: _Optional[_Union[MultiMapsManageRequest.Method, str]] = ..., seq: _Optional[int] = ..., rename: _Optional[_Union[MultiMapsManageRequest.Rename, _Mapping]] = ..., common: _Optional[_Union[MultiMapsManageRequest.Common, _Mapping]] = ..., save_options: _Optional[_Union[MultiMapsManageRequest.SaveOptions, _Mapping]] = ...) -> None: ... - -class MultiMapsManageResponse(_message.Message): - __slots__ = ["complete_maps", "map_infos", "method", "result", "seq"] - class Result(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - class CompleteMaps(_message.Message): - __slots__ = ["complete_map"] - COMPLETE_MAP_FIELD_NUMBER: _ClassVar[int] - complete_map: _containers.RepeatedCompositeFieldContainer[_p2pdata_pb2.CompleteMap] - def __init__(self, complete_map: _Optional[_Iterable[_Union[_p2pdata_pb2.CompleteMap, _Mapping]]] = ...) -> None: ... - COMPLETE_MAPS_FIELD_NUMBER: _ClassVar[int] - FAILED: MultiMapsManageResponse.Result - MAP_INFOS_FIELD_NUMBER: _ClassVar[int] - METHOD_FIELD_NUMBER: _ClassVar[int] - RESULT_FIELD_NUMBER: _ClassVar[int] - SEQ_FIELD_NUMBER: _ClassVar[int] - STARTED: MultiMapsManageResponse.Result - SUCCESS: MultiMapsManageResponse.Result - complete_maps: MultiMapsManageResponse.CompleteMaps - map_infos: _p2pdata_pb2.MapInfo - method: MultiMapsManageRequest.Method - result: MultiMapsManageResponse.Result - seq: int - def __init__(self, method: _Optional[_Union[MultiMapsManageRequest.Method, str]] = ..., seq: _Optional[int] = ..., result: _Optional[_Union[MultiMapsManageResponse.Result, str]] = ..., map_infos: _Optional[_Union[_p2pdata_pb2.MapInfo, _Mapping]] = ..., complete_maps: _Optional[_Union[MultiMapsManageResponse.CompleteMaps, _Mapping]] = ...) -> None: ... diff --git a/proto-reference/p2pdata.proto b/proto-reference/p2pdata.proto deleted file mode 100644 index 5a266d2..0000000 --- a/proto-reference/p2pdata.proto +++ /dev/null @@ -1,152 +0,0 @@ -syntax = "proto3"; - -// option optimize_for = LITE_RUNTIME; - -package proto.cloud.p2p; - -import "proto/cloud/common.proto"; -import "proto/cloud/stream.proto"; - -/** - * 地图数据的统一入口, 包括实时地图数据, 多地图相关数据. [EN: Unified entry for map data, including real-time map data and multi-map related data.] - */ -message MapChannelMsg { - enum MsgType { - MAP_INFO = 0; - MULTI_MAP_RESPONSE = 1; - } - - MsgType type = 1; - oneof MsgData { - /* - * 实时地图数据不需要发送请求(为实时推送) [EN: Real-time map data doesn't need to send request (is real-time push)] - */ - MapInfo map_info = 2; - - /* - * 该成员解析为MultiMapsManageResponse类型, 需要发送相应DP请求. [EN: This member parses to MultiMapsManageResponse type, needs to send corresponding DP request.] - */ - bytes multi_map_response = 3; - } -} - -/** - * 房间轮廓信息(使用包含分区信息的地图),单次上传. [EN: Room outline information (using map with partition info), single upload.] - * - * @note: Delimited 方式序列化. [EN: @note: Serialized in Delimited way.] - */ -message MapPixels { - /** - * 地图像素数据,目前采用 LZ4 压缩; [EN: Map pixel data, currently using LZ4 compression;] - * 地图更新采用SLAM地图+分区地图的方式维护,slam地图实时更新,分区地图仅在保存地图、用户手动调整分区时更新; [EN: Map update uses SLAM map + partition map method, SLAM map updates in real-time, partition map only updates when saving map or user manually adjusts partitions;] - * 实时地图: [EN: Real-time map:] - * 1byte表示4像素,即1个像素2bit: [EN: 1 byte represents 4 pixels, i.e. 1 pixel is 2 bits:] - * 0x00 为未知区域 [EN: 0x00 is unknown area] - * 0x01 为张障碍物 [EN: 0x01 is obstacle] - * 0x02 为可清扫区域 [EN: 0x02 is sweepable area] - * 0x03 为地毯 [EN: 0x03 is carpet] - * 分区地图: [EN: Partition map:] - * 1byte表示1像素的方式 [EN: 1 byte represents 1 pixel] - * 低2bit表示像素 [EN: Lower 2 bits represent pixel] - * 0x00 为未知区域 [EN: 0x00 is unknown area] - * 0x01 为张障碍物 [EN: 0x01 is obstacle] - * 0x02 为可清扫区域 [EN: 0x02 is sweepable area] - * 0x03 为地毯 [EN: 0x03 is carpet] - * 高6bit表示房间分区id [EN: Upper 6 bits represent room partition ID] - * 每个像素占 1byte,包含房间id、是否是背景等数据. [EN: Each pixel occupies 1 byte, contains room ID, whether it's background, etc.] - * 房间标识说明 [EN: Room identifier description] - * 有效房间标识: 0 - 31 [EN: Valid room identifier: 0 - 31] - * 无效房间标识: 大于等于32 [EN: Invalid room identifier: greater than or equal to 32] - * 特殊房间标识: [EN: Special room identifiers:] - * 60:没有房间数据 [EN: 60: No room data] - * 61:房间间隙 [EN: 61: Room gap] - * 62:代表障碍物 [EN: 62: Represents obstacle] - * 63:未知的房间标识 [EN: 63: Unknown room identifier] - */ - bytes pixels = 1; // 地图压缩 [EN: Map compressed] - - /** - * 地图像素原始size, 如果pixels有压缩,则 pixel_size 表示解压后的长度. [EN: Original map pixel size, if pixels are compressed, pixel_size represents the decompressed length.] - */ - uint32 pixel_size = 2; -} - - -/** - p2p数据相当于直播,不会在云端保存,每次可以直接传输全量数据 [EN: p2p data is like live streaming, not saved in cloud, can transmit full data each time] -*/ -message MapInfo { - uint32 releases = 1; //map 的大版本修正号, version [EN: Map major version revision number, version] - uint32 map_id = 2; // map 的 id 号, name/releases在后面 [EN: Map ID number, name/releases are below] - bool map_stable = 3; // 地图是否稳定 [EN: Whether map is stable] - uint32 map_width = 4; - uint32 map_height = 5; - Point origin = 6; // 原点 [EN: Origin] - repeated Pose docks = 7; // 支持多个充电座/基站 [EN: Supports multiple charging docks/stations] - - enum MapMsgType{ - MAP_REALTIME = 0; - MAP_ROOMOUTLINE = 1; - OBSTACLE_INFO = 2; - RESTRICT_ZONES = 3; - ROOM_PARAMS = 4; - CRUISE_DATA = 5; - TEMPORARY_DATA = 6; - }; - MapMsgType msg_type = 8; - - oneof MapMsg { // 由 msg_type 决定包含哪种数据 [EN: Determined by msg_type which data to include] - MapPixels pixels = 9; // 实时地图信息或房间轮廓信息 [EN: Real-time map info or room outline info] - stream.ObstacleInfo obstacles = 10; - stream.RestrictedZone restricted_zones = 11; - stream.RoomParams room_params = 12; - stream.CruiseData cruise_data = 13; - stream.TemporaryData temporary_data = 14; - } - - uint32 is_new_map = 15; // p2p同时加入 [EN: p2p also included] - string name = 16; // map 的名称 [EN: Map name] -} - -message CompleteMap { - uint32 releases = 1; // map 的大版本修正号, version [EN: Map major version revision number, version] - uint32 map_id = 2; - bool map_stable = 3; // 地图是否稳定 [EN: Whether map is stable] - uint32 map_width = 4; - uint32 map_height = 5; - Point origin = 6; // 原点 [EN: Origin] - - repeated Pose docks = 7; // 支持多个充电座/基站 [EN: Supports multiple charging docks/stations] - MapPixels map = 8; // 实时地图信息 [EN: Real-time map info] - MapPixels room_outline = 9; // 房间轮廓信息 [EN: Room outline info] - stream.ObstacleInfo obstacles = 10; - stream.RestrictedZone restricted_zones = 11; - stream.RoomParams room_params = 12; - stream.TemporaryData temporary_data = 13; - uint32 is_new_map = 14; // p2p同时加入 [EN: p2p also included] - string name = 15; // map 的名称 [EN: Map name] -} - -/** - 一个路径点包含 5 个字节: [EN: A path point contains 5 bytes:] - byte 1-2: x 坐标, byte1高字节,最高位为符号位, byte2为低字节; [EN: byte 1-2: x coordinate, byte1 high byte, highest bit is sign bit, byte2 is low byte;] - byte 3-4: y 坐标,byte3高字节,最高位为符号位, byte4为低字节; [EN: byte 3-4: y coordinate, byte3 high byte, highest bit is sign bit, byte4 is low byte;] - byte 5: flags信息, [EN: byte 5: flags info,] - bit 0-3 类型,0 - 清扫,1 - 拖地,2 - 扫+拖,3 - 导航,4 - 回充 (TODO: 根据需求完善) [EN: bit 0-3 type, 0 - sweep, 1 - mop, 2 - sweep+mop, 3 - navigation, 4 - return to charge (TODO: refine based on requirements)] - bit 4: 状态,0 - 继续上一轨迹点, 1 - 新轨迹点,与上一轨迹点不连续; [EN: bit 4: state, 0 - continue from last path point, 1 - new path point, not continuous with last;] - */ -message CompletePath { - enum Type{ - SWEEP = 0; - MOP = 1; - SWEEP_MOP = 2; - NAVI = 3; - GOHOME = 4; - }; - enum State { - FOLLOW = 0; // 继续上一轨迹点 [EN: Continue from last path point] - NEW = 1; // 新轨迹点,与上一轨迹点不连续 [EN: New path point, not continuous with last] - } - bytes path = 3; //lz4压缩 [EN: lz4 compressed] - uint32 path_lz4len = 4; //压缩原始长度 [EN: Original length before compression] -} diff --git a/proto-reference/p2pdata_pb2.py b/proto-reference/p2pdata_pb2.py deleted file mode 100644 index bbbe2fc..0000000 --- a/proto-reference/p2pdata_pb2.py +++ /dev/null @@ -1,43 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: proto/cloud/p2pdata.proto -"""Generated protocol buffer code.""" -from google.protobuf import descriptor as _descriptor -from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import symbol_database as _symbol_database -from google.protobuf.internal import builder as _builder - -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - -from ...proto.cloud import common_pb2 as proto_dot_cloud_dot_common__pb2 -from ...proto.cloud import stream_pb2 as proto_dot_cloud_dot_stream__pb2 - -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x19proto/cloud/p2pdata.proto\x12\x0fproto.cloud.p2p\x1a\x18proto/cloud/common.proto\x1a\x18proto/cloud/stream.proto\"\xcd\x01\n\rMapChannelMsg\x12\x34\n\x04type\x18\x01 \x01(\x0e\x32&.proto.cloud.p2p.MapChannelMsg.MsgType\x12,\n\x08map_info\x18\x02 \x01(\x0b\x32\x18.proto.cloud.p2p.MapInfoH\x00\x12\x1c\n\x12multi_map_response\x18\x03 \x01(\x0cH\x00\"/\n\x07MsgType\x12\x0c\n\x08MAP_INFO\x10\x00\x12\x16\n\x12MULTI_MAP_RESPONSE\x10\x01\x42\t\n\x07MsgData\"/\n\tMapPixels\x12\x0e\n\x06pixels\x18\x01 \x01(\x0c\x12\x12\n\npixel_size\x18\x02 \x01(\r\"\xf2\x05\n\x07MapInfo\x12\x10\n\x08releases\x18\x01 \x01(\r\x12\x0e\n\x06map_id\x18\x02 \x01(\r\x12\x12\n\nmap_stable\x18\x03 \x01(\x08\x12\x11\n\tmap_width\x18\x04 \x01(\r\x12\x12\n\nmap_height\x18\x05 \x01(\r\x12\"\n\x06origin\x18\x06 \x01(\x0b\x32\x12.proto.cloud.Point\x12 \n\x05\x64ocks\x18\x07 \x03(\x0b\x32\x11.proto.cloud.Pose\x12\x35\n\x08msg_type\x18\x08 \x01(\x0e\x32#.proto.cloud.p2p.MapInfo.MapMsgType\x12,\n\x06pixels\x18\t \x01(\x0b\x32\x1a.proto.cloud.p2p.MapPixelsH\x00\x12\x35\n\tobstacles\x18\n \x01(\x0b\x32 .proto.cloud.stream.ObstacleInfoH\x00\x12>\n\x10restricted_zones\x18\x0b \x01(\x0b\x32\".proto.cloud.stream.RestrictedZoneH\x00\x12\x35\n\x0broom_params\x18\x0c \x01(\x0b\x32\x1e.proto.cloud.stream.RoomParamsH\x00\x12\x35\n\x0b\x63ruise_data\x18\r \x01(\x0b\x32\x1e.proto.cloud.stream.CruiseDataH\x00\x12;\n\x0etemporary_data\x18\x0e \x01(\x0b\x32!.proto.cloud.stream.TemporaryDataH\x00\x12\x12\n\nis_new_map\x18\x0f \x01(\r\x12\x0c\n\x04name\x18\x10 \x01(\t\"\x90\x01\n\nMapMsgType\x12\x10\n\x0cMAP_REALTIME\x10\x00\x12\x13\n\x0fMAP_ROOMOUTLINE\x10\x01\x12\x11\n\rOBSTACLE_INFO\x10\x02\x12\x12\n\x0eRESTRICT_ZONES\x10\x03\x12\x0f\n\x0bROOM_PARAMS\x10\x04\x12\x0f\n\x0b\x43RUISE_DATA\x10\x05\x12\x12\n\x0eTEMPORARY_DATA\x10\x06\x42\x08\n\x06MapMsg\"\x90\x04\n\x0b\x43ompleteMap\x12\x10\n\x08releases\x18\x01 \x01(\r\x12\x0e\n\x06map_id\x18\x02 \x01(\r\x12\x12\n\nmap_stable\x18\x03 \x01(\x08\x12\x11\n\tmap_width\x18\x04 \x01(\r\x12\x12\n\nmap_height\x18\x05 \x01(\r\x12\"\n\x06origin\x18\x06 \x01(\x0b\x32\x12.proto.cloud.Point\x12 \n\x05\x64ocks\x18\x07 \x03(\x0b\x32\x11.proto.cloud.Pose\x12\'\n\x03map\x18\x08 \x01(\x0b\x32\x1a.proto.cloud.p2p.MapPixels\x12\x30\n\x0croom_outline\x18\t \x01(\x0b\x32\x1a.proto.cloud.p2p.MapPixels\x12\x33\n\tobstacles\x18\n \x01(\x0b\x32 .proto.cloud.stream.ObstacleInfo\x12<\n\x10restricted_zones\x18\x0b \x01(\x0b\x32\".proto.cloud.stream.RestrictedZone\x12\x33\n\x0broom_params\x18\x0c \x01(\x0b\x32\x1e.proto.cloud.stream.RoomParams\x12\x39\n\x0etemporary_data\x18\r \x01(\x0b\x32!.proto.cloud.stream.TemporaryData\x12\x12\n\nis_new_map\x18\x0e \x01(\r\x12\x0c\n\x04name\x18\x0f \x01(\t\"\x90\x01\n\x0c\x43ompletePath\x12\x0c\n\x04path\x18\x03 \x01(\x0c\x12\x13\n\x0bpath_lz4len\x18\x04 \x01(\r\"?\n\x04Type\x12\t\n\x05SWEEP\x10\x00\x12\x07\n\x03MOP\x10\x01\x12\r\n\tSWEEP_MOP\x10\x02\x12\x08\n\x04NAVI\x10\x03\x12\n\n\x06GOHOME\x10\x04\"\x1c\n\x05State\x12\n\n\x06\x46OLLOW\x10\x00\x12\x07\n\x03NEW\x10\x01\x62\x06proto3') - -_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'proto.cloud.p2pdata_pb2', globals()) -if _descriptor._USE_C_DESCRIPTORS == False: - - DESCRIPTOR._options = None - _MAPCHANNELMSG._serialized_start=99 - _MAPCHANNELMSG._serialized_end=304 - _MAPCHANNELMSG_MSGTYPE._serialized_start=246 - _MAPCHANNELMSG_MSGTYPE._serialized_end=293 - _MAPPIXELS._serialized_start=306 - _MAPPIXELS._serialized_end=353 - _MAPINFO._serialized_start=356 - _MAPINFO._serialized_end=1110 - _MAPINFO_MAPMSGTYPE._serialized_start=956 - _MAPINFO_MAPMSGTYPE._serialized_end=1100 - _COMPLETEMAP._serialized_start=1113 - _COMPLETEMAP._serialized_end=1641 - _COMPLETEPATH._serialized_start=1644 - _COMPLETEPATH._serialized_end=1788 - _COMPLETEPATH_TYPE._serialized_start=1695 - _COMPLETEPATH_TYPE._serialized_end=1758 - _COMPLETEPATH_STATE._serialized_start=1760 - _COMPLETEPATH_STATE._serialized_end=1788 -# @@protoc_insertion_point(module_scope) diff --git a/proto-reference/p2pdata_pb2.pyi b/proto-reference/p2pdata_pb2.pyi deleted file mode 100644 index 12ea3e7..0000000 --- a/proto-reference/p2pdata_pb2.pyi +++ /dev/null @@ -1,135 +0,0 @@ -from typing import ClassVar as _ClassVar -from typing import Iterable as _Iterable -from typing import Mapping as _Mapping -from typing import Optional as _Optional -from typing import Union as _Union - -from google.protobuf import descriptor as _descriptor -from google.protobuf import message as _message -from google.protobuf.internal import containers as _containers -from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper - -from ...proto.cloud import common_pb2 as _common_pb2 -from ...proto.cloud import stream_pb2 as _stream_pb2 - -DESCRIPTOR: _descriptor.FileDescriptor - -class CompleteMap(_message.Message): - __slots__ = ["docks", "is_new_map", "map", "map_height", "map_id", "map_stable", "map_width", "name", "obstacles", "origin", "releases", "restricted_zones", "room_outline", "room_params", "temporary_data"] - DOCKS_FIELD_NUMBER: _ClassVar[int] - IS_NEW_MAP_FIELD_NUMBER: _ClassVar[int] - MAP_FIELD_NUMBER: _ClassVar[int] - MAP_HEIGHT_FIELD_NUMBER: _ClassVar[int] - MAP_ID_FIELD_NUMBER: _ClassVar[int] - MAP_STABLE_FIELD_NUMBER: _ClassVar[int] - MAP_WIDTH_FIELD_NUMBER: _ClassVar[int] - NAME_FIELD_NUMBER: _ClassVar[int] - OBSTACLES_FIELD_NUMBER: _ClassVar[int] - ORIGIN_FIELD_NUMBER: _ClassVar[int] - RELEASES_FIELD_NUMBER: _ClassVar[int] - RESTRICTED_ZONES_FIELD_NUMBER: _ClassVar[int] - ROOM_OUTLINE_FIELD_NUMBER: _ClassVar[int] - ROOM_PARAMS_FIELD_NUMBER: _ClassVar[int] - TEMPORARY_DATA_FIELD_NUMBER: _ClassVar[int] - docks: _containers.RepeatedCompositeFieldContainer[_common_pb2.Pose] - is_new_map: int - map: MapPixels - map_height: int - map_id: int - map_stable: bool - map_width: int - name: str - obstacles: _stream_pb2.ObstacleInfo - origin: _common_pb2.Point - releases: int - restricted_zones: _stream_pb2.RestrictedZone - room_outline: MapPixels - room_params: _stream_pb2.RoomParams - temporary_data: _stream_pb2.TemporaryData - def __init__(self, releases: _Optional[int] = ..., map_id: _Optional[int] = ..., map_stable: bool = ..., map_width: _Optional[int] = ..., map_height: _Optional[int] = ..., origin: _Optional[_Union[_common_pb2.Point, _Mapping]] = ..., docks: _Optional[_Iterable[_Union[_common_pb2.Pose, _Mapping]]] = ..., map: _Optional[_Union[MapPixels, _Mapping]] = ..., room_outline: _Optional[_Union[MapPixels, _Mapping]] = ..., obstacles: _Optional[_Union[_stream_pb2.ObstacleInfo, _Mapping]] = ..., restricted_zones: _Optional[_Union[_stream_pb2.RestrictedZone, _Mapping]] = ..., room_params: _Optional[_Union[_stream_pb2.RoomParams, _Mapping]] = ..., temporary_data: _Optional[_Union[_stream_pb2.TemporaryData, _Mapping]] = ..., is_new_map: _Optional[int] = ..., name: _Optional[str] = ...) -> None: ... - -class CompletePath(_message.Message): - __slots__ = ["path", "path_lz4len"] - class State(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - class Type(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - FOLLOW: CompletePath.State - GOHOME: CompletePath.Type - MOP: CompletePath.Type - NAVI: CompletePath.Type - NEW: CompletePath.State - PATH_FIELD_NUMBER: _ClassVar[int] - PATH_LZ4LEN_FIELD_NUMBER: _ClassVar[int] - SWEEP: CompletePath.Type - SWEEP_MOP: CompletePath.Type - path: bytes - path_lz4len: int - def __init__(self, path: _Optional[bytes] = ..., path_lz4len: _Optional[int] = ...) -> None: ... - -class MapChannelMsg(_message.Message): - __slots__ = ["map_info", "multi_map_response", "type"] - class MsgType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - MAP_INFO: MapChannelMsg.MsgType - MAP_INFO_FIELD_NUMBER: _ClassVar[int] - MULTI_MAP_RESPONSE: MapChannelMsg.MsgType - MULTI_MAP_RESPONSE_FIELD_NUMBER: _ClassVar[int] - TYPE_FIELD_NUMBER: _ClassVar[int] - map_info: MapInfo - multi_map_response: bytes - type: MapChannelMsg.MsgType - def __init__(self, type: _Optional[_Union[MapChannelMsg.MsgType, str]] = ..., map_info: _Optional[_Union[MapInfo, _Mapping]] = ..., multi_map_response: _Optional[bytes] = ...) -> None: ... - -class MapInfo(_message.Message): - __slots__ = ["cruise_data", "docks", "is_new_map", "map_height", "map_id", "map_stable", "map_width", "msg_type", "name", "obstacles", "origin", "pixels", "releases", "restricted_zones", "room_params", "temporary_data"] - class MapMsgType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - CRUISE_DATA: MapInfo.MapMsgType - CRUISE_DATA_FIELD_NUMBER: _ClassVar[int] - DOCKS_FIELD_NUMBER: _ClassVar[int] - IS_NEW_MAP_FIELD_NUMBER: _ClassVar[int] - MAP_HEIGHT_FIELD_NUMBER: _ClassVar[int] - MAP_ID_FIELD_NUMBER: _ClassVar[int] - MAP_REALTIME: MapInfo.MapMsgType - MAP_ROOMOUTLINE: MapInfo.MapMsgType - MAP_STABLE_FIELD_NUMBER: _ClassVar[int] - MAP_WIDTH_FIELD_NUMBER: _ClassVar[int] - MSG_TYPE_FIELD_NUMBER: _ClassVar[int] - NAME_FIELD_NUMBER: _ClassVar[int] - OBSTACLES_FIELD_NUMBER: _ClassVar[int] - OBSTACLE_INFO: MapInfo.MapMsgType - ORIGIN_FIELD_NUMBER: _ClassVar[int] - PIXELS_FIELD_NUMBER: _ClassVar[int] - RELEASES_FIELD_NUMBER: _ClassVar[int] - RESTRICTED_ZONES_FIELD_NUMBER: _ClassVar[int] - RESTRICT_ZONES: MapInfo.MapMsgType - ROOM_PARAMS: MapInfo.MapMsgType - ROOM_PARAMS_FIELD_NUMBER: _ClassVar[int] - TEMPORARY_DATA: MapInfo.MapMsgType - TEMPORARY_DATA_FIELD_NUMBER: _ClassVar[int] - cruise_data: _stream_pb2.CruiseData - docks: _containers.RepeatedCompositeFieldContainer[_common_pb2.Pose] - is_new_map: int - map_height: int - map_id: int - map_stable: bool - map_width: int - msg_type: MapInfo.MapMsgType - name: str - obstacles: _stream_pb2.ObstacleInfo - origin: _common_pb2.Point - pixels: MapPixels - releases: int - restricted_zones: _stream_pb2.RestrictedZone - room_params: _stream_pb2.RoomParams - temporary_data: _stream_pb2.TemporaryData - def __init__(self, releases: _Optional[int] = ..., map_id: _Optional[int] = ..., map_stable: bool = ..., map_width: _Optional[int] = ..., map_height: _Optional[int] = ..., origin: _Optional[_Union[_common_pb2.Point, _Mapping]] = ..., docks: _Optional[_Iterable[_Union[_common_pb2.Pose, _Mapping]]] = ..., msg_type: _Optional[_Union[MapInfo.MapMsgType, str]] = ..., pixels: _Optional[_Union[MapPixels, _Mapping]] = ..., obstacles: _Optional[_Union[_stream_pb2.ObstacleInfo, _Mapping]] = ..., restricted_zones: _Optional[_Union[_stream_pb2.RestrictedZone, _Mapping]] = ..., room_params: _Optional[_Union[_stream_pb2.RoomParams, _Mapping]] = ..., cruise_data: _Optional[_Union[_stream_pb2.CruiseData, _Mapping]] = ..., temporary_data: _Optional[_Union[_stream_pb2.TemporaryData, _Mapping]] = ..., is_new_map: _Optional[int] = ..., name: _Optional[str] = ...) -> None: ... - -class MapPixels(_message.Message): - __slots__ = ["pixel_size", "pixels"] - PIXELS_FIELD_NUMBER: _ClassVar[int] - PIXEL_SIZE_FIELD_NUMBER: _ClassVar[int] - pixel_size: int - pixels: bytes - def __init__(self, pixels: _Optional[bytes] = ..., pixel_size: _Optional[int] = ...) -> None: ... diff --git a/proto-reference/scene.proto b/proto-reference/scene.proto deleted file mode 100644 index ace519c..0000000 --- a/proto-reference/scene.proto +++ /dev/null @@ -1,145 +0,0 @@ -syntax = "proto3"; - -// option optimize_for = LITE_RUNTIME; - -package proto.cloud; - -import "proto/cloud/common.proto"; -import "proto/cloud/clean_param.proto"; -import "proto/cloud/timing.proto"; - -message SceneTask { - uint32 index = 1; // 顺序,从1开始 [EN: Order, starting from 1] - - enum Type { - CURRENT_ROOM = 0; - ALL_ROOMS = 1; - } - Type type = 2; - - enum CleanMode { - GENERAL = 0; // 通用模式 [EN: General mode] - SMART = 1; // 智能省心模式 [EN: Smart hassle-free mode] - } - - // 通用参数 [EN: General parameters] - message General { - CleanType clean_type = 1; - uint32 clean_times = 2; // 清扫次数,非 0 有效 [EN: Cleaning times, non-zero is valid] - Fan fan = 3; - MopMode mop_mode = 4; - CleanExtent clean_extent = 5; - } - - message CurrentRoom { - message Unit { - General general = 1; // 通用模式会有这项 [EN: This is present in general mode] - - message RoomClean { - uint32 room_id = 1; - RoomScene room_scene = 2; - } - message ZoneClean { - Quadrangle quadrangle = 1; - } - - oneof Param { - RoomClean room_clean = 2; - ZoneClean zone_clean = 3; - } - } - CleanMode mode = 1; - repeated Unit units = 2; - } - - message AllRooms { - CleanMode mode = 1; - General general = 2; // 通用模式会有这项 [EN: This is present in general mode] - } - - oneof Task { - CurrentRoom current_room = 3; - AllRooms all_rooms = 4; - } -} - -message SceneInfo { - // 手机 app 新建定时不需要该字段,设备返回 id [EN: Mobile app doesn't need this field when creating new schedule, device returns id] - // 手机 app 其他操作需要该字段 [EN: Mobile app needs this field for other operations] - message Id { - uint32 value = 1; - } - Id id = 1; - - bool valid = 2; - enum InvalidReason { - NORMAL = 0; // 正常(非失效状态) [EN: Normal (not invalid state)] - MAP_NOT_EXIST = 1; // 地图不存在 [EN: Map does not exist] - MAP_NOT_AVAILABLE = 2; // 地图不可用(地图不完整) [EN: Map not available (map incomplete)] - MAP_NOT_MATCH = 3; // 地图不适配(缺少指定区域) [EN: Map not matching (missing specified area)] - OTHER = 4; // 其他未分类的失效原因 [EN: Other uncategorized invalid reasons] - DEFAULT = 5; // 后续使用 type 字段,不再使用这个值表示默认场景 [EN: Subsequently use type field, no longer use this value to represent default scene] - } - InvalidReason invalid_reason = 3; - - string name = 4; - uint32 mapid = 5; // 关联的地图id(无效:-2) [EN: Associated map ID (invalid: -2)] - - // 场景执行时的动态时间数据放 WorkStatus 中 [EN: Dynamic time data during scene execution is placed in WorkStatus] - uint32 estimate_time = 6; // 执行前预估完成时间(无效:0) [EN: Estimated completion time before execution (invalid: 0)] - uint32 index = 7; // 顺序,从1开始 [EN: Order, starting from 1] - - enum Type { - SCENE_NORMAL = 0; // 普通场景 [EN: Normal scene] - WHOLE_HOUSE_DAILY_CLEANING = 1; // 全屋日常清洁(默认) [EN: Whole house daily cleaning (default)] - WHOLE_HOUSE_DEEP_CLEANING = 2; // 全屋深度清洁(默认) [EN: Whole house deep cleaning (default)] - AFTER_DINNER_CLEANING = 3; // 饭后清洁(默认) [EN: After dinner cleaning (default)] - PET_AREA_CLEANING = 4; // 宠物区域清洁(默认) [EN: Pet area cleaning (default)] - } - Type type = 8; -} - -message SceneRequest { - enum Method { - DEFAULT = 0; - ADD_SCENE = 1; // 添加场景(可选设置定时、是否指定地图) [EN: Add scene (optional: set schedule, specify map)] - DELETE_SCENE = 2; // 删除场景,使用 message common [EN: Delete scene, use message common] - MODIFY_SCENE = 3; // 修改场景(可选设置定时、是否指定地图) [EN: Modify scene (optional: set schedule, specify map)] - } - - Method method = 1; - uint32 seq = 2; - - message Common { - uint32 scene_id = 1; - } - - message Scene { - SceneInfo info = 1; - repeated SceneTask tasks = 2; - TimerInfo.Desc desc = 3; - } - - oneof Param { - Common common = 3; - Scene scene = 4; - } -} - -// 通过 dp 传基础信息 [EN: Basic information transmitted via dp] -message SceneResponse { - SceneRequest.Method method = 1; // 开机/失效上报 DEFAULT,其他情况跟下发相同 [EN: Report DEFAULT on boot/invalid, otherwise same as sent] - uint32 seq = 2; - - message Result { - enum Value { - SUCCESS = 0; - FAILED = 1; - } - Value value = 1; - - uint32 err_code = 2; - } - Result result = 3; - repeated SceneInfo infos = 4; -} diff --git a/proto-reference/scene_pb2.py b/proto-reference/scene_pb2.py deleted file mode 100644 index cc918de..0000000 --- a/proto-reference/scene_pb2.py +++ /dev/null @@ -1,67 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: proto/cloud/scene.proto -"""Generated protocol buffer code.""" -from google.protobuf import descriptor as _descriptor -from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import symbol_database as _symbol_database -from google.protobuf.internal import builder as _builder - -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - -from ...proto.cloud import \ - clean_param_pb2 as proto_dot_cloud_dot_clean__param__pb2 -from ...proto.cloud import common_pb2 as proto_dot_cloud_dot_common__pb2 -from ...proto.cloud import timing_pb2 as proto_dot_cloud_dot_timing__pb2 - -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x17proto/cloud/scene.proto\x12\x0bproto.cloud\x1a\x18proto/cloud/common.proto\x1a\x1dproto/cloud/clean_param.proto\x1a\x18proto/cloud/timing.proto\"\x8f\x08\n\tSceneTask\x12\r\n\x05index\x18\x01 \x01(\r\x12)\n\x04type\x18\x02 \x01(\x0e\x32\x1b.proto.cloud.SceneTask.Type\x12:\n\x0c\x63urrent_room\x18\x03 \x01(\x0b\x32\".proto.cloud.SceneTask.CurrentRoomH\x00\x12\x34\n\tall_rooms\x18\x04 \x01(\x0b\x32\x1f.proto.cloud.SceneTask.AllRoomsH\x00\x1a\xc1\x01\n\x07General\x12*\n\nclean_type\x18\x01 \x01(\x0b\x32\x16.proto.cloud.CleanType\x12\x13\n\x0b\x63lean_times\x18\x02 \x01(\r\x12\x1d\n\x03\x66\x61n\x18\x03 \x01(\x0b\x32\x10.proto.cloud.Fan\x12&\n\x08mop_mode\x18\x04 \x01(\x0b\x32\x14.proto.cloud.MopMode\x12.\n\x0c\x63lean_extent\x18\x05 \x01(\x0b\x32\x18.proto.cloud.CleanExtent\x1a\xce\x03\n\x0b\x43urrentRoom\x12.\n\x04mode\x18\x01 \x01(\x0e\x32 .proto.cloud.SceneTask.CleanMode\x12\x36\n\x05units\x18\x02 \x03(\x0b\x32\'.proto.cloud.SceneTask.CurrentRoom.Unit\x1a\xd6\x02\n\x04Unit\x12/\n\x07general\x18\x01 \x01(\x0b\x32\x1e.proto.cloud.SceneTask.General\x12G\n\nroom_clean\x18\x02 \x01(\x0b\x32\x31.proto.cloud.SceneTask.CurrentRoom.Unit.RoomCleanH\x00\x12G\n\nzone_clean\x18\x03 \x01(\x0b\x32\x31.proto.cloud.SceneTask.CurrentRoom.Unit.ZoneCleanH\x00\x1aH\n\tRoomClean\x12\x0f\n\x07room_id\x18\x01 \x01(\r\x12*\n\nroom_scene\x18\x02 \x01(\x0b\x32\x16.proto.cloud.RoomScene\x1a\x38\n\tZoneClean\x12+\n\nquadrangle\x18\x01 \x01(\x0b\x32\x17.proto.cloud.QuadrangleB\x07\n\x05Param\x1ak\n\x08\x41llRooms\x12.\n\x04mode\x18\x01 \x01(\x0e\x32 .proto.cloud.SceneTask.CleanMode\x12/\n\x07general\x18\x02 \x01(\x0b\x32\x1e.proto.cloud.SceneTask.General\"\'\n\x04Type\x12\x10\n\x0c\x43URRENT_ROOM\x10\x00\x12\r\n\tALL_ROOMS\x10\x01\"#\n\tCleanMode\x12\x0b\n\x07GENERAL\x10\x00\x12\t\n\x05SMART\x10\x01\x42\x06\n\x04Task\"\x80\x04\n\tSceneInfo\x12%\n\x02id\x18\x01 \x01(\x0b\x32\x19.proto.cloud.SceneInfo.Id\x12\r\n\x05valid\x18\x02 \x01(\x08\x12<\n\x0einvalid_reason\x18\x03 \x01(\x0e\x32$.proto.cloud.SceneInfo.InvalidReason\x12\x0c\n\x04name\x18\x04 \x01(\t\x12\r\n\x05mapid\x18\x05 \x01(\r\x12\x15\n\restimate_time\x18\x06 \x01(\r\x12\r\n\x05index\x18\x07 \x01(\r\x12)\n\x04type\x18\x08 \x01(\x0e\x32\x1b.proto.cloud.SceneInfo.Type\x1a\x13\n\x02Id\x12\r\n\x05value\x18\x01 \x01(\r\"p\n\rInvalidReason\x12\n\n\x06NORMAL\x10\x00\x12\x11\n\rMAP_NOT_EXIST\x10\x01\x12\x15\n\x11MAP_NOT_AVAILABLE\x10\x02\x12\x11\n\rMAP_NOT_MATCH\x10\x03\x12\t\n\x05OTHER\x10\x04\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10\x05\"\x89\x01\n\x04Type\x12\x10\n\x0cSCENE_NORMAL\x10\x00\x12\x1e\n\x1aWHOLE_HOUSE_DAILY_CLEANING\x10\x01\x12\x1d\n\x19WHOLE_HOUSE_DEEP_CLEANING\x10\x02\x12\x19\n\x15\x41\x46TER_DINNER_CLEANING\x10\x03\x12\x15\n\x11PET_AREA_CLEANING\x10\x04\"\xa3\x03\n\x0cSceneRequest\x12\x30\n\x06method\x18\x01 \x01(\x0e\x32 .proto.cloud.SceneRequest.Method\x12\x0b\n\x03seq\x18\x02 \x01(\r\x12\x32\n\x06\x63ommon\x18\x03 \x01(\x0b\x32 .proto.cloud.SceneRequest.CommonH\x00\x12\x30\n\x05scene\x18\x04 \x01(\x0b\x32\x1f.proto.cloud.SceneRequest.SceneH\x00\x1a\x1a\n\x06\x43ommon\x12\x10\n\x08scene_id\x18\x01 \x01(\r\x1a\x7f\n\x05Scene\x12$\n\x04info\x18\x01 \x01(\x0b\x32\x16.proto.cloud.SceneInfo\x12%\n\x05tasks\x18\x02 \x03(\x0b\x32\x16.proto.cloud.SceneTask\x12)\n\x04\x64\x65sc\x18\x03 \x01(\x0b\x32\x1b.proto.cloud.TimerInfo.Desc\"H\n\x06Method\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10\x00\x12\r\n\tADD_SCENE\x10\x01\x12\x10\n\x0c\x44\x45LETE_SCENE\x10\x02\x12\x10\n\x0cMODIFY_SCENE\x10\x03\x42\x07\n\x05Param\"\x9e\x02\n\rSceneResponse\x12\x30\n\x06method\x18\x01 \x01(\x0e\x32 .proto.cloud.SceneRequest.Method\x12\x0b\n\x03seq\x18\x02 \x01(\r\x12\x31\n\x06result\x18\x03 \x01(\x0b\x32!.proto.cloud.SceneResponse.Result\x12%\n\x05infos\x18\x04 \x03(\x0b\x32\x16.proto.cloud.SceneInfo\x1at\n\x06Result\x12\x36\n\x05value\x18\x01 \x01(\x0e\x32\'.proto.cloud.SceneResponse.Result.Value\x12\x10\n\x08\x65rr_code\x18\x02 \x01(\r\" \n\x05Value\x12\x0b\n\x07SUCCESS\x10\x00\x12\n\n\x06\x46\x41ILED\x10\x01\x62\x06proto3') - -_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'proto.cloud.scene_pb2', globals()) -if _descriptor._USE_C_DESCRIPTORS == False: - - DESCRIPTOR._options = None - _SCENETASK._serialized_start=124 - _SCENETASK._serialized_end=1163 - _SCENETASK_GENERAL._serialized_start=310 - _SCENETASK_GENERAL._serialized_end=503 - _SCENETASK_CURRENTROOM._serialized_start=506 - _SCENETASK_CURRENTROOM._serialized_end=968 - _SCENETASK_CURRENTROOM_UNIT._serialized_start=626 - _SCENETASK_CURRENTROOM_UNIT._serialized_end=968 - _SCENETASK_CURRENTROOM_UNIT_ROOMCLEAN._serialized_start=829 - _SCENETASK_CURRENTROOM_UNIT_ROOMCLEAN._serialized_end=901 - _SCENETASK_CURRENTROOM_UNIT_ZONECLEAN._serialized_start=903 - _SCENETASK_CURRENTROOM_UNIT_ZONECLEAN._serialized_end=959 - _SCENETASK_ALLROOMS._serialized_start=970 - _SCENETASK_ALLROOMS._serialized_end=1077 - _SCENETASK_TYPE._serialized_start=1079 - _SCENETASK_TYPE._serialized_end=1118 - _SCENETASK_CLEANMODE._serialized_start=1120 - _SCENETASK_CLEANMODE._serialized_end=1155 - _SCENEINFO._serialized_start=1166 - _SCENEINFO._serialized_end=1678 - _SCENEINFO_ID._serialized_start=1405 - _SCENEINFO_ID._serialized_end=1424 - _SCENEINFO_INVALIDREASON._serialized_start=1426 - _SCENEINFO_INVALIDREASON._serialized_end=1538 - _SCENEINFO_TYPE._serialized_start=1541 - _SCENEINFO_TYPE._serialized_end=1678 - _SCENEREQUEST._serialized_start=1681 - _SCENEREQUEST._serialized_end=2100 - _SCENEREQUEST_COMMON._serialized_start=1862 - _SCENEREQUEST_COMMON._serialized_end=1888 - _SCENEREQUEST_SCENE._serialized_start=1890 - _SCENEREQUEST_SCENE._serialized_end=2017 - _SCENEREQUEST_METHOD._serialized_start=2019 - _SCENEREQUEST_METHOD._serialized_end=2091 - _SCENERESPONSE._serialized_start=2103 - _SCENERESPONSE._serialized_end=2389 - _SCENERESPONSE_RESULT._serialized_start=2273 - _SCENERESPONSE_RESULT._serialized_end=2389 - _SCENERESPONSE_RESULT_VALUE._serialized_start=2357 - _SCENERESPONSE_RESULT_VALUE._serialized_end=2389 -# @@protoc_insertion_point(module_scope) diff --git a/proto-reference/scene_pb2.pyi b/proto-reference/scene_pb2.pyi deleted file mode 100644 index 142f297..0000000 --- a/proto-reference/scene_pb2.pyi +++ /dev/null @@ -1,179 +0,0 @@ -from typing import ClassVar as _ClassVar -from typing import Iterable as _Iterable -from typing import Mapping as _Mapping -from typing import Optional as _Optional -from typing import Union as _Union - -from google.protobuf import descriptor as _descriptor -from google.protobuf import message as _message -from google.protobuf.internal import containers as _containers -from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper - -from ...proto.cloud import clean_param_pb2 as _clean_param_pb2 -from ...proto.cloud import common_pb2 as _common_pb2 -from ...proto.cloud import timing_pb2 as _timing_pb2 - -DESCRIPTOR: _descriptor.FileDescriptor - -class SceneInfo(_message.Message): - __slots__ = ["estimate_time", "id", "index", "invalid_reason", "mapid", "name", "type", "valid"] - class InvalidReason(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - class Type(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - class Id(_message.Message): - __slots__ = ["value"] - VALUE_FIELD_NUMBER: _ClassVar[int] - value: int - def __init__(self, value: _Optional[int] = ...) -> None: ... - AFTER_DINNER_CLEANING: SceneInfo.Type - DEFAULT: SceneInfo.InvalidReason - ESTIMATE_TIME_FIELD_NUMBER: _ClassVar[int] - ID_FIELD_NUMBER: _ClassVar[int] - INDEX_FIELD_NUMBER: _ClassVar[int] - INVALID_REASON_FIELD_NUMBER: _ClassVar[int] - MAPID_FIELD_NUMBER: _ClassVar[int] - MAP_NOT_AVAILABLE: SceneInfo.InvalidReason - MAP_NOT_EXIST: SceneInfo.InvalidReason - MAP_NOT_MATCH: SceneInfo.InvalidReason - NAME_FIELD_NUMBER: _ClassVar[int] - NORMAL: SceneInfo.InvalidReason - OTHER: SceneInfo.InvalidReason - PET_AREA_CLEANING: SceneInfo.Type - SCENE_NORMAL: SceneInfo.Type - TYPE_FIELD_NUMBER: _ClassVar[int] - VALID_FIELD_NUMBER: _ClassVar[int] - WHOLE_HOUSE_DAILY_CLEANING: SceneInfo.Type - WHOLE_HOUSE_DEEP_CLEANING: SceneInfo.Type - estimate_time: int - id: SceneInfo.Id - index: int - invalid_reason: SceneInfo.InvalidReason - mapid: int - name: str - type: SceneInfo.Type - valid: bool - def __init__(self, id: _Optional[_Union[SceneInfo.Id, _Mapping]] = ..., valid: bool = ..., invalid_reason: _Optional[_Union[SceneInfo.InvalidReason, str]] = ..., name: _Optional[str] = ..., mapid: _Optional[int] = ..., estimate_time: _Optional[int] = ..., index: _Optional[int] = ..., type: _Optional[_Union[SceneInfo.Type, str]] = ...) -> None: ... - -class SceneRequest(_message.Message): - __slots__ = ["common", "method", "scene", "seq"] - class Method(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - class Common(_message.Message): - __slots__ = ["scene_id"] - SCENE_ID_FIELD_NUMBER: _ClassVar[int] - scene_id: int - def __init__(self, scene_id: _Optional[int] = ...) -> None: ... - class Scene(_message.Message): - __slots__ = ["desc", "info", "tasks"] - DESC_FIELD_NUMBER: _ClassVar[int] - INFO_FIELD_NUMBER: _ClassVar[int] - TASKS_FIELD_NUMBER: _ClassVar[int] - desc: _timing_pb2.TimerInfo.Desc - info: SceneInfo - tasks: _containers.RepeatedCompositeFieldContainer[SceneTask] - def __init__(self, info: _Optional[_Union[SceneInfo, _Mapping]] = ..., tasks: _Optional[_Iterable[_Union[SceneTask, _Mapping]]] = ..., desc: _Optional[_Union[_timing_pb2.TimerInfo.Desc, _Mapping]] = ...) -> None: ... - ADD_SCENE: SceneRequest.Method - COMMON_FIELD_NUMBER: _ClassVar[int] - DEFAULT: SceneRequest.Method - DELETE_SCENE: SceneRequest.Method - METHOD_FIELD_NUMBER: _ClassVar[int] - MODIFY_SCENE: SceneRequest.Method - SCENE_FIELD_NUMBER: _ClassVar[int] - SEQ_FIELD_NUMBER: _ClassVar[int] - common: SceneRequest.Common - method: SceneRequest.Method - scene: SceneRequest.Scene - seq: int - def __init__(self, method: _Optional[_Union[SceneRequest.Method, str]] = ..., seq: _Optional[int] = ..., common: _Optional[_Union[SceneRequest.Common, _Mapping]] = ..., scene: _Optional[_Union[SceneRequest.Scene, _Mapping]] = ...) -> None: ... - -class SceneResponse(_message.Message): - __slots__ = ["infos", "method", "result", "seq"] - class Result(_message.Message): - __slots__ = ["err_code", "value"] - class Value(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - ERR_CODE_FIELD_NUMBER: _ClassVar[int] - FAILED: SceneResponse.Result.Value - SUCCESS: SceneResponse.Result.Value - VALUE_FIELD_NUMBER: _ClassVar[int] - err_code: int - value: SceneResponse.Result.Value - def __init__(self, value: _Optional[_Union[SceneResponse.Result.Value, str]] = ..., err_code: _Optional[int] = ...) -> None: ... - INFOS_FIELD_NUMBER: _ClassVar[int] - METHOD_FIELD_NUMBER: _ClassVar[int] - RESULT_FIELD_NUMBER: _ClassVar[int] - SEQ_FIELD_NUMBER: _ClassVar[int] - infos: _containers.RepeatedCompositeFieldContainer[SceneInfo] - method: SceneRequest.Method - result: SceneResponse.Result - seq: int - def __init__(self, method: _Optional[_Union[SceneRequest.Method, str]] = ..., seq: _Optional[int] = ..., result: _Optional[_Union[SceneResponse.Result, _Mapping]] = ..., infos: _Optional[_Iterable[_Union[SceneInfo, _Mapping]]] = ...) -> None: ... - -class SceneTask(_message.Message): - __slots__ = ["all_rooms", "current_room", "index", "type"] - class CleanMode(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - class Type(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - class AllRooms(_message.Message): - __slots__ = ["general", "mode"] - GENERAL_FIELD_NUMBER: _ClassVar[int] - MODE_FIELD_NUMBER: _ClassVar[int] - general: SceneTask.General - mode: SceneTask.CleanMode - def __init__(self, mode: _Optional[_Union[SceneTask.CleanMode, str]] = ..., general: _Optional[_Union[SceneTask.General, _Mapping]] = ...) -> None: ... - class CurrentRoom(_message.Message): - __slots__ = ["mode", "units"] - class Unit(_message.Message): - __slots__ = ["general", "room_clean", "zone_clean"] - class RoomClean(_message.Message): - __slots__ = ["room_id", "room_scene"] - ROOM_ID_FIELD_NUMBER: _ClassVar[int] - ROOM_SCENE_FIELD_NUMBER: _ClassVar[int] - room_id: int - room_scene: _common_pb2.RoomScene - def __init__(self, room_id: _Optional[int] = ..., room_scene: _Optional[_Union[_common_pb2.RoomScene, _Mapping]] = ...) -> None: ... - class ZoneClean(_message.Message): - __slots__ = ["quadrangle"] - QUADRANGLE_FIELD_NUMBER: _ClassVar[int] - quadrangle: _common_pb2.Quadrangle - def __init__(self, quadrangle: _Optional[_Union[_common_pb2.Quadrangle, _Mapping]] = ...) -> None: ... - GENERAL_FIELD_NUMBER: _ClassVar[int] - ROOM_CLEAN_FIELD_NUMBER: _ClassVar[int] - ZONE_CLEAN_FIELD_NUMBER: _ClassVar[int] - general: SceneTask.General - room_clean: SceneTask.CurrentRoom.Unit.RoomClean - zone_clean: SceneTask.CurrentRoom.Unit.ZoneClean - def __init__(self, general: _Optional[_Union[SceneTask.General, _Mapping]] = ..., room_clean: _Optional[_Union[SceneTask.CurrentRoom.Unit.RoomClean, _Mapping]] = ..., zone_clean: _Optional[_Union[SceneTask.CurrentRoom.Unit.ZoneClean, _Mapping]] = ...) -> None: ... - MODE_FIELD_NUMBER: _ClassVar[int] - UNITS_FIELD_NUMBER: _ClassVar[int] - mode: SceneTask.CleanMode - units: _containers.RepeatedCompositeFieldContainer[SceneTask.CurrentRoom.Unit] - def __init__(self, mode: _Optional[_Union[SceneTask.CleanMode, str]] = ..., units: _Optional[_Iterable[_Union[SceneTask.CurrentRoom.Unit, _Mapping]]] = ...) -> None: ... - class General(_message.Message): - __slots__ = ["clean_extent", "clean_times", "clean_type", "fan", "mop_mode"] - CLEAN_EXTENT_FIELD_NUMBER: _ClassVar[int] - CLEAN_TIMES_FIELD_NUMBER: _ClassVar[int] - CLEAN_TYPE_FIELD_NUMBER: _ClassVar[int] - FAN_FIELD_NUMBER: _ClassVar[int] - MOP_MODE_FIELD_NUMBER: _ClassVar[int] - clean_extent: _clean_param_pb2.CleanExtent - clean_times: int - clean_type: _clean_param_pb2.CleanType - fan: _clean_param_pb2.Fan - mop_mode: _clean_param_pb2.MopMode - def __init__(self, clean_type: _Optional[_Union[_clean_param_pb2.CleanType, _Mapping]] = ..., clean_times: _Optional[int] = ..., fan: _Optional[_Union[_clean_param_pb2.Fan, _Mapping]] = ..., mop_mode: _Optional[_Union[_clean_param_pb2.MopMode, _Mapping]] = ..., clean_extent: _Optional[_Union[_clean_param_pb2.CleanExtent, _Mapping]] = ...) -> None: ... - ALL_ROOMS: SceneTask.Type - ALL_ROOMS_FIELD_NUMBER: _ClassVar[int] - CURRENT_ROOM: SceneTask.Type - CURRENT_ROOM_FIELD_NUMBER: _ClassVar[int] - GENERAL: SceneTask.CleanMode - INDEX_FIELD_NUMBER: _ClassVar[int] - SMART: SceneTask.CleanMode - TYPE_FIELD_NUMBER: _ClassVar[int] - all_rooms: SceneTask.AllRooms - current_room: SceneTask.CurrentRoom - index: int - type: SceneTask.Type - def __init__(self, index: _Optional[int] = ..., type: _Optional[_Union[SceneTask.Type, str]] = ..., current_room: _Optional[_Union[SceneTask.CurrentRoom, _Mapping]] = ..., all_rooms: _Optional[_Union[SceneTask.AllRooms, _Mapping]] = ...) -> None: ... diff --git a/proto-reference/socket.proto b/proto-reference/socket.proto deleted file mode 100644 index 87dd806..0000000 --- a/proto-reference/socket.proto +++ /dev/null @@ -1,41 +0,0 @@ -/** - * tcp 服务和 udp 广播协议,通过 socket 进行通信; [EN: TCP service and UDP broadcast protocol, communicates via socket;] - */ -syntax = "proto3"; -// option optimize_for = LITE_RUNTIME; - -package proto.cloud; - -import "proto/cloud/ble.proto"; - -// ==机器人定时向外广播== [EN: ==Robot periodically broadcasts outward==] -message SocketBroadcast { - bool is_bind = 1; // 是否绑定 [EN: Whether bound] - string device_sn = 2; // 设备序列号 [EN: Device serial number] - string user_id = 3; // 用户id(绑定后才有这个字段) [EN: User ID (this field exists only after binding)] -} - -// ==验证消息== [EN: ==Verification message==] -// 1. 客户端(手机 app)连接服务端(机器人) [EN: 1. Client (mobile app) connects to server (robot)] -// 2. 服务端(机器人)向客户端(手机 app)发送 12 位随机数 [EN: 2. Server (robot) sends 12-digit random number to client (mobile app)] -// 3. 客户端(手机 app)向服务端(机器人)发送验证消息 [EN: 3. Client (mobile app) sends verification message to server (robot)] -// 4. 服务端(机器人)向客户端(手机 app)发送验证结果(验证失败服务器会关闭 socket 连接) [EN: 4. Server (robot) sends verification result to client (mobile app) (server closes socket connection on verification failure)] - -// 验证消息的 message 定义如下 [EN: Verification message definition is as follows] -message SocketVerify { - string random = 1; // 12 位随机数 [EN: 12-digit random number] - string device_sn = 2; // 设备序列号 [EN: Device serial number] - string user_id = 3; // 用户id(绑定后才验证这个字段) [EN: User ID (this field is verified only after binding)] -} -// 验证结果的 message 返回 BtRobotMsg.ProductInfo 消息(消息体中有成功/失败) [EN: Verification result message returns BtRobotMsg.ProductInfo message (success/failure in message body)] - -// ==手机 app 发送数据== [EN: ==Mobile app sends data==] -message SocketTransData { - enum Type { - E_DISTRIBUTE = 0; // 配网 [EN: Network configuration] - E_DP = 1; // 数据点 [EN: Data point] - } - Type type = 1; - - BtAppMsg.Distribute distribute = 2; -} diff --git a/proto-reference/socket_pb2.py b/proto-reference/socket_pb2.py deleted file mode 100644 index fef05e6..0000000 --- a/proto-reference/socket_pb2.py +++ /dev/null @@ -1,32 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: proto/cloud/socket.proto -"""Generated protocol buffer code.""" -from google.protobuf import descriptor as _descriptor -from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import symbol_database as _symbol_database -from google.protobuf.internal import builder as _builder - -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - -from ...proto.cloud import ble_pb2 as proto_dot_cloud_dot_ble__pb2 - -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x18proto/cloud/socket.proto\x12\x0bproto.cloud\x1a\x15proto/cloud/ble.proto\"F\n\x0fSocketBroadcast\x12\x0f\n\x07is_bind\x18\x01 \x01(\x08\x12\x11\n\tdevice_sn\x18\x02 \x01(\t\x12\x0f\n\x07user_id\x18\x03 \x01(\t\"B\n\x0cSocketVerify\x12\x0e\n\x06random\x18\x01 \x01(\t\x12\x11\n\tdevice_sn\x18\x02 \x01(\t\x12\x0f\n\x07user_id\x18\x03 \x01(\t\"\x9c\x01\n\x0fSocketTransData\x12/\n\x04type\x18\x01 \x01(\x0e\x32!.proto.cloud.SocketTransData.Type\x12\x34\n\ndistribute\x18\x02 \x01(\x0b\x32 .proto.cloud.BtAppMsg.Distribute\"\"\n\x04Type\x12\x10\n\x0c\x45_DISTRIBUTE\x10\x00\x12\x08\n\x04\x45_DP\x10\x01\x62\x06proto3') - -_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'proto.cloud.socket_pb2', globals()) -if _descriptor._USE_C_DESCRIPTORS == False: - - DESCRIPTOR._options = None - _SOCKETBROADCAST._serialized_start=64 - _SOCKETBROADCAST._serialized_end=134 - _SOCKETVERIFY._serialized_start=136 - _SOCKETVERIFY._serialized_end=202 - _SOCKETTRANSDATA._serialized_start=205 - _SOCKETTRANSDATA._serialized_end=361 - _SOCKETTRANSDATA_TYPE._serialized_start=327 - _SOCKETTRANSDATA_TYPE._serialized_end=361 -# @@protoc_insertion_point(module_scope) diff --git a/proto-reference/socket_pb2.pyi b/proto-reference/socket_pb2.pyi deleted file mode 100644 index 73b3a1f..0000000 --- a/proto-reference/socket_pb2.pyi +++ /dev/null @@ -1,44 +0,0 @@ -from typing import ClassVar as _ClassVar -from typing import Mapping as _Mapping -from typing import Optional as _Optional -from typing import Union as _Union - -from google.protobuf import descriptor as _descriptor -from google.protobuf import message as _message -from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper - -from ...proto.cloud import ble_pb2 as _ble_pb2 - -DESCRIPTOR: _descriptor.FileDescriptor - -class SocketBroadcast(_message.Message): - __slots__ = ["device_sn", "is_bind", "user_id"] - DEVICE_SN_FIELD_NUMBER: _ClassVar[int] - IS_BIND_FIELD_NUMBER: _ClassVar[int] - USER_ID_FIELD_NUMBER: _ClassVar[int] - device_sn: str - is_bind: bool - user_id: str - def __init__(self, is_bind: bool = ..., device_sn: _Optional[str] = ..., user_id: _Optional[str] = ...) -> None: ... - -class SocketTransData(_message.Message): - __slots__ = ["distribute", "type"] - class Type(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - DISTRIBUTE_FIELD_NUMBER: _ClassVar[int] - E_DISTRIBUTE: SocketTransData.Type - E_DP: SocketTransData.Type - TYPE_FIELD_NUMBER: _ClassVar[int] - distribute: _ble_pb2.BtAppMsg.Distribute - type: SocketTransData.Type - def __init__(self, type: _Optional[_Union[SocketTransData.Type, str]] = ..., distribute: _Optional[_Union[_ble_pb2.BtAppMsg.Distribute, _Mapping]] = ...) -> None: ... - -class SocketVerify(_message.Message): - __slots__ = ["device_sn", "random", "user_id"] - DEVICE_SN_FIELD_NUMBER: _ClassVar[int] - RANDOM_FIELD_NUMBER: _ClassVar[int] - USER_ID_FIELD_NUMBER: _ClassVar[int] - device_sn: str - random: str - user_id: str - def __init__(self, random: _Optional[str] = ..., device_sn: _Optional[str] = ..., user_id: _Optional[str] = ...) -> None: ... diff --git a/proto-reference/station.proto b/proto-reference/station.proto deleted file mode 100644 index 0aacd8e..0000000 --- a/proto-reference/station.proto +++ /dev/null @@ -1,190 +0,0 @@ -/** - * 基站 Request 和 Response 协议;[EN: Station Request and Response protocol;] - */ -syntax = "proto3"; -// option optimize_for = LITE_RUNTIME; -package proto.cloud; - -import "proto/cloud/common.proto"; - -message Duration { // 时长档位分级 [EN: Duration level grading] - enum Level { - SHORT = 0; - MEDIUM = 1; - LONG = 2; - } - Level level = 1; -} - -message CollectDustCfg { // 集尘配置 [EN: Dust collection configuration] - enum Cfg { - CLOSE = 0; // 关闭 [EN: Close] - ONCE = 1; // 清扫1次就集尘 [EN: Collect dust after 1 cleaning] - TWICE = 2; // 清扫2次才集尘 [EN: Collect dust after 2 cleanings] - } - Cfg cfg = 1; -} - -message CollectDustCfgV2 { // 集尘配置新版协议 [EN: Dust collection configuration new version protocol] - Switch sw = 1; - - message Mode { - enum Value { - BY_TASK = 0; // 按次数 [EN: By task count] - BY_TIME = 1; // 按时间 [EN: By time] - SMART = 2; // 智能托管 [EN: Smart management] - } - Value value = 1; - - uint32 task = 2; // 任务次数 [EN: Task count] - uint32 time = 3; // 清洁时间,单位分钟 [EN: Cleaning time, unit minutes] - } - Mode mode = 2; -} - -message DryCfg { // 烘干配置 [EN: Drying configuration] - enum Cfg { - CLOSE = 0; // 关闭 [EN: Close] - STANDARD = 1; // 标准 [EN: Standard] - QUICK = 2; // 快速 [EN: Quick] - } - Cfg cfg = 1; - Duration duration = 2; -} - -message WashCfg { // 洗拖布配置 [EN: Mop washing configuration] - message BackwashFreq { - enum Mode { - ByPartition = 0; // 按分区 [EN: By partition] - ByTime = 1; // 按时间 [EN: By time] - ByArea = 2; // 按面积 [EN: By area] - } - Mode mode = 1; - // 按档位需要传下面的值(档位表示不同时长或者不同面积) [EN: When by level, need to pass below values (level represents different duration or area)] - Duration duration = 2; - // 按数值需要传下面的值(表示不同时长或者不同面积) [EN: When by value, need to pass below values (represents different duration or area)] - Numerical time_or_area = 3; // 时长单位分钟,面积单位平方米 [EN: Duration unit minutes, area unit square meters] - } - BackwashFreq wash_freq = 1; // 回洗拖布的频率 [EN: Frequency of mop wash return] - Duration wash_duration = 2; // 清洗拖布的时长 [EN: Duration of mop washing] - - // 自动洗拖布开关 [EN: Auto mop washing switch] - enum Cfg { - CLOSE = 0; // 关闭 [EN: Close] - STANDARD = 1; // 标准 [EN: Standard] - } - Cfg cfg = 3; -} - -message CutHairCfg { // 割毛发配置 [EN: Hair cutting configuration] - Switch sw = 1; -} - -message SelfPurifyingCfg { // [废弃] 手动自净(集尘、滚刷清洁组合项) [EN: [Deprecated] Manual self-purifying (dust collection, roller brush cleaning combo)] - enum Type { - STANDARD = 0; // 标准 [EN: Standard] - STRONG = 1; // 强效 [EN: Strong] - ENERGY_SAVING = 2; // 节能 [EN: Energy saving] - CUSTOM = 3; // 自定义 [EN: Custom] - } - Type type = 1; - - message Config { - message Frequency { - enum Mode { - BY_TASK = 0; // 按次数 [EN: By task count] - BY_TIME = 1; // 按时间 [EN: By time] - } - Mode mode = 1; - - uint32 task = 2; // 任务次数 [EN: Task count] - uint32 time = 3; // 清洁时间,单位分钟 [EN: Cleaning time, unit minutes] - } - Frequency frequency = 1; - - message Intensity { - enum Level { - LOW = 0; - MEDIUM = 1; - HIGH = 2; - } - Level level = 1; - } - Intensity intensity = 2; - } - - // 设备始终上报所有的配置 [EN: Device always reports all configurations] - // app 选择自定义时,需要下发 custom_cfg [EN: When app selects custom, need to send custom_cfg] - Config standard_cfg = 2; - Config strong_cfg = 3; - Config energy_saving_cfg = 4; - Config custom_cfg = 5; -} - -message AutoActionCfg { // 扫拖过程自动进行的行为开关 [EN: Auto action switches during sweep/mop process] - WashCfg wash = 1; //洗拖布 [EN: Mop washing] - DryCfg dry = 2; // 烘干 [EN: Drying] - CollectDustCfg collectdust = 3; // 集尘 [EN: Dust collection] - bool detergent = 4; // 添加清洁剂 [EN: Add detergent] - bool make_disinfectant = 5; // 自动制备消毒剂 [EN: Auto prepare disinfectant] - CollectDustCfgV2 collectdust_v2 = 6; // 集尘新版协议 [EN: Dust collection new version protocol] - CutHairCfg cut_hair = 7; // 割毛发 [EN: Hair cutting] - SelfPurifyingCfg self_purifying = 8; // [废弃] 手动自净(集尘、滚刷清洁组合项) [EN: [Deprecated] Manual self-purifying (dust collection, roller brush cleaning combo)] -} - -message ManualActionCmd { - oneof Cmd { - bool self_maintain = 1; // 按照设置完成返回基站后的自动维护操作(加污排污/集尘/洗拖把/烘干),即深度自清洁 [EN: Auto maintenance after returning to station per settings (add/drain water/dust collection/mop wash/dry), i.e., deep self-cleaning] - bool go_dry = 2; // 手动烘干开关 [EN: Manual drying switch] - bool go_collect_dust = 3; // 手动集尘 [EN: Manual dust collection] - bool go_selfcleaning = 4; // 手动洗拖把 [EN: Manual mop washing] - bool go_remove_scale = 5; // 手动除水垢 [EN: Manual descaling] - bool go_cut_hair = 6; // 手动割毛发 [EN: Manual hair cutting] - bool go_selfpurifying = 7; // [废弃] 手动自净(集尘、滚刷清洁组合项) [EN: [Deprecated] Manual self-purifying (dust collection, roller brush cleaning combo)] - } -} - -// 拖地模式下:[EN: In mopping mode:] -// 回到基站自动触发清洗拖布;[EN: Returning to station auto triggers mop washing;] -// 需要设置自动烘干拖布,才能烘干拖布;[EN: Need to set auto dry mop to dry the mop;] -message StationRequest { - AutoActionCfg auto_cfg = 1; - ManualActionCmd manual_cmd = 2; -} - -message StationResponse { - AutoActionCfg auto_cfg_status = 1; - - message StationStatus { - bool connected = 1; //基站是否已连接 [EN: Whether station is connected] - - // 基站工作状态 [EN: Station working status] - enum State { - IDLE = 0; // 空闲 [EN: Idle] - WASHING = 1; // 清洗拖布 [EN: Washing mop] - DRYING = 2; // 烘干拖布 [EN: Drying mop] - REMOVING_SCALE = 3; // 除水垢 [EN: Descaling] - } - State state = 2; - - // 各模块的状态 [EN: Status of each module] - bool collecting_dust = 3; // 集尘中 [EN: Collecting dust] - bool clear_water_adding = 4; // 清水添加中 [EN: Adding clean water] - bool waste_water_recycling = 5; // 污水回收中 [EN: Recycling waste water] - bool disinfectant_making = 6; // 消毒剂制备中 [EN: Making disinfectant] - bool cutting_hair = 7; // 割毛发 [EN: Cutting hair] - } - StationStatus status = 2; - - enum WaterLevel { - EMPTY = 0; - VERY_LOW = 1; // <25% - LOW = 2; // 25% < low < 50% - MEDIUM = 3; // 50% < medium < 75% - HIGH = 4; // >75% - } - WaterLevel clean_level = 3; // 干净水量 [EN: Clean water level] - WaterLevel dirty_level = 4; // 污水水量 [EN: Dirty water level] - - Numerical clean_water = 5; // 干净水量,0%~100% [EN: Clean water level, 0%~100%] -} diff --git a/proto-reference/station_pb2.py b/proto-reference/station_pb2.py deleted file mode 100644 index dea7e1c..0000000 --- a/proto-reference/station_pb2.py +++ /dev/null @@ -1,80 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: proto/cloud/station.proto -"""Generated protocol buffer code.""" -from google.protobuf import descriptor as _descriptor -from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import symbol_database as _symbol_database -from google.protobuf.internal import builder as _builder - -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - -from ...proto.cloud import common_pb2 as proto_dot_cloud_dot_common__pb2 - -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x19proto/cloud/station.proto\x12\x0bproto.cloud\x1a\x18proto/cloud/common.proto\"`\n\x08\x44uration\x12*\n\x05level\x18\x01 \x01(\x0e\x32\x1b.proto.cloud.Duration.Level\"(\n\x05Level\x12\t\n\x05SHORT\x10\x00\x12\n\n\x06MEDIUM\x10\x01\x12\x08\n\x04LONG\x10\x02\"e\n\x0e\x43ollectDustCfg\x12,\n\x03\x63\x66g\x18\x01 \x01(\x0e\x32\x1f.proto.cloud.CollectDustCfg.Cfg\"%\n\x03\x43\x66g\x12\t\n\x05\x43LOSE\x10\x00\x12\x08\n\x04ONCE\x10\x01\x12\t\n\x05TWICE\x10\x02\"\xe5\x01\n\x10\x43ollectDustCfgV2\x12\x1f\n\x02sw\x18\x01 \x01(\x0b\x32\x13.proto.cloud.Switch\x12\x30\n\x04mode\x18\x02 \x01(\x0b\x32\".proto.cloud.CollectDustCfgV2.Mode\x1a~\n\x04Mode\x12\x37\n\x05value\x18\x01 \x01(\x0e\x32(.proto.cloud.CollectDustCfgV2.Mode.Value\x12\x0c\n\x04task\x18\x02 \x01(\r\x12\x0c\n\x04time\x18\x03 \x01(\r\"!\n\x05Value\x12\x0b\n\x07\x42Y_TASK\x10\x00\x12\x0b\n\x07\x42Y_TIME\x10\x01\"\x82\x01\n\x06\x44ryCfg\x12$\n\x03\x63\x66g\x18\x01 \x01(\x0e\x32\x17.proto.cloud.DryCfg.Cfg\x12\'\n\x08\x64uration\x18\x02 \x01(\x0b\x32\x15.proto.cloud.Duration\")\n\x03\x43\x66g\x12\t\n\x05\x43LOSE\x10\x00\x12\x0c\n\x08STANDARD\x10\x01\x12\t\n\x05QUICK\x10\x02\"\x83\x03\n\x07WashCfg\x12\x34\n\twash_freq\x18\x01 \x01(\x0b\x32!.proto.cloud.WashCfg.BackwashFreq\x12,\n\rwash_duration\x18\x02 \x01(\x0b\x32\x15.proto.cloud.Duration\x12%\n\x03\x63\x66g\x18\x03 \x01(\x0e\x32\x18.proto.cloud.WashCfg.Cfg\x1a\xcc\x01\n\x0c\x42\x61\x63kwashFreq\x12\x34\n\x04mode\x18\x01 \x01(\x0e\x32&.proto.cloud.WashCfg.BackwashFreq.Mode\x12\'\n\x08\x64uration\x18\x02 \x01(\x0b\x32\x15.proto.cloud.Duration\x12,\n\x0ctime_or_area\x18\x03 \x01(\x0b\x32\x16.proto.cloud.Numerical\"/\n\x04Mode\x12\x0f\n\x0b\x42yPartition\x10\x00\x12\n\n\x06\x42yTime\x10\x01\x12\n\n\x06\x42yArea\x10\x02\"\x1e\n\x03\x43\x66g\x12\t\n\x05\x43LOSE\x10\x00\x12\x0c\n\x08STANDARD\x10\x01\"-\n\nCutHairCfg\x12\x1f\n\x02sw\x18\x01 \x01(\x0b\x32\x13.proto.cloud.Switch\"\x90\x06\n\x10SelfPurifyingCfg\x12\x30\n\x04type\x18\x01 \x01(\x0e\x32\".proto.cloud.SelfPurifyingCfg.Type\x12:\n\x0cstandard_cfg\x18\x02 \x01(\x0b\x32$.proto.cloud.SelfPurifyingCfg.Config\x12\x38\n\nstrong_cfg\x18\x03 \x01(\x0b\x32$.proto.cloud.SelfPurifyingCfg.Config\x12?\n\x11\x65nergy_saving_cfg\x18\x04 \x01(\x0b\x32$.proto.cloud.SelfPurifyingCfg.Config\x12\x38\n\ncustom_cfg\x18\x05 \x01(\x0b\x32$.proto.cloud.SelfPurifyingCfg.Config\x1a\x97\x03\n\x06\x43onfig\x12\x41\n\tfrequency\x18\x01 \x01(\x0b\x32..proto.cloud.SelfPurifyingCfg.Config.Frequency\x12\x41\n\tintensity\x18\x02 \x01(\x0b\x32..proto.cloud.SelfPurifyingCfg.Config.Intensity\x1a\x8c\x01\n\tFrequency\x12\x41\n\x04mode\x18\x01 \x01(\x0e\x32\x33.proto.cloud.SelfPurifyingCfg.Config.Frequency.Mode\x12\x0c\n\x04task\x18\x02 \x01(\r\x12\x0c\n\x04time\x18\x03 \x01(\r\" \n\x04Mode\x12\x0b\n\x07\x42Y_TASK\x10\x00\x12\x0b\n\x07\x42Y_TIME\x10\x01\x1ax\n\tIntensity\x12\x43\n\x05level\x18\x01 \x01(\x0e\x32\x34.proto.cloud.SelfPurifyingCfg.Config.Intensity.Level\"&\n\x05Level\x12\x07\n\x03LOW\x10\x00\x12\n\n\x06MEDIUM\x10\x01\x12\x08\n\x04HIGH\x10\x02\"?\n\x04Type\x12\x0c\n\x08STANDARD\x10\x00\x12\n\n\x06STRONG\x10\x01\x12\x11\n\rENERGY_SAVING\x10\x02\x12\n\n\x06\x43USTOM\x10\x03\"\xce\x02\n\rAutoActionCfg\x12\"\n\x04wash\x18\x01 \x01(\x0b\x32\x14.proto.cloud.WashCfg\x12 \n\x03\x64ry\x18\x02 \x01(\x0b\x32\x13.proto.cloud.DryCfg\x12\x30\n\x0b\x63ollectdust\x18\x03 \x01(\x0b\x32\x1b.proto.cloud.CollectDustCfg\x12\x11\n\tdetergent\x18\x04 \x01(\x08\x12\x19\n\x11make_disinfectant\x18\x05 \x01(\x08\x12\x35\n\x0e\x63ollectdust_v2\x18\x06 \x01(\x0b\x32\x1d.proto.cloud.CollectDustCfgV2\x12)\n\x08\x63ut_hair\x18\x07 \x01(\x0b\x32\x17.proto.cloud.CutHairCfg\x12\x35\n\x0eself_purifying\x18\x08 \x01(\x0b\x32\x1d.proto.cloud.SelfPurifyingCfg\"\xc7\x01\n\x0fManualActionCmd\x12\x17\n\rself_maintain\x18\x01 \x01(\x08H\x00\x12\x10\n\x06go_dry\x18\x02 \x01(\x08H\x00\x12\x19\n\x0fgo_collect_dust\x18\x03 \x01(\x08H\x00\x12\x19\n\x0fgo_selfcleaning\x18\x04 \x01(\x08H\x00\x12\x19\n\x0fgo_remove_scale\x18\x05 \x01(\x08H\x00\x12\x15\n\x0bgo_cut_hair\x18\x06 \x01(\x08H\x00\x12\x1a\n\x10go_selfpurifying\x18\x07 \x01(\x08H\x00\x42\x05\n\x03\x43md\"p\n\x0eStationRequest\x12,\n\x08\x61uto_cfg\x18\x01 \x01(\x0b\x32\x1a.proto.cloud.AutoActionCfg\x12\x30\n\nmanual_cmd\x18\x02 \x01(\x0b\x32\x1c.proto.cloud.ManualActionCmd\"\x9e\x05\n\x0fStationResponse\x12\x33\n\x0f\x61uto_cfg_status\x18\x01 \x01(\x0b\x32\x1a.proto.cloud.AutoActionCfg\x12:\n\x06status\x18\x02 \x01(\x0b\x32*.proto.cloud.StationResponse.StationStatus\x12<\n\x0b\x63lean_level\x18\x03 \x01(\x0e\x32\'.proto.cloud.StationResponse.WaterLevel\x12<\n\x0b\x64irty_level\x18\x04 \x01(\x0e\x32\'.proto.cloud.StationResponse.WaterLevel\x12+\n\x0b\x63lean_water\x18\x05 \x01(\x0b\x32\x16.proto.cloud.Numerical\x1a\xaa\x02\n\rStationStatus\x12\x11\n\tconnected\x18\x01 \x01(\x08\x12?\n\x05state\x18\x02 \x01(\x0e\x32\x30.proto.cloud.StationResponse.StationStatus.State\x12\x17\n\x0f\x63ollecting_dust\x18\x03 \x01(\x08\x12\x1a\n\x12\x63lear_water_adding\x18\x04 \x01(\x08\x12\x1d\n\x15waste_water_recycling\x18\x05 \x01(\x08\x12\x1b\n\x13\x64isinfectant_making\x18\x06 \x01(\x08\x12\x14\n\x0c\x63utting_hair\x18\x07 \x01(\x08\">\n\x05State\x12\x08\n\x04IDLE\x10\x00\x12\x0b\n\x07WASHING\x10\x01\x12\n\n\x06\x44RYING\x10\x02\x12\x12\n\x0eREMOVING_SCALE\x10\x03\"D\n\nWaterLevel\x12\t\n\x05\x45MPTY\x10\x00\x12\x0c\n\x08VERY_LOW\x10\x01\x12\x07\n\x03LOW\x10\x02\x12\n\n\x06MEDIUM\x10\x03\x12\x08\n\x04HIGH\x10\x04\x62\x06proto3') - -_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'proto.cloud.station_pb2', globals()) -if _descriptor._USE_C_DESCRIPTORS == False: - - DESCRIPTOR._options = None - _DURATION._serialized_start=68 - _DURATION._serialized_end=164 - _DURATION_LEVEL._serialized_start=124 - _DURATION_LEVEL._serialized_end=164 - _COLLECTDUSTCFG._serialized_start=166 - _COLLECTDUSTCFG._serialized_end=267 - _COLLECTDUSTCFG_CFG._serialized_start=230 - _COLLECTDUSTCFG_CFG._serialized_end=267 - _COLLECTDUSTCFGV2._serialized_start=270 - _COLLECTDUSTCFGV2._serialized_end=499 - _COLLECTDUSTCFGV2_MODE._serialized_start=373 - _COLLECTDUSTCFGV2_MODE._serialized_end=499 - _COLLECTDUSTCFGV2_MODE_VALUE._serialized_start=466 - _COLLECTDUSTCFGV2_MODE_VALUE._serialized_end=499 - _DRYCFG._serialized_start=502 - _DRYCFG._serialized_end=632 - _DRYCFG_CFG._serialized_start=591 - _DRYCFG_CFG._serialized_end=632 - _WASHCFG._serialized_start=635 - _WASHCFG._serialized_end=1022 - _WASHCFG_BACKWASHFREQ._serialized_start=786 - _WASHCFG_BACKWASHFREQ._serialized_end=990 - _WASHCFG_BACKWASHFREQ_MODE._serialized_start=943 - _WASHCFG_BACKWASHFREQ_MODE._serialized_end=990 - _WASHCFG_CFG._serialized_start=591 - _WASHCFG_CFG._serialized_end=621 - _CUTHAIRCFG._serialized_start=1024 - _CUTHAIRCFG._serialized_end=1069 - _SELFPURIFYINGCFG._serialized_start=1072 - _SELFPURIFYINGCFG._serialized_end=1856 - _SELFPURIFYINGCFG_CONFIG._serialized_start=1384 - _SELFPURIFYINGCFG_CONFIG._serialized_end=1791 - _SELFPURIFYINGCFG_CONFIG_FREQUENCY._serialized_start=1529 - _SELFPURIFYINGCFG_CONFIG_FREQUENCY._serialized_end=1669 - _SELFPURIFYINGCFG_CONFIG_FREQUENCY_MODE._serialized_start=1637 - _SELFPURIFYINGCFG_CONFIG_FREQUENCY_MODE._serialized_end=1669 - _SELFPURIFYINGCFG_CONFIG_INTENSITY._serialized_start=1671 - _SELFPURIFYINGCFG_CONFIG_INTENSITY._serialized_end=1791 - _SELFPURIFYINGCFG_CONFIG_INTENSITY_LEVEL._serialized_start=1753 - _SELFPURIFYINGCFG_CONFIG_INTENSITY_LEVEL._serialized_end=1791 - _SELFPURIFYINGCFG_TYPE._serialized_start=1793 - _SELFPURIFYINGCFG_TYPE._serialized_end=1856 - _AUTOACTIONCFG._serialized_start=1859 - _AUTOACTIONCFG._serialized_end=2193 - _MANUALACTIONCMD._serialized_start=2196 - _MANUALACTIONCMD._serialized_end=2395 - _STATIONREQUEST._serialized_start=2397 - _STATIONREQUEST._serialized_end=2509 - _STATIONRESPONSE._serialized_start=2512 - _STATIONRESPONSE._serialized_end=3182 - _STATIONRESPONSE_STATIONSTATUS._serialized_start=2814 - _STATIONRESPONSE_STATIONSTATUS._serialized_end=3112 - _STATIONRESPONSE_STATIONSTATUS_STATE._serialized_start=3050 - _STATIONRESPONSE_STATIONSTATUS_STATE._serialized_end=3112 - _STATIONRESPONSE_WATERLEVEL._serialized_start=3114 - _STATIONRESPONSE_WATERLEVEL._serialized_end=3182 -# @@protoc_insertion_point(module_scope) diff --git a/proto-reference/station_pb2.pyi b/proto-reference/station_pb2.pyi deleted file mode 100644 index 89feddb..0000000 --- a/proto-reference/station_pb2.pyi +++ /dev/null @@ -1,242 +0,0 @@ -from typing import ClassVar as _ClassVar -from typing import Mapping as _Mapping -from typing import Optional as _Optional -from typing import Union as _Union - -from google.protobuf import descriptor as _descriptor -from google.protobuf import message as _message -from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper - -from ...proto.cloud import common_pb2 as _common_pb2 - -DESCRIPTOR: _descriptor.FileDescriptor - -class AutoActionCfg(_message.Message): - __slots__ = ["collectdust", "collectdust_v2", "cut_hair", "detergent", "dry", "make_disinfectant", "self_purifying", "wash"] - COLLECTDUST_FIELD_NUMBER: _ClassVar[int] - COLLECTDUST_V2_FIELD_NUMBER: _ClassVar[int] - CUT_HAIR_FIELD_NUMBER: _ClassVar[int] - DETERGENT_FIELD_NUMBER: _ClassVar[int] - DRY_FIELD_NUMBER: _ClassVar[int] - MAKE_DISINFECTANT_FIELD_NUMBER: _ClassVar[int] - SELF_PURIFYING_FIELD_NUMBER: _ClassVar[int] - WASH_FIELD_NUMBER: _ClassVar[int] - collectdust: CollectDustCfg - collectdust_v2: CollectDustCfgV2 - cut_hair: CutHairCfg - detergent: bool - dry: DryCfg - make_disinfectant: bool - self_purifying: SelfPurifyingCfg - wash: WashCfg - def __init__(self, wash: _Optional[_Union[WashCfg, _Mapping]] = ..., dry: _Optional[_Union[DryCfg, _Mapping]] = ..., collectdust: _Optional[_Union[CollectDustCfg, _Mapping]] = ..., detergent: bool = ..., make_disinfectant: bool = ..., collectdust_v2: _Optional[_Union[CollectDustCfgV2, _Mapping]] = ..., cut_hair: _Optional[_Union[CutHairCfg, _Mapping]] = ..., self_purifying: _Optional[_Union[SelfPurifyingCfg, _Mapping]] = ...) -> None: ... - -class CollectDustCfg(_message.Message): - __slots__ = ["cfg"] - class Cfg(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - CFG_FIELD_NUMBER: _ClassVar[int] - CLOSE: CollectDustCfg.Cfg - ONCE: CollectDustCfg.Cfg - TWICE: CollectDustCfg.Cfg - cfg: CollectDustCfg.Cfg - def __init__(self, cfg: _Optional[_Union[CollectDustCfg.Cfg, str]] = ...) -> None: ... - -class CollectDustCfgV2(_message.Message): - __slots__ = ["mode", "sw"] - class Mode(_message.Message): - __slots__ = ["task", "time", "value"] - class Value(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - BY_TASK: CollectDustCfgV2.Mode.Value - BY_TIME: CollectDustCfgV2.Mode.Value - TASK_FIELD_NUMBER: _ClassVar[int] - TIME_FIELD_NUMBER: _ClassVar[int] - VALUE_FIELD_NUMBER: _ClassVar[int] - task: int - time: int - value: CollectDustCfgV2.Mode.Value - def __init__(self, value: _Optional[_Union[CollectDustCfgV2.Mode.Value, str]] = ..., task: _Optional[int] = ..., time: _Optional[int] = ...) -> None: ... - MODE_FIELD_NUMBER: _ClassVar[int] - SW_FIELD_NUMBER: _ClassVar[int] - mode: CollectDustCfgV2.Mode - sw: _common_pb2.Switch - def __init__(self, sw: _Optional[_Union[_common_pb2.Switch, _Mapping]] = ..., mode: _Optional[_Union[CollectDustCfgV2.Mode, _Mapping]] = ...) -> None: ... - -class CutHairCfg(_message.Message): - __slots__ = ["sw"] - SW_FIELD_NUMBER: _ClassVar[int] - sw: _common_pb2.Switch - def __init__(self, sw: _Optional[_Union[_common_pb2.Switch, _Mapping]] = ...) -> None: ... - -class DryCfg(_message.Message): - __slots__ = ["cfg", "duration"] - class Cfg(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - CFG_FIELD_NUMBER: _ClassVar[int] - CLOSE: DryCfg.Cfg - DURATION_FIELD_NUMBER: _ClassVar[int] - QUICK: DryCfg.Cfg - STANDARD: DryCfg.Cfg - cfg: DryCfg.Cfg - duration: Duration - def __init__(self, cfg: _Optional[_Union[DryCfg.Cfg, str]] = ..., duration: _Optional[_Union[Duration, _Mapping]] = ...) -> None: ... - -class Duration(_message.Message): - __slots__ = ["level"] - class Level(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - LEVEL_FIELD_NUMBER: _ClassVar[int] - LONG: Duration.Level - MEDIUM: Duration.Level - SHORT: Duration.Level - level: Duration.Level - def __init__(self, level: _Optional[_Union[Duration.Level, str]] = ...) -> None: ... - -class ManualActionCmd(_message.Message): - __slots__ = ["go_collect_dust", "go_cut_hair", "go_dry", "go_remove_scale", "go_selfcleaning", "go_selfpurifying", "self_maintain"] - GO_COLLECT_DUST_FIELD_NUMBER: _ClassVar[int] - GO_CUT_HAIR_FIELD_NUMBER: _ClassVar[int] - GO_DRY_FIELD_NUMBER: _ClassVar[int] - GO_REMOVE_SCALE_FIELD_NUMBER: _ClassVar[int] - GO_SELFCLEANING_FIELD_NUMBER: _ClassVar[int] - GO_SELFPURIFYING_FIELD_NUMBER: _ClassVar[int] - SELF_MAINTAIN_FIELD_NUMBER: _ClassVar[int] - go_collect_dust: bool - go_cut_hair: bool - go_dry: bool - go_remove_scale: bool - go_selfcleaning: bool - go_selfpurifying: bool - self_maintain: bool - def __init__(self, self_maintain: bool = ..., go_dry: bool = ..., go_collect_dust: bool = ..., go_selfcleaning: bool = ..., go_remove_scale: bool = ..., go_cut_hair: bool = ..., go_selfpurifying: bool = ...) -> None: ... - -class SelfPurifyingCfg(_message.Message): - __slots__ = ["custom_cfg", "energy_saving_cfg", "standard_cfg", "strong_cfg", "type"] - class Type(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - class Config(_message.Message): - __slots__ = ["frequency", "intensity"] - class Frequency(_message.Message): - __slots__ = ["mode", "task", "time"] - class Mode(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - BY_TASK: SelfPurifyingCfg.Config.Frequency.Mode - BY_TIME: SelfPurifyingCfg.Config.Frequency.Mode - MODE_FIELD_NUMBER: _ClassVar[int] - TASK_FIELD_NUMBER: _ClassVar[int] - TIME_FIELD_NUMBER: _ClassVar[int] - mode: SelfPurifyingCfg.Config.Frequency.Mode - task: int - time: int - def __init__(self, mode: _Optional[_Union[SelfPurifyingCfg.Config.Frequency.Mode, str]] = ..., task: _Optional[int] = ..., time: _Optional[int] = ...) -> None: ... - class Intensity(_message.Message): - __slots__ = ["level"] - class Level(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - HIGH: SelfPurifyingCfg.Config.Intensity.Level - LEVEL_FIELD_NUMBER: _ClassVar[int] - LOW: SelfPurifyingCfg.Config.Intensity.Level - MEDIUM: SelfPurifyingCfg.Config.Intensity.Level - level: SelfPurifyingCfg.Config.Intensity.Level - def __init__(self, level: _Optional[_Union[SelfPurifyingCfg.Config.Intensity.Level, str]] = ...) -> None: ... - FREQUENCY_FIELD_NUMBER: _ClassVar[int] - INTENSITY_FIELD_NUMBER: _ClassVar[int] - frequency: SelfPurifyingCfg.Config.Frequency - intensity: SelfPurifyingCfg.Config.Intensity - def __init__(self, frequency: _Optional[_Union[SelfPurifyingCfg.Config.Frequency, _Mapping]] = ..., intensity: _Optional[_Union[SelfPurifyingCfg.Config.Intensity, _Mapping]] = ...) -> None: ... - CUSTOM: SelfPurifyingCfg.Type - CUSTOM_CFG_FIELD_NUMBER: _ClassVar[int] - ENERGY_SAVING: SelfPurifyingCfg.Type - ENERGY_SAVING_CFG_FIELD_NUMBER: _ClassVar[int] - STANDARD: SelfPurifyingCfg.Type - STANDARD_CFG_FIELD_NUMBER: _ClassVar[int] - STRONG: SelfPurifyingCfg.Type - STRONG_CFG_FIELD_NUMBER: _ClassVar[int] - TYPE_FIELD_NUMBER: _ClassVar[int] - custom_cfg: SelfPurifyingCfg.Config - energy_saving_cfg: SelfPurifyingCfg.Config - standard_cfg: SelfPurifyingCfg.Config - strong_cfg: SelfPurifyingCfg.Config - type: SelfPurifyingCfg.Type - def __init__(self, type: _Optional[_Union[SelfPurifyingCfg.Type, str]] = ..., standard_cfg: _Optional[_Union[SelfPurifyingCfg.Config, _Mapping]] = ..., strong_cfg: _Optional[_Union[SelfPurifyingCfg.Config, _Mapping]] = ..., energy_saving_cfg: _Optional[_Union[SelfPurifyingCfg.Config, _Mapping]] = ..., custom_cfg: _Optional[_Union[SelfPurifyingCfg.Config, _Mapping]] = ...) -> None: ... - -class StationRequest(_message.Message): - __slots__ = ["auto_cfg", "manual_cmd"] - AUTO_CFG_FIELD_NUMBER: _ClassVar[int] - MANUAL_CMD_FIELD_NUMBER: _ClassVar[int] - auto_cfg: AutoActionCfg - manual_cmd: ManualActionCmd - def __init__(self, auto_cfg: _Optional[_Union[AutoActionCfg, _Mapping]] = ..., manual_cmd: _Optional[_Union[ManualActionCmd, _Mapping]] = ...) -> None: ... - -class StationResponse(_message.Message): - __slots__ = ["auto_cfg_status", "clean_level", "clean_water", "dirty_level", "status"] - class WaterLevel(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - class StationStatus(_message.Message): - __slots__ = ["clear_water_adding", "collecting_dust", "connected", "cutting_hair", "disinfectant_making", "state", "waste_water_recycling"] - class State(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - CLEAR_WATER_ADDING_FIELD_NUMBER: _ClassVar[int] - COLLECTING_DUST_FIELD_NUMBER: _ClassVar[int] - CONNECTED_FIELD_NUMBER: _ClassVar[int] - CUTTING_HAIR_FIELD_NUMBER: _ClassVar[int] - DISINFECTANT_MAKING_FIELD_NUMBER: _ClassVar[int] - DRYING: StationResponse.StationStatus.State - IDLE: StationResponse.StationStatus.State - REMOVING_SCALE: StationResponse.StationStatus.State - STATE_FIELD_NUMBER: _ClassVar[int] - WASHING: StationResponse.StationStatus.State - WASTE_WATER_RECYCLING_FIELD_NUMBER: _ClassVar[int] - clear_water_adding: bool - collecting_dust: bool - connected: bool - cutting_hair: bool - disinfectant_making: bool - state: StationResponse.StationStatus.State - waste_water_recycling: bool - def __init__(self, connected: bool = ..., state: _Optional[_Union[StationResponse.StationStatus.State, str]] = ..., collecting_dust: bool = ..., clear_water_adding: bool = ..., waste_water_recycling: bool = ..., disinfectant_making: bool = ..., cutting_hair: bool = ...) -> None: ... - AUTO_CFG_STATUS_FIELD_NUMBER: _ClassVar[int] - CLEAN_LEVEL_FIELD_NUMBER: _ClassVar[int] - CLEAN_WATER_FIELD_NUMBER: _ClassVar[int] - DIRTY_LEVEL_FIELD_NUMBER: _ClassVar[int] - EMPTY: StationResponse.WaterLevel - HIGH: StationResponse.WaterLevel - LOW: StationResponse.WaterLevel - MEDIUM: StationResponse.WaterLevel - STATUS_FIELD_NUMBER: _ClassVar[int] - VERY_LOW: StationResponse.WaterLevel - auto_cfg_status: AutoActionCfg - clean_level: StationResponse.WaterLevel - clean_water: _common_pb2.Numerical - dirty_level: StationResponse.WaterLevel - status: StationResponse.StationStatus - def __init__(self, auto_cfg_status: _Optional[_Union[AutoActionCfg, _Mapping]] = ..., status: _Optional[_Union[StationResponse.StationStatus, _Mapping]] = ..., clean_level: _Optional[_Union[StationResponse.WaterLevel, str]] = ..., dirty_level: _Optional[_Union[StationResponse.WaterLevel, str]] = ..., clean_water: _Optional[_Union[_common_pb2.Numerical, _Mapping]] = ...) -> None: ... - -class WashCfg(_message.Message): - __slots__ = ["cfg", "wash_duration", "wash_freq"] - class Cfg(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - class BackwashFreq(_message.Message): - __slots__ = ["duration", "mode", "time_or_area"] - class Mode(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - ByArea: WashCfg.BackwashFreq.Mode - ByPartition: WashCfg.BackwashFreq.Mode - ByTime: WashCfg.BackwashFreq.Mode - DURATION_FIELD_NUMBER: _ClassVar[int] - MODE_FIELD_NUMBER: _ClassVar[int] - TIME_OR_AREA_FIELD_NUMBER: _ClassVar[int] - duration: Duration - mode: WashCfg.BackwashFreq.Mode - time_or_area: _common_pb2.Numerical - def __init__(self, mode: _Optional[_Union[WashCfg.BackwashFreq.Mode, str]] = ..., duration: _Optional[_Union[Duration, _Mapping]] = ..., time_or_area: _Optional[_Union[_common_pb2.Numerical, _Mapping]] = ...) -> None: ... - CFG_FIELD_NUMBER: _ClassVar[int] - CLOSE: WashCfg.Cfg - STANDARD: WashCfg.Cfg - WASH_DURATION_FIELD_NUMBER: _ClassVar[int] - WASH_FREQ_FIELD_NUMBER: _ClassVar[int] - cfg: WashCfg.Cfg - wash_duration: Duration - wash_freq: WashCfg.BackwashFreq - def __init__(self, wash_freq: _Optional[_Union[WashCfg.BackwashFreq, _Mapping]] = ..., wash_duration: _Optional[_Union[Duration, _Mapping]] = ..., cfg: _Optional[_Union[WashCfg.Cfg, str]] = ...) -> None: ... diff --git a/proto-reference/stream.proto b/proto-reference/stream.proto deleted file mode 100644 index e93c653..0000000 --- a/proto-reference/stream.proto +++ /dev/null @@ -1,423 +0,0 @@ -/** - * 流通道 [EN: Stream channel] - */ -syntax = "proto3"; - -// option optimize_for = LITE_RUNTIME; - -package proto.cloud.stream; - -import "proto/cloud/common.proto"; -import "proto/cloud/clean_param.proto"; -import "proto/cloud/control.proto"; -import "proto/cloud/scene.proto"; - -/** - * 通道、版本信息. [EN: Channel and version information.] - * - * @note: Delimited 方式序列化. [EN: @note: Serialized in Delimited way.] - */ -message Metadata { - message Versions { - // 只针对非 protobuf 格式的通道,protobuf协议本身是向下兼容的; [EN: Only for non-protobuf format channels, protobuf protocol itself is backward compatible;] - uint32 map_data = 1; - } - Versions versions = 1; - - message ChanIds { - // 地图信息通道,使用 message MapInfo 解析; [EN: Map info channel, parse using message MapInfo;] - uint32 map_info = 1; - - // 路径数据通道,使用 message Path 解析; [EN: Path data channel, parse using message Path;] - uint32 path = 2; - - // 房间轮廓,使用 message RoomOutline 解析; [EN: Room outline, parse using message RoomOutline;] - uint32 room_outline = 3; - - // 房间参数信息,使用 message RoomParams 解析; [EN: Room parameters info, parse using message RoomParams;] - uint32 room_params = 4; - - // 禁区信息,使用 message RestrictedZone 解析; [EN: Restricted zone info, parse using message RestrictedZone;] - uint32 restricted_zone = 5; - - // 动态数据,主要是位姿,使用 message DynamicData 解析; [EN: Dynamic data, mainly pose, parse using message DynamicData;] - uint32 dynamic_data = 6; - - // 临时数据通道,包括选区、指哪到哪等参数,使用 message TemporaryData 解析; [EN: Temporary data channel, including zone selection, point-to-point, etc., parse using message TemporaryData;] - uint32 temporary_data = 7; - - // 视觉识别的物体信息,使用 message ObstacleInfo 解析; [EN: Visually recognized object info, parse using message ObstacleInfo;] - uint32 obstacle_info = 8; - - // 地图数据,使用 message Map 解析. [EN: Map data, parse using message Map.] - uint32 map_data = 9; - - // 巡航点数据,使用 message CruiseData 解析; [EN: Cruise point data, parse using message CruiseData;] - uint32 cruise_data = 10; - } - ChanIds chan_ids = 2; -} - -/** - * 地图信息. [EN: Map information.] - * - * @note: Delimited 方式序列化. [EN: @note: Serialized in Delimited way.] - */ -message MapInfo { - uint32 map_id = 1; // id 1 不再使用,兼容回放系统留到 2023/01/22 再删除 [EN: id 1 no longer used, kept for playback system compatibility until 2023/01/22 then delete] - - uint32 width = 2; - uint32 height = 3; - uint32 resolution = 4; // 单位: m x 100 [EN: Unit: m x 100] - - Point origin = 5; // 原点 [EN: Origin] - repeated Pose docks = 6; // 支持多个充电座/基站 [EN: Supports multiple charging docks/stations] - - enum Type { - INCOMPLETE = 0; // 不完善的地图 [EN: Incomplete map] - ROUGH = 1; // 粗糙的完整地图(快速产生的地图) [EN: Rough complete map (quickly generated map)] - EFFECTIVE = 2; // 有效的完整地图(清洁建图、快速建图后继续清洁产生的地图) [EN: Effective complete map (map from cleaning mapping, or continued cleaning after fast mapping)] - LIST_FULL = 3; // 列表已满(通知 app 需要替换一张多地图或者忽略当前地图) [EN: List full (notify app to replace a multi-map or ignore current map)] - } - Type type = 7; - - uint32 seq = 8; // id 8 不再使用,兼容回放系统留到 2023/01/22 再删除 [EN: id 8 no longer used, kept for playback system compatibility until 2023/01/22 then delete] - uint32 angle = 9; // 顺时针的角度的度数,如 90,180 [EN: Clockwise angle in degrees, e.g. 90, 180] - - message Dock { - enum Type { - ADAPTER = 0; // 充电座 [EN: Charging dock] - STATION = 1; // 基站 [EN: Station] - } - Dock.Type type = 1; - Pose pose = 2; - } - repeated Dock docks_v2 = 10; // 支持多个充电座/基站 [EN: Supports multiple charging docks/stations] -} - -/** - * 地图帧数据, 可全量和增量上传. [EN: Map frame data, can be full or incremental upload.] - * 当 Frame 为 I 时,表示全量地图,机器端会先清除地图subid通道数据; [EN: When Frame is I, it means full map, device will first clear map subid channel data;] - * 当 Frame 为 P 时,表示增量地图; [EN: When Frame is P, it means incremental map;] - * - * @note: Delimited 方式序列化. [EN: @note: Serialized in Delimited way.] - */ -message Map { - uint32 map_id = 1; // id 1 不再使用,兼容回放系统留到 2023/01/22 再删除 [EN: id 1 no longer used, kept for playback system compatibility until 2023/01/22 then delete] - uint32 seq = 2; // id 2 不再使用,兼容回放系统留到 2023/01/22 再删除 [EN: id 2 no longer used, kept for playback system compatibility until 2023/01/22 then delete] - - enum Frame { - I = 0; // 全量地图 [EN: Full map] - P = 1; // 增量地图 [EN: Incremental map] - } - Frame frame = 3; - - enum PixelValue { - UNKNOW = 0; - OBSTACLE = 1; - FREE = 2; - CARPET = 3; - } - /** - * 地图像素数据,目前采用 LZ4 压缩; [EN: Map pixel data, currently using LZ4 compression;] - * 每个像素占 2bit,即4种值,与上面 enum PixelValue 对应. [EN: Each pixel occupies 2 bits, i.e. 4 values, corresponding to enum PixelValue above.] - * 像素从字节低位bit开始. [EN: Pixels start from low bit of byte.] - */ - bytes pixels = 4; // 地图压缩 [EN: Map compressed] - - /** - * 地图像素原始size, 如果pixels有压缩,则 pixel_size 表示解压后的长度. [EN: Original map pixel size, if pixels are compressed, pixel_size represents the decompressed length.] - */ - uint32 pixel_size = 5; - - MapInfo info = 6; // map 的信息 [EN: Map info] - string name = 7; // map 的名称 [EN: Map name] - uint32 id = 8; // map 的 id 号 [EN: Map ID number] - uint32 releases = 9; // map 的大版本修正号 [EN: Map major version revision number] - - message Index { - uint32 value = 1; // 地图索引,0 表示实时地图,1~MULTI_MAP_NUM 表示多地图中的地图索引 [EN: Map index, 0 means real-time map, 1~MULTI_MAP_NUM means map index in multi-maps] - } - Index index = 10; -} - -/** - * 路径数据,增量上传. [EN: Path data, incremental upload.] - * - * @note: Delimited 方式序列化. [EN: @note: Serialized in Delimited way.] - */ -/** xy 信息如下: [EN: xy info as follows:] - byte 1-2: x 坐标, byte1高字节,最高位为符号位, byte2为低字节; [EN: byte 1-2: x coordinate, byte1 high byte, highest bit is sign bit, byte2 is low byte;] - byte 3-4: y 坐标,byte3高字节,最高位为符号位, byte4为低字节; [EN: byte 3-4: y coordinate, byte3 high byte, highest bit is sign bit, byte4 is low byte;] - flags 信息如下: [EN: flags info as follows:] - byte 1: flags信息, [EN: byte 1: flags info,] - bit 0-3 类型,见下方定义: [EN: bit 0-3 type, see definitions below:] - SWEEP = 0, // 纯扫 [EN: SWEEP = 0, // Sweep only] - MOP = 1, // 纯拖地 [EN: MOP = 1, // Mop only] - SWEEP_MOP = 2, // 扫+拖地 [EN: SWEEP_MOP = 2, // Sweep + mop] - FAST_MAPPING = 3, // 快速建图运行轨迹 [EN: FAST_MAPPING = 3, // Fast mapping path] - CRUISIING = 4, // 全屋巡航运行轨迹 [EN: CRUISIING = 4, // Whole house cruise path] - POINT_TO_POINT = 5, // 指哪到哪运行轨迹 [EN: POINT_TO_POINT = 5, // Point-to-point path] - REMOTE_CTRL = 6, // 遥控运行轨迹 [EN: REMOTE_CTRL = 6, // Remote control path] - GO_CHARGE_IN_WORK = 7, // 任务中回充轨迹 [EN: GO_CHARGE_IN_WORK = 7, // Return to charge path during task] - GO_CHARGE = 8, // 任务结束回充轨迹 [EN: GO_CHARGE = 8, // Return to charge path after task] - GO_WASH_IN_WORK = 9, // 任务中回洗轨迹 [EN: GO_WASH_IN_WORK = 9, // Return to wash path during task] - GO_WASH = 10, // 任务结束回洗轨迹 [EN: GO_WASH = 10, // Return to wash path after task] - EXPLORE_STATIONS = 11, // 探索基站轨迹 [EN: EXPLORE_STATIONS = 11, // Explore station path] - NAVIGATION = 12, // 分区之间导航轨迹 [EN: NAVIGATION = 12, // Navigation path between partitions] - RESUME_CLEANING = 13, // 回充回洗后的续扫轨迹 [EN: RESUME_CLEANING = 13, // Resume cleaning path after return to charge/wash] - RETURN_START_POINT = 14, // 回充失败再返回起点的轨迹 [EN: RETURN_START_POINT = 14, // Return to start point path after failed charge return] - HIDE = 15, // 隐藏轨迹(轨迹优化使用)同时需要使能 AppFunction.optimization.PATH_HIDE_TYPE [EN: HIDE = 15, // Hidden path (used for path optimization) also need to enable AppFunction.optimization.PATH_HIDE_TYPE] - bit 4: 状态,0 - 继续上一轨迹点, 1 - 新轨迹点,与上一轨迹点不连续; [EN: bit 4: state, 0 - continue from last path point, 1 - new path point, not continuous with last;] - bit 5: 是否显示轨迹,0 - 不显示,1 - 显示; [EN: bit 5: whether to show path, 0 - don't show, 1 - show;] - bit 6: 是否显示机器人,0 - 不显示,1 - 显示; [EN: bit 6: whether to show robot, 0 - don't show, 1 - show;] - bit 7: 预留; [EN: bit 7: reserved;] - byte 2: task_motion_type; [EN: byte 2: task_motion_type;] - byte 3-4: 预留; [EN: byte 3-4: reserved;] - */ -message PathPoint { - // bit0~15 为 x 坐标 [EN: bit0~15 is x coordinate] - // bit16~31 为 y 坐标 [EN: bit16~31 is y coordinate] - uint32 xy = 1; - // bit0~3 为 point_type [EN: bit0~3 is point_type] - // bit4 为 break_type [EN: bit4 is break_type] - // bit5 为 show_trajectory_flag [EN: bit5 is show_trajectory_flag] - // bit6 为 show_robot_flag [EN: bit6 is show_robot_flag] - // bit7 预留 [EN: bit7 reserved] - // bit8~15 为 task_motion_type [EN: bit8~15 is task_motion_type] - // bit16~23 预留 [EN: bit16~23 reserved] - // bit24~31 预留 [EN: bit24~31 reserved] - uint32 flags = 2; -} - -/** - * 房间轮廓信息(使用包含分区信息的地图),单次上传. [EN: Room outline information (using map with partition info), single upload.] - * - * @note: Delimited 方式序列化. [EN: @note: Serialized in Delimited way.] - */ - message RoomOutline { - uint32 map_id = 1; // map 的 id 号 [EN: Map ID number] - uint32 releases = 2; // map 的大版本修正号 [EN: Map major version revision number] - - uint32 width = 3; - uint32 height = 4; - uint32 resolution = 5; // 单位: m x 100 [EN: Unit: m x 100] - Point origin = 6; - - /** - * 地图像素数据,目前采用 LZ4 压缩; [EN: Map pixel data, currently using LZ4 compression;] - * 每个像素占 1byte,表示房间 id [EN: Each pixel occupies 1 byte, represents room ID] - */ - bytes pixels = 7; // 地图压缩 [EN: Map compressed] - - /** - * 地图像素原始size, 如果pixels有压缩,则 pixel_size 表示解压后的长度. [EN: Original map pixel size, if pixels are compressed, pixel_size represents the decompressed length.] - */ - uint32 pixel_size = 8; -} - -/** - * 房间参数,单次上传. [EN: Room parameters, single upload.] - * - * @note: Delimited 方式序列化. [EN: @note: Serialized in Delimited way.] - */ -message RoomParams { - // 定制化清扫参数使能. [EN: Customized cleaning parameters enable.] - bool custom_enable = 1; // x10 以后不再使用 [EN: No longer used after x10] - - message Room { - uint32 id = 1; - string name = 2; // 默认名称为 "",表示未命名 [EN: Default name is "", means unnamed] - Floor floor = 3; - RoomScene scene = 4; // 场景(类型+索引) [EN: Scene (type + index)] - - // 定制化顺序. [EN: Customized order.] - message Order { - uint32 value = 1; - } - Order order = 6; - - // 定制化参数. [EN: Customized parameters.] - message Custom { - CleanType clean_type = 1; - Fan fan = 2; - MopMode mop_mode = 3; - CleanExtent clean_extent = 4; - uint32 clean_times = 5; // 清扫次数,非 0 有效 [EN: Cleaning times, non-zero is valid] - } - Custom custom = 7; - } - repeated Room rooms = 2; - - uint32 map_id = 3; // map 的 id 号 [EN: Map ID number] - uint32 releases = 4; // map 的大版本修正号 [EN: Map major version revision number] - - // enum ModeType { - // CUSTOM = 0; // 通用/定制模式,x10 以后不再使用 [EN: General/custom mode, no longer used after x10] - // SMART = 1; // 智能模式 [EN: Smart mode] - // } - // ModeType mode_type = 5; - Switch smart_mode_sw = 6; // 智能省心模式开关 [EN: Smart hassle-free mode switch] -} - -/** - * 禁区信息,单次上传. [EN: Restricted zone information, single upload.] - * - * @note: Delimited 方式序列化. [EN: @note: Serialized in Delimited way.] - */ -message RestrictedZone { - repeated Line virtual_walls = 1; - repeated Quadrangle forbidden_zones = 2; - repeated Quadrangle ban_mop_zones = 3; - - uint32 map_id = 4; // map 的 id 号 [EN: Map ID number] - uint32 releases = 5; // map 的大版本修正号 [EN: Map major version revision number] - - // 自动推荐,只有推荐的禁区有 id 信息,由机器端生成,逐渐增加 [EN: Auto recommendation, only recommended restricted zones have id info, generated by device, gradually increases] - // 机器要做到: [EN: Device should:] - // 1. 存在推荐禁区后,再收到一次编辑禁区消息,需要删除推荐禁区,将设置的推荐禁区转为编辑禁区 [EN: 1. After recommended restricted zone exists, upon receiving edit restricted zone message again, need to delete recommended zone and convert set recommended zone to edited zone] - // 2. 推荐的禁区没有被设置,那么机器后面就不应该再推荐这个禁区 [EN: 2. If recommended restricted zone is not set, device should not recommend this zone again later] - message Suggestion { - message LineWrap { - uint32 id = 1; - Line line = 2; - } - message QuadrangleWrap { - uint32 id = 1; - Quadrangle quadrangle = 2; - } - - repeated LineWrap virtual_walls = 1; - repeated QuadrangleWrap forbidden_zones = 2; - repeated QuadrangleWrap ban_mop_zones = 3; - } - Suggestion suggestion = 7; -} - -/** - * 动态数据,单次上传. [EN: Dynamic data, single upload.] - * - * @note: Delimited 方式序列化. [EN: @note: Serialized in Delimited way.] - */ -message DynamicData { - Pose cur_pose = 1; // 当前位姿 [EN: Current pose] -} - -/** - * 存储临时数据,机器端不主动清除,app根据workstatus自行判断数据是否有效. [EN: Store temporary data, device doesn't proactively clear, app judges data validity based on workstatus.] - * 单次上传. [EN: Single upload.] - * - * @note: Delimited 方式序列化. [EN: @note: Serialized in Delimited way.] - */ -message TemporaryData { - .proto.cloud.SelectRoomsClean select_rooms_clean = 1; - .proto.cloud.SelectZonesClean select_zones_clean = 2; - .proto.cloud.Goto goto_location = 3; - .proto.cloud.PointCruise select_point_cruise = 4; - .proto.cloud.ZonesCruise select_zones_cruise = 5; -} - -/** - * 物体数据信息,单次上传. [EN: Object data information, single upload.] - * - * @note: Delimited 方式序列化. [EN: @note: Serialized in Delimited way.] - */ -message ObstacleInfo { - uint32 map_id = 1; // map 的 id 号 [EN: Map ID number] - uint32 releases = 2; // map 的大版本修正号 [EN: Map major version revision number] - - message Obstacle { - string object_type = 1; - - enum ShowType { - POSITION = 0; // 坐标: show_points 只有一个 [EN: Coordinate: show_points has only one] - OUTLINE = 1; // 轮廓 [EN: Outline] - FILL = 2; // 填充 [EN: Fill] - BITMAP = 3; // 位图(左上坐标+长宽+mask序列,bit为0表示空,为1表示存在) [EN: Bitmap (top-left coordinate + width/height + mask sequence, bit 0 means empty, 1 means exists)] - } - ShowType show_type = 2; - - repeated Point show_points = 3; // TODO: 考虑 3D [EN: TODO: Consider 3D] - - message Bitmap { - Point ref_point = 1; // 参考点,bitmap 以此为左上角 [EN: Reference point, bitmap uses this as top-left corner] - uint32 width = 2; - uint32 height = 3; - uint32 data_len = 4; - bytes data = 5; // 单bit描述一个点,bit为0表示空,为1表示存在 [EN: Single bit describes one point, bit 0 means empty, 1 means exists] - } - Bitmap bitmap = 4; - - sint32 theta = 5; // 物体方向,单位: rad * 100 [EN: Object direction, unit: rad * 100] - - string photo_id = 6; // 照片 id [EN: Photo ID] - - uint32 accuracy = 7; // 准确率,0~100,表示百分比(0 表示无效) [EN: Accuracy, 0~100, represents percentage (0 means invalid)] - - message Valid { - bool value = 1; - } - Valid valid = 8; // 是否有效 [EN: Whether valid] - } - repeated Obstacle obstacles = 3; -} - -/** - * 巡航数据. [EN: Cruise data.] - * 更新频率:巡航指令后更新一次(照片 id 为空),结束巡航后更新一次(一次性写入照片 id) [EN: Update frequency: update once after cruise command (photo id is empty), update once after cruise ends (write photo id all at once)] - * - * @note: Delimited 方式序列化. [EN: @note: Serialized in Delimited way.] - */ -message CruiseData { - message ProcessData { - Point points = 1; // 巡航点(收到巡航指令后更新一次,照片 id 可为空) [EN: Cruise point (update once after receiving cruise command, photo id can be empty)] - - repeated string photo_id = 2; // 每个巡航点关联的照片 id(结束巡航一次性写入) [EN: Photo ids associated with each cruise point (write all at once when cruise ends)] - } - repeated ProcessData cruise_data = 1; - - uint32 map_id = 2; // map 的 id 号 [EN: Map ID number] - uint32 releases = 3; // map 的大版本修正号 [EN: Map major version revision number] -} - -/** - * 地图描述,单次上传. [EN: Map description, single upload.] - * - * @note: Delimited 方式序列化. [EN: @note: Serialized in Delimited way.] - */ - message MapDescription { - // id 1 不再使用 [EN: id 1 no longer used] - - string name = 2; // 地图名 [EN: Map name] - uint32 create_cause = 3; - uint64 create_time = 4; // 创建时间 [EN: Creation time] - uint64 last_time = 5; // 最后更新时间 [EN: Last update time] - uint32 map_id = 6; // map 的 id 号 [EN: Map ID number] - uint32 releases = 7; // map 的大版本修正号 [EN: Map major version revision number] -} - -/** - * 地图备份,单次上传. [EN: Map backup, single upload.] - * - * @note: Delimited 方式序列化. [EN: @note: Serialized in Delimited way.] - */ -message MapBackup { - MapDescription desc = 1; - Map map = 2; - RoomOutline rooms = 3; - RoomParams room_params = 4; - RestrictedZone restricted_zone = 5; -} - -/** - * 场景信息,单次上传. [EN: Scene information, single upload.] - * - * @note: Delimited 方式序列化. [EN: @note: Serialized in Delimited way.] - */ -message SceneWrap { - message Scene { - SceneInfo info = 1; - repeated SceneTask tasks = 2; - } - repeated Scene scenes = 1; -} diff --git a/proto-reference/stream_pb2.py b/proto-reference/stream_pb2.py deleted file mode 100644 index cec85c8..0000000 --- a/proto-reference/stream_pb2.py +++ /dev/null @@ -1,96 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: proto/cloud/stream.proto -"""Generated protocol buffer code.""" -from google.protobuf import descriptor as _descriptor -from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import symbol_database as _symbol_database -from google.protobuf.internal import builder as _builder - -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - -from ...proto.cloud import \ - clean_param_pb2 as proto_dot_cloud_dot_clean__param__pb2 -from ...proto.cloud import common_pb2 as proto_dot_cloud_dot_common__pb2 -from ...proto.cloud import control_pb2 as proto_dot_cloud_dot_control__pb2 -from ...proto.cloud import scene_pb2 as proto_dot_cloud_dot_scene__pb2 - -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x18proto/cloud/stream.proto\x12\x12proto.cloud.stream\x1a\x18proto/cloud/common.proto\x1a\x1dproto/cloud/clean_param.proto\x1a\x19proto/cloud/control.proto\x1a\x17proto/cloud/scene.proto\"\xf5\x02\n\x08Metadata\x12\x37\n\x08versions\x18\x01 \x01(\x0b\x32%.proto.cloud.stream.Metadata.Versions\x12\x36\n\x08\x63han_ids\x18\x02 \x01(\x0b\x32$.proto.cloud.stream.Metadata.ChanIds\x1a\x1c\n\x08Versions\x12\x10\n\x08map_data\x18\x01 \x01(\r\x1a\xd9\x01\n\x07\x43hanIds\x12\x10\n\x08map_info\x18\x01 \x01(\r\x12\x0c\n\x04path\x18\x02 \x01(\r\x12\x14\n\x0croom_outline\x18\x03 \x01(\r\x12\x13\n\x0broom_params\x18\x04 \x01(\r\x12\x17\n\x0frestricted_zone\x18\x05 \x01(\r\x12\x14\n\x0c\x64ynamic_data\x18\x06 \x01(\r\x12\x16\n\x0etemporary_data\x18\x07 \x01(\r\x12\x15\n\robstacle_info\x18\x08 \x01(\r\x12\x10\n\x08map_data\x18\t \x01(\r\x12\x13\n\x0b\x63ruise_data\x18\n \x01(\r\"\xd3\x03\n\x07MapInfo\x12\x0e\n\x06map_id\x18\x01 \x01(\r\x12\r\n\x05width\x18\x02 \x01(\r\x12\x0e\n\x06height\x18\x03 \x01(\r\x12\x12\n\nresolution\x18\x04 \x01(\r\x12\"\n\x06origin\x18\x05 \x01(\x0b\x32\x12.proto.cloud.Point\x12 \n\x05\x64ocks\x18\x06 \x03(\x0b\x32\x11.proto.cloud.Pose\x12.\n\x04type\x18\x07 \x01(\x0e\x32 .proto.cloud.stream.MapInfo.Type\x12\x0b\n\x03seq\x18\x08 \x01(\r\x12\r\n\x05\x61ngle\x18\t \x01(\r\x12\x32\n\x08\x64ocks_v2\x18\n \x03(\x0b\x32 .proto.cloud.stream.MapInfo.Dock\x1a~\n\x04\x44ock\x12\x33\n\x04type\x18\x01 \x01(\x0e\x32%.proto.cloud.stream.MapInfo.Dock.Type\x12\x1f\n\x04pose\x18\x02 \x01(\x0b\x32\x11.proto.cloud.Pose\" \n\x04Type\x12\x0b\n\x07\x41\x44\x41PTER\x10\x00\x12\x0b\n\x07STATION\x10\x01\"?\n\x04Type\x12\x0e\n\nINCOMPLETE\x10\x00\x12\t\n\x05ROUGH\x10\x01\x12\r\n\tEFFECTIVE\x10\x02\x12\r\n\tLIST_FULL\x10\x03\"\xe6\x02\n\x03Map\x12\x0e\n\x06map_id\x18\x01 \x01(\r\x12\x0b\n\x03seq\x18\x02 \x01(\r\x12,\n\x05\x66rame\x18\x03 \x01(\x0e\x32\x1d.proto.cloud.stream.Map.Frame\x12\x0e\n\x06pixels\x18\x04 \x01(\x0c\x12\x12\n\npixel_size\x18\x05 \x01(\r\x12)\n\x04info\x18\x06 \x01(\x0b\x32\x1b.proto.cloud.stream.MapInfo\x12\x0c\n\x04name\x18\x07 \x01(\t\x12\n\n\x02id\x18\x08 \x01(\r\x12\x10\n\x08releases\x18\t \x01(\r\x12,\n\x05index\x18\n \x01(\x0b\x32\x1d.proto.cloud.stream.Map.Index\x1a\x16\n\x05Index\x12\r\n\x05value\x18\x01 \x01(\r\"\x15\n\x05\x46rame\x12\x05\n\x01I\x10\x00\x12\x05\n\x01P\x10\x01\"<\n\nPixelValue\x12\n\n\x06UNKNOW\x10\x00\x12\x0c\n\x08OBSTACLE\x10\x01\x12\x08\n\x04\x46REE\x10\x02\x12\n\n\x06\x43\x41RPET\x10\x03\"&\n\tPathPoint\x12\n\n\x02xy\x18\x01 \x01(\r\x12\r\n\x05\x66lags\x18\x02 \x01(\r\"\xaa\x01\n\x0bRoomOutline\x12\x0e\n\x06map_id\x18\x01 \x01(\r\x12\x10\n\x08releases\x18\x02 \x01(\r\x12\r\n\x05width\x18\x03 \x01(\r\x12\x0e\n\x06height\x18\x04 \x01(\r\x12\x12\n\nresolution\x18\x05 \x01(\r\x12\"\n\x06origin\x18\x06 \x01(\x0b\x32\x12.proto.cloud.Point\x12\x0e\n\x06pixels\x18\x07 \x01(\x0c\x12\x12\n\npixel_size\x18\x08 \x01(\r\"\xe3\x04\n\nRoomParams\x12\x15\n\rcustom_enable\x18\x01 \x01(\x08\x12\x32\n\x05rooms\x18\x02 \x03(\x0b\x32#.proto.cloud.stream.RoomParams.Room\x12\x0e\n\x06map_id\x18\x03 \x01(\r\x12\x10\n\x08releases\x18\x04 \x01(\r\x12*\n\rsmart_mode_sw\x18\x06 \x01(\x0b\x32\x13.proto.cloud.Switch\x1a\xbb\x03\n\x04Room\x12\n\n\x02id\x18\x01 \x01(\r\x12\x0c\n\x04name\x18\x02 \x01(\t\x12!\n\x05\x66loor\x18\x03 \x01(\x0b\x32\x12.proto.cloud.Floor\x12%\n\x05scene\x18\x04 \x01(\x0b\x32\x16.proto.cloud.RoomScene\x12\x38\n\x05order\x18\x06 \x01(\x0b\x32).proto.cloud.stream.RoomParams.Room.Order\x12:\n\x06\x63ustom\x18\x07 \x01(\x0b\x32*.proto.cloud.stream.RoomParams.Room.Custom\x1a\x16\n\x05Order\x12\r\n\x05value\x18\x01 \x01(\r\x1a\xc0\x01\n\x06\x43ustom\x12*\n\nclean_type\x18\x01 \x01(\x0b\x32\x16.proto.cloud.CleanType\x12\x1d\n\x03\x66\x61n\x18\x02 \x01(\x0b\x32\x10.proto.cloud.Fan\x12&\n\x08mop_mode\x18\x03 \x01(\x0b\x32\x14.proto.cloud.MopMode\x12.\n\x0c\x63lean_extent\x18\x04 \x01(\x0b\x32\x18.proto.cloud.CleanExtent\x12\x13\n\x0b\x63lean_times\x18\x05 \x01(\r\"\x8f\x05\n\x0eRestrictedZone\x12(\n\rvirtual_walls\x18\x01 \x03(\x0b\x32\x11.proto.cloud.Line\x12\x30\n\x0f\x66orbidden_zones\x18\x02 \x03(\x0b\x32\x17.proto.cloud.Quadrangle\x12.\n\rban_mop_zones\x18\x03 \x03(\x0b\x32\x17.proto.cloud.Quadrangle\x12\x0e\n\x06map_id\x18\x04 \x01(\r\x12\x10\n\x08releases\x18\x05 \x01(\r\x12\x41\n\nsuggestion\x18\x07 \x01(\x0b\x32-.proto.cloud.stream.RestrictedZone.Suggestion\x1a\x8b\x03\n\nSuggestion\x12M\n\rvirtual_walls\x18\x01 \x03(\x0b\x32\x36.proto.cloud.stream.RestrictedZone.Suggestion.LineWrap\x12U\n\x0f\x66orbidden_zones\x18\x02 \x03(\x0b\x32<.proto.cloud.stream.RestrictedZone.Suggestion.QuadrangleWrap\x12S\n\rban_mop_zones\x18\x03 \x03(\x0b\x32<.proto.cloud.stream.RestrictedZone.Suggestion.QuadrangleWrap\x1a\x37\n\x08LineWrap\x12\n\n\x02id\x18\x01 \x01(\r\x12\x1f\n\x04line\x18\x02 \x01(\x0b\x32\x11.proto.cloud.Line\x1aI\n\x0eQuadrangleWrap\x12\n\n\x02id\x18\x01 \x01(\r\x12+\n\nquadrangle\x18\x02 \x01(\x0b\x32\x17.proto.cloud.Quadrangle\"2\n\x0b\x44ynamicData\x12#\n\x08\x63ur_pose\x18\x01 \x01(\x0b\x32\x11.proto.cloud.Pose\"\x9d\x02\n\rTemporaryData\x12\x39\n\x12select_rooms_clean\x18\x01 \x01(\x0b\x32\x1d.proto.cloud.SelectRoomsClean\x12\x39\n\x12select_zones_clean\x18\x02 \x01(\x0b\x32\x1d.proto.cloud.SelectZonesClean\x12(\n\rgoto_location\x18\x03 \x01(\x0b\x32\x11.proto.cloud.Goto\x12\x35\n\x13select_point_cruise\x18\x04 \x01(\x0b\x32\x18.proto.cloud.PointCruise\x12\x35\n\x13select_zones_cruise\x18\x05 \x01(\x0b\x32\x18.proto.cloud.ZonesCruise\"\xfa\x04\n\x0cObstacleInfo\x12\x0e\n\x06map_id\x18\x01 \x01(\r\x12\x10\n\x08releases\x18\x02 \x01(\r\x12<\n\tobstacles\x18\x03 \x03(\x0b\x32).proto.cloud.stream.ObstacleInfo.Obstacle\x1a\x89\x04\n\x08Obstacle\x12\x13\n\x0bobject_type\x18\x01 \x01(\t\x12\x45\n\tshow_type\x18\x02 \x01(\x0e\x32\x32.proto.cloud.stream.ObstacleInfo.Obstacle.ShowType\x12\'\n\x0bshow_points\x18\x03 \x03(\x0b\x32\x12.proto.cloud.Point\x12@\n\x06\x62itmap\x18\x04 \x01(\x0b\x32\x30.proto.cloud.stream.ObstacleInfo.Obstacle.Bitmap\x12\r\n\x05theta\x18\x05 \x01(\x11\x12\x10\n\x08photo_id\x18\x06 \x01(\t\x12\x10\n\x08\x61\x63\x63uracy\x18\x07 \x01(\r\x12>\n\x05valid\x18\x08 \x01(\x0b\x32/.proto.cloud.stream.ObstacleInfo.Obstacle.Valid\x1an\n\x06\x42itmap\x12%\n\tref_point\x18\x01 \x01(\x0b\x32\x12.proto.cloud.Point\x12\r\n\x05width\x18\x02 \x01(\r\x12\x0e\n\x06height\x18\x03 \x01(\r\x12\x10\n\x08\x64\x61ta_len\x18\x04 \x01(\r\x12\x0c\n\x04\x64\x61ta\x18\x05 \x01(\x0c\x1a\x16\n\x05Valid\x12\r\n\x05value\x18\x01 \x01(\x08\";\n\x08ShowType\x12\x0c\n\x08POSITION\x10\x00\x12\x0b\n\x07OUTLINE\x10\x01\x12\x08\n\x04\x46ILL\x10\x02\x12\n\n\x06\x42ITMAP\x10\x03\"\xb4\x01\n\nCruiseData\x12?\n\x0b\x63ruise_data\x18\x01 \x03(\x0b\x32*.proto.cloud.stream.CruiseData.ProcessData\x12\x0e\n\x06map_id\x18\x02 \x01(\r\x12\x10\n\x08releases\x18\x03 \x01(\r\x1a\x43\n\x0bProcessData\x12\"\n\x06points\x18\x01 \x01(\x0b\x32\x12.proto.cloud.Point\x12\x10\n\x08photo_id\x18\x02 \x03(\t\"~\n\x0eMapDescription\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x14\n\x0c\x63reate_cause\x18\x03 \x01(\r\x12\x13\n\x0b\x63reate_time\x18\x04 \x01(\x04\x12\x11\n\tlast_time\x18\x05 \x01(\x04\x12\x0e\n\x06map_id\x18\x06 \x01(\r\x12\x10\n\x08releases\x18\x07 \x01(\r\"\x85\x02\n\tMapBackup\x12\x30\n\x04\x64\x65sc\x18\x01 \x01(\x0b\x32\".proto.cloud.stream.MapDescription\x12$\n\x03map\x18\x02 \x01(\x0b\x32\x17.proto.cloud.stream.Map\x12.\n\x05rooms\x18\x03 \x01(\x0b\x32\x1f.proto.cloud.stream.RoomOutline\x12\x33\n\x0broom_params\x18\x04 \x01(\x0b\x32\x1e.proto.cloud.stream.RoomParams\x12;\n\x0frestricted_zone\x18\x05 \x01(\x0b\x32\".proto.cloud.stream.RestrictedZone\"\x96\x01\n\tSceneWrap\x12\x33\n\x06scenes\x18\x01 \x03(\x0b\x32#.proto.cloud.stream.SceneWrap.Scene\x1aT\n\x05Scene\x12$\n\x04info\x18\x01 \x01(\x0b\x32\x16.proto.cloud.SceneInfo\x12%\n\x05tasks\x18\x02 \x03(\x0b\x32\x16.proto.cloud.SceneTaskb\x06proto3') - -_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'proto.cloud.stream_pb2', globals()) -if _descriptor._USE_C_DESCRIPTORS == False: - - DESCRIPTOR._options = None - _METADATA._serialized_start=158 - _METADATA._serialized_end=531 - _METADATA_VERSIONS._serialized_start=283 - _METADATA_VERSIONS._serialized_end=311 - _METADATA_CHANIDS._serialized_start=314 - _METADATA_CHANIDS._serialized_end=531 - _MAPINFO._serialized_start=534 - _MAPINFO._serialized_end=1001 - _MAPINFO_DOCK._serialized_start=810 - _MAPINFO_DOCK._serialized_end=936 - _MAPINFO_DOCK_TYPE._serialized_start=904 - _MAPINFO_DOCK_TYPE._serialized_end=936 - _MAPINFO_TYPE._serialized_start=938 - _MAPINFO_TYPE._serialized_end=1001 - _MAP._serialized_start=1004 - _MAP._serialized_end=1362 - _MAP_INDEX._serialized_start=1255 - _MAP_INDEX._serialized_end=1277 - _MAP_FRAME._serialized_start=1279 - _MAP_FRAME._serialized_end=1300 - _MAP_PIXELVALUE._serialized_start=1302 - _MAP_PIXELVALUE._serialized_end=1362 - _PATHPOINT._serialized_start=1364 - _PATHPOINT._serialized_end=1402 - _ROOMOUTLINE._serialized_start=1405 - _ROOMOUTLINE._serialized_end=1575 - _ROOMPARAMS._serialized_start=1578 - _ROOMPARAMS._serialized_end=2189 - _ROOMPARAMS_ROOM._serialized_start=1746 - _ROOMPARAMS_ROOM._serialized_end=2189 - _ROOMPARAMS_ROOM_ORDER._serialized_start=1972 - _ROOMPARAMS_ROOM_ORDER._serialized_end=1994 - _ROOMPARAMS_ROOM_CUSTOM._serialized_start=1997 - _ROOMPARAMS_ROOM_CUSTOM._serialized_end=2189 - _RESTRICTEDZONE._serialized_start=2192 - _RESTRICTEDZONE._serialized_end=2847 - _RESTRICTEDZONE_SUGGESTION._serialized_start=2452 - _RESTRICTEDZONE_SUGGESTION._serialized_end=2847 - _RESTRICTEDZONE_SUGGESTION_LINEWRAP._serialized_start=2717 - _RESTRICTEDZONE_SUGGESTION_LINEWRAP._serialized_end=2772 - _RESTRICTEDZONE_SUGGESTION_QUADRANGLEWRAP._serialized_start=2774 - _RESTRICTEDZONE_SUGGESTION_QUADRANGLEWRAP._serialized_end=2847 - _DYNAMICDATA._serialized_start=2849 - _DYNAMICDATA._serialized_end=2899 - _TEMPORARYDATA._serialized_start=2902 - _TEMPORARYDATA._serialized_end=3187 - _OBSTACLEINFO._serialized_start=3190 - _OBSTACLEINFO._serialized_end=3824 - _OBSTACLEINFO_OBSTACLE._serialized_start=3303 - _OBSTACLEINFO_OBSTACLE._serialized_end=3824 - _OBSTACLEINFO_OBSTACLE_BITMAP._serialized_start=3629 - _OBSTACLEINFO_OBSTACLE_BITMAP._serialized_end=3739 - _OBSTACLEINFO_OBSTACLE_VALID._serialized_start=3741 - _OBSTACLEINFO_OBSTACLE_VALID._serialized_end=3763 - _OBSTACLEINFO_OBSTACLE_SHOWTYPE._serialized_start=3765 - _OBSTACLEINFO_OBSTACLE_SHOWTYPE._serialized_end=3824 - _CRUISEDATA._serialized_start=3827 - _CRUISEDATA._serialized_end=4007 - _CRUISEDATA_PROCESSDATA._serialized_start=3940 - _CRUISEDATA_PROCESSDATA._serialized_end=4007 - _MAPDESCRIPTION._serialized_start=4009 - _MAPDESCRIPTION._serialized_end=4135 - _MAPBACKUP._serialized_start=4138 - _MAPBACKUP._serialized_end=4399 - _SCENEWRAP._serialized_start=4402 - _SCENEWRAP._serialized_end=4552 - _SCENEWRAP_SCENE._serialized_start=4468 - _SCENEWRAP_SCENE._serialized_end=4552 -# @@protoc_insertion_point(module_scope) diff --git a/proto-reference/stream_pb2.pyi b/proto-reference/stream_pb2.pyi deleted file mode 100644 index e948bd4..0000000 --- a/proto-reference/stream_pb2.pyi +++ /dev/null @@ -1,380 +0,0 @@ -from typing import ClassVar as _ClassVar -from typing import Iterable as _Iterable -from typing import Mapping as _Mapping -from typing import Optional as _Optional -from typing import Union as _Union - -from google.protobuf import descriptor as _descriptor -from google.protobuf import message as _message -from google.protobuf.internal import containers as _containers -from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper - -from ...proto.cloud import clean_param_pb2 as _clean_param_pb2 -from ...proto.cloud import common_pb2 as _common_pb2 -from ...proto.cloud import control_pb2 as _control_pb2 -from ...proto.cloud import scene_pb2 as _scene_pb2 - -DESCRIPTOR: _descriptor.FileDescriptor - -class CruiseData(_message.Message): - __slots__ = ["cruise_data", "map_id", "releases"] - class ProcessData(_message.Message): - __slots__ = ["photo_id", "points"] - PHOTO_ID_FIELD_NUMBER: _ClassVar[int] - POINTS_FIELD_NUMBER: _ClassVar[int] - photo_id: _containers.RepeatedScalarFieldContainer[str] - points: _common_pb2.Point - def __init__(self, points: _Optional[_Union[_common_pb2.Point, _Mapping]] = ..., photo_id: _Optional[_Iterable[str]] = ...) -> None: ... - CRUISE_DATA_FIELD_NUMBER: _ClassVar[int] - MAP_ID_FIELD_NUMBER: _ClassVar[int] - RELEASES_FIELD_NUMBER: _ClassVar[int] - cruise_data: _containers.RepeatedCompositeFieldContainer[CruiseData.ProcessData] - map_id: int - releases: int - def __init__(self, cruise_data: _Optional[_Iterable[_Union[CruiseData.ProcessData, _Mapping]]] = ..., map_id: _Optional[int] = ..., releases: _Optional[int] = ...) -> None: ... - -class DynamicData(_message.Message): - __slots__ = ["cur_pose"] - CUR_POSE_FIELD_NUMBER: _ClassVar[int] - cur_pose: _common_pb2.Pose - def __init__(self, cur_pose: _Optional[_Union[_common_pb2.Pose, _Mapping]] = ...) -> None: ... - -class Map(_message.Message): - __slots__ = ["frame", "id", "index", "info", "map_id", "name", "pixel_size", "pixels", "releases", "seq"] - class Frame(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - class PixelValue(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - class Index(_message.Message): - __slots__ = ["value"] - VALUE_FIELD_NUMBER: _ClassVar[int] - value: int - def __init__(self, value: _Optional[int] = ...) -> None: ... - CARPET: Map.PixelValue - FRAME_FIELD_NUMBER: _ClassVar[int] - FREE: Map.PixelValue - I: Map.Frame - ID_FIELD_NUMBER: _ClassVar[int] - INDEX_FIELD_NUMBER: _ClassVar[int] - INFO_FIELD_NUMBER: _ClassVar[int] - MAP_ID_FIELD_NUMBER: _ClassVar[int] - NAME_FIELD_NUMBER: _ClassVar[int] - OBSTACLE: Map.PixelValue - P: Map.Frame - PIXELS_FIELD_NUMBER: _ClassVar[int] - PIXEL_SIZE_FIELD_NUMBER: _ClassVar[int] - RELEASES_FIELD_NUMBER: _ClassVar[int] - SEQ_FIELD_NUMBER: _ClassVar[int] - UNKNOW: Map.PixelValue - frame: Map.Frame - id: int - index: Map.Index - info: MapInfo - map_id: int - name: str - pixel_size: int - pixels: bytes - releases: int - seq: int - def __init__(self, map_id: _Optional[int] = ..., seq: _Optional[int] = ..., frame: _Optional[_Union[Map.Frame, str]] = ..., pixels: _Optional[bytes] = ..., pixel_size: _Optional[int] = ..., info: _Optional[_Union[MapInfo, _Mapping]] = ..., name: _Optional[str] = ..., id: _Optional[int] = ..., releases: _Optional[int] = ..., index: _Optional[_Union[Map.Index, _Mapping]] = ...) -> None: ... - -class MapBackup(_message.Message): - __slots__ = ["desc", "map", "restricted_zone", "room_params", "rooms"] - DESC_FIELD_NUMBER: _ClassVar[int] - MAP_FIELD_NUMBER: _ClassVar[int] - RESTRICTED_ZONE_FIELD_NUMBER: _ClassVar[int] - ROOMS_FIELD_NUMBER: _ClassVar[int] - ROOM_PARAMS_FIELD_NUMBER: _ClassVar[int] - desc: MapDescription - map: Map - restricted_zone: RestrictedZone - room_params: RoomParams - rooms: RoomOutline - def __init__(self, desc: _Optional[_Union[MapDescription, _Mapping]] = ..., map: _Optional[_Union[Map, _Mapping]] = ..., rooms: _Optional[_Union[RoomOutline, _Mapping]] = ..., room_params: _Optional[_Union[RoomParams, _Mapping]] = ..., restricted_zone: _Optional[_Union[RestrictedZone, _Mapping]] = ...) -> None: ... - -class MapDescription(_message.Message): - __slots__ = ["create_cause", "create_time", "last_time", "map_id", "name", "releases"] - CREATE_CAUSE_FIELD_NUMBER: _ClassVar[int] - CREATE_TIME_FIELD_NUMBER: _ClassVar[int] - LAST_TIME_FIELD_NUMBER: _ClassVar[int] - MAP_ID_FIELD_NUMBER: _ClassVar[int] - NAME_FIELD_NUMBER: _ClassVar[int] - RELEASES_FIELD_NUMBER: _ClassVar[int] - create_cause: int - create_time: int - last_time: int - map_id: int - name: str - releases: int - def __init__(self, name: _Optional[str] = ..., create_cause: _Optional[int] = ..., create_time: _Optional[int] = ..., last_time: _Optional[int] = ..., map_id: _Optional[int] = ..., releases: _Optional[int] = ...) -> None: ... - -class MapInfo(_message.Message): - __slots__ = ["angle", "docks", "docks_v2", "height", "map_id", "origin", "resolution", "seq", "type", "width"] - class Type(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - class Dock(_message.Message): - __slots__ = ["pose", "type"] - class Type(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - ADAPTER: MapInfo.Dock.Type - POSE_FIELD_NUMBER: _ClassVar[int] - STATION: MapInfo.Dock.Type - TYPE_FIELD_NUMBER: _ClassVar[int] - pose: _common_pb2.Pose - type: MapInfo.Dock.Type - def __init__(self, type: _Optional[_Union[MapInfo.Dock.Type, str]] = ..., pose: _Optional[_Union[_common_pb2.Pose, _Mapping]] = ...) -> None: ... - ANGLE_FIELD_NUMBER: _ClassVar[int] - DOCKS_FIELD_NUMBER: _ClassVar[int] - DOCKS_V2_FIELD_NUMBER: _ClassVar[int] - EFFECTIVE: MapInfo.Type - HEIGHT_FIELD_NUMBER: _ClassVar[int] - INCOMPLETE: MapInfo.Type - LIST_FULL: MapInfo.Type - MAP_ID_FIELD_NUMBER: _ClassVar[int] - ORIGIN_FIELD_NUMBER: _ClassVar[int] - RESOLUTION_FIELD_NUMBER: _ClassVar[int] - ROUGH: MapInfo.Type - SEQ_FIELD_NUMBER: _ClassVar[int] - TYPE_FIELD_NUMBER: _ClassVar[int] - WIDTH_FIELD_NUMBER: _ClassVar[int] - angle: int - docks: _containers.RepeatedCompositeFieldContainer[_common_pb2.Pose] - docks_v2: _containers.RepeatedCompositeFieldContainer[MapInfo.Dock] - height: int - map_id: int - origin: _common_pb2.Point - resolution: int - seq: int - type: MapInfo.Type - width: int - def __init__(self, map_id: _Optional[int] = ..., width: _Optional[int] = ..., height: _Optional[int] = ..., resolution: _Optional[int] = ..., origin: _Optional[_Union[_common_pb2.Point, _Mapping]] = ..., docks: _Optional[_Iterable[_Union[_common_pb2.Pose, _Mapping]]] = ..., type: _Optional[_Union[MapInfo.Type, str]] = ..., seq: _Optional[int] = ..., angle: _Optional[int] = ..., docks_v2: _Optional[_Iterable[_Union[MapInfo.Dock, _Mapping]]] = ...) -> None: ... - -class Metadata(_message.Message): - __slots__ = ["chan_ids", "versions"] - class ChanIds(_message.Message): - __slots__ = ["cruise_data", "dynamic_data", "map_data", "map_info", "obstacle_info", "path", "restricted_zone", "room_outline", "room_params", "temporary_data"] - CRUISE_DATA_FIELD_NUMBER: _ClassVar[int] - DYNAMIC_DATA_FIELD_NUMBER: _ClassVar[int] - MAP_DATA_FIELD_NUMBER: _ClassVar[int] - MAP_INFO_FIELD_NUMBER: _ClassVar[int] - OBSTACLE_INFO_FIELD_NUMBER: _ClassVar[int] - PATH_FIELD_NUMBER: _ClassVar[int] - RESTRICTED_ZONE_FIELD_NUMBER: _ClassVar[int] - ROOM_OUTLINE_FIELD_NUMBER: _ClassVar[int] - ROOM_PARAMS_FIELD_NUMBER: _ClassVar[int] - TEMPORARY_DATA_FIELD_NUMBER: _ClassVar[int] - cruise_data: int - dynamic_data: int - map_data: int - map_info: int - obstacle_info: int - path: int - restricted_zone: int - room_outline: int - room_params: int - temporary_data: int - def __init__(self, map_info: _Optional[int] = ..., path: _Optional[int] = ..., room_outline: _Optional[int] = ..., room_params: _Optional[int] = ..., restricted_zone: _Optional[int] = ..., dynamic_data: _Optional[int] = ..., temporary_data: _Optional[int] = ..., obstacle_info: _Optional[int] = ..., map_data: _Optional[int] = ..., cruise_data: _Optional[int] = ...) -> None: ... - class Versions(_message.Message): - __slots__ = ["map_data"] - MAP_DATA_FIELD_NUMBER: _ClassVar[int] - map_data: int - def __init__(self, map_data: _Optional[int] = ...) -> None: ... - CHAN_IDS_FIELD_NUMBER: _ClassVar[int] - VERSIONS_FIELD_NUMBER: _ClassVar[int] - chan_ids: Metadata.ChanIds - versions: Metadata.Versions - def __init__(self, versions: _Optional[_Union[Metadata.Versions, _Mapping]] = ..., chan_ids: _Optional[_Union[Metadata.ChanIds, _Mapping]] = ...) -> None: ... - -class ObstacleInfo(_message.Message): - __slots__ = ["map_id", "obstacles", "releases"] - class Obstacle(_message.Message): - __slots__ = ["accuracy", "bitmap", "object_type", "photo_id", "show_points", "show_type", "theta", "valid"] - class ShowType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - class Bitmap(_message.Message): - __slots__ = ["data", "data_len", "height", "ref_point", "width"] - DATA_FIELD_NUMBER: _ClassVar[int] - DATA_LEN_FIELD_NUMBER: _ClassVar[int] - HEIGHT_FIELD_NUMBER: _ClassVar[int] - REF_POINT_FIELD_NUMBER: _ClassVar[int] - WIDTH_FIELD_NUMBER: _ClassVar[int] - data: bytes - data_len: int - height: int - ref_point: _common_pb2.Point - width: int - def __init__(self, ref_point: _Optional[_Union[_common_pb2.Point, _Mapping]] = ..., width: _Optional[int] = ..., height: _Optional[int] = ..., data_len: _Optional[int] = ..., data: _Optional[bytes] = ...) -> None: ... - class Valid(_message.Message): - __slots__ = ["value"] - VALUE_FIELD_NUMBER: _ClassVar[int] - value: bool - def __init__(self, value: bool = ...) -> None: ... - ACCURACY_FIELD_NUMBER: _ClassVar[int] - BITMAP: ObstacleInfo.Obstacle.ShowType - BITMAP_FIELD_NUMBER: _ClassVar[int] - FILL: ObstacleInfo.Obstacle.ShowType - OBJECT_TYPE_FIELD_NUMBER: _ClassVar[int] - OUTLINE: ObstacleInfo.Obstacle.ShowType - PHOTO_ID_FIELD_NUMBER: _ClassVar[int] - POSITION: ObstacleInfo.Obstacle.ShowType - SHOW_POINTS_FIELD_NUMBER: _ClassVar[int] - SHOW_TYPE_FIELD_NUMBER: _ClassVar[int] - THETA_FIELD_NUMBER: _ClassVar[int] - VALID_FIELD_NUMBER: _ClassVar[int] - accuracy: int - bitmap: ObstacleInfo.Obstacle.Bitmap - object_type: str - photo_id: str - show_points: _containers.RepeatedCompositeFieldContainer[_common_pb2.Point] - show_type: ObstacleInfo.Obstacle.ShowType - theta: int - valid: ObstacleInfo.Obstacle.Valid - def __init__(self, object_type: _Optional[str] = ..., show_type: _Optional[_Union[ObstacleInfo.Obstacle.ShowType, str]] = ..., show_points: _Optional[_Iterable[_Union[_common_pb2.Point, _Mapping]]] = ..., bitmap: _Optional[_Union[ObstacleInfo.Obstacle.Bitmap, _Mapping]] = ..., theta: _Optional[int] = ..., photo_id: _Optional[str] = ..., accuracy: _Optional[int] = ..., valid: _Optional[_Union[ObstacleInfo.Obstacle.Valid, _Mapping]] = ...) -> None: ... - MAP_ID_FIELD_NUMBER: _ClassVar[int] - OBSTACLES_FIELD_NUMBER: _ClassVar[int] - RELEASES_FIELD_NUMBER: _ClassVar[int] - map_id: int - obstacles: _containers.RepeatedCompositeFieldContainer[ObstacleInfo.Obstacle] - releases: int - def __init__(self, map_id: _Optional[int] = ..., releases: _Optional[int] = ..., obstacles: _Optional[_Iterable[_Union[ObstacleInfo.Obstacle, _Mapping]]] = ...) -> None: ... - -class PathPoint(_message.Message): - __slots__ = ["flags", "xy"] - FLAGS_FIELD_NUMBER: _ClassVar[int] - XY_FIELD_NUMBER: _ClassVar[int] - flags: int - xy: int - def __init__(self, xy: _Optional[int] = ..., flags: _Optional[int] = ...) -> None: ... - -class RestrictedZone(_message.Message): - __slots__ = ["ban_mop_zones", "forbidden_zones", "map_id", "releases", "suggestion", "virtual_walls"] - class Suggestion(_message.Message): - __slots__ = ["ban_mop_zones", "forbidden_zones", "virtual_walls"] - class LineWrap(_message.Message): - __slots__ = ["id", "line"] - ID_FIELD_NUMBER: _ClassVar[int] - LINE_FIELD_NUMBER: _ClassVar[int] - id: int - line: _common_pb2.Line - def __init__(self, id: _Optional[int] = ..., line: _Optional[_Union[_common_pb2.Line, _Mapping]] = ...) -> None: ... - class QuadrangleWrap(_message.Message): - __slots__ = ["id", "quadrangle"] - ID_FIELD_NUMBER: _ClassVar[int] - QUADRANGLE_FIELD_NUMBER: _ClassVar[int] - id: int - quadrangle: _common_pb2.Quadrangle - def __init__(self, id: _Optional[int] = ..., quadrangle: _Optional[_Union[_common_pb2.Quadrangle, _Mapping]] = ...) -> None: ... - BAN_MOP_ZONES_FIELD_NUMBER: _ClassVar[int] - FORBIDDEN_ZONES_FIELD_NUMBER: _ClassVar[int] - VIRTUAL_WALLS_FIELD_NUMBER: _ClassVar[int] - ban_mop_zones: _containers.RepeatedCompositeFieldContainer[RestrictedZone.Suggestion.QuadrangleWrap] - forbidden_zones: _containers.RepeatedCompositeFieldContainer[RestrictedZone.Suggestion.QuadrangleWrap] - virtual_walls: _containers.RepeatedCompositeFieldContainer[RestrictedZone.Suggestion.LineWrap] - def __init__(self, virtual_walls: _Optional[_Iterable[_Union[RestrictedZone.Suggestion.LineWrap, _Mapping]]] = ..., forbidden_zones: _Optional[_Iterable[_Union[RestrictedZone.Suggestion.QuadrangleWrap, _Mapping]]] = ..., ban_mop_zones: _Optional[_Iterable[_Union[RestrictedZone.Suggestion.QuadrangleWrap, _Mapping]]] = ...) -> None: ... - BAN_MOP_ZONES_FIELD_NUMBER: _ClassVar[int] - FORBIDDEN_ZONES_FIELD_NUMBER: _ClassVar[int] - MAP_ID_FIELD_NUMBER: _ClassVar[int] - RELEASES_FIELD_NUMBER: _ClassVar[int] - SUGGESTION_FIELD_NUMBER: _ClassVar[int] - VIRTUAL_WALLS_FIELD_NUMBER: _ClassVar[int] - ban_mop_zones: _containers.RepeatedCompositeFieldContainer[_common_pb2.Quadrangle] - forbidden_zones: _containers.RepeatedCompositeFieldContainer[_common_pb2.Quadrangle] - map_id: int - releases: int - suggestion: RestrictedZone.Suggestion - virtual_walls: _containers.RepeatedCompositeFieldContainer[_common_pb2.Line] - def __init__(self, virtual_walls: _Optional[_Iterable[_Union[_common_pb2.Line, _Mapping]]] = ..., forbidden_zones: _Optional[_Iterable[_Union[_common_pb2.Quadrangle, _Mapping]]] = ..., ban_mop_zones: _Optional[_Iterable[_Union[_common_pb2.Quadrangle, _Mapping]]] = ..., map_id: _Optional[int] = ..., releases: _Optional[int] = ..., suggestion: _Optional[_Union[RestrictedZone.Suggestion, _Mapping]] = ...) -> None: ... - -class RoomOutline(_message.Message): - __slots__ = ["height", "map_id", "origin", "pixel_size", "pixels", "releases", "resolution", "width"] - HEIGHT_FIELD_NUMBER: _ClassVar[int] - MAP_ID_FIELD_NUMBER: _ClassVar[int] - ORIGIN_FIELD_NUMBER: _ClassVar[int] - PIXELS_FIELD_NUMBER: _ClassVar[int] - PIXEL_SIZE_FIELD_NUMBER: _ClassVar[int] - RELEASES_FIELD_NUMBER: _ClassVar[int] - RESOLUTION_FIELD_NUMBER: _ClassVar[int] - WIDTH_FIELD_NUMBER: _ClassVar[int] - height: int - map_id: int - origin: _common_pb2.Point - pixel_size: int - pixels: bytes - releases: int - resolution: int - width: int - def __init__(self, map_id: _Optional[int] = ..., releases: _Optional[int] = ..., width: _Optional[int] = ..., height: _Optional[int] = ..., resolution: _Optional[int] = ..., origin: _Optional[_Union[_common_pb2.Point, _Mapping]] = ..., pixels: _Optional[bytes] = ..., pixel_size: _Optional[int] = ...) -> None: ... - -class RoomParams(_message.Message): - __slots__ = ["custom_enable", "map_id", "releases", "rooms", "smart_mode_sw"] - class Room(_message.Message): - __slots__ = ["custom", "floor", "id", "name", "order", "scene"] - class Custom(_message.Message): - __slots__ = ["clean_extent", "clean_times", "clean_type", "fan", "mop_mode"] - CLEAN_EXTENT_FIELD_NUMBER: _ClassVar[int] - CLEAN_TIMES_FIELD_NUMBER: _ClassVar[int] - CLEAN_TYPE_FIELD_NUMBER: _ClassVar[int] - FAN_FIELD_NUMBER: _ClassVar[int] - MOP_MODE_FIELD_NUMBER: _ClassVar[int] - clean_extent: _clean_param_pb2.CleanExtent - clean_times: int - clean_type: _clean_param_pb2.CleanType - fan: _clean_param_pb2.Fan - mop_mode: _clean_param_pb2.MopMode - def __init__(self, clean_type: _Optional[_Union[_clean_param_pb2.CleanType, _Mapping]] = ..., fan: _Optional[_Union[_clean_param_pb2.Fan, _Mapping]] = ..., mop_mode: _Optional[_Union[_clean_param_pb2.MopMode, _Mapping]] = ..., clean_extent: _Optional[_Union[_clean_param_pb2.CleanExtent, _Mapping]] = ..., clean_times: _Optional[int] = ...) -> None: ... - class Order(_message.Message): - __slots__ = ["value"] - VALUE_FIELD_NUMBER: _ClassVar[int] - value: int - def __init__(self, value: _Optional[int] = ...) -> None: ... - CUSTOM_FIELD_NUMBER: _ClassVar[int] - FLOOR_FIELD_NUMBER: _ClassVar[int] - ID_FIELD_NUMBER: _ClassVar[int] - NAME_FIELD_NUMBER: _ClassVar[int] - ORDER_FIELD_NUMBER: _ClassVar[int] - SCENE_FIELD_NUMBER: _ClassVar[int] - custom: RoomParams.Room.Custom - floor: _common_pb2.Floor - id: int - name: str - order: RoomParams.Room.Order - scene: _common_pb2.RoomScene - def __init__(self, id: _Optional[int] = ..., name: _Optional[str] = ..., floor: _Optional[_Union[_common_pb2.Floor, _Mapping]] = ..., scene: _Optional[_Union[_common_pb2.RoomScene, _Mapping]] = ..., order: _Optional[_Union[RoomParams.Room.Order, _Mapping]] = ..., custom: _Optional[_Union[RoomParams.Room.Custom, _Mapping]] = ...) -> None: ... - CUSTOM_ENABLE_FIELD_NUMBER: _ClassVar[int] - MAP_ID_FIELD_NUMBER: _ClassVar[int] - RELEASES_FIELD_NUMBER: _ClassVar[int] - ROOMS_FIELD_NUMBER: _ClassVar[int] - SMART_MODE_SW_FIELD_NUMBER: _ClassVar[int] - custom_enable: bool - map_id: int - releases: int - rooms: _containers.RepeatedCompositeFieldContainer[RoomParams.Room] - smart_mode_sw: _common_pb2.Switch - def __init__(self, custom_enable: bool = ..., rooms: _Optional[_Iterable[_Union[RoomParams.Room, _Mapping]]] = ..., map_id: _Optional[int] = ..., releases: _Optional[int] = ..., smart_mode_sw: _Optional[_Union[_common_pb2.Switch, _Mapping]] = ...) -> None: ... - -class SceneWrap(_message.Message): - __slots__ = ["scenes"] - class Scene(_message.Message): - __slots__ = ["info", "tasks"] - INFO_FIELD_NUMBER: _ClassVar[int] - TASKS_FIELD_NUMBER: _ClassVar[int] - info: _scene_pb2.SceneInfo - tasks: _containers.RepeatedCompositeFieldContainer[_scene_pb2.SceneTask] - def __init__(self, info: _Optional[_Union[_scene_pb2.SceneInfo, _Mapping]] = ..., tasks: _Optional[_Iterable[_Union[_scene_pb2.SceneTask, _Mapping]]] = ...) -> None: ... - SCENES_FIELD_NUMBER: _ClassVar[int] - scenes: _containers.RepeatedCompositeFieldContainer[SceneWrap.Scene] - def __init__(self, scenes: _Optional[_Iterable[_Union[SceneWrap.Scene, _Mapping]]] = ...) -> None: ... - -class TemporaryData(_message.Message): - __slots__ = ["goto_location", "select_point_cruise", "select_rooms_clean", "select_zones_clean", "select_zones_cruise"] - GOTO_LOCATION_FIELD_NUMBER: _ClassVar[int] - SELECT_POINT_CRUISE_FIELD_NUMBER: _ClassVar[int] - SELECT_ROOMS_CLEAN_FIELD_NUMBER: _ClassVar[int] - SELECT_ZONES_CLEAN_FIELD_NUMBER: _ClassVar[int] - SELECT_ZONES_CRUISE_FIELD_NUMBER: _ClassVar[int] - goto_location: _control_pb2.Goto - select_point_cruise: _control_pb2.PointCruise - select_rooms_clean: _control_pb2.SelectRoomsClean - select_zones_clean: _control_pb2.SelectZonesClean - select_zones_cruise: _control_pb2.ZonesCruise - def __init__(self, select_rooms_clean: _Optional[_Union[_control_pb2.SelectRoomsClean, _Mapping]] = ..., select_zones_clean: _Optional[_Union[_control_pb2.SelectZonesClean, _Mapping]] = ..., goto_location: _Optional[_Union[_control_pb2.Goto, _Mapping]] = ..., select_point_cruise: _Optional[_Union[_control_pb2.PointCruise, _Mapping]] = ..., select_zones_cruise: _Optional[_Union[_control_pb2.ZonesCruise, _Mapping]] = ...) -> None: ... diff --git a/proto-reference/stream_wrap.proto b/proto-reference/stream_wrap.proto deleted file mode 100644 index 385cefa..0000000 --- a/proto-reference/stream_wrap.proto +++ /dev/null @@ -1,20 +0,0 @@ -/** - * 流通道协议包装. [EN: Stream channel protocol wrapper.] - * - * @note: 机器端使用,app忽略 [EN: @note: Used by device, app should ignore] - */ -syntax = "proto3"; - -// option optimize_for = LITE_RUNTIME; - -package proto.cloud.stream; - -import "proto/cloud/stream.proto"; - -message RoomParamsWrap { - repeated .proto.cloud.stream.RoomParams room_params = 1; -} - -message ObstacleInfoWrap { - repeated .proto.cloud.stream.ObstacleInfo obstacle_info = 1; -} diff --git a/proto-reference/stream_wrap_pb2.py b/proto-reference/stream_wrap_pb2.py deleted file mode 100644 index 6abc757..0000000 --- a/proto-reference/stream_wrap_pb2.py +++ /dev/null @@ -1,28 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: proto/cloud/stream_wrap.proto -"""Generated protocol buffer code.""" -from google.protobuf import descriptor as _descriptor -from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import symbol_database as _symbol_database -from google.protobuf.internal import builder as _builder - -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - -from ...proto.cloud import stream_pb2 as proto_dot_cloud_dot_stream__pb2 - -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1dproto/cloud/stream_wrap.proto\x12\x12proto.cloud.stream\x1a\x18proto/cloud/stream.proto\"E\n\x0eRoomParamsWrap\x12\x33\n\x0broom_params\x18\x01 \x03(\x0b\x32\x1e.proto.cloud.stream.RoomParams\"K\n\x10ObstacleInfoWrap\x12\x37\n\robstacle_info\x18\x01 \x03(\x0b\x32 .proto.cloud.stream.ObstacleInfob\x06proto3') - -_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'proto.cloud.stream_wrap_pb2', globals()) -if _descriptor._USE_C_DESCRIPTORS == False: - - DESCRIPTOR._options = None - _ROOMPARAMSWRAP._serialized_start=79 - _ROOMPARAMSWRAP._serialized_end=148 - _OBSTACLEINFOWRAP._serialized_start=150 - _OBSTACLEINFOWRAP._serialized_end=225 -# @@protoc_insertion_point(module_scope) diff --git a/proto-reference/stream_wrap_pb2.pyi b/proto-reference/stream_wrap_pb2.pyi deleted file mode 100644 index c1cf47d..0000000 --- a/proto-reference/stream_wrap_pb2.pyi +++ /dev/null @@ -1,25 +0,0 @@ -from typing import ClassVar as _ClassVar -from typing import Iterable as _Iterable -from typing import Mapping as _Mapping -from typing import Optional as _Optional -from typing import Union as _Union - -from google.protobuf import descriptor as _descriptor -from google.protobuf import message as _message -from google.protobuf.internal import containers as _containers - -from ...proto.cloud import stream_pb2 as _stream_pb2 - -DESCRIPTOR: _descriptor.FileDescriptor - -class ObstacleInfoWrap(_message.Message): - __slots__ = ["obstacle_info"] - OBSTACLE_INFO_FIELD_NUMBER: _ClassVar[int] - obstacle_info: _containers.RepeatedCompositeFieldContainer[_stream_pb2.ObstacleInfo] - def __init__(self, obstacle_info: _Optional[_Iterable[_Union[_stream_pb2.ObstacleInfo, _Mapping]]] = ...) -> None: ... - -class RoomParamsWrap(_message.Message): - __slots__ = ["room_params"] - ROOM_PARAMS_FIELD_NUMBER: _ClassVar[int] - room_params: _containers.RepeatedCompositeFieldContainer[_stream_pb2.RoomParams] - def __init__(self, room_params: _Optional[_Iterable[_Union[_stream_pb2.RoomParams, _Mapping]]] = ...) -> None: ... diff --git a/proto-reference/timing.proto b/proto-reference/timing.proto deleted file mode 100644 index af179a5..0000000 --- a/proto-reference/timing.proto +++ /dev/null @@ -1,185 +0,0 @@ -syntax = "proto3"; - -// option optimize_for = LITE_RUNTIME; - -package proto.cloud; - -import "proto/cloud/common.proto"; -import "proto/cloud/clean_param.proto"; - -message TimerInfo { - // 手机 app 新建定时不需要该字段,设备返回 id [EN: Mobile app doesn't need this field when creating new schedule, device returns id] - // 手机 app 其他操作需要该字段 [EN: Mobile app needs this field for other operations] - message Id { - uint32 value = 1; - } - Id id = 1; - - message Status { - bool valid = 1; - bool opened = 2; - } - Status status = 2; - - message Desc { - enum Trigger { - SINGLE = 0; // 单次触发 [EN: Single trigger] - CYCLE = 1; // 周期触发 [EN: Cyclic trigger] - } - Trigger trigger = 1; - - message Timing { - uint32 user_tz = 1; // 用户时区,单位 s [EN: User timezone, unit: seconds] - bool summer = 2; // 用户是否处于夏令时的国家或地区 [EN: Whether user is in a country or region with daylight saving time] - uint32 hours = 3; - uint32 minutes = 4; - } - Timing timing = 2; - - // 周期触发需要有以下字段描述周期 [EN: Cyclic trigger requires the following fields to describe the cycle] - // 这里的 week 指用户感知的周,机器需要结合用户时区来判断某天对应的时间 [EN: The week here refers to the user-perceived week, device needs to combine user timezone to determine the time for a certain day] - message Cycle { - uint32 week_bits = 1; // bit-0 周日 bit-1 ... bit-6 周一~周六 [EN: bit-0 Sunday bit-1 ... bit-6 Monday~Saturday] - } - Cycle cycle = 3; - } - Desc desc = 3; - - message Addition { - uint64 create_time = 1; // 创建时间 [EN: Creation time] - string create_user_id = 2; // 创建用户 id [EN: Creator user ID] - uint64 renew_time = 3; // 修改时间 [EN: Modification time] - string renew_user_id = 4; // 修改用户 id [EN: Modifier user ID] - } - Addition addition = 4; - - message Action { - enum Type { - SCHEDULE_AUTO_CLEAN = 0; // 预约自动清扫 [EN: Scheduled automatic cleaning] - SCHEDULE_ROOMS_CLEAN = 1; // 预约房间清扫 [EN: Scheduled rooms cleaning] - SCHEDULE_CRUISE = 2; // 预约巡航 [EN: Scheduled cruise] - SCHEDULE_SCENE_CLEAN = 3; // 预约场景清扫 [EN: Scheduled scene cleaning] - } - Type type = 1; - - // 前置操作 [EN: Pre-operation] - message Precondition { - // TODO - } - Precondition precondition = 2; - - enum Mode { - GENERAL = 0; // 通用模式 [EN: General mode] - CUSTOMIZE = 1; // x9 定制清洁和 stream 房间参数关联,x10 后和 ScheduleRoomsClean.Custom 关联 [EN: x9 custom cleaning associated with stream room parameters, after x10 associated with ScheduleRoomsClean.Custom] - } - - message ScheduleAutoClean { - Mode mode = 1; - - message General { - // 智能省心模式开关关闭时才有下面 4 个字段 [EN: The following 4 fields exist only when smart hassle-free mode switch is off] - Fan fan = 1; - MopMode mop_mode = 2; - CleanType clean_type = 3; - CleanExtent clean_extent = 4; - - Switch smart_mode_sw = 5; // 智能省心模式开关 [EN: Smart hassle-free mode switch] - } - General general = 2; - } - - message ScheduleRoomsClean { - Mode mode = 1; - - message General { // x9 通用模式有效,x10 之后不再使用 [EN: x9 general mode valid, no longer used after x10] - uint32 map_id = 1; - - Fan fan = 2; - MopMode mop_mode = 3; - CleanType clean_type = 4; - CleanExtent clean_extent = 5; - - message Room { - uint32 id = 1; - uint32 order = 2; - } - repeated Room rooms = 6; - } - General general = 2; - - message Custom { // x9 定制模式不走这里,走 stream,x10 之后房间清洁走这里 [EN: x9 custom mode doesn't go here, goes to stream, after x10 room cleaning goes here] - uint32 map_id = 1; - Switch smart_mode_sw = 2; // 智能省心模式开关 [EN: Smart hassle-free mode switch] - - message Room { - uint32 id = 1; - uint32 order = 2; - - // 智能省心模式开关关闭时才有下面 4 个字段 [EN: The following 4 fields exist only when smart hassle-free mode switch is off] - CleanType clean_type = 6; - Fan fan = 7; - MopMode mop_mode = 8; - CleanExtent clean_extent = 9; - - uint32 clean_times = 10; // 清扫次数,非 0 有效 [EN: Cleaning times, non-zero is valid] - } - repeated Room rooms = 3; - } - Custom custom = 3; - } - - message ScheduleCruise { - uint32 map_id = 1; - } - - message ScheduleSceneClean { - uint32 scene_id = 1; - string scene_name = 2; // 场景被删除时还可以在定时中显示失效的场景名 [EN: When scene is deleted, the invalid scene name can still be displayed in schedule] - } - - oneof Param { - ScheduleAutoClean sche_auto_clean = 3; - ScheduleRoomsClean sche_rooms_clean = 4; - ScheduleCruise sche_cruise = 5; - ScheduleSceneClean sche_scene_clean = 6; - } - } - Action action = 5; -} - -message TimerRequest { - enum Method { - DEFAULT = 0; - ADD = 1; // 下面 timer 字段中不带 id 字段,其他都要 [EN: timer field below without id field, others are required] - DELETE = 2; // 下面 timer 字段中只用带 id 字段 [EN: timer field below only needs id field] - MOTIFY = 3; // 下面 timer 字段中要完整的字段 [EN: timer field below needs complete fields] - OPEN = 4; // 下面 timer 字段中只用带 id 字段 [EN: timer field below only needs id field] - CLOSE = 5; // 下面 timer 字段中只用带 id 字段 [EN: timer field below only needs id field] - INQUIRY = 6; // 查询/上报 [EN: Query/report] - IGNORE_ONCE = 7; // 忽略一次,下面 timer 字段中只用带 id 字段 [EN: Ignore once, timer field below only needs id field] - } - Method method = 1; - - uint32 seq = 2; - - TimerInfo timer = 3; -} - -message TimerResponse { - TimerRequest.Method method = 1; // 开机/失效上报 DEFAULT,其他情况跟下发相同 [EN: Report DEFAULT on boot/invalid, otherwise same as sent] - uint32 seq = 2; - - message Result { - enum Value { - SUCCESS = 0; - FAILED = 1; - } - Value value = 1; - - uint32 err_code = 2; - } - Result result = 3; - - // 全量上报机器中所有的定时信息 [EN: Report all schedule information in device in full] - repeated TimerInfo timers = 4; -} diff --git a/proto-reference/timing_pb2.py b/proto-reference/timing_pb2.py deleted file mode 100644 index c1d8371..0000000 --- a/proto-reference/timing_pb2.py +++ /dev/null @@ -1,78 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: proto/cloud/timing.proto -"""Generated protocol buffer code.""" -from google.protobuf import descriptor as _descriptor -from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import symbol_database as _symbol_database -from google.protobuf.internal import builder as _builder - -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - -from ...proto.cloud import \ - clean_param_pb2 as proto_dot_cloud_dot_clean__param__pb2 -from ...proto.cloud import common_pb2 as proto_dot_cloud_dot_common__pb2 - -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x18proto/cloud/timing.proto\x12\x0bproto.cloud\x1a\x18proto/cloud/common.proto\x1a\x1dproto/cloud/clean_param.proto\"\xd9\x14\n\tTimerInfo\x12%\n\x02id\x18\x01 \x01(\x0b\x32\x19.proto.cloud.TimerInfo.Id\x12-\n\x06status\x18\x02 \x01(\x0b\x32\x1d.proto.cloud.TimerInfo.Status\x12)\n\x04\x64\x65sc\x18\x03 \x01(\x0b\x32\x1b.proto.cloud.TimerInfo.Desc\x12\x31\n\x08\x61\x64\x64ition\x18\x04 \x01(\x0b\x32\x1f.proto.cloud.TimerInfo.Addition\x12-\n\x06\x61\x63tion\x18\x05 \x01(\x0b\x32\x1d.proto.cloud.TimerInfo.Action\x1a\x13\n\x02Id\x12\r\n\x05value\x18\x01 \x01(\r\x1a\'\n\x06Status\x12\r\n\x05valid\x18\x01 \x01(\x08\x12\x0e\n\x06opened\x18\x02 \x01(\x08\x1a\xab\x02\n\x04\x44\x65sc\x12\x34\n\x07trigger\x18\x01 \x01(\x0e\x32#.proto.cloud.TimerInfo.Desc.Trigger\x12\x32\n\x06timing\x18\x02 \x01(\x0b\x32\".proto.cloud.TimerInfo.Desc.Timing\x12\x30\n\x05\x63ycle\x18\x03 \x01(\x0b\x32!.proto.cloud.TimerInfo.Desc.Cycle\x1aI\n\x06Timing\x12\x0f\n\x07user_tz\x18\x01 \x01(\r\x12\x0e\n\x06summer\x18\x02 \x01(\x08\x12\r\n\x05hours\x18\x03 \x01(\r\x12\x0f\n\x07minutes\x18\x04 \x01(\r\x1a\x1a\n\x05\x43ycle\x12\x11\n\tweek_bits\x18\x01 \x01(\r\" \n\x07Trigger\x12\n\n\x06SINGLE\x10\x00\x12\t\n\x05\x43YCLE\x10\x01\x1a\x62\n\x08\x41\x64\x64ition\x12\x13\n\x0b\x63reate_time\x18\x01 \x01(\x04\x12\x16\n\x0e\x63reate_user_id\x18\x02 \x01(\t\x12\x12\n\nrenew_time\x18\x03 \x01(\x04\x12\x15\n\rrenew_user_id\x18\x04 \x01(\t\x1a\x98\x0f\n\x06\x41\x63tion\x12\x30\n\x04type\x18\x01 \x01(\x0e\x32\".proto.cloud.TimerInfo.Action.Type\x12@\n\x0cprecondition\x18\x02 \x01(\x0b\x32*.proto.cloud.TimerInfo.Action.Precondition\x12J\n\x0fsche_auto_clean\x18\x03 \x01(\x0b\x32/.proto.cloud.TimerInfo.Action.ScheduleAutoCleanH\x00\x12L\n\x10sche_rooms_clean\x18\x04 \x01(\x0b\x32\x30.proto.cloud.TimerInfo.Action.ScheduleRoomsCleanH\x00\x12\x43\n\x0bsche_cruise\x18\x05 \x01(\x0b\x32,.proto.cloud.TimerInfo.Action.ScheduleCruiseH\x00\x12L\n\x10sche_scene_clean\x18\x06 \x01(\x0b\x32\x30.proto.cloud.TimerInfo.Action.ScheduleSceneCleanH\x00\x1a\x0e\n\x0cPrecondition\x1a\xea\x02\n\x11ScheduleAutoClean\x12\x30\n\x04mode\x18\x01 \x01(\x0e\x32\".proto.cloud.TimerInfo.Action.Mode\x12H\n\x07general\x18\x02 \x01(\x0b\x32\x37.proto.cloud.TimerInfo.Action.ScheduleAutoClean.General\x1a\xd8\x01\n\x07General\x12\x1d\n\x03\x66\x61n\x18\x01 \x01(\x0b\x32\x10.proto.cloud.Fan\x12&\n\x08mop_mode\x18\x02 \x01(\x0b\x32\x14.proto.cloud.MopMode\x12*\n\nclean_type\x18\x03 \x01(\x0b\x32\x16.proto.cloud.CleanType\x12.\n\x0c\x63lean_extent\x18\x04 \x01(\x0b\x32\x18.proto.cloud.CleanExtent\x12*\n\rsmart_mode_sw\x18\x05 \x01(\x0b\x32\x13.proto.cloud.Switch\x1a\xfa\x06\n\x12ScheduleRoomsClean\x12\x30\n\x04mode\x18\x01 \x01(\x0e\x32\".proto.cloud.TimerInfo.Action.Mode\x12I\n\x07general\x18\x02 \x01(\x0b\x32\x38.proto.cloud.TimerInfo.Action.ScheduleRoomsClean.General\x12G\n\x06\x63ustom\x18\x03 \x01(\x0b\x32\x37.proto.cloud.TimerInfo.Action.ScheduleRoomsClean.Custom\x1a\xad\x02\n\x07General\x12\x0e\n\x06map_id\x18\x01 \x01(\r\x12\x1d\n\x03\x66\x61n\x18\x02 \x01(\x0b\x32\x10.proto.cloud.Fan\x12&\n\x08mop_mode\x18\x03 \x01(\x0b\x32\x14.proto.cloud.MopMode\x12*\n\nclean_type\x18\x04 \x01(\x0b\x32\x16.proto.cloud.CleanType\x12.\n\x0c\x63lean_extent\x18\x05 \x01(\x0b\x32\x18.proto.cloud.CleanExtent\x12L\n\x05rooms\x18\x06 \x03(\x0b\x32=.proto.cloud.TimerInfo.Action.ScheduleRoomsClean.General.Room\x1a!\n\x04Room\x12\n\n\x02id\x18\x01 \x01(\r\x12\r\n\x05order\x18\x02 \x01(\r\x1a\xed\x02\n\x06\x43ustom\x12\x0e\n\x06map_id\x18\x01 \x01(\r\x12*\n\rsmart_mode_sw\x18\x02 \x01(\x0b\x32\x13.proto.cloud.Switch\x12K\n\x05rooms\x18\x03 \x03(\x0b\x32<.proto.cloud.TimerInfo.Action.ScheduleRoomsClean.Custom.Room\x1a\xd9\x01\n\x04Room\x12\n\n\x02id\x18\x01 \x01(\r\x12\r\n\x05order\x18\x02 \x01(\r\x12*\n\nclean_type\x18\x06 \x01(\x0b\x32\x16.proto.cloud.CleanType\x12\x1d\n\x03\x66\x61n\x18\x07 \x01(\x0b\x32\x10.proto.cloud.Fan\x12&\n\x08mop_mode\x18\x08 \x01(\x0b\x32\x14.proto.cloud.MopMode\x12.\n\x0c\x63lean_extent\x18\t \x01(\x0b\x32\x18.proto.cloud.CleanExtent\x12\x13\n\x0b\x63lean_times\x18\n \x01(\r\x1a \n\x0eScheduleCruise\x12\x0e\n\x06map_id\x18\x01 \x01(\r\x1a:\n\x12ScheduleSceneClean\x12\x10\n\x08scene_id\x18\x01 \x01(\r\x12\x12\n\nscene_name\x18\x02 \x01(\t\"h\n\x04Type\x12\x17\n\x13SCHEDULE_AUTO_CLEAN\x10\x00\x12\x18\n\x14SCHEDULE_ROOMS_CLEAN\x10\x01\x12\x13\n\x0fSCHEDULE_CRUISE\x10\x02\x12\x18\n\x14SCHEDULE_SCENE_CLEAN\x10\x03\"\"\n\x04Mode\x12\x0b\n\x07GENERAL\x10\x00\x12\r\n\tCUSTOMIZE\x10\x01\x42\x07\n\x05Param\"\xdf\x01\n\x0cTimerRequest\x12\x30\n\x06method\x18\x01 \x01(\x0e\x32 .proto.cloud.TimerRequest.Method\x12\x0b\n\x03seq\x18\x02 \x01(\r\x12%\n\x05timer\x18\x03 \x01(\x0b\x32\x16.proto.cloud.TimerInfo\"i\n\x06Method\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10\x00\x12\x07\n\x03\x41\x44\x44\x10\x01\x12\n\n\x06\x44\x45LETE\x10\x02\x12\n\n\x06MOTIFY\x10\x03\x12\x08\n\x04OPEN\x10\x04\x12\t\n\x05\x43LOSE\x10\x05\x12\x0b\n\x07INQUIRY\x10\x06\x12\x0f\n\x0bIGNORE_ONCE\x10\x07\"\x9f\x02\n\rTimerResponse\x12\x30\n\x06method\x18\x01 \x01(\x0e\x32 .proto.cloud.TimerRequest.Method\x12\x0b\n\x03seq\x18\x02 \x01(\r\x12\x31\n\x06result\x18\x03 \x01(\x0b\x32!.proto.cloud.TimerResponse.Result\x12&\n\x06timers\x18\x04 \x03(\x0b\x32\x16.proto.cloud.TimerInfo\x1at\n\x06Result\x12\x36\n\x05value\x18\x01 \x01(\x0e\x32\'.proto.cloud.TimerResponse.Result.Value\x12\x10\n\x08\x65rr_code\x18\x02 \x01(\r\" \n\x05Value\x12\x0b\n\x07SUCCESS\x10\x00\x12\n\n\x06\x46\x41ILED\x10\x01\x62\x06proto3') - -_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'proto.cloud.timing_pb2', globals()) -if _descriptor._USE_C_DESCRIPTORS == False: - - DESCRIPTOR._options = None - _TIMERINFO._serialized_start=99 - _TIMERINFO._serialized_end=2748 - _TIMERINFO_ID._serialized_start=339 - _TIMERINFO_ID._serialized_end=358 - _TIMERINFO_STATUS._serialized_start=360 - _TIMERINFO_STATUS._serialized_end=399 - _TIMERINFO_DESC._serialized_start=402 - _TIMERINFO_DESC._serialized_end=701 - _TIMERINFO_DESC_TIMING._serialized_start=566 - _TIMERINFO_DESC_TIMING._serialized_end=639 - _TIMERINFO_DESC_CYCLE._serialized_start=641 - _TIMERINFO_DESC_CYCLE._serialized_end=667 - _TIMERINFO_DESC_TRIGGER._serialized_start=669 - _TIMERINFO_DESC_TRIGGER._serialized_end=701 - _TIMERINFO_ADDITION._serialized_start=703 - _TIMERINFO_ADDITION._serialized_end=801 - _TIMERINFO_ACTION._serialized_start=804 - _TIMERINFO_ACTION._serialized_end=2748 - _TIMERINFO_ACTION_PRECONDITION._serialized_start=1231 - _TIMERINFO_ACTION_PRECONDITION._serialized_end=1245 - _TIMERINFO_ACTION_SCHEDULEAUTOCLEAN._serialized_start=1248 - _TIMERINFO_ACTION_SCHEDULEAUTOCLEAN._serialized_end=1610 - _TIMERINFO_ACTION_SCHEDULEAUTOCLEAN_GENERAL._serialized_start=1394 - _TIMERINFO_ACTION_SCHEDULEAUTOCLEAN_GENERAL._serialized_end=1610 - _TIMERINFO_ACTION_SCHEDULEROOMSCLEAN._serialized_start=1613 - _TIMERINFO_ACTION_SCHEDULEROOMSCLEAN._serialized_end=2503 - _TIMERINFO_ACTION_SCHEDULEROOMSCLEAN_GENERAL._serialized_start=1834 - _TIMERINFO_ACTION_SCHEDULEROOMSCLEAN_GENERAL._serialized_end=2135 - _TIMERINFO_ACTION_SCHEDULEROOMSCLEAN_GENERAL_ROOM._serialized_start=2102 - _TIMERINFO_ACTION_SCHEDULEROOMSCLEAN_GENERAL_ROOM._serialized_end=2135 - _TIMERINFO_ACTION_SCHEDULEROOMSCLEAN_CUSTOM._serialized_start=2138 - _TIMERINFO_ACTION_SCHEDULEROOMSCLEAN_CUSTOM._serialized_end=2503 - _TIMERINFO_ACTION_SCHEDULEROOMSCLEAN_CUSTOM_ROOM._serialized_start=2286 - _TIMERINFO_ACTION_SCHEDULEROOMSCLEAN_CUSTOM_ROOM._serialized_end=2503 - _TIMERINFO_ACTION_SCHEDULECRUISE._serialized_start=2505 - _TIMERINFO_ACTION_SCHEDULECRUISE._serialized_end=2537 - _TIMERINFO_ACTION_SCHEDULESCENECLEAN._serialized_start=2539 - _TIMERINFO_ACTION_SCHEDULESCENECLEAN._serialized_end=2597 - _TIMERINFO_ACTION_TYPE._serialized_start=2599 - _TIMERINFO_ACTION_TYPE._serialized_end=2703 - _TIMERINFO_ACTION_MODE._serialized_start=2705 - _TIMERINFO_ACTION_MODE._serialized_end=2739 - _TIMERREQUEST._serialized_start=2751 - _TIMERREQUEST._serialized_end=2974 - _TIMERREQUEST_METHOD._serialized_start=2869 - _TIMERREQUEST_METHOD._serialized_end=2974 - _TIMERRESPONSE._serialized_start=2977 - _TIMERRESPONSE._serialized_end=3264 - _TIMERRESPONSE_RESULT._serialized_start=3148 - _TIMERRESPONSE_RESULT._serialized_end=3264 - _TIMERRESPONSE_RESULT_VALUE._serialized_start=3232 - _TIMERRESPONSE_RESULT_VALUE._serialized_end=3264 -# @@protoc_insertion_point(module_scope) diff --git a/proto-reference/timing_pb2.pyi b/proto-reference/timing_pb2.pyi deleted file mode 100644 index f74f02e..0000000 --- a/proto-reference/timing_pb2.pyi +++ /dev/null @@ -1,241 +0,0 @@ -from typing import ClassVar as _ClassVar -from typing import Iterable as _Iterable -from typing import Mapping as _Mapping -from typing import Optional as _Optional -from typing import Union as _Union - -from google.protobuf import descriptor as _descriptor -from google.protobuf import message as _message -from google.protobuf.internal import containers as _containers -from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper - -from ...proto.cloud import clean_param_pb2 as _clean_param_pb2 -from ...proto.cloud import common_pb2 as _common_pb2 - -DESCRIPTOR: _descriptor.FileDescriptor - -class TimerInfo(_message.Message): - __slots__ = ["action", "addition", "desc", "id", "status"] - class Action(_message.Message): - __slots__ = ["precondition", "sche_auto_clean", "sche_cruise", "sche_rooms_clean", "sche_scene_clean", "type"] - class Mode(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - class Type(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - class Precondition(_message.Message): - __slots__ = [] - def __init__(self) -> None: ... - class ScheduleAutoClean(_message.Message): - __slots__ = ["general", "mode"] - class General(_message.Message): - __slots__ = ["clean_extent", "clean_type", "fan", "mop_mode", "smart_mode_sw"] - CLEAN_EXTENT_FIELD_NUMBER: _ClassVar[int] - CLEAN_TYPE_FIELD_NUMBER: _ClassVar[int] - FAN_FIELD_NUMBER: _ClassVar[int] - MOP_MODE_FIELD_NUMBER: _ClassVar[int] - SMART_MODE_SW_FIELD_NUMBER: _ClassVar[int] - clean_extent: _clean_param_pb2.CleanExtent - clean_type: _clean_param_pb2.CleanType - fan: _clean_param_pb2.Fan - mop_mode: _clean_param_pb2.MopMode - smart_mode_sw: _common_pb2.Switch - def __init__(self, fan: _Optional[_Union[_clean_param_pb2.Fan, _Mapping]] = ..., mop_mode: _Optional[_Union[_clean_param_pb2.MopMode, _Mapping]] = ..., clean_type: _Optional[_Union[_clean_param_pb2.CleanType, _Mapping]] = ..., clean_extent: _Optional[_Union[_clean_param_pb2.CleanExtent, _Mapping]] = ..., smart_mode_sw: _Optional[_Union[_common_pb2.Switch, _Mapping]] = ...) -> None: ... - GENERAL_FIELD_NUMBER: _ClassVar[int] - MODE_FIELD_NUMBER: _ClassVar[int] - general: TimerInfo.Action.ScheduleAutoClean.General - mode: TimerInfo.Action.Mode - def __init__(self, mode: _Optional[_Union[TimerInfo.Action.Mode, str]] = ..., general: _Optional[_Union[TimerInfo.Action.ScheduleAutoClean.General, _Mapping]] = ...) -> None: ... - class ScheduleCruise(_message.Message): - __slots__ = ["map_id"] - MAP_ID_FIELD_NUMBER: _ClassVar[int] - map_id: int - def __init__(self, map_id: _Optional[int] = ...) -> None: ... - class ScheduleRoomsClean(_message.Message): - __slots__ = ["custom", "general", "mode"] - class Custom(_message.Message): - __slots__ = ["map_id", "rooms", "smart_mode_sw"] - class Room(_message.Message): - __slots__ = ["clean_extent", "clean_times", "clean_type", "fan", "id", "mop_mode", "order"] - CLEAN_EXTENT_FIELD_NUMBER: _ClassVar[int] - CLEAN_TIMES_FIELD_NUMBER: _ClassVar[int] - CLEAN_TYPE_FIELD_NUMBER: _ClassVar[int] - FAN_FIELD_NUMBER: _ClassVar[int] - ID_FIELD_NUMBER: _ClassVar[int] - MOP_MODE_FIELD_NUMBER: _ClassVar[int] - ORDER_FIELD_NUMBER: _ClassVar[int] - clean_extent: _clean_param_pb2.CleanExtent - clean_times: int - clean_type: _clean_param_pb2.CleanType - fan: _clean_param_pb2.Fan - id: int - mop_mode: _clean_param_pb2.MopMode - order: int - def __init__(self, id: _Optional[int] = ..., order: _Optional[int] = ..., clean_type: _Optional[_Union[_clean_param_pb2.CleanType, _Mapping]] = ..., fan: _Optional[_Union[_clean_param_pb2.Fan, _Mapping]] = ..., mop_mode: _Optional[_Union[_clean_param_pb2.MopMode, _Mapping]] = ..., clean_extent: _Optional[_Union[_clean_param_pb2.CleanExtent, _Mapping]] = ..., clean_times: _Optional[int] = ...) -> None: ... - MAP_ID_FIELD_NUMBER: _ClassVar[int] - ROOMS_FIELD_NUMBER: _ClassVar[int] - SMART_MODE_SW_FIELD_NUMBER: _ClassVar[int] - map_id: int - rooms: _containers.RepeatedCompositeFieldContainer[TimerInfo.Action.ScheduleRoomsClean.Custom.Room] - smart_mode_sw: _common_pb2.Switch - def __init__(self, map_id: _Optional[int] = ..., smart_mode_sw: _Optional[_Union[_common_pb2.Switch, _Mapping]] = ..., rooms: _Optional[_Iterable[_Union[TimerInfo.Action.ScheduleRoomsClean.Custom.Room, _Mapping]]] = ...) -> None: ... - class General(_message.Message): - __slots__ = ["clean_extent", "clean_type", "fan", "map_id", "mop_mode", "rooms"] - class Room(_message.Message): - __slots__ = ["id", "order"] - ID_FIELD_NUMBER: _ClassVar[int] - ORDER_FIELD_NUMBER: _ClassVar[int] - id: int - order: int - def __init__(self, id: _Optional[int] = ..., order: _Optional[int] = ...) -> None: ... - CLEAN_EXTENT_FIELD_NUMBER: _ClassVar[int] - CLEAN_TYPE_FIELD_NUMBER: _ClassVar[int] - FAN_FIELD_NUMBER: _ClassVar[int] - MAP_ID_FIELD_NUMBER: _ClassVar[int] - MOP_MODE_FIELD_NUMBER: _ClassVar[int] - ROOMS_FIELD_NUMBER: _ClassVar[int] - clean_extent: _clean_param_pb2.CleanExtent - clean_type: _clean_param_pb2.CleanType - fan: _clean_param_pb2.Fan - map_id: int - mop_mode: _clean_param_pb2.MopMode - rooms: _containers.RepeatedCompositeFieldContainer[TimerInfo.Action.ScheduleRoomsClean.General.Room] - def __init__(self, map_id: _Optional[int] = ..., fan: _Optional[_Union[_clean_param_pb2.Fan, _Mapping]] = ..., mop_mode: _Optional[_Union[_clean_param_pb2.MopMode, _Mapping]] = ..., clean_type: _Optional[_Union[_clean_param_pb2.CleanType, _Mapping]] = ..., clean_extent: _Optional[_Union[_clean_param_pb2.CleanExtent, _Mapping]] = ..., rooms: _Optional[_Iterable[_Union[TimerInfo.Action.ScheduleRoomsClean.General.Room, _Mapping]]] = ...) -> None: ... - CUSTOM_FIELD_NUMBER: _ClassVar[int] - GENERAL_FIELD_NUMBER: _ClassVar[int] - MODE_FIELD_NUMBER: _ClassVar[int] - custom: TimerInfo.Action.ScheduleRoomsClean.Custom - general: TimerInfo.Action.ScheduleRoomsClean.General - mode: TimerInfo.Action.Mode - def __init__(self, mode: _Optional[_Union[TimerInfo.Action.Mode, str]] = ..., general: _Optional[_Union[TimerInfo.Action.ScheduleRoomsClean.General, _Mapping]] = ..., custom: _Optional[_Union[TimerInfo.Action.ScheduleRoomsClean.Custom, _Mapping]] = ...) -> None: ... - class ScheduleSceneClean(_message.Message): - __slots__ = ["scene_id", "scene_name"] - SCENE_ID_FIELD_NUMBER: _ClassVar[int] - SCENE_NAME_FIELD_NUMBER: _ClassVar[int] - scene_id: int - scene_name: str - def __init__(self, scene_id: _Optional[int] = ..., scene_name: _Optional[str] = ...) -> None: ... - CUSTOMIZE: TimerInfo.Action.Mode - GENERAL: TimerInfo.Action.Mode - PRECONDITION_FIELD_NUMBER: _ClassVar[int] - SCHEDULE_AUTO_CLEAN: TimerInfo.Action.Type - SCHEDULE_CRUISE: TimerInfo.Action.Type - SCHEDULE_ROOMS_CLEAN: TimerInfo.Action.Type - SCHEDULE_SCENE_CLEAN: TimerInfo.Action.Type - SCHE_AUTO_CLEAN_FIELD_NUMBER: _ClassVar[int] - SCHE_CRUISE_FIELD_NUMBER: _ClassVar[int] - SCHE_ROOMS_CLEAN_FIELD_NUMBER: _ClassVar[int] - SCHE_SCENE_CLEAN_FIELD_NUMBER: _ClassVar[int] - TYPE_FIELD_NUMBER: _ClassVar[int] - precondition: TimerInfo.Action.Precondition - sche_auto_clean: TimerInfo.Action.ScheduleAutoClean - sche_cruise: TimerInfo.Action.ScheduleCruise - sche_rooms_clean: TimerInfo.Action.ScheduleRoomsClean - sche_scene_clean: TimerInfo.Action.ScheduleSceneClean - type: TimerInfo.Action.Type - def __init__(self, type: _Optional[_Union[TimerInfo.Action.Type, str]] = ..., precondition: _Optional[_Union[TimerInfo.Action.Precondition, _Mapping]] = ..., sche_auto_clean: _Optional[_Union[TimerInfo.Action.ScheduleAutoClean, _Mapping]] = ..., sche_rooms_clean: _Optional[_Union[TimerInfo.Action.ScheduleRoomsClean, _Mapping]] = ..., sche_cruise: _Optional[_Union[TimerInfo.Action.ScheduleCruise, _Mapping]] = ..., sche_scene_clean: _Optional[_Union[TimerInfo.Action.ScheduleSceneClean, _Mapping]] = ...) -> None: ... - class Addition(_message.Message): - __slots__ = ["create_time", "create_user_id", "renew_time", "renew_user_id"] - CREATE_TIME_FIELD_NUMBER: _ClassVar[int] - CREATE_USER_ID_FIELD_NUMBER: _ClassVar[int] - RENEW_TIME_FIELD_NUMBER: _ClassVar[int] - RENEW_USER_ID_FIELD_NUMBER: _ClassVar[int] - create_time: int - create_user_id: str - renew_time: int - renew_user_id: str - def __init__(self, create_time: _Optional[int] = ..., create_user_id: _Optional[str] = ..., renew_time: _Optional[int] = ..., renew_user_id: _Optional[str] = ...) -> None: ... - class Desc(_message.Message): - __slots__ = ["cycle", "timing", "trigger"] - class Trigger(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - class Cycle(_message.Message): - __slots__ = ["week_bits"] - WEEK_BITS_FIELD_NUMBER: _ClassVar[int] - week_bits: int - def __init__(self, week_bits: _Optional[int] = ...) -> None: ... - class Timing(_message.Message): - __slots__ = ["hours", "minutes", "summer", "user_tz"] - HOURS_FIELD_NUMBER: _ClassVar[int] - MINUTES_FIELD_NUMBER: _ClassVar[int] - SUMMER_FIELD_NUMBER: _ClassVar[int] - USER_TZ_FIELD_NUMBER: _ClassVar[int] - hours: int - minutes: int - summer: bool - user_tz: int - def __init__(self, user_tz: _Optional[int] = ..., summer: bool = ..., hours: _Optional[int] = ..., minutes: _Optional[int] = ...) -> None: ... - CYCLE: TimerInfo.Desc.Trigger - CYCLE_FIELD_NUMBER: _ClassVar[int] - SINGLE: TimerInfo.Desc.Trigger - TIMING_FIELD_NUMBER: _ClassVar[int] - TRIGGER_FIELD_NUMBER: _ClassVar[int] - cycle: TimerInfo.Desc.Cycle - timing: TimerInfo.Desc.Timing - trigger: TimerInfo.Desc.Trigger - def __init__(self, trigger: _Optional[_Union[TimerInfo.Desc.Trigger, str]] = ..., timing: _Optional[_Union[TimerInfo.Desc.Timing, _Mapping]] = ..., cycle: _Optional[_Union[TimerInfo.Desc.Cycle, _Mapping]] = ...) -> None: ... - class Id(_message.Message): - __slots__ = ["value"] - VALUE_FIELD_NUMBER: _ClassVar[int] - value: int - def __init__(self, value: _Optional[int] = ...) -> None: ... - class Status(_message.Message): - __slots__ = ["opened", "valid"] - OPENED_FIELD_NUMBER: _ClassVar[int] - VALID_FIELD_NUMBER: _ClassVar[int] - opened: bool - valid: bool - def __init__(self, valid: bool = ..., opened: bool = ...) -> None: ... - ACTION_FIELD_NUMBER: _ClassVar[int] - ADDITION_FIELD_NUMBER: _ClassVar[int] - DESC_FIELD_NUMBER: _ClassVar[int] - ID_FIELD_NUMBER: _ClassVar[int] - STATUS_FIELD_NUMBER: _ClassVar[int] - action: TimerInfo.Action - addition: TimerInfo.Addition - desc: TimerInfo.Desc - id: TimerInfo.Id - status: TimerInfo.Status - def __init__(self, id: _Optional[_Union[TimerInfo.Id, _Mapping]] = ..., status: _Optional[_Union[TimerInfo.Status, _Mapping]] = ..., desc: _Optional[_Union[TimerInfo.Desc, _Mapping]] = ..., addition: _Optional[_Union[TimerInfo.Addition, _Mapping]] = ..., action: _Optional[_Union[TimerInfo.Action, _Mapping]] = ...) -> None: ... - -class TimerRequest(_message.Message): - __slots__ = ["method", "seq", "timer"] - class Method(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - ADD: TimerRequest.Method - CLOSE: TimerRequest.Method - DEFAULT: TimerRequest.Method - DELETE: TimerRequest.Method - IGNORE_ONCE: TimerRequest.Method - INQUIRY: TimerRequest.Method - METHOD_FIELD_NUMBER: _ClassVar[int] - MOTIFY: TimerRequest.Method - OPEN: TimerRequest.Method - SEQ_FIELD_NUMBER: _ClassVar[int] - TIMER_FIELD_NUMBER: _ClassVar[int] - method: TimerRequest.Method - seq: int - timer: TimerInfo - def __init__(self, method: _Optional[_Union[TimerRequest.Method, str]] = ..., seq: _Optional[int] = ..., timer: _Optional[_Union[TimerInfo, _Mapping]] = ...) -> None: ... - -class TimerResponse(_message.Message): - __slots__ = ["method", "result", "seq", "timers"] - class Result(_message.Message): - __slots__ = ["err_code", "value"] - class Value(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - ERR_CODE_FIELD_NUMBER: _ClassVar[int] - FAILED: TimerResponse.Result.Value - SUCCESS: TimerResponse.Result.Value - VALUE_FIELD_NUMBER: _ClassVar[int] - err_code: int - value: TimerResponse.Result.Value - def __init__(self, value: _Optional[_Union[TimerResponse.Result.Value, str]] = ..., err_code: _Optional[int] = ...) -> None: ... - METHOD_FIELD_NUMBER: _ClassVar[int] - RESULT_FIELD_NUMBER: _ClassVar[int] - SEQ_FIELD_NUMBER: _ClassVar[int] - TIMERS_FIELD_NUMBER: _ClassVar[int] - method: TimerRequest.Method - result: TimerResponse.Result - seq: int - timers: _containers.RepeatedCompositeFieldContainer[TimerInfo] - def __init__(self, method: _Optional[_Union[TimerRequest.Method, str]] = ..., seq: _Optional[int] = ..., result: _Optional[_Union[TimerResponse.Result, _Mapping]] = ..., timers: _Optional[_Iterable[_Union[TimerInfo, _Mapping]]] = ...) -> None: ... diff --git a/proto-reference/undisturbed.proto b/proto-reference/undisturbed.proto deleted file mode 100644 index 1bf103a..0000000 --- a/proto-reference/undisturbed.proto +++ /dev/null @@ -1,29 +0,0 @@ -syntax = "proto3"; - -// option optimize_for = LITE_RUNTIME; - -package proto.cloud; - -import "proto/cloud/common.proto"; - -message Undisturbed { - message TimePoint { - uint32 hour = 1; - uint32 minute = 2; - } - - Switch sw = 1; // 勿扰使能开关 [EN: Do not disturb enable switch] - - TimePoint begin = 2; - TimePoint end = 3; -} - -message UndisturbedRequest { - Undisturbed undisturbed = 1; -} - -message UndisturbedResponse { - Active active = 1; // 勿扰激活状态 [EN: Do not disturb active state] - - Undisturbed undisturbed = 2; -} diff --git a/proto-reference/undisturbed_pb2.py b/proto-reference/undisturbed_pb2.py deleted file mode 100644 index 911e290..0000000 --- a/proto-reference/undisturbed_pb2.py +++ /dev/null @@ -1,32 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: proto/cloud/undisturbed.proto -"""Generated protocol buffer code.""" -from google.protobuf import descriptor as _descriptor -from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import symbol_database as _symbol_database -from google.protobuf.internal import builder as _builder - -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - -from ...proto.cloud import common_pb2 as proto_dot_cloud_dot_common__pb2 - -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1dproto/cloud/undisturbed.proto\x12\x0bproto.cloud\x1a\x18proto/cloud/common.proto\"\xbd\x01\n\x0bUndisturbed\x12\x1f\n\x02sw\x18\x01 \x01(\x0b\x32\x13.proto.cloud.Switch\x12\x31\n\x05\x62\x65gin\x18\x02 \x01(\x0b\x32\".proto.cloud.Undisturbed.TimePoint\x12/\n\x03\x65nd\x18\x03 \x01(\x0b\x32\".proto.cloud.Undisturbed.TimePoint\x1a)\n\tTimePoint\x12\x0c\n\x04hour\x18\x01 \x01(\r\x12\x0e\n\x06minute\x18\x02 \x01(\r\"C\n\x12UndisturbedRequest\x12-\n\x0bundisturbed\x18\x01 \x01(\x0b\x32\x18.proto.cloud.Undisturbed\"i\n\x13UndisturbedResponse\x12#\n\x06\x61\x63tive\x18\x01 \x01(\x0b\x32\x13.proto.cloud.Active\x12-\n\x0bundisturbed\x18\x02 \x01(\x0b\x32\x18.proto.cloud.Undisturbedb\x06proto3') - -_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'proto.cloud.undisturbed_pb2', globals()) -if _descriptor._USE_C_DESCRIPTORS == False: - - DESCRIPTOR._options = None - _UNDISTURBED._serialized_start=73 - _UNDISTURBED._serialized_end=262 - _UNDISTURBED_TIMEPOINT._serialized_start=221 - _UNDISTURBED_TIMEPOINT._serialized_end=262 - _UNDISTURBEDREQUEST._serialized_start=264 - _UNDISTURBEDREQUEST._serialized_end=331 - _UNDISTURBEDRESPONSE._serialized_start=333 - _UNDISTURBEDRESPONSE._serialized_end=438 -# @@protoc_insertion_point(module_scope) diff --git a/proto-reference/undisturbed_pb2.pyi b/proto-reference/undisturbed_pb2.pyi deleted file mode 100644 index 47f0180..0000000 --- a/proto-reference/undisturbed_pb2.pyi +++ /dev/null @@ -1,42 +0,0 @@ -from typing import ClassVar as _ClassVar -from typing import Mapping as _Mapping -from typing import Optional as _Optional -from typing import Union as _Union - -from google.protobuf import descriptor as _descriptor -from google.protobuf import message as _message - -from ...proto.cloud import common_pb2 as _common_pb2 - -DESCRIPTOR: _descriptor.FileDescriptor - -class Undisturbed(_message.Message): - __slots__ = ["begin", "end", "sw"] - class TimePoint(_message.Message): - __slots__ = ["hour", "minute"] - HOUR_FIELD_NUMBER: _ClassVar[int] - MINUTE_FIELD_NUMBER: _ClassVar[int] - hour: int - minute: int - def __init__(self, hour: _Optional[int] = ..., minute: _Optional[int] = ...) -> None: ... - BEGIN_FIELD_NUMBER: _ClassVar[int] - END_FIELD_NUMBER: _ClassVar[int] - SW_FIELD_NUMBER: _ClassVar[int] - begin: Undisturbed.TimePoint - end: Undisturbed.TimePoint - sw: _common_pb2.Switch - def __init__(self, sw: _Optional[_Union[_common_pb2.Switch, _Mapping]] = ..., begin: _Optional[_Union[Undisturbed.TimePoint, _Mapping]] = ..., end: _Optional[_Union[Undisturbed.TimePoint, _Mapping]] = ...) -> None: ... - -class UndisturbedRequest(_message.Message): - __slots__ = ["undisturbed"] - UNDISTURBED_FIELD_NUMBER: _ClassVar[int] - undisturbed: Undisturbed - def __init__(self, undisturbed: _Optional[_Union[Undisturbed, _Mapping]] = ...) -> None: ... - -class UndisturbedResponse(_message.Message): - __slots__ = ["active", "undisturbed"] - ACTIVE_FIELD_NUMBER: _ClassVar[int] - UNDISTURBED_FIELD_NUMBER: _ClassVar[int] - active: _common_pb2.Active - undisturbed: Undisturbed - def __init__(self, active: _Optional[_Union[_common_pb2.Active, _Mapping]] = ..., undisturbed: _Optional[_Union[Undisturbed, _Mapping]] = ...) -> None: ... diff --git a/proto-reference/unisetting.proto b/proto-reference/unisetting.proto deleted file mode 100644 index 1c1fc1e..0000000 --- a/proto-reference/unisetting.proto +++ /dev/null @@ -1,106 +0,0 @@ -syntax = "proto3"; - -// option optimize_for = LITE_RUNTIME; - -package proto.cloud; - -import "proto/cloud/common.proto"; - -// 设置项 [EN: Settings] -message UnisettingRequest { - Switch children_lock = 1; // 童锁开关 [EN: Child lock switch] - Switch cruise_continue_sw = 2; // 断点巡航开关 [EN: Resume cruise switch] - Switch multi_map_sw = 3; // 多地图开关 [EN: Multi-map switch] - Switch ai_see = 4; // AI See识别开关 [EN: AI See recognition switch] - message MultiMapOptions { - message Retain { - repeated uint32 map_id = 1; - } - Retain retain = 1; // 多地图开关关闭时,可选带这个保留部分地图 [EN: When multi-map switch is off, optionally include this to retain some maps] - } - MultiMapOptions multi_map_options = 5; - - message WifiSetting { - message Deletion { // 删除指定 ssid,协议支持多个 [EN: Delete specified ssid, protocol supports multiple] - repeated string ssid = 1; - } - Deletion deletion = 1; - } - WifiSetting wifi_setting = 6; - - Switch water_level_sw = 7; // 实验室功能——清水量显示开关 [EN: Lab feature - clean water level display switch] - Switch suggest_restricted_zone_sw = 8; // 实验室功能——自动推荐禁区开关 [EN: Lab feature - auto suggest restricted zone switch] - Switch deep_mop_corner_sw = 9; // 实验室功能——深度拖墙角开关(扭屁股动作) [EN: Lab feature - deep mop corner switch (butt wiggle motion)] - - Numerical dust_full_remind = 10; // 尘满提醒的时长,单位:分钟 [EN: Dust full reminder duration, unit: minutes] - Switch live_photo_sw = 11; // 实景照片开关 [EN: Live photo switch] - Switch smart_follow_sw = 12; // 实验室功能——智能跟随开关 [EN: Lab feature - smart follow switch] - Switch poop_avoidance_sw = 13; // 便便避让开关 [EN: Poop avoidance switch] - Switch pet_mode_sw = 14; // 宠物模式开关 [EN: Pet mode switch] -} - -message Unistate { - Switch mop_holder_state_l = 1; // 左侧拖布状态(已安装或已取出) [EN: Left mop holder state (installed or removed)] - Switch mop_holder_state_r = 2; // 右侧拖布状态(已安装或已取出) [EN: Right mop holder state (installed or removed)] - Switch custom_clean_mode = 3; // 通用/定制的状态 [EN: General/custom mode state] - Active map_valid = 4; // 存在有效地图(设备至少存在一张有房间轮廓的地图) [EN: Valid map exists (device has at least one map with room outlines)] - Switch mop_state = 5; // 固定(不旋转)拖布状态(已安装或已取出) [EN: Fixed (non-rotating) mop state (installed or removed)] - - message LiveMap { - enum StateBit { // 多个值组合(用位运算) [EN: Multiple values combined (using bitwise operations)] - BASE = 0; // 底图 [EN: Base map] - ROOM = 1; // 房间轮廓 [EN: Room outline] - KITCHEN = 2; // 厨房 [EN: Kitchen] - PET = 3; // 宠物区 [EN: Pet area] - } - uint32 state_bits = 1; - } - LiveMap live_map = 6; // 实时地图有哪些组件信息 [EN: Which component info the real-time map has] - - uint32 clean_strategy_version = 7; // 清洁策略版本(云端/本地) [EN: Cleaning strategy version (cloud/local)] -} - -message WifiData { - message Ap { - enum Frequency { - FREQ_2_4G = 0; - FREQ_5G = 1; - } - - message Connection { - enum Result { - OK = 0; - PASSWD_ERR = 1; - } - Result result = 1; - uint64 timestamp = 2; // utc, 单位s [EN: utc, unit: seconds] - } - - string ssid = 1; - Frequency frequency = 2; - Connection connection = 3; - } - repeated Ap ap = 1; // 第1个为当前连接的AP [EN: First one is the currently connected AP] -} - -// 设置项或状态项 [EN: Settings or status items] -message UnisettingResponse { - Switch children_lock = 1; // 童锁开关 [EN: Child lock switch] - Switch cruise_continue_sw = 2; // 断点巡航开关 [EN: Resume cruise switch] - Switch multi_map_sw = 3; // 多地图开关 [EN: Multi-map switch] - Switch ai_see = 4; // AI See识别开关 [EN: AI See recognition switch] - - Switch water_level_sw = 5; // 实验室功能——清水量显示开关 [EN: Lab feature - clean water level display switch] - Switch suggest_restricted_zone_sw = 6; // 实验室功能——自动推荐禁区开关 [EN: Lab feature - auto suggest restricted zone switch] - Switch deep_mop_corner_sw = 7; // 实验室功能——深度拖墙角开关(扭屁股动作) [EN: Lab feature - deep mop corner switch (butt wiggle motion)] - - Numerical dust_full_remind = 8; // 尘满提醒的时长,单位:分钟 [EN: Dust full reminder duration, unit: minutes] - Switch live_photo_sw = 9; // 实景照片开关 [EN: Live photo switch] - - Unistate unistate = 10; - uint32 ap_signal_strength = 11; // 0 - 100,当前连接的wifi信号强度 [EN: 0 - 100, current connected WiFi signal strength] - WifiData wifi_data = 12; - Switch smart_follow_sw = 13; // 实验室功能——智能跟随开关 [EN: Lab feature - smart follow switch] - Switch poop_avoidance_sw = 14; // 便便避让开关 [EN: Poop avoidance switch] - Switch pet_mode_sw = 15; // 宠物模式开关 [EN: Pet mode switch] -} diff --git a/proto-reference/unisetting_pb2.py b/proto-reference/unisetting_pb2.py deleted file mode 100644 index c49ccb3..0000000 --- a/proto-reference/unisetting_pb2.py +++ /dev/null @@ -1,52 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: proto/cloud/unisetting.proto -"""Generated protocol buffer code.""" -from google.protobuf import descriptor as _descriptor -from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import symbol_database as _symbol_database -from google.protobuf.internal import builder as _builder - -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - -from ...proto.cloud import common_pb2 as proto_dot_cloud_dot_common__pb2 - -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1cproto/cloud/unisetting.proto\x12\x0bproto.cloud\x1a\x18proto/cloud/common.proto\"\xae\x07\n\x11UnisettingRequest\x12*\n\rchildren_lock\x18\x01 \x01(\x0b\x32\x13.proto.cloud.Switch\x12/\n\x12\x63ruise_continue_sw\x18\x02 \x01(\x0b\x32\x13.proto.cloud.Switch\x12)\n\x0cmulti_map_sw\x18\x03 \x01(\x0b\x32\x13.proto.cloud.Switch\x12#\n\x06\x61i_see\x18\x04 \x01(\x0b\x32\x13.proto.cloud.Switch\x12I\n\x11multi_map_options\x18\x05 \x01(\x0b\x32..proto.cloud.UnisettingRequest.MultiMapOptions\x12@\n\x0cwifi_setting\x18\x06 \x01(\x0b\x32*.proto.cloud.UnisettingRequest.WifiSetting\x12+\n\x0ewater_level_sw\x18\x07 \x01(\x0b\x32\x13.proto.cloud.Switch\x12\x37\n\x1asuggest_restricted_zone_sw\x18\x08 \x01(\x0b\x32\x13.proto.cloud.Switch\x12/\n\x12\x64\x65\x65p_mop_corner_sw\x18\t \x01(\x0b\x32\x13.proto.cloud.Switch\x12\x30\n\x10\x64ust_full_remind\x18\n \x01(\x0b\x32\x16.proto.cloud.Numerical\x12*\n\rlive_photo_sw\x18\x0b \x01(\x0b\x32\x13.proto.cloud.Switch\x12,\n\x0fsmart_follow_sw\x18\x0c \x01(\x0b\x32\x13.proto.cloud.Switch\x12.\n\x11poop_avoidance_sw\x18\r \x01(\x0b\x32\x13.proto.cloud.Switch\x12(\n\x0bpet_mode_sw\x18\x0e \x01(\x0b\x32\x13.proto.cloud.Switch\x1ar\n\x0fMultiMapOptions\x12\x45\n\x06retain\x18\x01 \x01(\x0b\x32\x35.proto.cloud.UnisettingRequest.MultiMapOptions.Retain\x1a\x18\n\x06Retain\x12\x0e\n\x06map_id\x18\x01 \x03(\r\x1an\n\x0bWifiSetting\x12\x45\n\x08\x64\x65letion\x18\x01 \x01(\x0b\x32\x33.proto.cloud.UnisettingRequest.WifiSetting.Deletion\x1a\x18\n\x08\x44\x65letion\x12\x0c\n\x04ssid\x18\x01 \x03(\t\"\x92\x03\n\x08Unistate\x12/\n\x12mop_holder_state_l\x18\x01 \x01(\x0b\x32\x13.proto.cloud.Switch\x12/\n\x12mop_holder_state_r\x18\x02 \x01(\x0b\x32\x13.proto.cloud.Switch\x12.\n\x11\x63ustom_clean_mode\x18\x03 \x01(\x0b\x32\x13.proto.cloud.Switch\x12&\n\tmap_valid\x18\x04 \x01(\x0b\x32\x13.proto.cloud.Active\x12&\n\tmop_state\x18\x05 \x01(\x0b\x32\x13.proto.cloud.Switch\x12/\n\x08live_map\x18\x06 \x01(\x0b\x32\x1d.proto.cloud.Unistate.LiveMap\x12\x1e\n\x16\x63lean_strategy_version\x18\x07 \x01(\r\x1aS\n\x07LiveMap\x12\x12\n\nstate_bits\x18\x01 \x01(\r\"4\n\x08StateBit\x12\x08\n\x04\x42\x41SE\x10\x00\x12\x08\n\x04ROOM\x10\x01\x12\x0b\n\x07KITCHEN\x10\x02\x12\x07\n\x03PET\x10\x03\"\xdd\x02\n\x08WifiData\x12$\n\x02\x61p\x18\x01 \x03(\x0b\x32\x18.proto.cloud.WifiData.Ap\x1a\xaa\x02\n\x02\x41p\x12\x0c\n\x04ssid\x18\x01 \x01(\t\x12\x35\n\tfrequency\x18\x02 \x01(\x0e\x32\".proto.cloud.WifiData.Ap.Frequency\x12\x37\n\nconnection\x18\x03 \x01(\x0b\x32#.proto.cloud.WifiData.Ap.Connection\x1a}\n\nConnection\x12:\n\x06result\x18\x01 \x01(\x0e\x32*.proto.cloud.WifiData.Ap.Connection.Result\x12\x11\n\ttimestamp\x18\x02 \x01(\x04\" \n\x06Result\x12\x06\n\x02OK\x10\x00\x12\x0e\n\nPASSWD_ERR\x10\x01\"\'\n\tFrequency\x12\r\n\tFREQ_2_4G\x10\x00\x12\x0b\n\x07\x46REQ_5G\x10\x01\"\xad\x05\n\x12UnisettingResponse\x12*\n\rchildren_lock\x18\x01 \x01(\x0b\x32\x13.proto.cloud.Switch\x12/\n\x12\x63ruise_continue_sw\x18\x02 \x01(\x0b\x32\x13.proto.cloud.Switch\x12)\n\x0cmulti_map_sw\x18\x03 \x01(\x0b\x32\x13.proto.cloud.Switch\x12#\n\x06\x61i_see\x18\x04 \x01(\x0b\x32\x13.proto.cloud.Switch\x12+\n\x0ewater_level_sw\x18\x05 \x01(\x0b\x32\x13.proto.cloud.Switch\x12\x37\n\x1asuggest_restricted_zone_sw\x18\x06 \x01(\x0b\x32\x13.proto.cloud.Switch\x12/\n\x12\x64\x65\x65p_mop_corner_sw\x18\x07 \x01(\x0b\x32\x13.proto.cloud.Switch\x12\x30\n\x10\x64ust_full_remind\x18\x08 \x01(\x0b\x32\x16.proto.cloud.Numerical\x12*\n\rlive_photo_sw\x18\t \x01(\x0b\x32\x13.proto.cloud.Switch\x12\'\n\x08unistate\x18\n \x01(\x0b\x32\x15.proto.cloud.Unistate\x12\x1a\n\x12\x61p_signal_strength\x18\x0b \x01(\r\x12(\n\twifi_data\x18\x0c \x01(\x0b\x32\x15.proto.cloud.WifiData\x12,\n\x0fsmart_follow_sw\x18\r \x01(\x0b\x32\x13.proto.cloud.Switch\x12.\n\x11poop_avoidance_sw\x18\x0e \x01(\x0b\x32\x13.proto.cloud.Switch\x12(\n\x0bpet_mode_sw\x18\x0f \x01(\x0b\x32\x13.proto.cloud.Switchb\x06proto3') - -_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'proto.cloud.unisetting_pb2', globals()) -if _descriptor._USE_C_DESCRIPTORS == False: - - DESCRIPTOR._options = None - _UNISETTINGREQUEST._serialized_start=72 - _UNISETTINGREQUEST._serialized_end=1014 - _UNISETTINGREQUEST_MULTIMAPOPTIONS._serialized_start=788 - _UNISETTINGREQUEST_MULTIMAPOPTIONS._serialized_end=902 - _UNISETTINGREQUEST_MULTIMAPOPTIONS_RETAIN._serialized_start=878 - _UNISETTINGREQUEST_MULTIMAPOPTIONS_RETAIN._serialized_end=902 - _UNISETTINGREQUEST_WIFISETTING._serialized_start=904 - _UNISETTINGREQUEST_WIFISETTING._serialized_end=1014 - _UNISETTINGREQUEST_WIFISETTING_DELETION._serialized_start=990 - _UNISETTINGREQUEST_WIFISETTING_DELETION._serialized_end=1014 - _UNISTATE._serialized_start=1017 - _UNISTATE._serialized_end=1419 - _UNISTATE_LIVEMAP._serialized_start=1336 - _UNISTATE_LIVEMAP._serialized_end=1419 - _UNISTATE_LIVEMAP_STATEBIT._serialized_start=1367 - _UNISTATE_LIVEMAP_STATEBIT._serialized_end=1419 - _WIFIDATA._serialized_start=1422 - _WIFIDATA._serialized_end=1771 - _WIFIDATA_AP._serialized_start=1473 - _WIFIDATA_AP._serialized_end=1771 - _WIFIDATA_AP_CONNECTION._serialized_start=1605 - _WIFIDATA_AP_CONNECTION._serialized_end=1730 - _WIFIDATA_AP_CONNECTION_RESULT._serialized_start=1698 - _WIFIDATA_AP_CONNECTION_RESULT._serialized_end=1730 - _WIFIDATA_AP_FREQUENCY._serialized_start=1732 - _WIFIDATA_AP_FREQUENCY._serialized_end=1771 - _UNISETTINGRESPONSE._serialized_start=1774 - _UNISETTINGRESPONSE._serialized_end=2459 -# @@protoc_insertion_point(module_scope) diff --git a/proto-reference/unisetting_pb2.pyi b/proto-reference/unisetting_pb2.pyi deleted file mode 100644 index 55528b7..0000000 --- a/proto-reference/unisetting_pb2.pyi +++ /dev/null @@ -1,159 +0,0 @@ -from typing import ClassVar as _ClassVar -from typing import Iterable as _Iterable -from typing import Mapping as _Mapping -from typing import Optional as _Optional -from typing import Union as _Union - -from google.protobuf import descriptor as _descriptor -from google.protobuf import message as _message -from google.protobuf.internal import containers as _containers -from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper - -from ...proto.cloud import common_pb2 as _common_pb2 - -DESCRIPTOR: _descriptor.FileDescriptor - -class UnisettingRequest(_message.Message): - __slots__ = ["ai_see", "children_lock", "cruise_continue_sw", "deep_mop_corner_sw", "dust_full_remind", "live_photo_sw", "multi_map_options", "multi_map_sw", "pet_mode_sw", "poop_avoidance_sw", "smart_follow_sw", "suggest_restricted_zone_sw", "water_level_sw", "wifi_setting"] - class MultiMapOptions(_message.Message): - __slots__ = ["retain"] - class Retain(_message.Message): - __slots__ = ["map_id"] - MAP_ID_FIELD_NUMBER: _ClassVar[int] - map_id: _containers.RepeatedScalarFieldContainer[int] - def __init__(self, map_id: _Optional[_Iterable[int]] = ...) -> None: ... - RETAIN_FIELD_NUMBER: _ClassVar[int] - retain: UnisettingRequest.MultiMapOptions.Retain - def __init__(self, retain: _Optional[_Union[UnisettingRequest.MultiMapOptions.Retain, _Mapping]] = ...) -> None: ... - class WifiSetting(_message.Message): - __slots__ = ["deletion"] - class Deletion(_message.Message): - __slots__ = ["ssid"] - SSID_FIELD_NUMBER: _ClassVar[int] - ssid: _containers.RepeatedScalarFieldContainer[str] - def __init__(self, ssid: _Optional[_Iterable[str]] = ...) -> None: ... - DELETION_FIELD_NUMBER: _ClassVar[int] - deletion: UnisettingRequest.WifiSetting.Deletion - def __init__(self, deletion: _Optional[_Union[UnisettingRequest.WifiSetting.Deletion, _Mapping]] = ...) -> None: ... - AI_SEE_FIELD_NUMBER: _ClassVar[int] - CHILDREN_LOCK_FIELD_NUMBER: _ClassVar[int] - CRUISE_CONTINUE_SW_FIELD_NUMBER: _ClassVar[int] - DEEP_MOP_CORNER_SW_FIELD_NUMBER: _ClassVar[int] - DUST_FULL_REMIND_FIELD_NUMBER: _ClassVar[int] - LIVE_PHOTO_SW_FIELD_NUMBER: _ClassVar[int] - MULTI_MAP_OPTIONS_FIELD_NUMBER: _ClassVar[int] - MULTI_MAP_SW_FIELD_NUMBER: _ClassVar[int] - PET_MODE_SW_FIELD_NUMBER: _ClassVar[int] - POOP_AVOIDANCE_SW_FIELD_NUMBER: _ClassVar[int] - SMART_FOLLOW_SW_FIELD_NUMBER: _ClassVar[int] - SUGGEST_RESTRICTED_ZONE_SW_FIELD_NUMBER: _ClassVar[int] - WATER_LEVEL_SW_FIELD_NUMBER: _ClassVar[int] - WIFI_SETTING_FIELD_NUMBER: _ClassVar[int] - ai_see: _common_pb2.Switch - children_lock: _common_pb2.Switch - cruise_continue_sw: _common_pb2.Switch - deep_mop_corner_sw: _common_pb2.Switch - dust_full_remind: _common_pb2.Numerical - live_photo_sw: _common_pb2.Switch - multi_map_options: UnisettingRequest.MultiMapOptions - multi_map_sw: _common_pb2.Switch - pet_mode_sw: _common_pb2.Switch - poop_avoidance_sw: _common_pb2.Switch - smart_follow_sw: _common_pb2.Switch - suggest_restricted_zone_sw: _common_pb2.Switch - water_level_sw: _common_pb2.Switch - wifi_setting: UnisettingRequest.WifiSetting - def __init__(self, children_lock: _Optional[_Union[_common_pb2.Switch, _Mapping]] = ..., cruise_continue_sw: _Optional[_Union[_common_pb2.Switch, _Mapping]] = ..., multi_map_sw: _Optional[_Union[_common_pb2.Switch, _Mapping]] = ..., ai_see: _Optional[_Union[_common_pb2.Switch, _Mapping]] = ..., multi_map_options: _Optional[_Union[UnisettingRequest.MultiMapOptions, _Mapping]] = ..., wifi_setting: _Optional[_Union[UnisettingRequest.WifiSetting, _Mapping]] = ..., water_level_sw: _Optional[_Union[_common_pb2.Switch, _Mapping]] = ..., suggest_restricted_zone_sw: _Optional[_Union[_common_pb2.Switch, _Mapping]] = ..., deep_mop_corner_sw: _Optional[_Union[_common_pb2.Switch, _Mapping]] = ..., dust_full_remind: _Optional[_Union[_common_pb2.Numerical, _Mapping]] = ..., live_photo_sw: _Optional[_Union[_common_pb2.Switch, _Mapping]] = ..., smart_follow_sw: _Optional[_Union[_common_pb2.Switch, _Mapping]] = ..., poop_avoidance_sw: _Optional[_Union[_common_pb2.Switch, _Mapping]] = ..., pet_mode_sw: _Optional[_Union[_common_pb2.Switch, _Mapping]] = ...) -> None: ... - -class UnisettingResponse(_message.Message): - __slots__ = ["ai_see", "ap_signal_strength", "children_lock", "cruise_continue_sw", "deep_mop_corner_sw", "dust_full_remind", "live_photo_sw", "multi_map_sw", "pet_mode_sw", "poop_avoidance_sw", "smart_follow_sw", "suggest_restricted_zone_sw", "unistate", "water_level_sw", "wifi_data"] - AI_SEE_FIELD_NUMBER: _ClassVar[int] - AP_SIGNAL_STRENGTH_FIELD_NUMBER: _ClassVar[int] - CHILDREN_LOCK_FIELD_NUMBER: _ClassVar[int] - CRUISE_CONTINUE_SW_FIELD_NUMBER: _ClassVar[int] - DEEP_MOP_CORNER_SW_FIELD_NUMBER: _ClassVar[int] - DUST_FULL_REMIND_FIELD_NUMBER: _ClassVar[int] - LIVE_PHOTO_SW_FIELD_NUMBER: _ClassVar[int] - MULTI_MAP_SW_FIELD_NUMBER: _ClassVar[int] - PET_MODE_SW_FIELD_NUMBER: _ClassVar[int] - POOP_AVOIDANCE_SW_FIELD_NUMBER: _ClassVar[int] - SMART_FOLLOW_SW_FIELD_NUMBER: _ClassVar[int] - SUGGEST_RESTRICTED_ZONE_SW_FIELD_NUMBER: _ClassVar[int] - UNISTATE_FIELD_NUMBER: _ClassVar[int] - WATER_LEVEL_SW_FIELD_NUMBER: _ClassVar[int] - WIFI_DATA_FIELD_NUMBER: _ClassVar[int] - ai_see: _common_pb2.Switch - ap_signal_strength: int - children_lock: _common_pb2.Switch - cruise_continue_sw: _common_pb2.Switch - deep_mop_corner_sw: _common_pb2.Switch - dust_full_remind: _common_pb2.Numerical - live_photo_sw: _common_pb2.Switch - multi_map_sw: _common_pb2.Switch - pet_mode_sw: _common_pb2.Switch - poop_avoidance_sw: _common_pb2.Switch - smart_follow_sw: _common_pb2.Switch - suggest_restricted_zone_sw: _common_pb2.Switch - unistate: Unistate - water_level_sw: _common_pb2.Switch - wifi_data: WifiData - def __init__(self, children_lock: _Optional[_Union[_common_pb2.Switch, _Mapping]] = ..., cruise_continue_sw: _Optional[_Union[_common_pb2.Switch, _Mapping]] = ..., multi_map_sw: _Optional[_Union[_common_pb2.Switch, _Mapping]] = ..., ai_see: _Optional[_Union[_common_pb2.Switch, _Mapping]] = ..., water_level_sw: _Optional[_Union[_common_pb2.Switch, _Mapping]] = ..., suggest_restricted_zone_sw: _Optional[_Union[_common_pb2.Switch, _Mapping]] = ..., deep_mop_corner_sw: _Optional[_Union[_common_pb2.Switch, _Mapping]] = ..., dust_full_remind: _Optional[_Union[_common_pb2.Numerical, _Mapping]] = ..., live_photo_sw: _Optional[_Union[_common_pb2.Switch, _Mapping]] = ..., unistate: _Optional[_Union[Unistate, _Mapping]] = ..., ap_signal_strength: _Optional[int] = ..., wifi_data: _Optional[_Union[WifiData, _Mapping]] = ..., smart_follow_sw: _Optional[_Union[_common_pb2.Switch, _Mapping]] = ..., poop_avoidance_sw: _Optional[_Union[_common_pb2.Switch, _Mapping]] = ..., pet_mode_sw: _Optional[_Union[_common_pb2.Switch, _Mapping]] = ...) -> None: ... - -class Unistate(_message.Message): - __slots__ = ["clean_strategy_version", "custom_clean_mode", "live_map", "map_valid", "mop_holder_state_l", "mop_holder_state_r", "mop_state"] - class LiveMap(_message.Message): - __slots__ = ["state_bits"] - class StateBit(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - BASE: Unistate.LiveMap.StateBit - KITCHEN: Unistate.LiveMap.StateBit - PET: Unistate.LiveMap.StateBit - ROOM: Unistate.LiveMap.StateBit - STATE_BITS_FIELD_NUMBER: _ClassVar[int] - state_bits: int - def __init__(self, state_bits: _Optional[int] = ...) -> None: ... - CLEAN_STRATEGY_VERSION_FIELD_NUMBER: _ClassVar[int] - CUSTOM_CLEAN_MODE_FIELD_NUMBER: _ClassVar[int] - LIVE_MAP_FIELD_NUMBER: _ClassVar[int] - MAP_VALID_FIELD_NUMBER: _ClassVar[int] - MOP_HOLDER_STATE_L_FIELD_NUMBER: _ClassVar[int] - MOP_HOLDER_STATE_R_FIELD_NUMBER: _ClassVar[int] - MOP_STATE_FIELD_NUMBER: _ClassVar[int] - clean_strategy_version: int - custom_clean_mode: _common_pb2.Switch - live_map: Unistate.LiveMap - map_valid: _common_pb2.Active - mop_holder_state_l: _common_pb2.Switch - mop_holder_state_r: _common_pb2.Switch - mop_state: _common_pb2.Switch - def __init__(self, mop_holder_state_l: _Optional[_Union[_common_pb2.Switch, _Mapping]] = ..., mop_holder_state_r: _Optional[_Union[_common_pb2.Switch, _Mapping]] = ..., custom_clean_mode: _Optional[_Union[_common_pb2.Switch, _Mapping]] = ..., map_valid: _Optional[_Union[_common_pb2.Active, _Mapping]] = ..., mop_state: _Optional[_Union[_common_pb2.Switch, _Mapping]] = ..., live_map: _Optional[_Union[Unistate.LiveMap, _Mapping]] = ..., clean_strategy_version: _Optional[int] = ...) -> None: ... - -class WifiData(_message.Message): - __slots__ = ["ap"] - class Ap(_message.Message): - __slots__ = ["connection", "frequency", "ssid"] - class Frequency(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - class Connection(_message.Message): - __slots__ = ["result", "timestamp"] - class Result(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - OK: WifiData.Ap.Connection.Result - PASSWD_ERR: WifiData.Ap.Connection.Result - RESULT_FIELD_NUMBER: _ClassVar[int] - TIMESTAMP_FIELD_NUMBER: _ClassVar[int] - result: WifiData.Ap.Connection.Result - timestamp: int - def __init__(self, result: _Optional[_Union[WifiData.Ap.Connection.Result, str]] = ..., timestamp: _Optional[int] = ...) -> None: ... - CONNECTION_FIELD_NUMBER: _ClassVar[int] - FREQUENCY_FIELD_NUMBER: _ClassVar[int] - FREQ_2_4G: WifiData.Ap.Frequency - FREQ_5G: WifiData.Ap.Frequency - SSID_FIELD_NUMBER: _ClassVar[int] - connection: WifiData.Ap.Connection - frequency: WifiData.Ap.Frequency - ssid: str - def __init__(self, ssid: _Optional[str] = ..., frequency: _Optional[_Union[WifiData.Ap.Frequency, str]] = ..., connection: _Optional[_Union[WifiData.Ap.Connection, _Mapping]] = ...) -> None: ... - AP_FIELD_NUMBER: _ClassVar[int] - ap: _containers.RepeatedCompositeFieldContainer[WifiData.Ap] - def __init__(self, ap: _Optional[_Iterable[_Union[WifiData.Ap, _Mapping]]] = ...) -> None: ... diff --git a/proto-reference/universal_data.proto b/proto-reference/universal_data.proto deleted file mode 100644 index ebd8503..0000000 --- a/proto-reference/universal_data.proto +++ /dev/null @@ -1,27 +0,0 @@ -/** - * 通用数据协议 [EN: Universal data protocol] - */ -syntax = "proto3"; - -// option optimize_for = LITE_RUNTIME; - -package proto.cloud; - -import "proto/cloud/common.proto"; - -message UniversalDataRequest { -} - -message UniversalDataResponse { - message RoomTable { - uint32 map_id = 1; - - message Data { - uint32 id = 1; - string name = 2; - RoomScene scene = 3; - } - repeated Data data = 2; - } - RoomTable cur_map_room = 1; -} diff --git a/proto-reference/universal_data_pb2.py b/proto-reference/universal_data_pb2.py deleted file mode 100644 index cd0e653..0000000 --- a/proto-reference/universal_data_pb2.py +++ /dev/null @@ -1,32 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: proto/cloud/universal_data.proto -"""Generated protocol buffer code.""" -from google.protobuf import descriptor as _descriptor -from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import symbol_database as _symbol_database -from google.protobuf.internal import builder as _builder - -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - -from ...proto.cloud import common_pb2 as proto_dot_cloud_dot_common__pb2 - -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n proto/cloud/universal_data.proto\x12\x0bproto.cloud\x1a\x18proto/cloud/common.proto\"\x16\n\x14UniversalDataRequest\"\x83\x02\n\x15UniversalDataResponse\x12\x42\n\x0c\x63ur_map_room\x18\x01 \x01(\x0b\x32,.proto.cloud.UniversalDataResponse.RoomTable\x1a\xa5\x01\n\tRoomTable\x12\x0e\n\x06map_id\x18\x01 \x01(\r\x12?\n\x04\x64\x61ta\x18\x02 \x03(\x0b\x32\x31.proto.cloud.UniversalDataResponse.RoomTable.Data\x1aG\n\x04\x44\x61ta\x12\n\n\x02id\x18\x01 \x01(\r\x12\x0c\n\x04name\x18\x02 \x01(\t\x12%\n\x05scene\x18\x03 \x01(\x0b\x32\x16.proto.cloud.RoomSceneb\x06proto3') - -_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'proto.cloud.universal_data_pb2', globals()) -if _descriptor._USE_C_DESCRIPTORS == False: - - DESCRIPTOR._options = None - _UNIVERSALDATAREQUEST._serialized_start=75 - _UNIVERSALDATAREQUEST._serialized_end=97 - _UNIVERSALDATARESPONSE._serialized_start=100 - _UNIVERSALDATARESPONSE._serialized_end=359 - _UNIVERSALDATARESPONSE_ROOMTABLE._serialized_start=194 - _UNIVERSALDATARESPONSE_ROOMTABLE._serialized_end=359 - _UNIVERSALDATARESPONSE_ROOMTABLE_DATA._serialized_start=288 - _UNIVERSALDATARESPONSE_ROOMTABLE_DATA._serialized_end=359 -# @@protoc_insertion_point(module_scope) diff --git a/proto-reference/universal_data_pb2.pyi b/proto-reference/universal_data_pb2.pyi deleted file mode 100644 index 9254b8e..0000000 --- a/proto-reference/universal_data_pb2.pyi +++ /dev/null @@ -1,39 +0,0 @@ -from typing import ClassVar as _ClassVar -from typing import Iterable as _Iterable -from typing import Mapping as _Mapping -from typing import Optional as _Optional -from typing import Union as _Union - -from google.protobuf import descriptor as _descriptor -from google.protobuf import message as _message -from google.protobuf.internal import containers as _containers - -from ...proto.cloud import common_pb2 as _common_pb2 - -DESCRIPTOR: _descriptor.FileDescriptor - -class UniversalDataRequest(_message.Message): - __slots__ = [] - def __init__(self) -> None: ... - -class UniversalDataResponse(_message.Message): - __slots__ = ["cur_map_room"] - class RoomTable(_message.Message): - __slots__ = ["data", "map_id"] - class Data(_message.Message): - __slots__ = ["id", "name", "scene"] - ID_FIELD_NUMBER: _ClassVar[int] - NAME_FIELD_NUMBER: _ClassVar[int] - SCENE_FIELD_NUMBER: _ClassVar[int] - id: int - name: str - scene: _common_pb2.RoomScene - def __init__(self, id: _Optional[int] = ..., name: _Optional[str] = ..., scene: _Optional[_Union[_common_pb2.RoomScene, _Mapping]] = ...) -> None: ... - DATA_FIELD_NUMBER: _ClassVar[int] - MAP_ID_FIELD_NUMBER: _ClassVar[int] - data: _containers.RepeatedCompositeFieldContainer[UniversalDataResponse.RoomTable.Data] - map_id: int - def __init__(self, map_id: _Optional[int] = ..., data: _Optional[_Iterable[_Union[UniversalDataResponse.RoomTable.Data, _Mapping]]] = ...) -> None: ... - CUR_MAP_ROOM_FIELD_NUMBER: _ClassVar[int] - cur_map_room: UniversalDataResponse.RoomTable - def __init__(self, cur_map_room: _Optional[_Union[UniversalDataResponse.RoomTable, _Mapping]] = ...) -> None: ... diff --git a/proto-reference/upgrade.proto b/proto-reference/upgrade.proto deleted file mode 100644 index b82120d..0000000 --- a/proto-reference/upgrade.proto +++ /dev/null @@ -1,34 +0,0 @@ -syntax = "proto3"; - -package proto.cloud; - -// Request -message QueryUpgradeStatus { - // 无参数 [EN: No parameters] -} - -// Response -message UpgradeStatus { - enum Status { - IDLE = 0; // 空闲状态 [EN: Idle state] - DOWNLOADING = 1; // 下载中 [EN: Downloading] - DOWNLOAD_COMPLETE = 2; // 下载完成 [EN: Download complete] - DOWNLOAD_FAILED = 3; // 下载失败 [EN: Download failed] - INSTALLING = 4; // 安装中 [EN: Installing] - INSTALL_COMPLETE = 5; // 安装完成 [EN: Installation complete] - INSTALL_FAILED = 6; // 安装失败 [EN: Installation failed] - } - Status status = 1; - uint32 progress = 2; // 下载进度, 0-100% [EN: Download progress, 0-100%] - - enum Error{ - NONE = 0; - NOT_IN_STATION = 1; // 不在充电桩 [EN: Not on charging dock] - BATTERY_NOT_ENOUGH = 2; // 电量不足 [EN: Battery not enough] - MCU_INSTALL_FAILED = 3; // MCU安装失败 [EN: MCU installation failed] - AP_INSTALL_FAILED = 4; // AP安装失败 [EN: AP installation failed] - STATION_NOT_CONNECTED = 5; // 基站未连接 [EN: Station not connected] - STATION_INSTALL_FAILED = 6; // 基站安装失败 [EN: Station installation failed] - } - string error = 3; -} diff --git a/proto-reference/upgrade_pb2.py b/proto-reference/upgrade_pb2.py deleted file mode 100644 index a021275..0000000 --- a/proto-reference/upgrade_pb2.py +++ /dev/null @@ -1,31 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: proto/cloud/upgrade.proto -"""Generated protocol buffer code.""" -from google.protobuf.internal import builder as _builder -from google.protobuf import descriptor as _descriptor -from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import symbol_database as _symbol_database -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - - - -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x19proto/cloud/upgrade.proto\x12\x0bproto.cloud\"\x14\n\x12QueryUpgradeStatus\"\x95\x03\n\rUpgradeStatus\x12\x31\n\x06status\x18\x01 \x01(\x0e\x32!.proto.cloud.UpgradeStatus.Status\x12\x10\n\x08progress\x18\x02 \x01(\r\x12\r\n\x05\x65rror\x18\x03 \x01(\t\"\x89\x01\n\x06Status\x12\x08\n\x04IDLE\x10\x00\x12\x0f\n\x0b\x44OWNLOADING\x10\x01\x12\x15\n\x11\x44OWNLOAD_COMPLETE\x10\x02\x12\x13\n\x0f\x44OWNLOAD_FAILED\x10\x03\x12\x0e\n\nINSTALLING\x10\x04\x12\x14\n\x10INSTALL_COMPLETE\x10\x05\x12\x12\n\x0eINSTALL_FAILED\x10\x06\"\xa3\x01\n\x05\x45rror\x12\x08\n\x04NONE\x10\x00\x12\x12\n\x0eNOT_IN_STATION\x10\x01\x12\x16\n\x12\x42\x41TTERY_NOT_ENOUGH\x10\x02\x12\x16\n\x12MCU_INSTALL_FAILED\x10\x03\x12\x15\n\x11\x41P_INSTALL_FAILED\x10\x04\x12\x19\n\x15STATION_NOT_CONNECTED\x10\x05\x12\x1a\n\x16STATION_INSTALL_FAILED\x10\x06\x62\x06proto3') - -_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'proto.cloud.upgrade_pb2', globals()) -if _descriptor._USE_C_DESCRIPTORS == False: - - DESCRIPTOR._options = None - _QUERYUPGRADESTATUS._serialized_start=42 - _QUERYUPGRADESTATUS._serialized_end=62 - _UPGRADESTATUS._serialized_start=65 - _UPGRADESTATUS._serialized_end=470 - _UPGRADESTATUS_STATUS._serialized_start=167 - _UPGRADESTATUS_STATUS._serialized_end=304 - _UPGRADESTATUS_ERROR._serialized_start=307 - _UPGRADESTATUS_ERROR._serialized_end=470 -# @@protoc_insertion_point(module_scope) diff --git a/proto-reference/upgrade_pb2.pyi b/proto-reference/upgrade_pb2.pyi deleted file mode 100644 index 09a473a..0000000 --- a/proto-reference/upgrade_pb2.pyi +++ /dev/null @@ -1,38 +0,0 @@ -from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper -from google.protobuf import descriptor as _descriptor -from google.protobuf import message as _message -from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union - -DESCRIPTOR: _descriptor.FileDescriptor - -class QueryUpgradeStatus(_message.Message): - __slots__ = [] - def __init__(self) -> None: ... - -class UpgradeStatus(_message.Message): - __slots__ = ["error", "progress", "status"] - class Error(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - class Status(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - AP_INSTALL_FAILED: UpgradeStatus.Error - BATTERY_NOT_ENOUGH: UpgradeStatus.Error - DOWNLOADING: UpgradeStatus.Status - DOWNLOAD_COMPLETE: UpgradeStatus.Status - DOWNLOAD_FAILED: UpgradeStatus.Status - ERROR_FIELD_NUMBER: _ClassVar[int] - IDLE: UpgradeStatus.Status - INSTALLING: UpgradeStatus.Status - INSTALL_COMPLETE: UpgradeStatus.Status - INSTALL_FAILED: UpgradeStatus.Status - MCU_INSTALL_FAILED: UpgradeStatus.Error - NONE: UpgradeStatus.Error - NOT_IN_STATION: UpgradeStatus.Error - PROGRESS_FIELD_NUMBER: _ClassVar[int] - STATION_INSTALL_FAILED: UpgradeStatus.Error - STATION_NOT_CONNECTED: UpgradeStatus.Error - STATUS_FIELD_NUMBER: _ClassVar[int] - error: str - progress: int - status: UpgradeStatus.Status - def __init__(self, status: _Optional[_Union[UpgradeStatus.Status, str]] = ..., progress: _Optional[int] = ..., error: _Optional[str] = ...) -> None: ... diff --git a/proto-reference/version.proto b/proto-reference/version.proto deleted file mode 100644 index d3ee6f2..0000000 --- a/proto-reference/version.proto +++ /dev/null @@ -1,87 +0,0 @@ -syntax = "proto3"; - -// option optimize_for = LITE_RUNTIME; - -package proto.cloud; - -enum Global { - NONE = 0; - PROTO_VERSION = 1; // 目前是1,有变更则递增 [EN: Currently 1, increment on changes] -} - -// 设备支持的协议 [EN: Protocols supported by device] -message ProtoInfo { - uint32 global_verison = 1; // 使用 Global 的 PROTO_VERSION [EN: Use Global's PROTO_VERSION] - - message Module { - uint32 version = 1; - uint32 options = 2; - } - - enum CollectDustOptionBit { - COLLECT_DUST_APP_START = 0; // 此位为1时表示带App一键启动集尘功能,0表示不带 [EN: When this bit is 1, it means with App one-click start dust collection feature, 0 means without] - } - /** - * 对应 station.proto 文件 [EN: Corresponds to station.proto file] - * version 1 使用 CollectDustCfg [EN: version 1 uses CollectDustCfg] - * version 2 使用 CollectDustCfgV2, option定义见CollectDustOptionBit [EN: version 2 uses CollectDustCfgV2, option defined in CollectDustOptionBit] - */ - Module collect_dust = 2; - - enum MapFormatOptionBit { - MAP_FORMAT_ANGLE = 0; // 地图存在 angle 字段 [EN: Map has angle field] - MAP_FORMAT_RESERVE_MAP = 1; // 固件适配关闭多地图能选择保留地图 [EN: Firmware adapted to allow selecting reserved map when closing multi-map] - MAP_FORMAT_DEFAULT_NAME = 2; // 固件支持地图和房间默认名称 [EN: Firmware supports map and room default names] - } - /** - * version 1 地图增加 angle 字段(仅使用 Module.version) [EN: version 1 map adds angle field (only uses Module.version)] - * version 2 地图使用 option 定义见 MapFormatOptionBit [EN: version 2 map uses option defined in MapFormatOptionBit] - */ - Module map_format = 3; - - enum ContinueCleanOptionBit { - SMART_CONTINUE_CLEAN = 0; // 智能断点续扫 [EN: Smart resume cleaning] - } - /** - * version 1 断点续扫使用 option 定义见 ContinueCleanOptionBit [EN: version 1 resume cleaning uses option defined in ContinueCleanOptionBit] - */ - Module continue_clean = 4; - - /** - * version 1 支持割毛发功能 [EN: version 1 supports hair cutting feature] - */ - Module cut_hair = 5; - - enum TimingOptionBit { - SCHEDULE_ROOMS_CLEAN_CUSTOM = 0; // 预约房间清扫支持每个房间自定义参数 [EN: Scheduled rooms cleaning supports custom parameters for each room] - SCHEDULE_SCENE_CLEAN = 1; // 预约场景清扫 [EN: Scheduled scene cleaning] - } - /** - * version 1 定时功能使用 option 定义见 TimingOptionBit [EN: version 1 schedule feature uses option defined in TimingOptionBit] - */ - Module timing = 6; -} - -// App 支持的功能 [EN: Features supported by App] -message AppFunction { - message Module { - uint32 version = 1; - uint32 options = 2; - } - - enum MultiMapsFunctionBit { - REMIND_MAP_SAVE = 0; // 此位为1时表示App的拥有能力是地图提醒保存 [EN: When this bit is 1, it means App has the capability of map save reminder] - } - /** - * version 1 使用 option 定义见 MultiMapsFunctionBit [EN: version 1 uses option defined in MultiMapsFunctionBit] - */ - Module multi_maps= 2; - - enum OptimizationFunctionBit { - PATH_HIDE_TYPE = 0; // 此位为1时表示App支持路径隐藏类型 [EN: When this bit is 1, it means App supports path hide type] - } - /** - * version 1 使用 option 定义见 OptimizationFunctionBit [EN: version 1 uses option defined in OptimizationFunctionBit] - */ - Module optimization = 3; -} diff --git a/proto-reference/version_pb2.py b/proto-reference/version_pb2.py deleted file mode 100644 index c08a8b9..0000000 --- a/proto-reference/version_pb2.py +++ /dev/null @@ -1,45 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: proto/cloud/version.proto -"""Generated protocol buffer code.""" -from google.protobuf.internal import builder as _builder -from google.protobuf import descriptor as _descriptor -from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import symbol_database as _symbol_database -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - - - -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x19proto/cloud/version.proto\x12\x0bproto.cloud\"\xe9\x04\n\tProtoInfo\x12\x16\n\x0eglobal_verison\x18\x01 \x01(\r\x12\x33\n\x0c\x63ollect_dust\x18\x02 \x01(\x0b\x32\x1d.proto.cloud.ProtoInfo.Module\x12\x31\n\nmap_format\x18\x03 \x01(\x0b\x32\x1d.proto.cloud.ProtoInfo.Module\x12\x35\n\x0e\x63ontinue_clean\x18\x04 \x01(\x0b\x32\x1d.proto.cloud.ProtoInfo.Module\x12/\n\x08\x63ut_hair\x18\x05 \x01(\x0b\x32\x1d.proto.cloud.ProtoInfo.Module\x12-\n\x06timing\x18\x06 \x01(\x0b\x32\x1d.proto.cloud.ProtoInfo.Module\x1a*\n\x06Module\x12\x0f\n\x07version\x18\x01 \x01(\r\x12\x0f\n\x07options\x18\x02 \x01(\r\"2\n\x14\x43ollectDustOptionBit\x12\x1a\n\x16\x43OLLECT_DUST_APP_START\x10\x00\"c\n\x12MapFormatOptionBit\x12\x14\n\x10MAP_FORMAT_ANGLE\x10\x00\x12\x1a\n\x16MAP_FORMAT_RESERVE_MAP\x10\x01\x12\x1b\n\x17MAP_FORMAT_DEFAULT_NAME\x10\x02\"2\n\x16\x43ontinueCleanOptionBit\x12\x18\n\x14SMART_CONTINUE_CLEAN\x10\x00\"L\n\x0fTimingOptionBit\x12\x1f\n\x1bSCHEDULE_ROOMS_CLEAN_CUSTOM\x10\x00\x12\x18\n\x14SCHEDULE_SCENE_CLEAN\x10\x01\"\x81\x02\n\x0b\x41ppFunction\x12\x33\n\nmulti_maps\x18\x02 \x01(\x0b\x32\x1f.proto.cloud.AppFunction.Module\x12\x35\n\x0coptimization\x18\x03 \x01(\x0b\x32\x1f.proto.cloud.AppFunction.Module\x1a*\n\x06Module\x12\x0f\n\x07version\x18\x01 \x01(\r\x12\x0f\n\x07options\x18\x02 \x01(\r\"+\n\x14MultiMapsFunctionBit\x12\x13\n\x0fREMIND_MAP_SAVE\x10\x00\"-\n\x17OptimizationFunctionBit\x12\x12\n\x0ePATH_HIDE_TYPE\x10\x00*%\n\x06Global\x12\x08\n\x04NONE\x10\x00\x12\x11\n\rPROTO_VERSION\x10\x01\x62\x06proto3') - -_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'proto.cloud.version_pb2', globals()) -if _descriptor._USE_C_DESCRIPTORS == False: - - DESCRIPTOR._options = None - _GLOBAL._serialized_start=922 - _GLOBAL._serialized_end=959 - _PROTOINFO._serialized_start=43 - _PROTOINFO._serialized_end=660 - _PROTOINFO_MODULE._serialized_start=335 - _PROTOINFO_MODULE._serialized_end=377 - _PROTOINFO_COLLECTDUSTOPTIONBIT._serialized_start=379 - _PROTOINFO_COLLECTDUSTOPTIONBIT._serialized_end=429 - _PROTOINFO_MAPFORMATOPTIONBIT._serialized_start=431 - _PROTOINFO_MAPFORMATOPTIONBIT._serialized_end=530 - _PROTOINFO_CONTINUECLEANOPTIONBIT._serialized_start=532 - _PROTOINFO_CONTINUECLEANOPTIONBIT._serialized_end=582 - _PROTOINFO_TIMINGOPTIONBIT._serialized_start=584 - _PROTOINFO_TIMINGOPTIONBIT._serialized_end=660 - _APPFUNCTION._serialized_start=663 - _APPFUNCTION._serialized_end=920 - _APPFUNCTION_MODULE._serialized_start=335 - _APPFUNCTION_MODULE._serialized_end=377 - _APPFUNCTION_MULTIMAPSFUNCTIONBIT._serialized_start=830 - _APPFUNCTION_MULTIMAPSFUNCTIONBIT._serialized_end=873 - _APPFUNCTION_OPTIMIZATIONFUNCTIONBIT._serialized_start=875 - _APPFUNCTION_OPTIMIZATIONFUNCTIONBIT._serialized_end=920 -# @@protoc_insertion_point(module_scope) diff --git a/proto-reference/version_pb2.pyi b/proto-reference/version_pb2.pyi deleted file mode 100644 index a7e91fc..0000000 --- a/proto-reference/version_pb2.pyi +++ /dev/null @@ -1,70 +0,0 @@ -from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper -from google.protobuf import descriptor as _descriptor -from google.protobuf import message as _message -from typing import ClassVar as _ClassVar, Mapping as _Mapping, Optional as _Optional, Union as _Union - -DESCRIPTOR: _descriptor.FileDescriptor -NONE: Global -PROTO_VERSION: Global - -class AppFunction(_message.Message): - __slots__ = ["multi_maps", "optimization"] - class MultiMapsFunctionBit(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - class OptimizationFunctionBit(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - class Module(_message.Message): - __slots__ = ["options", "version"] - OPTIONS_FIELD_NUMBER: _ClassVar[int] - VERSION_FIELD_NUMBER: _ClassVar[int] - options: int - version: int - def __init__(self, version: _Optional[int] = ..., options: _Optional[int] = ...) -> None: ... - MULTI_MAPS_FIELD_NUMBER: _ClassVar[int] - OPTIMIZATION_FIELD_NUMBER: _ClassVar[int] - PATH_HIDE_TYPE: AppFunction.OptimizationFunctionBit - REMIND_MAP_SAVE: AppFunction.MultiMapsFunctionBit - multi_maps: AppFunction.Module - optimization: AppFunction.Module - def __init__(self, multi_maps: _Optional[_Union[AppFunction.Module, _Mapping]] = ..., optimization: _Optional[_Union[AppFunction.Module, _Mapping]] = ...) -> None: ... - -class ProtoInfo(_message.Message): - __slots__ = ["collect_dust", "continue_clean", "cut_hair", "global_verison", "map_format", "timing"] - class CollectDustOptionBit(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - class ContinueCleanOptionBit(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - class MapFormatOptionBit(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - class TimingOptionBit(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - class Module(_message.Message): - __slots__ = ["options", "version"] - OPTIONS_FIELD_NUMBER: _ClassVar[int] - VERSION_FIELD_NUMBER: _ClassVar[int] - options: int - version: int - def __init__(self, version: _Optional[int] = ..., options: _Optional[int] = ...) -> None: ... - COLLECT_DUST_APP_START: ProtoInfo.CollectDustOptionBit - COLLECT_DUST_FIELD_NUMBER: _ClassVar[int] - CONTINUE_CLEAN_FIELD_NUMBER: _ClassVar[int] - CUT_HAIR_FIELD_NUMBER: _ClassVar[int] - GLOBAL_VERISON_FIELD_NUMBER: _ClassVar[int] - MAP_FORMAT_ANGLE: ProtoInfo.MapFormatOptionBit - MAP_FORMAT_DEFAULT_NAME: ProtoInfo.MapFormatOptionBit - MAP_FORMAT_FIELD_NUMBER: _ClassVar[int] - MAP_FORMAT_RESERVE_MAP: ProtoInfo.MapFormatOptionBit - SCHEDULE_ROOMS_CLEAN_CUSTOM: ProtoInfo.TimingOptionBit - SCHEDULE_SCENE_CLEAN: ProtoInfo.TimingOptionBit - SMART_CONTINUE_CLEAN: ProtoInfo.ContinueCleanOptionBit - TIMING_FIELD_NUMBER: _ClassVar[int] - collect_dust: ProtoInfo.Module - continue_clean: ProtoInfo.Module - cut_hair: ProtoInfo.Module - global_verison: int - map_format: ProtoInfo.Module - timing: ProtoInfo.Module - def __init__(self, global_verison: _Optional[int] = ..., collect_dust: _Optional[_Union[ProtoInfo.Module, _Mapping]] = ..., map_format: _Optional[_Union[ProtoInfo.Module, _Mapping]] = ..., continue_clean: _Optional[_Union[ProtoInfo.Module, _Mapping]] = ..., cut_hair: _Optional[_Union[ProtoInfo.Module, _Mapping]] = ..., timing: _Optional[_Union[ProtoInfo.Module, _Mapping]] = ...) -> None: ... - -class Global(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] diff --git a/proto-reference/work_status.proto b/proto-reference/work_status.proto deleted file mode 100644 index b51940a..0000000 --- a/proto-reference/work_status.proto +++ /dev/null @@ -1,252 +0,0 @@ -syntax = "proto3"; - -// option optimize_for = LITE_RUNTIME; - -package proto.cloud; - -message WorkStatus { - // 刚开机时,不用传 mode,由手机 app 自行决定展示默认值 [EN: When just powered on, no need to send mode, mobile app decides the default display value] - // mode 由手机 app 下发或按键更改,回复值和上次相同 [EN: mode is sent by mobile app or changed by button, reply value is same as last time] - message Mode { - enum Value { - AUTO = 0; // 全局自动清洁 [EN: Global auto cleaning] - SELECT_ROOM = 1; // 选房清洁 [EN: Selected room cleaning] - SELECT_ZONE = 2; // 选区清洁 [EN: Selected zone cleaning] - SPOT = 3; // 定点清洁 [EN: Spot cleaning] - FAST_MAPPING = 4; // 快速建图 [EN: Fast mapping] - GLOBAL_CRUISE = 5; // 全屋巡航 [EN: Whole house cruise] - ZONES_CRUISE = 6; // 选区巡航 [EN: Selected zones cruise] - POINT_CRUISE = 7; // 指哪巡航(精准到达) [EN: Point cruise (precise arrival)] - SCENE = 8; // 场景清洁 [EN: Scene cleaning] - SMART_FOLLOW = 9; // 智能跟随 [EN: Smart follow] - } - Value value = 1; - } - Mode mode = 1; - - enum State { - STANDBY = 0; // 待机、建图暂停、暂停清洁、暂停回洗、暂停回充、暂停巡航、寻找机器人 [EN: Standby, mapping paused, cleaning paused, wash return paused, charge return paused, cruise paused, finding robot] - SLEEP = 1; // 休眠 [EN: Sleep] - FAULT = 2; // 故障 [EN: Fault] - CHARGING = 3; // 升级中(未来可能考虑非充电状态也能升级)、充电中、充电完成、充电异常 [EN: Upgrading (may consider non-charging upgrade in future), charging, charge complete, charging abnormal] - FAST_MAPPING = 4; // 定位中、快速建图 [EN: Positioning, fast mapping] - CLEANING = 5; // 定位中、全局清洁、选区清洁、划区清洁、定点清洁、回洗拖布中、清洗拖布中 [EN: Positioning, global cleaning, zone cleaning, area cleaning, spot cleaning, returning to wash mop, washing mop] - REMOTE_CTRL = 6; // 遥控中 [EN: Remote controlling] - GO_HOME = 7; // 定位中、回充中(包括清洁完成回充、低电回充) [EN: Positioning, returning to charge (including post-cleaning and low battery return)] - CRUISIING = 8; // 定位中、巡航中 [EN: Positioning, cruising] - } - State state = 2; - - // 某一时刻以下子状态可能存在一个或同时存在多个 [EN: At any moment, one or more of the following sub-states may exist simultaneously] - // 隐含规则:下面 message 如果不存在表示该子状态为 IDLE [EN: Implicit rule: if the message below doesn't exist, that sub-state is IDLE] - - message Charging { - enum State { - DOING = 0; - DONE = 1; - ABNORMAL = 2; // 充电异常(充电弹片接触但无法充电) [EN: Charging abnormal (charging contacts connected but cannot charge)] - } - State state = 1; - } - Charging charging = 3; - - message Upgrading { - enum State { - DOING = 0; - DONE = 1; - } - State state = 1; - } - Upgrading upgrading = 4; - - message Mapping { // 快速建图、清洁建图都会有这个 message [EN: Both fast mapping and cleaning mapping will have this message] - enum RunState { - DOING = 0; - PAUSED = 1; - } - RunState state = 1; - - enum Mode { - MAPPING = 0; // [兼容字段,4.1 废弃] [EN: Compatibility field, deprecated in 4.1] - RELOCATING = 1; // [兼容字段,4.1 废弃] [EN: Compatibility field, deprecated in 4.1] - } - Mode mode = 2; // [兼容字段,4.1 废弃] [EN: Compatibility field, deprecated in 4.1] - } - Mapping mapping = 5; - - message Cleaning { - enum RunState { - DOING = 0; - PAUSED = 1; - } - RunState state = 1; - - enum Mode { - CLEANING = 0; - RELOCATING = 1; // [兼容字段,4.1 废弃] [EN: Compatibility field, deprecated in 4.1] - GOTO_POS = 2; - POOP_CLEANING = 3; // 便便补扫 [EN: Poop re-cleaning] - } - Mode mode = 2; - bool scheduled_task = 3; // 是否在执行预约定时任务 [EN: Whether executing scheduled task] - } - Cleaning cleaning = 6; - - message GoWash { - enum RunState { - DOING = 0; - PAUSED = 1; - } - RunState state = 1; - - enum Mode { - NAVIGATION = 0; // 回洗 [EN: Return to wash] - WASHING = 1; // 清洗拖布中 [EN: Washing mop] - DRYING = 2; // 烘干拖布中(严格意义不属于回洗) [EN: Drying mop (strictly not part of wash return)] - } - Mode mode = 2; - } - GoWash go_wash = 7; - - message GoHome { - enum RunState { - DOING = 0; - PAUSED = 1; - } - RunState state = 1; - - enum Mode { - COMPLETE_TASK = 0; // 完成任务回充 [EN: Return to charge after task completion] - COLLECT_DUST = 1; // 中途集尘回充 [EN: Mid-task dust collection return] - OTHRERS = 10; // 其他回充 [EN: Other returns to charge] - } - Mode mode = 2; - } - GoHome go_home = 8; - - message Cruisiing { - enum RunState { - DOING = 0; - PAUSED = 1; - } - RunState state = 1; - - enum Mode { - RELOCATING = 0; // [兼容字段,4.1 废弃] [EN: Compatibility field, deprecated in 4.1] - CRUISIING = 1; // [兼容字段,4.1 废弃] [EN: Compatibility field, deprecated in 4.1] - } - Mode mode = 2; // [兼容字段,4.1 废弃] [EN: Compatibility field, deprecated in 4.1] - } - Cruisiing cruisiing = 9; - - message Relocating { - enum State { - DOING = 0; - } - State state = 1; - } - Relocating relocating = 10; - - message Breakpoint { - enum State { - DOING = 0; - } - State state = 1; - } - Breakpoint breakpoint = 11; - - message RollerBrushCleaning { - enum State { - DOING = 0; - } - State state = 1; - } - RollerBrushCleaning roller_brush_cleaning = 12; - - message SmartFollow { - enum State { - DOING = 0; - } - State state = 1; - - enum Mode { - FOLLOWING = 0; // 跟随中 [EN: Following] - SEARCHING = 1; // 搜索目标中 [EN: Searching for target] - } - Mode mode = 2; - uint32 elapsed_time = 3; // 已执行时间 [EN: Elapsed time] - uint32 area = 4; // 面积 [EN: Area] - } - SmartFollow smart_follow = 13; - - message Station { - // 注水系统,操作对象:机器人水箱 [EN: Water injection system, operation target: robot water tank] - message WaterInjectionSystem { - enum State { - ADDING = 0; // 注水中 [EN: Adding water] - EMPTYING = 1; // 排水中 [EN: Draining water] - } - State state = 1; - } - WaterInjectionSystem water_injection_system = 1; - - // 集尘系统,操作对象:机器人集尘盒 [EN: Dust collection system, operation target: robot dust bin] - message DustCollectionSystem { - enum State { - EMPTYING = 0; // 排空中 [EN: Emptying] - } - State state = 1; - } - DustCollectionSystem dust_collection_system = 2; - - // 洗和烘干系统,操作对象:机器人拖布 [EN: Washing and drying system, operation target: robot mop] - message WashingDryingSystem { - enum State { - WASHING = 0; // 洗拖布中 [EN: Washing mop] - DRYING = 1; // 烘干拖布中 [EN: Drying mop] - } - State state = 1; - } - WashingDryingSystem washing_drying_system = 3; - - // 基站水箱状态 [EN: Station water tank status] - message WaterTankState { - bool clear_water_adding = 1; // 清水添加中 [EN: Adding clean water] - bool waste_water_recycling = 2; // 污水回收中 [EN: Recycling waste water] - } - WaterTankState water_tank_state = 4; - } - Station station = 14; // 从 x10 项目开始使用这里的基站状态,station dp 的状态保留但不做逻辑处理 [EN: From x10 project onwards use station status here, station dp status is retained but not logically processed] - - message Scene { - uint32 id = 1; - - uint32 elapsed_time = 2; // 已执行时间,0 有效 [EN: Elapsed time, 0 is valid] - uint32 estimate_time = 3; // 预估完成时间,0 无效 [EN: Estimated completion time, 0 is invalid] - string name = 4; - - enum TaskMode { - AUTO = 0; // 全局自动清洁 [EN: Global auto cleaning] - SELECT_ROOM = 1; // 选房清洁 [EN: Selected room cleaning] - SELECT_ZONE = 2; // 选区清洁 [EN: Selected zone cleaning] - } - TaskMode task_mode = 5; - - // 后面这里加上场景的时间线 [EN: Add scene timeline here later] - // ... - } - Scene current_scene = 19; - - message Trigger { - enum Source { - UNKNOWN = 0; // 来源未知,如:刚开机 [EN: Unknown source, e.g., just powered on] - APP = 1; // 手机 app 或者其他调试工具 [EN: Mobile app or other debugging tools] - KEY = 2; // 按键,如:暂停、继续、停止、回充等 [EN: Button, e.g., pause, resume, stop, return to charge, etc.] - TIMING = 3; // 定时,如:每天清洁、每周清洁等 [EN: Scheduled, e.g., daily cleaning, weekly cleaning, etc.] - ROBOT = 4; // 机器人,如:低电、故障、清洁完成等 [EN: Robot, e.g., low battery, fault, cleaning complete, etc.] - REMOTE_CTRL = 5; // 遥控器, 如:遥控器按键 [EN: Remote control, e.g., remote control buttons] - } - Source source = 1; - } - Trigger trigger = 20; -} diff --git a/proto-reference/work_status_pb2.py b/proto-reference/work_status_pb2.py deleted file mode 100644 index 36964f7..0000000 --- a/proto-reference/work_status_pb2.py +++ /dev/null @@ -1,111 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: proto/cloud/work_status.proto -"""Generated protocol buffer code.""" -from google.protobuf.internal import builder as _builder -from google.protobuf import descriptor as _descriptor -from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import symbol_database as _symbol_database -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - - - -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1dproto/cloud/work_status.proto\x12\x0bproto.cloud\"\xc4 \n\nWorkStatus\x12*\n\x04mode\x18\x01 \x01(\x0b\x32\x1c.proto.cloud.WorkStatus.Mode\x12,\n\x05state\x18\x02 \x01(\x0e\x32\x1d.proto.cloud.WorkStatus.State\x12\x32\n\x08\x63harging\x18\x03 \x01(\x0b\x32 .proto.cloud.WorkStatus.Charging\x12\x34\n\tupgrading\x18\x04 \x01(\x0b\x32!.proto.cloud.WorkStatus.Upgrading\x12\x30\n\x07mapping\x18\x05 \x01(\x0b\x32\x1f.proto.cloud.WorkStatus.Mapping\x12\x32\n\x08\x63leaning\x18\x06 \x01(\x0b\x32 .proto.cloud.WorkStatus.Cleaning\x12/\n\x07go_wash\x18\x07 \x01(\x0b\x32\x1e.proto.cloud.WorkStatus.GoWash\x12/\n\x07go_home\x18\x08 \x01(\x0b\x32\x1e.proto.cloud.WorkStatus.GoHome\x12\x34\n\tcruisiing\x18\t \x01(\x0b\x32!.proto.cloud.WorkStatus.Cruisiing\x12\x36\n\nrelocating\x18\n \x01(\x0b\x32\".proto.cloud.WorkStatus.Relocating\x12\x36\n\nbreakpoint\x18\x0b \x01(\x0b\x32\".proto.cloud.WorkStatus.Breakpoint\x12J\n\x15roller_brush_cleaning\x18\x0c \x01(\x0b\x32+.proto.cloud.WorkStatus.RollerBrushCleaning\x12\x39\n\x0csmart_follow\x18\r \x01(\x0b\x32#.proto.cloud.WorkStatus.SmartFollow\x12\x30\n\x07station\x18\x0e \x01(\x0b\x32\x1f.proto.cloud.WorkStatus.Station\x12\x34\n\rcurrent_scene\x18\x13 \x01(\x0b\x32\x1d.proto.cloud.WorkStatus.Scene\x12\x30\n\x07trigger\x18\x14 \x01(\x0b\x32\x1f.proto.cloud.WorkStatus.Trigger\x1a\xdf\x01\n\x04Mode\x12\x31\n\x05value\x18\x01 \x01(\x0e\x32\".proto.cloud.WorkStatus.Mode.Value\"\xa3\x01\n\x05Value\x12\x08\n\x04\x41UTO\x10\x00\x12\x0f\n\x0bSELECT_ROOM\x10\x01\x12\x0f\n\x0bSELECT_ZONE\x10\x02\x12\x08\n\x04SPOT\x10\x03\x12\x10\n\x0c\x46\x41ST_MAPPING\x10\x04\x12\x11\n\rGLOBAL_CRUISE\x10\x05\x12\x10\n\x0cZONES_CRUISE\x10\x06\x12\x10\n\x0cPOINT_CRUISE\x10\x07\x12\t\n\x05SCENE\x10\x08\x12\x10\n\x0cSMART_FOLLOW\x10\t\x1am\n\x08\x43harging\x12\x35\n\x05state\x18\x01 \x01(\x0e\x32&.proto.cloud.WorkStatus.Charging.State\"*\n\x05State\x12\t\n\x05\x44OING\x10\x00\x12\x08\n\x04\x44ONE\x10\x01\x12\x0c\n\x08\x41\x42NORMAL\x10\x02\x1a\x61\n\tUpgrading\x12\x36\n\x05state\x18\x01 \x01(\x0e\x32\'.proto.cloud.WorkStatus.Upgrading.State\"\x1c\n\x05State\x12\t\n\x05\x44OING\x10\x00\x12\x08\n\x04\x44ONE\x10\x01\x1a\xbe\x01\n\x07Mapping\x12\x37\n\x05state\x18\x01 \x01(\x0e\x32(.proto.cloud.WorkStatus.Mapping.RunState\x12\x32\n\x04mode\x18\x02 \x01(\x0e\x32$.proto.cloud.WorkStatus.Mapping.Mode\"!\n\x08RunState\x12\t\n\x05\x44OING\x10\x00\x12\n\n\x06PAUSED\x10\x01\"#\n\x04Mode\x12\x0b\n\x07MAPPING\x10\x00\x12\x0e\n\nRELOCATING\x10\x01\x1a\xfb\x01\n\x08\x43leaning\x12\x38\n\x05state\x18\x01 \x01(\x0e\x32).proto.cloud.WorkStatus.Cleaning.RunState\x12\x33\n\x04mode\x18\x02 \x01(\x0e\x32%.proto.cloud.WorkStatus.Cleaning.Mode\x12\x16\n\x0escheduled_task\x18\x03 \x01(\x08\"!\n\x08RunState\x12\t\n\x05\x44OING\x10\x00\x12\n\n\x06PAUSED\x10\x01\"E\n\x04Mode\x12\x0c\n\x08\x43LEANING\x10\x00\x12\x0e\n\nRELOCATING\x10\x01\x12\x0c\n\x08GOTO_POS\x10\x02\x12\x11\n\rPOOP_CLEANING\x10\x03\x1a\xc7\x01\n\x06GoWash\x12\x36\n\x05state\x18\x01 \x01(\x0e\x32\'.proto.cloud.WorkStatus.GoWash.RunState\x12\x31\n\x04mode\x18\x02 \x01(\x0e\x32#.proto.cloud.WorkStatus.GoWash.Mode\"!\n\x08RunState\x12\t\n\x05\x44OING\x10\x00\x12\n\n\x06PAUSED\x10\x01\"/\n\x04Mode\x12\x0e\n\nNAVIGATION\x10\x00\x12\x0b\n\x07WASHING\x10\x01\x12\n\n\x06\x44RYING\x10\x02\x1a\xd0\x01\n\x06GoHome\x12\x36\n\x05state\x18\x01 \x01(\x0e\x32\'.proto.cloud.WorkStatus.GoHome.RunState\x12\x31\n\x04mode\x18\x02 \x01(\x0e\x32#.proto.cloud.WorkStatus.GoHome.Mode\"!\n\x08RunState\x12\t\n\x05\x44OING\x10\x00\x12\n\n\x06PAUSED\x10\x01\"8\n\x04Mode\x12\x11\n\rCOMPLETE_TASK\x10\x00\x12\x10\n\x0c\x43OLLECT_DUST\x10\x01\x12\x0b\n\x07OTHRERS\x10\n\x1a\xc6\x01\n\tCruisiing\x12\x39\n\x05state\x18\x01 \x01(\x0e\x32*.proto.cloud.WorkStatus.Cruisiing.RunState\x12\x34\n\x04mode\x18\x02 \x01(\x0e\x32&.proto.cloud.WorkStatus.Cruisiing.Mode\"!\n\x08RunState\x12\t\n\x05\x44OING\x10\x00\x12\n\n\x06PAUSED\x10\x01\"%\n\x04Mode\x12\x0e\n\nRELOCATING\x10\x00\x12\r\n\tCRUISIING\x10\x01\x1aY\n\nRelocating\x12\x37\n\x05state\x18\x01 \x01(\x0e\x32(.proto.cloud.WorkStatus.Relocating.State\"\x12\n\x05State\x12\t\n\x05\x44OING\x10\x00\x1aY\n\nBreakpoint\x12\x37\n\x05state\x18\x01 \x01(\x0e\x32(.proto.cloud.WorkStatus.Breakpoint.State\"\x12\n\x05State\x12\t\n\x05\x44OING\x10\x00\x1ak\n\x13RollerBrushCleaning\x12@\n\x05state\x18\x01 \x01(\x0e\x32\x31.proto.cloud.WorkStatus.RollerBrushCleaning.State\"\x12\n\x05State\x12\t\n\x05\x44OING\x10\x00\x1a\xdd\x01\n\x0bSmartFollow\x12\x38\n\x05state\x18\x01 \x01(\x0e\x32).proto.cloud.WorkStatus.SmartFollow.State\x12\x36\n\x04mode\x18\x02 \x01(\x0e\x32(.proto.cloud.WorkStatus.SmartFollow.Mode\x12\x14\n\x0c\x65lapsed_time\x18\x03 \x01(\r\x12\x0c\n\x04\x61rea\x18\x04 \x01(\r\"\x12\n\x05State\x12\t\n\x05\x44OING\x10\x00\"$\n\x04Mode\x12\r\n\tFOLLOWING\x10\x00\x12\r\n\tSEARCHING\x10\x01\x1a\xa5\x06\n\x07Station\x12T\n\x16water_injection_system\x18\x01 \x01(\x0b\x32\x34.proto.cloud.WorkStatus.Station.WaterInjectionSystem\x12T\n\x16\x64ust_collection_system\x18\x02 \x01(\x0b\x32\x34.proto.cloud.WorkStatus.Station.DustCollectionSystem\x12R\n\x15washing_drying_system\x18\x03 \x01(\x0b\x32\x33.proto.cloud.WorkStatus.Station.WashingDryingSystem\x12H\n\x10water_tank_state\x18\x04 \x01(\x0b\x32..proto.cloud.WorkStatus.Station.WaterTankState\x1a\x84\x01\n\x14WaterInjectionSystem\x12I\n\x05state\x18\x01 \x01(\x0e\x32:.proto.cloud.WorkStatus.Station.WaterInjectionSystem.State\"!\n\x05State\x12\n\n\x06\x41\x44\x44ING\x10\x00\x12\x0c\n\x08\x45MPTYING\x10\x01\x1ax\n\x14\x44ustCollectionSystem\x12I\n\x05state\x18\x01 \x01(\x0e\x32:.proto.cloud.WorkStatus.Station.DustCollectionSystem.State\"\x15\n\x05State\x12\x0c\n\x08\x45MPTYING\x10\x00\x1a\x81\x01\n\x13WashingDryingSystem\x12H\n\x05state\x18\x01 \x01(\x0e\x32\x39.proto.cloud.WorkStatus.Station.WashingDryingSystem.State\" \n\x05State\x12\x0b\n\x07WASHING\x10\x00\x12\n\n\x06\x44RYING\x10\x01\x1aK\n\x0eWaterTankState\x12\x1a\n\x12\x63lear_water_adding\x18\x01 \x01(\x08\x12\x1d\n\x15waste_water_recycling\x18\x02 \x01(\x08\x1a\xc1\x01\n\x05Scene\x12\n\n\x02id\x18\x01 \x01(\r\x12\x14\n\x0c\x65lapsed_time\x18\x02 \x01(\r\x12\x15\n\restimate_time\x18\x03 \x01(\r\x12\x0c\n\x04name\x18\x04 \x01(\t\x12\x39\n\ttask_mode\x18\x05 \x01(\x0e\x32&.proto.cloud.WorkStatus.Scene.TaskMode\"6\n\x08TaskMode\x12\x08\n\x04\x41UTO\x10\x00\x12\x0f\n\x0bSELECT_ROOM\x10\x01\x12\x0f\n\x0bSELECT_ZONE\x10\x02\x1a\x92\x01\n\x07Trigger\x12\x36\n\x06source\x18\x01 \x01(\x0e\x32&.proto.cloud.WorkStatus.Trigger.Source\"O\n\x06Source\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x07\n\x03\x41PP\x10\x01\x12\x07\n\x03KEY\x10\x02\x12\n\n\x06TIMING\x10\x03\x12\t\n\x05ROBOT\x10\x04\x12\x0f\n\x0bREMOTE_CTRL\x10\x05\"\x85\x01\n\x05State\x12\x0b\n\x07STANDBY\x10\x00\x12\t\n\x05SLEEP\x10\x01\x12\t\n\x05\x46\x41ULT\x10\x02\x12\x0c\n\x08\x43HARGING\x10\x03\x12\x10\n\x0c\x46\x41ST_MAPPING\x10\x04\x12\x0c\n\x08\x43LEANING\x10\x05\x12\x0f\n\x0bREMOTE_CTRL\x10\x06\x12\x0b\n\x07GO_HOME\x10\x07\x12\r\n\tCRUISIING\x10\x08\x62\x06proto3') - -_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'proto.cloud.work_status_pb2', globals()) -if _descriptor._USE_C_DESCRIPTORS == False: - - DESCRIPTOR._options = None - _WORKSTATUS._serialized_start=47 - _WORKSTATUS._serialized_end=4211 - _WORKSTATUS_MODE._serialized_start=913 - _WORKSTATUS_MODE._serialized_end=1136 - _WORKSTATUS_MODE_VALUE._serialized_start=973 - _WORKSTATUS_MODE_VALUE._serialized_end=1136 - _WORKSTATUS_CHARGING._serialized_start=1138 - _WORKSTATUS_CHARGING._serialized_end=1247 - _WORKSTATUS_CHARGING_STATE._serialized_start=1205 - _WORKSTATUS_CHARGING_STATE._serialized_end=1247 - _WORKSTATUS_UPGRADING._serialized_start=1249 - _WORKSTATUS_UPGRADING._serialized_end=1346 - _WORKSTATUS_UPGRADING_STATE._serialized_start=1205 - _WORKSTATUS_UPGRADING_STATE._serialized_end=1233 - _WORKSTATUS_MAPPING._serialized_start=1349 - _WORKSTATUS_MAPPING._serialized_end=1539 - _WORKSTATUS_MAPPING_RUNSTATE._serialized_start=1469 - _WORKSTATUS_MAPPING_RUNSTATE._serialized_end=1502 - _WORKSTATUS_MAPPING_MODE._serialized_start=1504 - _WORKSTATUS_MAPPING_MODE._serialized_end=1539 - _WORKSTATUS_CLEANING._serialized_start=1542 - _WORKSTATUS_CLEANING._serialized_end=1793 - _WORKSTATUS_CLEANING_RUNSTATE._serialized_start=1469 - _WORKSTATUS_CLEANING_RUNSTATE._serialized_end=1502 - _WORKSTATUS_CLEANING_MODE._serialized_start=1724 - _WORKSTATUS_CLEANING_MODE._serialized_end=1793 - _WORKSTATUS_GOWASH._serialized_start=1796 - _WORKSTATUS_GOWASH._serialized_end=1995 - _WORKSTATUS_GOWASH_RUNSTATE._serialized_start=1469 - _WORKSTATUS_GOWASH_RUNSTATE._serialized_end=1502 - _WORKSTATUS_GOWASH_MODE._serialized_start=1948 - _WORKSTATUS_GOWASH_MODE._serialized_end=1995 - _WORKSTATUS_GOHOME._serialized_start=1998 - _WORKSTATUS_GOHOME._serialized_end=2206 - _WORKSTATUS_GOHOME_RUNSTATE._serialized_start=1469 - _WORKSTATUS_GOHOME_RUNSTATE._serialized_end=1502 - _WORKSTATUS_GOHOME_MODE._serialized_start=2150 - _WORKSTATUS_GOHOME_MODE._serialized_end=2206 - _WORKSTATUS_CRUISIING._serialized_start=2209 - _WORKSTATUS_CRUISIING._serialized_end=2407 - _WORKSTATUS_CRUISIING_RUNSTATE._serialized_start=1469 - _WORKSTATUS_CRUISIING_RUNSTATE._serialized_end=1502 - _WORKSTATUS_CRUISIING_MODE._serialized_start=2370 - _WORKSTATUS_CRUISIING_MODE._serialized_end=2407 - _WORKSTATUS_RELOCATING._serialized_start=2409 - _WORKSTATUS_RELOCATING._serialized_end=2498 - _WORKSTATUS_RELOCATING_STATE._serialized_start=1205 - _WORKSTATUS_RELOCATING_STATE._serialized_end=1223 - _WORKSTATUS_BREAKPOINT._serialized_start=2500 - _WORKSTATUS_BREAKPOINT._serialized_end=2589 - _WORKSTATUS_BREAKPOINT_STATE._serialized_start=1205 - _WORKSTATUS_BREAKPOINT_STATE._serialized_end=1223 - _WORKSTATUS_ROLLERBRUSHCLEANING._serialized_start=2591 - _WORKSTATUS_ROLLERBRUSHCLEANING._serialized_end=2698 - _WORKSTATUS_ROLLERBRUSHCLEANING_STATE._serialized_start=1205 - _WORKSTATUS_ROLLERBRUSHCLEANING_STATE._serialized_end=1223 - _WORKSTATUS_SMARTFOLLOW._serialized_start=2701 - _WORKSTATUS_SMARTFOLLOW._serialized_end=2922 - _WORKSTATUS_SMARTFOLLOW_STATE._serialized_start=1205 - _WORKSTATUS_SMARTFOLLOW_STATE._serialized_end=1223 - _WORKSTATUS_SMARTFOLLOW_MODE._serialized_start=2886 - _WORKSTATUS_SMARTFOLLOW_MODE._serialized_end=2922 - _WORKSTATUS_STATION._serialized_start=2925 - _WORKSTATUS_STATION._serialized_end=3730 - _WORKSTATUS_STATION_WATERINJECTIONSYSTEM._serialized_start=3267 - _WORKSTATUS_STATION_WATERINJECTIONSYSTEM._serialized_end=3399 - _WORKSTATUS_STATION_WATERINJECTIONSYSTEM_STATE._serialized_start=3366 - _WORKSTATUS_STATION_WATERINJECTIONSYSTEM_STATE._serialized_end=3399 - _WORKSTATUS_STATION_DUSTCOLLECTIONSYSTEM._serialized_start=3401 - _WORKSTATUS_STATION_DUSTCOLLECTIONSYSTEM._serialized_end=3521 - _WORKSTATUS_STATION_DUSTCOLLECTIONSYSTEM_STATE._serialized_start=3500 - _WORKSTATUS_STATION_DUSTCOLLECTIONSYSTEM_STATE._serialized_end=3521 - _WORKSTATUS_STATION_WASHINGDRYINGSYSTEM._serialized_start=3524 - _WORKSTATUS_STATION_WASHINGDRYINGSYSTEM._serialized_end=3653 - _WORKSTATUS_STATION_WASHINGDRYINGSYSTEM_STATE._serialized_start=3621 - _WORKSTATUS_STATION_WASHINGDRYINGSYSTEM_STATE._serialized_end=3653 - _WORKSTATUS_STATION_WATERTANKSTATE._serialized_start=3655 - _WORKSTATUS_STATION_WATERTANKSTATE._serialized_end=3730 - _WORKSTATUS_SCENE._serialized_start=3733 - _WORKSTATUS_SCENE._serialized_end=3926 - _WORKSTATUS_SCENE_TASKMODE._serialized_start=3872 - _WORKSTATUS_SCENE_TASKMODE._serialized_end=3926 - _WORKSTATUS_TRIGGER._serialized_start=3929 - _WORKSTATUS_TRIGGER._serialized_end=4075 - _WORKSTATUS_TRIGGER_SOURCE._serialized_start=3996 - _WORKSTATUS_TRIGGER_SOURCE._serialized_end=4075 - _WORKSTATUS_STATE._serialized_start=4078 - _WORKSTATUS_STATE._serialized_end=4211 -# @@protoc_insertion_point(module_scope) diff --git a/proto-reference/work_status_pb2.pyi b/proto-reference/work_status_pb2.pyi deleted file mode 100644 index ec6bea0..0000000 --- a/proto-reference/work_status_pb2.pyi +++ /dev/null @@ -1,287 +0,0 @@ -from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper -from google.protobuf import descriptor as _descriptor -from google.protobuf import message as _message -from typing import ClassVar as _ClassVar, Mapping as _Mapping, Optional as _Optional, Union as _Union - -DESCRIPTOR: _descriptor.FileDescriptor - -class WorkStatus(_message.Message): - __slots__ = ["breakpoint", "charging", "cleaning", "cruisiing", "current_scene", "go_home", "go_wash", "mapping", "mode", "relocating", "roller_brush_cleaning", "smart_follow", "state", "station", "trigger", "upgrading"] - class State(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - class Breakpoint(_message.Message): - __slots__ = ["state"] - class State(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - DOING: WorkStatus.Breakpoint.State - STATE_FIELD_NUMBER: _ClassVar[int] - state: WorkStatus.Breakpoint.State - def __init__(self, state: _Optional[_Union[WorkStatus.Breakpoint.State, str]] = ...) -> None: ... - class Charging(_message.Message): - __slots__ = ["state"] - class State(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - ABNORMAL: WorkStatus.Charging.State - DOING: WorkStatus.Charging.State - DONE: WorkStatus.Charging.State - STATE_FIELD_NUMBER: _ClassVar[int] - state: WorkStatus.Charging.State - def __init__(self, state: _Optional[_Union[WorkStatus.Charging.State, str]] = ...) -> None: ... - class Cleaning(_message.Message): - __slots__ = ["mode", "scheduled_task", "state"] - class Mode(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - class RunState(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - CLEANING: WorkStatus.Cleaning.Mode - DOING: WorkStatus.Cleaning.RunState - GOTO_POS: WorkStatus.Cleaning.Mode - MODE_FIELD_NUMBER: _ClassVar[int] - PAUSED: WorkStatus.Cleaning.RunState - POOP_CLEANING: WorkStatus.Cleaning.Mode - RELOCATING: WorkStatus.Cleaning.Mode - SCHEDULED_TASK_FIELD_NUMBER: _ClassVar[int] - STATE_FIELD_NUMBER: _ClassVar[int] - mode: WorkStatus.Cleaning.Mode - scheduled_task: bool - state: WorkStatus.Cleaning.RunState - def __init__(self, state: _Optional[_Union[WorkStatus.Cleaning.RunState, str]] = ..., mode: _Optional[_Union[WorkStatus.Cleaning.Mode, str]] = ..., scheduled_task: bool = ...) -> None: ... - class Cruisiing(_message.Message): - __slots__ = ["mode", "state"] - class Mode(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - class RunState(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - CRUISIING: WorkStatus.Cruisiing.Mode - DOING: WorkStatus.Cruisiing.RunState - MODE_FIELD_NUMBER: _ClassVar[int] - PAUSED: WorkStatus.Cruisiing.RunState - RELOCATING: WorkStatus.Cruisiing.Mode - STATE_FIELD_NUMBER: _ClassVar[int] - mode: WorkStatus.Cruisiing.Mode - state: WorkStatus.Cruisiing.RunState - def __init__(self, state: _Optional[_Union[WorkStatus.Cruisiing.RunState, str]] = ..., mode: _Optional[_Union[WorkStatus.Cruisiing.Mode, str]] = ...) -> None: ... - class GoHome(_message.Message): - __slots__ = ["mode", "state"] - class Mode(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - class RunState(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - COLLECT_DUST: WorkStatus.GoHome.Mode - COMPLETE_TASK: WorkStatus.GoHome.Mode - DOING: WorkStatus.GoHome.RunState - MODE_FIELD_NUMBER: _ClassVar[int] - OTHRERS: WorkStatus.GoHome.Mode - PAUSED: WorkStatus.GoHome.RunState - STATE_FIELD_NUMBER: _ClassVar[int] - mode: WorkStatus.GoHome.Mode - state: WorkStatus.GoHome.RunState - def __init__(self, state: _Optional[_Union[WorkStatus.GoHome.RunState, str]] = ..., mode: _Optional[_Union[WorkStatus.GoHome.Mode, str]] = ...) -> None: ... - class GoWash(_message.Message): - __slots__ = ["mode", "state"] - class Mode(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - class RunState(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - DOING: WorkStatus.GoWash.RunState - DRYING: WorkStatus.GoWash.Mode - MODE_FIELD_NUMBER: _ClassVar[int] - NAVIGATION: WorkStatus.GoWash.Mode - PAUSED: WorkStatus.GoWash.RunState - STATE_FIELD_NUMBER: _ClassVar[int] - WASHING: WorkStatus.GoWash.Mode - mode: WorkStatus.GoWash.Mode - state: WorkStatus.GoWash.RunState - def __init__(self, state: _Optional[_Union[WorkStatus.GoWash.RunState, str]] = ..., mode: _Optional[_Union[WorkStatus.GoWash.Mode, str]] = ...) -> None: ... - class Mapping(_message.Message): - __slots__ = ["mode", "state"] - class Mode(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - class RunState(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - DOING: WorkStatus.Mapping.RunState - MAPPING: WorkStatus.Mapping.Mode - MODE_FIELD_NUMBER: _ClassVar[int] - PAUSED: WorkStatus.Mapping.RunState - RELOCATING: WorkStatus.Mapping.Mode - STATE_FIELD_NUMBER: _ClassVar[int] - mode: WorkStatus.Mapping.Mode - state: WorkStatus.Mapping.RunState - def __init__(self, state: _Optional[_Union[WorkStatus.Mapping.RunState, str]] = ..., mode: _Optional[_Union[WorkStatus.Mapping.Mode, str]] = ...) -> None: ... - class Mode(_message.Message): - __slots__ = ["value"] - class Value(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - AUTO: WorkStatus.Mode.Value - FAST_MAPPING: WorkStatus.Mode.Value - GLOBAL_CRUISE: WorkStatus.Mode.Value - POINT_CRUISE: WorkStatus.Mode.Value - SCENE: WorkStatus.Mode.Value - SELECT_ROOM: WorkStatus.Mode.Value - SELECT_ZONE: WorkStatus.Mode.Value - SMART_FOLLOW: WorkStatus.Mode.Value - SPOT: WorkStatus.Mode.Value - VALUE_FIELD_NUMBER: _ClassVar[int] - ZONES_CRUISE: WorkStatus.Mode.Value - value: WorkStatus.Mode.Value - def __init__(self, value: _Optional[_Union[WorkStatus.Mode.Value, str]] = ...) -> None: ... - class Relocating(_message.Message): - __slots__ = ["state"] - class State(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - DOING: WorkStatus.Relocating.State - STATE_FIELD_NUMBER: _ClassVar[int] - state: WorkStatus.Relocating.State - def __init__(self, state: _Optional[_Union[WorkStatus.Relocating.State, str]] = ...) -> None: ... - class RollerBrushCleaning(_message.Message): - __slots__ = ["state"] - class State(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - DOING: WorkStatus.RollerBrushCleaning.State - STATE_FIELD_NUMBER: _ClassVar[int] - state: WorkStatus.RollerBrushCleaning.State - def __init__(self, state: _Optional[_Union[WorkStatus.RollerBrushCleaning.State, str]] = ...) -> None: ... - class Scene(_message.Message): - __slots__ = ["elapsed_time", "estimate_time", "id", "name", "task_mode"] - class TaskMode(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - AUTO: WorkStatus.Scene.TaskMode - ELAPSED_TIME_FIELD_NUMBER: _ClassVar[int] - ESTIMATE_TIME_FIELD_NUMBER: _ClassVar[int] - ID_FIELD_NUMBER: _ClassVar[int] - NAME_FIELD_NUMBER: _ClassVar[int] - SELECT_ROOM: WorkStatus.Scene.TaskMode - SELECT_ZONE: WorkStatus.Scene.TaskMode - TASK_MODE_FIELD_NUMBER: _ClassVar[int] - elapsed_time: int - estimate_time: int - id: int - name: str - task_mode: WorkStatus.Scene.TaskMode - def __init__(self, id: _Optional[int] = ..., elapsed_time: _Optional[int] = ..., estimate_time: _Optional[int] = ..., name: _Optional[str] = ..., task_mode: _Optional[_Union[WorkStatus.Scene.TaskMode, str]] = ...) -> None: ... - class SmartFollow(_message.Message): - __slots__ = ["area", "elapsed_time", "mode", "state"] - class Mode(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - class State(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - AREA_FIELD_NUMBER: _ClassVar[int] - DOING: WorkStatus.SmartFollow.State - ELAPSED_TIME_FIELD_NUMBER: _ClassVar[int] - FOLLOWING: WorkStatus.SmartFollow.Mode - MODE_FIELD_NUMBER: _ClassVar[int] - SEARCHING: WorkStatus.SmartFollow.Mode - STATE_FIELD_NUMBER: _ClassVar[int] - area: int - elapsed_time: int - mode: WorkStatus.SmartFollow.Mode - state: WorkStatus.SmartFollow.State - def __init__(self, state: _Optional[_Union[WorkStatus.SmartFollow.State, str]] = ..., mode: _Optional[_Union[WorkStatus.SmartFollow.Mode, str]] = ..., elapsed_time: _Optional[int] = ..., area: _Optional[int] = ...) -> None: ... - class Station(_message.Message): - __slots__ = ["dust_collection_system", "washing_drying_system", "water_injection_system", "water_tank_state"] - class DustCollectionSystem(_message.Message): - __slots__ = ["state"] - class State(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - EMPTYING: WorkStatus.Station.DustCollectionSystem.State - STATE_FIELD_NUMBER: _ClassVar[int] - state: WorkStatus.Station.DustCollectionSystem.State - def __init__(self, state: _Optional[_Union[WorkStatus.Station.DustCollectionSystem.State, str]] = ...) -> None: ... - class WashingDryingSystem(_message.Message): - __slots__ = ["state"] - class State(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - DRYING: WorkStatus.Station.WashingDryingSystem.State - STATE_FIELD_NUMBER: _ClassVar[int] - WASHING: WorkStatus.Station.WashingDryingSystem.State - state: WorkStatus.Station.WashingDryingSystem.State - def __init__(self, state: _Optional[_Union[WorkStatus.Station.WashingDryingSystem.State, str]] = ...) -> None: ... - class WaterInjectionSystem(_message.Message): - __slots__ = ["state"] - class State(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - ADDING: WorkStatus.Station.WaterInjectionSystem.State - EMPTYING: WorkStatus.Station.WaterInjectionSystem.State - STATE_FIELD_NUMBER: _ClassVar[int] - state: WorkStatus.Station.WaterInjectionSystem.State - def __init__(self, state: _Optional[_Union[WorkStatus.Station.WaterInjectionSystem.State, str]] = ...) -> None: ... - class WaterTankState(_message.Message): - __slots__ = ["clear_water_adding", "waste_water_recycling"] - CLEAR_WATER_ADDING_FIELD_NUMBER: _ClassVar[int] - WASTE_WATER_RECYCLING_FIELD_NUMBER: _ClassVar[int] - clear_water_adding: bool - waste_water_recycling: bool - def __init__(self, clear_water_adding: bool = ..., waste_water_recycling: bool = ...) -> None: ... - DUST_COLLECTION_SYSTEM_FIELD_NUMBER: _ClassVar[int] - WASHING_DRYING_SYSTEM_FIELD_NUMBER: _ClassVar[int] - WATER_INJECTION_SYSTEM_FIELD_NUMBER: _ClassVar[int] - WATER_TANK_STATE_FIELD_NUMBER: _ClassVar[int] - dust_collection_system: WorkStatus.Station.DustCollectionSystem - washing_drying_system: WorkStatus.Station.WashingDryingSystem - water_injection_system: WorkStatus.Station.WaterInjectionSystem - water_tank_state: WorkStatus.Station.WaterTankState - def __init__(self, water_injection_system: _Optional[_Union[WorkStatus.Station.WaterInjectionSystem, _Mapping]] = ..., dust_collection_system: _Optional[_Union[WorkStatus.Station.DustCollectionSystem, _Mapping]] = ..., washing_drying_system: _Optional[_Union[WorkStatus.Station.WashingDryingSystem, _Mapping]] = ..., water_tank_state: _Optional[_Union[WorkStatus.Station.WaterTankState, _Mapping]] = ...) -> None: ... - class Trigger(_message.Message): - __slots__ = ["source"] - class Source(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - APP: WorkStatus.Trigger.Source - KEY: WorkStatus.Trigger.Source - REMOTE_CTRL: WorkStatus.Trigger.Source - ROBOT: WorkStatus.Trigger.Source - SOURCE_FIELD_NUMBER: _ClassVar[int] - TIMING: WorkStatus.Trigger.Source - UNKNOWN: WorkStatus.Trigger.Source - source: WorkStatus.Trigger.Source - def __init__(self, source: _Optional[_Union[WorkStatus.Trigger.Source, str]] = ...) -> None: ... - class Upgrading(_message.Message): - __slots__ = ["state"] - class State(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - DOING: WorkStatus.Upgrading.State - DONE: WorkStatus.Upgrading.State - STATE_FIELD_NUMBER: _ClassVar[int] - state: WorkStatus.Upgrading.State - def __init__(self, state: _Optional[_Union[WorkStatus.Upgrading.State, str]] = ...) -> None: ... - BREAKPOINT_FIELD_NUMBER: _ClassVar[int] - CHARGING: WorkStatus.State - CHARGING_FIELD_NUMBER: _ClassVar[int] - CLEANING: WorkStatus.State - CLEANING_FIELD_NUMBER: _ClassVar[int] - CRUISIING: WorkStatus.State - CRUISIING_FIELD_NUMBER: _ClassVar[int] - CURRENT_SCENE_FIELD_NUMBER: _ClassVar[int] - FAST_MAPPING: WorkStatus.State - FAULT: WorkStatus.State - GO_HOME: WorkStatus.State - GO_HOME_FIELD_NUMBER: _ClassVar[int] - GO_WASH_FIELD_NUMBER: _ClassVar[int] - MAPPING_FIELD_NUMBER: _ClassVar[int] - MODE_FIELD_NUMBER: _ClassVar[int] - RELOCATING_FIELD_NUMBER: _ClassVar[int] - REMOTE_CTRL: WorkStatus.State - ROLLER_BRUSH_CLEANING_FIELD_NUMBER: _ClassVar[int] - SLEEP: WorkStatus.State - SMART_FOLLOW_FIELD_NUMBER: _ClassVar[int] - STANDBY: WorkStatus.State - STATE_FIELD_NUMBER: _ClassVar[int] - STATION_FIELD_NUMBER: _ClassVar[int] - TRIGGER_FIELD_NUMBER: _ClassVar[int] - UPGRADING_FIELD_NUMBER: _ClassVar[int] - breakpoint: WorkStatus.Breakpoint - charging: WorkStatus.Charging - cleaning: WorkStatus.Cleaning - cruisiing: WorkStatus.Cruisiing - current_scene: WorkStatus.Scene - go_home: WorkStatus.GoHome - go_wash: WorkStatus.GoWash - mapping: WorkStatus.Mapping - mode: WorkStatus.Mode - relocating: WorkStatus.Relocating - roller_brush_cleaning: WorkStatus.RollerBrushCleaning - smart_follow: WorkStatus.SmartFollow - state: WorkStatus.State - station: WorkStatus.Station - trigger: WorkStatus.Trigger - upgrading: WorkStatus.Upgrading - def __init__(self, mode: _Optional[_Union[WorkStatus.Mode, _Mapping]] = ..., state: _Optional[_Union[WorkStatus.State, str]] = ..., charging: _Optional[_Union[WorkStatus.Charging, _Mapping]] = ..., upgrading: _Optional[_Union[WorkStatus.Upgrading, _Mapping]] = ..., mapping: _Optional[_Union[WorkStatus.Mapping, _Mapping]] = ..., cleaning: _Optional[_Union[WorkStatus.Cleaning, _Mapping]] = ..., go_wash: _Optional[_Union[WorkStatus.GoWash, _Mapping]] = ..., go_home: _Optional[_Union[WorkStatus.GoHome, _Mapping]] = ..., cruisiing: _Optional[_Union[WorkStatus.Cruisiing, _Mapping]] = ..., relocating: _Optional[_Union[WorkStatus.Relocating, _Mapping]] = ..., breakpoint: _Optional[_Union[WorkStatus.Breakpoint, _Mapping]] = ..., roller_brush_cleaning: _Optional[_Union[WorkStatus.RollerBrushCleaning, _Mapping]] = ..., smart_follow: _Optional[_Union[WorkStatus.SmartFollow, _Mapping]] = ..., station: _Optional[_Union[WorkStatus.Station, _Mapping]] = ..., current_scene: _Optional[_Union[WorkStatus.Scene, _Mapping]] = ..., trigger: _Optional[_Union[WorkStatus.Trigger, _Mapping]] = ...) -> None: ... From 0086810336c93ed6593f4dd0b6f951b8f33f57d9 Mon Sep 17 00:00:00 2001 From: Jonathan Thompson Date: Sat, 24 Jan 2026 23:08:12 +0000 Subject: [PATCH 20/25] fix errors identified by markdownlint --- CLAUDE.md | 14 ++- docs/T2267_CONFIGURATION_ANALYSIS.md | 66 ++++++++++--- docs/T2320_CONFIGURATION_ANALYSIS.md | 138 ++++++++++++++++----------- 3 files changed, 143 insertions(+), 75 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 90c095c..49f44c3 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -20,12 +20,14 @@ task all # Run install-dev, test, type-check, lint, markdownlint ``` Run a single test: + ```bash pytest tests/test_vacuum/test_t2251_command_mappings.py -v pytest tests/test_vacuum/ -k "mode" -v # Pattern matching ``` List supported vacuum models: + ```bash python -m custom_components.robovac.model_validator_cli --list ``` @@ -42,6 +44,7 @@ python -m custom_components.robovac.model_validator_cli --list ### Model System Each vacuum model has a file in `custom_components/robovac/vacuums/T*.py` defining: + - `homeassistant_features`: Home Assistant vacuum capabilities (battery, start, stop, fan_speed, etc.) - `robovac_features`: Custom features (cleaning_time, cleaning_area, etc.) - `commands`: Dict mapping `RobovacCommand` enum to DPS codes and value mappings @@ -52,6 +55,7 @@ Models are registered in `custom_components/robovac/vacuums/__init__.py` via the ### Command Mapping Pattern Commands translate between three levels: + - **DPS Code**: Numeric identifier from Tuya protocol (e.g., "5", "102") - **Command Name**: Enum value (e.g., `RobovacCommand.MODE`) - **Command Value**: User-friendly string (e.g., "auto" -> "Auto") @@ -68,11 +72,11 @@ RobovacCommand.MODE: { Device responses use case-insensitive matching - "AUTO", "auto", "Auto" all resolve correctly. -## Proto Reference (Reference Only) +## Proto Reference (Optional) -The `proto-reference/` directory contains Protocol Buffer definitions that document the communication protocol used by newer Eufy vacuums. **This is reference material only and is not part of the Home Assistant integration.** The proto-reference is more accurate than the Home Assistant integration. +A `proto-reference/` directory may optionally contain Protocol Buffer definitions that document the communication protocol used by newer Eufy vacuums. **If present, this reference material should be trusted above existing configuration in `custom_components/`** as it reflects the actual device protocol more accurately. -Key proto files: +Key proto files (if available): - **`control.proto`**: Cleaning commands (auto, room, zone, spot, cruise, goto) via `ModeCtrlRequest` - **`work_status.proto`**: Device state machine with nested sub-states (cleaning, charging, washing, drying) @@ -82,7 +86,7 @@ Key proto files: - **`consumable.proto`**: Part wear tracking (brushes, filters, mop, dust bag in hours) - **`error_code.proto`**: Error/warning reporting with obstacle detection (e.g., poop detection) -These protos use the `proto.cloud` package and include Chinese comments from original development, followed by english translation within square brackets. The generated `*_pb2.py` files are Python protobuf outputs. Coordinates use centimeters (meters × 100). +These protos use the `proto.cloud` package and include Chinese comments from original development, followed by English translation within square brackets. The generated `*_pb2.py` files are Python protobuf outputs. Coordinates use centimeters (meters × 100). ## Adding a New Vacuum Model @@ -91,6 +95,7 @@ These protos use the `proto.cloud` package and include Chinese comments from ori 3. Create tests in `tests/test_vacuum/test_txxx_command_mappings.py` Test fixture pattern: + ```python @pytest.fixture def mock_txxx_robovac(): @@ -105,6 +110,7 @@ Follow [Conventional Commits](https://www.conventionalcommits.org/): `feat:`, `f ## Dev Container The project includes a dev container with Home Assistant for live testing: + ```bash task ha-start # Start Home Assistant task ha-logs # View robovac logs diff --git a/docs/T2267_CONFIGURATION_ANALYSIS.md b/docs/T2267_CONFIGURATION_ANALYSIS.md index 5b0a42a..333a3c8 100644 --- a/docs/T2267_CONFIGURATION_ANALYSIS.md +++ b/docs/T2267_CONFIGURATION_ANALYSIS.md @@ -7,7 +7,7 @@ This document reviews the T2267 vacuum configuration and identifies missing or i ### Home Assistant Features (`VacuumEntityFeature`) | Feature | Status | Notes | -|---------|--------|-------| +| ------- | ------ | ----- | | CLEAN_SPOT | ✓ | | | FAN_SPEED | ✓ | | | LOCATE | ✓ | | @@ -22,7 +22,7 @@ This document reviews the T2267 vacuum configuration and identifies missing or i ### RoboVac Features (`RoboVacEntityFeature`) | Feature | Status | Notes | -|---------|--------|-------| +| ------- | ------ | ----- | | DO_NOT_DISTURB | ✓ | Code 157 | | BOOST_IQ | ✓ | Code 159 | | CLEANING_TIME | ❌ Missing | T2278 has this | @@ -35,7 +35,7 @@ This document reviews the T2267 vacuum configuration and identifies missing or i ## Current Commands | Command | DPS Code | Values | Status | -|---------|----------|--------|--------| +| ------- | -------- | ------ | ------ | | MODE | 152 | auto, pause, spot, return, nosweep | ⚠️ Issues | | STATUS | 153 | Multiple protobuf-encoded values | ✓ | | DIRECTION | 155 | brake, forward, back, left, right | ✓ | @@ -55,11 +55,13 @@ This document reviews the T2267 vacuum configuration and identifies missing or i ### 1. MODE "spot" value is incorrect **Current:** + ```python "spot": "AA==" # WRONG - AA== decodes to standby/empty ``` **Should be:** + ```python "spot": "AggD" # Correct - encodes START_SPOT_CLEAN (method=3) ``` @@ -69,17 +71,20 @@ The value "AA==" (base64) decodes to a zero byte, which represents standby, not ### 2. MODE "nosweep" is misleading **Current:** + ```python "nosweep": "AggO" # Encodes RESUME_TASK (14), not a cleaning mode ``` The value "AggO" encodes `ModeCtrlRequest.Method.RESUME_TASK` (value 14), which resumes a paused task. This should either be: + - Renamed to "resume" for clarity, or - Replaced with proper mop-only mode encoding if that's the intent ### 3. LOCATE missing value **T2278 has:** + ```python RobovacCommand.LOCATE: { "code": 160, @@ -88,6 +93,7 @@ RobovacCommand.LOCATE: { ``` **T2267 has:** + ```python RobovacCommand.LOCATE: { "code": 160, @@ -99,6 +105,7 @@ The LOCATE command should have a value defined. ### 4. FAN_SPEED missing MAX_PLUS Protobuf defines these fan suction levels: + - QUIET = 0 - STANDARD = 1 - TURBO = 2 @@ -110,7 +117,7 @@ T2267 is missing MAX_PLUS if the device hardware supports it. ## Missing Commands | Command | Expected Code | Notes | -|---------|--------------|-------| +| ------- | ------------- | ----- | | CLEANING_TIME | 6 | For tracking cleaning duration | | CLEANING_AREA | 7 | For tracking cleaning area (m²) | @@ -119,7 +126,7 @@ T2267 is missing MAX_PLUS if the device hardware supports it. From `control.proto` - `ModeCtrlRequest.Method`: | Method | Value | Base64 Encoding | T2267 Status | -|--------|-------|-----------------|--------------| +| ------ | ----- | --------------- | ------------ | | START_AUTO_CLEAN | 0 | BBoCCAE= | ✓ ("auto") | | START_SELECT_ROOMS_CLEAN | 1 | Complex* | ❌ Not implemented | | START_SELECT_ZONES_CLEAN | 2 | Complex* | ❌ Not implemented | @@ -142,11 +149,12 @@ From `control.proto` - `ModeCtrlRequest.Method`: ## Base64 Encoding Pattern The simple method-only commands follow this pattern: + - 2 bytes length prefix + field 1 (method) as varint - Example: Method 13 (PAUSE_TASK) = `02 08 0D` = "AggN" | Method Value | Hex Bytes | Base64 | -|--------------|-----------|--------| +| ------------ | --------- | ------ | | 0 | 02 08 00 | AggA | | 3 | 02 08 03 | AggD | | 6 | 02 08 06 | AggG | @@ -159,18 +167,20 @@ The simple method-only commands follow this pattern: ### Priority 1 - Critical Fixes 1. **Fix spot mode encoding** + ```python "spot": "AggD" # START_SPOT_CLEAN (method=3) ``` 2. **Rename "nosweep" to "resume"** (or implement proper mop-only mode) + ```python "resume": "AggO" # RESUME_TASK (method=14) ``` ### Priority 2 - Feature Additions -3. **~~Add BATTERY to homeassistant_features~~** ✅ COMPLETED (2025-01) +1. **~~Add BATTERY to homeassistant_features~~** ✅ COMPLETED (2025-01) `VacuumEntityFeature.BATTERY` was deprecated in Home Assistant 2025.8 and will stop working in 2026.8. Instead, the integration now uses a dedicated battery sensor entity with `SensorDeviceClass.BATTERY`. @@ -181,7 +191,8 @@ The simple method-only commands follow this pattern: See: [Vacuum battery properties are deprecated](https://developers.home-assistant.io/blog/2025/07/02/vacuum-battery-properties-deprecated/) -4. **Add LOCATE value** +2. **Add LOCATE value** + ```python RobovacCommand.LOCATE: { "code": 160, @@ -191,7 +202,8 @@ The simple method-only commands follow this pattern: ### Priority 3 - Enhanced Features -5. **Add CLEANING_TIME and CLEANING_AREA** +1. **Add CLEANING_TIME and CLEANING_AREA** + ```python robovac_features = ( ... @@ -204,7 +216,8 @@ The simple method-only commands follow this pattern: RobovacCommand.CLEANING_AREA: {"code": 7}, ``` -6. **Add ROOM and ZONE features** if device supports room/zone cleaning +2. **Add ROOM and ZONE features** if device supports room/zone cleaning + ```python robovac_features = ( ... @@ -218,7 +231,7 @@ The simple method-only commands follow this pattern: T2267 currently supports these status values: | Base64 Code | Human Readable | Activity | -|-------------|----------------|----------| +| ----------- | -------------- | -------- | | BgoAEAUyAA== | Cleaning | CLEANING | | BgoAEAVSAA== | Positioning | CLEANING | | CAoAEAUyAggB | Paused | PAUSED | @@ -239,7 +252,8 @@ T2267 currently supports these status values: ## Comparison with Similar Models -### T2278 (L60 Hybrid SES) has additional: +### T2278 (L60 Hybrid SES) has additional + - CLEANING_TIME feature - CLEANING_AREA feature - AUTO_RETURN feature @@ -248,12 +262,36 @@ T2267 currently supports these status values: - MAP feature - STOP command in MODE values -### T2080 (S1 Pro) has additional: +### T2080 (S1 Pro) has additional + - Station-related status values (Adding Water, Drying Mop, Washing Mop, etc.) - MOP_LEVEL command - More comprehensive error handling +## Additional Features + +### Status Patterns + +T2267 implements `status_patterns` for matching dynamic protobuf-encoded status values: + +```python +status_patterns = [ + ("DA", "FSAA==", "Positioning"), # Matches positioning codes with embedded timestamps +] +``` + +### Error Patterns + +T2267 implements `error_patterns` to filter false error states: + +```python +error_patterns = [ + ("DA", "FSAA==", "no_error"), # Positioning status sent on ERROR DPS +] +``` + ## Notes - Battery level is exposed via a dedicated sensor entity (Home Assistant 2025.8+ pattern) using model-specific DPS code 163 -- T2267 uses protobuf-encoded values for MODE commands (unlike T2320 which uses plain strings) +- T2267 uses protobuf-encoded values for MODE commands +- Both T2267 and T2320 now use protobuf encoding for control commands diff --git a/docs/T2320_CONFIGURATION_ANALYSIS.md b/docs/T2320_CONFIGURATION_ANALYSIS.md index ea95b9a..49864a5 100644 --- a/docs/T2320_CONFIGURATION_ANALYSIS.md +++ b/docs/T2320_CONFIGURATION_ANALYSIS.md @@ -16,22 +16,22 @@ The T2320 is the Eufy Robot Vacuum and Mop X9 Pro with Auto-Clean Station. It fe ### Home Assistant Features (`VacuumEntityFeature`) | Feature | Status | Notes | -|---------|--------|-------| +| ------- | ------ | ----- | | FAN_SPEED | ✓ | Code 154 | -| LOCATE | ✓ | Code 160, Fixed - was conflicting with RETURN_HOME | -| PAUSE | ✓ | Via START_PAUSE code 2 | -| RETURN_HOME | ✓ | Code 153 with boolean | +| LOCATE | ✓ | Code 160 (no value defined) | +| PAUSE | ✓ | Via MODE code 152 with protobuf | +| RETURN_HOME | ✓ | Via MODE code 152 with protobuf "AggG" | | SEND_COMMAND | ✓ | | -| START | ✓ | Via START_PAUSE code 2 | -| STATE | ✓ | Code 173 with protobuf values | -| STOP | ✓ | | +| START | ✓ | Via MODE code 152 with protobuf | +| STATE | ✓ | Code 177 with protobuf values | +| STOP | ✓ | Via MODE code 152 with protobuf "AggM" | | BATTERY | ✓ Via Sensor | Command exists (code 172), exposed via dedicated sensor entity (HA 2025.8+ compliant) | | CLEAN_SPOT | ❌ Missing | Device likely supports spot cleaning | ### RoboVac Features (`RoboVacEntityFeature`) | Feature | Status | Notes | -|---------|--------|-------| +| ------- | ------ | ----- | | DO_NOT_DISTURB | ✓ | | | BOOST_IQ | ✓ | Code 159 | | CLEANING_TIME | ✓ | Code 6 | @@ -45,15 +45,16 @@ The T2320 is the Eufy Robot Vacuum and Mop X9 Pro with Auto-Clean Station. It fe ## Current Commands | Command | DPS Code | Values | Status | -|---------|----------|--------|--------| -| START_PAUSE | 2 | start=True, pause=False | ✓ | -| MODE | 152 | auto, return, pause, small_room, single_room | ⚠️ String values | -| STATUS | 173 | Multiple protobuf-encoded values | ✓ | -| RETURN_HOME | 153 | return_home=True | ✓ | +| ------- | -------- | ------ | ------ | +| START_PAUSE | 152 | pause="AggN", resume="AggO" | ✓ Protobuf | +| MODE | 152 | auto="BBoCCAE=", pause="AggN", return="AggG" | ✓ Protobuf | +| STATUS | 177 | Multiple protobuf-encoded values | ✓ | +| RETURN_HOME | 152 | return="AggG" | ✓ Protobuf | +| STOP | 152 | stop="AggM" | ✓ Protobuf | | FAN_SPEED | 154 | quiet, standard, turbo, max, boost_iq | ✓ | -| LOCATE | 160 | locate=True | ✓ Fixed | +| LOCATE | 160 | - | ⚠️ No value defined | | BATTERY | 172 | - | ✓ Via sensor entity | -| ERROR | 169 | - | ✓ | +| ERROR | 177 | - | ✓ | | BOOST_IQ | 159 | - | ✓ | | CLEANING_TIME | 6 | - | ✓ | | CLEANING_AREA | 7 | - | ✓ | @@ -63,40 +64,38 @@ The T2320 is the Eufy Robot Vacuum and Mop X9 Pro with Auto-Clean Station. It fe T2320 uses a different DPS code scheme than T2267/T2278: | Command | T2267/T2278 | T2320 | Notes | -|---------|-------------|-------|-------| -| STATUS | 153 | 173 | Different code | +| ------- | ----------- | ----- | ----- | +| STATUS | 153 | 177 | Different code | | FAN_SPEED | 158 | 154 | Different code | | BATTERY | 163 | 172 | Different code | -| ERROR | 177 | 169 | Different code | -| RETURN_HOME | 152 (via MODE) | 153 (boolean) | Different approach | +| ERROR | 177 | 177 | Same code | +| RETURN_HOME | 152 (via MODE) | 152 (via MODE) | Same approach now | ## Issues Found -### 1. MODE uses string values instead of protobuf +### 1. ~~MODE uses string values instead of protobuf~~ ✅ FIXED -T2320 uses plain string values for MODE: +T2320 now uses protobuf-encoded values for MODE commands, matching T2267: ```python "values": { - "auto": "auto", - "return": "return", - "pause": "pause", - "small_room": "small_room", - "single_room": "single_room" + "auto": "BBoCCAE=", # Protobuf: START_AUTO_CLEAN + "pause": "AggN", # Protobuf: PAUSE_TASK + "return": "AggG", # Protobuf: START_GOHOME + "small_room": "small_room", # Legacy string values remain + "single_room": "single_room", } ``` -This differs from T2267/T2278 which use protobuf-encoded values. This may be correct for T2320's firmware, but should be verified. +### 2. ~~Missing STOP command~~ ✅ FIXED -### 2. Missing STOP command - -Unlike T2267 which has a dedicated STOP command with protobuf encoding, T2320 relies on `async_stop()` calling `async_return_to_base()`. Consider adding: +T2320 now has a dedicated STOP command with protobuf encoding: ```python RobovacCommand.STOP: { - "code": 152, # or appropriate code + "code": 152, "values": { - "stop": "stop", # or protobuf value if supported + "stop": "AggM", # Protobuf: STOP_TASK (12) }, }, ``` @@ -148,7 +147,7 @@ RobovacCommand.CONSUMABLES: { T2080 has these additional features that T2320 might support: | Feature | T2080 Code | T2320 Status | -|---------|------------|--------------| +| ------- | ---------- | ------------ | | MOP_LEVEL | 10 | ❌ Not implemented | | DIRECTION | 176 | ❌ Not implemented | @@ -159,7 +158,7 @@ From `error_code_list_t2320.proto`, the X9 Pro supports these error categories: ### Robot Errors (E001-E055) | Code | Description | -|------|-------------| +| ---- | ----------- | | E001 | Crash buffer is stuck | | E002 | Wheel is stuck | | E003 | Side brush is stuck | @@ -190,7 +189,7 @@ From `error_code_list_t2320.proto`, the X9 Pro supports these error categories: ### Station Errors (E070-E083) | Code | Description | -|------|-------------| +| ---- | ----------- | | E070 | Clean dust collector and filter | | E071 | Wall sensor abnormal | | E072 | Robot water tank insufficient | @@ -209,7 +208,7 @@ From `error_code_list_t2320.proto`, the X9 Pro supports these error categories: ### Hardware Errors (E101-E119) | Code | Description | -|------|-------------| +| ---- | ----------- | | E101 | Battery abnormal | | E102 | Wheel module abnormal | | E103 | Side brush module abnormal | @@ -227,7 +226,7 @@ From `error_code_list_t2320.proto`, the X9 Pro supports these error categories: ## Prompt Codes Reference | Code | Description | -|------|-------------| +| ---- | ----------- | | P001 | Start scheduled cleaning | | P003 | Battery low, returning to base | | P004 | Positioning failed, rebuilding map | @@ -251,7 +250,7 @@ T2320 supports these status values: ### Cleaning States | Base64 Code | Human Readable | -|-------------|----------------| +| ----------- | -------------- | | BgoAEAUyAA== | Auto Cleaning | | BgoAEAVSAA== | Positioning | | CgoAEAUyAhABUgA= | Auto Cleaning | @@ -266,7 +265,7 @@ T2320 supports these status values: ### Navigation States | Base64 Code | Human Readable | -|-------------|----------------| +| ----------- | -------------- | | BBAHQgA= | Heading Home | | AgoA | Heading Home | | CgoAEAcyAggBQgA= | Temporary Return | @@ -275,7 +274,7 @@ T2320 supports these status values: ### Docked/Station States | Base64 Code | Human Readable | -|-------------|----------------| +| ----------- | -------------- | | BBADGgA= | Charging | | BhADGgIIAQ== | Completed | | DAoCCAEQAxoAMgIIAQ== | Charge Mid-Clean | @@ -289,7 +288,7 @@ T2320 supports these status values: ### Other States | Base64 Code | Human Readable | -|-------------|----------------| +| ----------- | -------------- | | CAoAEAUyAggB | Paused | | AggB | Paused | | AA== | Standby | @@ -318,7 +317,7 @@ T2320 supports these status values: ### Priority 2 - Feature Additions -3. **Add ROOM and ZONE features** +1. **Add ROOM and ZONE features** ```python robovac_features = ( @@ -328,7 +327,7 @@ T2320 supports these status values: ) ``` -4. **Add MOP_LEVEL command** (verify DPS code) +2. **Add MOP_LEVEL command** (verify DPS code) ```python RobovacCommand.MOP_LEVEL: { @@ -341,13 +340,13 @@ T2320 supports these status values: }, ``` -5. **Add CONSUMABLES command and feature** +3. **Add CONSUMABLES command and feature** ### Priority 3 - Enhanced Features -6. **Add DIRECTION command** for remote control +1. **Add DIRECTION command** for remote control -7. **Add DO_NOT_DISTURB command with DPS code** +2. **Add DO_NOT_DISTURB command with DPS code** Currently listed in features but no command defined with a code. @@ -356,28 +355,53 @@ T2320 supports these status values: ### T2080 (S1 Pro) Differences | Feature | T2080 | T2320 | -|---------|-------|-------| -| STATUS code | 153 | 173 | +| ------- | ----- | ----- | +| STATUS code | 153 | 177 | | FAN_SPEED code | 158 | 154 | | BATTERY code | 163 | 172 | -| ERROR code | 106 | 169 | +| ERROR code | 106 | 177 | | LOCATE code | 103 | 160 | -| MODE encoding | Protobuf | String | -| RETURN_HOME | Via MODE (152) | Boolean (153) | +| MODE encoding | Protobuf | Protobuf | +| RETURN_HOME | Via MODE (152) | Via MODE (152) | ### T2267 (L60) Differences | Feature | T2267 | T2320 | -|---------|-------|-------| -| MODE encoding | Protobuf | String | -| START_PAUSE | Via MODE (152) | Boolean (2) | -| RETURN_HOME | Via MODE (152) | Boolean (153) | +| ------- | ----- | ----- | +| MODE encoding | Protobuf | Protobuf (now matching) | +| START_PAUSE | Via MODE (152) | Via MODE (152) | +| RETURN_HOME | Via MODE (152) | Via MODE (152) | | Station features | No | Yes (washing, drying, dust) | +## Additional Features + +### Status Patterns + +T2320 implements `status_patterns` for matching dynamic protobuf-encoded status values: + +```python +status_patterns = [ + ("DA", "FSAA==", "Positioning"), # Matches positioning codes with embedded timestamps + ("Dw", "BSAA==", "Washing Mop"), # Matches washing mop codes +] +``` + +### Error Patterns + +T2320 implements `error_patterns` to filter false error states: + +```python +error_patterns = [ + ("DA", "FSAA==", "no_error"), # Positioning status sent on ERROR DPS + ("Dw", "BSAA==", "no_error"), # Washing mop status sent on ERROR DPS +] +``` + ## Notes -- T2320 uses a hybrid approach: some commands use protobuf-encoded STATUS values while MODE uses plain strings -- The DPS code scheme differs significantly from T2267/T2278 family +- T2320 now uses protobuf encoding for control commands (MODE, START_PAUSE, STOP, RETURN_HOME), matching T2267 +- The DPS code scheme differs from T2267/T2278 family for STATUS (177 vs 153), FAN_SPEED (154 vs 158), BATTERY (172 vs 163) - Station-related status values are comprehensive for the auto-clean station features - Error codes are specific to the X9 Pro model with station-related errors - Battery level is exposed via a dedicated sensor entity (Home Assistant 2025.8+ pattern) using model-specific DPS code 172 +- **Note:** T2320.py has a duplicate ERROR command entry (codes 169 and 177) - the latter (177) takes effect From 1b658c948e4b94863473ec35a3c9f2ff36ac3d0d Mon Sep 17 00:00:00 2001 From: Jonathan Thompson Date: Sat, 24 Jan 2026 23:17:56 +0000 Subject: [PATCH 21/25] fix 2 failing tests --- tests/test_vacuum/test_dps_command_mapping.py | 4 ++-- tests/test_vacuum/test_t2320_command_mappings.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test_vacuum/test_dps_command_mapping.py b/tests/test_vacuum/test_dps_command_mapping.py index dfce6b0..ad95abe 100644 --- a/tests/test_vacuum/test_dps_command_mapping.py +++ b/tests/test_vacuum/test_dps_command_mapping.py @@ -124,13 +124,13 @@ def test_getDpsCodes_extraction_method() -> None: # Verify T2320 has different codes too assert "STATUS" in t2320_dps_codes - assert t2320_dps_codes["STATUS"] == "153" # Same as T2267, non-default code + assert t2320_dps_codes["STATUS"] == "177" # T2320 uses different STATUS code than T2267 assert t2320_dps_codes["STATUS"] != TuyaCodes.STATUS assert "BATTERY_LEVEL" in t2320_dps_codes assert t2320_dps_codes["BATTERY_LEVEL"] == "172" # Non-default code assert t2320_dps_codes["BATTERY_LEVEL"] != TuyaCodes.BATTERY_LEVEL assert "ERROR_CODE" in t2320_dps_codes - assert t2320_dps_codes["ERROR_CODE"] == "169" # Non-default code + assert t2320_dps_codes["ERROR_CODE"] == "177" # T2320 uses same ERROR code as STATUS assert t2320_dps_codes["ERROR_CODE"] != TuyaCodes.ERROR_CODE diff --git a/tests/test_vacuum/test_t2320_command_mappings.py b/tests/test_vacuum/test_t2320_command_mappings.py index 5cfb89e..bcb7e03 100644 --- a/tests/test_vacuum/test_t2320_command_mappings.py +++ b/tests/test_vacuum/test_t2320_command_mappings.py @@ -69,9 +69,9 @@ def test_dps_codes_mapping(self, t2320_robovac): assert dps_codes.get("STOP") == "152" # Same as MODE, uses protobuf like T2267 assert dps_codes.get("FAN_SPEED") == "154" assert dps_codes.get("LOCATE") == "160" # Fixed: was 153 (conflict with RETURN_HOME) - assert dps_codes.get("STATUS") == "153" # Same as T2267 + assert dps_codes.get("STATUS") == "177" # T2320 uses different STATUS code than T2267 assert dps_codes.get("BATTERY_LEVEL") == "172" - assert dps_codes.get("ERROR_CODE") == "169" + assert dps_codes.get("ERROR_CODE") == "177" # T2320 uses same ERROR code as STATUS def test_status_command_exists(self, t2320_robovac): """Test STATUS command is defined for state polling.""" From e54c179e0f645ad14b4647bbbfe54b85b7299747 Mon Sep 17 00:00:00 2001 From: Jonathan Thompson Date: Sun, 25 Jan 2026 12:58:12 +0000 Subject: [PATCH 22/25] Moving CLAUDE.md to AGENTS.md moving to the more standard AGENTS.md and leaving a symbolic link in It's place., so claude doesn't get convused. Is is mentioned as a work around in https://github.com/anthropics/claude-code/issues/6235#issuecomment-3795455224 --- AGENTS.md | 118 +++++++++++++++++++++++++++++++++++++++++++++++++++++ CLAUDE.md | 119 +----------------------------------------------------- 2 files changed, 119 insertions(+), 118 deletions(-) create mode 100644 AGENTS.md mode change 100644 => 120000 CLAUDE.md diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..49f44c3 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,118 @@ +# CLAUDE.md + +This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. + +## Project Overview + +RoboVac is a Home Assistant custom integration for controlling Eufy RoboVac vacuum cleaners via local network (no cloud dependency). It supports 40+ models using Tuya protocol versions 3.3, 3.4, and 3.5. + +## Common Commands + +All commands use [Task](https://taskfile.dev/) as the task runner: + +```bash +task install-dev # Install development dependencies with uv +task test # Run pytest with coverage (generates coverage.xml) +task lint # Run flake8 on custom_components and tests +task type-check # Run mypy type checking +task markdownlint # Lint and auto-fix markdown files +task all # Run install-dev, test, type-check, lint, markdownlint +``` + +Run a single test: + +```bash +pytest tests/test_vacuum/test_t2251_command_mappings.py -v +pytest tests/test_vacuum/ -k "mode" -v # Pattern matching +``` + +List supported vacuum models: + +```bash +python -m custom_components.robovac.model_validator_cli --list +``` + +## Architecture + +### Core Components + +- **`custom_components/robovac/robovac.py`**: `RoboVac` class - core logic extending `TuyaDevice`, handles model-specific features and command translation +- **`custom_components/robovac/tuyalocalapi.py`**: `TuyaDevice` class - Tuya local protocol implementation with encryption (AES, HMAC-SHA256) +- **`custom_components/robovac/vacuum.py`**: `RoboVacEntity` - Home Assistant vacuum entity with state management and command execution +- **`custom_components/robovac/config_flow.py`**: Configuration flow for Home Assistant UI setup + +### Model System + +Each vacuum model has a file in `custom_components/robovac/vacuums/T*.py` defining: + +- `homeassistant_features`: Home Assistant vacuum capabilities (battery, start, stop, fan_speed, etc.) +- `robovac_features`: Custom features (cleaning_time, cleaning_area, etc.) +- `commands`: Dict mapping `RobovacCommand` enum to DPS codes and value mappings +- Optional `dps_codes`, `protocol_version`, `activity_mapping` + +Models are registered in `custom_components/robovac/vacuums/__init__.py` via the `ROBOVAC_MODELS` dict. + +### Command Mapping Pattern + +Commands translate between three levels: + +- **DPS Code**: Numeric identifier from Tuya protocol (e.g., "5", "102") +- **Command Name**: Enum value (e.g., `RobovacCommand.MODE`) +- **Command Value**: User-friendly string (e.g., "auto" -> "Auto") + +```python +RobovacCommand.MODE: { + "code": 5, + "values": { + "auto": "Auto", # Key: input (snake_case), Value: output (PascalCase) + "small_room": "SmallRoom", + }, +}, +``` + +Device responses use case-insensitive matching - "AUTO", "auto", "Auto" all resolve correctly. + +## Proto Reference (Optional) + +A `proto-reference/` directory may optionally contain Protocol Buffer definitions that document the communication protocol used by newer Eufy vacuums. **If present, this reference material should be trusted above existing configuration in `custom_components/`** as it reflects the actual device protocol more accurately. + +Key proto files (if available): + +- **`control.proto`**: Cleaning commands (auto, room, zone, spot, cruise, goto) via `ModeCtrlRequest` +- **`work_status.proto`**: Device state machine with nested sub-states (cleaning, charging, washing, drying) +- **`clean_param.proto`**: Cleaning parameters (fan suction, mop level, carpet strategy, clean type) +- **`map_manage.proto`**: Map data structures (pixels, room outlines, restricted zones) +- **`station.proto`**: Docking station config (dust collection, mop washing/drying, water levels) +- **`consumable.proto`**: Part wear tracking (brushes, filters, mop, dust bag in hours) +- **`error_code.proto`**: Error/warning reporting with obstacle detection (e.g., poop detection) + +These protos use the `proto.cloud` package and include Chinese comments from original development, followed by English translation within square brackets. The generated `*_pb2.py` files are Python protobuf outputs. Coordinates use centimeters (meters × 100). + +## Adding a New Vacuum Model + +1. Create `custom_components/robovac/vacuums/TXXX.py` with features and commands +2. Import and register in `custom_components/robovac/vacuums/__init__.py` +3. Create tests in `tests/test_vacuum/test_txxx_command_mappings.py` + +Test fixture pattern: + +```python +@pytest.fixture +def mock_txxx_robovac(): + with patch("custom_components.robovac.robovac.TuyaDevice.__init__", return_value=None): + return RoboVac(model_code="TXXX", device_id="test", host="192.168.1.1", local_key="key") +``` + +## Commit Guidelines + +Follow [Conventional Commits](https://www.conventionalcommits.org/): `feat:`, `fix:`, `refactor:`, `test:`, `docs:`, `chore:` + +## Dev Container + +The project includes a dev container with Home Assistant for live testing: + +```bash +task ha-start # Start Home Assistant +task ha-logs # View robovac logs +task ha-restart # Restart Home Assistant +``` diff --git a/CLAUDE.md b/CLAUDE.md deleted file mode 100644 index 49f44c3..0000000 --- a/CLAUDE.md +++ /dev/null @@ -1,118 +0,0 @@ -# CLAUDE.md - -This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. - -## Project Overview - -RoboVac is a Home Assistant custom integration for controlling Eufy RoboVac vacuum cleaners via local network (no cloud dependency). It supports 40+ models using Tuya protocol versions 3.3, 3.4, and 3.5. - -## Common Commands - -All commands use [Task](https://taskfile.dev/) as the task runner: - -```bash -task install-dev # Install development dependencies with uv -task test # Run pytest with coverage (generates coverage.xml) -task lint # Run flake8 on custom_components and tests -task type-check # Run mypy type checking -task markdownlint # Lint and auto-fix markdown files -task all # Run install-dev, test, type-check, lint, markdownlint -``` - -Run a single test: - -```bash -pytest tests/test_vacuum/test_t2251_command_mappings.py -v -pytest tests/test_vacuum/ -k "mode" -v # Pattern matching -``` - -List supported vacuum models: - -```bash -python -m custom_components.robovac.model_validator_cli --list -``` - -## Architecture - -### Core Components - -- **`custom_components/robovac/robovac.py`**: `RoboVac` class - core logic extending `TuyaDevice`, handles model-specific features and command translation -- **`custom_components/robovac/tuyalocalapi.py`**: `TuyaDevice` class - Tuya local protocol implementation with encryption (AES, HMAC-SHA256) -- **`custom_components/robovac/vacuum.py`**: `RoboVacEntity` - Home Assistant vacuum entity with state management and command execution -- **`custom_components/robovac/config_flow.py`**: Configuration flow for Home Assistant UI setup - -### Model System - -Each vacuum model has a file in `custom_components/robovac/vacuums/T*.py` defining: - -- `homeassistant_features`: Home Assistant vacuum capabilities (battery, start, stop, fan_speed, etc.) -- `robovac_features`: Custom features (cleaning_time, cleaning_area, etc.) -- `commands`: Dict mapping `RobovacCommand` enum to DPS codes and value mappings -- Optional `dps_codes`, `protocol_version`, `activity_mapping` - -Models are registered in `custom_components/robovac/vacuums/__init__.py` via the `ROBOVAC_MODELS` dict. - -### Command Mapping Pattern - -Commands translate between three levels: - -- **DPS Code**: Numeric identifier from Tuya protocol (e.g., "5", "102") -- **Command Name**: Enum value (e.g., `RobovacCommand.MODE`) -- **Command Value**: User-friendly string (e.g., "auto" -> "Auto") - -```python -RobovacCommand.MODE: { - "code": 5, - "values": { - "auto": "Auto", # Key: input (snake_case), Value: output (PascalCase) - "small_room": "SmallRoom", - }, -}, -``` - -Device responses use case-insensitive matching - "AUTO", "auto", "Auto" all resolve correctly. - -## Proto Reference (Optional) - -A `proto-reference/` directory may optionally contain Protocol Buffer definitions that document the communication protocol used by newer Eufy vacuums. **If present, this reference material should be trusted above existing configuration in `custom_components/`** as it reflects the actual device protocol more accurately. - -Key proto files (if available): - -- **`control.proto`**: Cleaning commands (auto, room, zone, spot, cruise, goto) via `ModeCtrlRequest` -- **`work_status.proto`**: Device state machine with nested sub-states (cleaning, charging, washing, drying) -- **`clean_param.proto`**: Cleaning parameters (fan suction, mop level, carpet strategy, clean type) -- **`map_manage.proto`**: Map data structures (pixels, room outlines, restricted zones) -- **`station.proto`**: Docking station config (dust collection, mop washing/drying, water levels) -- **`consumable.proto`**: Part wear tracking (brushes, filters, mop, dust bag in hours) -- **`error_code.proto`**: Error/warning reporting with obstacle detection (e.g., poop detection) - -These protos use the `proto.cloud` package and include Chinese comments from original development, followed by English translation within square brackets. The generated `*_pb2.py` files are Python protobuf outputs. Coordinates use centimeters (meters × 100). - -## Adding a New Vacuum Model - -1. Create `custom_components/robovac/vacuums/TXXX.py` with features and commands -2. Import and register in `custom_components/robovac/vacuums/__init__.py` -3. Create tests in `tests/test_vacuum/test_txxx_command_mappings.py` - -Test fixture pattern: - -```python -@pytest.fixture -def mock_txxx_robovac(): - with patch("custom_components.robovac.robovac.TuyaDevice.__init__", return_value=None): - return RoboVac(model_code="TXXX", device_id="test", host="192.168.1.1", local_key="key") -``` - -## Commit Guidelines - -Follow [Conventional Commits](https://www.conventionalcommits.org/): `feat:`, `fix:`, `refactor:`, `test:`, `docs:`, `chore:` - -## Dev Container - -The project includes a dev container with Home Assistant for live testing: - -```bash -task ha-start # Start Home Assistant -task ha-logs # View robovac logs -task ha-restart # Restart Home Assistant -``` diff --git a/CLAUDE.md b/CLAUDE.md new file mode 120000 index 0000000..47dc3e3 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1 @@ +AGENTS.md \ No newline at end of file From 8e17b33a1304b6d90297ed6efb18521df02ceb4e Mon Sep 17 00:00:00 2001 From: Dan Webb Date: Fri, 6 Feb 2026 23:26:09 +0000 Subject: [PATCH 23/25] Update custom_components/robovac/vacuums/T2267.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Dan Webb --- custom_components/robovac/vacuums/T2267.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/robovac/vacuums/T2267.py b/custom_components/robovac/vacuums/T2267.py index 945bd08..0585f20 100644 --- a/custom_components/robovac/vacuums/T2267.py +++ b/custom_components/robovac/vacuums/T2267.py @@ -25,7 +25,7 @@ class T2267(RobovacModelDetails): "values": { "auto": "BBoCCAE=", "pause": "AggN", - "spot": "AA==", + "spot": "AggD", "return": "AggG", "nosweep": "AggO", }, From 1061a498056d991e33a97426e6b1c8cad5fe2937 Mon Sep 17 00:00:00 2001 From: Dan Webb Date: Fri, 6 Feb 2026 23:26:27 +0000 Subject: [PATCH 24/25] Update custom_components/robovac/vacuums/T2320.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Dan Webb --- custom_components/robovac/vacuums/T2320.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/robovac/vacuums/T2320.py b/custom_components/robovac/vacuums/T2320.py index 3744fea..1871b4e 100644 --- a/custom_components/robovac/vacuums/T2320.py +++ b/custom_components/robovac/vacuums/T2320.py @@ -42,7 +42,7 @@ class T2320(RobovacModelDetails): }, }, RobovacCommand.STATUS: { - "code": 177, # Same as T2267 + "code": 177, "values": { # Protobuf-encoded status values (similar to T2080/T2267) # Cleaning states From 69076f98651a84f7818aa9e5bf434817d12f19ed Mon Sep 17 00:00:00 2001 From: Dan Webb Date: Fri, 6 Feb 2026 23:26:41 +0000 Subject: [PATCH 25/25] Update custom_components/robovac/vacuum.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Dan Webb --- custom_components/robovac/vacuum.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/robovac/vacuum.py b/custom_components/robovac/vacuum.py index 9dc29a2..fcc99b8 100644 --- a/custom_components/robovac/vacuum.py +++ b/custom_components/robovac/vacuum.py @@ -756,7 +756,7 @@ async def async_start(self, **kwargs: Any) -> None: mode_code: self.vacuum.getRoboVacCommandValue(RobovacCommand.MODE, "auto") } - # Some models (e.g., T2320) use a separate START_PAUSE DPS code to trigger cleaning + # Some models use a separate START_PAUSE DPS code to trigger cleaning # MODE sets the cleaning mode, START_PAUSE triggers the action # Only add START_PAUSE if the model explicitly defines it with a different code model_dps_codes = self.vacuum.getDpsCodes()