Crates.io | gsdtool |
lib.rs | gsdtool |
version | 0.3.0 |
source | src |
created_at | 2023-12-28 15:46:56.938581 |
updated_at | 2024-10-31 20:47:06.812934 |
description | CLI utility for PROFIBUS GSD files (Generic Station Descripions) |
homepage | https://github.com/rahix/profirust/tree/main/gsdtool |
repository | https://github.com/rahix/profirust |
max_upload_size | |
id | 1082489 |
size | 38,958 |
gsdtool
- CLI tool for PROFIBUS GSD files gsdtool
provides utilities for working with GSD files, expecially in the
context of the profirust
PROFIBUS communication stack.
cargo install gsdtool
The config-wizard
subcommand interactively generates peripheral configuration
data using selected modules and setting values:
❯ 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];
The diagnostics
subcommand parses diagnostics reported by a peripheral using
the information from the GSD file:
❯ 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%
Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.