`gsdtool` - CLI tool for PROFIBUS GSD files [![crates.io page](https://img.shields.io/crates/v/gsdtool.svg)](https://crates.io/crates/gsdtool) ------------------------------------------- `gsdtool` provides utilities for working with GSD files, expecially in the context of the `profirust` PROFIBUS communication stack. ### Installation ```bash cargo install gsdtool ``` ### Generating Peripheral Configuration 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];### Parsing Device-based Diagnostics 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%## License Licensed under either of - Apache License, Version 2.0 ([LICENSE-APACHE](../LICENSE-APACHE) or