Closed GwnDaan closed 1 month ago
Looks pretty good, I think this will indeed help us move away from the singleton, which is great
Issues
7 New issues
0 Accepted issues
Measures
0 Security Hotspots
63.5% Coverage on New Code
0.0% Duplication on New Code
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:
InternalControlFunction::create
->CANNetworkManager::create_internal_control_function
PartneredControlFunction::create
->CANNetworkManager::create_partnered_control_function
AddressClaimStateMachine
class, and instead housed it directly into theInternalControlFunction
class. They already had an 1:1 relation, so it basically was nothing more than an extension at this point.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: