question

haidongc avatar image
haidongc asked JohnKedzia edited

Parse Spirent TestCenter tcl response to structured data

Could someone help me parse any Spirent tcl response to a structured data. The example is like: -parent system1 -Name {Admin: SetRawArchivesDirCommand 1} -Dir {C:\Users\Administrator\Desktop\4_39\CTL2} -Archives testcenter-4.39.2996-1.1.tgz -State COMPLETED -Status {SetRawArchivesDirCommand completed successfully} -StartTime 1392065476.54943 -EndTime 1392065476.55334 -ElapsedTime 4 -ProgressDisplayCounter true -ProgressStepsCount 1 -ProgressCurrentStep 1 -ProgressCurrentStepName {} -ProgressMaxValue 0 -ProgressCurrentValue 0 -ProgressCancelled false -Active true
Spirent TestCenter (STC)tcl script
1 comment
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

LarryVeilleux avatar image LarryVeilleux ♦♦ commented ·
Just making sure if this was a Spirent TestCenter question, I tagged it as such.
0 Likes 0 ·
udaya avatar image
udaya answered haidongc commented
Yes, though it is NOT structured, you can try something like following: % array set dummy [stc::get project1] % parray dummy; Output will be in structured fashion !!
4 comments
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

haidongc avatar image haidongc commented ·
I could not use [stc::get project1] in this case. The response is from stc's perform command.
0 Likes 0 ·
udaya avatar image udaya haidongc commented ·
No, I don't mean of using "stc::get project". I was just trying to show an example. The output can be stored in an array and later fetched. Please refer the sample in commandline. Same coding you can try in iTest and try with table response map!!
0 Likes 0 ·
udaya avatar image udaya commented ·
![alt text][1] [1]: /storage/temp/3885-newx.jpg
0 Likes 0 ·
newx.jpg (59.2 KiB)
haidongc avatar image haidongc commented ·
This works like a champ! Thank you so much for your help!
0 Likes 0 ·
limengjie avatar image
limengjie answered haidongc commented
there is no build-in response map for such kinds of response. So it is necessary for you to add response map by yourself.
1 comment
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

haidongc avatar image haidongc commented ·
I also tried to create a response map. But I could not get it done to output a structure's data, for this particular case. Do you have an existing response map? Thanks.
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.