‎05-02-2018 04:39 AM
Hello,
i am calling the Teststand API under C# for a custom OPUI.
After closing a sequence file the Unload is executed.
How can i check with c# if the Unload is "still running" or "already completed"?
I need to create something like a loop to wait for the unload is finished.
Is there a flag to do this?
Thanks
‎05-02-2018 08:06 AM
In the sourcecode i execute ApplicationMgr.CloseSequenceFile to close the file. This triggers the unload sequence.
Additional question: I see that the ShutDownCancelled Event is also executed by TestStand after the file is closed. Why this?
BR
‎05-02-2018 08:44 AM - edited ‎05-02-2018 08:44 AM
Have you checked if the unload callback fires the EndExecution uiMsg?
‎05-02-2018 09:09 AM
No, not yet.
When should this EndExecution occur? After the UnloadSequence is finished?
I am also not sure where to check for this event as after running the ApplicationMgr.CloseSequenceFile i get the ShutDownCancelled Event.
‎05-02-2018 09:20 AM
@OnlyOne wrote:
[...]
When should this EndExecution occur? After the UnloadSequence is finished?
[...]
That's the point of EndExecution. Note it fires for each execution... so you have to filter.
From the TestStand help:
Shutting Down the Engine
The first pass ends when you receive the UIMsg_ShutDownComplete or UIMsg_ShutDownCancelled UIMessage. If you receive the UIMsg_ShutDownComplete event, continue with pass two. If you receive the UIMsg_ShutDownCancelled event instead, resume the normal operation of the application.
That means that the engine is still working fully supporting all uiMessages.
‎05-02-2018 09:33 AM
I only want to close the loaded sequence and wait for Unload is finished.
I dont want to shutdown/exit the c#-application.
‎05-02-2018 09:35 AM
Sorry, i was confused by your mentioning about the ShutDownCancelled event. Are you sure that your UI doesn't initiate a shutdown when unloading the sequence file?