8 itrace::getpacket – Teledyne LeCroy SAS_SATA Tracer_Trainer Automation API Manual User Manual

Page 37

Advertising
background image

LeCroy Corporation

Automation API for SAS/SATATracer/Trainer

Manual Version 1.11

37

4.1.8 ITrace::GetPacket


HRESULT GetPacket (

[in] long packet_number,
[in, out] VARIANT* packet,
[out, retval] long* number_of_bits );

Retrieves a raw packet representation in the PACKETFORMAT_BYTES format
(see

IPacket Interface

for details).

Parameters

packet_number

Zero based number of packet to retrieve


packet

Raw packet representation


number_of_bits

Number of bits in the raw packet representation

Return values

ANALYZERCOMERROR_INVALIDPACKETNUMBER

-

specified packet number is invalid

Remarks

The packet parameter has

VT_ARRAY | VT_VARIANT

actual automation type. Each element of

this array has the

VT_UI1

automation type.

Example


VBScript:

<OBJECT

ID = Analyzer
CLASSID = "clsid: 297CD804-08F5-4A4F-B3BA-779B2654B27C" >

</OBJECT>
<INPUT TYPE=TEXT NAME="TextPacketNumber">
<P ALIGN=LEFT ID=StatusText></P>

<SCRIPT LANGUAGE="VBScript">
<!--
Function DecToBin(Param, NeedLen)

While Param > 0

Param = Param/2
If Param - Int(Param) > 0 Then

Res = CStr(1) + Res

Else

Res = CStr(0) + Res

End If
Param = Int(Param)

Wend
DecToBin = Replace( Space(NeedLen - Len(Res)), " ", "0") & Res

End Function











Advertising