8 iuwbanalyzer::stoprecordingandwaitfortrace, Iuwbanalyzer::stoprecordingandwaitfortrace – Teledyne LeCroy UWBTracer Automation Manual User Manual
Page 18

LeCroy
UWBTracer Automation API Reference Manual
Manual Version 3.02
14
3.1.8 IUwbAnalyzer::StopRecordingAndWaitForTrace
HRESULT StopRecordingAndWaitForTrace
( [out, retval] IDispatch** trace );
Stops recording started by the StartRecording method and returns the pointer to the trace object
created.
Parameters
trace
Address of a pointer to the
UwbTrace
object primary interface
Return values
ANALYZERCOMERROR_UNABLESTOPRECORDING
error when stopping recording
Remarks
This method stops recording started by the
StartRecording
method and does not return until the
recording is uploaded and a trace object related to this recording is created. In contrast, for
StopRecording,
no event is issued when recording is stopped.
Example
WSH:
Set Analyzer = WScript.CreateObject("CATC.UWBAnalyzer")
CurrentDir = Left(WScript.ScriptFullName, InstrRev(WScript.ScriptFullName, "\"))
'
'In the code below, we perform 4 sequential recordings and
'save the traces recorded in the current folder.
'
For I = 1 To 4
'Tell the LeCroy UWB analyzer to start recording using the 'my.rec' recording options file
in the current folder.
Analyzer.StartRecording ( CurrentDir & "my.rec" )
'Imitation of some activity - just sleep for 3 seconds.
'Some real traffic generation code might be put here.
WScript.Sleep 3000
'Tell the analyzer to stop recording and give the trace acquired.
Set Trace = Analyzer.StopRecordingAndWaitForTrace
'Save the trace in the current folder.
Trace.Save CurrentDir & "uwb_seqrec_data" & CStr(I) & ".uwb"
Next
'Release the analyzer.
Set Analyzer = Nothing