TunerStudio Plugin Support

For discussion of Phil Tobin's Tuner Studio software (Only about the tuning software itself, not about how to tune or firmware features)

Moderator: LT401Vette

TunerStudio Plugin Support

Postby LT401Vette » Thu Apr 05, 2012 11:21 pm

As of TunerStudio 1.34 Plugin support is activated.
This is a component of TunerStudio that has been largely underlying for several years, finally turned on and ready for initial use. (Thank gslendar for the nagging ) :)

For anyone interesting in making plugins that can access settings, runtime data, UI widgets or expression evaluation, check it out.

This can be extended much further in upcoming betas, but I will take a pause here for people to try the API and see what more is needed for what ever ideas you may have.

I have posted Java Doc, API Jar file and a basic Example plugin to demonstrate API usage at:
http://tunerstudio.com/index.php/manual ... io-plugins
Phil Tobin
EFI Analytics, helping to simplify EFI
Next Generation tuning software.
Supporting all MegaSquirt versions and firmwares.
http://www.TunerStudio.com
http://www.efiAnalytics.com/MegaLogViewer/
Support the firmware running your engine:
http://www.msextra.com/doc/donations.html
User avatar
LT401Vette
Super MS/Extra'er
 
Posts: 8218
Joined: Sat Jul 16, 2005 8:07 am
Location: Moorseville, NC

Re: TunerStudio Plugin Support

Postby Greg G » Fri Apr 06, 2012 1:39 am

Woohoo! Off we go :)
1996 Mazda MX-5 1.6L NA6/ Mazdaspeed M45 SC/ BSP AW Intercooler/ Maruha F-cams/ 425cc RX-8 injectors/ DIYPNP

MS2/Extra test mule :)
Greg G
Experienced MS/Extra'er
 
Posts: 311
Joined: Thu Mar 10, 2011 11:33 pm

Re: TunerStudio Plugin Support

Postby gslender » Fri Apr 06, 2012 1:55 am

Phil,

Awesome news. Thanks so much.

I'm getting a Error loading Plugin: ApplicationPlugin not defined in Manifest for Jar when loading the TunerStudioPluginAPI.jar file ???

G
Mazda MX5 + MS3 Pro
User avatar
gslender
Super MS/Extra'er
 
Posts: 1072
Joined: Fri Sep 16, 2011 5:29 am
Location: Brisbane, Australia

Re: TunerStudio Plugin Support

Postby gslender » Fri Apr 06, 2012 1:59 am

ahhh, loaded the ExampleTunerStudioPlugin.jar and all is well.... cool.
Mazda MX5 + MS3 Pro
User avatar
gslender
Super MS/Extra'er
 
Posts: 1072
Joined: Fri Sep 16, 2011 5:29 am
Location: Brisbane, Australia

Re: TunerStudio Plugin Support

Postby LT401Vette » Fri Apr 06, 2012 5:10 am

Yep, that jar is the API jar, not a plugin.

It looks like I forgot to put out the source for the examout last night.
I'll get that out and put more documentation on getring started.

You primaily just need to have a class in you jar that implements ApplicationPlugin then add that entry to the manifest.
Phil Tobin
EFI Analytics, helping to simplify EFI
Next Generation tuning software.
Supporting all MegaSquirt versions and firmwares.
http://www.TunerStudio.com
http://www.efiAnalytics.com/MegaLogViewer/
Support the firmware running your engine:
http://www.msextra.com/doc/donations.html
User avatar
LT401Vette
Super MS/Extra'er
 
Posts: 8218
Joined: Sat Jul 16, 2005 8:07 am
Location: Moorseville, NC

Re: TunerStudio Plugin Support

Postby LT401Vette » Fri Apr 06, 2012 6:21 am

Ok, a bit more documentation and the source code is out now at:
http://tunerstudio.com/index.php/manual ... io-plugins
Phil Tobin
EFI Analytics, helping to simplify EFI
Next Generation tuning software.
Supporting all MegaSquirt versions and firmwares.
http://www.TunerStudio.com
http://www.efiAnalytics.com/MegaLogViewer/
Support the firmware running your engine:
http://www.msextra.com/doc/donations.html
User avatar
LT401Vette
Super MS/Extra'er
 
