Impact Acquire SDK Python
ComponentLocatorBase Class Reference

A base class to locate components within the driver. More...

Inheritance diagram for ComponentLocatorBase:
[legend]

Public Member Functions

 __init__ (self, *args)
 Constructs a new unbound locator.
 
 bindComponent (self, *args)
 Binds an access object to an internal driver object.
 
 bindSearchBase (self, *args)
 Assign a new search base to the locator.
 
 findComponent (self, *args)
 Tries to locate a certain component in a hierarchy of components.
 
 searchbase_id (self)
 Returns the unique identifier of the base list from where to start searching for a component.
 

Properties

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

Detailed Description

A base class to locate components within the driver.

Every driver will offer a set of properties, methods and component lists. mvIMPACT.acquire.Property objects contain data such as the current gain in dB, the state of a digital input, etc.. mvIMPACT.acquire.Method objects can be executed like a normal function and mvIMPACT.acquire.ComponentList objects are used to group certain objects together to form a logical unit.

When it's necessary to locate one or more of these objects without knowing exactly where to look for them this locator class can be used to look for the component.

Constructor & Destructor Documentation

◆ __init__()

__init__ ( self,
* args )

Constructs a new unbound locator.

OVERLOAD 1:

OVERLOAD 2: Constructs a new bound to the specified base list locator.

Parameters
baselist[in] A unique identifier to the base list from where to start to search for the search base.

OVERLOAD 3: Constructs a new locator and searches the search base list.

Parameters
baselist[in] A unique identifier to the base list from where to start to search for the search base.
pathToSearchBase[in] The name or path ('/' separated) to the search base.

OVERLOAD 4: Constructs a new mvIMPACT.acquire.ComponentLocatorBase from an existing one.

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

Reimplemented from ComponentAccess.

Reimplemented in ComponentLocator, and DeviceComponentLocator.

Member Function Documentation

◆ bindComponent()

bindComponent ( self,
* args )

Binds an access object to an internal driver object.

Returns
  • true if successful
  • false otherwise. In case false is returned by this function the component could not be bound, which means subsequent calls using access will fail or throw an exception.
Parameters
access[in,out] The access object to bind to the driver object.
name[in] The path and/or name of the object to be located.
searchMode[in] Specifies how and what to search for. Valid flags(these flags can be combined using the '|' operator) for this parameter are:
  • smIgnoreLists
  • smIgnoreMethods
  • smIgnoreProperties
maxSearchDepth[in] The maximum depth (in lists) where to search for the component. By e.g. setting this value to 2, the current list and all its sub lists will be searched for the object, but no sublists of sub lists. -1 will search in ALL sub lists.

◆ bindSearchBase()

bindSearchBase ( self,
* args )

Assign a new search base to the locator.

This new search base will be searched starting from the base list specified.

Returns
The unique identifier of the new search base.
Parameters
baselist[in] A unique identifier for the base list used to start searching the search base.
pathToSearchBase[in] The name or path to the search base.

◆ findComponent()

findComponent ( self,
* args )

Tries to locate a certain component in a hierarchy of components.

Returns
A unique identifier to the component if found or mvIMPACT.acquire.INVALID_ID if the component couldn't be found.
Parameters
name[in] The path and/or name of the object to be located.
searchMode[in] Specifies how and what to search for. Valid flags(these flags can be combined using the '|' operator) for this parameter are:
  • smIgnoreLists
  • smIgnoreMethods
  • smIgnoreProperties
maxSearchDepth[in] The maximum depth (in lists) where to search for the component. By e.g. setting this value to 2, the current list and all its sub lists will be searched for the object, but no sublists of sub lists. -1 will search in ALL sub lists.

◆ searchbase_id()

searchbase_id ( self)

Returns the unique identifier of the base list from where to start searching for a component.

Returns
The unique identifier of the base list from where searching for a component will start currently.

Property Documentation

◆ thisown

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