06-20-2011 11:09 AM
Hi All,
I'd like to ask you about the method/approach how to check is the engine on remote computer executing the sequence. I need this information because I'd like to edit the sequence file remotely (just updgrading the version nuber). Apart from the checking the engine I'd like to know how to check is the sequence file locked.
Cheers,
K.
06-20-2011 01:21 PM - edited 06-20-2011 01:22 PM
APIs exist as follows:
engine.IsRemote
seqFile.AsPropertyObjectFile().Locked
Hope this helps,
-Doug
06-21-2011 05:11 AM
Shall I expect that if the sequence file is used by the engine (executing) is it automatically locked for editing?
06-21-2011 06:12 AM
I think I need more help guys.
What I want to do is to increase the version number of the sequence file. The sequence file is on the remote computer. The engine is on the remote computer as well.
I'm going to prepare the application in LV. So far I prepared one, but it utilises my LOCAL engine. It works but the down side of that apps is I don't know the status of the sequence file; I mean is it being executed by REMOTE engine. So, I thought that the best apps will be if I call (from my local app) the REMOTE engine and call some methods which will check is the engince not testing now, if yes lock the file for editing, make the change, release the lock and let the engine know that it can use the file.
Could you help me wit the proper APIs?
My first application is attached.
06-21-2011 09:56 AM
By "remote engine", I'm assuming you are referring to an engine that was created as the result of a sequence call step that is configured to execute on a remote host. To get a reference to that remote engine, you must pass it back as a parameter to a sequence call step.
You can check if a sequence file is executing by using the SequenceFile.IsExecuting property, but keep in mind that depending on your system, a sequence file can begin executing at any time if there are other executing sequences that call into the sequence file. Also, this property is accurate only if you get the reference to the sequence file from the engine via Engine.GetSequenceFileEx. If you use the PropertyObjectFile API to read and write sequence files as in your VI, you are not actually modifying the in-memory copy of the sequence file that the TestStand engine uses to execute.
The PropertyObjectFile.IsLocked property is used to determine if a file is locked and does not correspond to execution. You have to explicitly lock a sequence file using the Advanced tab of the Sequence File Properties dialog box.
06-21-2011 11:43 AM
You can increase the version number using the following call:
RunState.SequenceFile.AsPropertyObjectFile().IncChangeCount(),
However, saving this change requires this call:
RunState.SequenceFile.Save("")
Save requires the Development environment. You may want to look at an alternate way of doing this if using the Development environment is not an option.
06-21-2011 11:46 AM
Saying REMOTE enging I ment second instance of the engine which is on the remote, not local computer. Nothing is configured to call the engine on remote computer. I was thinking of using the engine which is on remote computer to perform the increasing sequence file version number operation instead usin the engine on my computer and address the remote sequence file via UNC convention from my local PC on which the TS is installed as well.
Is ther any chance I can call the REMOTE engine?
K.
06-21-2011 11:56 AM
snowpunter,
I sucessfull increased the version number. Youcan hav a look here:
Right now I'm working on how to do this remotelly.
K.