CVB++ 15.0
decl_genicam_device.hpp
1#pragma once
2
3#include "../../_decl/decl_device.hpp"
4
5namespace Cvb
6{
7
8 CVB_BEGIN_INLINE_NS
9
10 namespace Driver
11 {
12
14
18 class GenICamDevice : public Device
19 {
20
21 public:
22 GenICamDevice(HandleGuard<Device> &&guard, const String &fileName = {}) noexcept
23 : Device(std::move(guard), fileName)
24 {
25 AnnounceStreams(static_cast<int>(Internal::DoResCallValueOut<size_t>(
26 [this](size_t &count) { return CExports::CVDDeviceGetStreamCount(Handle(), count); })));
27 }
28
30
36 template <class T>
37 std::shared_ptr<T> Stream(int index) const;
38
40
46 template <class T>
48 {
49 return Stream<T>(0);
50 }
51
52 StreamPtr Stream() const override
53 {
54 return {};
55 }
56
57 protected:
58 StreamBasePtr CreateStream(int index, StreamType streamType) const override;
59
60 DeviceImagePtr CreateDeviceImage() const override
61 {
62 throw std::logic_error("GenICam devices do not support a device image");
63 }
64 };
65
66 } // namespace Driver
67
69
70 CVB_END_INLINE_NS
71
72} // namespace Cvb
void * Handle() const noexcept
Classic API device handle.
Definition decl_device.hpp:122
A device representing a GenICam compliant device.
Definition decl_genicam_device.hpp:19
StreamPtr Stream() const override
Get the stream for this device.
Definition decl_genicam_device.hpp:52
std::shared_ptr< T > Stream() const
Get the first stream for this device.
Definition decl_genicam_device.hpp:47
T move(T... args)
Namespace for driver or device related operations.
Definition decl_composite.hpp:28
std::shared_ptr< Stream > StreamPtr
Convenience shared pointer for Stream.
Definition driver.hpp:105
@ String
String value.
Definition driver.hpp:366
std::shared_ptr< DeviceImage > DeviceImagePtr
Convenience shared pointer for DeviceImage.
Definition driver.hpp:61
std::shared_ptr< StreamBase > StreamBasePtr
Convenience shared pointer for StreamBase.
Definition driver.hpp:113
Root namespace for the Image Manager interface.
Definition c_bayer_to_rgb.h:17