Impact Acquire SDK Java
Method Class Reference

A class to call arbitrary driver functions. More...

Inheritance diagram for Method:
[legend]

Public Member Functions

int call ()
 Calls an underlying driver function expecting no parameters.
 
int call (String params)
 Calls an underlying driver function.
 
int call (String params, String delimiters)
 Calls an underlying driver function.
 
int call (StringVector params)
 Calls an underlying driver function.
 
long changedCounter ()
 Returns the current changed counter for the component referenced by this object.
 
long changedCounterAttr ()
 Returns the current attribute changed counter for the component referenced by this object.
 
synchronized void delete ()
 
String displayName ()
 Returns the display name of the component referenced by this object.
 
String docString ()
 Returns a string containing general information about the component referenced by this object.
 
Component firstChild ()
 Moves to the first child of this component(moves down one level).
 
Component firstSibling ()
 Moves to the first sibling(the first feature in the current list of features).
 
int flags ()
 Returns the flags associated with this component.
 
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.
 
int hObj ()
 Returns a unique identifier for the component referenced by this object.
 
boolean isDefault ()
 Checks if this component is currently referencing the default for this component.
 
boolean isList ()
 Checks if this component is of type mvIMPACT.acquire.ComponentList.
 
boolean isMeth ()
 Checks if this component is of type mvIMPACT.acquire.Method.
 
boolean isProp ()
 Checks if this component is of type mvIMPACT.acquire.Property or a derived type.
 
boolean isValid ()
 Checks if the internal component referenced by this object is still valid.
 
boolean isVisible ()
 Checks if the component is currently shadowed due to a settings made elsewhere or not.
 
boolean isWriteable ()
 Checks if the caller has write/modify access to the component.
 
Component lastSibling ()
 Moves to the last sibling(the last feature in the current list of features).
 
 Method ()
 Constructs a new unbound mvIMPACT.acquire.Method object.
 
 Method (int hMeth)
 Constructs a new mvIMPACT.acquire.Method object.
 
 Method (Method src)
 Constructs a new mvIMPACT.acquire.Method from an existing one.
 
String name ()
 Returns the name of the component referenced by this object.
 
Component nextSibling ()
 Moves to the next sibling(the next feature in the current list of features).
 
String paramList ()
 Returns the parameter list of the methods as a string.
 
Component parent ()
 Moves to the parent of this component(moves up one level).
 
int representation ()
 Returns the recommended representation for this component.
 
String representationAsString ()
 Returns the recommended representation of the referenced component as a string.
 
Component restoreDefault ()
 Restores the default for the referenced component.
 
Component selectedFeature (long index)
 Retrieves a component that is selected by the current one.
 
long selectedFeatureCount ()
 Returns the number of features selected by the current one.
 
long selectedFeatures (ComponentVector v)
 Retrieves the list of components that are selected by the current one.
 
Component selectingFeature (long index)
 Retrieves a component that is selecting the current one.
 
long selectingFeatureCount ()
 Returns the number of features selecting the current one.
 
long selectingFeatures (ComponentVector v)
 Retrieves the list of components that are selecting the current one.
 
int type ()
 Returns the type of the referenced component.
 
String typeAsString ()
 Returns the type of the referenced component as a string.
 
int visibility ()
 Returns the recommended visibility for this component.
 
String visibilityAsString ()
 Returns the recommended visibility of the referenced component as a string.
 

Static Public Member Functions

static String representationAsString (int representation)
 Returns the recommended representation converted to a string.
 
static int type (int hObj)
 Returns the type of the component referenced by hObj.
 
static String visibilityAsString (int visibility)
 Returns the recommended visibility converted to a string.
 

Protected Member Functions

void finalize ()
 
 Method (long cPtr, boolean cMemoryOwn)
 

Static Protected Member Functions

static long swigRelease (Component obj)
 
static long swigRelease (ComponentAccess obj)
 
static long swigRelease (Method obj)
 

Protected Attributes

transient boolean swigCMemOwn
 

Detailed Description

A class to call arbitrary driver functions.

Normally all functions needed by the user and offered by the driver will be provided as a normal function somewhere within this interface. In rare cases however it might be necessary to call a function, which hasn't been implemented in this interface. In that case this class will serve as a backdoor.

Constructor & Destructor Documentation

◆ Method() [1/4]

Method ( long cPtr,
boolean cMemoryOwn )
protected

◆ Method() [2/4]

Method ( int hMeth)

Constructs a new mvIMPACT.acquire.Method object.

Parameters
hMeth[in] A valid handle to method object

◆ Method() [3/4]

Method ( )

