17 #include <peak/dll_interface/peak_dll_interface_util.hpp> 48 std::string
Key()
const;
87 friend ClassCreator<DataStreamDescriptor>;
92 std::weak_ptr<Device> m_parentDevice;
93 std::weak_ptr<DataStream> m_openedDataStream;
109 : m_backendHandle(dataStreamDescriptorHandle)
110 , m_parentDevice(parentDevice)
111 , m_key(QueryStringFromCInterfaceFunction([&](
char* key,
size_t* keySize) {
123 return LockOrThrow(m_parentDevice);
128 auto dataStreamHandle = QueryNumericFromCInterfaceFunction<PEAK_DATA_STREAM_HANDLE>(
133 auto dataStream = std::make_shared<ClassCreator<DataStream>>(dataStreamHandle, m_parentDevice);
134 m_openedDataStream = dataStream;
140 return LockOrThrowOpenedModule(m_openedDataStream);
145 auto moduleDescriptorHandle = QueryNumericFromCInterfaceFunction<PEAK_MODULE_DESCRIPTOR_HANDLE>(
148 m_backendHandle, _moduleDescriptorHandle);
151 return moduleDescriptorHandle;
DataStreamDescriptor()=delete
DataStreamDescriptor & operator=(const DataStreamDescriptor &other)=delete
The "peak" namespace directly contains convenience functionality like the DeviceManager as well as th...
Definition: peak_dynamic_loader.h:32
std::shared_ptr< Device > ParentDevice() const
Returns the parent device.
Definition: peak_data_stream_descriptor.hpp:121
std::string Key() const
Returns the unique key.
Definition: peak_data_stream_descriptor.hpp:116
PEAK_C_API PEAK_DataStreamDescriptor_GetKey(PEAK_DATA_STREAM_DESCRIPTOR_HANDLE dataStreamDescriptorHandle, char *key, size_t *keySize)
Asks the given data stream descriptor for its key.
struct PEAK_MODULE_DESCRIPTOR * PEAK_MODULE_DESCRIPTOR_HANDLE
Definition: peak_backend.h:399
std::shared_ptr< DataStream > OpenedDataStream() const
Returns the DataStream that was opened with this DataStreamDescriptor.
Definition: peak_data_stream_descriptor.hpp:138
PEAK_C_API PEAK_DataStreamDescriptor_ToModuleDescriptor(PEAK_DATA_STREAM_DESCRIPTOR_HANDLE dataStreamDescriptorHandle, PEAK_MODULE_DESCRIPTOR_HANDLE *moduleDescriptorHandle)
Casts the given data stream descriptor to a module descriptor.
std::shared_ptr< DataStream > OpenDataStream()
Opens the data stream.
Definition: peak_data_stream_descriptor.hpp:126
The base class for all openable modules.
Definition: peak_module_descriptor.hpp:30
struct PEAK_DATA_STREAM * PEAK_DATA_STREAM_HANDLE
Definition: peak_backend.h:383
#define PEAK_C_ABI_PREFIX
Definition: peak_dll_defines.h:16
~DataStreamDescriptor() override=default
struct PEAK_DATA_STREAM_DESCRIPTOR * PEAK_DATA_STREAM_DESCRIPTOR_HANDLE
Definition: peak_backend.h:379
Encapsulates the GenTL functions associated with a GenTL DataStream module's ID.
Definition: peak_data_stream_descriptor.hpp:37
PEAK_C_API PEAK_DataStreamDescriptor_OpenDataStream(PEAK_DATA_STREAM_DESCRIPTOR_HANDLE dataStreamDescriptorHandle, PEAK_DATA_STREAM_HANDLE *dataStreamHandle)
Opens the data stream being associated with the given data stream descriptor.