Sign in to follow this  
Guest cmontans

How to reach panel parameters

Recommended Posts

Hello all, Is it possible to reach gauge and panel parameters from simconnect?I mean these parameters that can be defined for each panel:Gauge Parameters (G:)Local Parameters (L:)Thanks, Carlos.

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

>Is it possible to reach gauge and panel parameters from>simconnect?>>I mean these parameters that can be defined for each panel:>>Gauge Parameters (G:)>Local Parameters (L:)If you are writing an FS DLL or Gauge to use SimConnect you can use the assorted C-interface panels routines like lookup_var and trigger_key_event, via the same PANELS structure defined in GAUGES.H. You need to define an export variable called Panels, thus:EXTERN_C __declspec(dllexport) PANELS *Panels = NULL;Then, when SimConnect loads your Module it will fill ths pointer in for you.Obviously this cannot be used with external EXE clients of SimConnect.In general though, all the gauges.h defined token variables and key events have Sim Var and SimEvent equivalents.I don't know anything about "local parameters".RegardsPete

Share this post


Link to post
Share on other sites

Hi Pete, Thanks for your answer! I will give you an example and maybe you can help me out.If I develop a panel for a military transponder with more modes and codes than a civil one. How do I know from an external EXE simconnect client which mode and code I have selected on the new panel?Is it possible?Thanks!Carlos

Share this post


Link to post
Share on other sites

>If I develop a panel for a military transponder with more>modes and codes than a civil one. How do I know from an>external EXE simconnect client which mode and code I have>selected on the new panel?>>Is it possible?Well, this is one of the things folks used FSUIPC offsets for. They would ask me to reserve some offsets into which, from the panel, they could write data. This could then be read by an external program interfacing to FSUIPC or WideFS. In fact of course it works like shared memory -- both ends can read or write.Of course this can also be done with FSUIPC4. But for a 100% SimConnect solution you would instead use the "Client Data" facilities. Check out all the SimConnect functions for creating, writing and reading Client Data, starting of course with "SimConnect_CreateClientData".I have not used these facilities myself, but they were specifically requested during FSX development for applications such as those you describe. I do have on my list, to do at some stage in the future, an item to support optional Client Data mapping to FSUIPC offsets for compatibility with older, FSUIPC-interfacing programs too.RegardsPete

Share this post


Link to post
Share on other sites

Thanks Pete,I taked a look at that and it seemed to me that was something like a "shared memory" that could be used by multiple simconnect clients.So, as I understand, is it possible to read/write this data from a XML/C Gauge? How shall I do it?Carlos.

Share this post


Link to post
Share on other sites

From a C gauge no problem. Just use use simconnect in the gauge code and use the correct functions here.Will look like MapClientDataNameToID(), some AddToClientDataDataDefinition() and periodically calls to RequestClientData() to get data from the shared area.From a XML gauge it may be more difficult. AFAIK there is now way to use simconnect from XML. You could bypass this by creating a FSX module that links to both simconnect and gauge system. Arne Bartels posted code examples on how to transfer data between C and XML gauge. Look at his trafficradarxml gauge, it is opensource and should be in the library.

Share this post


Link to post
Share on other sites

>I taked a look at that and it seemed to me that was something>like a "shared memory" that could be used by multiple>simconnect clients.Yes, exactly. Just like FSUIPC Offsets -- in fact it is to replace theis use of FSUIPC that the facility was added.>So, as I understand, is it possible to read/write this data>from a XML/C Gauge? How shall I do it?I don't know about XML. Can you write a Simconnect client in XML? Seems rather implausible. In C it is a matter of using SimConnect. Your gauge would be a SimConnect client.RegardsPete

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this