beautypg.com

2 ianalyzer::getversion, Ianalyzer::getversion, Catc ver. 1.40 – Teledyne LeCroy Automation API for Bluetooth Analyzers User Manual

Page 15

background image

9

Automation API for CATC Bluetooth Analyzers

CATC

Ver. 1.40

2.3.2 IAnalyzer::GetVersion

Retrieves the current version of specified subsystem

Parameters

version_type

-

subsystem which version is requested;

EAnalyzerVersionType

enumerator has the following values:

ANALYZERVERSION_SOFTWARE

( 0 ) –

software

ANALYZERVERSION_BUSENGINE

( 1 ) –

bus engine

ANALYZERVERSION_FIRMWARE

( 2 ) –

firmware

analyzer_version

-

current version of subsystem requested

Return values

ANALYZERCOMERROR_INVALIDVERSIONTYPE

specified version type is invalid

ANALYZERCOMERROR_ANALYZERNOTCONNECTED

-

analyzer device is not connected

Remarks

Example

WSH:

CurrentDir = Left(WScript.ScriptFullName, InstrRev(WScript.ScriptFullName,

"\"))

Set Analyzer = WScript.CreateObject("CATC.Merlin")

SwVersion = Analyzer.GetVersion(0)

BEVersion = Analyzer.GetVersion(1)

FwVersion = Analyzer.GetVersion(2)

MsgBox "Software" & SwVersion & "BusEngine" & BEVersion & "Firmware" &

FwVersion

C++:

HRESULT hr;

IBTAnalyzer* poBTAnalyzer;

// create BTAnalyzer object

if ( FAILED( CoCreateInstance(

CLSID_BTAnalyzer,

NULL, CLSCTX_SERVER,

IID_IBTAnalyzer,

(LPVOID *)&poBTAnalyzer ) )

return;

WORD sw_version;

try

{

sw_version = m_poAnalyzer->GetVersion( ANALYZERVERSION_SOFTWARE );

}

catch ( _com_error& er)

{

if (er.Description().length() > 0)

::MessageBox(NULL, er.Description(), _T("BTAnalyzer client")

HRESULT GetVersion (

[in] EAnalyzerVersionType version_type,

[out, retval] WORD* analyzer_version );