Jump to content
The simFlight Network Forums

Recommended Posts

Posted

Hi,

I am looking for the best way to determine when FSUIPC is not connected so that my program can stop polling FSUIPC and avoid appearing locked up. I see 0x337E listed as a possible answer for this, but evidently I would need to compensate for the pauses while loading aircraft and such blocks FSUIPC cpu time. Is there a more efficient way?

Thanks!

James

Posted

I am looking for the best way to determine when FSUIPC is not connected so that my program can stop polling FSUIPC and avoid appearing locked up. I see 0x337E listed as a possible answer for this, but evidently I would need to compensate for the pauses while loading aircraft and such blocks FSUIPC cpu time. Is there a more efficient way?

When you say "not connected", what do you mean? If you are connected -- i.e. if the FSUIPC_Reads and Writes work, then you are "connected". Or are you talking about WideClient being connected to WideServer?

0x337E was added for the latter purpose, and you can also of course read values like the FS timer at 0x0310. There's nothing else really.

Regards,

Pete

Posted

Hi Pete,

What I am trying to do is avoid my program appearing to lockup while (I'm assuming) it continues to try to read/write values to WideFS after FS has been closed. I would simply like to be able to stop the interaction of my program and WideFS when FS closes or locks up, then recognise if/when FS starts up again, like Project Magenta seems to do. Wideclient detects when Wideserver is not available, I am assuming because of a Windsock event, and I am interested in doing the same.

Regards,

James

Posted

Pete,

After re-reading your response, it dawned on me the probably the best way to accomplish what I want is to simply check for failed reads/writes. What would you consider a resonable threshold for determining Wideclient is not connected to Wideserver, 2 or 3 tries, 10 tries?

James

Posted

After re-reading your response, it dawned on me the probably the best way to accomplish what I want is to simply check for failed reads/writes. What would you consider a resonable threshold for determining Wideclient is not connected to Wideserver, 2 or 3 tries, 10 tries?

Sorry, that is so system dependent. Trial and error perhaps?

Regards,

Pete

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
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.