Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AddressSplitter can avoid unadressable ranges when splitting read requests #141

Merged
merged 2 commits into from
Jun 11, 2023

Conversation

aldas
Copy link
Owner

@aldas aldas commented Jun 11, 2023

AddressSplitter can avoid unadressable ranges when splitting read requests.

Fixes #135

Example:

        $requests = ReadRegistersBuilder::newReadHoldingRegisters('tcp://127.0.0.1:5022')
            ->unaddressableRanges([ [100,110], [256, 300], [512] ])
            ->uint16(100, 'gen1_fuel_rate_wo')
            ->uint16(111, 'gen2_fuel_rate_wo')
            ->uint16(112, 'gen3_fuel_rate_wo')
            ->build();

@codecov
Copy link

codecov bot commented Jun 11, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +98.72 🎉

Comparison is base (b6c9646) 0.00% compared to head (e59f0a9) 98.72%.

Additional details and impacted files
@@              Coverage Diff              @@
##             master     #141       +/-   ##
=============================================
+ Coverage          0   98.72%   +98.72%     
- Complexity        0      887      +887     
=============================================
  Files             0       69       +69     
  Lines             0     2277     +2277     
=============================================
+ Hits              0     2248     +2248     
- Misses            0       29       +29     
Flag Coverage Δ
unittests 98.72% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/Composer/AddressSplitter.php 100.00% <100.00%> (ø)
src/Composer/Range.php 100.00% <100.00%> (ø)
src/Composer/Read/ReadCoilsBuilder.php 100.00% <100.00%> (ø)
src/Composer/Read/ReadRegistersBuilder.php 100.00% <100.00%> (ø)

... and 65 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@aldas aldas merged commit 206c95a into master Jun 11, 2023
@aldas aldas deleted the unaddressablerange branch June 11, 2023 19:44
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.

ReadRegisterAddressSplitter should split when addresses are having a "gap".
1 participant