|
| | Component () |
| | Constructs a new unbound access object.
|
| | Component (int hObj) |
| | Constructs a new access object to a driver object.
|
| String | flagsAsString () |
| | Returns the flags associated with this component as a string.
|
| String | flagsAsString (String separator) |
| | Returns the flags associated with this component as a string.
|
| String | representationAsString () |
| | Returns the recommended representation of the referenced component as a string.
|
| Component | restoreDefault () |
| | Restores the default for the referenced component.
|
| Component | selectedFeature (int index) |
| | Retrieves a component that is selected by the current one.
|
| Component | selectingFeature (int index) |
| | Retrieves a component that is selecting the current one.
|
| String | visibilityAsString () |
| | Returns the recommended visibility of the referenced component as a string.
|
|
| 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.
|
| String | docString [get] |
| | Returns a string containing general information about the component referenced by this object.
|
| Component | firstChild [get] |
| | Moves to the first child of this component(moves down one level).
|
| Component | firstSibling [get] |
| | Moves to the first sibling(the first feature in the current list of features).
|
| TComponentFlag | flags [get] |
| | Returns the flags associated with this component.
|
| int | hObj [get] |
| | Returns a unique identifier for the component referenced by this object.
|
| bool | isDefault [get] |
| | Checks if this component is currently referencing the default for this component.
|
| bool | isList [get] |
| | Checks if this component is of type mv.impact.acquire.ComponentList.
|
| bool | isMeth [get] |
| | Checks if this component is of type mv.impact.acquire.Method.
|
| bool | isProp [get] |
| | Checks if this component is of type mv.impact.acquire.Property or a derived type.
|
| bool | isValid [get] |
| | Checks if the internal component referenced by this object is still valid.
|
| bool | isVisible [get] |
| | Checks if the component is currently shadowed due to a settings made elsewhere or not.
|
| bool | isWriteable [get] |
| | Checks if the caller has write/modify access to the component.
|
| Component | lastSibling [get] |
| | Moves to the last sibling(the last feature in the current list of features).
|
| String | name [get] |
| | Returns the name of the component referenced by this object.
|
| Component | nextSibling [get] |
| | Moves to the next sibling(the next feature in the current list of features).
|
| Component | parent [get] |
| | Moves to the parent of this component(moves up one level).
|
| TComponentRepresentation | representation [get] |
| | Returns the recommended representation for this component.
|
| uint | selectedFeatureCount [get] |
| | Returns the number of features selected by the current one.
|
| ReadOnlyCollection< Component > | selectedFeatures [get] |
| | Retrieves the list of components that are selected by the current one.
|
| uint | selectingFeatureCount [get] |
| | Returns the number of features selecting the current one.
|
| ReadOnlyCollection< Component > | selectingFeatures [get] |
| | Retrieves the list of components that are selecting the current one.
|
| TComponentType | type [get] |
| | Returns the type of the component referenced by hObj.
|
| String | typeAsString [get] |
| | Returns the type of the referenced component as a string.
|
| TComponentVisibility | visibility [get] |
| | Returns the recommended visibility for this component.
|
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 mv.impact.acquire.Component.firstChild e.g. would return a new iterator referencing object 'PE', while calling mv.impact.acquire.Component.nextSibling would have returned a reference to 'PD' and mv.impact.acquire.Component.parent would have returned a reference to object 'LA'.
EXAMPLE 1:
A new mv.impact.acquire.Component is created with the ID of list 'C':
Component()
Constructs a new unbound access object.
Definition Component.cs:254
Component(int hObj)
Constructs a new access object to a driver object.
Definition Component.cs:248
Component firstSibling
Moves to the first sibling(the first feature in the current list of features).
Definition Component.cs:555
Component nextSibling
Moves to the next sibling(the next feature in the current list of features).
Definition Component.cs:582
Component firstChild
Moves to the first child of this component(moves down one level).
Definition Component.cs:597
Component parent
Moves to the parent of this component(moves up one level).
Definition Component.cs:609
Component lastSibling
Moves to the last sibling(the last feature in the current list of features).
Definition Component.cs:570
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:
public void outputPropData(
Property prop )
{
Console.Write( prop.
name +
"(value(s): " );
for( uint i=0; i<valCount; i++ )
{
Console.Write( prop.
readS() );
if( i < valCount - 1 )
{
Console.Write( ", " );
}
}
Console.WriteLine( ")" );
}
static void ParseList(
Component iter, String path )
{
while( iter.valid )
{
if( iter.visible )
{
if( iter.isList )
{
Console.WriteLine( "List " + path + iter.name );
ParseList( iter.firstChild(), path + iter.name + "/" );
}
else if( iter.isProp )
{
Console.Write( "Property " );
Console.Write( path );
{
outputPropData( new PropertyI(iter.hObj()) );
}
{
outputPropData( new PropertyF(iter.hObj()) );
}
{
outputPropData( new PropertyS(iter.hObj()) );
}
else
{
Console.WriteLine( "This property(" + iter.name + ") is currently unsupported under .NET" );
}
}
}
iter = iter.nextSibling;
}
}
[STAThread]
static void Main(string[] args)
{
try
{
ComponentList baselist = new ComponentList;
ParseList(it);
}
catch(ImpactException e)
{
Console.WriteLine(e.Message);
}
}
String name
Returns the name of the component referenced by this object.
Definition ComponentAccess.cs:167
TComponentType type
Returns the type of the component referenced by hObj.
Definition Component.cs:976
A base class for properties.
Definition Property.cs:109
uint valCount
Returns the current number of values managed by this property.
Definition Property.cs:919
String readS()
Reads data from this property as a string.
Definition Property.cs:303
TComponentType
Allowed components handled by this module.
Definition mvPropHandlingDatatypes.cs:197
- Examples
- Callback.cs, GenICamCallbackOnEvent.cs, and Properties.cs.
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 mv.impact.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 mv.impact.acquire.Component when it's not visible however the actual data will be used only if the Component is visible (mv.impact.acquire.TComponentFlag.cfInvisible must NOT be set).
The visibility of a mv.impact.acquire.Component object will change only if other mv.impact.acquire.Component objects are modified and NEVER when a program runs but does not change any mv.impact.acquire.Component.