Skip to content

Conversation

@christophruethingbmw
Copy link
Contributor

@christophruethingbmw christophruethingbmw commented Sep 25, 2025

This PR is ment to start a discussion about the separation of the application from the low level interfaces. I tried to understand where we have a defined interface to be able to mock the hardware specific parts and be able to run the application on different platforms. I noticed several aspects which I would like to discuss on. The image below illustrates my view on the current implementation.

image
  • From what I see, the main abstraction happens with the ISystem... classes. Different platforms implement these systems differently. Is this understanding correct?
  • For me this abstraction should be recommended to anybody writing an application, so I wonder why the declaration of the ISystem... interfaces is actually in the application specific configuration and not on a more generic level like for example the ICanTransceiver?
  • The namespaces and the naming is quite confusing, because we have systems in configuration and application. Most confusing is ethernet
    • we have the ::systems::TapEthernetSystem : ::ethernet::IEthernetDriverSystem as the POSIX implementation
    • we have the ::systems::EthernetSystem as the application specific implementation of adding e.g. lwip
    • we have the ::systems::getEthernetSystem to get the instance of the TapEthernetSystem, but it sounds more like it would get the ::systems::EthernetSystem
  • I would try to keep the namespaces and the include paths of the files the same, i.e. the ::ethernet::IEthernetDriverSystem should also be in the ethernet/IEthernetDriverSystem include? Today it is in systems/IEthernetDriverSystem.
  • On top of the "low-level" systems we build more "high-level" systems from what I see, right? I wonder whether these systems are also more generic and could be outside of the application. For example an ethernet system which adds lwip is most likely something that many applications can re-use? We could then have an LwipEthernetSystem?
  • Maybe we also find a more clear naming to not have ...System for different things, i.e. use different names for the "low-level" systems and the "high-level" system. Even if it is something simple like using IEthernetDriver or ICanDriver? Or at least introduce separate namespaces?

@christian-schilling
Copy link
Contributor

I agree there is quite some confusion and room for improvement here.
Unfortunately I don't understand the diagram you made as the handwriting is pixelated and not legible.
I also agree that something like the current EthernetSystem could/should be reusable for different applications.
Regarding naming: Passing a reference to IEthernetSystem to EthernetSystem looks confusing, thats why the interface was named IEthernetDriverSystem.
I could definitely imagine to have interfaces for the drivers instead of the systems and then a system that can be configured to use different drivers.

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.

2 participants