CVB++ 15.0
StreamBase Class Referenceabstract

Base class of all streams. More...

#include <cvb/driver/stream_base.hpp>

Inherits enable_shared_from_this< StreamBase >.

Inherited by CompositeStreamBase, and Stream.

Public Member Functions

DevicePtr Parent () const noexcept
 Gets the parent device of this stream. More...
 
virtual Cvb::Driver::AcquisitionInterface AcquisitionInterface () const noexcept=0
 Gets the interface of this implementation. More...
 
virtual void Start ()=0
 Starts the acquisition. More...
 
virtual void Stop ()=0
 Stops the acquisition. More...
 
virtual bool TryStop () noexcept=0
 Stops the acquisition. More...
 
virtual void Abort ()=0
 Stops the acquisition of images immediately. More...
 
virtual bool TryAbort () noexcept=0
 Stops the acquisition of images immediately. More...
 
virtual bool IsIndexed () const noexcept=0
 Gets whether this stream is an indexed stream. More...
 

Detailed Description

Base class of all streams.

Member Function Documentation

◆ Abort()

virtual void Abort ( )
pure virtual

Stops the acquisition of images immediately.

Exceptions
Anyexception derived from std::exception including CvbException.

This stops the acquisition as fast as possible interrupting the ongoing operation. This might result in partially acquired images. The acquisition is stopped in the device first, then the engine on the host is stopped.

If the underlying driver does not support this, this call behaves as if Stop() had been called.

Implemented in CompositeStreamBase, and Stream.

◆ AcquisitionInterface()

virtual Cvb::Driver::AcquisitionInterface AcquisitionInterface ( ) const
pure virtualnoexcept

Gets the interface of this implementation.

Returns
The current acquisition interface.
Exceptions
Doesnot throw any exception.

Implemented in CompositeStreamBase, and Stream.

◆ IsIndexed()

virtual bool IsIndexed ( ) const
pure virtualnoexcept

Gets whether this stream is an indexed stream.

Returns
True if indexed, false otherwise.
Exceptions
Doesnot throw any exception.
See also
IndexedStream

Implemented in CompositeStreamBase, IndexedStream, and Stream.

◆ Parent()

DevicePtr Parent ( ) const
inlinenoexcept

Gets the parent device of this stream.

Returns
The parent device pointer, or a null pointer if disconnected.
Exceptions
Doesnot throw any exception.

◆ Start()

virtual void Start ( )
pure virtual

Starts the acquisition.

Exceptions
Anyexception derived from std::exception including CvbException.

The acquisition engine is started in on the host first, then the stream on the device is started.

Implemented in CompositeStreamBase, and Stream.

◆ Stop()

virtual void Stop ( )
pure virtual

Stops the acquisition.

Exceptions
Anyexception derived from std::exception including CvbException.

This stops the acquisition gracefully letting the ongoing operation finish. The acquisition is stopped in the device first, then the engine on the host is stopped. The disadvantage may be that this call lasts until the timeout time of the last Wait() call.

Implemented in CompositeStreamBase, and Stream.

◆ TryAbort()

virtual bool TryAbort ( )
pure virtualnoexcept

Stops the acquisition of images immediately.

Returns
True if successfully stopped, false on error.
Exceptions
Doesnot throw any exception.

Same as Abort(), but does not throw.

Implemented in CompositeStreamBase, and Stream.

◆ TryStop()

virtual bool TryStop ( )
pure virtualnoexcept

Stops the acquisition.

Returns
True if successfully stopped, false on error.
Exceptions
Doesnot throw any exception.

Same as Stop(), but does not throw.

Implemented in CompositeStreamBase, and Stream.