Constructs a new unbound mvIMPACT.acquire.Method object.

◆ Method() [4/4]

Method ( Method src)

Constructs a new mvIMPACT.acquire.Method from an existing one.

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

Member Function Documentation

◆ call() [1/4]

int call ( )

Calls an underlying driver function expecting no parameters.

This function can be used to call any driver function which is registered for the device it is called for that does NOT expect any parameters

To find out what kind of parameters are expected by the function use the function mvIMPACT.acquire.Method.paramList().

Returns
An integer value. For a typical function that is part of the driver SDK this integer value will be

◆ call() [2/4]

int call ( String params)

Calls an underlying driver function.

This function can be used to call any driver function which is registered for the device it is called for. To call a function successfully the parameters passed to the function must match the parameters expected by the function.

All parameters are passed as a single string, which is parsed with respect to the given delimiter characters internally.

To find out what kind of parameters are expected by the function use the function mvIMPACT.acquire.Method.paramList().

floating point values can be passed either with a '.' or a ',' acting as the decimal point.

'empty' strings can be passed as a single underline('_').

Attention
The characters '.', ',' and '_' can't be used as delimiters.
// call a function expecting a string and a float
// value parameters separated by spaces
meth.call( "stringParam 3,14" );
// call of a function expecting 2 integers an a string
// where an empty string shall be passed
// parameters are separated by '%'
meth.call( "1000%666%_", "%" );
Returns
An integer value. For a typical function that is part of the driver SDK this integer value will be
Parameters
params[in] The parameters to be passed to the function as a single string

◆ call() [3/4]

int call ( String params,
String delimiters )

Calls an underlying driver function.

This function can be used to call any driver function which is registered for the device it is called for. To call a function successfully the parameters passed to the function must match the parameters expected by the function.

All parameters are passed as a single string, which is parsed with respect to the given delimiter characters internally.

To find out what kind of parameters are expected by the function use the function mvIMPACT.acquire.Method.paramList().

floating point values can be passed either with a '.' or a ',' acting as the decimal point.

'empty' strings can be passed as a single underline('_').

Attention
The characters '.', ',' and '_' can't be used as delimiters.
// call a function expecting a string and a float
// value parameters separated by spaces
meth.call( "stringParam 3,14" );
// call of a function expecting 2 integers an a string
// where an empty string shall be passed
// parameters are separated by '%'
meth.call( "1000%666%_", "%" );
Returns
An integer value. For a typical function that is part of the driver SDK this integer value will be
Parameters
params[in] The parameters to be passed to the function as a single string
delimiters[in] A string containing valid delimiter characters for the parameter string

◆ call() [4/4]

int call ( StringVector params)

Calls an underlying driver function.

This function can be used to call any driver function which is registered for the device it is called for. To call a function successfully the parameters passed to the function must match the parameters expected by the function.

The parameters are passed as a list of strings.

To find out what kind of parameters are expected by the function use the function mvIMPACT.acquire.Method.paramList().

floating point values can be passed either with a '.' or a ',' acting as the decimal point.

'empty' strings can be passed as a single underline('_').rs.

// call a function expecting a string and a float
ArrayList<String> list = new ArrayList<String>();
list.add( "stringParam" );
list.add( "3.14" );
StringVector params = new StringVector( list );
meth.call( params );
Definition StringVector.java:11
Returns
An integer value. For a typical function that is part of the driver SDK this integer value will be
Parameters
params[in] The parameters to be passed to the function as a list of strings

◆ changedCounter()

long changedCounter ( )
inherited

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.

import mvIMPACT.acquire.*;
//-----------------------------------------------------------------------------
public class ComponentRef
//-----------------------------------------------------------------------------
{
private Component c_;
private long lastChangedCount_;
public ComponentRef( Component c ) : c_( c ), lastChangedCount_( 0 ) {}
public Component getComponent()
{
return c_;
}
public long getLastChangedCounter()
{
return lastChangedCount_;
}
public void setLastChangedCounter( long changedCounter )
{
lastChangedCount_ = lastChangedCount;
}
}
// ...more code, class definition etc.
//-----------------------------------------------------------------------------
public static void fn( ComponentRef cr )
//-----------------------------------------------------------------------------
{
if( cr.c_.isValid() )
{
final long currentChangedCount = cr.getComponent().changedCounter();
if( currentChangedCount != cr.getLastChangedCounter() )
{
// something has happened since the last check!
doWhatNeedsToBeDone();
// and remember the current changed counter
cr.setLastChangedCounter( currentChangedCount );
}
}
}
A base class to implement access to internal driver components.
Definition Component.java:224
Returns
The current changed counter of this object.

