Open-Agriculture / AgIsoStack-plus-plus

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

[Core]: Refactorization of control function address claiming and factory methods #463

Closed GwnDaan closed 1 month ago

GwnDaan commented 2 months ago

Describe your changes

With the goal in mind of getting rid of the singleton from the network manager, I removed a bit of dependencies of the control functions on the network manager. This should be another step closer to making it easy to flip the network manager around.

What changed:

How has this been tested?

Made sure that the unit tests still correctly ran without making functional changes. Only minor thing is the removal of the check that a control function is correctly removed when it's "destroyed". I think that's something to look at later and currently gave more of a headache than it was useful. So I removed that GTEST assert.

Furthermore, I ran the seeder and VT3 object pool examples, they both still work fine. For most of the examples I removed the set preferred address, since according to the standard they have no function specifically defined for the currently configured preferred address:

A CF claiming a preferred address in the range 0 to 127 and 248 to 253 shall perform the function defined for that preferred address and shall specify that function within its NAME.

ad3154 commented 2 months ago

Looks pretty good, I think this will indeed help us move away from the singleton, which is great

sonarcloud[bot] commented 2 months ago

Quality Gate Passed Quality Gate passed

Issues
7 New issues
0 Accepted issues

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

See analysis details on SonarCloud