mvIMPACT Acquire SDK C++
ComponentAccess Class Reference

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

Inheritance diagram for ComponentAccess:
Component ComponentLocatorBase ComponentList Method Property ComponentLocator DeviceComponentLocator EnumPropertyF< double > EnumPropertyI< TMirrorOperationMode > EnumPropertyI< THWUpdateResult > EnumPropertyI< TDeviceInterfaceLayout > EnumPropertyI< TLineCounter > EnumPropertyI< TCameraPixelClock > EnumPropertyI< TCameraInterlacedType > EnumPropertyI< TRequestImageMemoryMode > EnumPropertyI< TPulseStartTrigger > EnumPropertyI< TDeviceImageTrigger > EnumPropertyI< TWhiteBalanceCalibrationMode > EnumPropertyI< TImageDestinationPixelFormat > EnumPropertyI< TDeviceCapability > EnumPropertyI< TUserDataReconnectBehaviour > EnumPropertyI< TBlueFOXTransferSize > EnumPropertyI< TRTCtrlModes > EnumPropertyI< TImageBufferFormatReinterpreterMode > EnumPropertyI< TLUTInterpolationMode > EnumPropertyI< TScalerMode > EnumPropertyI< TBlueFOXDigitalInputThreshold > EnumPropertyI< TCameraHDRMode > EnumPropertyI< TDeviceEventType > EnumPropertyI< TDeviceAutoNegotiatePacketSizeMode > EnumPropertyI< TDeviceLoadSettings > EnumPropertyI< TScanClock > EnumPropertyI< TDeviceAdvancedOptions > EnumPropertyI< TAutoControlMode > EnumPropertyI< TScanStandard > EnumPropertyI< TVideoStandard > EnumPropertyI< TBayerWhiteBalanceResult > EnumPropertyI< TTriggerMoment > EnumPropertyI< TImageRequestControlMode > EnumPropertyI< TDarkCurrentFilterMode > EnumPropertyI< TFlatFieldFilterCorrectionMode > EnumPropertyI< TPolarizedDataExtractionInterpolationMode > EnumPropertyI< TMirrorMode > EnumPropertyI< TMemoryManagerPoolMode > EnumPropertyI< TDeviceEventMode > EnumPropertyI< TCameraAoiMode > EnumPropertyI< TCameraShutterMode > EnumPropertyI< TClampMode > EnumPropertyI< TDevicePowerMode > EnumPropertyI< TDigIOState > EnumPropertyI< TImageProcessingFilter > EnumPropertyI< TInterlacedMode > EnumPropertyI< TCameraSerialPortBaudRate > EnumPropertyI< TAoiMode > EnumPropertyI< int > EnumPropertyI< TBlueFOXInfoSensorCapabilities > EnumPropertyI< TLUTMode > EnumPropertyI< TScalerInterpolationMode > EnumPropertyI< TDigitalIOMeasurementMode > EnumPropertyI< TVirtualDeviceTestMode > EnumPropertyI< TDeviceTriggerMode > EnumPropertyI< TCameraTestMode > EnumPropertyI< TAcquisitionField > EnumPropertyI< TFieldGateMode > EnumPropertyI< TCameraExternalSyncEdge > EnumPropertyI< TAcquisitionMode > EnumPropertyI< TDigitalOutputControlMode > EnumPropertyI< TInfoSensorType > EnumPropertyI< TLUTImplementation > EnumPropertyI< TAcquisitionStartStopBehaviour > EnumPropertyI< TDeviceClass > EnumPropertyI< TVirtualDeviceImageType > EnumPropertyI< TCameraExternalSyncOutput > EnumPropertyI< TCameraOutput > EnumPropertyI< TDigitalSignal > EnumPropertyI< TCameraFlashType > EnumPropertyI< TBlueFOXOffsetAutoBlackSpeed > EnumPropertyI< TRequestResult > EnumPropertyI< TLUTMapping > EnumPropertyI< TWhiteBalanceParameter > EnumPropertyI< TI2COperationStatus > EnumPropertyI< TCameraTriggerMode > EnumPropertyI< TCameraTapsXGeometry > EnumPropertyI< TColorTwistInputCorrectionMatrixMode > EnumPropertyI< TFlatFieldFilterMode > EnumPropertyI< TCameraTriggerSource > EnumPropertyI< TCameraTapsYGeometry > EnumPropertyI< TImageProcessingMode > EnumPropertyI< TBlueFOXFooterMode > EnumPropertyI< TRTProgOpCodes > EnumPropertyI< TColorTwistOutputCorrectionMatrixMode > EnumPropertyI< TDefectivePixelsFilterMode > EnumPropertyI< TDigitalIOMeasurementSource > EnumPropertyI< TBlueFOXSensorTiming > EnumPropertyI< TCameraFlashMode > EnumPropertyI< TAutoExposureControl > EnumPropertyI< TBoolean > EnumPropertyI< TAutoControlSpeed > EnumPropertyI< TUserDataAccessRight > EnumPropertyI< TDeviceSignalOutputStartEvent > EnumPropertyI< TBayerConversionMode > EnumPropertyI< TDeviceScanRateMode > EnumPropertyI< TCameraBinningMode > EnumPropertyI< TDeviceTriggerInterface > EnumPropertyI< TInfoSensorColorMode > EnumPropertyI< TChannelSplitMode > EnumPropertyI< TPolarizedDataExtractionMode > EnumPropertyI< TMemoryManagerMode > EnumPropertyI< TI2COperationMode > EnumPropertyI< TInterfaceEnumerationBehaviour > EnumPropertyI< TAutoOffsetCalibration > EnumPropertyI< TAutoGainControl > EnumPropertyI< TCameraScanMode > EnumPropertyI< TBayerMosaicParity > EnumPropertyI< TImageProcessingOptimization > EnumPropertyI< TRequestState > EnumPropertyI< TLUTGammaMode > EnumPropertyI< TColorProcessingMode > EnumPropertyI< TDeviceState > EnumPropertyI< TCameraExposeMode > EnumPropertyI< TCameraDataFormat > EnumPropertyI< TCameraLinkDataValidMode > EnumPropertyI< TDeviceSyncOutMode > EnumPropertyI< TDeviceAccessMode > EnumPropertyI< TImageBufferPixelFormat > EnumPropertyI64< TDeviceTriggerOverlap > EnumPropertyI64< TBufferPartDataType > EnumPropertyI64< int64_type > EnumPropertyF< ZYX > EnumPropertyI< ZYX > EnumPropertyI64< ZYX > PropertyPtr PropertyS

Public Member Functions

unsigned int changedCounter (void) const
 Returns the current changed counter for the component referenced by this object. More...
 
unsigned int changedCounterAttr (void) const
 Returns the current attribute changed counter for the component referenced by this object. More...
 
 ComponentAccess (const ComponentAccess &src)
 Constructs a new mvIMPACT::acquire::ComponentAccess from an existing one. More...
 
std::string displayName (void) const
 Returns the display name of the component referenced by this object. More...
 
HOBJ hObj (void) const
 Returns a unique identifier for the component referenced by this object. More...
 
std::string name (void) const
 Returns the name of the component referenced by this object. More...
 
 operator HOBJ () const
 Allows implicit conversion to a HOBJ. More...
 
ComponentAccessoperator= (const ComponentAccess &rhs)
 Allows assignments of mvIMPACT::acquire::ComponentAccess objects. More...
 
virtual ~ComponentAccess (void)
 

Protected Types

enum  { BUFFER_INCREMENT_FACTOR = 6 }
 An internal constant that defines by which factor dynamic buffers will grow when the current size is not sufficient. More...
 

Protected Member Functions

std::string compGetStringParam (TOBJ_StringQuery query, int param1=0, int param2=0) const
 A helper function to query certain component related string parameters. More...
 
 ComponentAccess (HOBJ hObj)
 Constructs a new mvIMPACT::acquire::ComponentAccess object to a driver object. More...
 
 ComponentAccess (void)
 Constructs a new unbound mvIMPACT::acquire::ComponentAccess object. More...
 

Static Protected Member Functions

static char * stringAllocator (const char *pBuf, size_t reqBufSize)
 An internal helper function for fast string allocation. More...
 

Protected Attributes

HOBJ m_hObj
 A unique identifier for the internal driver object referenced by this instance of mvIMPACT::acquire::ComponentAccess. More...
 

Friends

class ComponentLocatorBase
 

Detailed Description

A base class to implement access to internal driver objects.

Instances of this class can't be constructed directly.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
protected

An internal constant that defines by which factor dynamic buffers will grow when the current size is not sufficient.

Enumerator
BUFFER_INCREMENT_FACTOR 

Constructor & Destructor Documentation

◆ ComponentAccess() [1/3]

ComponentAccess ( HOBJ  hObj)
inlineexplicitprotected

Constructs a new mvIMPACT::acquire::ComponentAccess object to a driver object.

Parameters
[in]hObjA valid handle to a component object

◆ ComponentAccess() [2/3]

ComponentAccess ( void  )
inlineexplicitprotected

