Impact Acquire SDK Python
Bind Features Of An Unknown Type

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

pDev = getTheDevicePointerFromSomewhere()
locator = acquire.DeviceComponentLocator(pDev, acquire.dltSetting, "Base")
feature = acquire.Component()
locator.bindComponent(feature, "Feature")
# now the feature is ready to use when available:
if feature.isValid:
print("Feature {0} is a {1}".format(feature.name(), feature.typeAsString()))
featureType = feature.type()
if featureType == acquire.ctPropString:
stringProp = acquire.PropertyS(feature.hObj())
doStringPropAction(stringProp)
elif featureType == acquire.ctPropInt:
intProp = acquire.PropertyI(feature.hObj())
doIntPropAction(intProp)
elif featureType == acquire.ctPropInt64:
longProp = acquire.PropertyI64(feature.hObj())
doLongPropAction(longProp)
elif featureType == acquire.ctPropFloat:
floatProp = acquire.PropertyF(feature.hObj())
doFloatPropAction(floatProp)
else:
# don't handle this feature. This might be a method or a list or a property
# of a type not dealt with in the 'if-else' statements from above
else:
# oops... The feature is not offered by this device