Functions | |
GEVSRV | CreateGevServer () |
Creates a GigE Vision Server version 1 object. More... | |
GEVSRV | CreateGevServer2 (TDriver DriverType, const GSInitInfo &InitInfo) |
Creates a GigE Vision Server version 2 object with the specified DriverType. More... | |
GEVSRV | CreateGevServerEx (TDriver DriverType) |
Creates a GigE Vision Server version 1 object with the specified DriverType. More... | |
cvbres_t | GSDriverType (GEVSRV Server, TDriver &DriverType) |
Gets which GigE Vision driver type is used by the server. More... | |
cvbbool_t | GSDriverTypePresent (TDriver DriverType) |
Gets whether the given DriverType is available on this machine. More... | |
cvbres_t | GSGetAcquisitionMode (GEVSRV Server, TAcquisitionMode &Mode) |
Gets the acquisition Mode used by the Server. More... | |
cvbres_t | GSGetImage (GEVSRV Server, IMG &Image) |
Gets the image object currently used by the Server object. More... | |
cvbres_t | GSGetInfoAsFloat (GEVSRV Server, TGSInfo Cmd, double &Info) |
Queries an information specified in Cmd from the given Server. More... | |
cvbres_t | GSGetInfoAsInteger (GEVSRV Server, TGSInfo Cmd, cvbint64_t &Info) |
Queries an information specified in Cmd from the given Server. More... | |
cvbres_t | GSGetInfoAsString (GEVSRV Server, TGSInfo Cmd, char *Info, size_t &Length) |
Queries an information specified in Cmd from the given Server as C string. More... | |
cvbres_t | GSGetInfoAsStringW (GEVSRV Server, TGSInfo Cmd, wchar_t *Info, size_t &Length) |
Queries an information specified in Cmd from the given Server as wide C string. More... | |
cvbres_t | GSGetLastErrorString (char *Error, size_t &Length) |
Gets the last string describing the reason of the last error. More... | |
cvbres_t | GSGetLocalIPv4 (GEVSRV Server, gsipv4 &IPv4, gsport &Port) |
Gets the IPv4 address and Port of this server instance. More... | |
cvbres_t | GSGetRemoteIPv4 (GEVSRV Server, gsipv4 &IPv4, gsport &Port) |
Gets the IPv4 address and Port of the controlling application. More... | |
cvbres_t | GSIsGenApiEventActive (GEVSRV Server, cvbuint16_t eventID, cvbbool_t &active) |
cvbres_t | GSRegisterEvent (GEVSRV Server, TServerEvent EventID, TFGEVSrv Callback, void *pPrivate, size_t &CallbackID) |
Registers the given EventID Callback on the Server. More... | |
cvbres_t | GSRegisterGenApiEvent (GEVSRV Server, const char *EventName, TGSNamespace Namespace, cvbuint16_t &eventID) |
Registers a GenApi event with the given EventName as C string. More... | |
cvbres_t | GSRegisterGenApiEventW (GEVSRV Server, const wchar_t *EventName, TGSNamespace Namespace, cvbuint16_t &eventID) |
Registers a GenApi event with the given EventName as wide C string. More... | |
cvbres_t | GSSendBlock (GEVSRV Server, const GSDataBlock &BlockInfo, const cvbuint8_t *pBlock, size_t BlockSize, TFGEVSrv BlockRelease, void *pPrivate) |
Sends a block of data identified by the given BlockInfo. More... | |
cvbres_t | GSSendCurrentImage (GEVSRV Server) |
Sends the image previously set by GSSetImage to the remote endpoint. More... | |
cvbres_t | GSSendEvent (GEVSRV Server, cvbuint16_t eventID) |
Sends a single event to the associated remote device. More... | |
cvbres_t | GSSendEventData (GEVSRV Server, cvbuint16_t eventID, const cvbuint8_t *pData, size_t DataSize) |
Sends an event with additional data to the associated remote device. More... | |
cvbres_t | GSSendImage (GEVSRV Server, IMG Image) |
Sends the given Image to the remote endpoint. More... | |
cvbres_t | GSSendImageCB (GEVSRV Server, IMG Image, TFGEVSrv ImageBlockRelease, void *pPrivate) |
Sends the given Image to the remote endpoint. More... | |
cvbres_t | GSSetAcquisitionMode (GEVSRV Server, TAcquisitionMode Mode) |
Sets the acquisition Mode to be used by the Server. More... | |
cvbres_t | GSSetImage (GEVSRV Server, IMG Image) |
Sets the image object to be used by the given Server object. More... | |
cvbres_t | GSSetInfoAsFloat (GEVSRV Server, TGSInfo Cmd, double Info) |
Sets an information specified in Cmd from the given Server. More... | |
cvbres_t | GSSetInfoAsInteger (GEVSRV Server, TGSInfo Cmd, cvbint64_t Info) |
Sets an information specified in Cmd from the given Server. More... | |
cvbres_t | GSSetInfoAsString (GEVSRV Server, TGSInfo Cmd, const char *Info) |
Sets an information specified in Cmd from the given Server. More... | |
cvbres_t | GSSetInfoAsStringW (GEVSRV Server, TGSInfo Cmd, const wchar_t *Info) |
Sets an information specified in Cmd from the given Server as a wide C string. More... | |
cvbres_t | GSStartIPv4 (GEVSRV Server, gsipv4 IPv4) |
Starts the given Server and binds it to the given IPv4 address at the standard GigE Vision control port (3956). More... | |
cvbres_t | GSStartIPv4Ex (GEVSRV Server, gsipv4 IPv4, gsport Port) |
Extended version of the GSStartIPv4 function. More... | |
cvbres_t | GSStartIPv4List (GEVSRV Server, const gsipv4 *IPv4List, size_t IPv4ListLength) |
List version of the GSStartIPv4 function. More... | |
cvbres_t | GSStop (GEVSRV Server) |
Stops the currently running Server. More... | |
cvbres_t | GSUnregisterEvent (GEVSRV Server, TServerEvent EventID, size_t CallbackID) |
Unregisters the given EventID from the Server. More... | |
cvbbool_t | IsGevServer (GEVSRV Server) |
Tries to check whether the given Server handle is a valid object. More... | |
GEVSRV CreateGevServer | ( | ) |
Creates a GigE Vision Server version 1 object.
This function automatically chooses the fastest available driver:
This server supports all acquisition modes in TAcquisitionMode. Also gzipped image transfer can be enabled in the client.
The created object is not started (not bound to an IP/port) and thus is freely configurable. By default no streaming is available (GSSetImage must be called if streaming is wanted) and packet resend is disabled for backwards compatibility.
After the basic configuration is done, call the GSStartIPv4 or GSStartIPv4Ex function.
nullptr
on error (Use GSGetLastErrorString function for a human readable error description).Creates a GigE Vision Server version 2 object with the specified DriverType.
This server only supports AM_Manual acquisition mode and does not support gzipped sending (can be done externally now).
The created object is not started (not bound to an IP/port) and thus is freely configurable. By default streaming is available as defined by the InitInfo and packet resend is enabled (if supported by the driver).
After the basic configuration is done, call the GSStartIPv4 or GSStartIPv4Ex function.
[in] | DriverType | Type of GigE Vision driver to use:
|
[in] | InitInfo | Initialization structure with default values for a server that can stream image data. |
nullptr
on error (Use GSGetLastErrorString function for a human readable error description).Creates a GigE Vision Server version 1 object with the specified DriverType.
This server supports all acquisition modes in TAcquisitionMode. Also gzipped image transfer can be enabled in the client.
The created object is not started (not bound to an IP/port) and thus is freely configurable. By default no streaming is available (GSSetImage must be called if streaming is wanted) and packet resend is disabled for backwards compatibility.
After the basic configuration is done, call the GSStartIPv4 or GSStartIPv4Ex function.
[in] | DriverType | Type of GigE Vision driver to use:
|
nullptr
on error (Use GSGetLastErrorString function for a human readable error description).Gets which GigE Vision driver type is used by the server.
[in] | Server | Server object to query. |
[out] | DriverType | Type of GigE Vision driver used: |
cvbbool_t GSDriverTypePresent | ( | TDriver | DriverType | ) |
Gets whether the given DriverType is available on this machine.
[in] | DriverType | Socket or filter driver to be tested for availability. |
cvbres_t GSGetAcquisitionMode | ( | GEVSRV | Server, |
TAcquisitionMode & | Mode | ||
) |
Gets the acquisition Mode used by the Server.
[in] | Server | Server object to query property. |
[out] | Mode | Current acquisition mode of the server. See TAcquisitionMode for possible modes. |
cvbres_t GSGetImage | ( | GEVSRV | Server, |
IMG & | Image | ||
) |
Gets the image object currently used by the Server object.
[in] | Server | Server object to query property. |
[out] | Image | Handle of the image object currently used; nullptr if none is set. |
Queries an information specified in Cmd from the given Server.
[in] | Server | Server to query information from. |
[in] | Cmd | Information to query. |
[out] | Info | To be filled with queried information. |
Queries an information specified in Cmd from the given Server.
[in] | Server | Server to query information from. |
[in] | Cmd | Information to query. |
[out] | Info | To be filled with queried information. |
Queries an information specified in Cmd from the given Server as C string.
[in] | Server | Server to query information from. |
[in] | Cmd | Information to query. |
[in] | Info | C string to be filled with queried information; nullptr for size query. |
[in,out] | Length | If Info is nullptr: Receives minimal buffer size needed; Size of Info in bytes (including zero termination) otherwise. |
Queries an information specified in Cmd from the given Server as wide C string.
[in] | Server | Server to query information from. |
[in] | Cmd | Information to query. |
[in] | Info | Wide C string to be filled with queried information; nullptr for size query. |
[in,out] | Length | If Info is nullptr: Receives minimal buffer size needed; Size of Info in bytes (including zero termination) otherwise. |
cvbres_t GSGetLastErrorString | ( | char * | Error, |
size_t & | Length | ||
) |
Gets the last string describing the reason of the last error.
[in] | Error | Buffer to be filled with last error message; nullptr to inquire minimal buffer size. |
[in,out] | Length | Number of bytes Error buffer has if Error is not nullptr ; if it is nullptr this parameter will contain the minimal number of bytes needed for the Error buffer including zero-termination. |
cvbres_t GSGetLocalIPv4 | ( | GEVSRV | Server, |
gsipv4 & | IPv4, | ||
gsport & | Port | ||
) |
Gets the IPv4 address and Port of this server instance.
If the server has not been started, the IPv4 and Port are 0.
[in] | Server | Server object to query. |
[out] | IPv4 | IP Address of the local endpoint. 0 for none. |
[out] | Port | Port of the local endpoint. 0 for none. |
cvbres_t GSGetRemoteIPv4 | ( | GEVSRV | Server, |
gsipv4 & | IPv4, | ||
gsport & | Port | ||
) |
Gets the IPv4 address and Port of the controlling application.
The controlling application is the remote endpoint. If no remote application is controlling the Server both IPv4 and Port are 0.
[in] | Server | Server object to query. |
[out] | IPv4 | IP Address of the remote endpoint. 0 for none. |
[out] | Port | Port of the remote endpoint. 0 for none. |
cvbres_t GSIsGenApiEventActive | ( | GEVSRV | Server, |
cvbuint16_t | eventID, | ||
cvbbool_t & | active | ||
) |
cvbres_t GSRegisterEvent | ( | GEVSRV | Server, |
TServerEvent | EventID, | ||
TFGEVSrv | Callback, | ||
void * | pPrivate, | ||
size_t & | CallbackID | ||
) |
Registers the given EventID Callback on the Server.
If the Server object is destroyed all callbacks are unregistered automatically.
[in] | Server | Server object to register event on. |
[in] | EventID | Event type to get notified on. |
[in] | Callback | Function pointer to function which is called in case the event is fired. |
[in] | pPrivate | Pointer to private data given as the callback function's parameter (e.g. pointer to a class). |
[out] | CallbackID | Server and EventID unique callback ID. Use this ID to unregister the Callback. |
cvbres_t GSRegisterGenApiEvent | ( | GEVSRV | Server, |
const char * | EventName, | ||
TGSNamespace | Namespace, | ||
cvbuint16_t & | eventID | ||
) |
Registers a GenApi event with the given EventName as C string.
This function creates the necessary GenApi nodes for event notification. After registration events can be sent via the GSSendEvent function if they have been activated by the remote client (check with GSIsGenApiEventActive).
[in] | Server | Server object to register event on. |
[in] | EventName | Name of the event to register. |
[in] | Namespace | Namespace of the GenApi nodes (GSNS_Standard for SFNC events). |
[out] | eventID | The registered event ID. |
cvbres_t GSRegisterGenApiEventW | ( | GEVSRV | Server, |
const wchar_t * | EventName, | ||
TGSNamespace | Namespace, | ||
cvbuint16_t & | eventID | ||
) |
Registers a GenApi event with the given EventName as wide C string.
This function creates the necessary GenApi nodes for event notification. After registration events can be sent via the GSSendEvent function if they have been activated by the remote client (check with GSIsGenApiEventActive).
[in] | Server | Server object to register event on. |
[in] | EventName | Name of the event to register. |
[in] | Namespace | Namespace of the GenApi nodes (GSNS_Standard for SFNC events). |
[out] | eventID | The registered event ID. |
cvbres_t GSSendBlock | ( | GEVSRV | Server, |
const GSDataBlock & | BlockInfo, | ||
const cvbuint8_t * | pBlock, | ||
size_t | BlockSize, | ||
TFGEVSrv | BlockRelease, | ||
void * | pPrivate | ||
) |
Sends a block of data identified by the given BlockInfo.
This function only is available in the AM_Manual acquisition mode. Also a remote endpoint must be present and the acquisition must have been started by the client.
In AM_Manual mode the SE_AcquisitionStart and SE_AcquisitionStop events can be used to get notified when the remote client starts and stops image streaming.
[in] | Server | Server object to send buffer with. |
[in] | BlockInfo | Information about the packet type to stream, color format, dimensions, etc. |
[in] | pBlock | Pointer to the data block to send. |
[in] | BlockSize | Size of pBlock in bytes. |
[in] | BlockRelease | Callback that is called when the image data in hImage is not needed anymore. |
[in] | pPrivate | Private data pointer given to each ImageBlockRelease call. |
cvbres_t GSSendCurrentImage | ( | GEVSRV | Server | ) |
Sends the image previously set by GSSetImage to the remote endpoint.
This function only is available in the AM_Manual acquisition mode. Also a remote endpoint must be present and the acquisition must be enabled.
In AM_Manual
mode the SE_AcquisitionStart and SE_AcquisitionStop events can be used to get notified when the remote client starts and stops image streaming.
[in] | Server | Server object to send image with. |
cvbres_t GSSendEvent | ( | GEVSRV | Server, |
cvbuint16_t | eventID | ||
) |
Sends a single event to the associated remote device.
Events are asynchronous messages from the server to the remote device, i.e. application.
No checks are done on the given eventID. The timestamp used for the event is the current Server timestamp tick at the time of the call.
[in] | Server | Server object to send event with. |
[in] | eventID | Event identifier (0x9000 and higher for custom ones). |
cvbres_t GSSendEventData | ( | GEVSRV | Server, |
cvbuint16_t | eventID, | ||
const cvbuint8_t * | pData, | ||
size_t | DataSize | ||
) |
Sends an event with additional data to the associated remote device.
Events are asynchronous messages from the server to the remote device, i.e. application.
No checks are done on the given eventID. The timestamp used for the event is the current Server timestamp tick at the time of the call.
[in] | Server | Server object to send event with. |
[in] | eventID | Event identifier (0x9000 and higher for custom ones). |
[in] | pData | Additional event data buffer to send. |
[in] | DataSize | Size of pData in bytes (up to 540 bytes). |
cvbres_t GSSendImage | ( | GEVSRV | Server, |
IMG | Image | ||
) |
Sends the given Image to the remote endpoint.
This function only is available in the AM_Manual acquisition mode. Also a remote endpoint must be present and the acquisition must have been started by the client.
In AM_Manual mode the SE_AcquisitionStart and SE_AcquisitionStop events can be used to get notified when the remote client starts and stops image streaming.
[in] | Server | Server object to send image with. |
[in] | Image | Image to send. This image must be compatible to the one set via GSSetImage (meaning same dimension and color format). |
cvbres_t GSSendImageCB | ( | GEVSRV | Server, |
IMG | Image, | ||
TFGEVSrv | ImageBlockRelease, | ||
void * | pPrivate | ||
) |
Sends the given Image to the remote endpoint.
This function only is available in the AM_Manual acquisition mode. Also a remote endpoint must be present and the acquisition must have been started by the client.
In AM_Manual mode the SE_AcquisitionStart and SE_AcquisitionStop events can be used to get notified when the remote client starts and stops image streaming.
[in] | Server | Server object to send image with. |
[in] | Image | Image to send. This image must be compatible to the one set via GSSetImage (meaning same dimension and color format). |
[in] | ImageBlockRelease | Callback that is called when the image data in hImage is not needed anymore. |
[in] | pPrivate | Private data pointer given to each ImageBlockRelease call. |
cvbres_t GSSetAcquisitionMode | ( | GEVSRV | Server, |
TAcquisitionMode | Mode | ||
) |
Sets the acquisition Mode to be used by the Server.
The possible acquisition mode depends on the set image object:
nullptr
.IGrab2
When a new image is set to the Server the highest possible mode is set (see GSSetImage function).
[in] | Server | Server object to set property. |
[in] | Mode | New acquisition mode to be used by the Server. |
cvbres_t GSSetImage | ( | GEVSRV | Server, |
IMG | Image | ||
) |
Sets the image object to be used by the given Server object.
This function sets the acquisition mode depending on the supported interfaces:
nullptr
.IGrab2
This value can only be set while the server is not running (not started). If a new image is to be sent while the Server is running use the AM_Manual and the GSSendImage function.
[in] | Server | Server object to set property. |
[in] | Image | Image to be used by Server. |
Sets an information specified in Cmd from the given Server.
[in] | Server | Server to set information to. |
[in] | Cmd | Information to set. |
[in] | Info | Information to set. |
Sets an information specified in Cmd from the given Server.
[in] | Server | Server to set information to. |
[in] | Cmd | Information to set. |
[in] | Info | Information to set. |
Sets an information specified in Cmd from the given Server.
[in] | Server | Server to set information to. |
[in] | Cmd | Type of information to set. |
[in] | Info | Buffer containing the new info to be set (zero terminated). |
Sets an information specified in Cmd from the given Server as a wide C string.
[in] | Server | Server to set information to. |
[in] | Cmd | Type of information to set. |
[in] | Info | Buffer containing the new info to be set (zero terminated). |
cvbres_t GSStartIPv4 | ( | GEVSRV | Server, |
gsipv4 | IPv4 | ||
) |
Starts the given Server and binds it to the given IPv4 address at the standard GigE Vision control port (3956).
After starting the server a remote client can connect and control the server.
[in] | Server | Server object to start. |
[in] | IPv4 | IP address to bind to. |
cvbres_t GSStartIPv4Ex | ( | GEVSRV | Server, |
gsipv4 | IPv4, | ||
gsport | Port | ||
) |
Extended version of the GSStartIPv4 function.
After starting the server a remote client can connect and control the server.
[in] | Server | Server object to start. |
[in] | IPv4 | IP address to bind to. |
[in] | Port | Port to bind server to; 0 for the default GigE Vision control port (3956). |
cvbres_t GSStartIPv4List | ( | GEVSRV | Server, |
const gsipv4 * | IPv4List, | ||
size_t | IPv4ListLength | ||
) |
List version of the GSStartIPv4 function.
After starting the server a remote client can connect and control the server.
The first interface specified (Interface #0) is the main interface to control the device (control and message channel). Device discovery will only list Interface #0. The other interfaces can only be used to stream data.
[in] | Server | Server object to start. |
[in] | IPv4List | IP addresses to bind to. |
[in] | IPv4ListLength | Number of elements in IPv4List; at most four entries (GigE Vision limitation). |
cvbres_t GSStop | ( | GEVSRV | Server | ) |
Stops the currently running Server.
This function stops the acquisition and control threads of the server and returns to the configuration state.
[in] | Server | Server object to stop. |
cvbres_t GSUnregisterEvent | ( | GEVSRV | Server, |
TServerEvent | EventID, | ||
size_t | CallbackID | ||
) |
Unregisters the given EventID from the Server.
The previously registered callback function is not called anymore.
[in] | Server | Server object to unregister event on. |
[in] | EventID | TServerEvent of the corresponding GSRegisterEvent call. |
[in] | CallbackID | Server and EventID unique callback ID returned by the GSRegisterEvent function. |
cvbbool_t IsGevServer | ( | GEVSRV | Server | ) |
Tries to check whether the given Server handle is a valid object.
nullptr
.[in] | Server | Server handle to check. |