Impact Acquire SDK .NET
Locating Properties

To bind a mv.impact.acquire.Property object to a certain feature offered by the device at runtime the interface can be used in several ways. One possibility is to use a mv.impact.acquire.DeviceComponentLocator object. Let's assume an application wants to access a 64 bit integer property that is called Width and is located somewhere in the devices feature tree. In this case, we want to bind the property of the base setting. The code to bind the device feature to an object would look more or less like this:

mv.impact.acquire.Device pDev = getTheDevicePointerFromSomewhere();
// create a locator object that can iterate and find a driver feature
mv.impact.acquire.DeviceComponentLocator locator = new mv.impact.acquire.DeviceComponentLocator(pDev, TDeviceListType.dltSetting, "Base");
// find the feature and bind it to the property object
locator.bindComponent( width, "Width" );
// now the property is ready to use when available:
if(width.isValid)
{
width.write(width.read(TPropertyLimit.plMaxValue) / 2); // set the width to half of its maximum value
}
else
{
// oops... The feature is not offered by this device
}
bool bindComponent(Component access, String name)
Binds an access object to an internal driver object.
Definition ComponentLocatorBase.cs:77
A class to locate components within the driver.
Definition DeviceComponentLocator.cs:74
This class and its functions represent an actual device detected by this interface in the current sys...
Definition Device.cs:91
Provided for convenience only. This type represents a standard 64-bit integer property type.
Definition EnumPropertyI64.cs:11
This namespace contains classes and functions belonging to the image acquisition module of this SDK.
Definition Enumerations.cs:2
Definition Enumerations.cs:2
Definition Enumerations.cs:2