Constructs a new unbound mvIMPACT::acquire::ComponentAccess object.

◆ ~ComponentAccess()

virtual ~ComponentAccess ( void  )
inlinevirtual

◆ ComponentAccess() [3/3]

ComponentAccess ( const ComponentAccess src)
inline

Constructs a new mvIMPACT::acquire::ComponentAccess from an existing one.

Parameters
[in]srcA constant reference to the mvIMPACT::acquire::ComponentAccess object, this object shall be created from

Member Function Documentation

◆ changedCounter()

unsigned int changedCounter ( void  ) const
inline

Returns the current changed counter for the component referenced by this object.

This changed counter is incremented internally each time the component is modified. To check if this component has been modified since the last time, this check has been performed, keep track of the last return value of this function and compare it with the new value. This can be helpful e.g. to keep a GUI up to date. The value returned by this function will always be larger than or equal to the value returned by mvIMPACT::acquire::ComponentAccess::changedCounterAttr (except in case of a wrap around) when called at the same time for the same object as it's always incremented when the component has been modified in any way while the latter one will only be incremented if the attributes (e.g. the flags) but NOT if e.g. the value(s) of a property has been modified.

//-----------------------------------------------------------------------------
struct ComponentRef
//-----------------------------------------------------------------------------
{
unsigned int lastChangedCount_;
ComponentRef( mvIMPACT::acquire::Component c ) : c_( c ), lastChangedCount_( 0 ) {}
};
//-----------------------------------------------------------------------------
void fn( ComponentRef& cr )
//-----------------------------------------------------------------------------
{
if( cr.c_.isValid() )
{
const unsigned int currentChangedCount = cr.c_.changedCounter();
if( currentChangedCount != cr.lastChangedCount_ )
{
// something has happened since the last check!
doWhatNeedsToBeDone();
// and remember the current changed counter
cr.lastChangedCount_ = currentChangedCount;
}
}
}
A base class to implement access to internal driver components.
Definition: mvIMPACT_acquire.h:1321
Returns
The current changed counter of this object.

◆ changedCounterAttr()

unsigned int changedCounterAttr ( void  ) const
inline

Returns the current attribute changed counter for the component referenced by this object.

This changed counter is incremented internally each time the components attributes have been modified. To check if this components attributes have been modified since the last time, this check has been performed, keep track of the last return value of this function and compare it with the new value. This can be helpful e.g. to keep a GUI up to date.

Note
Attributes changes are e.g. a modification to a property's translation dictionary, but NOT a property's value. Because of this the value returned by this function will always be less or equal than the value returned by the function mvIMPACT::acquire::ComponentAccess::changedCounter (except in case of a wrap around) when called at the same time for the same object.
See also
mvIMPACT::acquire::ComponentAccess::changedCounter
Returns
The current attributes changed counter of this object.

◆ compGetStringParam()

std::string compGetStringParam ( TOBJ_StringQuery  query,
int  param1 = 0,
int  param2 = 0 
) const
inlineprotected

A helper function to query certain component related string parameters.

This function might throw an exception, if an invalid parameter has been queried.

Returns
A string containing the data to be queried.
Parameters
queryThe type of the parameter to read
[in]param1An additional parameter
[in]param2An additional parameter

◆ displayName()

std::string displayName ( void  ) const
inline

Returns the display name of the component referenced by this object.

Since
1.11.20
Returns
The display name of the component referenced by this object. This might be an empty string if no display name has been specified.
Examples
exampleHelper.h.

◆ hObj()

HOBJ hObj ( void  ) const
inline

Returns a unique identifier for the component referenced by this object.

Returns
A unique identifier for the component referenced by this object.

◆ name()

std::string name ( void  ) const
inline

Returns the name of the component referenced by this object.

Returns
The name of the component referenced by this object.
Examples
exampleHelper.h.

◆ operator HOBJ()

operator HOBJ ( ) const
inline

Allows implicit conversion to a HOBJ.

◆ operator=()

ComponentAccess& operator= ( const ComponentAccess rhs)
inline

Allows assignments of mvIMPACT::acquire::ComponentAccess objects.

◆ stringAllocator()

static char* stringAllocator ( const char *  pBuf,
size_t  reqBufSize 
)
inlinestaticprotected

An internal helper function for fast string allocation.

Friends And Related Function Documentation

◆ ComponentLocatorBase

friend class ComponentLocatorBase
friend

Member Data Documentation

◆ m_hObj

HOBJ m_hObj
protected

A unique identifier for the internal driver object referenced by this instance of mvIMPACT::acquire::ComponentAccess.


The documentation for this class was generated from the following file: