03-28-2017 06:10 AM - edited 03-28-2017 06:14 AM
HI
I have the following Task:
Consuming sequnces of a sequence file "like" a function in a c# application.
There is an example shipped with teststand that shows how to do this.
..\Examples\TestStand API\Executing Sequences Using API\DotNet.
Pretty clear that calling it like a c# function will not work of course.
But using just the two API functions Engine.NewExecution() and Execution.WaitForEndEx() are a great deal to approach it.
This is working pretty well for a single sequence.
My problem is that my SequnceFile is a sequnce library with Open, ReadOrWrite and Close architecture. That means "Open" will create IO handles stored in FileGlobals. "Read/Write" consuming them and "Close" finally release the handles.
After the api-function call Execution.WaitForEndEx(). the contents of my file global values are gone and are not accessible for next "calls".
I thought about threads. But theads are inside an execution....
.. no idea to achive it.
Regards
Juergen
04-07-2017 04:25 AM
Hello Jürgen,
one idea would be to start an execution of a master sequence which spawns subthreads. That way you'll be able to manage your FileGlobals approach.
What are the handles holding, Files/HW handles? If that's the case, you could open the handles in the process model once using a process model callback (e.g. process setup) and access them from your client sequence file.
Kind regards