CVBpy 14.1
Server Class Reference

Common Vision Blox GigE Vision Server implements a GigE Vision camera in software. More...

Inherits object.

Public Member Functions

cvb.gevserver.Server create_non_streaming ()
 Creates a non-streaming GigE Vision server object. More...
 
cvb.gevserver.Server create_with_const_size (cvb.Size2D size, int color_model, cvb.DataType data_type=cvb.DataType.Int8BppSigned, int driver_type=cvb.gevserver.DriverType.Auto)
 Creates a new server object with a constant width and height. More...
 
cvb.gevserver.Server create_with_const_size_pfnc (cvb.Size2D size, int pixel_format, int driver_type=cvb.gevserver.DriverType.Auto)
 Creates a new server object with a constant width and height. More...
 
cvb.gevserver.Server create_with_variable_size (cvb.Size2D max_size, int color_model, cvb.DataType data_type, int driver_type=cvb.gevserver.DriverType.Auto)
 Creates a new server object with a client configurable width, height and offsets. More...
 
cvb.gevserver.Server create_with_variable_size_pfnc (cvb.Size2D max_size, int pixel_format, int driver_type=cvb.gevserver.DriverType.Auto)
 Creates a new server object with a client configurable width, height and offsets. More...
 
None start (self, Union[str, int] ip_address)
 Starts this server and binds it to the given ip_address. More...
 
None stop (self)
 Stops this server. More...
 

Properties

 driver_type = property
 int: Gets the GigE Vision driver type used by this server object (see cvb.gevserver.DriverType).
 
 local_endpoint = property
 cvb.NetworkConnection: Gets the local end point this server is bound to (see cvb.NetworkConnection). More...
 
 node_map = property
 cvb.gevserver.NodeMap: Gets this servers node map.
 
 remote_endpoint = property
 cvb.NetworkConnection: Gets the remote end point this server is connected to (see cvb.NetworkConnection). More...
 
 state = property
 int: Gets the current state this server is in (see cvb.gevserver.State).
 
 stream = property
 cvb.Stream: Gets the Cvb.GevServer.Stream for sending Images or other data. More...
 
 user_version = property
 str: Gets or sets the user defined version that is appended to the device version. More...
 

Detailed Description

Common Vision Blox GigE Vision Server implements a GigE Vision camera in software.

Member Function Documentation

◆ create_non_streaming()

cvb.gevserver.Server create_non_streaming ( )

Creates a non-streaming GigE Vision server object.

For stream-capable variants see create_server_const_size(size, color_model, data_type, driver_type) or create_server_variable_size(max_size, color_model, data_type, driver_type). You can use this server for pure communication use cases via the GenApi (think for example of a lighting controller or motor lens).

Returns

cvb.gevserver.Server Newly created non-streaming server object in cvb.gevserver.State.Configuration..

◆ create_with_const_size()

cvb.gevserver.Server create_with_const_size ( cvb.Size2D  size,
int  color_model,
cvb.DataType   data_type = cvb.DataType.Int8BppSigned,
int   driver_type = cvb.gevserver.DriverType.Auto 
)

Creates a new server object with a constant width and height.

Tries to map the given and to a PfncFormat. If you wish to change the payload size (for example because you want to send chunk data), you can set it on the PayloadSizeValue node in cvb.gevserver.State.Configuration state.

Parameters

size : cvb.Size2D Width and height in pixels.

color_model : int Color model of the image to send (see cvb.ColorModel).

data_type : cvb.DataType Data type of the image to send.

driver_type : int The driver type to use. Newly created server object in cvb.gevserver.State.Configuration state (see cvb.gevserver.DriverType).

Returns

cvb.gevserver.Server Newly created server object in cvb.gevserver.State.Configuration.

◆ create_with_const_size_pfnc()

cvb.gevserver.Server create_with_const_size_pfnc ( cvb.Size2D  size,
int  pixel_format,
int   driver_type = cvb.gevserver.DriverType.Auto 
)

Creates a new server object with a constant width and height.

If you wish to change the payload size (for example because you want to send chunk data), you can set it on the PayloadSizeValue node in State.Configuration.

Parameters

