A default request factory.
Applications need to derive from this class and must re-implement the function mv.impact.acquire.IRequestFactory.createRequest to work with custom objects derived from mv.impact.acquire.Request.
Deriving from mv.impact.acquire.Request can be useful when a certain device driver or device offers a custom feature that is returned as part of the request object that can not be accessed using the mv.impact.acquire.Request class offered by this interface.
Example
This shows how a request factory could be used to create custom request objects from within a mv.impact.acquire.FunctionInterface instance.
{
private void init()
{
}
public MyRequest(
Device pDev,
int requestNr)
: base(pDev, requestNr)
{
init();
}
public readonly EnumPropertyI<TRequestResult> myRequestResult = new EnumPropertyI<TRequestResult>();
}
public class MyRequestFactory : IRequestFactory
{
}
bool bindComponent(Component access, String name)
Binds an access object to an internal driver object.
Definition ComponentLocatorBase.cs:77
A class to locate components within the driver.
Definition DeviceComponentLocator.cs:74
This class and its functions represent an actual device detected by this interface in the current sys...
Definition Device.cs:91
Contains information about a captured buffer.
Definition Request.cs:77
DeviceComponentLocator getComponentLocator()
Returns a component locator for this request.
Definition Request.cs:453
Now the request factory must be passed to the constructor of the function interface
{
MyRequestFactory mrf = new MyRequestFactory();
{
MyRequest pMyRequest = (MyRequest)pRequest;
Console.WriteLine( "{0}: {1}", pMyRequest.myRequestResult.name, pMyRequest.myRequestResult.readS() );
}
}
The function interface to devices supported by this interface.
Definition FunctionInterface.cs:21
Request getRequest(int nr)
Returns a const pointer to the desired mv.impact.acquire.Request.
Definition FunctionInterface.cs:452
bool isOK
Convenience function to check if a request has been processed successfully.
Definition Request.cs:1173
This namespace contains classes and functions belonging to the image acquisition module of this SDK.
Definition Enumerations.cs:2
Definition Enumerations.cs:2
Definition Enumerations.cs:2
- Since
- 1.12.56