10-24-2023 05:02 AM
Hi,
I have built a custom OI and allow between 1 to 4 UUTs to be selected. Selecting multiple UUTs causes Parallel model to be selected (extensive use of API in this OI) etc etc.
I'd like to be able to specify which Socket execution to display in the Sequenceview control. I know I could connect a combo box to the ExecutionViewMgr but the TS combo box does not fit with the visual theme of the rest of my interface. Instead, I'd like to be able to select based on socket index.
My thinking was to obtain references to each execution then obtain the socket index of that execution then display that particular execution (which I know how to do).
Is this feasible? More suitable alternatives?
Cheers folks
Chris
Solved! Go to Solution.
10-25-2023 06:24 PM
The default Execution property object won't contain the socket index. It only has the following:
Execution.Result
Execution.ErrorReported
Execution.TypeMask
Execution._AdapterInfo
and I see no Execution API methods that return it. You can eventually get to the sequence context if you use Execution.GetThread(..)....and then to the UUT container, you can get the Socket Index but I don't recommend it.
It would be better to just pass the Root sequence context and then you can get the Socket Index from UUT container from Locals.
Locals.UUT.TestSocketIndex
10-25-2023 06:30 PM
And to clarify what your goal is: Are you trying to update the view to the current execution while it is running or change the view when it is idle?
10-30-2023 04:22 AM
Hi,
Thank you for your reply. Firstly my objective is to view different sockets to be viewed during execution.
I'm now wondering if sending a UI message from each socket execution might be a better way forward.
Cheers
Chris
10-30-2023 10:58 AM
If your ApplicationMgr is subscribed to the UIMessageEvent then you can watch for UIMessageCodes.UIMsg_ModelState_BeginTesting or UIMessageCodes.UIMsg_ModelState_Identified
When you get either of these messages the e.uiMsg.ActiveXData will be the SequenceContext and the e.uiMsg.NumericData will be the socket index.
10-31-2023 03:33 PM
ok. That part all works as expected however then using the UI MSG ActiveX data to obtain the Execution property and then use that to set the Execution Property of the ExecutionMgr
Doesn't throw any error but the SequenceView Ctrl which is connected to the Execution goes blank. Switching Socket using a TS Combo box bound to the Execution list does work.
Can an ExecutionMgr Execution property be changed without re-binding the visible controls ?
10-31-2023 03:44 PM - edited 10-31-2023 03:57 PM
Are you doing something like this:
// show the execution
axExecutionViewMgr.Execution = execution;
Please note that if execution is null then by design the axExecutionViewMgr will show a blank view.
I don't use a ConnectExecutionList to a visible control, so perhaps that is the problem.
Can you get your desired execution and iterate the combo box list to find the match and if you find the match then programmatically set the combo box item, which in turn will set the view of the axExecutionViewMgr?
11-02-2023 04:05 AM
I'm doing something exactly like this.
I figured out that the part I was missing was to call the ExecutionMgr.Refresh method after registering the execution. Once I do this the Sequence view shows the correct execution.
Thanks for your pointers towards the UIMessageEvents, that was the key!
Cheers
Chris