![SVS-Vistek CameraLink svs16000 Скачать руководство пользователя страница 66](http://html.mh-extra.com/html/svs-vistek/cameralink-svs16000/cameralink-svs16000_user-manual_1410864066.webp)
Users Manual Area Scan Cameras SVSGigE
Page 66
Users Manual –svs11002 and svs16000
© SVS-VISTEK GmbH
The SDK allows for determining the maximal possible network packet size
automatically based on “test frames” that are defined in the GigE Vision specification.
Therefore the following function has to be called before opening a streaming channel
on a given network topology:
SVGigE_RETURN
Camera_evaluateMaximalPacketSize(hCamera,
// a valid camera handle
&MaximalPacketSize);
// the result will be returned to this variable
In all standalone (non-Multicast) applications the determined value should be used
unchanged since it represents a value that allows for highest performance and
reliability of the image data transfer under given circumstances.
Nevertheless, there might be situations like multicast scenarios, where the master of
a camera needs to intentionally further limit the packet size in order to allow all clients
to connect to an image stream with their specific maximal network packet size. In that
case the master application can use the following function for limiting the network
packet size to a value below the previously determined maximal packet size:
SVGigE_RETURN
Camera_setStreamingPacketSize(hCamera,
// a valid camera handle
StreamingPacketSize);
// intended new streaming packet size
16.11.5 Opening a streaming channel
The main goal for operating cameras is to get an image stream back to the
application. Once a connection to the desired camera has been opened a stream can
be initiated and a callback function for receiving that stream can be registered.
if( SVGigE_SUCCESS !=
StreamingChannel_create (
&StreamingChannel,
// a streaming channel handle will be returned
CameraClient,
// a valid camera container client handle
Camera,
// a valid camera handle
BufferCount,
// buffer count
&ImageCallback,
// callback function pointer where images are delivered to
this) )
// the this pointer serves as a context that will be returned
return;
// each time the callback function is called
The application will receive a handle for the streaming channel on success. That
handle will be used later for shutting down the streaming channel once the application
has finished working with the channel.
StreamingChannel_delete(StreamingChannel);
Between opening and closing the streaming channel an application specific callback
function will be called for every image that the camera has captured. It is up to the
application to process the image further in that callback function.
16.11.6 Receiving images in a callback function
It is important that the application defines the callback function as
__stdcall
in order to
make sure that the arguments are passed through correctly.
SVGigE_RETURN __stdcall ImageCallback(Image_handle Image, void* Context);
The
Context
argument will have the same value as it was provided by the application
when creating the streaming channel. It can be used for example for establishing a
reference to the object that is expected to receive that image stream in one of its
member functions.
In the
Image
parameter the application will find a handle to the just captured camera
image. That handle will be used to query all needed information about the image from
the SVGigE DLL. The image handle is valid only inside the current call to the callback
function. Any use of an image handle at a time will always result in receiving an error
code back from the function that was tried. Thus the usual way for further image
processing is to query all interesting information inside the callback function and to
copy that information into a structure that remains accessible to the application after
returning from the callback function.
IMAGE_INFO *ImageInfo = new IMAGE_INFO;
ImageInfo->ImageData
= Image_getDataPointer(Image);
Содержание CameraLink svs16000
Страница 61: ...Users Manual Area Scan Cameras SVSGigE Page 61 Users Manual svs11002 and svs16000 SVS VISTEK GmbH ...
Страница 62: ...Users Manual Area Scan Cameras SVSGigE Page 62 Users Manual svs11002 and svs16000 SVS VISTEK GmbH ...
Страница 63: ...Users Manual Area Scan Cameras SVSGigE Page 63 Users Manual svs11002 and svs16000 SVS VISTEK GmbH ...
Страница 90: ...Users Manual SVS11002 and SVS16000 SVS VISTEK GmbH Press OK You are done ...