xusbcan-cli 0.1.1__tar.gz → 0.1.2__tar.gz
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.
- {xusbcan_cli-0.1.1/src/xusbcan_cli.egg-info → xusbcan_cli-0.1.2}/PKG-INFO +15 -3
- {xusbcan_cli-0.1.1 → xusbcan_cli-0.1.2}/README.md +14 -2
- {xusbcan_cli-0.1.1 → xusbcan_cli-0.1.2}/pyproject.toml +1 -1
- {xusbcan_cli-0.1.1 → xusbcan_cli-0.1.2}/src/xusbcan/__init__.py +1 -1
- {xusbcan_cli-0.1.1 → xusbcan_cli-0.1.2/src/xusbcan_cli.egg-info}/PKG-INFO +15 -3
- {xusbcan_cli-0.1.1 → xusbcan_cli-0.1.2}/LICENSE +0 -0
- {xusbcan_cli-0.1.1 → xusbcan_cli-0.1.2}/setup.cfg +0 -0
- {xusbcan_cli-0.1.1 → xusbcan_cli-0.1.2}/src/xusbcan/adapters/__init__.py +0 -0
- {xusbcan_cli-0.1.1 → xusbcan_cli-0.1.2}/src/xusbcan/adapters/chuangxin/__init__.py +0 -0
- {xusbcan_cli-0.1.1 → xusbcan_cli-0.1.2}/src/xusbcan/adapters/chuangxin/backend.py +0 -0
- {xusbcan_cli-0.1.1 → xusbcan_cli-0.1.2}/src/xusbcan/adapters/chuangxin/bus.py +0 -0
- {xusbcan_cli-0.1.1 → xusbcan_cli-0.1.2}/src/xusbcan/adapters/chuangxin/device_pool.py +0 -0
- {xusbcan_cli-0.1.1 → xusbcan_cli-0.1.2}/src/xusbcan/adapters/chuangxin/dll.py +0 -0
- {xusbcan_cli-0.1.1 → xusbcan_cli-0.1.2}/src/xusbcan/adapters/chuangxin/profiles.py +0 -0
- {xusbcan_cli-0.1.1 → xusbcan_cli-0.1.2}/src/xusbcan/adapters/peak/__init__.py +0 -0
- {xusbcan_cli-0.1.1 → xusbcan_cli-0.1.2}/src/xusbcan/adapters/peak/profiles.py +0 -0
- {xusbcan_cli-0.1.1 → xusbcan_cli-0.1.2}/src/xusbcan/adapters/profile.py +0 -0
- {xusbcan_cli-0.1.1 → xusbcan_cli-0.1.2}/src/xusbcan/adapters/registry.py +0 -0
- {xusbcan_cli-0.1.1 → xusbcan_cli-0.1.2}/src/xusbcan/adapters/vector/__init__.py +0 -0
- {xusbcan_cli-0.1.1 → xusbcan_cli-0.1.2}/src/xusbcan/adapters/vector/profiles.py +0 -0
- {xusbcan_cli-0.1.1 → xusbcan_cli-0.1.2}/src/xusbcan/adapters/zlg/__init__.py +0 -0
- {xusbcan_cli-0.1.1 → xusbcan_cli-0.1.2}/src/xusbcan/adapters/zlg/backend.py +0 -0
- {xusbcan_cli-0.1.1 → xusbcan_cli-0.1.2}/src/xusbcan/adapters/zlg/common.py +0 -0
- {xusbcan_cli-0.1.1 → xusbcan_cli-0.1.2}/src/xusbcan/adapters/zlg/device_pool.py +0 -0
- {xusbcan_cli-0.1.1 → xusbcan_cli-0.1.2}/src/xusbcan/adapters/zlg/dll.py +0 -0
- {xusbcan_cli-0.1.1 → xusbcan_cli-0.1.2}/src/xusbcan/adapters/zlg/profiles.py +0 -0
- {xusbcan_cli-0.1.1 → xusbcan_cli-0.1.2}/src/xusbcan/adapters/zlg/usbcan2.py +0 -0
- {xusbcan_cli-0.1.1 → xusbcan_cli-0.1.2}/src/xusbcan/adapters/zlg/usbcan_2e_u.py +0 -0
- {xusbcan_cli-0.1.1 → xusbcan_cli-0.1.2}/src/xusbcan/cli/__init__.py +0 -0
- {xusbcan_cli-0.1.1 → xusbcan_cli-0.1.2}/src/xusbcan/cli/__main__.py +0 -0
- {xusbcan_cli-0.1.1 → xusbcan_cli-0.1.2}/src/xusbcan/cli/app.py +0 -0
- {xusbcan_cli-0.1.1 → xusbcan_cli-0.1.2}/src/xusbcan/config/__init__.py +0 -0
- {xusbcan_cli-0.1.1 → xusbcan_cli-0.1.2}/src/xusbcan/config/loader.py +0 -0
- {xusbcan_cli-0.1.1 → xusbcan_cli-0.1.2}/src/xusbcan/core/__init__.py +0 -0
- {xusbcan_cli-0.1.1 → xusbcan_cli-0.1.2}/src/xusbcan/core/commands.py +0 -0
- {xusbcan_cli-0.1.1 → xusbcan_cli-0.1.2}/src/xusbcan/core/filters.py +0 -0
- {xusbcan_cli-0.1.1 → xusbcan_cli-0.1.2}/src/xusbcan/core/monitor.py +0 -0
- {xusbcan_cli-0.1.1 → xusbcan_cli-0.1.2}/src/xusbcan/core/periodic.py +0 -0
- {xusbcan_cli-0.1.1 → xusbcan_cli-0.1.2}/src/xusbcan/core/session.py +0 -0
- {xusbcan_cli-0.1.1 → xusbcan_cli-0.1.2}/src/xusbcan/mcp/__init__.py +0 -0
- {xusbcan_cli-0.1.1 → xusbcan_cli-0.1.2}/src/xusbcan/mcp/server.py +0 -0
- {xusbcan_cli-0.1.1 → xusbcan_cli-0.1.2}/src/xusbcan/mcp/tools.py +0 -0
- {xusbcan_cli-0.1.1 → xusbcan_cli-0.1.2}/src/xusbcan/mcp/transport.py +0 -0
- {xusbcan_cli-0.1.1 → xusbcan_cli-0.1.2}/src/xusbcan/models/__init__.py +0 -0
- {xusbcan_cli-0.1.1 → xusbcan_cli-0.1.2}/src/xusbcan/models/device.py +0 -0
- {xusbcan_cli-0.1.1 → xusbcan_cli-0.1.2}/src/xusbcan/models/frame.py +0 -0
- {xusbcan_cli-0.1.1 → xusbcan_cli-0.1.2}/src/xusbcan/models/result.py +0 -0
- {xusbcan_cli-0.1.1 → xusbcan_cli-0.1.2}/src/xusbcan/scenario/__init__.py +0 -0
- {xusbcan_cli-0.1.1 → xusbcan_cli-0.1.2}/src/xusbcan/scenario/loader.py +0 -0
- {xusbcan_cli-0.1.1 → xusbcan_cli-0.1.2}/src/xusbcan/scenario/runner.py +0 -0
- {xusbcan_cli-0.1.1 → xusbcan_cli-0.1.2}/src/xusbcan_cli.egg-info/SOURCES.txt +0 -0
- {xusbcan_cli-0.1.1 → xusbcan_cli-0.1.2}/src/xusbcan_cli.egg-info/dependency_links.txt +0 -0
- {xusbcan_cli-0.1.1 → xusbcan_cli-0.1.2}/src/xusbcan_cli.egg-info/entry_points.txt +0 -0
- {xusbcan_cli-0.1.1 → xusbcan_cli-0.1.2}/src/xusbcan_cli.egg-info/requires.txt +0 -0
- {xusbcan_cli-0.1.1 → xusbcan_cli-0.1.2}/src/xusbcan_cli.egg-info/top_level.txt +0 -0
- {xusbcan_cli-0.1.1 → xusbcan_cli-0.1.2}/tests/test_chuangxin_usb_can_2c.py +0 -0
- {xusbcan_cli-0.1.1 → xusbcan_cli-0.1.2}/tests/test_config.py +0 -0
- {xusbcan_cli-0.1.1 → xusbcan_cli-0.1.2}/tests/test_core.py +0 -0
- {xusbcan_cli-0.1.1 → xusbcan_cli-0.1.2}/tests/test_dual_session_virtual.py +0 -0
- {xusbcan_cli-0.1.1 → xusbcan_cli-0.1.2}/tests/test_error_code_mapping.py +0 -0
- {xusbcan_cli-0.1.1 → xusbcan_cli-0.1.2}/tests/test_filters.py +0 -0
- {xusbcan_cli-0.1.1 → xusbcan_cli-0.1.2}/tests/test_mcp_smoke.py +0 -0
- {xusbcan_cli-0.1.1 → xusbcan_cli-0.1.2}/tests/test_mcp_stdio.py +0 -0
- {xusbcan_cli-0.1.1 → xusbcan_cli-0.1.2}/tests/test_models.py +0 -0
- {xusbcan_cli-0.1.1 → xusbcan_cli-0.1.2}/tests/test_registry.py +0 -0
- {xusbcan_cli-0.1.1 → xusbcan_cli-0.1.2}/tests/test_result.py +0 -0
- {xusbcan_cli-0.1.1 → xusbcan_cli-0.1.2}/tests/test_scenario.py +0 -0
- {xusbcan_cli-0.1.1 → xusbcan_cli-0.1.2}/tests/test_scenario_advanced.py +0 -0
- {xusbcan_cli-0.1.1 → xusbcan_cli-0.1.2}/tests/test_scenario_store.py +0 -0
- {xusbcan_cli-0.1.1 → xusbcan_cli-0.1.2}/tests/test_scenario_vars.py +0 -0
- {xusbcan_cli-0.1.1 → xusbcan_cli-0.1.2}/tests/test_session_capabilities.py +0 -0
- {xusbcan_cli-0.1.1 → xusbcan_cli-0.1.2}/tests/test_zlg_usbcan2.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: xusbcan-cli
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.2
|
|
4
4
|
Summary: 面向 AI Agent 的 CAN 总线调试工具(CLI + MCP)
|
|
5
5
|
Author: Archaofan
|
|
6
6
|
License-Expression: MIT
|
|
@@ -44,10 +44,14 @@ Dynamic: license-file
|
|
|
44
44
|
- **python-can 优先**:已有后端可直接写 `interface`;需要通道映射或专有参数时再登记型号
|
|
45
45
|
- **可安装 Agent Skill**:先确认型号,再调用;厂商踩坑按型号分文件
|
|
46
46
|
|
|
47
|
+

