Skip to content

Add a user documentation foundation - #162

Merged
kevinherron merged 2 commits into
masterfrom
feature/docs
Aug 12, 2026
Merged

Add a user documentation foundation#162
kevinherron merged 2 commits into
masterfrom
feature/docs

Conversation

@kevinherron

@kevinherron kevinherron commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add a portable documentation index organized into how-to guides, concepts, and reference
  • document common client, server, TLS, timeout, reconnection, and troubleshooting tasks
  • add source-grounded reference material for modules, transports, function codes, errors, lifecycle, concurrency, and resource ownership
  • route API details to generated Javadocs instead of duplicating signatures
  • streamline the README around a minimal example, module summary, transport capabilities, and task-oriented links

This PR changes documentation only; it does not modify runtime behavior.

@coderabbitai

coderabbitai Bot commented Aug 8, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Summary by CodeRabbit

  • Documentation
    • Added a comprehensive user documentation hub covering installation, supported transports, features, APIs, and troubleshooting.
    • Added practical guides for Modbus TCP, serial RTU, TLS-secured connections, timeouts, reconnection, and server setup.
    • Added conceptual references explaining addressing, unit IDs, framing, security, function codes, lifecycle, concurrency, and error handling.
    • Updated the project README with streamlined setup instructions, capability information, and a Modbus TCP example.

Walkthrough

The README was simplified and the user documentation was expanded. New pages cover Modbus concepts, TCP and RTU clients, TLS, servers, operations, APIs, errors, PDUs, lifecycle, concurrency, and transport configuration.

Changes

Onboarding and documentation navigation

Layer / File(s) Summary
Onboarding and documentation navigation
README.md, docs/user/index.md, docs/user/reference/installation-and-modules.md, docs/user/reference/api-reference.md
The project overview now provides module installation, transport capabilities, examples, documentation links, and API reference guidance.

Protocol concepts and framing

Layer / File(s) Summary
Protocol concepts and framing
docs/user/concepts/*
New concept pages document Modbus roles, data areas, addressing, unit IDs, PDU structure, transport framing, TLS, and security boundaries.

Client communication workflows

Layer / File(s) Summary
Client communication workflows
docs/user/how-to/clients/*
New guides show TCP, serial RTU, and mutual-TLS client workflows with typed requests, cleanup, verification, and troubleshooting.

Server and operations workflows

Layer / File(s) Summary
Server and operations workflows
docs/user/how-to/servers/*, docs/user/how-to/operations/*
New guides document ProcessImage-backed servers, timeouts, reconnection, communication diagnosis, exception classification, logging, and resource cleanup.

Behavior, errors, and PDU reference

Layer / File(s) Summary
Behavior, errors, and PDU reference
docs/user/reference/client-and-server-behavior.md, docs/user/reference/errors-and-exceptions.md, docs/user/reference/function-codes-and-pdus.md
Reference pages document request behavior, server dispatch, exceptions, typed function codes, PDU serialization, validation, and raw TCP exchange.

Lifecycle, concurrency, and transport reference

Layer / File(s) Summary
Lifecycle, concurrency, and transport reference
docs/user/reference/feature-and-transport-matrix.md, docs/user/reference/lifecycle-concurrency-and-resources.md, docs/user/reference/transport-configuration.md
Reference pages document transport capabilities, lifecycle rules, concurrency constraints, resource ownership, TLS, serial settings, schedulers, and timeout configuration.

Estimated code review effort: 2 (Simple) | ~15 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the primary change: establishing a user documentation foundation.
Description check ✅ Passed The description accurately summarizes the documentation changes and states that runtime behavior is unchanged.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Introduce a documentation tree under docs/: task-oriented how-to guides
for clients, servers, and operations; concept pages for the Modbus mental
model, addressing, and transports; and reference pages for configuration,
behavior, errors, and the API.

Rework the README to lead with a minimal client example and hand off to
the documentation index instead of duplicating usage details.
@kevinherron
kevinherron marked this pull request as ready for review August 12, 2026 12:22

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Nitpick comments (1)
docs/user/how-to/operations/configure-timeouts-and-reconnection.md (1)

71-73: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick win

Use application logging instead of printStackTrace().

e.getCause().printStackTrace() writes the complete transport or TLS failure chain to stderr. Pass the exception to the application logger so the caller controls redaction, routing, and retention.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/user/how-to/operations/configure-timeouts-and-reconnection.md` around
lines 71 - 73, Replace e.getCause().printStackTrace() in the
ModbusExecutionException catch block with the application’s established logger,
passing the exception as the throwable so the full cause chain is handled by
configured logging.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/user/how-to/servers/expose-data-over-modbus-tcp.md`:
- Around line 57-59: Update the example around server.start() so it either waits
for a complete input line using BufferedReader.readLine(), preserving the “press
Enter” message, or revise the message to state that any input byte stops the
server; keep the shutdown flow unchanged.
- Around line 47-54: Update the NettyTcpServerTransport configuration in the
ModbusTcpServer example to bind to 127.0.0.1 instead of 0.0.0.0, keeping the
local example’s existing port and server setup unchanged.

In `@docs/user/reference/lifecycle-concurrency-and-resources.md`:
- Around line 23-24: Update the lifecycle/API statement near “Every client
lifecycle and request operation” to limit the async-counterpart claim to
connect, disconnect, and request operations, while preserving the existing
distinction that open() and isConnected() have no asynchronous forms.

---

Nitpick comments:
In `@docs/user/how-to/operations/configure-timeouts-and-reconnection.md`:
- Around line 71-73: Replace e.getCause().printStackTrace() in the
ModbusExecutionException catch block with the application’s established logger,
passing the exception as the throwable so the full cause chain is handled by
configured logging.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 075a9518-a200-42e6-9e59-48bcade145c3

📥 Commits

Reviewing files that changed from the base of the PR and between 235b86b and 342fa39.

📒 Files selected for processing (19)
  • README.md
  • docs/user/concepts/addressing-unit-ids-and-data.md
  • docs/user/concepts/modbus-mental-model.md
  • docs/user/concepts/transports-framing-and-security.md
  • docs/user/how-to/clients/communicate-over-serial-rtu.md
  • docs/user/how-to/clients/read-and-write-over-tcp.md
  • docs/user/how-to/clients/secure-a-modbus-tcp-client-with-tls.md
  • docs/user/how-to/operations/configure-timeouts-and-reconnection.md
  • docs/user/how-to/operations/troubleshoot-communication.md
  • docs/user/how-to/servers/expose-data-over-modbus-tcp.md
  • docs/user/index.md
  • docs/user/reference/api-reference.md
  • docs/user/reference/client-and-server-behavior.md
  • docs/user/reference/errors-and-exceptions.md
  • docs/user/reference/feature-and-transport-matrix.md
  • docs/user/reference/function-codes-and-pdus.md
  • docs/user/reference/installation-and-modules.md
  • docs/user/reference/lifecycle-concurrency-and-resources.md
  • docs/user/reference/transport-configuration.md

Comment thread docs/user/how-to/servers/expose-data-over-modbus-tcp.md
Comment thread docs/user/how-to/servers/expose-data-over-modbus-tcp.md
Comment thread docs/user/reference/lifecycle-concurrency-and-resources.md
@kevinherron
kevinherron merged commit c4d01c7 into master Aug 12, 2026
4 checks passed
@kevinherron
kevinherron deleted the feature/docs branch August 12, 2026 12:39
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.

1 participant