IUsbRecOptions Dual Interface
The IUsbRecOptions interface is the primary interface for the IBRecOption object. It derives from the IRecOptions interface that implements the common functionality for all Teledyne LeCroy Analyzers.
IRecOptions::Load
HRESULT Load (
[in] BSTR ro_file_name );
Loads recording options from the specified file.
|
Parameters |
|
|---|---|
|
ro_file_name |
String providing the full pathname to the recording options file. |
|
Return values |
|
|---|---|
|
ANALYZERCOMERROR_UNABLEOPENFILE |
Unable to open file. |
Example: WSH
CurrentDir = Left(WScript.ScriptFullName, InstrRev(WScript.ScriptFullName, "\"))
Set Analyzer = WScript.CreateObject("CATC.USBTracer")
Set RecOptions = Analyzer.GetRecordingOptions
RecOptions.Load( CurrentDir & "Input\rec_options.rec" )
IRecOptions::Save
HRESULT Save (
[in] BSTR ro_file_name );
Saves recording options into the specified file.
|
Parameters |
|
|---|---|
|
ro_file_name |
String providing the full pathname to the recording options file. |
|
Return values |
|
|---|---|
|
ANALYZERCOMERROR_UNABLEOPENFILE |
Unable to open file. |
Remarks
If the specified file does not exist, it is created. If it exists, it is overwritten.
Example: WSH
CurrentDir = Left(WScript.ScriptFullName, InstrRev(WScript.ScriptFullName, "\"))
Set Analyzer = WScript.CreateObject("CATC.USBTracer")
Set RecOptions = Analyzer.GetRecordingOptions
' Do the changes of recording options here
RecOptions.Save( CurrentDir & "Input\rec_options.rec" )
IRecOptions::SetRecMode
HRESULT SetRecMode (
[in] ERecModes rec_mode );
Sets the recording mode.
|
Parameters |
|
||||||||
|---|---|---|---|---|---|---|---|---|---|
|
rec_mode |
Enumerated value providing the mode to set.
|
||||||||
|
Return values |
|
|---|---|
|
E_INVALIDARG |
Invalid recording mode was specified. |
Remarks
The default setting is snapshot recording mode.
Example: WSH
CurrentDir = Left(WScript.ScriptFullName, InstrRev(WScript.ScriptFullName, "\"))
Set Analyzer = WScript.CreateObject("CATC.USBTracer")
Set RecOptions = Analyzer.GetRecordingOptions
RecOptions.SetRecMode 2 ' Event trigger
IRecOptions::SetBufferSize
HRESULT SetBufferSize (
[in] long buffer_size );
Sets the size of buffer to record.
|
Parameters |
|
|---|---|
|
buffer_size |
Buffer size in bytes |
|
Return values |
|
|---|---|
|
E_INVALIDARG |
Invalid buffer size was specified. |
Remarks
The default setting is 1 MB.
Example: WSH
CurrentDir = Left(WScript.ScriptFullName, InstrRev(WScript.ScriptFullName, "\"))
Set Analyzer = WScript.CreateObject("CATC.USBTracer")
Set RecOptions = Analyzer.GetRecordingOptions
RecOptions.SetBufferSize 2*1024*1024 ' 2 MB
IRecOptions::SetPostTriggerPercentage
HRESULT SetPostTriggerPercentage (
[in] short posttrigger_percentage );
Sets the post-trigger buffer size.
|
Parameters |
|
|---|---|
|
posttrigger_percentage |
Size of post trigger buffer in percents of the whole recording buffer. |
|
Return values |
|
|---|---|
|
E_INVALIDARG |
Invalid percentage was specified. |
Remarks
This method call has no effect if recording mode is set to RMODE_SNAPSHOT.
The default setting is 50%.
Example: WSH
CurrentDir = Left(WScript.ScriptFullName, InstrRev(WScript.ScriptFullName, "\"))
Set Analyzer = WScript.CreateObject("CATC.USBTracer")
Set RecOptions = Analyzer.GetRecordingOptions
RecOptions.SetPostTriggerPercentage 60 ' 60%
IRecOptions::SetTriggerBeep
HRESULT SetTriggerBeep (
[in] BOOL beep );
Sets the flag to make a sound when a trigger occurs.
|
Parameters |
|
|---|---|
|
beep |
TRUE to beep when trigger occurs. FALSE to not beep when trigger occurs. |
Remarks
The default state of the beep is FALSE.
Example: WSH
CurrentDir = Left(WScript.ScriptFullName, InstrRev(WScript.ScriptFullName, "\"))
Set Analyzer = WScript.CreateObject("CATC.USBTracer")
Set RecOptions = Analyzer.GetRecordingOptions
RecOptions.SetTriggerBeep TRUE
IRecOptions::SetDataTruncate
HRESULT SetDataTruncate (
[in] long length );
Sets the flag indicating that recorded data is to be truncated and sets the length of data to truncate.
|
Parameters |
|
|---|---|
|
length |
Length of data in bytes; cannot be less then 108 |
Remarks
By default, data is not truncated.
Example: WSH
CurrentDir = Left(WScript.ScriptFullName, InstrRev(WScript.ScriptFullName, "\"))
Set Analyzer = WScript.CreateObject("CATC.USBTracer")
Set RecOptions = Analyzer.GetRecordingOptions
RecOptions.SetDataTruncate 345 ' Truncate data that is more then 345 bytes long.
IRecOptions::SetAutoMerge
HRESULT SetAutoMerge (
[in] BOOL auto_merge );
Sets the flag indicating that recorded traces on different channels are merged automatically after recording is done.
|
Parameters |
|
|---|---|
|
auto_merge |
TRUE performs merge automatically. FALSE does not perform merge |
Remarks
By default, automatic merge is not performed.
Example: WSH
CurrentDir = Left(WScript.ScriptFullName, InstrRev(WScript.ScriptFullName, "\"))
Set Analyzer = WScript.CreateObject("CATC.USBTracer")
Set RecOptions = Analyzer.GetRecordingOptions
RecOptions.SetAutoMerge TRUE
IRecOptions::SetSaveExternalSignals
HRESULT SetSaveExternalSignals (
[in] BOOL save );
Sets the flag indicating to save external signals.
|
Parameters |
|
|---|---|
|
save |
TRUE saves external signals. FALSE does not save external signals. |
Remarks
By default, external signals are not saved.
Example: WSH
CurrentDir = Left(WScript.ScriptFullName, InstrRev(WScript.ScriptFullName, "\"))
Set Analyzer = WScript.CreateObject("CATC.USBTracer")
Set RecOptions = Analyzer.GetRecordingOptions
RecOptions.SetSaveExternalSignals TRUE
IRecOptions::SetTraceFileName
HRESULT SetTraceFileName (
[in] BSTR file_name );
Sets the path to the file where the trace is stored after recording.
|
Parameters |
|
|---|---|
|
file_name |
String providing the full pathname to the file where the recording is stored. |
Remarks
If specified file does not exist, it is created. If it exists, it is overwritten.
Example: WSH
CurrentDir = Left(WScript.ScriptFullName, InstrRev(WScript.ScriptFullName, "\"))
Set Analyzer = WScript.CreateObject("CATC.USBTracer")
Set RecOptions = Analyzer.GetRecordingOptions
' Do the changes of recording options here.
RecOptions.Save( CurrentDir & "Input\trace.usb" )
IRecOptions:: SetFilterPolarity
HRESULT SetFilterPolarity (
[in] BOOL filter_out );
Sets whether to filter recording events in or out.
|
Parameters |
|
|---|---|
|
filter_out |
TRUE = filter out FALSE = filter in |
|
Return values |
|
|---|---|
|
E_INVALIDARG |
Invalid operation code and/or connection was specified. |
Remarks
By default, all events are filtered out.
Example: WSH
CurrentDir = Left(WScript.ScriptFullName, InstrRev(WScript.ScriptFullName, "\"))
Set Analyzer = WScript.CreateObject("CATC.USBTracer")
Set RecOptions = Analyzer.GetRecordingOptions
RecOptions.SetFilterPolarity 0 ' filter in
IRecOptions::Reset
HRESULT Reset ( );
Resets recording options to its initial state.
Remarks
For default values of recording options, see the remarks.
Example: WSH
CurrentDir = Left(WScript.ScriptFullName, InstrRev(WScript.ScriptFullName, "\"))
Set Analyzer = WScript.CreateObject("CATC.USBTracer")
Set RecOptions = Analyzer.GetRecordingOptions
RecOptions.SetRecMode 2 ' Event trigger
RecOptions.SetBufferSize 1024*1024 ' 1 MB
RecOptions.SetPostTriggerPercentage 60 ' 60%
. . .
RecOptions.Reset
IUsbRecOptions2
The IUsbRecOptions interface is the second interface for the RecOption object. It derives from the IUSBRecOptions interface that implements the common functionality for all Teledyne LeCroy Analyzers.
IID: 699CAC9B-E32A-40dd-92E1-8B237057B67F
IUSBRecOptions2::ChangeUsbRecordingOptionSetting
HRESULT ChangeUsbRecordingOptionSetting
( [in] int setting, [in] int value, [out, retval] int* result )
Provides capability to change specific setting of loaded recording options before recording start.
FOR INTERNAL TELEDYNE LECROY USE ONLY.
|
Parameters |
|
|---|---|
|
setting |
specifies desired setting to change [look at remarks for detail] |
|
value |
new value of setting |
|
result |
pointer to integer value which returns setting modify was successful or not |
|
Return values |
|
|---|---|
|
ANALYZERCOMERROR_WRONGCALL |
Setting ID is invalid |
Remarks
The setting can be one of these values:
|
Setting |
Possible Values |
Description |
|
1 |
0 : Off 1 : Host Emulation 2 : Device Emulation |
USB3 - Generation Mode |
|
2 |
0 : Off 1 : Auto 2 : On |
USB3 - Rx/Tx Descrambling |
|
3 |
0 : Off 1 : Auto 2 : On |
USB3 - Rx/Tx Polarity |
|
4 |
0 : Off 1 : On |
USB3 - Rx Spread Spectrum Clock |
|
5 |
0 : Off 1 : On |
USB3 - Rx Spread Spectrum Clock |
|
6 |
0 : Proxied from other port 1 : Always presented |
USB3 - Analyzer Ports Termination |
|
7 |
0 : No 1 : Yes |
USB3 - Exerciser Rx Detect Off |
|
8 |
0 : Off 1 : -5300ppm 2 : +300ppm |
USB3 - Tx Clock (Compliance Only) |
|
10 |
0 : Off 1 : Auto 2 : On |
USB3 - Rx Descrambling |
|
11 |
0 : Off 1 : Auto 2 : On |
USB3 - Tx Descrambling |
|
12 |
0 : Off 1 : Auto 2 : On |
USB3 - Rx Polarity |
|
13 |
0 : Off 1 : Auto 2 : On |
USB3 - Tx Polarity |
|
14 |
0 : No 1 : Yes |
General - Disable CATC Sync |
|
15 |
0 : No 1 : Yes |
General - CATC Sync Independent Record Stop |
|
16 |
0 : No 1 : Yes |
General - CATC Sync Independent Trigger |
|
17 |
0 : No 1 : Yes |
Ignore Uploading |
|
18 |
0 : Hardware Sampling 1 : Legacy Method |
USB3 - M3x LFPS Capture Method |
|
19 |
0 : No 1 : Yes |
General - Capture Raw File |
|
20 |
0 : Gen1 1 : Gen2 |
USB3 – Generation Speed |
|
23 |
0 : Auto 1 : Gen1 2 : Gen2 |
USB3 – Analyzer Speed |
|
24 |
0 : No 1 : Yes |
Enable External Trigger Custom Pulse Width |
|
25 |
Number less than 4096 |
External Trigger Pulse Width in nanosecond |
|
26 |
0 : No 1 : Yes |
Power Delivery - Allow Vbus without CC-pin Termination |
|
27 |
Text |
General – Connected Device name (Connector 1) |
|
28 |
Text |
General – Connected Device name (Connector 2) |
|
31 |
0 : No 1 : Yes |
Capture CC Traffic |
|
34 |
0 : No 1 : Yes |
General - Capture Power Measurements |
|
35 |
Number |
General – Recording Buffer size in Megabyte |
|
36 |
0x0000 : Auto 0x0001 : Source 0x0002 : Sink 0x0004 : DRP 0x0008 : Audio Adapter 0x0010 : DTS 0x0020 : Support Audio Acc 0x0040 : Support Debug Acc 0x0080 : Support Vconn-Pwd 0x0100 : Try.SRC 0x0200 : Try.SNK |
USB Type-C – Right Device Information |
|
37 |
USB Type-C – Left Device Information |
|
|
38 |
0 : No 1 : Yes |
USB3 – Support Legacy Timers (Exerciser) |
|
39 |
number (1 to 100) |
Increase the Recording Buffer size by the input percentage |
|
40 |
0 : Enabled 1 : Disabled – Start With TERM On 2 : Disabled – Start With TERM Off 3 : Disabled – Keep TERM State |
USB3 – Exerciser LTSSM Controlled Termination |
|
41 |
Number |
USB Type-C – Source Vbus On Threshold in millivolt |
|
42 |
Number |
USB Type-C – Sink Vbus On Threshold in millivolt |
|
43 |
0 : x1 1 : x2 |
USB3 – Generation Link Width |
|
44 |
0 : No 1 : Yes |
Power Delivery – Allow Vbus > 5V |
|
45 |
1 : Pulse Low 2 : Pulse High 3 : Pulse Toggle |
General – External Trigger Out Type |
|
46 |
0 : Off 1 : On |
General – Recording channel USB3 |
|
47 |
0 : Off 1 : On |
General – Recording channel USB4/TBT |
|
48 |
0 : Off 1 : On |
General – Recording channel USB2 |
|
49 |
0 : Off 1 : On |
General – Recording channel PD |
|
50 |
0 : Off 1 : On |
General – Recording channel DP AUX |
IusbRecOptions3
The IUsbRecOptions interface is the third interface for the RecOption object. It derives from the IUSBRecOptions2 interface.
IID: 689F24F4-1AE5-412D-AA93-F75686E77532
IUSBRecOptions3::SetBufferSizeEx
HRESULT SetBufferSizeEx ( [in] DWORD num_megabytes )
An alternative to SetBufferSize in which the parameter accepts recording size in megabytes. API users can assign recording sizes larger than 4G (depending on analyzer product buffer).
|
Parameters |
|
|---|---|
|
Num_megabytes |
Specifies desired recording size in megabytes. |