Printer FriendlyEmail Article Link

Spirent TestCenter-Automation: How to subscribe and display Rx stream results via Tcl script

Environment/Versions

Spirent TestCenter

Answer

Step1: Subscribe to RxStreamSummaryResults to for stream results using below code

set hResultDataSet [stc::subscribe -Parent $hProject \
      -configType StreamBlock \
      -resultType RxStreamSummaryResults \
      -filenameprefix RxStreamSummaryResults \
      -viewAttributeList [list MinLatency MaxLatency AvgLatency L1BitRate DroppedFrameCount FrameCount FrameRate]]

Step2: Printing stream results on console

puts "\n\nTest Results" 
  foreach hResults [stc::get $hResultDataSet -ResultHandleList] {
  # Place the results into an array for easy access. 
    array set aResults [stc::get $hResults]       
 
  # Use the -Comp32 (32 bit filter used to identify the string identifier). Same number as String Id. in Preview information. 
    puts "\t$hResults\tStream Id: $aResults(-Comp32)\tMin: $aResults(-MinLatency)\tMax: $aResults(-MaxLatency)\tAvg: $aResults(-AvgLatency)"
  }


Product : L2-3,Automation,API,Spirent TestCenter