Itrace::getpacket – Teledyne LeCroy SAS_SATA Automation API manual User Manual
Page 76
Teledyne LeCroy
SASTrace Object
70
Automation API for Teledyne LeCroy SAS/SATA Protocol Suite
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
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 Value
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