Open-Agriculture / AgIsoStack-plus-plus

AgIsoStack++ is the completely free open-source C++ ISOBUS library for everyone
https://agisostack.com/
MIT License
187 stars 41 forks source link

[HW] Combine single- and multithreaded hardware interfaces #451

Closed GwnDaan closed 6 months ago

GwnDaan commented 6 months ago

Describe your changes

Attempted to combine the hardware interfaces for the single-threaded and multi-threaded variants into one class. For this too be somewhat easier, I switched the messages queues to a ring-buffer which can have a lockfree implementation. For the single threaded variant I just use the standard queue as it doesn't have to worry about concurrent access.

I also did some more moving around, especially moving some of the channel specific functionality stuff to its struct (now class).

How has this been tested?

GwnDaan commented 6 months ago

I pushed a separate commit for the small improvements, should make it easier to review what changes I made after the initial commit. Though it might not look clean on the main branch commit graph, so we should probably stick with for "squash and merge" for this PR :). I'm thinking it might also be more convenient for reviewing if we do it on some of the other (larger) PR's, hmm?...

sonarcloud[bot] commented 6 months ago

Quality Gate Passed Quality Gate passed

Issues
3 New issues
0 Accepted issues

Measures
0 Security Hotspots
66.7% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

ad3154 commented 6 months ago

we should probably stick with for "squash and merge" for this PR :). I'm thinking it might also be more convenient for reviewing if we do it on some of the other (larger) PR's

Yep, that's also fine with me