All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
Pylon::IStreamGrabber Interface Referenceabstract

Low Level API: Interface to an (input) data stream. More...

#include <pylon/StreamGrabber.h>

Public Member Functions

virtual void Open (void)=0
 Opens the stream grabber.
 
virtual void Close (void)=0
 Closes the stream grabber. More...
 
virtual bool IsOpen (void) const =0
 Retrieve whether the stream grabber is open.
 
virtual StreamBufferHandle RegisterBuffer (void *Buffer, size_t BufferSize)=0
 Registers a buffer for subsequent use. More...
 
virtual const void * DeregisterBuffer (StreamBufferHandle)=0
 Deregisters the buffer. More...
 
virtual void PrepareGrab (void)=0
 Prepares grabbing. More...
 
virtual void FinishGrab (void)=0
 Stops grabbing. More...
 
virtual void QueueBuffer (StreamBufferHandle, const void *Context=NULL)=0
 Enqueues a buffer in the input queue. More...
 
virtual void CancelGrab (void)=0
 Cancels pending requests. More...
 
virtual bool RetrieveResult (GrabResult &)=0
 Retrieves a grab result from the output queue. More...
 
virtual WaitObjectGetWaitObject (void) const =0
 Returns the result event object. More...
 
virtual GenApi::INodeMap * GetNodeMap (void)=0
 Returns the associated stream grabber parameters. More...
 

Detailed Description

Low Level API: Interface to an (input) data stream.

Data is filled into user provided buffers. Before usage the buffers must be registered. After calling PrepareGrab() enter them into a queue to become filled.

The streamgrabber provides a output queue which contains filled data buffers. While the queue is not empty the associated wait object is signaled. Get the buffer using the RetrieveResult() method. When FinishGrab() is called the result queue remains open, so the data may be collected. It remains open until Close() resp. the device is closed.

Parameter of streamgrabber are controlled by the elements of a own NodeMap, which can be retrieved by calling GetNodeMap().

See Also
For an introduction into the usage of stream grabbers see Grabbing Images in the Programmer's Guide.

Member Function Documentation

virtual void Pylon::IStreamGrabber::CancelGrab ( void  )
pure virtual

Cancels pending requests.

, resources remain allocated. Following, the results must be retrieved from the Output Queue.

virtual void Pylon::IStreamGrabber::Close ( void  )
pure virtual

Closes the stream grabber.

Flushes the result queue and stops the thread.

virtual const void* Pylon::IStreamGrabber::DeregisterBuffer ( StreamBufferHandle  )
pure virtual

Deregisters the buffer.

Deregistering fails while the buffer is in use, so retrieve the buffer from the output queue after grabbing.

Note
Do not delete buffers before they are deregistered.
virtual void Pylon::IStreamGrabber::FinishGrab ( void  )
pure virtual

Stops grabbing.

Releases the resources and camera. Pending grab requests are canceled.

virtual GenApi::INodeMap* Pylon::IStreamGrabber::GetNodeMap ( void  )
pure virtual

Returns the associated stream grabber parameters.

If no parameters are available, NULL is returned.

virtual WaitObject& Pylon::IStreamGrabber::GetWaitObject ( void  ) const
pure virtual

Returns the result event object.

This object is associated with the result queue. The event is signaled when queue is non-empty

virtual void Pylon::IStreamGrabber::PrepareGrab ( void  )
pure virtual

Prepares grabbing.

Allocates resources, synchronizes with the camera and locks critical parameter

virtual void Pylon::IStreamGrabber::QueueBuffer ( StreamBufferHandle  ,
const void *  Context = NULL 
)
pure virtual

Enqueues a buffer in the input queue.

PrepareGrab is required to queue buffers. The context is returned together with the buffer and the grab result. It is not touched by the stream grabber. It is illegal to queue a buffer a second time before it is fetched from the result queue.

virtual StreamBufferHandle Pylon::IStreamGrabber::RegisterBuffer ( void *  Buffer,
size_t  BufferSize 
)
pure virtual

Registers a buffer for subsequent use.

Stream must be locked to register buffers The Buffer size may not exceed the value specified when PrepareGrab was called.

virtual bool Pylon::IStreamGrabber::RetrieveResult ( GrabResult )
pure virtual

Retrieves a grab result from the output queue.

Returns
When result was available true is returned and and the first result is copied into the grabresult. Otherwise the grabresult remains unchanged and false is returned.

The documentation for this interface was generated from the following file:

pylon 5.0.5
Copyright © 2006-2016 Basler AG (Thu Aug 11 2016 18:01:28)