Printer FriendlyEmail Article Link

Spirent TestCenter-Automation: How to create and subscribe Dynamic Result View (DRV) using TCL API?

Environment/Versions
  • Spirent TestCenter
  • All Versions.
Answer

Below API are used for creating DRV:

#Creating DRV results
set drv [stc::create "DynamicResultView" \
        -under $hproject \
        -ResultViewOwner "USER" \
        ]

set eep [stc::create "ExternalEquationResultProperty" -under $drv -ExpressionType "MATH" -Equation {StreamBlock.TxFrameCount - StreamBlock.RxFrameCount} -StandardGroupingDefinition {} -DependedCounters {StreamBlock.TxFrameCount StreamBlock.RxFrameCount} -PropertyName ]

set prh [stc::create "PresentationResultQuery" \
        -under $drv \
        -SelectProperties {StreamBlock.Name StreamBlock.RxBitRate StreamBlock.RxFrameRate StreamBlock.RxFrameCount StreamBlock.FrameConfig.ethernet:EthernetII.vlans.Vlan.1.id StreamBlock.FrameConfig.ethernet:EthernetII.1.dstMac Custom.CustomProperty} \
       -WhereConditions {} \
        -GroupByProperties {} \
        -SortBy {} \
        -DisableAutoGrouping "TRUE" \
        -FromObjects $hproject \
    -LimitSize 100    ]


Below APIs are used for subscribing DRV results:

puts "Subscribing to drv results\n"
stc::perform SubscribeDynamicResultViewCommand -DynamicResultView $drv
stc::sleep 10
stc::perform UpdateDynamicResultViewCommand -DynamicResultView $drv


Product : Automation,API,Spirent TestCenter