◆ changedCounterAttr()

long changedCounterAttr ( )
inherited

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.

◆ delete()

synchronized void delete ( )

Reimplemented from Component.

◆ displayName()

String displayName ( )
inherited

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.

◆ docString()

String docString ( )
inherited

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.

◆ finalize()

void finalize ( )
protected

Reimplemented from Component.

◆ firstChild()

Component firstChild ( )
inherited

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()

Component firstSibling ( )
inherited

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

Returns
A new mvIMPACT.acquire.Component object

◆ flags()

int flags ( )
inherited

Returns the flags associated with this component.

Returns
The flags associated with this component.

◆ flagsAsString() [1/2]

String flagsAsString ( )
inherited

Returns the flags associated with this component as a string.

Returns
The flags associated with this component as a string.

◆ flagsAsString() [2/2]

String flagsAsString ( String separator)
inherited

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'

◆ hObj()

int hObj ( )
inherited

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

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

◆ isDefault()

boolean isDefault ( )
inherited

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.

◆ isList()

boolean isList ( )
inherited

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

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

◆ isMeth()

boolean isMeth ( )
inherited

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

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

◆ isProp()

boolean isProp ( )
inherited

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

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

◆ isValid()

boolean isValid ( )
inherited

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.

◆ isVisible()

boolean isVisible ( )
inherited

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.TComponentFlag.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.

◆ isWriteable()

boolean isWriteable ( )
inherited

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.

◆ lastSibling()

Component lastSibling ( )
inherited

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

◆ name()

String name ( )
inherited

Returns the name of the component referenced by this object.

Returns
The name of the component referenced by this object.

◆ nextSibling()

Component nextSibling ( )
inherited

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

Returns
A new mvIMPACT.acquire.Component object

◆ paramList()

String paramList ( )

Returns the parameter list of the methods as a string.

This function returns a string containing one character for each parameter this mvIMPACT.acquire.Method object expects and one for the return type of the function call.

The first character is the return type of the function all others are parameters. void functions don't specify parameters.

The characters have the following meaning:

  • i specifies a 32-bit integer value
  • I specifies a 64-bit integer value
  • s specifies a pointer to a C-string
  • f specifies a double precision float value
  • p specifies a pointer value
  • v specifies a void return value

EXAMPLES:

  • 'v': This is a function returning nothing (void). It expects no parameters.
  • 'viis': This is a function returning nothing (void). It expects 2 integer values and one pointer to a C-string.
  • 'if': This function returns an integer value and expects a float value.
    Returns
    The parameter list of the method as a string.

◆ parent()

Component parent ( )
inherited

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

Returns
A new mvIMPACT.acquire.Component object

◆ representation()

int representation ( )
inherited

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 are defined by the enumeration mvIMPACT.acquire.TComponentRepresentation.

Since
2.14.0
Returns
The recommended representation for this component.

◆ representationAsString() [1/2]

String representationAsString ( )
inherited

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.

◆ representationAsString() [2/2]

static String representationAsString ( int representation)
staticinherited

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

◆ restoreDefault()

Component restoreDefault ( )
inherited

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()

Component selectedFeature ( long index)
inherited

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()

long selectedFeatureCount ( )
inherited

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()

long selectedFeatures ( ComponentVector v)
inherited

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()

Component selectingFeature ( long index)
inherited

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()

long selectingFeatureCount ( )
inherited

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()

long selectingFeatures ( ComponentVector v)
inherited

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.

◆ swigRelease() [1/3]

static long swigRelease ( Component obj)
staticprotectedinherited

◆ swigRelease() [2/3]

static long swigRelease ( ComponentAccess obj)
staticprotectedinherited

◆ swigRelease() [3/3]

static long swigRelease ( Method obj)
staticprotected

◆ type() [1/2]

int type ( )
inherited

Returns the type of the referenced component.

Returns
The type of the referenced component.

◆ type() [2/2]

static int type ( int hObj)
staticinherited

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

◆ typeAsString()

String typeAsString ( )
inherited

Returns the type of the referenced component as a string.

Returns
The type of the referenced component as a string.

◆ visibility()

int visibility ( )
inherited

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 are defined by the enumeration mvIMPACT.acquire.TComponentVisibility.

Returns
The recommended visibility for this component.

◆ visibilityAsString() [1/2]

String visibilityAsString ( )
inherited

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

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

◆ visibilityAsString() [2/2]

static String visibilityAsString ( int visibility)
staticinherited

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

Member Data Documentation

◆ swigCMemOwn

transient boolean swigCMemOwn
protectedinherited