52 std::vector<std::string> ret;
58 std::stringstream in(paths);
65 if (path.size() > 4 && path.compare(path.size()-4, 4,
".cti") == 0)
76 DIR *p=opendir(path.c_str());
80 struct dirent *entry=readdir(p);
84 std::string name=entry->d_name;
86 if (name.size() >= 4 && name.compare(name.size()-4, 4,
".cti") == 0)
88 ret.push_back(path+
"/"+name);
113 lib=dlopen(filename.c_str(), RTLD_NOW | RTLD_DEEPBIND);
117 throw std::invalid_argument(std::string(
"Cannot open GenTL library: ")+dlerror());
124 *
reinterpret_cast<void**
>(&
GCInitLib)=dlsym(
lib,
"GCInitLib");
125 *
reinterpret_cast<void**
>(&
GCCloseLib)=dlsym(
lib,
"GCCloseLib");
129 *
reinterpret_cast<void**
>(&
GCGetInfo)=dlsym(
lib,
"GCGetInfo");
131 *
reinterpret_cast<void**
>(&
GCReadPort)=dlsym(
lib,
"GCReadPort");
132 *
reinterpret_cast<void**
>(&
GCWritePort)=dlsym(
lib,
"GCWritePort");
141 *
reinterpret_cast<void**
>(&
EventFlush)=dlsym(
lib,
"EventFlush");
142 *
reinterpret_cast<void**
>(&
EventKill)=dlsym(
lib,
"EventKill");
143 *
reinterpret_cast<void**
>(&
TLOpen)=dlsym(
lib,
"TLOpen");
144 *
reinterpret_cast<void**
>(&
TLClose)=dlsym(
lib,
"TLClose");
145 *
reinterpret_cast<void**
>(&
TLGetInfo)=dlsym(
lib,
"TLGetInfo");
151 *
reinterpret_cast<void**
>(&
IFClose)=dlsym(
lib,
"IFClose");
152 *
reinterpret_cast<void**
>(&
IFGetInfo)=dlsym(
lib,
"IFGetInfo");
159 *
reinterpret_cast<void**
>(&
DevGetPort)=dlsym(
lib,
"DevGetPort");
163 *
reinterpret_cast<void**
>(&
DevGetInfo)=dlsym(
lib,
"DevGetInfo");
164 *
reinterpret_cast<void**
>(&
DevClose)=dlsym(
lib,
"DevClose");
171 *
reinterpret_cast<void**
>(&
DSGetInfo)=dlsym(
lib,
"DSGetInfo");
173 *
reinterpret_cast<void**
>(&
DSClose)=dlsym(
lib,
"DSClose");
192 const char *err=dlerror();
197 throw std::invalid_argument(std::string(
"Cannot resolve GenTL symbol: ")+err);
GenTLWrapper(const std::string &filename)
GenTL::PGCWritePort GCWritePort
GenTL::PEventFlush EventFlush
GenTL::PGCUnregisterEvent GCUnregisterEvent
GenTL::PIFOpenDevice IFOpenDevice
GenTL::PIFGetNumDevices IFGetNumDevices
GenTL::PDSGetInfo DSGetInfo
GenTL::PTLGetNumInterfaces TLGetNumInterfaces
GenTL::PDSAnnounceBuffer DSAnnounceBuffer
std::istream & getline(std::istream &is, GENICAM_NAMESPACE::gcstring &str)
STL getline.
GenTL::PGCGetPortURL GCGetPortURL
GenTL::PDevGetInfo DevGetInfo
GenTL::PDevGetNumDataStreams DevGetNumDataStreams
GenTL::PIFGetDeviceID IFGetDeviceID
GenTL::PIFUpdateDeviceList IFUpdateDeviceList
GenTL::PDSAllocAndAnnounceBuffer DSAllocAndAnnounceBuffer
GenTL::PDSGetNumBufferParts DSGetNumBufferParts
GenTL::PEventGetInfo EventGetInfo
GenTL::PTLGetInfo TLGetInfo
GenTL::PDSGetBufferID DSGetBufferID
GenTL::PDevOpenDataStream DevOpenDataStream
GenTL::PTLGetInterfaceID TLGetInterfaceID
GenTL::PGCReadPortStacked GCReadPortStacked
GenTL::PTLGetInterfaceInfo TLGetInterfaceInfo
GenTL::PGCCloseLib GCCloseLib
GenTL::PGCGetNumPortURLs GCGetNumPortURLs
GenTL::PDSQueueBuffer DSQueueBuffer
GenTL::PIFGetParentTL IFGetParentTL
GenTL::PTLOpenInterface TLOpenInterface
GenTL::PTLUpdateInterfaceList TLUpdateInterfaceList
GenTL::PEventGetDataInfo EventGetDataInfo
GenTL::PDevGetParentIF DevGetParentIF
GenTL::PDevClose DevClose
GenTL::PDevGetDataStreamID DevGetDataStreamID
GenTL::PGCReadPort GCReadPort
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.
GenTL::PGCGetInfo GCGetInfo
GenTL::PIFGetDeviceInfo IFGetDeviceInfo
GenTL::PDSRevokeBuffer DSRevokeBuffer
GenTL::PGCGetPortInfo GCGetPortInfo
GenTL::PDSStopAcquisition DSStopAcquisition
GenTL::PDevGetPort DevGetPort
GenTL::PEventKill EventKill
GenTL::PGCGetLastError GCGetLastError
GenTL::PDSGetParentDev DSGetParentDev
GenTL::PGCInitLib GCInitLib
GenTL::PDSGetBufferPartInfo DSGetBufferPartInfo
GenTL::PIFGetInfo IFGetInfo
GenTL::PGCRegisterEvent GCRegisterEvent
GenTL::PEventGetData EventGetData
GenTL::PDSStartAcquisition DSStartAcquisition
GenTL::PDSGetBufferInfo DSGetBufferInfo
GenTL::PDSGetBufferChunkData DSGetBufferChunkData
GenTL::PGCGetPortURLInfo GCGetPortURLInfo
GenTL::PDSFlushQueue DSFlushQueue