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

Speedup in searching TRegister entries #7

Open
undroidwish opened this issue Oct 7, 2023 · 1 comment
Open

Speedup in searching TRegister entries #7

undroidwish opened this issue Oct 7, 2023 · 1 comment

Comments

@undroidwish
Copy link

Howdy epsilonrt,

please find attached a patch for a hash based approach in order to map Modbus addresses to a TRegister
struct. In my specific case with 96 holding regs, 96 input regs, 96 coils, 96 discrete inputs I observed a
speedup of factor 5 in my main loop. I believe this is worth the expense of 28 extra RAM bytes in a
Modbus object.

BR,
Christian

modbus.txt

@epsilonrt
Copy link
Owner

Hi Christian,
I thank you for this work.
I will have to examine your code in detail as soon as I am available.
You would need to create a pull-request so that I can integrate it into the repository : https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request
Regards

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

No branches or pull requests

2 participants