Impact Acquire SDK Python
DeviceComponentLocator Class Reference

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

Inheritance diagram for DeviceComponentLocator:
[legend]

Public Member Functions

 __init__ (self, *args)
 Constructs a new unbound locator.
 
 bindSearchBaseList (self, *args)
 Assign a new search base to the locator.
 

Properties

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

Detailed Description

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

In general the properties interesting for the user can be found in one of the classes offered by this interface, but when a special property is needed or a new property that hasn't been embedded into the C++ interface, this class offers a way to get hold of its handle.

devMgr = acquire.DeviceManager()
pDev = devMgr.getDeviceByProduct("MyDev*")
if pDev:
# get access to the base setting
locator = acquire.DeviceComponentLocator(pDev, dltSetting, "Base")
prop = None
locator.bindComponent(prop, "MyProp")
# set the value by string
prop.writeS("MyVal")
if prop.type == ctPropInt:
iProp = PropertyI(prop.hObj())
myVal = 666
iProp.write(myVal)
# if the type is known this test can be omitted:
fProp = None
locator.bindComponent(fProp, "MyFloatProperty")
fProp.write(3.14)
# When it's an enumerated property this is legal as well:
eProp = acquire.EnumPropertyI()
locator.bindComponent(eProp, "MyEnumeratedProperty")
# e.g. writing the devices interfaceLayout property using the TDeviceInterfaceLayout enum value
eProp.write(acquire.dilGenICam)

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 locator and bind the search base to the specified list type of the device.

Parameters
pDev[in] A pointer to a mvIMPACT.acquire.Device object obtained from a mvIMPACT.acquire.DeviceManager object.
deviceListType[in] The type list to locate
sublistName[in] A string that can contain the name of the list if there is more than one candidate (e.g. when looking for settings)

OVERLOAD 5: Constructs a new locator and bind the search base to the specified list type of the device.

Parameters
pDev[in] A pointer to a mvIMPACT.acquire.Device object obtained from a mvIMPACT.acquire.DeviceManager object.
deviceListType[in] The type list to locate
sublistName[in] A string that can contain the name of the list if there is more than one candidate (e.g. when looking for settings)

Reimplemented from ComponentLocatorBase.

Member Function Documentation

◆ bindSearchBaseList()

bindSearchBaseList ( self,
* args )

Assign a new search base to the locator.

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

Returns
The unique identifier of the new search base.
Parameters
pDev[in] A pointer to a mvIMPACT.acquire.Device object obtained from a mvIMPACT.acquire.DeviceManager object.
deviceListType[in] The type list to locate
sublistName[in] The name or path to the search base.

Property Documentation

◆ thisown

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