CANConfigPython 0.1.0a1__py3-none-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- canconfigpython/__init__.py +7 -0
- canconfigpython/__main__.py +3 -0
- canconfigpython/cli.py +111 -0
- canconfigpython/client.py +243 -0
- canconfigpython/commands.py +57 -0
- canconfigpython/errors.py +19 -0
- canconfigpython/resources/docs/native-source.tar.gz +0 -0
- canconfigpython/resources/docs/user-guide.en.md +274 -0
- canconfigpython/resources/docs/user-guide.zh-CN.md +265 -0
- canconfigpython/resources/skill/canconfig-python/SKILL.md +71 -0
- canconfigpython/resources/skill/canconfig-python/agents/openai.yaml +4 -0
- canconfigpython/resources/skill/canconfig-python/assets/changes.schema.json +832 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/bridge_dual_rates.json +18 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/bridge_mapping.json +13 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/cancom_115200_8n1.json +10 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/cancom_format_crc.json +8 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/cancom_gap.json +8 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/cancom_transparent_id.json +10 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/fb_1m.json +12 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/fb_500k.json +12 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/fb_adaptive_single.json +7 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/fb_return_manual.json +22 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/fb_silent_adaptive_option.json +7 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/filter_blacklist.json +7 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/filter_mask.json +12 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/filter_range.json +12 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/hub_h_external.json +13 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/hub_input_filter.json +13 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/hub_l_external.json +13 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/hub_mapping.json +46 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/hub_routing.json +8 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/index.en.md +55 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/index.json +661 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/index.zh-CN.md +55 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/negative/adaptive_mixed.json +8 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/negative/hub_missing_ps.json +12 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/negative/restricted_inheritance.json +12 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/negative/short_user_data.json +7 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/negative/string_numeric_id.json +7 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/negative/unknown_field.json +7 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/negative/unsupported_adaptive.json +7 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/negative/wrong_uid.json +7 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/rpt_adaptive_all.json +12 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/rpt_silent.json +7 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/user_data.json +7 -0
- canconfigpython/resources/skill/canconfig-python/references/operations.md +68 -0
- canconfigpython/resources.py +17 -0
- canconfigpython/runtime/Qt5Core.dll +0 -0
- canconfigpython/runtime/Qt5Network.dll +0 -0
- canconfigpython/runtime/Qt5SerialPort.dll +0 -0
- canconfigpython/runtime/WIICAN.dll +0 -0
- canconfigpython/runtime/canconfigconsole.exe +0 -0
- canconfigpython/runtime/libgcc_s_dw2-1.dll +0 -0
- canconfigpython/runtime/libstdc++-6.dll +0 -0
- canconfigpython/runtime/libwinpthread-1.dll +0 -0
- canconfigpython/runtime/manifest.json +19 -0
- canconfigpython/runtime.py +61 -0
- canconfigpython-0.1.0a1.dist-info/GPL-3.0.txt +674 -0
- canconfigpython-0.1.0a1.dist-info/LICENSE +21 -0
- canconfigpython-0.1.0a1.dist-info/METADATA +197 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-LICENSE.txt +866 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-LICENSE.FDL.txt +450 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-LICENSE.GPL2.txt +339 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-LICENSE.GPL3-EXCEPT.txt +704 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-LICENSE.GPL3.txt +674 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-LICENSE.GPLv3.txt +686 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-LICENSE.LGPL3.txt +165 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-LICENSE.LGPLv21.txt +514 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-LICENSE.LGPLv3.txt +175 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-LICENSE.PREVIEW.COMMERCIAL.txt +626 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__angle__LICENSE.txt +32 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__angle__src__libANGLE__renderer__d3d__d3d11__dxgi_support_data.json.txt +1164 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__angle__src__libANGLE__renderer__d3d__d3d11__load_functions_data.json.txt +1116 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__angle__src__libANGLE__renderer__d3d__d3d11__swizzle_format_data.json.txt +77 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__angle__src__libANGLE__renderer__d3d__d3d11__texture_format_data.json.txt +692 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__angle__src__third_party__compiler__LICENSE.txt +22 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__angle__src__third_party__murmurhash__LICENSE.txt +2 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__double-conversion__LICENSE.txt +26 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__easing__easing.cpp.txt +670 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__easing__legal.qdoc.txt +35 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__forkfd__forkfd.c.txt +875 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__forkfd__forkfd.h.txt +66 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__forkfd__forkfd_gcc.h.txt +63 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__freebsd__0001-Patch-the-FreeBSD-strto-u-ll-functions-to-work-insid.patch.txt +151 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__freebsd__strtoll.c.txt +134 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__freebsd__strtoull.c.txt +112 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__freetype__docs__LICENSE.TXT.txt +37 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__freetype__src__tools__no-copyright.txt +61 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__freetype__src__tools__update-copyright-year.txt +135 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__freetype__src__tools__update-copyright.txt +14 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__harfbuzz-ng__COPYING.txt +36 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__harfbuzz__COPYING.txt +24 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__libpng__LICENSE.txt +112 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__md4__md4.cpp.txt +265 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__md4__md4.h.txt +31 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__md5__md5.cpp.txt +247 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__md5__md5.h.txt +48 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__pcre__COPYING.txt +5 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__pcre__LICENCE.txt +93 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__rfc6234__patches__0001-Fix-compilation-MSVC-warning-in-3rdparty-rfc6234.patch.txt +86 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__rfc6234__sha-private.h.txt +28 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__rfc6234__sha.h.txt +357 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__rfc6234__sha224-256.c.txt +583 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__rfc6234__sha384-512.c.txt +1034 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__sha1__sha1.cpp.txt +261 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__sha3__KeccakF-1600-32-rvk.macros.txt +555 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__sha3__KeccakF-1600-32.macros.txt +26 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__sha3__KeccakF-1600-64.macros.txt +728 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__sha3__KeccakF-1600-int-set.h.txt +6 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__sha3__KeccakF-1600-interface.h.txt +46 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__sha3__KeccakF-1600-opt32-settings.h.txt +4 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__sha3__KeccakF-1600-opt32.c.txt +524 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__sha3__KeccakF-1600-opt64-settings.h.txt +7 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__sha3__KeccakF-1600-opt64.c.txt +512 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__sha3__KeccakF-1600-unrolling.macros.txt +124 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__sha3__KeccakNISTInterface.c.txt +82 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__sha3__KeccakNISTInterface.h.txt +70 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__sha3__KeccakSponge.c.txt +266 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__sha3__KeccakSponge.h.txt +80 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__sha3__brg_endian.h.txt +142 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__xkbcommon__COPYING.txt +188 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtserialport-LICENSE.FDL.txt +450 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtserialport-LICENSE.GPL2.txt +339 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtserialport-LICENSE.GPL3-EXCEPT.txt +704 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtserialport-LICENSE.GPL3.txt +674 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtserialport-LICENSE.GPLv2.txt +292 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtserialport-LICENSE.GPLv3.txt +686 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtserialport-LICENSE.LGPL3.txt +165 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtserialport-LICENSE.LGPLv21.txt +514 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtserialport-LICENSE.LGPLv3.txt +175 -0
- canconfigpython-0.1.0a1.dist-info/RECORD +165 -0
- canconfigpython-0.1.0a1.dist-info/THIRD_PARTY_NOTICES.md +69 -0
- canconfigpython-0.1.0a1.dist-info/WHEEL +5 -0
- canconfigpython-0.1.0a1.dist-info/entry_points.txt +3 -0
- canconfigpython-0.1.0a1.dist-info/gcc-COPYING.RUNTIME.txt +73 -0
- canconfigpython-0.1.0a1.dist-info/gcc-COPYING3.LIB.txt +165 -0
- canconfigpython-0.1.0a1.dist-info/gcc-COPYING3.txt +674 -0
- canconfigpython-0.1.0a1.dist-info/linux-libc6-copyright.txt +529 -0
- canconfigpython-0.1.0a1.dist-info/linux-libcap2-copyright.txt +112 -0
- canconfigpython-0.1.0a1.dist-info/linux-libcom-err2-copyright.txt +403 -0
- canconfigpython-0.1.0a1.dist-info/linux-libdouble-conversion3-copyright.txt +41 -0
- canconfigpython-0.1.0a1.dist-info/linux-libgcc-s1-copyright.txt +1532 -0
- canconfigpython-0.1.0a1.dist-info/linux-libglib2.0-0t64-copyright.txt +1250 -0
- canconfigpython-0.1.0a1.dist-info/linux-libgssapi-krb5-2-copyright.txt +1374 -0
- canconfigpython-0.1.0a1.dist-info/linux-libicu74-copyright.txt +49 -0
- canconfigpython-0.1.0a1.dist-info/linux-libk5crypto3-copyright.txt +1374 -0
- canconfigpython-0.1.0a1.dist-info/linux-libkeyutils1-copyright.txt +52 -0
- canconfigpython-0.1.0a1.dist-info/linux-libkrb5-3-copyright.txt +1374 -0
- canconfigpython-0.1.0a1.dist-info/linux-libkrb5support0-copyright.txt +1374 -0
- canconfigpython-0.1.0a1.dist-info/linux-libpcre2-16-0-copyright.txt +122 -0
- canconfigpython-0.1.0a1.dist-info/linux-libpcre2-8-0-copyright.txt +122 -0
- canconfigpython-0.1.0a1.dist-info/linux-libqt5core5t64-copyright.txt +2932 -0
- canconfigpython-0.1.0a1.dist-info/linux-libqt5network5t64-copyright.txt +2932 -0
- canconfigpython-0.1.0a1.dist-info/linux-libqt5serialport5-copyright.txt +134 -0
- canconfigpython-0.1.0a1.dist-info/linux-libstdc++6-copyright.txt +1532 -0
- canconfigpython-0.1.0a1.dist-info/linux-libudev1-copyright.txt +287 -0
- canconfigpython-0.1.0a1.dist-info/linux-libzstd1-copyright.txt +123 -0
- canconfigpython-0.1.0a1.dist-info/linux-packages.json +102 -0
- canconfigpython-0.1.0a1.dist-info/linux-zlib1g-copyright.txt +84 -0
- canconfigpython-0.1.0a1.dist-info/mingw-w64-COPYING.MinGW-w64-runtime.txt.txt +240 -0
- canconfigpython-0.1.0a1.dist-info/mingw-w64-COPYING.MinGW-w64.txt.txt +135 -0
- canconfigpython-0.1.0a1.dist-info/mingw-w64-COPYING.txt +43 -0
- canconfigpython-0.1.0a1.dist-info/qt-source-notices.json +278 -0
- canconfigpython-0.1.0a1.dist-info/top_level.txt +1 -0
- canconfigpython-0.1.0a1.dist-info/winpthreads-COPYING.txt +57 -0
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# 配置修改用例(CANConfigConsole 2.3)
|
|
2
|
+
|
|
3
|
+
[English](index.en.md)
|
|
4
|
+
|
|
5
|
+
每个链接都是完整请求文件,含 schema_version、device_uid、changes。全零 UID 是待替换标记;从已确认目标的 info 取得实际 UID 后再填写。先复制到工作目录,按用户要求编辑,UTF-8 保存,再执行 apply --dry-run;预检成功且影响范围已授权后执行同一文件。详见[公共参数与命令参考](../../references/operations.md)。
|
|
6
|
+
|
|
7
|
+
这些用例已设计为隔离假驱动验收输入;测试结果不证明真实硬件时序、总线通信或断电保存。普通局部补丁会继承整个所选配置段的其他值,write_count 因而可以大于修改字段数。下表写入数和 SAVE 范围是 index.json 指定型号/版本夹具的预期值;真实设备以本次预检结果为准。用户应评估其对整个配置段的影响,不要把局部字段补丁理解成仅写该字段。
|
|
8
|
+
|
|
9
|
+
类型:13=CANBridge/B_CC_A,24=CANCOM,26=CANFB-2F2C,30=CANRPT-600,35=CANHub-X6H,36=CANHub-X6L。其他通道数或版本必须重新检查能力,不能直接照搬数组、通道或写入数。
|
|
10
|
+
|
|
11
|
+
## 正例(22)
|
|
12
|
+
|
|
13
|
+
| 文件 / 目的 | 前提 | 预期配置写入数 / SAVE 域 |
|
|
14
|
+
| --- | --- | --- |
|
|
15
|
+
| [CANFB CAN1 固定 500 kbit/s](fb_500k.json) | 所有通道当前为手动、参数可完整读取;无 DIP 开关接管。 | 2 / SAVE/1/1 |
|
|
16
|
+
| [CANFB CAN1 固定 1 Mbit/s](fb_1m.json) | 所有通道当前为手动、参数可完整读取;无 DIP 开关接管。 | 2 / SAVE/1/1 |
|
|
17
|
+
| [CANBridge 两路不同波特率](bridge_dual_rates.json) | 所有通道当前为手动、参数可完整读取;无 DIP 开关接管。 | 2 / SAVE/1/0 |
|
|
18
|
+
| [CANRPT-600 CAN3 静默模式](rpt_silent.json) | 所有通道当前为手动、参数可完整读取;无 DIP 开关接管。 | 6 / SAVE/1/0 |
|
|
19
|
+
| [CANHub-X6H 外部 CAN3 500 kbit/s](hub_h_external.json) | 所有通道当前为手动、参数可完整读取;无 DIP 开关接管。 | 6 / SAVE/1/1 |
|
|
20
|
+
| [CANHub-X6L 外部 CAN3 500 kbit/s](hub_l_external.json) | 所有通道当前为手动、参数可完整读取;无 DIP 开关接管。 | 6 / SAVE/1/1 |
|
|
21
|
+
| [CANFB CAN1 开启自适应](fb_adaptive_single.json) | 所有通道当前为手动、参数可完整读取;无 DIP 开关接管。 | 1 / SAVE/1/1 |
|
|
22
|
+
| [CANRPT-600 全部六路开启自适应](rpt_adaptive_all.json) | 所有通道当前为手动、参数可完整读取;无 DIP 开关接管。 | 6 / SAVE/1/0 |
|
|
23
|
+
| [CANFB 从自适应切回两路明确手动参数](fb_return_manual.json) | 允许当前为自适应;明确授权覆盖全部两路参数,使用用户指定的新手动值;无 DIP 接管。 | 2 / SAVE/1/1 |
|
|
24
|
+
| [CANBridge CAN1 掩码过滤 ID 0x123](filter_mask.json) | 所有通道当前为手动、参数可完整读取;无 DIP 开关接管。 | 32 / SAVE/1/0 |
|
|
25
|
+
| [CANBridge CAN1 范围过滤 0x100–0x1FF](filter_range.json) | 所有通道当前为手动、参数可完整读取;无 DIP 开关接管。 | 32 / SAVE/1/0 |
|
|
26
|
+
| [CANBridge 切换黑名单](filter_blacklist.json) | 所有通道当前为手动、参数可完整读取;无 DIP 开关接管。 | 1 / SAVE/1/0 |
|
|
27
|
+
| [CANHub 两路输入过滤并启用](hub_input_filter.json) | 所有通道当前为手动、参数可完整读取;无 DIP 开关接管。 | 257 / SAVE/1/2, SAVE/1/5 |
|
|
28
|
+
| [CANBridge 标准 ID 0x123 映射为 0x321](bridge_mapping.json) | 所有通道当前为手动、参数可完整读取;无 DIP 开关接管。 | 128 / SAVE/5 |
|
|
29
|
+
| [CANHub 映射并转发到 CAN2](hub_mapping.json) | Hub 固件 01.16 及以上(mapping_format=3);所有通道当前为手动、参数可完整读取。 | 257 / SAVE/1/3, SAVE/1/5 |
|
|
30
|
+
| [CANHub CAN1 路由到 CAN2 与 CAN3](hub_routing.json) | 所有通道当前为手动、参数可完整读取;无 DIP 开关接管。 | 2 / SAVE/1/4, SAVE/1/5 |
|
|
31
|
+
| [CANFB 静默自适应选项](fb_silent_adaptive_option.json) | CANFB 固件 05.09/05.10 支持该位;该选项不等于 BRT_AUTO 开启命令。 | 1 / SAVE/1/5 |
|
|
32
|
+
| [CANCOM 串口 115200 8N1](cancom_115200_8n1.json) | 所有通道当前为手动、参数可完整读取;无 DIP 开关接管。 | 1 / SAVE/4 |
|
|
33
|
+
| [CANCOM 双向透明转换与标准 ID](cancom_transparent_id.json) | 所有通道当前为手动、参数可完整读取;无 DIP 开关接管。 | 1 / SAVE/4 |
|
|
34
|
+
| [CANCOM 格式转换并启用 CRC](cancom_format_crc.json) | 所有通道当前为手动、参数可完整读取;无 DIP 开关接管。 | 1 / SAVE/4 |
|
|
35
|
+
| [CANCOM 字符流与消息间隔](cancom_gap.json) | 所有通道当前为手动、参数可完整读取;无 DIP 开关接管。 | 1 / SAVE/4 |
|
|
36
|
+
| [写入 USER_DATA 第一块 32 字节](user_data.json) | 所有通道当前为手动、参数可完整读取;无 DIP 开关接管。 | 2 / 无独立 SAVE |
|
|
37
|
+
|
|
38
|
+
所有正例预检预期 exit_code=0,effects 的写入计数为 0;模拟执行预期 exit_code=0。普通配置 verification.readback=matched;开启自适应仅为 adaptive_flags_matched,adaptive_result=not_verified。所有用例 power_cycle=not_verified。USER_DATA 无独立 SAVE,不能根据 save_acknowledged=0 判失败。
|
|
39
|
+
|
|
40
|
+
## 负例(8,仅测试)
|
|
41
|
+
|
|
42
|
+
| 文件 / 错误 | 标准 Schema | CLI 预期退出码 / 错误码 |
|
|
43
|
+
| --- | --- | --- |
|
|
44
|
+
| [目标 UID 不匹配](negative/wrong_uid.json) | 通过,设备预检拒绝 | 6 / uid_mismatch |
|
|
45
|
+
| [把数值 ID 写成字符串](negative/string_numeric_id.json) | 拒绝 | 7 / invalid_patch_value |
|
|
46
|
+
| [不存在的参数名](negative/unknown_field.json) | 拒绝 | 7 / invalid_patch_field |
|
|
47
|
+
| [自适应开启与其他修改混合](negative/adaptive_mixed.json) | 拒绝 | 7 / adaptive_enable_only |
|
|
48
|
+
| [从自适应读回继承参数](negative/restricted_inheritance.json) | 通过,设备预检拒绝 | 7 / readonly_parameters |
|
|
49
|
+
| [CANCOM 不支持开启自适应](negative/unsupported_adaptive.json) | 通过,设备预检拒绝 | 5 / adaptive_not_supported |
|
|
50
|
+
| [Hub 的 BRT 缺少 PS](negative/hub_missing_ps.json) | 通过,设备预检拒绝 | 7 / invalid_configuration |
|
|
51
|
+
| [USER_DATA 不足 32 字节](negative/short_user_data.json) | 拒绝 | 7 / invalid_patch_value |
|
|
52
|
+
|
|
53
|
+
负例 CLI 验收绕过外部 Schema 直接调用解析器,预期 dry-run 与执行均无配置 SET/WRITE/SAVE;部分错误在连接前发生,无驱动 trace。一般 Schema 允许型号并集,例如 BRT 的 4/5 项,但 Hub 必须有第 5 项 PS,由设备预检判定。wrong_uid 保持全零 UID;其他负例在夹具中替换 UID 以抵达待测错误分支。
|
|
54
|
+
|
|
55
|
+
[index.json](index.json) 是用例与预期结果的机器索引,也是进程测试的输入。不要把索引、Schema、命令结果 envelope 当作 changes 请求文件。
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema_version": 1,
|
|
3
|
+
"device_uid": "0000-0000-0000-0000-0000-0000",
|
|
4
|
+
"changes": {
|
|
5
|
+
"CAN1_PARAMETER/BRT_AUTO": 1,
|
|
6
|
+
"CAN2_PARAMETER/BRT_AUTO": 1,
|
|
7
|
+
"CAN3_PARAMETER/BRT_AUTO": 1,
|
|
8
|
+
"CAN4_PARAMETER/BRT_AUTO": 1,
|
|
9
|
+
"CAN5_PARAMETER/BRT_AUTO": 1,
|
|
10
|
+
"CAN6_PARAMETER/BRT_AUTO": 1
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# Operation reference
|
|
2
|
+
|
|
3
|
+
Use `canconfig COMMAND --help` for current syntax.
|
|
4
|
+
Windows: COM3. Linux: /dev/ttyACM0 or a confirmed /dev/serial/by-id/... alias.
|
|
5
|
+
Never auto-select the first device. Linux paths are case-sensitive. The wrapper
|
|
6
|
+
resolves an alias for the current operation. Ensure serial permissions; do not
|
|
7
|
+
default to sudo.
|
|
8
|
+
|
|
9
|
+
## Command map
|
|
10
|
+
|
|
11
|
+
| Task | Invocation after canconfig | Device I/O |
|
|
12
|
+
|---|---|---|
|
|
13
|
+
| Check install | doctor --json | None |
|
|
14
|
+
| Contract | schema --json | None |
|
|
15
|
+
| Identity | info --port PORT --expect-uid UID --json | Live |
|
|
16
|
+
| Validate backup | validate --file backup.ini --json | None |
|
|
17
|
+
| Backup | export --port PORT --file backup.ini --password-env CAN_PASSWORD --expect-uid UID --json | Live |
|
|
18
|
+
| Restore original | restore --port PORT --file backup.ini --password-env CAN_PASSWORD --expect-uid UID --check-device --dry-run --json | Live, no SET/WRITE/SAVE |
|
|
19
|
+
| Apply patch | apply --port PORT --file changes.json --password-env CAN_PASSWORD --expect-uid UID --dry-run --json | Live, no SET/WRITE/SAVE |
|
|
20
|
+
| Password | change-password --port PORT --expect-uid UID --password-env CAN_PASSWORD --new-password-env CAN_NEW_PASSWORD --dry-run --json | Live old-password auth |
|
|
21
|
+
| Firmware preflight | firmware-update --port PORT --file image.sfb --dry-run --json | None |
|
|
22
|
+
|
|
23
|
+
PORT/UID/HASH are placeholders. Execute writes by removing only --dry-run after
|
|
24
|
+
preparation and authorization. Preserve target, files, sections and identity checks.
|
|
25
|
+
Config writes never retry. Firmware retries numbered packets, not whole sessions.
|
|
26
|
+
|
|
27
|
+
--sections applies to validate/export/restore: all or a comma-separated list of
|
|
28
|
+
parameters, filters, filter_mode, mapping, options, routing, cancom, user_data.
|
|
29
|
+
Partial backup requires matching explicit sections on restore. Unsupported explicit
|
|
30
|
+
sections are errors. A successful export replaces an existing destination.
|
|
31
|
+
|
|
32
|
+
## Credentials
|
|
33
|
+
|
|
34
|
+
Passwords are 1–10 UTF-8 bytes without NUL; a character can occupy multiple bytes.
|
|
35
|
+
Use PowerShell Read-Host -AsSecureString or Bash read -s, then a temporary environment
|
|
36
|
+
variable. Clean up in finally/trap. Values are forwarded only in the child environment.
|
|
37
|
+
Environment variables are not a secret vault; administrators may inspect them.
|
|
38
|
+
The Python CLI has no plaintext --password or native legacy aliases.
|
|
39
|
+
|
|
40
|
+
Change-password requires different old/new variable names. It is not a JSON/INI
|
|
41
|
+
configuration field. Success: verification.new_password == "authenticated".
|
|
42
|
+
Readback is not applicable; power-cycle persistence is unverified.
|
|
43
|
+
|
|
44
|
+
## Firmware
|
|
45
|
+
|
|
46
|
+
Use final .sfb (SFU1/SFU2/SFU3 header, payload, <=64 MiB), not encrypted .sfu.
|
|
47
|
+
Transport is 115200 8N1; DTR enabled unless --no-dtr selected.
|
|
48
|
+
After offline preflight, pin data.sha256 with --expect-sha256 HASH.
|
|
49
|
+
Use --expect-usb-serial SERIAL if known. The bootloader has no configuration
|
|
50
|
+
UID/password authentication. Device must already be in update mode.
|
|
51
|
+
|
|
52
|
+
Success: verification.transfer == "completed" and device_return == "observed".
|
|
53
|
+
Installed image/version/signature/compatibility remain not_verified.
|
|
54
|
+
Do not automatically restart a failed session.
|
|
55
|
+
|
|
56
|
+
## Results
|
|
57
|
+
|
|
58
|
+
Every operation emits a UTF-8 result envelope. --json emits one compact line.
|
|
59
|
+
Schema version is 1. Missing valid final output after hardware execution means
|
|
60
|
+
effects.status unknown and counts null. Preserve uncertainty.
|
|
61
|
+
|
|
62
|
+
Exits: 0 success; 1 connection/runtime/lock; 2 credentials; 3 file;
|
|
63
|
+
4 communication/protocol; 5 unsupported; 6 identity; 7 configuration/patch;
|
|
64
|
+
8 unknown hardware result; 9 usage; 10 verification mismatch;
|
|
65
|
+
11 timeout; 12 cancellation. Native timeout/cancel results may also carry unknown
|
|
66
|
+
effects; an exit alone never proves zero writes.
|
|
67
|
+
|
|
68
|
+
Export the full guide: `canconfig docs export --output ./canconfig-docs`.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
from pathlib import Path
|
|
2
|
+
import shutil
|
|
3
|
+
from .errors import ConfigError
|
|
4
|
+
|
|
5
|
+
ROOT = Path(__file__).resolve().parent / "resources"
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def export(kind, output):
|
|
9
|
+
source = ROOT / ("docs" if kind == "docs" else "skill/canconfig-python")
|
|
10
|
+
target = Path(output).absolute()
|
|
11
|
+
if target.exists():
|
|
12
|
+
raise ConfigError("output_exists", "Choose a new output directory; export never merges or overwrites files.", 3)
|
|
13
|
+
try:
|
|
14
|
+
shutil.copytree(str(source), str(target))
|
|
15
|
+
except OSError:
|
|
16
|
+
raise ConfigError("export_failed", "Resource export failed; remove incomplete output or choose a new directory.", 3)
|
|
17
|
+
return {"directory": str(target), "files": len(list(target.rglob("*")))}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"format": 1,
|
|
3
|
+
"platform": "windows",
|
|
4
|
+
"architecture": "x86",
|
|
5
|
+
"wheel_platform": "win32",
|
|
6
|
+
"backend_version": "2.3",
|
|
7
|
+
"bridge_api": 1,
|
|
8
|
+
"executable": "canconfigconsole.exe",
|
|
9
|
+
"sha256": {
|
|
10
|
+
"Qt5Core.dll": "0a4da23fbfdab54c975bff15717137acd8738c19dc8a4a9aa3f5c7b9a7d94585",
|
|
11
|
+
"Qt5Network.dll": "02a0b66118b459113e4c060d3a49210ca6e53a6bc7f9ad8561b22f71bbbff0c3",
|
|
12
|
+
"Qt5SerialPort.dll": "7158896af1688d100fc4a231712b92ac03248acd65c030ec9617b8f3fd79e6b8",
|
|
13
|
+
"WIICAN.dll": "1e8a69aa368db34cf701bbfca0b616459430f4e17606279c7b9477841dd83268",
|
|
14
|
+
"canconfigconsole.exe": "504f0df4da6a46d5c679f67698678e9b32f0ab3ef2ab9e6df7d250790fe91a07",
|
|
15
|
+
"libgcc_s_dw2-1.dll": "4d2e2d408d399d066b0aaef2047f7a33515c13c589832de0d9f1ba87a530c394",
|
|
16
|
+
"libstdc++-6.dll": "79622396dc4c7afbbceca03e69f727bf1862735ee3ad671aa3ee7ada8aa446c3",
|
|
17
|
+
"libwinpthread-1.dll": "b5fe4d6408ef2baabdd168f4c7250900606468e9aeb24c71e0c833d3d715ae65"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import hashlib
|
|
2
|
+
import json
|
|
3
|
+
import os
|
|
4
|
+
from pathlib import Path
|
|
5
|
+
import platform
|
|
6
|
+
import sys
|
|
7
|
+
from .errors import ConfigError
|
|
8
|
+
|
|
9
|
+
ROOT = Path(__file__).resolve().parent / "runtime"
|
|
10
|
+
BACKEND_VERSION = "2.3"
|
|
11
|
+
BRIDGE_API = 1
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def inspect_runtime(root=None):
|
|
15
|
+
root = Path(root or ROOT).resolve()
|
|
16
|
+
try:
|
|
17
|
+
manifest = json.loads((root / "manifest.json").read_text(encoding="utf-8"))
|
|
18
|
+
expected = "windows" if sys.platform == "win32" else "linux" if sys.platform.startswith("linux") else None
|
|
19
|
+
if expected is None or manifest["platform"] != expected:
|
|
20
|
+
raise ConfigError("unsupported_platform", "Install a wheel for this operating system.", 5)
|
|
21
|
+
if expected == "linux" and platform.machine().lower() not in ("x86_64", "amd64"):
|
|
22
|
+
raise ConfigError("unsupported_architecture", "This Linux runtime requires x86_64.", 5)
|
|
23
|
+
if manifest["backend_version"] != BACKEND_VERSION or manifest["bridge_api"] != BRIDGE_API:
|
|
24
|
+
raise ValueError("contract")
|
|
25
|
+
files = manifest["sha256"]
|
|
26
|
+
exe = manifest["executable"]
|
|
27
|
+
if not isinstance(files, dict) or exe not in files:
|
|
28
|
+
raise ValueError("files")
|
|
29
|
+
for name, expected_hash in files.items():
|
|
30
|
+
relative = Path(name)
|
|
31
|
+
if relative.is_absolute() or ".." in relative.parts or "\\" in name:
|
|
32
|
+
raise ValueError("path")
|
|
33
|
+
target = (root / relative).resolve()
|
|
34
|
+
if root not in target.parents or hashlib.sha256(target.read_bytes()).hexdigest() != expected_hash:
|
|
35
|
+
raise ValueError("digest")
|
|
36
|
+
executable = root / exe
|
|
37
|
+
if expected == "linux" and not os.access(str(executable), os.X_OK):
|
|
38
|
+
raise ConfigError("runtime_not_executable", "Backend is not executable; reinstall the platform wheel.", 1)
|
|
39
|
+
return executable, manifest
|
|
40
|
+
except ConfigError:
|
|
41
|
+
raise
|
|
42
|
+
except (OSError, ValueError, KeyError, TypeError):
|
|
43
|
+
raise ConfigError("runtime_invalid", "Bundled runtime is missing or inconsistent. Reinstall the wheel, or build/stage the runtime from source.", 1)
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
def child_environment(runtime, secrets=()):
|
|
47
|
+
env = dict(os.environ)
|
|
48
|
+
# A shell/Qt setup must not redirect resolution to a different Qt installation.
|
|
49
|
+
for key in list(env):
|
|
50
|
+
if key.startswith("QT_") or key.startswith("QML") or key in ("LD_PRELOAD", "LD_AUDIT", "LD_LIBRARY_PATH"):
|
|
51
|
+
env.pop(key, None)
|
|
52
|
+
if sys.platform == "win32":
|
|
53
|
+
system = env.get("SystemRoot", r"C:\Windows")
|
|
54
|
+
env["PATH"] = os.pathsep.join((str(runtime), str(Path(system) / "System32"), system))
|
|
55
|
+
env["NoDefaultCurrentDirectoryInExePath"] = "1"
|
|
56
|
+
else:
|
|
57
|
+
# Libraries live next to the executable; never change the caller's environment.
|
|
58
|
+
env["LD_LIBRARY_PATH"] = str(runtime)
|
|
59
|
+
for name, value in secrets:
|
|
60
|
+
env[name] = value
|
|
61
|
+
return env
|