3 个不稳定版本
0.2.1 | 2024 年 5 月 9 日 |
---|---|
0.1.1 | 2023 年 12 月 28 日 |
0.1.0 | 2023 年 12 月 28 日 |
#159 in 机器人学
每月 150 次下载
63KB
1.5K SLoC
gsdtool
- PROFIBUS GSD 文件的 CLI 工具 
gsdtool
提供了处理 GSD 文件的实用工具,特别是在 profirust
PROFIBUS 通信堆栈的上下文中。
安装
cargo install gsdtool
生成外设配置
使用所选模块和设置值,config-wizard
子命令交互式地生成外设配置数据
❯ gsdtool config-wizard FRAB4711.gsd Welcome to the station configuration wizard! Station: "FRABA Encoder" from "FRABA" Ident: 0x4711 Selecting modules (maximum 1): Select module 1/1 (ESC to stop): Class 2 Multiturn Code sequence: Increasing clockwise (0) Class 2 functionality: Enable Scaling function control: Enable Measuring units per revolution (0 - 8192): 4096 Total measuring range (high) (0 - 512): 256 Total measuring range (low) (0 - 65535): 0 Peripheral Configuration: // Options generated by `gsdtool` using "FRAB4711.gsd" let options = profirust::dp::PeripheralOptions { // ........ }; let mut buffer_inputs = [0u8; 4]; let mut buffer_outputs = [0u8; 4]; let mut buffer_diagnostics = [0u8; 57];
解析基于设备的诊断
使用来自 GSD 文件的信息,diagnostics
子命令解析外设报告的诊断
❯ gsdtool diagnostics si0380a7.gsd Diagnostics Data (as fmt::Debug slice): [160, 0, 0, 32, 72, 100, 255, 255, 255, 255, 255, 255, 0, 41, 0, 128, 0, 0] Bit 29: ====== Segment DP2 ====== Bit 127: A/B shorted, too much resist. Area 40-47: 100 = Reflection error rate: 100%
许可证
许可协议为以下之一
- Apache 许可证第 2 版 (LICENSE-APACHE 或 https://apache.ac.cn/licenses/LICENSE-2.0)
- MIT 许可证 (LICENSE-MIT 或 http://opensource.org/licenses/MIT)
由您选择。
贡献
除非您明确声明,否则您有意提交以包含在作品中的任何贡献,根据 Apache-2.0 许可证定义,应如上双许可,无任何额外条款或条件。
依赖关系
~5–14MB
~201K SLoC