Skip to content
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

Added a plugin manager and 2 plugins #71

Merged
merged 19 commits into from
Jul 7, 2018
Merged

Added a plugin manager and 2 plugins #71

merged 19 commits into from
Jul 7, 2018

Conversation

dimtass
Copy link
Contributor

@dimtass dimtass commented Jul 3, 2018

Hi all.
I've added a plugin manager and two plugins.
The plugin manager adds the plugins in a QVBoxLayout (m_pluginsLayout) on the main form.
The supported plugins are listed on the Plugins menu, so every new plugin should be added there.
The plugin manager is quite simple and the only requirement is that the plugins have a QFrame with a Plugin class instance. The frame shouldn't occupy many pixels height on the main window, therefore if many settings or controls are needed then you can use another dialog. The macro and netproxy plugins do exactly that.

You can add as many instances of the plugin you like using the plugin menu. Therefore, every plugin must have an unload option to remove itself from the main window.

The plugin manager supports the following functions

  • Get the incoming data from the serial port and send them to the plugins
  • Send data from the plugins to the serial port
  • Before send the data to the serial port allows the plugins to edit the data

For the last one, I'll also add another plugin soon that applies regex to replace data in the outstream.

The plugings are written in a way that you can load multiple instances as long as they don't use the same resources.

The macro plugin allows the user to store macros and it's pretty straight forward. Just press the macro button and the string is sent.
The netproxy plugin allows you to bind a UDP socket and run a TCP server (simultaneously) and proxy data from/to both sides. Therefore, you can send/receive data to the serial port from a UDP/TCP client. I believe there are many people that will find this very convenient and useful.

I've tried to keep things very simple and not add much code in the main code. Therefore in the main window there are only a few new lines of code and everything else is done in the plugin manager.

Dimitris

@cyc1ingsir cyc1ingsir self-requested a review July 7, 2018 10:38
@cyc1ingsir
Copy link
Collaborator

This looks good to me. I can't test thoroughly though. At least it runs on my local machine.
It would be really cool to have proper unit tests (being heavily influenced by JUnit at the moment).
So I'm going to merge your PR and will prepare the 0.50.0 release within the next days.

@cyc1ingsir cyc1ingsir merged commit fc75688 into neundorf:master Jul 7, 2018
Copy link
Collaborator

@cyc1ingsir cyc1ingsir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@dimtass
Copy link
Contributor Author

dimtass commented Jul 7, 2018

Hi Meinhard,
thanks for the merge. When are you going to release the 0.50? I was wondering if I got the time to add a tx/rx counter plugin with a lap-like functionality that is used in timers and also a regex plugin to substitute data on the fly during tx/rx.

I don't have unit tests, but I've profiled with vagrant and tried to find any issues.
If you have any suggestion for unit tests I'm open to discussion and adapt a well tested workflow, as my domain is the the very low embedded stuff and also linux kernel development and therefore I have a different workflow.

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.

None yet

2 participants