• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

Question and Data Structure Summary

Messages
15
Country
china
Hi everybody:

I had seriously read the manual of SDK, I found that the use of the Message cycle on data collection.

There are 16 kinds of data structures

as follow:

SIMCONNECT_RECV_OPEN structure.

SIMCONNECT_RECV_EVENT structure.

SIMCONNECT_RECV_EVENT_FILENAME structure.

SIMCONNECT_RECV_EVENT_OBJECT_ADDREMOVE structure.

SIMCONNECT_RECV_EVENT_FRAME structure.

SIMCONNECT_RECV_SIMOBJECT_DATA structure.

SIMCONNECT_RECV_SIMOBJECT_DATA_BYTYPE structure.

SIMCONNECT_RECV_EXCEPTION structure.

SIMCONNECT_RECV_WEATHER_OBSERVATION structure.

....

So different Message of data to different data structures.

In the sample of SDK, it call SimConnect_CallDispatch in circular loop for data your desired .

I want to say whetherthe corresponding to different data structures to obtain data after the event can be requested,Rather than call switch() in the circular loop.
:rolleyes:
 
Hello,

The structures are primarily used to map the data (I think of them as a C type union really) to make some sense of the bits returned by SimConnect where one pointer fits all, thus needs to be cast to the right data structure to be usable, hence the case statement. Case statements are typically pretty efficient if they can use a lookup table. The mapping only occurs in the receive event, because simconnect is asynchronous in nature so you can't readily make a call, and get the data back immediately when the call returns. You can fake this with threading of course to make it a sort of synchronous, yet that perhaps defeats the purpose.

The data model is that of event driven, so you make the request, and at some point, and in another part of your code, you get a response or an error.

Can you clarify the problem/question?

Thanks,

Etienne
 
Last edited:
Thank you very much for your help,Etienne

I understood the how simconnect was running.It's Similar to the establishment of a memory-mapped between client and server.

I had developped a progam to record data (exam: alitude,longitude,latitude,pitch,bank ...ect.)in dat file:cool:
 
Back
Top