Impact Acquire SDK .NET
Bind Features Of An Unknown Type

If the type is unclear for a particular feature some more complex code is needed:

mv.impact.acquire.Device pDev = getTheDevicePointerFromSomewhere();
mv.impact.acquire.DeviceComponentLocator locator = new mv.impact.acquire.DeviceComponentLocator(pDev, TDeviceListType.dltSetting, "Base");
locator.bindComponent( feature, "Feature" );
// now the feature is ready to use when available:
if( feature.isValid )
{
Console.WriteLine( "Feature {0} is a {1}", feature.name, feature.typeAsString );
switch( feature.type )
{
case TComponentType.ctPropString:
mv.impact.acquire.PropertyS stringProp = new mv.impact.acquire.PropertyS(feature.hObj);
doStringPropAction( stringProp );
break;
case TComponentType.ctPropInt:
mv.impact.acquire.PropertyI intProp = new mv.impact.acquire.PropertyI(feature.hObj);
doIntPropAction( intProp );
break;
case TComponentType.ctPropInt64:
mv.impact.acquire.PropertyI64 longProp = new mv.impact.acquire.PropertyI64(feature.hObj);
doLongPropAction( longProp );
break;
case TComponentType.ctPropFloat:
mv.impact.acquire.PropertyF floatProp = new mv.impact.acquire.PropertyF(feature.hObj);
doFloatPropAction( floatProp );
break;
default:
// don't handle this feature. This might be a method or a list or a property
// of a type not dealt with in the 'case' statements from above
break;
}
}
else
{
// oops... The feature is not offered by this device
}
A base class to implement access to internal driver components.
Definition Component.cs:133
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 float property type.
Definition EnumPropertyF.cs:11
Provided for convenience only. This type represents a standard 64-bit integer property type.
Definition EnumPropertyI64.cs:11
Provided for convenience only. This type represents a standard 32-bit integer property type.
Definition EnumPropertyI.cs:11
A class to represent string properties.
Definition PropertyS.cs:10
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