The online racing simulator
#1 - Makao
Detecting the end of qualification
Is it possible to detect it? I tried with IS_RES, but in qual it detects any update in the results, so it happens after first lap. I am trying to make an auto restart system. I tried with sleep after receiving QualMins from IS_RST, but application loses connection to the inSim with such a long time.
I ran a qual session through InSimSniffer and I couldn't see any reliable way to detect when a qualifying session ends. I think a timer might be the way to go here.

Sleep pauses the whole program thread, so your app would have been unable to respond to the keep-alive packet, which is the probable reason it timed out. A better alternative would be to use a timer, set to elapse after the number of qualfying minutes are up. You don't mention which program environment you are using, but pretty much every language library has some sort of timer functionality.
Beware though, the qualification time can change during qualification. Make sure to stop and restart or modify the timer as necessary, a STA is sent if the qualifying time changes.

Better than a timer might be to store a timestamp when the qualifying starts and check whether the qualifying has ended or not by comparing the timestamp on every ping TINY.
Make sure that the final IS_RES is sent for each player, this is how I detect it in H2H.

(Side note, this may only work with 1 lap qualifying; I don't remember if the H2H system used this method back when I allowed 20 minute free for all qualifying.)

Worst case scenario you add a button for your Administrator's to press.

EDIT- I now read that you tried using IS_RES. Sorry; you could try just adding a timer to your application?

Edit2:


bool UpdateIsQualifingFinished(const bool bFirstUpdate)
{
static unsigned long ulStartQualiTime;
if (true == bFirstUpdate)
{
ulStartQualiTime = timeGetTime()
}

unsigned long ulTimeNow = timeGetTime();
if (ulTimeNow - ulStartQualiTime > 60.0f * QUALIFY_MINUTES)
{
return true; //Qualifying is done.
}

return false;
}

#5 - Makao
Thanks a lot guys, I'll try to make to work.

FGED GREDG RDFGDR GSFDG