Impact Acquire SDK Python
Component Class Reference

A base class to implement access to internal driver components. More...

Inheritance diagram for Component:
[legend]

Public Member Functions

 __init__ (self, *args)
 Constructs a new access object to a driver object.
 
 docString (self)
 Returns a string containing general information about the component referenced by this object.
 
 firstChild (self)
 Moves to the first child of this component(moves down one level).
 
 firstSibling (self)
 Moves to the first sibling(the first feature in the current list of features).
 
 flags (self)
 Returns the flags associated with this component.
 
 flagsAsString (self, *args)
 Returns the flags associated with this component as a string.
 
 getIsDefault (self)
 Checks if this component is currently referencing the default for this component.
 
 getIsList (self)
 Checks if this component is of type mvIMPACT.acquire.ComponentList.
 
 getIsMeth (self)
 Checks if this component is of type mvIMPACT.acquire.Method.
 
 getIsProp (self)
 Checks if this component is of type mvIMPACT.acquire.Property or a derived type.
 
 getIsValid (self)
 Checks if the internal component referenced by this object is still valid.
 
 getIsVisible (self)
 Checks if the component is currently shadowed due to a settings made elsewhere or not.
 
 getIsWriteable (self)
 Checks if the caller has write/modify access to the component.
 
 lastSibling (self)
 Moves to the last sibling(the last feature in the current list of features).
 
 nextSibling (self)
 Moves to the next sibling(the next feature in the current list of features).
 
 parent (self)
 Moves to the parent of this component(moves up one level).
 
 representation (self)
 Returns the recommended representation for this component.
 
 representationAsString (self)
 Returns the recommended representation of the referenced component as a string.
 
 restoreDefault (self)
 Restores the default for the referenced component.
 
 selectedFeature (self, index)
 Retrieves a component that is selected by the current one.
 
 selectedFeatureCount (self)
 Returns the number of features selected by the current one.
 
 selectedFeatures (self, v)
 Retrieves the list of components that are selected by the current one.
 
 selectingFeature (self, index)
 Retrieves a component that is selecting the current one.
 
 selectingFeatureCount (self)
 Returns the number of features selecting the current one.
 
 selectingFeatures (self, v)
 Retrieves the list of components that are selecting the current one.
 
 type (self)
 Returns the type of the referenced component.
 
 typeAsString (self)
 Returns the type of the referenced component as a string.
 
 visibility (self)
 Returns the recommended visibility for this component.
 
 visibilityAsString (self)
 Returns the recommended visibility of the referenced component as a string.
 

Static Public Member Functions

 getRepresentationAsString (representation)
 Returns the recommended representation converted to a string.
 
 getType (hObj)
 Returns the type of the component referenced by hObj.
 
 getVisibilityAsString (visibility)
 Returns the recommended visibility converted to a string.
 

Properties

 isDefault = property (getIsDefault, None, None, None)
 A bool property (read-only) which checks if this component is currently referencing the default for this component.
 
 isList = property (getIsList, None, None, None)
 A bool property (read-only) which checks if this component is of type mvIMPACT.acquire.ComponentList.
 
 isMeth = property (getIsMeth, None, None, None)
 A bool property (read-only) which checks if this component is of type mvIMPACT.acquire.Method.
 
 isProp = property (getIsProp, None, None, None)
 A bool property (read-only) which checks if this component is of type mvIMPACT.acquire.Property or a derived type.
 
 isValid = property (getIsValid, None, None, None)
 A bool property (read-only) which checks if the internal component referenced by this object is still valid.
 
 isVisible = property (getIsVisible, None, None, None)
 A bool property (read-only) which checks if the component is currently shadowed due to settings made elsewhere or not.
 
 isWriteable = property (getIsWriteable, None, None, None)
 A bool property (read-only) which checks if the caller has write/modify access to the component.
 
 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
 

Detailed Description

A base class to implement access to internal driver components.

Objects of this class can be constructed directly even if nothing is known about the type of driver object we are referring to. This class acts as a base class to provide access to internal properties, methods and component lists offered by the driver.

This object can be used to navigate through component lists of unknown content.

Consider the following structure:

LA
|-LB
|-LC
| |-PE
| |-PF
| |-PG
|-PD

Where the prefix 'L' means this is a list, 'P' that this is a property. Assuming that we have and iterator referencing list 'C', calling mvIMPACT.acquire.Component.firstChild e.g. would return a new iterator referencing object 'PE', while calling mvIMPACT.acquire.Component.nextSibling would have returned a reference to 'PD' and mvIMPACT.acquire.Component.parent would have returned a reference to object 'LA'.

"EXAMPLE 1":

A new mvIMPACT.acquire.Component is created with the ID of list 'C':

it = acquire.Component(ID_of_list_C);
it = it.firstChild() # now we are referencing 'PE'
it = it.lastSibling() # moves to 'PG'
it = it.firstSibling() # moves back to PE'
it = it.nextSibling() # moves to 'PF'
it = it.firstSibling() # moves back to PE'
it = it.parent() # we are referencing 'LC' again

"EXAMPLE 2":

Iterate over a complete list including sub lists. This will result in a list of all lists and properties that reside in the list the iterator currently is moving through to be written to the standard output. The name of the component and every parent component will be printed into the standard output:

def ParseList(iter, path = ""):
while iter.isValid:
if iter.isVisible:
if iter.isList:
# do some list specific stuff
print("List {0}{1}/".format(path, iter.name()))
# move down into the list and append its name to the path
ParseList(iter.firstChild(), path + iter.name() + "/")
elif iter.isProp:
# do property specific stuff e.g. read the value
prop = acquire.Property(iter.hObj())
values = []
valCount = prop.valCount()
for i in range(valCount):
values.append(prop.readS(i))
print("Property {0}{1}(value(s): {2})".format(path, prop.name(), string.join(values, ",")))
iter = iter.nextSibling()
it = acquire.Component(gethObjOfListToParse())
ParseList(it)

Constructor & Destructor Documentation

◆ __init__()

__init__ ( self,
* args )

Constructs a new access object to a driver object.

OVERLOAD 1:

Parameters
hObj[in] A valid handle to a component object

OVERLOAD 2: Constructs a new unbound access object.

OVERLOAD 3: Constructs a new mvIMPACT.acquire.Component from an existing one.

Parameters
src[in] A constant reference to the mvIMPACT.acquire.Component object, this object shall be created from

Reimplemented from ComponentAccess.

