• 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.

SimConnect_TransmitClientEvent SimConnect_SetDataOnSimObject

Messages
19
Country
spain
In the learning phase.
I am able to read events generated by SimConnect and process them.
But I am not able to raise an event with the change of a variable and send it to SimConnect.
I have read and reread documentation, but my clumsiness I am not able to see how it is done.
I am working with the Input Event example from the FSX SDK, to learn how to generate an event based on the value of a C ++ variable that reflects the state of the BREAK button.
I read the hardware status of my push button through the COM port, reflecting it in the variable Button_Sate (0/1).
My problem is: How to "modify" the example of "shift + ctrl + u" for my variable.
Obviously it is not to change the "shift + ctrl + u" by Button_Sate. After reading I understand that definitions are necessary, but I do not know which ones.
Use in void testInputEvents ():
SimConnect_TransmitClientEvent
SimConnect_SetDataOnSimObject using SIMCONNECT_OBJECT_ID_USER.
Can someone wise give light in this forest where I am?
Thanks.

EDIT POST:
In this other example: ThrottleControl.cpp
// Link the events to some keyboard keys
hr = SimConnect_MapInputEventToClientEvent (hSimConnect, INPUT_KEYS, "A", EVENT_A);
It is defined as INPUT_KEYS, "A",
In the SDK definition it says: "The SimConnect_MapInputEventToClientEvent function is used to connect input events (such as keystrokes, joystick or mouse movements) with the sending of appropriate event notifications."
How should I do to bind it to my Button_Sate variable. ??
Thanks.
 
Last edited:
Back
Top