1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

P3D v3 Modules DLL questions

Discussion in 'Gauges' started by Ravamar, 12 Sep 2017.

  1. Ravamar

    Ravamar

    Joined:
    16 Sep 2016
    Messages:
    86
    Country:
    italy
    I'm performing some research on C:VARS using a heavily modified version of the Cabin Comfort sample. What I'm trying to understand is if it would be a good idea to implement something similar to an INS "brain" using a module DLL. The GPS "subsystem" has been implemented in a very similar way, right?

    Is there any way to specify runtime parameters? Or do I have to use a configuration file (something like a .properties or .INI) instead?

    Also is there any "standard" tool to locate and patch the dll.xml file, to be used during DLL install process?

    P.S.: Never define a C:VAR name having a leading number because it will NOT work, I wasted a lot of hours before realizing this :(

    Thank you very much in advance!
    Marco
     
  2. taguilo

    taguilo Resource contributor

    Joined:
    20 Oct 2006
    Messages:
    1,479
    Country:
    argentina
    Hi Marco,

    Have you checked XMLTools? It might be useful for what you are looking for.

    Classes included can be called either from XML/C++ gauges.

    Tom
     
  3. Ravamar

    Ravamar

    Joined:
    16 Sep 2016
    Messages:
    86
    Country:
    italy
    Hi Tom!

    I'm trying to implement the INS INU (the black box normally installed in the avionics bay) as a module DLL, and so far I've been quite successful.
    In which areas would XMLTools help me?
    Please note I'm not talking about the existing CIVA INS, it's a new project, and I'm just trying to understand if it would be a good idea to use module DLL.

    Thank you,
    Marco
     
  4. taguilo

    taguilo Resource contributor

    Joined:
    20 Oct 2006
    Messages:
    1,479
    Country:
    argentina
    Noted, I supposed that, sorry.

    I guess then your doubts are regarding the use of a C++ gauge or a .dll module loaded through DLL.XML right?

    If so, then I will stay on the gauge side; much easier and a simple solution too.
    Besides you don't need to worry about module install issues from end users.

    Tom
     
  5. ddawson

    ddawson Resource contributor

    Joined:
    27 Sep 2006
    Messages:
    645
    Country:
    canada
    I am inclined to agree with Tom.
    The only reason you would produce a module would be if you planned to produce two or more xml gauges to act as a front end for it (or you planned that others would produce such gauges.)

    Doug
     
  6. Ravamar

    Ravamar

    Joined:
    16 Sep 2016
    Messages:
    86
    Country:
    italy
    Hi Tom and Doug,
    No problem at all, no need to be sorry!
    A dll module loaded through DLL.XML, correct
    I agree but since for me a DLL module world is new, it represents something very interesting, independently from how complex it might be. Also, as I wrote, at the moment I'm just doing some experiments, nothing has been decided yet. And, BTW, it's not that complex.
    Yes, Doug, what you described is exactly one of the reasons I'm looking at it. What I originally thought is that if CIVA (the INU part) had been developed as a DLL module, it would have been much simpler to support my or somebody else front end gauges. Believe me (but I'm sure you both well know), it's not easy to embed a "calculation engine" within a gauge and have other gauges access it.
    Moving the brain part to a separate module, which is not tied to a gauge, would, as far as I currently can see it, make sense.

    Marco
     
  7. Heretic

    Heretic Resource contributor

    Joined:
    1 Feb 2007
    Messages:
    5,317
    Country:
    germany
    From a bugfixing and compatibility perspective, XML is much more preferable since everybody can edit it and checking a fix is just an aircraft reload away.
    And keep in mind that all dlls will also have to be compiled in both 32 and 64 bit format nowadays if you want to maximise your target audience.


    I'd say the only reason to use a module is a requirement for simulator interactions at framerate (such as for a custom flight model or FBW system). For anything else that's not framerate-critical, there's XMLTools.
     
  8. taguilo

    taguilo Resource contributor

    Joined:
    20 Oct 2006
    Messages:
    1,479
    Country:
    argentina
    Marco,
    That is indeed simple. XML gauges/visual models use LVars, and C++ gauges can manage those pretty well, so communication between a C++ gauge and one to many XML gauges is very possible.

    EXCEPT, of course, that LVars do not support strings and/or array-style manipulation.

    XMLVars class in XMLTools allows, via C :vars , to manage string data and array-style loops. If that is what you are looking for then yes, the only way is to develop a custom module or perhaps check XMLVars class and see if it could give you a solution to your needs.

    Tom
     

Share This Page