Mixing SDK code and PDK code in a single solution

flyboy7798
Posts: 37
Joined: Thu Jul 20, 2017 7:15 pm

Mixing SDK code and PDK code in a single solution

Postby flyboy7798 » Sun Dec 02, 2018 11:41 pm

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: 2116
Joined: Wed Oct 06, 2010 3:25 pm

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

Postby Beau Hollis » Mon Dec 03, 2018 4:42 am

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

Postby flyboy7798 » Mon Dec 03, 2018 9:17 pm

Thank you for the fast answer!

JB3DG
Posts: 472
Joined: Mon Jan 09, 2012 6:44 pm

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

Postby JB3DG » Tue Dec 04, 2018 8:02 am

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

Postby flyboy7798 » Fri Dec 07, 2018 11:12 pm

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.


Return to “Software Development Kit (SDK) Questions”

Who is online

Users browsing this forum: No registered users and 21 guests