Skip to content

feat(Modbus): add ReadHoldingRegistersAsync function#12

Merged
ArgoZhang merged 4 commits into
mainfrom
feat-modbus
Sep 4, 2025
Merged

feat(Modbus): add ReadHoldingRegistersAsync function#12
ArgoZhang merged 4 commits into
mainfrom
feat-modbus

Conversation

@ArgoZhang

Copy link
Copy Markdown
Member

Link issues

fixes #11

Summary By Copilot

Regression?

  • Yes
  • No

Risk

  • High
  • Medium
  • Low

Verification

  • Manual (required)
  • Automated

Packaging changes reviewed?

  • Yes
  • No
  • N/A

☑️ Self Check before Merge

⚠️ Please check all items below before review. ⚠️

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • Merge the latest code from the main branch

Copilot AI review requested due to automatic review settings September 4, 2025 04:19

Copilot AI 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.

Pull Request Overview

This PR implements async reading functionality for Modbus holding registers and input registers, along with interface updates to support nullable return types and improved documentation.

Key changes include:

  • Added ReadHoldingRegistersAsync and ReadInputRegistersAsync method implementations
  • Updated interface method signatures to return nullable arrays and use ValueTask instead of Task
  • Refactored code to use generic parsing functions for different data types

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
IModbusTcpClient.cs Updated interface with nullable return types, consistent ValueTask usage, and improved Chinese documentation
DefaultModbusTcpClient.cs Implemented async register reading methods with generic parsing approach and code refactoring
TcpClientTest.cs Added comprehensive test coverage for the new async register reading methods

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread test/UnitTestModbus/TcpClientTest.cs Outdated
Comment thread test/UnitTestModbus/TcpClientTest.cs Outdated
@ArgoZhang ArgoZhang merged commit ecde2eb into main Sep 4, 2025
1 check failed
@ArgoZhang ArgoZhang deleted the feat-modbus branch September 4, 2025 04:22
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.

feat(Modbus): add ReadHoldingRegistersAsync function

2 participants