P3D v4 SimConnect or PDK, advantages and disadvantages

Hi guys,

for a new development project (in process-dll in C++) we will have to decide on whether we go down the SimConnect or PDK path.

While I am quite ok with SimConnect and it's workings, PDK is completely new to me, so skimming through it's documentation looks like it's going to be quite a steep and also time consuming learning curve. So, apart from the fact, that the PDK-approach is only working for projects designed to be in-process dlls and automatically excludes FSX support, are there any cristal clear advantages in using PDK over SimConnect? Is there anything that cannot be done with SimConnect but is possible with PDK?

I would be especially interested in the possibility of driving custom animations on specific instances of SimObjects using PDK without relying on global LVARs. To me, this now would be a, if not the only major reason to make the switch to PDK.

So, I am thankful for your opinions on the matter.

Greets, Benny
 
Hi Benny.

Advantages of both are well described in overview of PDK and SimConnect.
I think that PDK gives much more power for SimObjects creation, custom systems simulations and interconnections. Look at the Weapon system, that is based on PDK capabilities. Guess that PDK was developed to expand sim with such complicated systems. I'm not an expert in LVARs and XML. PDK gives you possibilities to create Properties and Events for SimObjects and Simulations instances. After registration this variables can be used like Simulation Variables in gauges (including XML), animations, scenario scripts and missions. By the way, you can call SimConnect functions inside PDK dll, when you need it.
 
Thank you for your thoughts...will take them into consideration and guess I will try to make myself comfortable with the PDK.

Greets, Benny
 
@Prepar3DGuy
hello
I'll make my first ever C++ PDK project tomorrow and I was reading some SDK docs.
in my project, I need to create some variables that can be accessed through LUA scripts
my question is: should I create a simobject instance to create those custom variables ?
are they registered as L vars or C vars?

and one last question: I want also to include a simconnect app (C#), is the event system used by simconnect linked to the PDK ? as i want to pass some information to my module through events
thnx in advance :)
 
Hi RED COOL.
As I know, in PDK you can register custom Properties and Events callback for that properites which can be accessed via scripts and SimConnect clients for:
1. SimObjects (using ISimObjectManager for a class of SimObjects or using IBaseObject interface for the instance of existing SimObject that you have access);
2. Your ISimulation implementation (using ISimObjectManager). It must be registered for some SimObject.
3. Panels using IPanelSystem.

Why not to use SimConnect inside you PDK module?
Custom services that registered using Pdk (separate modules) have access to each other using IQueryService interface of IPdk reference they have received on DLLStart. You can make data exchange with external process (application) using SimConnect or your own methods.
 
i found out that working with ISimobject is a bit hard (beginner perspective) more complex than simconnect :p
for the unique Guid needed, how can i get it ? i found that the PDK sample uses some kind of numbers with x stuff (0x56...) ?

and what about the IUknown how do i get them


and one last confusing question , when is DLLStop called ? at P3D close or right after DLLStart ?
 
It's not hard but powerfull.
For GUID (Global Unique IDentifier) generation use GUIDGenerator.exe in SDK folder or from the Visual Studio menu Tools->Create GUID :p
About IUknown and other stuff look for COM (Component Object Model) documentation and tutorials 1, 2. Actually you need to know the basics of interfaces, services query, smart pointers and reference counters.

P3D call DLLStart when system that look for addon.xml files load you dll module. DLLStop will be called by P3D when it's clossing (after you select exit and before P3D actually closed, to be more exact when PDK system are unloading). Your dll module will be in memory all the time P3D is running.
 
Last edited:
For the slow dive into PDK with examples I recommend (by increasing complexity): DataHarvester -> CustomPDKObjects -> CameraPDK -> SimpleCar -> SimpleAirplane -> Engine -> RadarAltimeter ...
First three of them are not SimObjects but global plugins.
 
thank you i'll take a look into them
my project needs the DLL for one simple task is creating variables and setting them but i see it gets deeper so I'll enjoy learning to expand my P3D knowledge :)
 
Hi guys,

for a new development project (in process-dll in C++) we will have to decide on whether we go down the SimConnect or PDK path.

While I am quite ok with SimConnect and it's workings, PDK is completely new to me, so skimming through it's documentation looks like it's going to be quite a steep and also time consuming learning curve. So, apart from the fact, that the PDK-approach is only working for projects designed to be in-process dlls and automatically excludes FSX support, are there any cristal clear advantages in using PDK over SimConnect? Is there anything that cannot be done with SimConnect but is possible with PDK?

I would be especially interested in the possibility of driving custom animations on specific instances of SimObjects using PDK without relying on global LVARs. To me, this now would be a, if not the only major reason to make the switch to PDK.

So, I am thankful for your opinions on the matter.

Greets, Benny
it depend on what the target purpose.
PDK is more wider capabilities than SimConnect.
 
@Prepar3DGuy
I tried to make my own simobject using the learning center docs and the simple car sample, i get many errors and every time i fix some (copy-paste :p) others get out
Is there a way to create Lvars or C vars and set them without making a simobject ? just a general module?

if not, can you show me how to make a simple simobject class, i can't get mine to work at all
first time with C++, i got used to C# but i'm doing good with it :)
thnx in advance

EDIT: every forum is saying the PDK is very complex while i only need two functions : Variables creation/Read/Write and Event Send/Receive and the rest can be done using simconnect
 
Last edited:
Top