Impact Acquire SDK C++
RTCtrProgram Class Reference

A class to represent real time control programs(Device specific interface layout only). More...

#include <mvIMPACT_acquire.h>

Inheritance diagram for RTCtrProgram:
[legend]

Public Member Functions

int getProgramSize (void) const
 Returns the number of program instructions for this program.
 
HOBJ hObj (void) const
 Returns a unique identifier for the component collection referenced by this object.
 
int load (void)
 Loads an existing program specified by the property mvIMPACT::acquire::RTCtrProgram::fileName.
 
RTCtrProgramoperator= (const RTCtrProgram &rhs)
 Allows assignments of mvIMPACT::acquire::RTCtrProgram objects.
 
RTCtrProgramStepprogramStep (unsigned int nr) const
 Returns a pointer to a program instruction of the program.
 
const ComponentCollectionrestoreDefault (void) const
 Restores the default for every component of this collection.
 
 RTCtrProgram (const RTCtrProgram &src)
 Constructs a new mvIMPACT::acquire::RTCtrProgram from an existing one.
 
int save (void)
 Stores the current state of the program under the name specified by the property mvIMPACT::acquire::RTCtrProgram::filename.
 
void setProgramSize (int newSize)
 A function to define the number of instructions this program should consist of.
 
 ~RTCtrProgram ()
 Class destructor.
 

Public Attributes

PropertyS filename
 A string property storing the filename for this program.
 
PropertyIRTCtrlModes mode
 An enumerated integer property defining the current state this program is into.
 
PropertyS programState
 A string property (read-only) containing information about the current state of the program.
 

Protected Attributes

HOBJ m_hRoot
 

Friends

class IOSubSystem
 

Detailed Description

A class to represent real time control programs(Device specific interface layout only).

Real time control programs can be used to control the way how an when images are exposed and transmitted to the user.

An mvIMPACT::acquire::RTCtrProgram e.g. can be used to achieve a constant frame rate with a desired frequency. This can be done e.g. by triggering the camera with a constant frequency.

An appropriate signal for triggering the camera can be generated as follows:

#include <mvIMPACT_CPP/mvIMPACT_acquire.h>
using namespace mvIMPACT::acquire;
void runAt10Hz( Device* pBF )
{
IOSubSystemBlueFOX bfIOs( pBF );
// define a HRTC program that results in a define image frequency
// the hardware real time controller shall be used to trigger an image
bfs.triggerSource.write( ctsRTCtrl );
// when the hardware real time controller switches the trigger signal to
// high the exposure of the image shall start
bfs.triggerMode.write( ctmOnRisingEdge );
// error checks
if( bfIOs.RTCtrProgramCount() == 0 )
{
// no HRTC controllers available (this never happens for the mvBlueFOX)
return;
}
RTCtrProgram* pRTCtrlProgram = bfIOs.getRTCtrProgram( 0 );
if( !pRTCtrlProgram )
{
// this only should happen if the system is short of memory
return;
}
// start of the program
// we need 5 steps for the program
pRTCtrlProgram->setProgramSize(5);
// wait a certain amount of time to achieve the desired frequency
int progStep = 0;
RTCtrProgramStep* pRTCtrlStep = 0;
pRTCtrlStep = pRTCtrlProgram->programStep( progStep++ );
pRTCtrlStep->clocks_us.write( 99900 );
// trigger an image
pRTCtrlStep = pRTCtrlProgram->programStep( progStep++ );
// high time for the trigger signal (should not be smaller than 100 us)
pRTCtrlStep = pRTCtrlProgram->programStep( progStep++ );
pRTCtrlStep->clocks_us.write( 100 );
// end trigger signal
pRTCtrlStep = pRTCtrlProgram->programStep( progStep++ );
// restart the program
pRTCtrlStep = pRTCtrlProgram->programStep( progStep++ );
pRTCtrlStep->opCode.write( rtctrlProgJumpLoc );
pRTCtrlStep->address.write( 0 );
// start the program
pRTCtrlProgram->mode.write( rtctrlModeRun );
// Now this camera will deliver images at exactly 10 Hz ( 1 / ( 99900 us + 100us ) )
// when it is constantly feed with image requests.
}
mvBlueFOX related camera settings(Device specific interface layout only).
Definition mvIMPACT_acquire.h:20010
This class and its functions represent an actual device detected by this interface in the current sys...
Definition mvIMPACT_acquire.h:6118
const EnumPropertyI & write(ZYX value, int index=0) const
Writes one value to the property.
Definition mvIMPACT_acquire.h:4426
A class to handle the digital inputs and outputs for mvBlueFOX USB cameras(Device specific interface ...
Definition mvIMPACT_acquire.h:16765
A class to represent one step of a real time control(RTCtr) program (Device specific interface layout...
Definition mvIMPACT_acquire.h:15659
PropertyI address
An integer property, which defines the absolute jump address within this mvIMPACT::acquire::RTCtrProg...
Definition mvIMPACT_acquire.h:15684
PropertyIRTProgOpCodes opCode
An enumerated integer property defining the general purpose of this mvIMPACT::acquire::RTCtrProgramSt...
Definition mvIMPACT_acquire.h:15721
PropertyI clocks_us
An integer property, which defines the waiting time mvIMPACT::acquire::RTCtrProgram.
Definition mvIMPACT_acquire.h:15694
A class to represent real time control programs(Device specific interface layout only).
Definition mvIMPACT_acquire.h:16004
PropertyIRTCtrlModes mode
An enumerated integer property defining the current state this program is into.
Definition mvIMPACT_acquire.h:16165
RTCtrProgramStep * programStep(unsigned int nr) const
Returns a pointer to a program instruction of the program.
Definition mvIMPACT_acquire.h:16147
void setProgramSize(int newSize)
A function to define the number of instructions this program should consist of.
Definition mvIMPACT_acquire.h:16123
@ ctsRTCtrl
Use real time controller (RTCtrl) as the source for the trigger signal.
Definition mvDriverBaseEnums.h:1584
@ rtctrlProgWaitClocks
Wait for n clocks.
Definition mvDriverBaseEnums.h:4723
@ rtctrlProgJumpLoc
Jump to location.
Definition mvDriverBaseEnums.h:4725
@ rtctrlProgTriggerReset
Reset internal trigger signal of the sensor controller.
Definition mvDriverBaseEnums.h:4729
@ rtctrlProgTriggerSet
Set internal trigger signal of the sensor controller.
Definition mvDriverBaseEnums.h:4727
@ ctmOnRisingEdge
Start the exposure of a frame when the trigger input level changes from low to high.
Definition mvDriverBaseEnums.h:1557
@ rtctrlModeRun
RTC switched on and NOT editable.
Definition mvDriverBaseEnums.h:4705
This namespace contains classes and functions belonging to the image acquisition module of this SDK.
Definition mvCommonDataTypes.h:34

Once this program has been defined it can be executed by setting the mode property to mvIMPACT::acquire::rtctrlModeRun. As in this example we do not wait for an external signal the property triggerMode must be set to a value demanding an external signal (e.g. mvIMPACT::acquire::ctmOnHighLevel ; You will find a summary of the valid trigger modes in the sensor specific data in the "Sensor data" chapter of the specific product manual. triggerMode must be set to mvIMPACT::acquire::ctsRTCtrl to inform the driver that the signal generate by the real time program shall be used as the trigger signal.

Note
mvIMPACT::acquire::RTCtrProgram objects can't be created directly! To access an mvIMPACT::acquire::RTCtrProgram associated with a certain device create an instance of an object derived from mvIMPACT::acquire::IOSubSystem and then use the function mvIMPACT::acquire::IOSubSystem::RTCtrProgramCount() to find out if there are hardware real time controller machines available for this device and if so how many of them can be accessed. Pointers to the machines then can be obtained by calling the function mvIMPACT::acquire::IOSubSystem::getRTCtrProgram() with the number of the controller (zero based) to be modified.
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, SequenceCapture.cpp, and SequenceCapture.win32.cpp.

Constructor & Destructor Documentation

◆ RTCtrProgram()

RTCtrProgram ( const RTCtrProgram & src)
inline

Constructs a new mvIMPACT::acquire::RTCtrProgram from an existing one.

Parameters
[in]srcA constant reference to the mvIMPACT::acquire::RTCtrProgram object, this object shall be created from

◆ ~RTCtrProgram()

~RTCtrProgram ( )
inline

Class destructor.

Member Function Documentation

◆ getProgramSize()

int getProgramSize ( void ) const
inline

Returns the number of program instructions for this program.

Returns
The number of program instructions for this program.

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

◆ load()

int load ( void )
inline

Loads an existing program specified by the property mvIMPACT::acquire::RTCtrProgram::fileName.

The default file extension for these programs is '*.rtp'. If the user doesn't specify this file extension, it is appended automatically. Only files of this type can be loaded by this function.

Returns

◆ operator=()

RTCtrProgram & operator= ( const RTCtrProgram & rhs)
inline

Allows assignments of mvIMPACT::acquire::RTCtrProgram objects.

◆ programStep()

RTCtrProgramStep * programStep ( unsigned int nr) const
inline

Returns a pointer to a program instruction of the program.

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

Returns
A pointer to a program instruction of the program.
Parameters
[in]nrThe index of the program instruction to obtain.
Examples
ContinuousCaptureToAVIFile.cpp, SequenceCapture.cpp, and SequenceCapture.win32.cpp.

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

◆ save()

int save ( void )
inline

Stores the current state of the program under the name specified by the property mvIMPACT::acquire::RTCtrProgram::filename.

The default file extension for files stored using this function is '*.rtp'. If the user doesn't specify this file extension, it is appended automatically. Only files of this type can be loaded by the function mvIMPACT::acquire::RTCtrProgram::load.

Returns

◆ setProgramSize()

void setProgramSize ( int newSize)
inline

A function to define the number of instructions this program should consist of.

Parameters
[in]newSizeThe new number of program instructions
Examples
ContinuousCaptureToAVIFile.cpp, SequenceCapture.cpp, and SequenceCapture.win32.cpp.

Friends And Related Symbol Documentation

◆ IOSubSystem

friend class IOSubSystem
friend

Member Data Documentation

◆ filename

PropertyS filename

A string property storing the filename for this program.

mvIMPACT::acquire::RTCtrProgram s can be stored and loaded from/to XML files. To do this, this property must be set to the desired filename.

See also
mvIMPACT::acquire::RTCtrProgram::load,
mvIMPACT::acquire::RTCtrProgram::save

◆ m_hRoot

HOBJ m_hRoot
protectedinherited

◆ mode

An enumerated integer property defining the current state this program is into.

In order to affect the behaviour of the image acquisition an mvIMPACT::acquire::RTCtrProgram must be in running mode. Apart from that the property triggerSource must be set appropriately.

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

Examples
ContinuousCaptureToAVIFile.cpp, SequenceCapture.cpp, and SequenceCapture.win32.cpp.

◆ programState

PropertyS programState

A string property (read-only) containing information about the current state of the program.