Reimplemented in ComponentList, Method, Property, PropertyPtr, PropertyS, PropertyI, PropertyIAcquisitionField, PropertyIAcquisitionMode, PropertyIAcquisitionStartStopBehaviour, PropertyIAoiMode, PropertyIAutoControlSpeed, PropertyIAutoControlMode, PropertyIAutoExposureControl, PropertyIAutoGainControl, PropertyIAutoOffsetCalibration, PropertyIBayerConversionMode, PropertyIBayerMosaicParity, PropertyIBayerWhiteBalanceResult, PropertyIBlueFOXDigitalInputThreshold, PropertyIBlueFOXFooterMode, PropertyIBlueFOXInfoSensorCapabilities, PropertyIBlueFOXOffsetAutoBlackSpeed, PropertyIBlueFOXSensorTiming, PropertyIBlueFOXTransferSize, PropertyIBoolean, PropertyICameraAoiMode, PropertyICameraBinningMode, PropertyICameraDataFormat, PropertyICameraExposeMode, PropertyICameraExternalSyncEdge, PropertyICameraExternalSyncOutput, PropertyICameraFlashMode, PropertyICameraFlashType, PropertyICameraHDRMode, PropertyICameraInterlacedType, PropertyICameraLinkDataValidMode, PropertyICameraOutput, PropertyICameraPixelClock, PropertyICameraScanMode, PropertyICameraSerialPortBaudRate, PropertyICameraShutterMode, PropertyICameraTapsXGeometry, PropertyICameraTapsYGeometry, PropertyICameraTestMode, PropertyICameraTriggerMode, PropertyICameraTriggerSource, PropertyIChannelSplitMode, PropertyIClampMode, PropertyIColorTwistInputCorrectionMatrixMode, PropertyIColorTwistOutputCorrectionMatrixMode, PropertyIColorProcessingMode, PropertyIDarkCurrentFilterMode, PropertyIDefectivePixelsFilterMode, PropertyIDeviceAccessMode, PropertyIDeviceAdvancedOptions, PropertyIDeviceCapability, PropertyIDeviceClass, PropertyIDeviceDigitalOutputMode, PropertyIDeviceImageTrigger, PropertyIDeviceInterfaceLayout, PropertyIDeviceLoadSettings, PropertyIDevicePowerMode, PropertyIDeviceScanRateMode, PropertyIDeviceSignalOutputStartEvent, PropertyIDeviceState, PropertyIDeviceSyncOutMode, PropertyIDeviceTriggerInterface, PropertyIDeviceTriggerMode, PropertyIDigIOState, PropertyIDigitalIOMeasurementMode, PropertyIDigitalIOMeasurementSource, PropertyIDigitalOutputControlMode, PropertyIDigitalSignal, PropertyIFieldGateMode, PropertyIFlatFieldFilterCorrectionMode, PropertyIFlatFieldFilterMode, PropertyIHWUpdateResult, PropertyII2COperationMode, PropertyII2COperationStatus, PropertyIImageBufferPixelFormat, PropertyIImageBufferFormatReinterpreterMode, PropertyIImageDestinationPixelFormat, PropertyIImageProcessingFilter, PropertyIImageProcessingMode, PropertyIImageProcessingOptimization, PropertyIImageProcessingResult, PropertyIRequestImageMemoryMode, PropertyIImageRequestControlMode, PropertyIInfoSensorColorMode, PropertyIInfoSensorType, PropertyIInterfaceEnumerationBehaviour, PropertyIInterlacedMode, PropertyILineCounter, PropertyILUTGammaMode, PropertyILUTImplementation, PropertyILUTInterpolationMode, PropertyILUTMapping, PropertyILUTMode, PropertyIMemoryManagerMode, PropertyIMemoryManagerPoolMode, PropertyIMirrorMode, PropertyIMirrorOperationMode, PropertyIOnBoardMemoryMode, PropertyIPayloadType, PropertyIPolarizedDataExtractionMode, PropertyIPolarizedDataExtractionInterpolationMode, PropertyIPulseStartTrigger, PropertyIRequestResult, PropertyIRequestState, PropertyIRTCtrlModes, PropertyIRTProgOpCodes, PropertyIScalerMode, PropertyIScalerInterpolationMode, PropertyIScanClock, PropertyIScanStandard, PropertyITriggerMoment, PropertyIUserDataAccessRight, PropertyIUserDataReconnectBehaviour, PropertyIVideoStandard, PropertyIVirtualDeviceImageType, PropertyIVirtualDeviceTestMode, PropertyIWhiteBalanceCalibrationMode, PropertyIWhiteBalanceParameter, PropertyI64, PropertyI64BufferPartDataType, PropertyI64BayerMosaicParity, PropertyI64DeviceTriggerOverlap, and PropertyF.

Member Function Documentation

◆ docString()

docString ( self)

Returns a string containing general information about the component referenced by this object.

Returns
A string containing general information about the component referenced by this object.

◆ firstChild()

firstChild ( self)

Moves to the first child of this component(moves down one level).

Calling this function will only succeed, if the current mvIMPACT.acquire.Component references a list.

Returns
A new mvIMPACT.acquire.Component object

◆ firstSibling()

firstSibling ( self)

Moves to the first sibling(the first feature in the current list of features).