size : cvb.Size2D Width and height in pixels.

pixel_format : int GenICam PFNC format value (see cvb.PfncFormat).

driver_type : int The driver type to use (see cvb.gevserver.DriverType).

Returns

cvb.gevserver.Server Newly created server object in State.Configuration.

◆ create_with_variable_size()

cvb.gevserver.Server create_with_variable_size ( cvb.Size2D  max_size,
int  color_model,
cvb.DataType  data_type,
int   driver_type = cvb.gevserver.DriverType.Auto 
)

Creates a new server object with a client configurable width, height and offsets.

Tries to map the given color_model and data_type to a PfncFormat. If you wish to change the payload size (for example because you want to send chunk data), you can set it on the PayloadSizeValue node in cvb.gevserver.State.Configuration state.

Parameters

max_size : cvb.Size2D Maximal width and height in pixels.

color_model : int Color model of the image to send (see cvb.ColorModel).

data_type : cvb.DataType Data type of the image to send.

driver_type : int The driver type to use (see cvb.gevserver.DriverType).

Returns

cvb.gevserver.Server Newly created server object in cvb.gevserver.State.Configuration state.

◆ create_with_variable_size_pfnc()

cvb.gevserver.Server create_with_variable_size_pfnc ( cvb.Size2D  max_size,
int  pixel_format,
int   driver_type = cvb.gevserver.DriverType.Auto 
)

Creates a new server object with a client configurable width, height and offsets.

If you wish to change the payload size (for example because you want to send chunk data), you can set it on the PayloadSizeValue node in cvb.gevserver.State.Configuration State.

Parameters

max_size : cvb.Size2D Width and height in pixels.

pixel_format : int GenICam PFNC format value (see cvb.PfncFormat).

driver_type : int The driver type to use (see cvb.gevserver.DriverType).

Returns

cvb.gevserver.Server Newly created server object in cvb.gevserver.State.Configuration.

◆ start()

None start (   self,
Union[str, int]  ip_address 
)

Starts this server and binds it to the given ip_address.

All communication channels are bound and the GenApi XML description is generated. On success the state changes to cvb.gevserver.State.Disconnected.

Parameters

ip_address : Union[str, int] IP address version 4 to bind to as string or unsigned integer.

◆ stop()

None stop (   self)

Stops this server.

Stopping the server results, depending on the current state, in a chain from cvb.gevserver.State.AcquisitionEnabled to cvb.gevserver.State.Connected to cvb.gevserver.State.Disconnected to cvb.gevserver.State.Configuration.

Property Documentation

◆ local_endpoint

local_endpoint = property
static

cvb.NetworkConnection: Gets the local end point this server is bound to (see cvb.NetworkConnection).

Network connection containing the current IP address and port. This value is only set if state is not cvb.gevserver.State.Configuration.

◆ remote_endpoint

remote_endpoint = property
static

cvb.NetworkConnection: Gets the remote end point this server is connected to (see cvb.NetworkConnection).

Network connection containing the current IP address and port. Empty if not connected.This value is only set if state is cvb.gevserver.State.Connected or cvb.gevserver.State.AcquisitionEnabled.

◆ stream

stream = property
static

cvb.Stream: Gets the Cvb.GevServer.Stream for sending Images or other data.

The Cvb.GevServer.Stream object if this server object is streaming capable; empty hull for non-streaming server. This property is only non-empty if you created the server object via create_server_const_size(Size2D, ColorModel, DataType, DriverType) or create_server_variable_size(Size2D, ColorModel, DataType, DriverType).

◆ user_version

user_version = property
static

str: Gets or sets the user defined version that is appended to the device version.

This property is mandatory as soon as you change anything about the GenApi nodes! As the GenApi XML description is auto-generated the client needs a way to distinguish between different server instances with differing feature sets. If you change anything about the GenApi nodes on certain user version, you must increase the NodeMap.XmlFileVersion. This version information is appended to the CVGevServer version. The available memory for the overall information is limited by the GigE Vision standard to 32 bytes which results in up to 31 ASCII characters text (actual encoding is UTF-8) as strings must be null-terminated. Longer version information is silently cropped!