Posts: 8218
Joined: Sat Jul 16, 2005 8:07 am
Location: Moorseville, NC

Re: TunerStudio Plugin Support

Postby gslender » Fri Apr 06, 2012 6:25 am

LT401Vette wrote:Ok, a bit more documentation and the source code is out now at:
http://tunerstudio.com/index.php/manual ... io-plugins


Ok, source is great!

Also, if you can outline how you'd expect this to be used with Eclipse that would be great.... (or do you need Netbeans?) ie how do I test and load a plugin - is there any cmd script or fast method to launch TS with new plugin loaded and launched? or would it be a case of creating the jar each time and putting in the right location for TS to reload after restarting? Oh boy I hope not :shock:

G
Mazda MX5 + MS3 Pro
User avatar
gslender
Super MS/Extra'er
 
Posts: 1072
Joined: Fri Sep 16, 2011 5:29 am
Location: Brisbane, Australia

Re: TunerStudio Plugin Support

Postby LT401Vette » Fri Apr 06, 2012 6:49 am

I think added stuff to cover that a bit better now..

I use Eclipse for Android, but prefer Netbeans and use it for most other development. I have included just the source or the whole Netbeans project on that link..

When you install the plugin the first time, you need to restart TunerStudio for it to show up on the menu, but after that they are hot swapable. If you use the menus for "Add or Update a Plugin", it will reload the classes and the new plug will be displayed when you re open the plugin dialog.

Step through debugging would be challenging... You really need to have your plugin run without TunerStudio and abstract the Plugin calls.
For this what would work well is a set of stubbed out service providers to emulate a Plugin container... That would probably help great deal.
Phil Tobin
EFI Analytics, helping to simplify EFI
Next Generation tuning software.
Supporting all MegaSquirt versions and firmwares.
http://www.TunerStudio.com
http://www.efiAnalytics.com/MegaLogViewer/
Support the firmware running your engine:
http://www.msextra.com/doc/donations.html
User avatar
LT401Vette
Super MS/Extra'er
 
Posts: 8218
Joined: Sat Jul 16, 2005 8:07 am
Location: Moorseville, NC

Re: TunerStudio Plugin Support

Postby gslender » Fri Apr 06, 2012 7:00 am

LT401Vette wrote:Step through debugging would be challenging... You really need to have your plugin run without TunerStudio and abstract the Plugin calls.
For this what would work well is a set of stubbed out service providers to emulate a Plugin container... That would probably help great deal.


If you can explain how to launch TS without using the TunerStudio.exe then I can just use the Debug run mode and step through the PluginCode at a break point. As I don't need to (and can't) see into TS source that will be fine. I just need to know how to launch a TS session from the jar and I'm good to then build and play in the plugin world - as you state, if I can compile new code and TS will reload the reflected class files when using the "Add or Update a Plugin" menu then I'm set.

Does that sound right?

G
Mazda MX5 + MS3 Pro
User avatar
gslender
Super MS/Extra'er
 
Posts: 1072
Joined: Fri Sep 16, 2011 5:29 am
Location: Brisbane, Australia

Re: TunerStudio Plugin Support

Postby Zaphod » Fri Apr 06, 2012 7:00 am

What kind of plugins are we going to see in the next time with this new functionality?
--------------------------------
fun is not a straight line

Image

Sven
http://www.mx-5club-sachsen.de
http://miata.cardomain.com/id/svenmx5
NB-1998-1,6-Garrett T25 HGP Turbo Stage I
Zaphod
Experienced MS/Extra'er
 
Posts: 304
Joined: Thu Aug 14, 2008 11:38 pm
Location: Germany

Re: TunerStudio Plugin Support

Postby LT401Vette » Fri Apr 06, 2012 7:03 am

Yep...

It takes nothing special to launch TS directly from the jar.

Just make sure the working directory is set to the TunerStudioMS.jar folder, and launch it...