Returns
A new mvIMPACT.acquire.Component object

◆ flags()

flags ( self)

Returns the flags associated with this component.

Returns
The flags associated with this component.

◆ flagsAsString()

flagsAsString ( self,
* args )

Returns the flags associated with this component as a string.

Returns
The flags associated with this component as a string.
Parameters
separator[in] A user definable string to separate the individual flags. The default value is ' | ' resulting in the string to look e.g. like this: 'cfWriteAccess | cfReadAccess'

◆ getIsDefault()

getIsDefault ( self)

Checks if this component is currently referencing the default for this component.

This function will return true only for derived components that have not been modified.

Returns
  • true if the component is currently set to its default value
  • false otherwise.

◆ getIsList()

getIsList ( self)

Checks if this component is of type mvIMPACT.acquire.ComponentList.

Returns
  • true if the component references a list
  • false otherwise

◆ getIsMeth()

getIsMeth ( self)

Checks if this component is of type mvIMPACT.acquire.Method.

Returns
  • true if the component references a method
  • false otherwise

◆ getIsProp()

getIsProp ( self)

Checks if this component is of type mvIMPACT.acquire.Property or a derived type.

Returns
  • true if the component references a property
  • false otherwise

◆ getIsValid()

getIsValid ( self)

Checks if the internal component referenced by this object is still valid.

This function can be used to verify whether a referenced component is still valid or not. When e.g. referencing a driver property after mvIMPACT.acquire.Device.close has been called this function would return false. Calling any other function that tries to access the referenced component in that case would raise an exception.

Returns
  • true if this object currently references a valid component
  • false otherwise.

◆ getIsVisible()

getIsVisible ( self)

Checks if the component is currently shadowed due to a settings made elsewhere or not.

Settings applied to certain components might affect the behaviour of others. For example an activated automatic gain control might shadow the value written to the gain property by the user as the gain is calculated internally. In order to check if modifying the actual component will affect the behaviour of the system this function may be used. When it returns true, the mvIMPACT.acquire.Component will have an impact on the system, if false is returned, the feature might be modified, but this will currently NOT influence the acquisition process or the overall behaviour of the device or driver.

This is what is called visibility. The user still might modify or read the current mvIMPACT.acquire.Component when it's not visible however the actual data will be used only if the Component is visible (mvIMPACT.acquire.cfInvisible must NOT be set).

The visibility of a mvIMPACT.acquire.Component object will change only if other mvIMPACT.acquire.Component objects are modified and NEVER when a program runs but does not change any mvIMPACT.acquire.Component.

◆ getIsWriteable()

getIsWriteable ( self)

Checks if the caller has write/modify access to the component.

Returns
  • true if the caller is allowed to call write/modify operation for this component.
  • false otherwise.

◆ getRepresentationAsString()

getRepresentationAsString ( representation)
static

Returns the recommended representation converted to a string.

Since
2.14.0
Returns
The recommended representation converted to a string.
Parameters
representation[in] The representation to query the string representation for

◆ getType()

getType ( hObj)
static

Returns the type of the component referenced by hObj.

Returns
The type of the component referenced by hObj.
Parameters
hObj[in] The component the type shall be retrieved for

◆ getVisibilityAsString()

getVisibilityAsString ( visibility)
static

Returns the recommended visibility converted to a string.

Returns
The recommended visibility converted to a string.
Parameters
visibility[in] The visibility to query the string representation for

◆ lastSibling()

lastSibling ( self)

Moves to the last sibling(the last feature in the current list of features).

Since
1.10.64
Returns
A new mvIMPACT.acquire.Component object

◆ nextSibling()

nextSibling ( self)

Moves to the next sibling(the next feature in the current list of features).

Returns
A new mvIMPACT.acquire.Component object

◆ parent()

parent ( self)

Moves to the parent of this component(moves up one level).

Returns
A new mvIMPACT.acquire.Component object

◆ representation()

representation ( self)

