Mixing SDK code and PDK code in a single solution

SDK supports Prepar3D’s philosophy of an open development architecture and encourages third parties to bring new innovations with improved add-ons and training content.
Post Reply
flyboy7798
Posts: 37
Joined: Thu Jul 20, 2017 7:15 pm

Mixing SDK code and PDK code in a single solution

Post by flyboy7798 »

I've been looking through the 4.4 SDK and it occurred to me to ask if it was possible to mix non-PDK gauge classes and PDK classes in a single Visual Studio solution. For example, you have a standard SDK gauge using simconnect that handles unsafe gear position warning and it needs to play a sound as an audible warning. Would it be possible to set an Lvar in the SDK based code and a PDK based sound gauge code picks up the Lvar value and plays (or stops playing) the sound?
User avatar
Beau Hollis
Lockheed Martin
Posts: 2452
Joined: Wed Oct 06, 2010 3:25 pm

Re: Mixing SDK code and PDK code in a single solution

Post by Beau Hollis »

Yes. The HMD sample, and radar sample both provide C: variables to connect xml and/or scaleform gauges with pdk services. There is a panels services in the pdk which gives you access to capabilities you get form gauges.h in a c-gauge project. There is also a function in gauges.h for getting a pointer to the PDK service provider so that you can request and use PDK services from your existing gauge projects.

Thanks
Beau Hollis
Prepar3D Software Architect
flyboy7798
Posts: 37
Joined: Thu Jul 20, 2017 7:15 pm

Re: Mixing SDK code and PDK code in a single solution

Post by flyboy7798 »

Thank you for the fast answer!
JB3DG
Posts: 609
Joined: Mon Jan 09, 2012 6:44 pm

Re: Mixing SDK code and PDK code in a single solution

Post by JB3DG »

I use the PDK in gauges all the time.
Jonathan Bleeker
Milviz systems dev

Formerly known as Naruto-kun
flyboy7798
Posts: 37
Joined: Thu Jul 20, 2017 7:15 pm

Re: Mixing SDK code and PDK code in a single solution

Post by flyboy7798 »

Yea, I'm a year and a half on a development project and I'm still learning! <laughing> When I understand what can be done it's helps speed things up. I do miss std::shared_ptr and unique_ptr, but CComPtr will do when I can't use them.
Post Reply