gentl_wrapper.h
Go to the documentation of this file.
1 /*
2  * This file is part of the rc_genicam_api package.
3  *
4  * Copyright (c) 2017 Roboception GmbH
5  * All rights reserved
6  *
7  * Author: Heiko Hirschmueller
8  *
9  * Redistribution and use in source and binary forms, with or without
10  * modification, are permitted provided that the following conditions are met:
11  *
12  * 1. Redistributions of source code must retain the above copyright notice,
13  * this list of conditions and the following disclaimer.
14  *
15  * 2. Redistributions in binary form must reproduce the above copyright notice,
16  * this list of conditions and the following disclaimer in the documentation
17  * and/or other materials provided with the distribution.
18  *
19  * 3. Neither the name of the copyright holder nor the names of its contributors
20  * may be used to endorse or promote products derived from this software without
21  * specific prior written permission.
22  *
23  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
24  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
27  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
28  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
29  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
30  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
31  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
32  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33  * POSSIBILITY OF SUCH DAMAGE.
34  */
35 
36 #ifndef RC_GENICAM_API_GENTL_WRAPPER
37 #define RC_GENICAM_API_GENTL_WRAPPER
38 
39 #include <GenTL/GenTL_v1_5.h>
40 
41 #include <string>
42 #include <vector>
43 
44 namespace rcg
45 {
46 
56 std::vector<std::string> getAvailableGenTLs(const char *paths);
57 
63 {
64  public:
65 
66  /*
67  Loads a shared lib and tries to resolve all functions that are defined in
68  GenTL Version 1.5.
69 
70  NOTE: An object of this class should only be instantiated by System for
71  internal usage.
72 
73  NOTE: An exception is thrown if the lib cannot be loaded or if not all
74  symbols can be resolved.
75 
76  @param filename Path and name of GenTL shared library.
77  */
78 
79  GenTLWrapper(const std::string &filename);
80  ~GenTLWrapper();
81 
82  // C interface functions of GenTL
83 
92 
115 
122 
134 
135  // GenTL v1.1
136 
141 
142  // GenTL v1.3
143 
145 
146  // GenTL v1.4
147 
151 
152  // GenTL v1.5
153 
156 
157  private:
158 
159  GenTLWrapper(const GenTLWrapper &); // forbidden
160  GenTLWrapper &operator=(const GenTLWrapper &); // forbidden
161 
162  void *lib;
163 };
164 
165 }
166 
167 #endif
GC_API_P() PGCInitLib(void)
GenTLWrapper(const std::string &filename)
GenTL::PGCWritePort GCWritePort
Definition: gentl_wrapper.h:89
GC_API_P() PDevGetParentIF(DEV_HANDLE hDevice, IF_HANDLE *phIface)
GenTL::PEventFlush EventFlush
Definition: gentl_wrapper.h:98
GC_API_P() PGCGetPortURLInfo(PORT_HANDLE hPort, uint32_t iURLIndex, URL_INFO_CMD iInfoCmd, INFO_DATATYPE *piType, void *pBuffer, size_t *piSize)
GC_API_P() PGCGetNumPortURLs(PORT_HANDLE hPort, uint32_t *iNumURLs)
GenTL::PGCUnregisterEvent GCUnregisterEvent
Definition: gentl_wrapper.h:94
GC_API_P() PTLOpen(TL_HANDLE *phTL)
GC_API_P() PDSStopAcquisition(DS_HANDLE hDataStream, ACQ_STOP_FLAGS iStopFlags)
GenTL::PIFOpenDevice IFOpenDevice
GenTL::PIFGetNumDevices IFGetNumDevices
GenTL::PDSGetInfo DSGetInfo
GC_API_P() PDevOpenDataStream(DEV_HANDLE hDevice, const char *sDataStreamID, DS_HANDLE *phDataStream)
GC_API_P() PGCWritePort(PORT_HANDLE hPort, uint64_t iAddress, const void *pBuffer, size_t *piSize)
GC_API_P() PGCWritePortStacked(PORT_HANDLE hPort, PORT_REGISTER_STACK_ENTRY *pEntries, size_t *piNumEntries)
GC_API_P() PDevGetInfo(DEV_HANDLE hDevice, DEVICE_INFO_CMD iInfoCmd, INFO_DATATYPE *piType, void *pBuffer, size_t *piSize)
GC_API_P() PEventKill(EVENT_HANDLE hEvent)
GC_API_P() PTLUpdateInterfaceList(TL_HANDLE hTL, bool8_t *pbChanged, uint64_t iTimeout)
GenTL::PTLGetNumInterfaces TLGetNumInterfaces
GC_API_P() PTLGetInfo(TL_HANDLE hTL, TL_INFO_CMD iInfoCmd, INFO_DATATYPE *piType, void *pBuffer, size_t *piSize)
GenTL::PDSAnnounceBuffer DSAnnounceBuffer
GenTL::PGCGetPortURL GCGetPortURL
Definition: gentl_wrapper.h:90
GenTL::PDevGetInfo DevGetInfo
GC_API_P() PIFClose(IF_HANDLE hIface)
GenTL::PDevGetNumDataStreams DevGetNumDataStreams
GC_API_P() PDSGetParentDev(DS_HANDLE hDataStream, DEV_HANDLE *phDevice)
GenTL::PIFGetDeviceID IFGetDeviceID
GC_API_P() PDevClose(DEV_HANDLE hDevice)
GenTL::PIFUpdateDeviceList IFUpdateDeviceList
GC_API_P() PIFGetParentTL(IF_HANDLE hIface, TL_HANDLE *phSystem)
GC_API_P() PIFOpenDevice(IF_HANDLE hIface, const char *sDeviceID, DEVICE_ACCESS_FLAGS iOpenFlags, DEV_HANDLE *phDevice)
GenTL::PDSAllocAndAnnounceBuffer DSAllocAndAnnounceBuffer
GC_API_P() PDevGetDataStreamID(DEV_HANDLE hDevice, uint32_t iIndex, char *sDataStreamID, size_t *piSize)
GC_API_P() PIFGetDeviceInfo(IF_HANDLE hIface, const char *sDeviceID, DEVICE_INFO_CMD iInfoCmd, INFO_DATATYPE *piType, void *pBuffer, size_t *piSize)
GC_API_P() PDSStartAcquisition(DS_HANDLE hDataStream, ACQ_START_FLAGS iStartFlags, uint64_t iNumToAcquire)
GC_API_P() PIFGetDeviceID(IF_HANDLE hIface, uint32_t iIndex, char *sIDeviceID, size_t *piSize)
GenTL::PIFClose IFClose
GenTL::PDSGetNumBufferParts DSGetNumBufferParts
GC_API_P() PIFGetInfo(IF_HANDLE hIface, INTERFACE_INFO_CMD iInfoCmd, INFO_DATATYPE *piType, void *pBuffer, size_t *piSize)
GenTL::PEventGetInfo EventGetInfo
Definition: gentl_wrapper.h:97
GenTL::PTLGetInfo TLGetInfo
GenTL::PDSGetBufferID DSGetBufferID
GC_API_P() PGCRegisterEvent(EVENTSRC_HANDLE hEventSrc, EVENT_TYPE iEventID, EVENT_HANDLE *phEvent)
GC_API_P() PTLOpenInterface(TL_HANDLE hTL, const char *sIfaceID, IF_HANDLE *phIface)
GC_API_P() PDSAnnounceBuffer(DS_HANDLE hDataStream, void *pBuffer, size_t iSize, void *pPrivate, BUFFER_HANDLE *phBuffer)
GC_API_P() PDSRevokeBuffer(DS_HANDLE hDataStream, BUFFER_HANDLE hBuffer, void **pBuffer, void **pPrivate)
GC_API_P() PGCGetLastError(GC_ERROR *piErrorCode, char *sErrText, size_t *piSize)
GC_API_P() PEventGetData(EVENT_HANDLE hEvent, void *pBuffer, size_t *piSize, uint64_t iTimeout)
GC_API_P() PIFUpdateDeviceList(IF_HANDLE hIface, bool8_t *pbChanged, uint64_t iTimeout)
GC_API_P() PDSGetBufferPartInfo(DS_HANDLE hDataStream, BUFFER_HANDLE hBuffer, uint32_t iPartIndex, BUFFER_PART_INFO_CMD iInfoCmd, INFO_DATATYPE *piType, void *pBuffer, size_t *piSize)
GenTL::PDevOpenDataStream DevOpenDataStream
GC_API_P() PDevGetNumDataStreams(DEV_HANDLE hDevice, uint32_t *piNumDataStreams)
GC_API_P() PDSGetNumBufferParts(DS_HANDLE hDataStream, BUFFER_HANDLE hBuffer, uint32_t *piNumParts)
GenTL::PTLGetInterfaceID TLGetInterfaceID
GC_API_P() PDSQueueBuffer(DS_HANDLE hDataStream, BUFFER_HANDLE hBuffer)
GC_API_P() PDSGetInfo(DS_HANDLE hDataStream, STREAM_INFO_CMD iInfoCmd, INFO_DATATYPE *piType, void *pBuffer, size_t *piSize)
GC_API_P() PDSFlushQueue(DS_HANDLE hDataStream, ACQ_QUEUE_TYPE iOperation)
GenTL::PGCReadPortStacked GCReadPortStacked
GenTL::PTLGetInterfaceInfo TLGetInterfaceInfo
GC_API_P() PDSClose(DS_HANDLE hDataStream)
GenTL::PGCCloseLib GCCloseLib
Definition: gentl_wrapper.h:87
GC_API_P() PGCReadPortStacked(PORT_HANDLE hPort, PORT_REGISTER_STACK_ENTRY *pEntries, size_t *piNumEntries)
GenTLWrapper & operator=(const GenTLWrapper &)
GenTL::PTLClose TLClose
GenTL::PGCGetNumPortURLs GCGetNumPortURLs
GC_API_P() PGCCloseLib(void)
GC_API_P() PGCGetPortInfo(PORT_HANDLE hPort, PORT_INFO_CMD iInfoCmd, INFO_DATATYPE *piType, void *pBuffer, size_t *piSize)
GC_API_P() PGCReadPort(PORT_HANDLE hPort, uint64_t iAddress, void *pBuffer, size_t *piSize)
GenTL::PDSQueueBuffer DSQueueBuffer
GenTL::PIFGetParentTL IFGetParentTL
GenTL::PTLOpenInterface TLOpenInterface
GenTL::PTLUpdateInterfaceList TLUpdateInterfaceList
GC_API_P() PTLClose(TL_HANDLE hTL)
GenTL::PEventGetDataInfo EventGetDataInfo
Definition: gentl_wrapper.h:96
GenTL::PDevGetParentIF DevGetParentIF
GenTL::PTLOpen TLOpen
GC_API_P() PIFGetNumDevices(IF_HANDLE hIface, uint32_t *piNumDevices)
GenTL::PDevClose DevClose
GC_API_P() PTLGetNumInterfaces(TL_HANDLE hTL, uint32_t *piNumIfaces)
GenTL::PDevGetDataStreamID DevGetDataStreamID
GenTL::PGCReadPort GCReadPort
Definition: gentl_wrapper.h:88
GenTL::PGCWritePortStacked GCWritePortStacked
std::vector< std::string > getAvailableGenTLs(const char *paths)
The function uses the given list files of paths that is separated by colons or semicolons, depending on the used operating system, and returns all files with the suffix .cti.
Wrapper for dynamically loaded GenICam transport layers.
Definition: gentl_wrapper.h:62
GC_API_P() PDSGetBufferChunkData(DS_HANDLE hDataStream, BUFFER_HANDLE hBuffer, SINGLE_CHUNK_DATA *pChunkData, size_t *piNumChunks)
GenTL::PGCGetInfo GCGetInfo
Definition: gentl_wrapper.h:84
GenTL::PIFGetDeviceInfo IFGetDeviceInfo
GC_API_P() PDSGetBufferID(DS_HANDLE hDataStream, uint32_t iIndex, BUFFER_HANDLE *phBuffer)
GenTL::PDSRevokeBuffer DSRevokeBuffer
GC_API_P() PDevGetPort(DEV_HANDLE hDevice, PORT_HANDLE *phRemoteDevice)
GenTL::PGCGetPortInfo GCGetPortInfo
Definition: gentl_wrapper.h:91
GC_API_P() PEventGetInfo(EVENT_HANDLE hEvent, EVENT_INFO_CMD iInfoCmd, INFO_DATATYPE *piType, void *pBuffer, size_t *piSize)
GC_API_P() PGCGetPortURL(PORT_HANDLE hPort, char *sURL, size_t *piSize)
GenTL::PDSStopAcquisition DSStopAcquisition
GenTL::PDevGetPort DevGetPort
GC_API_P() PDSGetBufferInfo(DS_HANDLE hDataStream, BUFFER_HANDLE hBuffer, BUFFER_INFO_CMD iInfoCmd, INFO_DATATYPE *piType, void *pBuffer, size_t *piSize)
GenTL::PEventKill EventKill
Definition: gentl_wrapper.h:99
GenTL::PGCGetLastError GCGetLastError
Definition: gentl_wrapper.h:85
GenTL::PDSGetParentDev DSGetParentDev
GenTL::PGCInitLib GCInitLib
Definition: gentl_wrapper.h:86
Definition: buffer.cc:47
GC_API_P() PTLGetInterfaceID(TL_HANDLE hTL, uint32_t iIndex, char *sID, size_t *piSize)
GC_API_P() PEventFlush(EVENT_HANDLE hEvent)
GenTL::PDSGetBufferPartInfo DSGetBufferPartInfo
GenTL::PIFGetInfo IFGetInfo
GC_API_P() PEventGetDataInfo(EVENT_HANDLE hEvent, const void *pInBuffer, size_t iInSize, EVENT_DATA_INFO_CMD iInfoCmd, INFO_DATATYPE *piType, void *pOutBuffer, size_t *piOutSize)
GenTL::PDSClose DSClose
GenTL::PGCRegisterEvent GCRegisterEvent
Definition: gentl_wrapper.h:93
GenTL::PEventGetData EventGetData
Definition: gentl_wrapper.h:95
GenTL::PDSStartAcquisition DSStartAcquisition
GenTL::PDSGetBufferInfo DSGetBufferInfo
GC_API_P() PGCUnregisterEvent(EVENTSRC_HANDLE hEventSrc, EVENT_TYPE iEventID)
GenTL::PDSGetBufferChunkData DSGetBufferChunkData
GC_API_P() PDSAllocAndAnnounceBuffer(DS_HANDLE hDataStream, size_t iSize, void *pPrivate, BUFFER_HANDLE *phBuffer)
GC_API_P() PTLGetInterfaceInfo(TL_HANDLE hTL, const char *sIfaceID, INTERFACE_INFO_CMD iInfoCmd, INFO_DATATYPE *piType, void *pBuffer, size_t *piSize)
GenTL::PGCGetPortURLInfo GCGetPortURLInfo
GenTL::PDSFlushQueue DSFlushQueue
GC_API_P() PGCGetInfo(TL_INFO_CMD iInfoCmd, INFO_DATATYPE *piType, void *pBuffer, size_t *piSize)


rc_genicam_api
Author(s): Heiko Hirschmueller
autogenerated on Wed Mar 17 2021 02:48:40