Returns the recommended representation for this component.

The representation can be used e.g. to develop a GUI that creates convenient controls for certain features.

Valid values for this property may be: mvIMPACT.acquire.crUndefined, mvIMPACT.acquire.crLinear, mvIMPACT.acquire.crLogarithmic, mvIMPACT.acquire.crBoolean, mvIMPACT.acquire.crPureNumber, mvIMPACT.acquire.crHexNumber, mvIMPACT.acquire.crIPv4Address, mvIMPACT.acquire.crMACAddress, mvIMPACT.acquire.crFileName, mvIMPACT.acquire.crDirectoryName.

Since
2.14.0
Returns
The recommended representation for this component.

◆ representationAsString()

representationAsString ( self)

Returns the recommended representation of the referenced component as a string.

Since
2.14.0
Returns
The recommended representation of the referenced component as a string.

◆ restoreDefault()

restoreDefault ( self)

Restores the default for the referenced component.

Calling this function will restore the default value for the component referenced by this object.

If this function is called for an object of type mvIMPACT.acquire.ComponentList every component in that list is restored to the default value.

Note
The caller must have the right to modify the component. Otherwise an exception will be thrown.
Returns
A const reference to the component.

◆ selectedFeature()

selectedFeature ( self,
index )

Retrieves a component that is selected by the current one.

This function retrieves a component that is selected by the current one. This information is mainly useful for GUI applications that want to arrange features in a way that dependencies between features can easily been spotted.

When a component 'selects' other components, this indicates that selected components may change whenever the selecting component changes. An example for a selector might be a property defining the index within a LUT while the value of a particular LUT entry could be a selected feature. Assuming 2 properties LUTIndex and LUTValue then changing LUTIndex will invalidate and possibly change LUTValue.

To find out how many mvIMPACT.acquire.Component objects are selected by the current one call mvIMPACT.acquire.Component.selectedFeatureCount. This value minus 1 will also be the max. value for index.

See also
mvIMPACT.acquire.Component.selectedFeatureCount,
mvIMPACT.acquire.Component.selectedFeatures
Since
1.11.20
Returns
A mvIMPACT.acquire.Component that is selected by the current one.
Parameters
index[in] The index for the component to query.

◆ selectedFeatureCount()

selectedFeatureCount ( self)

Returns the number of features selected by the current one.

See also
mvIMPACT.acquire.Component.selectedFeatures,
mvIMPACT.acquire.Component.selectedFeature
Since
1.11.20
Returns
The number of features selected by the current one.

◆ selectedFeatures()

selectedFeatures ( self,
v )

Retrieves the list of components that are selected by the current one.

This function retrieves the list of components that are selected by the current one. This information is mainly useful for GUI applications that want to arrange features in a way that dependencies between features can easily been spotted.

When a component 'selects' other components, this indicates that selected components may change whenever the selecting component changes. An example for a selector might be a property defining the index within a LUT while the value of a particular LUT entry could be a selected feature. Assuming 2 properties LUTIndex and LUTValue then changing LUTIndex will invalidate and possibly change LUTValue.

See also
mvIMPACT.acquire.Component.selectedFeatureCount,
mvIMPACT.acquire.Component.selectedFeature
Since
1.11.20
Returns
The number of features selected by the current one.
Parameters
v[out] An array that will retrieve the list of components that are selected by the current one.

◆ selectingFeature()

selectingFeature ( self,
index )

Retrieves a component that is selecting the current one.

This function retrieves a component that is selecting the current one. This information is mainly useful for GUI applications that want to arrange features in a way that dependencies between features can easily been spotted.

When a component 'selects' other components, this indicates that selected components may change whenever the selecting component changes. An example for a selector might be a property defining the index within a LUT while the value of a particular LUT entry could be a selected feature. Assuming 2 properties LUTIndex and LUTValue then changing LUTIndex will invalidate and possibly change LUTValue.

To find out how many mvIMPACT.acquire.Component objects are selecting the current one call mvIMPACT.acquire.Component.selectingFeatureCount. This value minus 1 will also be the max. value for index.

See also
mvIMPACT.acquire.Component.selectingFeatureCount,
mvIMPACT.acquire.Component.selectingFeatures
Since
1.11.20
Returns
A mvIMPACT.acquire.Component that is selecting the current one.
Parameters
index[in] The index for the component to query.

◆ selectingFeatureCount()

selectingFeatureCount ( self)

Returns the number of features selecting the current one.

See also
mvIMPACT.acquire.Component.selectingFeatures,
mvIMPACT.acquire.Component.selectingFeature
Since
1.11.20
Returns
The number of features selecting the current one.

◆ selectingFeatures()

selectingFeatures ( self,
v )

Retrieves the list of components that are selecting the current one.

This function retrieves the list of components that are selecting the current one. This information is mainly useful for GUI applications that want to arrange features in a way that dependencies between features can easily been spotted.

When a component 'selects' other components, this indicates that selected components may change whenever the selecting component changes. An example for a selector might be a property defining the index within a LUT while the value of a particular LUT entry could be a selected feature. Assuming 2 properties LUTIndex and LUTValue then changing LUTIndex will invalidate and possibly change LUTValue.

See also
mvIMPACT.acquire.Component.selectingFeatureCount,
mvIMPACT.acquire.Component.selectingFeature
Since
1.11.20
Returns
The number of features selecting the current one.
Parameters
v[out] An array that will retrieve the list of components that are selecting the current one.

◆ type()

type ( self)

Returns the type of the referenced component.

Returns
The type of the referenced component.

◆ typeAsString()

typeAsString ( self)

Returns the type of the referenced component as a string.

Returns
The type of the referenced component as a string.

◆ visibility()

visibility ( self)

Returns the recommended visibility for this component.

The visibility can be used e.g. to develop a GUI that displays a crucial subset of features only.

Valid values for this property may be: mvIMPACT.acquire.cvBeginner, mvIMPACT.acquire.cvExpert, mvIMPACT.acquire.cvGuru, mvIMPACT.acquire.cvInvisible.

Returns
The recommended visibility for this component.

◆ visibilityAsString()

visibilityAsString ( self)

Returns the recommended visibility of the referenced component as a string.

Returns
The recommended visibility of the referenced component as a string.

Property Documentation

◆ isDefault

isDefault = property (getIsDefault, None, None, None)
static

A bool property (read-only) which checks if this component is currently referencing the default for this component.

See mvIMPACT.acquire.Component.getIsDefault()

◆ isList

isList = property (getIsList, None, None, None)
static

A bool property (read-only) which checks if this component is of type mvIMPACT.acquire.ComponentList.

See mvIMPACT.acquire.Component.getIsList()

◆ isMeth

isMeth = property (getIsMeth, None, None, None)
static

A bool property (read-only) which checks if this component is of type mvIMPACT.acquire.Method.

See mvIMPACT.acquire.Component.getIsMeth()

◆ isProp

isProp = property (getIsProp, None, None, None)
static

A bool property (read-only) which checks if this component is of type mvIMPACT.acquire.Property or a derived type.

See mvIMPACT.acquire.Component.getIsProp()

◆ isValid

isValid = property (getIsValid, None, None, None)
static

A bool property (read-only) which checks if the internal component referenced by this object is still valid.

See mvIMPACT.acquire.Component.getIsValid()

◆ isVisible

isVisible = property (getIsVisible, None, None, None)
static

A bool property (read-only) which checks if the component is currently shadowed due to settings made elsewhere or not.

See mvIMPACT.acquire.Component.getIsVisible()

◆ isWriteable

isWriteable = property (getIsWriteable, None, None, None)
static

A bool property (read-only) which checks if the caller has write/modify access to the component.

See mvIMPACT.acquire.Component.getIsWriteable()

◆ thisown

thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
static