Ipacket::getpacketdata – Teledyne LeCroy SAS_SATA Automation API manual User Manual

Page 105

Advertising
background image

 

Automation API for Teledyne LeCroy SAS/SATA Protocol Suite

99

SASPacket Object

Teledyne LeCroy

IPacket::GetPacketData

HRESULT GetPacketData (
[in] EPacketFormat format,
[out] VARIANT* packet,
[out, retval] long* number_of_bytes )

Retrieves a raw packet representation.

Parameters

format

Data representation format

The EPacketFormat enumerator has the following values:

PACKETFORMAT_BYTES

( 0 )

bytes

PACKETFORMAT_SCRAMBLED_BYTES

( 1 )

scrambled bytes

PACKETFORMAT_TEN_BIT

( 2 ) 

10‐bit codes

packet

Raw packet data

number_of_bytes

Number of bytes in the packet

Return Value

ANALYZERCOMERROR_WRONGCALL 

Unknown packet format specified

Remarks

The packet parameter has VT_ARRAY | VT_VARIANT actual automation type. 

For PACKETFORMAT_BYTES and PACKETFORMAT_SCRAMBLED_BYTES, each element of 
this array has the VT_UI1 automation type. 

For PACKETFORMAT_TEN_BIT, each element of this array has the VT_UI2 automation 
type.

Example

VBScript:
<OBJECT
ID = Analyzer
CLASSID = "clsid: 0B179BB7-DC61-11d4-9B71-000102566088"

>
</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

Advertising