Impact Acquire SDK .NET
RTCtrProgram Class Referencesealed

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

Inheritance diagram for RTCtrProgram:
[legend]

Public Member Functions

IEnumerable< TgetEnumerable< T > ()
 Returns an enumerator of a certain type that iterates through the collection.
 
IEnumerator< intGetEnumerator ()
 Returns an enumerator that iterates through the collection.
 
int load ()
 Loads an existing program specified by the property mv.impact.acquire.RTCtrProgram.fileName.
 
RTCtrProgramStep programStep (int nr)
 Returns a pointer to a program instruction of the program.
 
void restoreDefault ()
 Restores the default for every component of this collection.
 
int save ()
 Stores the current state of the program under the name specified by the property mv.impact.acquire.RTCtrProgram.fileName.
 

Public Attributes

readonly PropertyS fileName = new PropertyS()
 A string property storing the filename for this program.
 
readonly EnumPropertyI< TRTCtrlModesmode = new EnumPropertyI<TRTCtrlModes>()
 An enumerated integer property defining the current state this program is into.
 
readonly PropertyS programState = new PropertyS()
 A string property (read-only) containing information about the current state of the program.
 

Properties

IEnumerable< ComponentcomponentEnumerable [get]
 Returns an enumerator that iterates through the collection.
 
IEnumerable< ComponentListcomponentListEnumerable [get]
 Returns an enumerator that iterates through all the mv.impact.acquire.ComponentList elements in the collection.
 
int hObj [get]
 Returns a unique identifier for the component collection referenced by this object.
 
int programSize [get, set]
 A property to control the number of instructions this program consist of.
 

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 mv.impact.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.

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