java -jar TunerStudioMS.jar
Phil Tobin
EFI Analytics, helping to simplify EFI
Next Generation tuning software.
Supporting all MegaSquirt versions and firmwares.
http://www.TunerStudio.com
http://www.efiAnalytics.com/MegaLogViewer/
Support the firmware running your engine:
http://www.msextra.com/doc/donations.html
User avatar
LT401Vette
Super MS/Extra'er
 
Posts: 8218
Joined: Sat Jul 16, 2005 8:07 am
Location: Moorseville, NC

Re: TunerStudio Plugin Support

Postby LT401Vette » Fri Apr 06, 2012 7:14 am

What kind of plugins are we going to see in the next time with this new functionality?


That is up to any ones imagination..

Grant might be able to tell some of the things he has been itching to try.

I am thinking I will start writing more functionality as plugins myself when it suits. They keep the code encapsulated and contained. You can add new features without rolling out a new version of TunerStudio, so if there is a problem with it, you can just fix the plugin or back it out without needing to change the whole TunerStudio.

There are 3 types of plugins from a display point:
PERSISTENT_DIALOG - A Dialog Container launches a plugin and gives it access to to the controllers in the open project.
DIALOG_WIDGET = This is a widget that can be placed in a dialog or panel in the ini file.
TAB_PANEL - A plugin that adds a new Tab on the main window.

In this release only the Dialog based plugin container PERSISTENT_DIALOG type is supported. That is mostly because it will take code changes through some other core parts of TS to support the other models, I do not want to make those changes this late in the beta cycle. After this beta is rolled to stable, then those will be added in the next beta cycle.

But where the primary point is to be able to read runtime values or read/update settings, I could envision using a TAB_PANEL plugin to do something like have an MP3 Player built into TunerStudio :)
Phil Tobin
EFI Analytics, helping to simplify EFI
Next Generation tuning software.
Supporting all MegaSquirt versions and firmwares.
http://www.TunerStudio.com
http://www.efiAnalytics.com/MegaLogViewer/
Support the firmware running your engine:
http://www.msextra.com/doc/donations.html
User avatar
LT401Vette
Super MS/Extra'er
 
Posts: 8218
Joined: Sat Jul 16, 2005 8:07 am
Location: Moorseville, NC

Re: TunerStudio Plugin Support

Postby jsmcortina » Fri Apr 06, 2012 7:27 am

What would it take to make a plugin that runs the OS-specific firmware loader binary?

James
I can supply, repair or upgrade Megasquirts in UK.

My Success story: viewtopic.php?f=104&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
jsmcortina
Site Admin
 
Posts: 27812
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK

Re: TunerStudio Plugin Support

Postby racingmini_mtl » Fri Apr 06, 2012 7:37 am

That's also something I'd like to know.

Jean
jbperf.com Main site . . . . . . . . . . . . . . . . . . . . . . jbperf.com Forum
Image
racingmini_mtl
Super MS/Extra'er
 
Posts: 6435
Joined: Sun May 02, 2004 6:51 am
Location: Quebec, Canada

Re: TunerStudio Plugin Support

Postby LT401Vette » Fri Apr 06, 2012 7:45 am

I don't think a plugin is the ideal way to go for a firmware loader.
You could do it, because once you are writing a plugin you can do anything you can do in Java including launching native apps, but I suppose it could be better than launching them from the command line until a firmware loader is implemented in TunerStudio.

If the firmware loaders were bundled with the TunerStudio install, detecting what OS it is running on and launching the correct one isn't much trouble.
Phil Tobin
EFI Analytics, helping to simplify EFI
Next Generation tuning software.
Supporting all MegaSquirt versions and firmwares.
http://www.TunerStudio.com
http://www.efiAnalytics.com/MegaLogViewer/
Support the firmware running your engine:
http://www.msextra.com/doc/donations.html
User avatar
LT401Vette
Super MS/Extra'er
 
Posts: 8218
Joined: Sat Jul 16, 2005 8:07 am
Location: Moorseville, NC

Re: TunerStudio Plugin Support

