Teledyne-lecroy Automation API for Bluetooth Analyzers Manual de usuario Pagina 49

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 110
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 48
43
Automation API for CATC Bluetooth Analyzers
CATC Ver. 1.40
2.4.9 ITrace::GetPacket
Retrieves raw packet representation
Parameters
packet_number - number of packet to retrieve
packet - raw packet representation
number_of_bits - number of bits in raw packet representation
Return values
ANALYZERCOMERROR_INVALIDPACKETNUMBER - specified packet number is invalid
Remarks
Packet” parameter has VT_ARRAY | VT_VARIANT actual automation type. Each element of
this array has
VT_UI1 automation type. Since the last element of the array may contain
extra data, you need to use
number_of_bits parameter to determine actual packet data.
Example
VBScript:
<OBJECT
ID = Analyzer
CLASSID = "clsid:0B179BB3-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
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
Sub BtnGetPacket_OnClick
On Error Resume Next
Dim Packet
NumberOfBits = CurrentTrace.GetPacket (TextPacketNumber.value,
Packet)
If Err.Number <> 0 Then
MsgBox "GetPacket:" & Err.Number & ":" & Err.Description
Else
For Each PacketByte In Packet
PacketStr = PacketStr & DecToBin(PacketByte, 8) & " "
NBytes = NBytes + 1
HRESULT GetPacket (
[in] long packet_number,
[in, out] VARIANT* packet,
[out, retval] long* number_of_bits );
Vista de pagina 48
1 2 ... 44 45 46 47 48 49 50 51 52 53 54 ... 109 110

Comentarios a estos manuales

Sin comentarios