17#include <peak/dll_interface/peak_dll_interface_util.hpp>
51 std::string
Key()
const;
68 std::string
TLType()
const;
108 friend ClassCreator<InterfaceDescriptor>;
113 std::weak_ptr<System> m_parentSystem;
114 std::weak_ptr<Interface> m_openedInterface;
130 : m_backendHandle(interfaceDescriptorHandle)
131 , m_parentSystem(parentSystem)
132 , m_key(QueryStringFromCInterfaceFunction([&](char* key, size_t* keySize) {
144 return QueryRawInformationFromCInterfaceFunction([&](int32_t* dataType, uint8_t* buffer,
size_t* bufferSize) {
146 m_backendHandle, infoCommand, dataType, buffer, bufferSize);
152 return QueryStringFromCInterfaceFunction([&](
char* displayName,
size_t* displayNameSize) {
154 m_backendHandle, displayName, displayNameSize);
160 return QueryStringFromCInterfaceFunction([&](
char* tlType,
size_t* tlTypeSize) {
167 return LockOrThrow(m_parentSystem);
172 auto interfaceHandle = QueryNumericFromCInterfaceFunction<PEAK_INTERFACE_HANDLE>(
177 auto interface_ = std::make_shared<ClassCreator<Interface>>(interfaceHandle, m_parentSystem);
178 m_openedInterface = interface_;
185 return LockOrThrowOpenedModule(m_openedInterface);
190 auto moduleDescriptorHandle = QueryNumericFromCInterfaceFunction<PEAK_MODULE_DESCRIPTOR_HANDLE>(
193 m_backendHandle, _moduleDescriptorHandle);
196 return moduleDescriptorHandle;
std::string TLType() const
Returns the TL (transport layer) type.
Definition peak_interface_descriptor.hpp:158
InterfaceDescriptor(InterfaceDescriptor &&other)=delete
std::shared_ptr< System > ParentSystem() const
Returns the parent system.
Definition peak_interface_descriptor.hpp:165
std::string DisplayName() const
Returns the display name.
Definition peak_interface_descriptor.hpp:150
InterfaceDescriptor(const InterfaceDescriptor &other)=delete
RawInformation Info(int32_t infoCommand) const
Delivers information based on the given GenTL info command.
Definition peak_interface_descriptor.hpp:142
InterfaceDescriptor()=delete
std::shared_ptr< Interface > OpenedInterface() const
Returns the Interface that was opened with this InterfaceDescriptor.
Definition peak_interface_descriptor.hpp:183
InterfaceDescriptor & operator=(InterfaceDescriptor &&other)=delete
InterfaceDescriptor & operator=(const InterfaceDescriptor &other)=delete
std::string Key() const
Returns the unique key.
Definition peak_interface_descriptor.hpp:137
~InterfaceDescriptor() override=default
std::shared_ptr< Interface > OpenInterface()
Opens the interface.
Definition peak_interface_descriptor.hpp:170
ModuleDescriptor()=default
virtual PEAK_MODULE_DESCRIPTOR_HANDLE ModuleDescriptorHandle() const =0
Represents a GenTL System module.
Definition peak_system.hpp:52
The "core" namespace contains the direct GenAPI and GenTL wrapper.
Definition peak_buffer.hpp:34
The "peak" namespace directly contains convenience functionality like the DeviceManager as well as th...
Definition peak_dynamic_loader.h:35
PEAK_C_API PEAK_InterfaceDescriptor_OpenInterface(PEAK_INTERFACE_DESCRIPTOR_HANDLE interfaceDescriptorHandle, PEAK_INTERFACE_HANDLE *interfaceHandle)
Opens the interface being associated with the given interface descriptor.
struct PEAK_MODULE_DESCRIPTOR * PEAK_MODULE_DESCRIPTOR_HANDLE
Definition peak_backend.h:417
PEAK_C_API PEAK_InterfaceDescriptor_ToModuleDescriptor(PEAK_INTERFACE_DESCRIPTOR_HANDLE interfaceDescriptorHandle, PEAK_MODULE_DESCRIPTOR_HANDLE *moduleDescriptorHandle)
Casts the given interface descriptor to a module descriptor.
struct PEAK_INTERFACE_DESCRIPTOR * PEAK_INTERFACE_DESCRIPTOR_HANDLE
Definition peak_backend.h:377
PEAK_C_API PEAK_InterfaceDescriptor_GetKey(PEAK_INTERFACE_DESCRIPTOR_HANDLE interfaceDescriptorHandle, char *key, size_t *keySize)
Asks the given interface descriptor for its key.
struct PEAK_INTERFACE * PEAK_INTERFACE_HANDLE
Definition peak_backend.h:381
PEAK_C_API PEAK_InterfaceDescriptor_GetInfo(PEAK_INTERFACE_DESCRIPTOR_HANDLE interfaceDescriptorHandle, int32_t infoCommand, int32_t *infoDataType, uint8_t *info, size_t *infoSize)
Asks the given interface descriptor for an information based on a specific command.
PEAK_C_API PEAK_InterfaceDescriptor_GetDisplayName(PEAK_INTERFACE_DESCRIPTOR_HANDLE interfaceDescriptorHandle, char *displayName, size_t *displayNameSize)
Asks the given interface descriptor for its display name.
PEAK_C_API PEAK_InterfaceDescriptor_GetTLType(PEAK_INTERFACE_DESCRIPTOR_HANDLE interfaceDescriptorHandle, char *tlType, size_t *tlTypeSize)
Asks the given interface descriptor for its TL type.
#define PEAK_C_ABI_PREFIX
Definition peak_dll_defines.h:16