Java UI for linuxcnc
Please Log in or Create an account to join the conversation.
Sorry, but email-notification from forum does not work any moreThe author hasn't been online for 8 months so you might also open an issue on his git repo for another possible contact mechanism.
.
Well, no limitations.Is this project still ongoing or it was abandoned due to some limitations?
I didn't post here for little interest on java ui.
I added some polish to the "gremlin" and I was quite pleased with the state reached.
Everything I wanted worked so far.
As a side note: I don't use gremlin. I implemented a 3D-view on my own.
... but: I didn't follow changes on master.
.
Based on your question I checked my app against master and it looks as if it is broken.I am interested about the details on how to communicate with the library and also about the gremlin plot.
I really hope you did not hit a bottleneck and that a java based UI would be a feasible solution.
LC has changed access api of NML, so currently it does not work.
Have to research for that changes and change the access layer.
Please Log in or Create an account to join the conversation.
I am interested in building a Java based UI but with kotlin instead of java.
I looked over your code and indeed, I can see some programming experience behind, you don't seem to be just a hacker!
I have contributed a bit with on the QtPyVcp project and I have also build my VCP on top of QtPyVcp, but even though I've became more familiar with python, the object oriented part of me cannot make peace with the non-typed python.
Also since Compose for Desktop was announced, I said I wanted to build this.
Can we connect a chat or smth for more discussions?
Please Log in or Create an account to join the conversation.
Well, can't help with kotlin.I am interested in building a Java based UI but with kotlin instead of java.
I'm convinced, that java/swing is the most powerful ui-framework out there. Never had an ui-idea, that was impossible to work out.
But first of all, you should figure out, what goal you wonna reach. Kotlin is preferred language of android - and android runs on ???
Language selection should be one of the last decisions, not the first one.
.
That's right, I learned to work concept based - the opposite of hackingI looked over your code and indeed, I can see some programming experience behind
.
Well, Qt is a huge framework, but it has the drawback, that it works by occasion. That means, same code may work on one machine and simply crash on another machine. I only happen to know the crashy side of Qt ...I have contributed a bit with on the QtPyVcp project and I have also build my VCP on top of QtPyVcp
Lately I had to realize a small ui for linux without X-server - and I choosed GTK+
There's a OO-language for GTK+ called vala. Never heard that before, but it is a very clean and convincing conecpt. It took me few days and my project was up and running.
.
Python is a language built for hackers that don't like to learn how to code. I never accepted python as a programming language.I've became more familiar with python, the object oriented part of me cannot make peace with the non-typed python.
Nevertheless I had to realize a project using python - as it was the only scripting engine on the target system.
.
No, I'm too old for chat. Don't like that.Can we connect a chat or smth for more discussions?
I'm a fan of asynchronous communication ...
We can mail or use forum.
Please Log in or Create an account to join the conversation.
You can see more details here:
kotlinlang.org/docs/comparison-to-java.h...-addressed-in-kotlin
In the last 4 years, I've been a Kotlin developer on Android, and I really like the language features.
Since compose framework was announced for building declarative UI on Android, I've thought how nice it would be to write the entire VCP in kotlin & compose.
Then I've discovered that JetBrains, has announced Compose for Desktop, which runs on Windows, Linux, MacOS.
What I would like to achieve is smth like this:
An onion style architecture where I have:
Services - all the linuxcnc specific communication with the linuxcnc library, database service, network service.
Repositories - that are aggregating information from services and exposing streams of data (similar to RxJava) to the upper layer
UseCases - Here by combining various repositories, we could handle the common functionality between the Lathe/Mill/Plasma
Each layer will have its own specific objects, that will be visible only the the upper layer.
That way, I can unit test every layer and have confidence that everything works as expected.
Then comes the UI, which would be written in Kotlin Compose.
The philosophy that I've used for my QtPyVcp app, was that I don't wanna see on the screen, information that is not relevant or buttons that don't make sense to be clicked when the machine is that specific state.
Eg:
- it doesn't make sense to have spindle stop button when spindle is not running, and it doesn't make sense to have fwd/rev buttons when the spindle is running.
- it doesn't make sense to see DTG info when you're the machine is not executing anything in mdi or program running....and so on.
So I am thinking of having a state machine, where every state in which the machine can be will be defined and mapped 1:1 with the UI
This state machine will respond to asynchronous events that are getting triggered by status channel & error channel.
Excepting the services layer, all the code so far is cross platform, so the controller app could run on any OS including android tablets.
By creating the services layer smart enough, we could have linuxcnc running like centroid is running, on a different pc than that one that is controlling the machine.
The reason I wanna do this is because I need a strong enough motivation to learn compose UI and understand better the internals of linuxcnc.
If you could help me to get your app working, it would be huge help and a great startup.
After that I could slowly build the architecture that I've discussed above.
Until the Compose for destkop hits the stable release, I have enough time to do all the logic that's needed in the layers below.
I have looked over your code, and with my previous experience, I understand it quite a bit, but its been more than 12 years since I wrote a swing desktop app, and don't quite know how to even start it..
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
So I'm quite sure, that you don't need help to create your GUIIn the last 4 years, I've been a Kotlin developer ...
.
Well, that sounds nice, but I think you'll do yourself a favor and checkout/research, what linuxcnc interfaces offer.What I would like to achieve is smth like this:
An onion style architecture where I have ...
There are different interfaces with different usecase ...
You should consider LC a blackbox with which you can communicate through api-layer
.
CUA (specs written by IBM in the 80th - but stil valid for GUI) says:The philosophy that I've used for my QtPyVcp app, was that I don't wanna see on the screen, information that is not relevant or buttons that don't make sense to be clicked when the machine is that specific state.
Eg:
- it doesn't make sense to have spindle stop button when spindle is not running, and it doesn't make sense to have fwd/rev buttons when the spindle is running.
- it doesn't make sense to see DTG info when you're the machine is not executing anything in mdi or program running....and so on.
When you never can enter a state, where you can use a button, that should be hidden. When the current application state prohibits the use of a button, but user can enter another state, where the button usage makes sense, then that button should be disabled but visible.
Imagine a business desktop, where every application depends on certain grants. So if a user does not have the right to execute an application, that action-button/menuentry/whatever should not be visible.
But Spindle on/off is no subject to justify hiding a button. Opposed to that, it may make sense, if there are milling specific buttons and your app runs in lathe mode than hiding the milling buttons is valid.
.
That's simply not true. May be you know octoprint - in that case it may be true. With a 3D-printer you don't have to fix workpieces and measure dimensions of workpiece ...Excepting the services layer, all the code so far is cross platform, so the controller app could run on any OS including android tablets.
Controller application is tied to hardware-controlling modules which are synchronized in realtime. It makes absolutely no sense, to port the controller to a system, that has no possibility of realtime data exchange with hardware controllers.
Therefore I designed my app to use the api of LC like any other UI from LC. That means, that every control is tied to send a command to LC and all display elements show content received from LC.
If you don't understand the connection layer to LC from my app, may be its easier to have a look at Qtpyvcp or other gui applications. All use the same communiction channels
.
Actually no.Can you help me get your app running?
Communication-layer to LC is broken and I have to find out, what happened and how can I come back to a working communication.
Please Log in or Create an account to join the conversation.
You obviously know more about this topic than me because you already have invested some time to understand how all that works.
I do understand the connection layer to LC inside your app, I am just not sure how to get the app running.
Regarding the communication layer not working, I would assume there is an issue in the BufferDescriptor.java where there is all the mapping of offset & size for reading from the linuxcnc's shared memory. Perhaps the library has introduced/removed something that has messed up the offsets. This is just my wild guess, I am sure you know a lot more about this.
I don't need help with writing my custom UI or with kotlin, once I manage to have your app running so that I can have the communication established with linuxcnc, I think I should be ok.
I already have a VCP written on top of QtPyVcp, but even if I'm happy with the visual result, I don't like the python code at all. So the coder part of me is not happy to invest more in growing that app.
Do you know by chance when was the last time it was working? Perhaps I could see the history of the relevant files in the library and find out what's new in the present
or at least pull an older version of master on which you know it was working, try with that one, then compare.
Please Log in or Create an account to join the conversation.
No, its not the BufferDescriptor.Regarding the communication layer not working, I would assume there is an issue in the BufferDescriptor.java where there is all the mapping of offset
A wrong BufferDescriptor leads to wrong values, but not to errors in communication.
Currently the native call does not return a valid address from backend.
I can't work around that in my app - I have to fix backend or use another way to access status ...
.
According to github it was about a year ago.Do you know by chance when was the last time it was working?
I already had the same idea and tried to use LC releases back until 2.7 - the problem is, in the last year, operating system and external libs have been changed a lot, so no release is compilable at current state of debian stable (which I use as os).
The only thing I can say at the moment: hold on, I'm working on research and find a way to get my app working again.
Please Log in or Create an account to join the conversation.
New access layer is much cleaner now.
Stil have a build problem, but I'm on the way
Please Log in or Create an account to join the conversation.