|
|
48
|
+
|
|
47
49
|
## 会话层做什么
|
|
48
50
|
|
|
49
51
|
本项目在 python-can(或自研后端给出的 `can.Bus`)之上提供**统一会话与命令层**,而不是再实现一套总线协议栈。大致包括:
|
|
50
52
|
|
|
53
|
+

|
|
54
|
+
|
|
51
55
|
- **配置与别名**:`xusbcan.toml` 里用逻辑名引用设备,打开参数集中管理
|
|
52
56
|
- **会话生命周期**:按别名 `open` / `close`,多卡并存;关闭时收回周期任务与有界监听
|
|
53
57
|
- **统一结果契约**:`Result` + `error.code` 枚举,超时收帧等可程序化分支(不必解析人类日志)
|
|
@@ -122,6 +126,10 @@ xusbcan scenario --file steps.json
|
|
|
122
126
|
xusbcan scenario --dir scenarios/
|
|
123
127
|
```
|
|
124
128
|
|
|
129
|
+

|
|
130
|
+
|
|
131
|
+
*台架 / lab 演示(路径已脱敏;非实车)*
|
|
132
|
+
|
|
125
133
|
`periodic` 在本进程发满 `--duration` 后停止。`scenario` 在同进程编排发→等→再发;`--dir` 按文件名批跑。跨多次调用保持会话时用 MCP。
|
|
126
134
|
|
|
127
135
|
### MCP
|
|
@@ -132,6 +140,10 @@ xusbcan-mcp
|
|
|
132
140
|
|
|
133
141
|
Agent 使用 `open_device`、`send_frame`、`receive_frame`、`monitor`、`periodic_start` 等工具。`periodic_start` **必须**带 `duration_s`(上限 300 秒)。更长任务请用本机常驻进程,并明确授权台架环境。
|
|
134
142
|
|
|
143
|
+

|
|
144
|
+
|
|
145
|
+
*台架 / lab 演示:MCP 工具调用成绩单(配置路径已脱敏;非 Cursor UI 截图;非实车)*
|
|
146
|
+
|
|
135
147
|
注册时按所用适配器设置对应环境变量与 `XUSBCAN_CONFIG`(见下方各厂商小节)。
|
|
136
148
|
|
|
137
149
|
## 适配器准备
|
|
@@ -160,11 +172,11 @@ set ZLG_SDK_DIR=D:\path\to\zlg-sdk-dir
|
|
|
160
172
|
name = "bus0"
|
|
161
173
|
vendor = "zlg"
|
|
162
174
|
model = "USBCAN-2E-U" # 或 "USBCAN-II"
|
|
163
|
-
channel = 1
|
|
175
|
+
channel = 1 # 按实际接线:CAN1→0,CAN2→1
|
|
164
176
|
nominal = 250000
|
|
165
177
|
```
|
|
166
178
|
|
|
167
|
-
|
|
179
|
+
2E-U / II 均为双通道,`channel` 必须对应实际接线口。型号以铭牌与配置 `model` 为准;不要根据 SDK `GetDeviceInf` 一类字段改判型号或改走 CAN FD。滤波与周期发送路径因型号而异,见 Agent Skill 对应参考页。
|
|
168
180
|
|
|
169
181
|
```json
|
|
170
182
|
{
|
|
@@ -23,10 +23,14 @@
|
|
|
23
23
|
- **python-can 优先**:已有后端可直接写 `interface`;需要通道映射或专有参数时再登记型号
|
|
24
24
|
- **可安装 Agent Skill**:先确认型号,再调用;厂商踩坑按型号分文件
|
|
25
25
|
|
|
26
|
+

|
|
27
|
+
|
|
26
28
|
## 会话层做什么
|
|
27
29
|
|
|
28
30
|
本项目在 python-can(或自研后端给出的 `can.Bus`)之上提供**统一会话与命令层**,而不是再实现一套总线协议栈。大致包括:
|
|
29
31
|
|
|
32
|
+

|
|
33
|
+
|
|
30
34
|
- **配置与别名**:`xusbcan.toml` 里用逻辑名引用设备,打开参数集中管理
|
|
31
35
|
- **会话生命周期**:按别名 `open` / `close`,多卡并存;关闭时收回周期任务与有界监听
|
|
32
36
|
- **统一结果契约**:`Result` + `error.code` 枚举,超时收帧等可程序化分支(不必解析人类日志)
|
|
@@ -101,6 +105,10 @@ xusbcan scenario --file steps.json
|
|
|
101
105
|
xusbcan scenario --dir scenarios/
|
|
102
106
|
```
|
|
103
107
|
|
|
108
|
+

|
|
109
|
+
|
|
110
|
+
*台架 / lab 演示(路径已脱敏;非实车)*
|
|
111
|
+
|
|
104
112
|
`periodic` 在本进程发满 `--duration` 后停止。`scenario` 在同进程编排发→等→再发;`--dir` 按文件名批跑。跨多次调用保持会话时用 MCP。
|
|
105
113
|
|
|
106
114
|
### MCP
|
|
@@ -111,6 +119,10 @@ xusbcan-mcp
|
|
|
111
119
|
|
|
112
120
|
Agent 使用 `open_device`、`send_frame`、`receive_frame`、`monitor`、`periodic_start` 等工具。`periodic_start` **必须**带 `duration_s`(上限 300 秒)。更长任务请用本机常驻进程,并明确授权台架环境。
|
|
113
121
|
|
|
122
|
+

|
|
123
|
+
|
|
124
|
+
*台架 / lab 演示:MCP 工具调用成绩单(配置路径已脱敏;非 Cursor UI 截图;非实车)*
|
|
125
|
+
|
|
114
126
|
注册时按所用适配器设置对应环境变量与 `XUSBCAN_CONFIG`(见下方各厂商小节)。
|
|
115
127
|
|
|
116
128
|
## 适配器准备
|
|
@@ -139,11 +151,11 @@ set ZLG_SDK_DIR=D:\path\to\zlg-sdk-dir
|
|
|
139
151
|
name = "bus0"
|
|
140
152
|
vendor = "zlg"
|
|
141
153
|
model = "USBCAN-2E-U" # 或 "USBCAN-II"
|
|
142
|
-
channel = 1
|
|
154
|
+
channel = 1 # 按实际接线:CAN1→0,CAN2→1
|
|
143
155
|
nominal = 250000
|
|
144
156
|
```
|
|
145
157
|
|
|
146
|
-
|
|
158
|
+
2E-U / II 均为双通道,`channel` 必须对应实际接线口。型号以铭牌与配置 `model` 为准;不要根据 SDK `GetDeviceInf` 一类字段改判型号或改走 CAN FD。滤波与周期发送路径因型号而异,见 Agent Skill 对应参考页。
|
|
147
159
|
|
|
148
160
|
```json
|
|
149
161
|
{
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: xusbcan-cli
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.2
|
|
4
4
|
Summary: 面向 AI Agent 的 CAN 总线调试工具(CLI + MCP)
|
|
5
5
|
Author: Archaofan
|
|
6
6
|
License-Expression: MIT
|
|
@@ -44,10 +44,14 @@ Dynamic: license-file
|
|
|
44
44
|
- **python-can 优先**:已有后端可直接写 `interface`;需要通道映射或专有参数时再登记型号
|
|
45
45
|
- **可安装 Agent Skill**:先确认型号,再调用;厂商踩坑按型号分文件
|
|
46
46
|
|
|
47
|
+

|
|
48
|
+
|
|
47
49
|
## 会话层做什么
|
|
48
50
|
|
|
49
51
|
本项目在 python-can(或自研后端给出的 `can.Bus`)之上提供**统一会话与命令层**,而不是再实现一套总线协议栈。大致包括:
|
|
50
52
|
|
|
53
|
+

|
|
54
|
+
|
|
51
55
|
- **配置与别名**:`xusbcan.toml` 里用逻辑名引用设备,打开参数集中管理
|
|
52
56
|
- **会话生命周期**:按别名 `open` / `close`,多卡并存;关闭时收回周期任务与有界监听
|
|
53
57
|
- **统一结果契约**:`Result` + `error.code` 枚举,超时收帧等可程序化分支(不必解析人类日志)
|
|
@@ -122,6 +126,10 @@ xusbcan scenario --file steps.json
|
|
|
122
126
|
xusbcan scenario --dir scenarios/
|
|
123
127
|
```
|
|
124
128
|
|
|
129
|
+

|
|
130
|
+
|
|
131
|
+
*台架 / lab 演示(路径已脱敏;非实车)*
|
|
132
|
+
|
|
125
133
|
`periodic` 在本进程发满 `--duration` 后停止。`scenario` 在同进程编排发→等→再发;`--dir` 按文件名批跑。跨多次调用保持会话时用 MCP。
|
|
126
134
|
|
|
127
135
|
### MCP
|
|
@@ -132,6 +140,10 @@ xusbcan-mcp
|
|
|
132
140
|
|
|
133
141
|
Agent 使用 `open_device`、`send_frame`、`receive_frame`、`monitor`、`periodic_start` 等工具。`periodic_start` **必须**带 `duration_s`(上限 300 秒)。更长任务请用本机常驻进程,并明确授权台架环境。
|
|
134
142
|
|
|
143
|
+

|
|
144
|
+
|
|
145
|
+
*台架 / lab 演示:MCP 工具调用成绩单(配置路径已脱敏;非 Cursor UI 截图;非实车)*
|
|
146
|
+
|
|
135
147
|
注册时按所用适配器设置对应环境变量与 `XUSBCAN_CONFIG`(见下方各厂商小节)。
|
|
136
148
|
|
|
137
149
|
## 适配器准备
|
|
@@ -160,11 +172,11 @@ set ZLG_SDK_DIR=D:\path\to\zlg-sdk-dir
|
|
|
160
172
|
name = "bus0"
|
|
161
173
|
vendor = "zlg"
|
|
162
174
|
model = "USBCAN-2E-U" # 或 "USBCAN-II"
|
|
163
|
-
channel = 1
|
|
175
|
+
channel = 1 # 按实际接线:CAN1→0,CAN2→1
|
|
164
176
|
nominal = 250000
|
|
165
177
|
```
|
|
166
178
|
|
|
167
|
-
|
|
179
|
+
2E-U / II 均为双通道,`channel` 必须对应实际接线口。型号以铭牌与配置 `model` 为准;不要根据 SDK `GetDeviceInf` 一类字段改判型号或改走 CAN FD。滤波与周期发送路径因型号而异,见 Agent Skill 对应参考页。
|
|
168
180
|
|
|
169
181
|
```json
|
|
170
182
|
{
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|