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
Feature Request: Management of configuration that doesn't belong to the Machine #1482
Comments
Hi @alexanderwiller,
I can follow you that most things should be stored in one of the usual Likewise, I agree, the Machine should not become the cesspool for "lost+found properties". But having two roots But this would require huge code changes! You would probably need to add a new For a less intrusive change the In a way this is already the case today: the
Why? IMHO, the machine is the perfect place for the speed slider low limit. It is the overall machine speed that is governed, i.e. across all drivers and axes. _Mark |
Hey @markmaker I want to first try to establish the points we agree on:
Please correct me if I got anything wrong here. I don't get this part:
The feeders can be found in the For the job processor, I think it belongs into the machine, as a change in job processing can lead to a major machine behavior change. Consider having a machine that has a tight max clearance between the nozzle and the PCB, it could depend on the job order to not crash into already placed parts. When you load a different machine.xml because you are using another machine, you would except that the job executes flawlessly, not that some application setting causes it to fail. I also already thought about vision and think the settings are reasonably portable as long as the camera is somewhat compatible. I don't know how this would interact with gang vision as suggested in another issue, but think it wouldn't be a problem. The machine knows nozzle spacing and camera positions, the vision settings are just used per (part, camera) combination. So But I digress, these are some very specific questions already, just wanted to address them. Regarding the probably biggest topic of discussion, how any new settings items that are not directly related to the machine (Scripting, Macros, ...) can be represented, I don't fully understand in which way having two or more roots doesn't feel right. You already outlined the two options that I would see as well:
I woudl argue that only the second option represents an actual improvement, which is the point of this issue. I could see it from the GUI tree perspective, where code-wise, its just a root tree node class implementing Considering the Data model-wise, I'd say that having an I like the idea of having a
I agree that this overall endeavour would require a lot of code changes, but of a not too difficult type, its basically restructuring legwork, not something hugely complex on its own. As I've invested quite a bit of effort into this topic already, I'm open to trying to implement any changes that we agree upon. Alex |
Yes, we do agree on those.
Haha, I was mistaken. The fact that the feeders are also available separately on the Feeders tab threw me. Just momentarily took them the same way as Parts, Packages and Vision which have their own
I disagree that this is so clear-cut. It could be well argued that the Machine is the defining root object for one instance of OpenPnP, and everything else is owned by it, including the application being attached to control it. This is just a more or less arbitrary design decision.
Well, that's more of a stomach feeling, professional experience after 35 years of developing software. I always liked the UNIX idea that everything is a file and that there is a single file hierarchy. In comparison, the clunky drive letters on WinDOS are an abomination. Same thing with Java's Object OOP type system root as opposed to C++'s mess. Or take a DOM. You get a clear and complete ownership hierarchy, and some very elegant functionality can be achieved using bubbling and/or recursion, taking topological order into account. But frankly, this discussion is a bit beyond the scope of what I personally think is very useful for OpenPnP, and worthy of my spare time (and yours). There are so many "down to earth" things that you could help improve in OpenPnP (JobProcessor etc.) that would help users day after day, big time. The sort of architectural perfectionism we are talking here, comes way down the list for me, given this is well established and proven code that nobody really complained about. No offense! 😇 Maybe Jason, being the architect of it all, has a different take on your proposals. I certainly won't stand in the way 😆 _Mark |
Feature Request
Describe the Feature
The feature should provide a place for storing configuration that is not machine configuration.
Machine configuration should be defined as anything that relates to the physical capabilities of the machine, directly or indirectly. I think this is best illustrated by all items that are now to be found under
ReferenceMachine
in the setup tree.Not machine configuration is everything else, some examples include:
I would coin the term
Application configuration
for this.How Will It Look?
The feature will use the same
AbstractModelObject
base class as all machine configuration objects and will be configured the same way (PropertySheetHolder etc.).A separate configuration file,
application.xml
, will be used for storing the application settings. This is due to the structure of themachine.xml
not really allowing any additional config next to, not subordinate to, the machine element. Also, it seems to be cleaner architecturally.For the config tree, an invisible root node is added that contains both the machine and the application configuration.
Code-wise, it could be structured like this:
Im not too sure with this point, its just a first draft to make it work and produce the mock-up (that isn't really a mock-up anymore). Abstract classes may or may not be used, depending on if different implementations can be expected (e.g. not for Application, but maybe for ScriptMacro, PredefinedActionMacro, ActuatorMacro, ...). Here I would need some advice, maybe after making available a first draft in my branch, to ensure that clean separation between model and whatever else (I'm not an expert at these things but just hacking away) isn't watered down.
Why Do We Need It?
1. What problem does it solve?
It feels not right structure-wise to add a configuration like script engine caching, or even worse, speed slider low limit, to the ReferenceMachine class and Machine interface.
The class/interface gets bloated by this and those configuration items are not related to the physical capabilities of the machine, but to the way of interacting with it or how the application behaves internally. They are even useful to retain if one does create a new
machine.xml
.Additionally, system units, language preferences and UI behavior currently are stored in the system registry (or some equivalent mechanism), making these settings not portable between systems by just copying the config folder.
2. Is it useful for everyone, or does it only solve a problem for your machine?
For myself, I wouldn't go to the efforts doing this, this proposal should improve structural representation of the various classes of settings that already exist and provide clean infrastructure for future additions to OpenPnP.
The text was updated successfully, but these errors were encountered: