Skip to content

Correct exit code 5, the env table and the serial default note - #7

Merged
boeboe merged 1 commit into
mainfrom
claude/docs-consistency-n9mv22
Oct 19, 2026
Merged

boeboe merged 1 commit into
mainfrom
claude/docs-consistency-n9mv22

Conversation

@boeboe

@boeboe boeboe commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

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 gave MODBUSCTL_ADDRESS a default of 1, which write does 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 sunspec commands and on client scan --algo sunspec. MODBUSCTL_ADDRESS reads "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

- 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
@boeboe boeboe self-assigned this Oct 19, 2026
@codecov

codecov Bot commented Oct 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@boeboe
boeboe merged commit 043c637 into main Oct 19, 2026
7 checks passed
@boeboe
boeboe deleted the claude/docs-consistency-n9mv22 branch October 19, 2026 10:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants