Impact Acquire SDK Java
RTCtrProgram Class Reference

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

Inheritance diagram for RTCtrProgram:
[legend]

Public Member Functions

synchronized void delete ()
 
PropertyS getFilename ()
 A string property storing the filename for this program.
 
PropertyI getMode ()
 An enumerated integer property defining the current state this program is into.
 
int getProgramSize ()
 Returns the number of program instructions for this program.
 
PropertyS getProgramState ()
 A string property (read-only) containing information about the current state of the program.
 
int hObj ()
 Returns a unique identifier for the component collection referenced by this object.
 
int load ()
 Loads an existing program specified by the property mvIMPACT.acquire.RTCtrProgram.fileName.
 
RTCtrProgramStep programStep (long nr)
 Returns a pointer to a program instruction of the program.
 
ComponentCollection restoreDefault ()
 Restores the default for every component of this collection.
 
 RTCtrProgram (RTCtrProgram src)
 Constructs a new mvIMPACT.acquire.RTCtrProgram from an existing one.
 
int save ()
 Stores the current state of the program under the name specified by the property mvIMPACT.acquire.RTCtrProgram.getFilename().
 
void setProgramSize (int newSize)
 A function to define the number of instructions this program should consist of.
 

Protected Member Functions

void finalize ()
 
 RTCtrProgram (long cPtr, boolean cMemoryOwn)
 

Static Protected Member Functions

static long swigRelease (ComponentCollection obj)
 
static long swigRelease (RTCtrProgram obj)
 

Protected Attributes

transient boolean swigCMemOwn
 

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.

