Impact Acquire SDK Python
Method Class Reference

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

Inheritance diagram for Method:
[legend]

Public Member Functions

 __init__ (self, *args)
 Constructs a new mvIMPACT.acquire.Method object.
 
 call (self, *args)
 Calls an underlying driver function.
 
 paramList (self)
 Returns the parameter list of the methods as a string.
 

Properties

 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
 

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

◆ __init__()

__init__ ( self,
* args )

Constructs a new mvIMPACT.acquire.Method object.

OVERLOAD 1:

Parameters
hMeth[in] A valid handle to method object

OVERLOAD 2: Constructs a new unbound mvIMPACT.acquire.Method object.

OVERLOAD 3: 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

Reimplemented from Component.

Member Function Documentation

◆ call()

call ( self,
* args )

Calls an underlying driver function.

OVERLOAD 1:

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
params = []
params.append("stringParam")
params.append("3.14")
meth.call(params)
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

OVERLOAD 2: 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

OVERLOAD 3: 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

OVERLOAD 4: 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

◆ paramList()

paramList ( self)

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.

Property Documentation

◆ thisown

thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
static