|
Boonton55xxx IVI Driver Reference
|
|
|
Accessing Instrument-Specific Functionality
|
|
|
|
As the name implies, the instrument-specific capabilities are those methods and properties that are unique to the instrument. In practice, the instrument-specific portion of the driver exposes the full functionality of the instrument -- including functionality that may also be available in the class-compliant capabilities. Users that do not care about interchangeability or that need to access functionality that is not defined by IVI will use the instrument-specific interfaces in application programs.
•When the required functionality is not exposed in the class-compliant interfaces. •When interchangeability is not a requirement. •When performance is critical. Sometimes a driver may perform better using the instrument specific interfaces because they match the instrument functionality more closely than the class-compliant interfaces. Example
The following client code uses the instrument specific interfaces.
C++
|
Copy Code
|
#import "IviDriverTypeLib.dll" no_namespace
#import "Boonton55xxx.dll" no_namespace
void main()
{
try
{
// Instantiate the driver class directly
IBoonton55xxxPtr spDriver(__uuidof(Boonton55xxx));
// Initialize the driver
//Resource name is typically USB::0x1BFE::0x5500::SN::BTN, where "SN" is the serial number for 55 series
spDriver->Initialize(_T("USB::0x1BFE::0x5500::8728::BTN"), VARIANT_FALSE, VARIANT_TRUE, _T(""));
// Use instrument specific interfaces...
spDriver->Acquisition->InitiateContinuous = VARIANT_TRUE;
// Close the session
spDriver->Close();
}
catch (_com_error&)
{
}
}
|
C#
|
Copy Code
|
using System;
using System.Runtime.InteropServices;
using Ivi.Driver.Interop;
using Boonton.Boonton55xxx.Interop;
namespace ClientApp
{
public class App
{
[STAThread]
public static void Main(string[] args)
{
try
{
// Instantiate the driver class directly
IBoonton55xxx driver = new Boonton55xxxClass();
// Initialize the driver
//Resource name is typically USB::0x1BFE::0x5500::SN::BTN, where "SN" is the serial number for 55 series
driver.Initialize("USB::0x1BFE::0x5500::8728::BTN", false, true, "");
// Use instrument specific interfaces...
driver.Acquisition.InitiateContinuous = true;
// Close the session
driver.Close();
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
}
}
}
|
Copyright 2013-16 Boonton. All rights reserved.
|