//=============================================================================
public static void runAt10Hz( Device pBF )
//=============================================================================
{
// define a HRTC program that results in a define image frequency
// the hardware real time controller shall be used to trigger an image
// when the hardware real time controller switches the trigger signal to
// high the exposure of the image shall start
// error checks
if( bfIOs.RTCtrProgramCount() == 0 )
{
// no HRTC controllers available (this never happens for the mvBlueFOX)
return;
}
RTCtrProgram pRTCtrlProgram = bfIOs.getRTCtrProgram( 0 );
if( pRTCtrlProgram == null )
{
// 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 = null;
pRTCtrlStep = pRTCtrlProgram.programStep( progStep++ );
pRTCtrlStep.getOpCode().write( TRTProgOpCodes.rtctrlProgWaitClocks );
pRTCtrlStep.getClocks_us().write( 99900 );
// trigger an image
pRTCtrlStep = pRTCtrlProgram.programStep( progStep++ );
pRTCtrlStep.getOpCode().write( TRTProgOpCodes.rtctrlProgTriggerSet );
// high time for the trigger signal (should not be smaller than 100 us)
pRTCtrlStep = pRTCtrlProgram.programStep( progStep++ );
pRTCtrlStep.getOpCode().write( TRTProgOpCodes.rtctrlProgWaitClocks );
pRTCtrlStep.getClocks_us().write( 100 );
// end trigger signal
pRTCtrlStep = pRTCtrlProgram.programStep( progStep++ );
pRTCtrlStep.getOpCode().write( TRTProgOpCodes.rtctrlProgTriggerReset );
// restart the program
pRTCtrlStep = pRTCtrlProgram.programStep( progStep++ );
pRTCtrlStep.getOpCode().write( TRTProgOpCodes.rtctrlProgJumpLoc );
pRTCtrlStep.getAddress().write( 0 );
// start the program
pRTCtrlProgram.getMode().write( TRTCtrlModes.rtctrlModeRun );
// Now this camera will deliver images at exactly 10 Hz ( 1 / ( 99900 us + 100us ) )
// when it is constantly feed with image requests.
}
PropertyI getTriggerMode()
An enumerated integer property which defines what kind of trigger mode shall be used for an image acq...
Definition CameraSettingsBlueDevice.java:289
mvBlueFOX related camera settings(Device specific interface layout only).
Definition CameraSettingsBlueFOX.java:21
PropertyI getTriggerSource()
An enumerated integer property defining where the trigger signal is expected to occur.
Definition CameraSettingsBlueFOX.java:261
This class and its functions represent an actual device detected by this interface in the current sys...
Definition Device.java:52
A class to handle the digital inputs and outputs for mvBlueFOX USB cameras(Device specific interface ...
Definition IOSubSystemBlueFOX.java:126
long RTCtrProgramCount()
Returns the number of mvIMPACT.acquire.RTCtrProgram s available for the mvIMPACT.acquire....
Definition IOSubSystem.java:97
RTCtrProgram getRTCtrProgram(long nr)
Returns a pointer to a mvIMPACT.acquire.RTCtrProgram associated with this device.
Definition IOSubSystem.java:91
PropertyI write(int value, int index)
Writes one value to the property.
Definition PropertyI.java:350
PropertyI getOpCode()
An enumerated integer property defining the general purpose of this mvIMPACT.acquire....
Definition RTCtrProgramStep.java:134
A class to represent real time control programs(Device specific interface layout only).
Definition RTCtrProgram.java:241
PropertyI getMode()
An enumerated integer property defining the current state this program is into.
Definition RTCtrProgram.java:329
RTCtrProgramStep programStep(long nr)
Returns a pointer to a program instruction of the program.
Definition RTCtrProgram.java:316
void setProgramSize(int newSize)
A function to define the number of instructions this program should consist of.
Definition RTCtrProgram.java:293
Defines valid camera sensor trigger modes.
Definition TCameraTriggerMode.java:17
static final int ctmOnRisingEdge
Start the exposure of a frame when the trigger input level changes from low to high.
Definition TCameraTriggerMode.java:66
Defined valid camera sensor trigger source values.
Definition TCameraTriggerSource.java:15
static final int ctsRTCtrl
Use real time controller (RTCtrl) as the source for the trigger signal.
Definition TCameraTriggerSource.java:21

Once this program has been defined it can be executed by setting the mode property to mvIMPACT.acquire.TRTCtrlModes.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.TCameraTriggerMode.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.TCameraTriggerSource.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.getInterfaceLayout() is set to mvIMPACT.acquire.TDeviceInterfaceLayout.dilDeviceSpecific before the device is opened.

Constructor & Destructor Documentation

◆ RTCtrProgram() [1/2]

RTCtrProgram ( long cPtr,
boolean cMemoryOwn )
protected

◆ RTCtrProgram() [2/2]

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

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

Member Function Documentation

◆ delete()

synchronized void delete ( )

Reimplemented from ComponentCollection.

◆ finalize()

void finalize ( )
protected

Reimplemented from ComponentCollection.

◆ getFilename()

PropertyS getFilename ( )

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

◆ getMode()

PropertyI getMode ( )

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.

◆ getProgramSize()

int getProgramSize ( )

Returns the number of program instructions for this program.

Returns
The number of program instructions for this program.

◆ getProgramState()

PropertyS getProgramState ( )

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

◆ hObj()

int hObj ( )
inherited

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 ( )

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

◆ programStep()

RTCtrProgramStep programStep ( long nr)

Returns a pointer to a program instruction of the program.

Returns
A pointer to a program instruction of the program.
Parameters
nr[in] The index of the program instruction to obtain.

◆ restoreDefault()

ComponentCollection restoreDefault ( )
inherited

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 ( )

Stores the current state of the program under the name specified by the property mvIMPACT.acquire.RTCtrProgram.getFilename().

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)

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

Parameters
newSize[in] The new number of program instructions

◆ swigRelease() [1/2]

static long swigRelease ( ComponentCollection obj)
staticprotectedinherited

◆ swigRelease() [2/2]

static long swigRelease ( RTCtrProgram obj)
staticprotected

Member Data Documentation

◆ swigCMemOwn

transient boolean swigCMemOwn
protectedinherited