Impact Acquire SDK .NET
ComponentAccess Class Referenceabstract

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

Inheritance diagram for ComponentAccess:
[legend]

Properties

uint changedCounter [get]
 Returns the current changed counter for the component referenced by this object.
 
uint changedCounterAttr [get]
 Returns the current attribute changed counter for the component referenced by this object.
 
String displayName [get]
 Returns the display name of the component referenced by this object.
 
int hObj [get]
 Returns a unique identifier for the component referenced by this object.
 
String name [get]
 Returns the name of the component referenced by this object.
 

Detailed Description

A base class to implement access to internal driver objects.

Instances of this class can't be constructed directly.

Property Documentation

◆ changedCounter

uint changedCounter
get

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 mv.impact.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.

Example

//-----------------------------------------------------------------------------
public struct ComponentRef
//-----------------------------------------------------------------------------
{
uint m_lastChangedCount;
public ComponentRef( mv.impact.acquire.Component* pc ) : m_pc(pc), m_lastChangedCount(0) {}
};
//-----------------------------------------------------------------------------
public void fn( ComponentRef cr )
//-----------------------------------------------------------------------------
{
if( cr.m_pc )
{
uint currentChangedCount = cr.m_pc.changedCounter;
if( currentChangedCount != cr.m_lastChangedCount ) )
{
// something has happened since the last check.
doWhatNeedsToBeDone();
// and remember the current changed counter
cr.m_lastChangedCount = currentChangedCount;
}
}
}
A base class to implement access to internal driver components.
Definition Component.cs:133
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
Returns
The current changed counter of this object.

◆ changedCounterAttr

uint changedCounterAttr
get

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 mv.impact.acquire.ComponentAccess.changedCounter (except in case of a wrap around) when called at the same time for the same object.
See also
mv.impact.acquire.ComponentAccess.changedCounter
Returns
The current attributes changed counter of this object.

◆ displayName

String displayName
get

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

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

◆ hObj

int hObj
get

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

Returns
A unique identifier for the component referenced by this object.
Examples
GenICamCallbackOnEvent.cs, and Properties.cs.

◆ name

String name
get

Returns the name of the component referenced by this object.

Returns
The name of the component referenced by this object.
Examples
Callback.cs, GenICamCallbackOnEvent.cs, and Properties.cs.