Impact Acquire SDK Python
|
A base class for properties. More...
Public Member Functions | |
__init__ (self, *args) | |
Constructs a new unbound mvIMPACT.acquire.Property object. | |
dictSize (self) | |
Returns the size of the properties translation dictionary. | |
getAllowsValueCombinations (self) | |
Checks if this enumerated property allows the combination of enum values. | |
getHasDict (self) | |
Returns whether this property defines a translation dictionary or not. | |
getHasMaxValue (self) | |
Checks if a maximum value is defined for this property. | |
getHasMinValue (self) | |
Checks if a minimum value is defined for this property. | |
getHasStepWidth (self) | |
Checks if a step width is defined for this property. | |
maxValCount (self) | |
Returns maximum number of values that can be managed by this property. | |
readS (self, *args) | |
Reads data from this property as a string. | |
readSArray (self, *args) | |
Reads data from this property as a string. | |
removeValue (self, index=0) | |
Removes a certain value from the property's data. | |
resizeValArray (self, newSize) | |
Resizes the property's data array. | |
stringFormatString (self) | |
Returns the internal format string this property uses to convert data to strings. | |
valCount (self) | |
Returns the current number of values managed by this property. | |
writeS (self, *args) | |
Assigns a new value to this property. | |
Properties | |
allowsValueCombinations = property (getAllowsValueCombinations, None, None, None) | |
A bool property (read-only) which checks if this enumerated property allows the combination of enum values. | |
hasDict = property (getHasDict, None, None, None) | |
A bool property (read-only) which checks whether this property defines a translation dictionary or not. | |
hasMaxValue = property (getHasMaxValue, None, None, None) | |
A bool property (read-only) which checks if a maximum value is defined for this property. | |
hasMinValue = property (getHasMinValue, None, None, None) | |
A bool property (read-only) which checks if a minimum value is defined for this property. | |
hasStepWidth = property (getHasStepWidth, None, None, None) | |
A bool property (read-only) which checks if a step width is defined for this property. | |
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") | |
A base class for properties.
A property can be used to represent certain values like e.g. the input channel of a device. Depending on the way the property has been created it is either possible to read and write data to it or ( when the mvIMPACT.acquire.cfWriteAccess flag is NOT set ) just to read the data. In rare cases it might also be possible that the user is is not allowed to read the data of a property. To find out what you are allowed to do with a property or any other component the function mvIMPACT.acquire.Component.flags() can be called.
A property can contain either a single value or an array of values of the same type (e.g. 4 integer values could be used to represent a property call 'Rectangle'. It can even (if the mvIMPACT.acquire.cfFixedSize flag is not set) contain a different number of values all the time its data is queried. E.g. for a property 'searchresults' each time some function is called which writes its results to this property the property could contain a different number of integer values afterwards.
Every properties value can be read and written either as string or by it actual value type. So you can either assign the value of an integer property by using the standard 'write' function that accepts the value to be the type of the property or the function mvIMPACT.acquire.Property.writeS can be used to set the property via a string containing the new value.
In addition to that float and int Properties might define a translation dictionary. This cannot be done by the user, but the user can work with the dictionary afterwards. A translation dictionary is a table which maps strings to certain values (e.g. integers).
The translation dictionary serves two purposes: Once it has been defined this property can only be assigned values ( which can either be passed as a string or as the actual value ) which are contained in the translation table. Thus this makes it very easy to restrict a certain property to a fixed number of values, which can be assigned to it. Properties that have a translation dictionary will typically be defined by declaring a template instance with the type of the enumeration.
The second benefit of a translation dictionary is that certain values can be assigned a meaningful description via its translation. When a translation table has been defined either the string translation can be used to assign its value or its actual data type. A float property e.g. might define a translation table like this: 'Auto -> 0', 'auto -> 1', 'OnLowLevel -> 2'. Now to set this property to use the 'on low level' trigger mode this can be done by calling one of the 'write' functions.
This can also be extremely useful to populate combo boxes for GUI applications.
Float and int properties can also define certain constants like a max. value or a min. value. If a property does define such values it can't be assigned values which do not lie within the defined range. To find out if constants are defined The user can call the functions mvIMPACT.acquire.Property.hasMaxValue, mvIMPACT.acquire.Property.hasMinValue and mvIMPACT.acquire.Property.hasStepWidth. To query to actual value of the max, min or step width the functions getMaxValue, getMinValue and getStepWidth of the classes mvIMPACT.acquire.PropertyF, mvIMPACT.acquire.PropertyI and mvIMPACT.acquire.PropertyI64 can be called.
When reading the value of a property as a string the user can define a format string telling the property module how to format the returned string. This works pretty much like when working e.g. with the printf function.
__init__ | ( | self, | |
* | args ) |
Constructs a new unbound mvIMPACT.acquire.Property object.
OVERLOAD 1:
Properties constructed this way can't be used for anything unless they are bound to a internal driver property with a mvIMPACT.acquire.ComponentLocator object.
OVERLOAD 2: Constructs a new mvIMPACT.acquire.Property object.
Properties successfully constructed this way can be worked with directly. If hObj does not reference an internal driver property a mvIMPACT.acquire.ENotAProperty exception will be thrown.
hProp | [in] A valid handle to a property |
OVERLOAD 3: Constructs a new mvIMPACT.acquire.Property from an existing one.
src | [in] A constant reference to the mvIMPACT.acquire.Property object, this object shall be created from |
Reimplemented from Component.
Reimplemented in 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.
dictSize | ( | self | ) |
Returns the size of the properties translation dictionary.
If the property does define a translation dictionary this function returns the number of elements contained in this dictionary.
getAllowsValueCombinations | ( | self | ) |
Checks if this enumerated property allows the combination of enum values.
If this function returns true, the enum constants can be 'ored' together. This works for the enum constants as well as for the string representations returned in the properties translation dictionary.
if a property e.g. defines a dictionary (('1', "one"), ('2', "two")) the following write operations will be valid:
If this function returns true code like this will be valid:
getHasDict | ( | self | ) |
Returns whether this property defines a translation dictionary or not.
getHasMaxValue | ( | self | ) |
Checks if a maximum value is defined for this property.
getHasMinValue | ( | self | ) |
Checks if a minimum value is defined for this property.
getHasStepWidth | ( | self | ) |
Checks if a step width is defined for this property.
maxValCount | ( | self | ) |
Returns maximum number of values that can be managed by this property.
For the majority of properties this function will return '1', but as properties might manage more than a single value, this value might be interesting from time to time.
readS | ( | self, | |
* | args ) |
Reads data from this property as a string.
index | [in] The index of the desired value(only necessary for properties containing more than one value) |
format | [in] The format string telling the function how to format the result. If left empty the property uses its standard way of converting its data into a string |
readSArray | ( | self, | |
* | args ) |
Reads data from this property as a string.
This function can be used to query a set of values if this property stores more than a single value which might be useful for GUI applications.
format | [in] The format string telling the function how to format the result. If left empty the property uses its standard way of converting its data into a string |
delimiter | [in] This string is used to separate the individual values from one another. If left empty, a single blank will separate the data. |
startIndex | [in] The index of the first of the desired values |
endIndex | [in] The index of the last of the desired values. If INT_MAX is passed, every from startIndex to the last value stored by the property will be returned. |
mode | [in] Specifies the mode this function operates in. Currently only the LSB affects the behaviour of this function. When the LSB is set, the translation dictionary (if defined) will be ignored for this call. |
removeValue | ( | self, | |
index = 0 ) |
Removes a certain value from the property's data.
index | [in] The index of the value to be removed |
resizeValArray | ( | self, | |
newSize ) |
Resizes the property's data array.
This function resizes the internal data array of this property. The size of this array represents the number of values, which can be stored within the property. This function will only succeed, if the mvIMPACT.acquire.cfFixedSize is NOT set for this property and the user has "write rights" for this property. Otherwise an exception will be thrown. Whenever the user successfully writes an array of values to a property and this array contains more elements than the current internal data array can accommodate at the desired offset the internal data array will be increased automatically.
newSize | [in] The new number of values this property shall be allowed to store |
stringFormatString | ( | self | ) |
Returns the internal format string this property uses to convert data to strings.
valCount | ( | self | ) |
Returns the current number of values managed by this property.
For the majority of properties this function will return '1', but as properties might manage more than a single value, this value might be interesting from time to time.
writeS | ( | self, | |
* | args ) |
Assigns a new value to this property.
OVERLOAD 1:
The user caller have "write rights" for this property in order to be able to modify its value. Also if index is greater than the current internal data array size of this property the user must be allowed to change to size of the properties internal data array (the mvIMPACT.acquire.cfFixedSize flag must NOT be set).
value | [in] The new value for this property at the given index. |
index | [in] The index of the value to modify |
OVERLOAD 2: Assigns new values to this property.
The user must have "write rights" for this property in order to be able to modify its values. Also if index is greater than the current internal data array size of this property the user must be allowed to change to size of the properties internal data array (the mvIMPACT.acquire.cfFixedSize flag must NOT be set). This function behaves exactly like mvIMPACT.acquire.Property.writeS except that is can be used to assign more than one value at the same time. The parameter index here serves as an offset. If for example a property holds 3 values 'one', 'two' and 'three' before this call and the function is then called with an array containing the string 'orange' and 'blue' and index = 2 then after a successful call to this function the property will hold the data 'one', 'two', 'orange' and 'blue'.
sequence | [in] A constant reference to an array containing the strings to be assigned to the property |
index | [in] The offset from where to start to assign the values |
OVERLOAD 3: Assigns new values to this property.
The user must have "write rights" for this property in order to be able to modify its values. Also if index is greater than the current internal data array size of this property the user must be allowed to change to size of the properties internal data array (the mvIMPACT.acquire.cfFixedSize flag must NOT be set). This function behaves exactly like mvIMPACT.acquire.Property.writeS except that is can be used to assign more than one value at the same time. The parameter index here serves as an offset. If for example a property holds 3 values 'one', 'two' and 'three' before this call and the function is then called with an array containing the string 'orange' and 'blue' and index = 2 then after a successful call to this function the property will hold the data 'one', 'two', 'orange' and 'blue'.
sequence | [in] A constant reference to an array containing the strings to be assigned to the property |
index | [in] The offset from where to start to assign the values |
|
static |
A bool property (read-only) which checks if this enumerated property allows the combination of enum values.
|
static |
A bool property (read-only) which checks whether this property defines a translation dictionary or not.
|
static |
A bool property (read-only) which checks if a maximum value is defined for this property.
|
static |
A bool property (read-only) which checks if a minimum value is defined for this property.
|
static |
A bool property (read-only) which checks if a step width is defined for this property.
|
static |