Postby 93white3400z » Fri Apr 06, 2012 8:39 am

Phil, since you're the one that know the limitation of the current plugins implementation, and you also know what you have on your todo list, would you mind giving us a few hints on what plugin could be interesting / feasible right now ? Thanks :D
MSDroid (Android App) for MegaSquirt available for free!
Image

Like MSDroid on Facebook
-----------------------------------------
1993 Chevrolet Cavalier Z24
3400 Turbocharged Intercooled
MS3 v3.57+MS3X
93white3400z
Master MS/Extra'er
 
Posts: 654
Joined: Mon Aug 25, 2008 11:37 pm
Location: Montreal, Quebec

Re: TunerStudio Plugin Support

Postby gslender » Fri Apr 06, 2012 6:08 pm

Created my first plugin! :yeah!:

Nothing worthy of sharing but I can confirm the compile, jar build and TS reload process works. I've still not worked out how to debug, so that may prove a problem in the future, but for now I can create an Eclipse project that produces a Jar in TS directory that I can update the plugin and the changes are immediate - so that's a start! 8)

Phil, would love to work on a way to enable self-standing debug, as without it, it will limit how far folks can take the plugin concept. The issue for me is that there is no simple way to launch TS from within the Plugin classpath so that environments like Eclipse can step through at correct break points. I need to figure out how to add TS as an Eclipse project that can be launched from the Run dialog - not impossible, just haven't been able to make it work yet :RTFM:
Mazda MX5 + MS3 Pro
User avatar
gslender
Super MS/Extra'er
 
Posts: 1072
Joined: Fri Sep 16, 2011 5:29 am
Location: Brisbane, Australia

Re: TunerStudio Plugin Support

Postby gslender » Fri Apr 06, 2012 6:19 pm

LT401Vette wrote:Yep...

It takes nothing special to launch TS directly from the jar.

Just make sure the working directory is set to the TunerStudioMS.jar folder, and launch it...

java -jar TunerStudioMS.jar


It doesn't work.
The serial drivers didn't load, but it continues past that.

I'm unsure why, but it hangs after that... and doesn't proceed past loading the project.

My thoughts would be to have a -developer switch whereby it's behaviour is more controlled and allows you to specify the project and so forth.
Mazda MX5 + MS3 Pro
User avatar
gslender
Super MS/Extra'er
 
Posts: 1072
Joined: Fri Sep 16, 2011 5:29 am
Location: Brisbane, Australia

Re: TunerStudio Plugin Support

Postby LT401Vette » Fri Apr 06, 2012 6:55 pm

It might work if you install the rxtx drivers to the jre.

That is the normal way, but I package them with the app dir.

The working dir will still need to be set to the install dir though as there are so many reference files needed to load a project.
Phil Tobin
EFI Analytics, helping to simplify EFI
Next Generation tuning software.
Supporting all MegaSquirt versions and firmwares.
http://www.TunerStudio.com
http://www.efiAnalytics.com/MegaLogViewer/
Support the firmware running your engine:
http://www.msextra.com/doc/donations.html
User avatar
LT401Vette
Super MS/Extra'er
 
Posts: 8218
Joined: Sat Jul 16, 2005 8:07 am
Location: Moorseville, NC

Re: TunerStudio Plugin Support

Postby gslender » Fri Apr 06, 2012 7:53 pm

LT401Vette wrote:It might work if you install the rxtx drivers to the jre.

That is the normal way, but I package them with the app dir.

The working dir will still need to be set to the install dir though as there are so many reference files needed to load a project.


Could you perhaps just confirm that launching the jar independently works... as I can't seem to make it work - ie double-click launching the JAR doesn't work, and based on your suggested "java -jar TunerStudioMS.jar" you can't launch 1.34 of TS that way at least on Windows 7.

G
Mazda MX5 + MS3 Pro
User avatar
gslender
Super MS/Extra'er
 
Posts: 1072
Joined: Fri Sep 16, 2011 5:29 am
Location: Brisbane, Australia

Next

Return to Tuner Studio

Who is online

Users browsing this forum: No registered users and 3 guests