Jump to content

vPilot plugin development/debugging


Luke Kolin
 Share

Recommended Posts

I've started work on a vPilot plugin (thanks for the info Ross), but I don't think it's being invoked properly. I've got some debug code in it, but it doesn't appear in the vPilot console. How do I know if my plugin is being loaded successfully?

 

Cheers!

 

Luke

... I spawn hundreds of children a day. They are daemons because they are easier to kill. The first four remain stubbornly alive despite my (and their) best efforts.

... Normal in my household makes you a member of a visible minority.

Link to comment
Share on other sites

If you add the /dbgwin command line argument, the debug console will open immediately on startup, and you should then see an entry in the console indicating that vPilot has found your plugin. Looks like this:

 

[13:48:39.237] Found plugin: Metacraft.Vatsim.Vpilot.TestPlugin.TestPlugin

 

When you say you've got some debug code in it, what do you mean?

Developer: vPilot, VRC, vSTARS, vERAM, VAT-Spy

Senior Controller, Boston Virtual ARTCC

Link to comment
Share on other sites

If you add the /dbgwin command line argument, the debug console will open immediately on startup, and you should then see an entry in the console indicating that vPilot has found your plugin. When you say you've got some debug code in it, what do you mean?

 

You're awesome! I'm calling PostDebugMessage() on the Broker. Looks like it's not loading the plugin; it's built using .NET 4.0 but it claims it's a "new runtime". I'll back it down to 2.0 and see what happens.

 

Cheers!

 

Luke

... I spawn hundreds of children a day. They are daemons because they are easier to kill. The first four remain stubbornly alive despite my (and their) best efforts.

... Normal in my household makes you a member of a visible minority.

Link to comment
Share on other sites

Drat - can't do Memory mapped files in .NET 2.0.

 

Luke

... I spawn hundreds of children a day. They are daemons because they are easier to kill. The first four remain stubbornly alive despite my (and their) best efforts.

... Normal in my household makes you a member of a visible minority.

Link to comment
Share on other sites

In preparation for the AFV launch, I have had to move to targetting .net 4.7. The main vPilot [Mod - Happy Thoughts]embly now targets 4.7, but the plugins [Mod - Happy Thoughts]embly still targets 3.5. Would this allow you to use your 4.0 version? You can try it out by downloading 2.3.0 which is in the Beta updates channel. Let me know if it still complains and I can update the plugins [Mod - Happy Thoughts]embly to 4.7 as well.

Developer: vPilot, VRC, vSTARS, vERAM, VAT-Spy

Senior Controller, Boston Virtual ARTCC

Link to comment
Share on other sites

I'll need at least 4.0 - that seems to be where a lot of stuff got added. It's not a big deal (I managed to do it via P/Invoke) but I think targeting 4.0 would be a lot better than 3.5, unless it breaks something that already exists.

 

Cheers!

 

Luke

... I spawn hundreds of children a day. They are daemons because they are easier to kill. The first four remain stubbornly alive despite my (and their) best efforts.

... Normal in my household makes you a member of a visible minority.

Link to comment
Share on other sites

Give 2.3.0 a try, that should let you load a plugin built on the 4.0 runtime.

 

Works like a charm. Thanks!

 

Luke

... I spawn hundreds of children a day. They are daemons because they are easier to kill. The first four remain stubbornly alive despite my (and their) best efforts.

... Normal in my household makes you a member of a visible minority.

Link to comment
Share on other sites

  • 3 weeks later...

Hi Ross,

 

maybe this is the same issue that the Prosim Utils vpilot plugin is not working any more with v 2.4.0? The plugin does not get called during startup when I deleted the config.xml.

 

with /dbgwin the error states:

[21:08:13.433] Error loading plugin from file "C:\Users\Markus\AppData\Local\vPilot\Plugins\PSU.vPilot2.dll": Could not load file or [Mod - Happy Thoughts]embly 'file:///C:\Users\Markus\AppData\Local\vPilot\Plugins\PSU.vPilot2.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)

Edited by Guest

greetings from Vienna / Austria

Markus Ristl

My Homecockpit

Link to comment
Share on other sites

  • 2 weeks later...

Hi Ross,

 

I think I found the issue:

 

Make a right click - properties to the PSU.vPilot2.dll

file.php?id=23694&t=1

Check for the Security details. For me it was enabled and the "Unblock" button was shown.

As soon as I clicked it, and restarted vpilot, it was working again.

For doublecheck, I removed the .xml config file from the vpilot plugins sub folder and reentered the connections again.

It also worked.

greetings from Vienna / Austria

Markus Ristl

My Homecockpit

Link to comment
Share on other sites

  • 1 year later...

To anyone developing plugins for vPilot, be advised that I will be making a breaking change in the next release. I am moving all my personal software development projects out of the Metacraft namespace, to keep a clear separation between my work projects (Metacraft) and my personal projects, such as VATSIM applications.

Starting with the next release of vPilot, which will be v2.8, the namespace will be RossCarlson.Vatsim.Vpilot. This means that plugins that depend on the former namespace, Metacraft.Vatsim.Vpilot will no longer load. You'll need to recompile your plugin using the new namespace. Nothing else about the plugin API will be changing.

I tried to come up with an elegant way to be able to load plugins from both the old and the new namespaces, but I couldn't find a way that didn't incur technical debt, so I decided to just do a clean break.

Developer: vPilot, VRC, vSTARS, vERAM, VAT-Spy

Senior Controller, Boston Virtual ARTCC

Link to comment
Share on other sites

  • 8 months later...

Hello,

 

i am working on a vPilot Plugin.
It works fine so far.
But i get no infor from ATIS Received.

Quote

            _broker.SelcalAlertReceived += Broker_SelcalAlertReceived;
            _broker.AtisReceived += Broker_AtisReceived;

When a SELCAL comes in i get it, but when/how can i get anything for the ATIS ?

Thanks
Matthias

Link to comment
Share on other sites

1 hour ago, Matthias Roschk 821976 said:

how can i get anything for the ATIS ?

This isn't clear from the minimal documentation I've done for the plugins, but you need to request an ATIS through the broker before it'll raise the AtisReceived event.

Developer: vPilot, VRC, vSTARS, vERAM, VAT-Spy

Senior Controller, Boston Virtual ARTCC

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...