Printer FriendlyEmail Article Link

Spirent TestCenter-Automation: How do we unsubscribe to results using JAVA API?

Environment/Versions
  • Spirent TestCenter
  • Automation - JAVA

 

Answer

Below is the code:
#Subscribe to realtime results
                        System.out.println("Subscribe to results");
                        sm.clear();
                        sm.put("Parent", hProject);
                        sm.put("ConfigType", "StreamBlock");
                        sm.put("ResultType", "RxStreamSummaryResults");
                        sm.put("filenameprefix", "RX_Stream_Results");
                        String Resultdatasethandle1 = stc.Subscribe(sm); ####### this will return a resultdataset handle.
#We can use unsubscribe function or ResultDataSetUnsubscribe API to results as below:
                        Stc.unsubscribe(Resultdatasethandle1); ### We can use Stc.Perform(“ ResultDataSetUnsubscribe”, “ResultDataSet”= Resultdatasethandle1);
                        Stc.Apply()


Product : Spirent TestCenter,Automation,API,Spirent TestCenter