December 15, 200520 yr Commercial Member 3 Questions (which may lead to more hahahaha)1. Is the proper way to communicate with FSUIPC to open the connection, communicate, and close the connection during each draw cycle? Or can you open the connection once, and leave it open for the duration of the gauge's lifetime, then close the connection when the gauge is unloaded?2. Can the communication happen during each frame redraw? Or do you need to slow it down so you aren't pounding away at the FSUIPC at whatever your framerate is?3. Finally, I saw an example on this forum (link shown below) that uses FSUIPC_Open from inside a gauge, but the FSUIPC SDK documentation says that you should use FSUIPC_Open2 from inside a gauge. Which method of opening the connection should be used from inside a gauge?http://forums.avsim.net/dcboard.php?az=sho...ing_type=search
December 16, 200520 yr 1. You should leave FSUIPC open over the life of the gauge. Issue FSUIPC_Open2 in PANEL_SERVICE_CONNECT_TO_WINDOW; issue FSUIPC_Close in PANEL_SERVICE_DISCONNECT.2. You can certainly issue FSUIPC_Read and FSUIPC_Write on each frame or gauge update. The FSUIPC_Open2 access method is as efficient as FS's own variable lookup procedures.3. As noted above, use FSUIPC_Open2 for gauges and FS modules. You won't get FSUIPC accreditation for a gauge or module which uses the FSUIPC_Open procedure. The code snippet that Arne posted in the thread you quote was old at the time and probably dated to before Pete's having created the FSUIPC_Open2 procedure.Doug
Create an account or sign in to comment