Impact Acquire SDK C++
IOSubSystemBlueFOX Class Reference

A class to handle the digital inputs and outputs for mvBlueFOX USB cameras(Device specific interface layout only). More...

#include <mvIMPACT_acquire.h>

Inheritance diagram for IOSubSystemBlueFOX:
[legend]

Public Member Functions

unsigned int getInputCount (void) const
 Returns the number of mvIMPACT::acquire::DigitalInput s available for the mvIMPACT::acquire::Device associated with this object.
 
unsigned int getOutputCount (void) const
 Returns the number of digital outputs available for the mvIMPACT::acquire::Device associated with this object.
 
PulseStartConfigurationgetPulseStartConfiguration (unsigned int nr) const
 Returns a pointer to a mvIMPACT::acquire::PulseStartConfiguration associated with this device.
 
unsigned int getPulseStartConfigurationCount (void) const
 Returns the number of mvIMPACT::acquire::PulseStartConfiguration objects available for the mvIMPACT::acquire::Device associated with this object.
 
RTCtrProgramgetRTCtrProgram (unsigned int nr) const
 Returns a pointer to a mvIMPACT::acquire::RTCtrProgram associated with this device.
 
const DigitalInputinput (unsigned int nr) const
 Returns a const pointer to a mvIMPACT::acquire::DigitalInput object.
 
 IOSubSystemBlueFOX (Device *pDev)
 Constructs a new mvIMPACT::acquire::IOSubSystemBlueFOX object.
 
DigitalOutputoutput (unsigned int nr) const
 Returns a pointer to a mvIMPACT::acquire::DigitalOutput object.
 
virtual unsigned int readInputRegister (void) const
 Returns the current state of the digital input register.
 
unsigned int readInputRegisterAtomic (void) const
 Returns the current state of the digital input register.
 
virtual unsigned int readOutputRegister (void) const
 Returns the current state of the digital output register.
 
unsigned int readOutputRegisterAtomic (void) const
 Returns the current state of the digital output register.
 
unsigned int RTCtrProgramCount (void) const
 Returns the number of mvIMPACT::acquire::RTCtrProgram s available for the mvIMPACT::acquire::Device associated with this object.
 
void writeOutputRegister (unsigned int value, unsigned int mask=UINT_MAX)
 Alters the state of the digital output register.
 
void writeOutputRegisterAtomic (unsigned int value, unsigned int mask=UINT_MAX)
 Alters the state of the digital output register.
 

Public Attributes

PropertyIBlueFOXDigitalInputThreshold digitalInputThreshold
 An enumerated integer property defining the threshold for the digital inputs in Volt.
 

Detailed Description

A class to handle the digital inputs and outputs for mvBlueFOX USB cameras(Device specific interface layout only).

A sample to show how to work with this class and the mvBlueFOX (Creating and instance of this class for another device might raise an exception):

