Spirent TestCenter Sample Building Blocks #506
Quali-Community
started this conversation in
Useful Tips & Guides
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
The attached archive contains several functions that demonstrate the use of the STC library.
There is also a test ('Debug.tstest') the calls the functions.
In the 'setup' folder there are several functions that enable the user to update packet fields. For example, to update the Source MAC address of a stream in a TCC file during a test, the user can use 'f_TestCenter_UpdateStreamBlockSourceMAC'.
f_TestCenter_UpdateStreamBlockSourceMAC is being used in the Debug test so you can see there how to use it.
All functions use objects that are defined in a TCC file. the objects can be retrieved during design time using the 'Show Obj Tree' function. after Loading a TCC file using the 'Load Configuration File' function, the 'Show Obj Tree' function can show you the objects that are defined in the TCC file. Each Object has several attributes with different values and also several children.
Please review the implementation of 'f_TestCenter_UpdateStreamBlockSourceMAC':
'Name to Object Reference' is a DLL function that knows how to find an object reference according to its name. For Example, if in the GUI you have a stream block and its name is 'streamblock 1-1' using this function you'll be able to search for the object reference of that stream block.
After we have the object reference, we can use it to get all the children and attribute of the object. To do this we, we use the 'Get Description' Method.
Using this approach we can drill down in the object tree until we reach to the Object we would like to change and find the attribute we would like to change (SA MAC in this case).
Feel free to post questions to this thread and I'll answer them
TestCenter.rar
Alon Saggie (Alon.S) - 11/14/2012 05:10 AM
· 2756 ·
Beta Was this translation helpful? Give feedback.
All reactions