IC Imaging Control C++

FrameSnapSink::snapSingle Method

FrameSnapSink::snapSingle Method

This method lets the FrameSnapSink copy the next image to be recevied from the device into a FrameQueueBuffer.
Syntax:
tFrameQueueBufferPtr  snapSingle( int64_t timeout_in_ms = -1 );
Error                 snapSingle( tFrameQueueBufferPtr& rval, int64_t timeout_in_ms = -1 );

Parameter Description
timeout_in_ms

Specifies the time the sink should wait for a frame to be received from the device before returning with an timeout error.

rval

This parameter receives a pointer to an image buffer that was received from the device. If rval is passed with a pointer to an existing image buffer, that image buffer is filled. Otherwise, one of the buffers allocated by a previous call to allocAndQueueBufferCache is used.

Return Value:

The first overload returns a pointer to a filled buffer. If no image was received before the timeout elapsed, this pointer might be nullptr.

The second overload returns an error value describing whether the function call succeeded.

Remarks:

The buffer is either pre-allocated by calling allocAndQueueBufferCache, or supplied as the in/out parameter rval.

This method blocks until either an image has been received, or the specified timeout has elapsed.

This function can only called after the device was started by calling Grabber::startLive.

See also: FrameSnapSink, FrameSnapSink::allocAndQueueBufferCache

<< FrameSnapSink

Get in touch with us


About The Imaging Source

Established in 1990, The Imaging Source is one of the leading manufacturers of industrial cameras, frame grabbers and video converters for production automation, quality assurance, logistics, medicine, science and security.

Our comprehensive range of cameras with USB 3.1, USB 3.0, USB 2.0, GigE interfaces and other innovative machine vision products are renowned for their high quality and ability to meet the performance requirements of demanding applications.

Automated Imaging Association ISO 9001:2015 certified

Contact us