Impact Acquire SDK C++
DigitalIOMeasurementControl Class Reference

Properties for configuring settings belonging to the digital I/O measurement(Device specific interface layout only). More...

#include <mvIMPACT_acquire.h>

Inheritance diagram for DigitalIOMeasurementControl:
[legend]

Public Member Functions

 DigitalIOMeasurementControl (Device *pDev)
 brief Constructs a new mvIMPACT::acquire::DigitalIOMeasurementControl object.
 
HOBJ hObj (void) const
 Returns a unique identifier for the component collection referenced by this object.
 
const ComponentCollectionrestoreDefault (void) const
 Restores the default for every component of this collection.
 

Public Attributes

PropertyIDigitalIOMeasurementMode digitalIOMeasurementMode
 An enumerated integer property defining the type of measurement to perform.
 
PropertyF digitalIOMeasurementResult
 A float property (read-only) that will contain the result of the measurement.
 
PropertyIDigitalIOMeasurementSource digitalIOMeasurementSource
 An enumerated integer property defining where the measurement shall be performed.
 

Protected Attributes

HOBJ m_hRoot
 

Detailed Description

Properties for configuring settings belonging to the digital I/O measurement(Device specific interface layout only).

Properties in this class will only be available if a device offers digital I/O measurement features.

// This code fragment will print result of measurement using all modes on all sources
// to the standard output.
DigitalIOMeasurementControl iomc(getDevicePointerFromSomewhere());
if( iomc.digitalIOMeasurementMode.isValid() && iomc.digitalIOMeasurementSource.isValid() )
{
vector<pair<string, TDigitalIOMeasurementMode> > modeDict;
iomc.digitalIOMeasurementMode.getTranslationDict( modeDict );
const unsigned int modeCnt = iomc.digitalIOMeasurementMode.dictSize();
vector<pair<string, TDigitalIOMeasurementSource> > srcDict;
iomc.digitalIOMeasurementSource.getTranslationDict( srcDict );
const unsigned int srcCnt = iomc.digitalIOMeasurementSource.dictSize();
for( unsigned int i=0; i<modeCnt; i++ )
{
iomc.digitalIOMeasurementMode.write( modeDict[i].second );
for( unsigned int j=0; j<srcCnt; j++ )
{
iomc.digitalIOMeasurementSource.write( srcDict[j].second );
printf( "Digital I/O measurement result using mode '%s' at source '%s': %s\n", iomc.digitalIOMeasurementMode.readS().c_str(), iomc.digitalIOMeasurementSource.readS().c_str(), iomc.digitalIOMeasurementResult.readS().c_str() );
}
}
}
Properties for configuring settings belonging to the digital I/O measurement(Device specific interfac...
Definition mvIMPACT_acquire.h:22652
Note
This class will only be available if mvIMPACT::acquire::Device::interfaceLayout is set to mvIMPACT::acquire::dilDeviceSpecific before the device is opened.

Constructor & Destructor Documentation

◆ DigitalIOMeasurementControl()

DigitalIOMeasurementControl ( Device * pDev)
inlineexplicit

brief Constructs a new mvIMPACT::acquire::DigitalIOMeasurementControl object.

Parameters
[in]pDevA pointer to a mvIMPACT::acquire::Device object obtained from a mvIMPACT::acquire::DeviceManager object.

Member Function Documentation

◆ hObj()

HOBJ hObj ( void ) const
inlineinherited

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

This handle will always reference an object of type mvIMPACT::acquire::ComponentList.

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

◆ restoreDefault()

const ComponentCollection & restoreDefault ( void ) const
inlineinherited

Restores the default for every component of this collection.

Calling this function will restore the default value for every component belonging to this collection.

Note
The caller must have the right to modify the component. Otherwise an exception will be thrown.
Returns
A const reference to the component.

Member Data Documentation

◆ digitalIOMeasurementMode

PropertyIDigitalIOMeasurementMode digitalIOMeasurementMode

An enumerated integer property defining the type of measurement to perform.

Valid values for this property are defined by the enumeration mvIMPACT::acquire::TDigitalIOMeasurementMode.

◆ digitalIOMeasurementResult

PropertyF digitalIOMeasurementResult

A float property (read-only) that will contain the result of the measurement.

Reading this property will automatically perform a new measurement.

Note
Please note that the signal connected to the digital input must match the selected digital input threshold(see mvIMPACT::acquire::IOSubSystemBlueFOX::digitalInputThreshold) in order to obtain valid results.

◆ digitalIOMeasurementSource

PropertyIDigitalIOMeasurementSource digitalIOMeasurementSource

An enumerated integer property defining where the measurement shall be performed.

Valid values for this property are defined by the enumeration mvIMPACT::acquire::TDigitalIOMeasurementMode.

◆ m_hRoot

HOBJ m_hRoot
protectedinherited