#include <iostream>
#include <mvIMPACT_CPP/mvIMPACT_acquire.h>
using namespace std;
using namespace mvIMPACT::acquire;
void doSomeIOStuff( Device* pBF )
{
IOSubSystemBlueFOX bfIOs( pBF );
cout << "output 0 was " << bfIOs.output(0)->get() << " and is now(after flipping) ";
bfIOs.output(0)->flip();
cout << bfIOs.output(0)->get() << endl;
cout << "input threshold(" << bfIOs.digitalInputThreshold.readS() << ") set to " << bfdit10V << endl;
if( bfIOs.digitalInputThreshold.isWriteable() ) // mvBlueFOX-M doesn't support modifying the input threshold
{
bfIOs.digitalInputThreshold.write( bfdit10V );
cout << "input threshold is now " << bfIOs.digitalInputThreshold.readS() << endl;
}
cout << "input 0 is " << bfIOs.input(0)->get() << endl;
cout << "press ENTER." << endl;
cin.get();
cout << "input 0 is " << bfIOs.input(0)->get() << endl;
cout << "press ENTER." << endl;
cin.get();
cout << "input 0 is " << bfIOs.input(0)->get() << endl;
// switch on digital out 0 and 1 ( 3 = 00000011 binary )
bfIOs.writeOutputRegister( 3 );
cout << "outputs: " << bfIOs.readOutputRegister() << ", inputs: " << bfIOs.readInputRegister();
// the next line will reset bit 0 only, resulting in output 1 to remain high
// as the mask parameter of '1' defines that only the LSB of the register will be
// affected by the first parameter of the function call
bfIOs.writeOutputRegister( 0, 1 );
cout << "outputs: " << bfIOs.readOutputRegister() << ", inputs " << bfIOs.readInputRegister() << endl;
}
This class and its functions represent an actual device detected by this interface in the current sys...
Definition mvIMPACT_acquire.h:6118
A class to handle the digital inputs and outputs for mvBlueFOX USB cameras(Device specific interface ...
Definition mvIMPACT_acquire.h:16787
@ bfdit10V
This input is assumed as logic '1' when the voltage applied to the input lies above about 10 Volts.
Definition mvDriverBaseEnums.h:434
This namespace contains classes and functions belonging to the image acquisition module of this SDK.
Definition mvCommonDataTypes.h:34
Note
The mvBlueFOX defines an additional property mvIMPACT::acquire::CameraSettingsBlueFOX::flashMode. This might affect the state of the digital outputs as well.

If a digital output is defined to be 'logic 0' but the flash mode is switched on for the same digital output, the output will be high during the expose time of the camera sensor. If a digital output is defined to be 'logic 1' the output will be high all the time.

Note
This class will only be available if mvIMPACT::acquire::Device::interfaceLayout is set to mvIMPACT::acquire::dilDeviceSpecific before the device is opened.
Examples
ContinuousCaptureToAVIFile.cpp, DigitalIOs.cpp, DigitalIOs.legacy.cpp, SequenceCapture.cpp, and SequenceCapture.win32.cpp.

Constructor & Destructor Documentation

◆ IOSubSystemBlueFOX()

IOSubSystemBlueFOX ( Device * pDev)
inlineexplicit

Constructs a new mvIMPACT::acquire::IOSubSystemBlueFOX object.

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

Member Function Documentation

◆ getInputCount()

unsigned int getInputCount ( void ) const
inlineinherited

Returns the number of mvIMPACT::acquire::DigitalInput s available for the mvIMPACT::acquire::Device associated with this object.

Examples
DigitalIOs.cpp, and DigitalIOs.legacy.cpp.

◆ getOutputCount()

unsigned int getOutputCount ( void ) const
inlineinherited

Returns the number of digital outputs available for the mvIMPACT::acquire::Device associated with this object.

Examples
DigitalIOs.cpp, and DigitalIOs.legacy.cpp.

◆ getPulseStartConfiguration()

PulseStartConfiguration * getPulseStartConfiguration ( unsigned int nr) const
inlineinherited

Returns a pointer to a mvIMPACT::acquire::PulseStartConfiguration associated with this device.

If nr is invalid(too large) an STL out_of_range exception will be thrown.

Parameters
[in]nrThe number of the pulse start configuration to return

◆ getPulseStartConfigurationCount()

unsigned int getPulseStartConfigurationCount ( void ) const
inlineinherited

Returns the number of mvIMPACT::acquire::PulseStartConfiguration objects available for the mvIMPACT::acquire::Device associated with this object.

Examples
DigitalIOs.cpp, and DigitalIOs.legacy.cpp.

◆ getRTCtrProgram()

RTCtrProgram * getRTCtrProgram ( unsigned int nr) const
inlineinherited

Returns a pointer to a mvIMPACT::acquire::RTCtrProgram associated with this device.

If nr is invalid(too large) an STL out_of_range exception will be thrown.

Parameters
[in]nrThe number of the real time controller program to return

◆ input()

const DigitalInput * input ( unsigned int nr) const
inlineinherited

Returns a const pointer to a mvIMPACT::acquire::DigitalInput object.

If nr references an invalid pin an STL out_of_range exception will be thrown.

Note
The possibility to access the digital inputs of a device as single objects is just provided for convenience. The same thing can be achieved by calling the function mvIMPACT::acquire::IOSubSystem::readInputRegister.
Parameters
[in]nrThe number of the digital input.
Examples
DigitalIOs.cpp, and DigitalIOs.legacy.cpp.

◆ output()

DigitalOutput * output ( unsigned int nr) const
inlineinherited

Returns a pointer to a mvIMPACT::acquire::DigitalOutput object.

If nr references an invalid pin an STL out_of_range exception will be thrown.

Note
The possibility to access the digital outputs of a device as single objects is just provided for convenience. The same thing can be achieved by calling the function mvIMPACT::acquire::IOSubSystem::writeOutputRegister with the corresponding bit mask.
Parameters
[in]nrThe number of the digital output.
Examples
DigitalIOs.cpp, and DigitalIOs.legacy.cpp.

◆ readInputRegister()

virtual unsigned int readInputRegister ( void ) const
inlinevirtual

Returns the current state of the digital input register.

This function can be used to read all digital inputs as a single value. Each bit represents the status of one digital output pin.

EXAMPLE

A value of '3' returned by this function means that digital inputs 0 and 1 are currently have a voltage considered as logical '1' applied to them.

Implements IOSubSystem.

◆ readInputRegisterAtomic()

unsigned int readInputRegisterAtomic ( void ) const
inline

Returns the current state of the digital input register.

This function can be used to read all digital inputs as a single value at the same time. Each bit represents the status of one digital output pin.

EXAMPLE

A value of '3' returned by this function means that digital inputs 0 and 1 are currently have a voltage considered as logical '1' applied to them.

◆ readOutputRegister()

virtual unsigned int readOutputRegister ( void ) const
inlinevirtual

Returns the current state of the digital output register.

This function can be used to read all digital outputs as a single value. Each bit represents the status of one digital output pin.

EXAMPLE

A value of '3' returned by this function means that digital output 0 and 1 are currently set to high.

Implements IOSubSystem.

◆ readOutputRegisterAtomic()

unsigned int readOutputRegisterAtomic ( void ) const
inline

Returns the current state of the digital output register.

This function can be used to read all digital outputs as a single value at the same time. Each bit represents the status of one digital output pin.

EXAMPLE

A value of '3' returned by this function means that digital output 0 and 1 are currently set to high.

◆ RTCtrProgramCount()

unsigned int RTCtrProgramCount ( void ) const
inlineinherited

Returns the number of mvIMPACT::acquire::RTCtrProgram s available for the mvIMPACT::acquire::Device associated with this object.

Examples
DigitalIOs.cpp, and DigitalIOs.legacy.cpp.

◆ writeOutputRegister()

void writeOutputRegister ( unsigned int value,
unsigned int mask = UINT_MAX )
inlinevirtual

Alters the state of the digital output register.

This function can be used to alter the state of certain (or all) digital outputs with a single function call. By working with the parameter mask certain bits can remain unaffected.

EXAMPLE

If the previous state of a digital output register was '5', which means that outputs 0 and 2 are set to high a call to mvIMPACT::acquire::IOSubSystem::writeOutputRegister with value set to 2 and mask set to 3 would result in '6' as the new value for the output register. Pin 2 will remain unaffected, as mask states just to modify pin 0 and 1 ( 3 = 00000011 binary ).

Parameters
[in]valueThe value to be applied to the output register
[in]maskThe mask to specify which pins to modify. A bit set to '1' in this parameter means that the state of this output has to adopt its style according to the value in value.

Implements IOSubSystem.

◆ writeOutputRegisterAtomic()

void writeOutputRegisterAtomic ( unsigned int value,
unsigned int mask = UINT_MAX )
inline

Alters the state of the digital output register.

This function can be used to alter the state of certain (or all) digital outputs with a single function call at the same time. By working with the parameter mask certain bits can remain unaffected.

EXAMPLE

If the previous state of a digital output register was '5', which means that outputs 0 and 2 are set to high a call to mvIMPACT::acquire::IOSubSystem::writeOutputRegister with value set to 2 and mask set to 3 would result in '6' as the new value for the output register. Pin 2 will remain unaffected, as mask states just to modify pin 0 and 1 ( 3 = 00000011 binary ).

Parameters
[in]valueThe value to be applied to the output register
[in]maskThe mask to specify which pins to modify. A bit set to '1' in this parameter means that the state of this output has to adopt its style according to the value in value.

Member Data Documentation

◆ digitalInputThreshold

An enumerated integer property defining the threshold for the digital inputs in Volt.

If a voltage applied to the digital input lies above the threshold this pin will be considered as 'logic 1' otherwise it will be considered as 'logic 0'.

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

Note
This property is read-only for mvBlueFOX-M devices and will always be 2V.