3#include "../../_cexports/c_gev_server.h"
4#include "../_decl/decl_node_map.hpp"
5#include "../_decl/decl_server.hpp"
6#include "../_decl/decl_stream.hpp"
7#include "../../driver/flow_set_pool.hpp"
8#include "../../driver/gendc_descriptor.hpp"
9#include "../logical_network_interface.hpp"
32 if (pixelFormat == PfncFormat::InvalidPixelFormat)
35 using namespace CExports;
36 auto pixelFormatName = PfncFormatValue::ToANSI(pixelFormat);
37 GSFixedSizeInitInfo init{GSSI_FixedSize,
38 static_cast<cvbuint32_t
>(pixelFormat),
39 pixelFormatName.c_str(),
40 static_cast<cvbuint32_t
>(size.
Width()),
41 static_cast<cvbuint32_t
>(size.
Height()),
46 CVB_CALL_CAPI(CreateGevServer2(
static_cast<TDriver
>(driverType),
reinterpret_cast<GSInitInfo &
>(init)))),
47 true, ProtectedTag{});
67 if (maxSize.
Width() < 1)
71 if (pixelFormat == PfncFormat::InvalidPixelFormat)
74 using namespace CExports;
75 GSDynamicSizeInitInfo init{GSFixedSizeInitInfo{GSSI_DynamicSize,
static_cast<CExports::cvbuint32_t
>(pixelFormat),
76 PfncFormatValue::ToANSI(pixelFormat).c_str(),
77 static_cast<CExports::cvbuint32_t
>(maxSize.
Width()),
78 static_cast<CExports::cvbuint32_t
>(maxSize.
Height()), intptr_t()},
79 static_cast<CExports::cvbuint32_t
>(maxSize.
Width()),
80 static_cast<CExports::cvbuint32_t
>(maxSize.
Height())};
84 CVB_CALL_CAPI(CreateGevServer2(
static_cast<TDriver
>(driverType),
reinterpret_cast<GSInitInfo &
>(init)))),
85 true, ProtectedTag{});
93 return gsStream_.AtomicGet([&]() {
Data type description for an image plane.
Definition data_type.hpp:23
static ServerPtr CreateNonStreaming()
Creates a non-streaming GigE Vision server object.
Definition detail_server.hpp:17
static ServerPtr CreateWithVariableSize(Size2D< int > maxSize, ColorModel colorModel, DataType dataType, GevServer::DriverType driverType=GevServer::DriverType::Auto)
Creates a new Server object with a client configurable width, height and offsets.
Definition detail_server.hpp:57
static ServerPtr CreateWithConstSize(Size2D< int > size, PfncFormat pixelFormat, GevServer::DriverType driverType=GevServer::DriverType::Auto)
Creates a new Server object with a constant width and height.
Definition detail_server.hpp:24
StreamPtr Stream() const
Gets the stream associated with the server.
Definition detail_server.hpp:90
Stores a pair of numbers that represents the width and the height of a subject, typically a rectangle...
Definition size_2d.hpp:20
T Height() const noexcept
Gets the vertical component of the size.
Definition size_2d.hpp:77
T Width() const noexcept
Gets the horizontal component of the size.
Definition size_2d.hpp:57
Namespace for GevServer based device configuration.
Definition decl_int_swiss_knife_node.hpp:11
std::shared_ptr< Stream > StreamPtr
Convenience shared pointer for Stream.
Definition gevserver.hpp:64
DriverType
GigE Vision driver to use for communication and streaming.
Definition gevserver.hpp:167
std::shared_ptr< Server > ServerPtr
Convenience shared pointer for GevServer.
Definition gevserver.hpp:43
PfncFormat
GenICam Pixel Format Naming Convention (PFNC) format values.
Definition pfnc_format.hpp:34
Root namespace for the Image Manager interface.
Definition version.hpp:11
ColorModel
Color model that this image is using.
Definition global.hpp:176
T const_pointer_cast(T... args)