Printer FriendlyEmail Article Link

Spirent TestCenter - Automation: How to print sequencer's current command

Environment/Versions
STC Native API
Answer
This is an example on how to print the current Sequencer's command in TCL, the same logic can be applied to Python:
 
set lastCommand ""
while {
    set curSeqState [stc::get sequencer1 -state]
    if {$curSeqState == "PAUSE" || $curSeqState == "IDLE"} {
        break
    }
    set CurrentCommand [stc::get sequencer1 -CurrentCommand]
    if {$lastCommand != $CurrentCommand} {
        puts $CurrentCommand
        set lastCommand $CurrentCommand
    }
    after 1000
}

Product : Automation,Spirent TestCenter