CVB.Net 14.0
NamespaceDoc Class Reference

The namespace Stemmer.Cvb.Async contains extension methods for Driver.IAcquisition types (like Device Driver.Streams) to use it with async/await. More...

Detailed Description

The namespace Stemmer.Cvb.Async contains extension methods for Driver.IAcquisition types (like Device Driver.Streams) to use it with async/await.

To be able to use the async variants you need to use the this namespace:

static class Example
{
public static async Task Acquire10Images(Stream stream)
{
stream.Start();
try
{
for (int i = 0; i < 10; i++)
{
using (StreamImage image = await stream.WaitAsync())
{
// do processing...
}
}
}
finally
{
stream.Abort(); // ensure state after leaving method
}
}
}
Represents one acquisition stream of a Device.
Definition: Stream.cs:36
void Start()
Starts the acquisition.
Definition: Stream.cs:695
void Abort()
Stops the acquisition of images immediately.
Definition: Stream.cs:912
Base class of all stream related images.
Definition: StreamImage.cs:22
Definition: AcquisitionExtensions.cs:10
Definition: AccessToken.cs:10
Definition: AddNoise.cs:14