Teledyne-lecroy FireInspector Automation Application Programming I Uživatelský manuál Strana 48

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 92
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 47
44
FireInspector Automation User’s Manual
CATC Version 1.0
2.4.10 ITrace::GetPacketsCount
Retrieves total number of packets in the trace.
Syntax
HRESULT GetPacketsCount (
[out, retval] long* number_of_packets );
Parameters
number_of_packetspoints to long value where number of packets in the trace is
retrieved
Return values
Remarks
Example
WSH:
Set Analyzer = WScript.CreateObject("CATC.FwAnalyzer")
CurrentDir = Left(WScript.ScriptFullName,
InstrRev(WScript.ScriptFullName, "\"))
Set Trace = Analyzer.MakeRecording (CurrentDir &
"Input\test_ro.rec")
MsgBox Trace.GetPacketsCount & " packets recorded"
C++:
IFwTrace* fw_trace;
. . .
long number_of_packets;
long trigg_packet_num;
try
{
bstr_trace_name = fw_trace->GetName();
number_of_packets = fw_trace->GetPacketsCount();
trigg_packet_num = fw_trace->GetTriggerPacketNum();
}
catch ( _com_error& er)
{
if (er.Description().length() > 0)
::MessageBox( NULL, er.Description(), _T("FwAnalyzer
client"), MB_OK );
else
::MessageBox( NULL, er.ErrorMessage(),_T("FwAnalyzer
client"), MB_OK );
return 1;
}
TCHAR str_trace_name[256];
_tcscpy( str_trace_name, (TCHAR*)( bstr_trace_name) );
SysFreeString( bstr_trace_name );
Zobrazit stránku 47
1 2 ... 43 44 45 46 47 48 49 50 51 52 53 ... 91 92

Komentáře k této Příručce

Žádné komentáře