Repository navigation
Correct exit code 5, the env table and the serial default note - #7
Merged
Merged
Conversation
- docs/exitcodes.md: exit 5 is not reserved; a request or network timeout that is a command's fatal error (client read, write, ...) exits 5, while SunSpec and FC08 diagnostics wrap timeouts and exit 6. - README env table: one row per MODBUSCTL_SUNSPEC_* variable, naming the flag it feeds on sunspec subcommands and on client scan. - MODBUSCTL_ADDRESS default: 1 for read/decode, 0 for poll, none for write (required). - Serial notes say modbusctl defaults to 19200 8N2, and that 8E1 is the Modbus specification default. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016fpDM86uFLh3cRtBXmhJDQ
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Bart Van Bos · project thread
Before: exit code 5 was listed as reserved, although timed-out client commands exit 5. The env table listed each
MODBUSCTL_SUNSPEC_*variable twice with different flags, and it gaveMODBUSCTL_ADDRESSa default of 1, whichwritedoes not have. The "Defaults differ" note called 8E1 modbusctl's serial default.After: exit code 5 is documented as a request or network timeout on any client command. SunSpec and FC08 timeouts are noted as exiting 6. Each SunSpec variable has one row naming the flag it feeds on
sunspeccommands and onclient scan --algo sunspec.MODBUSCTL_ADDRESSreads "1 (read, decode), 0 (poll), none (write: required)". The note says modbusctl defaults to 19200 8N2 like go-modbus, and that 8E1 is the Modbus specification default.How: documentation only, checked against the code and the built binary's
--help.Generated by Claude Code