public 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
bfs.triggerSource.write(TCameraTriggerSource.ctsRTCtrl);
// when the hardware real time controller switches the trigger signal to
// high the exposure of the image shall start
bfs.triggerMode.write(TCameraTriggerMode.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 == 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.programSize = 5;
// wait a certain amount of time to achieve the desired frequency
int progStep = 0;
RTCtrProgramStep pRTCtrlStep = null;
pRTCtrlStep = pRTCtrlProgram.programStep(progStep++);
pRTCtrlStep.opCode.write(TRTProgOpCodes.rtctrlProgWaitClocks);
pRTCtrlStep.clocks_us.write(99900);
// trigger an image
pRTCtrlStep = pRTCtrlProgram.programStep(progStep++);
pRTCtrlStep.opCode.write(TRTProgOpCodes.rtctrlProgTriggerSet);
// high time for the trigger signal (should not be smaller than 100 us)
pRTCtrlStep = pRTCtrlProgram.programStep(progStep++);
pRTCtrlStep.opCode.write(TRTProgOpCodes.rtctrlProgWaitClocks);
pRTCtrlStep.clocks_us.write(100);
// end trigger signal
pRTCtrlStep = pRTCtrlProgram.programStep(progStep++);
pRTCtrlStep.opCode.write(TRTProgOpCodes.rtctrlProgTriggerReset);
// restart the program
pRTCtrlStep = pRTCtrlProgram.programStep(progStep++);
pRTCtrlStep.opCode.write(TRTProgOpCodes.rtctrlProgJumpLoc);
pRTCtrlStep.address.write(0);
// start the program
pRTCtrlProgram.mode.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.
}
mvBlueFOX related camera settings (Device specific interface layout only).
Definition CameraSettingsBlueFOX.cs:15
This class and its functions represent an actual device detected by this interface in the current sys...
Definition Device.cs:91
A template class to represent 32 bit integer properties and 32 bit enumerated integer properties.
Definition EnumPropertyI.cs:61
EnumPropertyI< T > write(T value)
Writes one value to the property.
Definition EnumPropertyI.cs:449
A class to handle the digital inputs and outputs for mvBlueFOX USB cameras (Device specific interface...
Definition IOSubSystemBlueFOX.cs:51
readonly EnumPropertyI< TRTProgOpCodes > opCode
An enumerated integer property defining the general purpose of this mv.impact.acquire....
Definition RTCtrProgramStep.cs:85
A class to represent real time control programs (Device specific interface layout only).
Definition RTCtrProgram.cs:104
readonly EnumPropertyI< TRTCtrlModes > mode
An enumerated integer property defining the current state this program is into.
Definition RTCtrProgram.cs:238
RTCtrProgramStep programStep(int nr)
Returns a pointer to a program instruction of the program.
Definition RTCtrProgram.cs:173
TCameraTriggerSource
Defined valid camera sensor trigger source values.
Definition mvDriverBaseEnums.cs:1424
TCameraTriggerMode
Defines valid camera sensor trigger modes.
Definition mvDriverBaseEnums.cs:1356

Once this program has been defined it can be executed by setting the mode property to mv.impact.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. mv.impact.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 mv.impact.acquire.TCameraTriggerSource.ctsRTCtrl to inform the driver that the signal generate by the real time program shall be used as the trigger signal.

Note
mv.impact.acquire.RTCtrProgram objects can't be created directly! To access an mv.impact.acquire.RTCtrProgram associated with a certain device create an instance of an object derived from mv.impact.acquire.IOSubSystem and then use the function mv.impact.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 mv.impact.acquire.IOSubSystem.getRTCtrProgram() with the number of the controller (zero based) to be modified.
This class will only be available if mv.impact.acquire.Device.interfaceLayout is set to mv.impact.acquire.TDeviceInterfaceLayout.dilDeviceSpecific before the device is opened.

Member Function Documentation

◆ getEnumerable< T >()

IEnumerable< T > getEnumerable< T > ( )
inlineinherited

Returns an enumerator of a certain type that iterates through the collection.

This interface will allow to e.g. write code like this:

Info info = new Info(pDev);
foreach (Property c in info.getEnumerable<Property>())
{
}
A class to query various general information about the device, its driver and other information.
Definition Info.cs:10
A base class for properties.
Definition Property.cs:109

See the frameworks documentation about the System.Collections.IEnumerable interface for more information.

Returns
An enumerator that iterates through the collection

◆ GetEnumerator()

IEnumerator< int > GetEnumerator ( )
inlineinherited

Returns an enumerator that iterates through the collection.

See the frameworks documentation about the System.Collections.IEnumerable interface for more information.

Returns
An enumerator that iterates through the collection

◆ load()

int load ( )
inline

Loads an existing program specified by the property mv.impact.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 ( int nr)
inline

Returns a pointer to a program instruction of the program.

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

◆ restoreDefault()

void restoreDefault ( )
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.

◆ save()

int save ( )
inline

Stores the current state of the program under the name specified by the property mv.impact.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 mv.impact.acquire.RTCtrProgram.load.

Returns

Member Data Documentation

◆ fileName

A string property storing the filename for this program.

mv.impact.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
mv.impact.acquire.RTCtrProgram.load,
mv.impact.acquire.RTCtrProgram.save

◆ mode

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

In order to affect the behaviour of the image acquisition an mv.impact.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 mv.impact.acquire.TRTCtrlModes.

◆ programState

readonly PropertyS programState = new PropertyS()

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

Property Documentation

◆ componentEnumerable

IEnumerable<Component> componentEnumerable
getinherited

Returns an enumerator that iterates through the collection.

This interface will allow to e.g. write code like this:

Info info = new Info(pDev);
foreach (Component c in info.componentEnumerable)
{
Console.WriteLine("{0}", c.name);
}
String name
Returns the name of the component referenced by this object.
Definition ComponentAccess.cs:167
A base class to implement access to internal driver components.
Definition Component.cs:133

See the frameworks documentation about the System.Collections.IEnumerable interface for more information.

Returns
An enumerator that iterates through the collection

◆ componentListEnumerable

IEnumerable<ComponentList> componentListEnumerable
getinherited

Returns an enumerator that iterates through all the mv.impact.acquire.ComponentList elements in the collection.

This interface will allow to e.g. write code like this:

Info info = new Info(pDev);
foreach (ComponentList cl in info.componentListEnumerable)
{
Console.WriteLine("{0}", cl.name);
}
A class to provide access to component lists.
Definition ComponentList.cs:14

See the frameworks documentation about the System.Collections.IEnumerable interface for more information.

Returns
An enumerator that iterates through the collection

◆ hObj

int hObj
getinherited

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

This handle will always reference an object of type mv.impact.acquire.ComponentList.

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

◆ programSize

int programSize
getset

A property to control the number of instructions this program consist of.