NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Callback parameters

TestStand 2.0.1

I am looking for a listing of the valid parameters for sequence file callbacks such as SequenceFileLoad and SequenceFilePostStepRuntimeError. I noticed in the example file

Examples\Callbacks\PostStepRuntimeErrorCallback\ErrorHandlerExample.seq

there are 2 parameters (Step and Result) that get passed to SequenceFilePostStepRuntimeError. Where are these parameters defined and are there more than 2 parameters that TestStand passes when it calls the callback?

I searched through the User and Programmer Manual that came with TestStand, but I couldn't locate more than just the name and descriptions of the callbacks. Am I missing something here?

Thanks,
Peter
0 Kudos
Message 1 of 7
(4,165 Views)
Hi Peter,

Thats as good as it gets.

The only why to identfiy all the default parameters is to open the process model sequencefiles and inspect the parameters for each callback.

There is nothing to stop you modifying the default process sequencefiles and adding additional parameters to the callbacks.

Place any modified files in the \User\.. folders and use different filenames so as not stop the examples working.

You can then set your sequencefiles to use your modified process files in the properties of the sequencefile.

I maybe wrong but I still dont think Teststand 3.0 documentation lists the default parameters of the callbacks.

Regards
Ray Farmer
Regards
Ray Farmer
0 Kudos
Message 2 of 7
(4,165 Views)
Peter -
You should not add additional parameters to Engine callbacks. The engine only passes the expected parameters that are hardcoded into the engine implementation. The purpose of engine callback parameters are to assist you in accessing the important information that the callbacks are trying to address. That is why the SequenceFileLoad callback does not have any parameters, but the SequenceFilePostResultListEntry callback allows you to process result by passing a Step and Result parameter. In TestStand 3.0 the callback has a DiscardResult out parameter, which allows you to instruct TestStand to not add the result to the Locals.ResultList array. In most cases the sequence context of the callback allows you to access almost all other information i
n the execution.

Scott Richardson
Scott Richardson
https://testeract.com
0 Kudos
Message 3 of 7
(4,165 Views)
Scott,

Yes, I suspected that the parameters for the engine callbacks are not to be changed. But since I can't change them, can I at least know what they are? I guess I'm just looking for some sort of API spec doc - a list of all the callbacks and their purpose, along with types and descriptions of all the parameters.

Perhaps someone who worked this portion of the TestStand engine occasionally reads these discussions. 😉

Peter
0 Kudos
Message 4 of 7
(4,165 Views)
Peter -
The TestStand 2.x User Manual page 6-22 discusses the purpose of each engine callback. In TestStand 3.0, the Reference Manual page 10-6 has similar information. Other than that TestStand does not have any additional details on the engine callbacks. In most step callbacks the parameters are the step inself and possibly a result property. If you have specific questions about a callback and its parameters, you are welcome to write.

Scott Richardson
Scott Richardson
https://testeract.com
0 Kudos
Message 5 of 7
(4,165 Views)
Scott,

Thanks for the pointer, but as indicated in my original post I had already checked the manual and found the names of all the callbacks. It would really be nice to know the parameters of all the callbacks, but a list of the parameters and their descriptions for the following callbacks would be most helpful:

SequenceFilePostStepRuntimeError
SequenceFileLoad
SequenceFileUnload
SequenceFilePostStep
SequenceFilePostInteractive

Thanks,
Peter
0 Kudos
Message 6 of 7
(4,165 Views)
Peter -
The SequenceFileLoad and SequenceFileUnload callbacks are called when the sequence file is loaded or unloaded. These callbacks do not have any parameters. If necessary you can access the RunState.SequenceFile property object in the context of the execution.

The SequenceFilePostInteractive callback is called after an interactive execution completes. I think in TestStand 2.x the SequenceFilePostInteractive had a step parameter, but it is not useful, so in TestStand 3.0, there are no parameters.

The SequenceFilePostStepRuntimeError and SequenceFilePostStep execute after each step runs. The runtime error callback runs only if a runtime error occurs for a step, while the post step always runs. They both pass
the Step property and Result property of the step that executed.

Scott Richardson
Scott Richardson
https://testeract.com
0 Kudos
Message 7 of 7
(4,165 Views)