gentl_wrapper.h
Go to the documentation of this file.
00001 /*
00002  * This file is part of the rc_genicam_api package.
00003  *
00004  * Copyright (c) 2017 Roboception GmbH
00005  * All rights reserved
00006  *
00007  * Author: Heiko Hirschmueller
00008  *
00009  * Redistribution and use in source and binary forms, with or without
00010  * modification, are permitted provided that the following conditions are met:
00011  *
00012  * 1. Redistributions of source code must retain the above copyright notice,
00013  * this list of conditions and the following disclaimer.
00014  *
00015  * 2. Redistributions in binary form must reproduce the above copyright notice,
00016  * this list of conditions and the following disclaimer in the documentation
00017  * and/or other materials provided with the distribution.
00018  *
00019  * 3. Neither the name of the copyright holder nor the names of its contributors
00020  * may be used to endorse or promote products derived from this software without
00021  * specific prior written permission.
00022  *
00023  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
00024  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00025  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00026  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
00027  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
00028  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
00029  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
00030  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
00031  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
00032  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
00033  * POSSIBILITY OF SUCH DAMAGE.
00034  */
00035 
00036 #ifndef RC_GENICAM_API_GENTL_WRAPPER
00037 #define RC_GENICAM_API_GENTL_WRAPPER
00038 
00039 #include <GenTL/GenTL_v1_5.h>
00040 
00041 #include <string>
00042 #include <vector>
00043 
00044 namespace rcg
00045 {
00046 
00056 std::vector<std::string> getAvailableGenTLs(const char *paths);
00057 
00062 class GenTLWrapper
00063 {
00064   public:
00065 
00066     /*
00067       Loads a shared lib and tries to resolve all functions that are defined in
00068       GenTL Version 1.5.
00069 
00070       NOTE: An object of this class should only be instantiated by System for
00071       internal usage.
00072 
00073       NOTE: An exception is thrown if the lib cannot be loaded or if not all
00074       symbols can be resolved.
00075 
00076       @param filename Path and name of GenTL shared library.
00077     */
00078 
00079     GenTLWrapper(const std::string &filename);
00080     ~GenTLWrapper();
00081 
00082     // C interface functions of GenTL
00083 
00084     GenTL::PGCGetInfo GCGetInfo;
00085     GenTL::PGCGetLastError GCGetLastError;
00086     GenTL::PGCInitLib GCInitLib;
00087     GenTL::PGCCloseLib GCCloseLib;
00088     GenTL::PGCReadPort GCReadPort;
00089     GenTL::PGCWritePort GCWritePort;
00090     GenTL::PGCGetPortURL GCGetPortURL;
00091     GenTL::PGCGetPortInfo GCGetPortInfo;
00092 
00093     GenTL::PGCRegisterEvent GCRegisterEvent;
00094     GenTL::PGCUnregisterEvent GCUnregisterEvent;
00095     GenTL::PEventGetData EventGetData;
00096     GenTL::PEventGetDataInfo EventGetDataInfo;
00097     GenTL::PEventGetInfo EventGetInfo;
00098     GenTL::PEventFlush EventFlush;
00099     GenTL::PEventKill EventKill;
00100     GenTL::PTLOpen TLOpen;
00101     GenTL::PTLClose TLClose;
00102     GenTL::PTLGetInfo TLGetInfo;
00103     GenTL::PTLGetNumInterfaces TLGetNumInterfaces;
00104     GenTL::PTLGetInterfaceID TLGetInterfaceID;
00105     GenTL::PTLGetInterfaceInfo TLGetInterfaceInfo;
00106     GenTL::PTLOpenInterface TLOpenInterface;
00107     GenTL::PTLUpdateInterfaceList TLUpdateInterfaceList;
00108     GenTL::PIFClose IFClose;
00109     GenTL::PIFGetInfo IFGetInfo;
00110     GenTL::PIFGetNumDevices IFGetNumDevices;
00111     GenTL::PIFGetDeviceID IFGetDeviceID;
00112     GenTL::PIFUpdateDeviceList IFUpdateDeviceList;
00113     GenTL::PIFGetDeviceInfo IFGetDeviceInfo;
00114     GenTL::PIFOpenDevice IFOpenDevice;
00115 
00116     GenTL::PDevGetPort DevGetPort;
00117     GenTL::PDevGetNumDataStreams DevGetNumDataStreams;
00118     GenTL::PDevGetDataStreamID DevGetDataStreamID;
00119     GenTL::PDevOpenDataStream DevOpenDataStream;
00120     GenTL::PDevGetInfo DevGetInfo;
00121     GenTL::PDevClose DevClose;
00122 
00123     GenTL::PDSAnnounceBuffer DSAnnounceBuffer;
00124     GenTL::PDSAllocAndAnnounceBuffer DSAllocAndAnnounceBuffer;
00125     GenTL::PDSFlushQueue DSFlushQueue;
00126     GenTL::PDSStartAcquisition DSStartAcquisition;
00127     GenTL::PDSStopAcquisition DSStopAcquisition;
00128     GenTL::PDSGetInfo DSGetInfo;
00129     GenTL::PDSGetBufferID DSGetBufferID;
00130     GenTL::PDSClose DSClose;
00131     GenTL::PDSRevokeBuffer DSRevokeBuffer;
00132     GenTL::PDSQueueBuffer DSQueueBuffer;
00133     GenTL::PDSGetBufferInfo DSGetBufferInfo;
00134 
00135     // GenTL v1.1
00136 
00137     GenTL::PGCGetNumPortURLs GCGetNumPortURLs;
00138     GenTL::PGCGetPortURLInfo GCGetPortURLInfo;
00139     GenTL::PGCReadPortStacked GCReadPortStacked;
00140     GenTL::PGCWritePortStacked GCWritePortStacked;
00141 
00142     // GenTL v1.3
00143 
00144     GenTL::PDSGetBufferChunkData DSGetBufferChunkData;
00145 
00146     // GenTL v1.4
00147 
00148     GenTL::PIFGetParentTL IFGetParentTL;
00149     GenTL::PDevGetParentIF DevGetParentIF;
00150     GenTL::PDSGetParentDev DSGetParentDev;
00151 
00152     // GenTL v1.5
00153 
00154     GenTL::PDSGetNumBufferParts DSGetNumBufferParts;
00155     GenTL::PDSGetBufferPartInfo DSGetBufferPartInfo;
00156 
00157   private:
00158 
00159     GenTLWrapper(const GenTLWrapper &); // forbidden
00160     GenTLWrapper &operator=(const GenTLWrapper &); // forbidden
00161 
00162     void *lib;
00163 };
00164 
00165 }
00166 
00167 #endif


rc_visard_driver
Author(s): Heiko Hirschmueller , Christian Emmerich , Felix Ruess
autogenerated on Thu Jun 6 2019 20:43:02