├── thirdparty └── GenICam │ ├── lib64 │ ├── liblog4cpp.so │ ├── libxalan-c.so │ ├── libxerces-c.so │ ├── libgenicam_api.so │ ├── libgenicam_log.so │ ├── liblog4cpp.so.4 │ ├── libxalan-c.so.110 │ ├── libxalanMsg.so │ ├── libxalanMsg.so.110 │ ├── libxerces-c.so.27 │ ├── genapi │ │ └── generic │ │ │ ├── xmlloader.so │ │ │ └── xmlloader-1.1.so │ ├── libgenicam_base.so │ ├── libxerces-depdom.so │ ├── libxerces-depdom.so.27 │ ├── libgenicam_mathparser.so │ ├── liblog4cpp.so.4.0.5 │ ├── libxalan-c.so.110.0 │ ├── libxalanMsg.so.110.0 │ ├── libxerces-c.so.27.0 │ ├── libgenicam_api-1.1.so │ ├── libgenicam_base-1.1.so │ ├── libgenicam_log-1.1.so │ ├── libxerces-depdom.so.27.0 │ └── libgenicam_mathparser-1.1.so │ ├── bin │ └── gcxalan │ ├── licenses │ └── GenICam_License_20072005.pdf │ ├── include │ ├── _GenICamVersion.h │ ├── GenApi │ │ ├── impl │ │ │ ├── GenApiUtilities.h │ │ │ ├── SwissKnifeT.h │ │ │ ├── MathParser │ │ │ │ ├── SymTable.h │ │ │ │ ├── MathParserDll.h │ │ │ │ ├── StrMap.h │ │ │ │ ├── Int64Lexer.h │ │ │ │ ├── Lexer.h │ │ │ │ ├── MathParser.h │ │ │ │ └── Int64MathParser.h │ │ │ ├── PrivateTypes.h │ │ │ ├── PointerImpl.h │ │ │ ├── GenApiImpl.h │ │ │ ├── ValueCache.h │ │ │ ├── BaseT.h │ │ │ ├── ValueNode.h │ │ │ ├── INodeMapPrivate.h │ │ │ ├── Compatibility.h │ │ │ ├── CommandT.h │ │ │ ├── EnumDelegate.h │ │ │ ├── MaskedIntReg.h │ │ │ ├── ValueT.h │ │ │ ├── StringT.h │ │ │ ├── DllManager.h │ │ │ ├── VariableDelegate.h │ │ │ ├── PersistenceImpl.h │ │ │ └── Category.h │ │ ├── IDestroy.h │ │ ├── GenApi.h │ │ ├── GenApiVersion.h │ │ ├── Log.h │ │ ├── NodeCallback.h │ │ ├── GenApiDll.h │ │ ├── DLLLoad.h │ │ ├── IChunkPort.h │ │ ├── IPortConstruct.h │ │ ├── INodeMapDyn.h │ │ ├── EventAdapter.h │ │ ├── ChunkAdapterGEV.h │ │ ├── IEnumeration.h │ │ ├── INodeMap.h │ │ ├── IDeviceInfo.h │ │ ├── IBase.h │ │ ├── RegisterSetHelper.h │ │ ├── EventAdapter1394.h │ │ ├── ICategory.h │ │ ├── ChunkAdapterDcam.h │ │ ├── Reference.h │ │ ├── IEnumEntry.h │ │ ├── Callback.h │ │ ├── IPort.h │ │ ├── ChunkAdapter.h │ │ ├── ICommand.h │ │ └── ISelector.h │ ├── Base │ │ ├── GCBase.h │ │ ├── GCError.h │ │ └── GCLinkage.h │ ├── GenICam.h │ ├── Log │ │ ├── LogDll.h │ │ └── CLog.h │ └── GenICamVersion.h │ ├── share │ └── genicam │ │ └── log │ │ └── config │ │ ├── DefaultLogging.properties │ │ └── DebugLogging.properties │ ├── README │ └── License_ReadMe.txt ├── .gitignore ├── src ├── GigEVision.cpp ├── GenICam.h ├── Gvsp.h ├── GigEVision.h ├── Gvcp.h ├── Main.cpp ├── Gvsp.cpp └── GenICam.cpp └── CMakeLists.txt /thirdparty/GenICam/lib64/liblog4cpp.so: -------------------------------------------------------------------------------- 1 | liblog4cpp.so.4.0.5 -------------------------------------------------------------------------------- /thirdparty/GenICam/lib64/libxalan-c.so: -------------------------------------------------------------------------------- 1 | libxalan-c.so.110.0 -------------------------------------------------------------------------------- /thirdparty/GenICam/lib64/libxerces-c.so: -------------------------------------------------------------------------------- 1 | libxerces-c.so.27.0 -------------------------------------------------------------------------------- /thirdparty/GenICam/lib64/libgenicam_api.so: -------------------------------------------------------------------------------- 1 | libgenicam_api-1.1.so -------------------------------------------------------------------------------- /thirdparty/GenICam/lib64/libgenicam_log.so: -------------------------------------------------------------------------------- 1 | libgenicam_log-1.1.so -------------------------------------------------------------------------------- /thirdparty/GenICam/lib64/liblog4cpp.so.4: -------------------------------------------------------------------------------- 1 | liblog4cpp.so.4.0.5 -------------------------------------------------------------------------------- /thirdparty/GenICam/lib64/libxalan-c.so.110: -------------------------------------------------------------------------------- 1 | libxalan-c.so.110.0 -------------------------------------------------------------------------------- /thirdparty/GenICam/lib64/libxalanMsg.so: -------------------------------------------------------------------------------- 1 | libxalanMsg.so.110.0 -------------------------------------------------------------------------------- /thirdparty/GenICam/lib64/libxalanMsg.so.110: -------------------------------------------------------------------------------- 1 | libxalanMsg.so.110.0 -------------------------------------------------------------------------------- /thirdparty/GenICam/lib64/libxerces-c.so.27: -------------------------------------------------------------------------------- 1 | libxerces-c.so.27.0 -------------------------------------------------------------------------------- /thirdparty/GenICam/lib64/genapi/generic/xmlloader.so: -------------------------------------------------------------------------------- 1 | xmlloader-1.1.so -------------------------------------------------------------------------------- /thirdparty/GenICam/lib64/libgenicam_base.so: -------------------------------------------------------------------------------- 1 | libgenicam_base-1.1.so -------------------------------------------------------------------------------- /thirdparty/GenICam/lib64/libxerces-depdom.so: -------------------------------------------------------------------------------- 1 | libxerces-depdom.so.27.0 -------------------------------------------------------------------------------- /thirdparty/GenICam/lib64/libxerces-depdom.so.27: -------------------------------------------------------------------------------- 1 | libxerces-depdom.so.27.0 -------------------------------------------------------------------------------- /thirdparty/GenICam/lib64/libgenicam_mathparser.so: -------------------------------------------------------------------------------- 1 | libgenicam_mathparser-1.1.so -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | CMakeFiles/ 2 | CMakeCache.txt 3 | *.user 4 | *.cbp 5 | Makefile 6 | *.cmake 7 | !.gitignore 8 | camtest 9 | -------------------------------------------------------------------------------- /thirdparty/GenICam/bin/gcxalan: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riscv-linux-2023/opengigevision/HEAD/thirdparty/GenICam/bin/gcxalan -------------------------------------------------------------------------------- /thirdparty/GenICam/lib64/liblog4cpp.so.4.0.5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riscv-linux-2023/opengigevision/HEAD/thirdparty/GenICam/lib64/liblog4cpp.so.4.0.5 -------------------------------------------------------------------------------- /thirdparty/GenICam/lib64/libxalan-c.so.110.0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riscv-linux-2023/opengigevision/HEAD/thirdparty/GenICam/lib64/libxalan-c.so.110.0 -------------------------------------------------------------------------------- /thirdparty/GenICam/lib64/libxalanMsg.so.110.0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riscv-linux-2023/opengigevision/HEAD/thirdparty/GenICam/lib64/libxalanMsg.so.110.0 -------------------------------------------------------------------------------- /thirdparty/GenICam/lib64/libxerces-c.so.27.0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riscv-linux-2023/opengigevision/HEAD/thirdparty/GenICam/lib64/libxerces-c.so.27.0 -------------------------------------------------------------------------------- /thirdparty/GenICam/lib64/libgenicam_api-1.1.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riscv-linux-2023/opengigevision/HEAD/thirdparty/GenICam/lib64/libgenicam_api-1.1.so -------------------------------------------------------------------------------- /thirdparty/GenICam/lib64/libgenicam_base-1.1.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riscv-linux-2023/opengigevision/HEAD/thirdparty/GenICam/lib64/libgenicam_base-1.1.so -------------------------------------------------------------------------------- /thirdparty/GenICam/lib64/libgenicam_log-1.1.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riscv-linux-2023/opengigevision/HEAD/thirdparty/GenICam/lib64/libgenicam_log-1.1.so -------------------------------------------------------------------------------- /thirdparty/GenICam/lib64/libxerces-depdom.so.27.0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riscv-linux-2023/opengigevision/HEAD/thirdparty/GenICam/lib64/libxerces-depdom.so.27.0 -------------------------------------------------------------------------------- /thirdparty/GenICam/lib64/libgenicam_mathparser-1.1.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riscv-linux-2023/opengigevision/HEAD/thirdparty/GenICam/lib64/libgenicam_mathparser-1.1.so -------------------------------------------------------------------------------- /thirdparty/GenICam/lib64/genapi/generic/xmlloader-1.1.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riscv-linux-2023/opengigevision/HEAD/thirdparty/GenICam/lib64/genapi/generic/xmlloader-1.1.so -------------------------------------------------------------------------------- /thirdparty/GenICam/licenses/GenICam_License_20072005.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riscv-linux-2023/opengigevision/HEAD/thirdparty/GenICam/licenses/GenICam_License_20072005.pdf -------------------------------------------------------------------------------- /src/GigEVision.cpp: -------------------------------------------------------------------------------- 1 | #include "GenICam.h" 2 | #include "Gvcp.h" 3 | #include "Gvsp.h" 4 | 5 | #include "GigEVision.h" 6 | 7 | GigEVision::GigEVision(): 8 | m_genicam(new GenICamManager(*this)), 9 | m_gvcp(new GvcpManager(*this)), 10 | m_gvsp(new GvspManager(*this, 12221)) 11 | { } 12 | 13 | 14 | -------------------------------------------------------------------------------- /thirdparty/GenICam/include/_GenICamVersion.h: -------------------------------------------------------------------------------- 1 | // This file is generated automatically. Do not modify! 2 | #define GENICAM_VERSION_MAJOR 1 3 | #define GENICAM_VERSION_MINOR 1 4 | #define GENICAM_VERSION_SUBMINOR 2 5 | #define GENICAM_VERSION_BUILD 0 6 | #define GENICAM_VERSION_PRERELEASE 1 7 | #define GENICAM_VERSION_PRIVATEBUILD 0 8 | -------------------------------------------------------------------------------- /thirdparty/GenICam/share/genicam/log/config/DefaultLogging.properties: -------------------------------------------------------------------------------- 1 | # These settings are loaded as default 2 | 3 | log4j.rootCategory=ERROR, Console 4 | log4cpp.appender.Console=org.apache.log4j.ConsoleAppender 5 | log4cpp.appender.Console.layout=org.apache.log4j.PatternLayout 6 | log4cpp.appender.Console.layout.ConversionPattern==>LOG %x: %c : %m%n 7 | -------------------------------------------------------------------------------- /src/GenICam.h: -------------------------------------------------------------------------------- 1 | #ifndef GENICAM_H 2 | #define GENICAM_H 3 | 4 | #include 5 | #include "GenApi/GenApi.h" 6 | 7 | // forwarding 8 | class GigEVision; 9 | 10 | class GenICamManager 11 | { 12 | public: 13 | GenICamManager(GigEVision& gev); 14 | 15 | void ReadXmlFile(); 16 | 17 | uint32_t GetAddress(const std::string& sKey); 18 | 19 | void PrintNodes(bool bWithProperties=false) const; 20 | 21 | private: 22 | GigEVision& m_gev; 23 | GenApi::CNodeMapRef m_cam; 24 | }; 25 | 26 | #endif // GENICAM_H 27 | -------------------------------------------------------------------------------- /src/Gvsp.h: -------------------------------------------------------------------------------- 1 | #ifndef GVSP_H 2 | #define GVSP_H 3 | 4 | #include 5 | #include 6 | 7 | class GigEVision; 8 | 9 | class GvspManager 10 | { 11 | public: 12 | GvspManager(GigEVision& gev, int nPort); 13 | 14 | ~GvspManager(); 15 | 16 | void Stop(); 17 | 18 | private: 19 | void StartReceive(); 20 | 21 | void RecHandler(const boost::system::error_code& error, std::size_t nBytes); 22 | 23 | GigEVision& m_gev; 24 | boost::asio::ip::udp::socket m_socket; 25 | boost::array m_buff; 26 | boost::gil::gray8_image_t m_img; 27 | int m_nCurrPartOfFrame; 28 | int m_nImg; 29 | bool m_bRun; 30 | }; 31 | 32 | 33 | 34 | #endif // GVSP_H 35 | -------------------------------------------------------------------------------- /src/GigEVision.h: -------------------------------------------------------------------------------- 1 | #ifndef GIGEVISION_H 2 | #define GIGEVISION_H 3 | 4 | #include 5 | #include 6 | 7 | // forwarding 8 | class GenICamManager; 9 | class GvcpManager; 10 | class GvspManager; 11 | 12 | class GigEVision 13 | { 14 | public: 15 | GigEVision(); 16 | 17 | GenICamManager& GenICam() { return *m_genicam; } 18 | GvcpManager& Gvcp() { return *m_gvcp; } 19 | GvspManager& Gvsp() { return *m_gvsp; } 20 | boost::asio::io_service& Service() { return m_service; } 21 | 22 | private: 23 | boost::asio::io_service m_service; 24 | std::auto_ptr m_genicam; 25 | std::auto_ptr m_gvcp; 26 | std::auto_ptr m_gvsp; 27 | }; 28 | 29 | 30 | #endif // GIGEVISION_H 31 | -------------------------------------------------------------------------------- /thirdparty/GenICam/include/GenApi/impl/GenApiUtilities.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // (c) 2005 by Basler Vision Technologies 3 | // Section: Vision Components 4 | // Project: GenICam 5 | // Author: Fritz Dierks 6 | // $Header: /cvs/genicam/genicam/library/CPP/include/GenApi/impl/GenApiUtilities.h,v 1.2 2006/07/18 13:31:53 rueder Exp $ 7 | //----------------------------------------------------------------------------- 8 | /*! 9 | \file GenApiUtilities.h 10 | \brief GenICam common utilities 11 | */ 12 | 13 | #ifndef GENAPI_GENAPIUTILITIES_DEF_H_ 14 | #define GENAPI_GENAPIUTILITIES_DEF_H_ 15 | 16 | #include 17 | #include 18 | 19 | namespace GenApi 20 | { 21 | 22 | void ReplaceEnvironmentVariables(GenICam::gcstring &Buffer); 23 | 24 | } 25 | 26 | #endif // GENAPI_GENAPIUTILITIES_DEF_H_ 27 | -------------------------------------------------------------------------------- /thirdparty/GenICam/share/genicam/log/config/DebugLogging.properties: -------------------------------------------------------------------------------- 1 | # Use these settings for debugging 2 | 3 | log4j.rootCategory=ERROR 4 | log4j.category.CppUnit=INFO, Console 5 | #log4j.category.CppUnit=INFO, File 6 | 7 | #log4j.category.CppUnit.Performance=INFO, File 8 | #log4j.category.GenApi.Device.Access=DEBUG, Console 9 | #log4j.category.GenApi.Device.Value=DEBUG, Console 10 | #log4j.category.GenApi.Device.Range=DEBUG, Console 11 | #log4j.category.GenApi.Device.Port=DEBUG, Console 12 | #log4j.category.GenApi.Device.RegisterPort=DEBUG, Console 13 | #log4j.category.GenApi.Device.Cache=DEBUG, Console 14 | #log4j.category.GenApi.Device.Misc=DEBUG, Console 15 | 16 | log4j.appender.Console=org.apache.log4j.ConsoleAppender 17 | log4j.appender.Console.layout=org.apache.log4j.PatternLayout 18 | log4cpp.appender.Console.layout.ConversionPattern==>LOG %x: %c : %m%n 19 | 20 | log4j.appender.File=org.apache.log4j.FileAppender 21 | log4j.appender.File.layout=org.apache.log4j.PatternLayout 22 | log4j.appender.File.layout.ConversionPattern==>LOG %x: %c : %m%n 23 | log4j.appender.File.fileName=$(GENICAM_ROOT)/log/Results/Performance.log 24 | #log4j.appender.File.fileName=$(GENICAM_ROOT)/log/Results/UCCATest.log 25 | -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.6) 2 | project(GigEV4Linux) 3 | 4 | set(SOURCES src/Main.cpp 5 | src/Gvsp.cpp 6 | src/Gvcp.cpp 7 | src/GigEVision.cpp 8 | src/GenICam.cpp) 9 | 10 | set(HEADERS src/Gvsp.h 11 | src/Gvcp.h 12 | src/GenICam.h 13 | src/GigEVision.h) 14 | 15 | 16 | include_directories(. /usr/include /usr/include/c++/4.3 thirdparty/GenICam/include) 17 | add_definitions(-DGENICAM_ROOT_PATH=\"${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/GenICam/\") 18 | 19 | set(CMAKE_CXX_FLAGS "-W -Wall -Wno-unknown-pragmas -Wno-attributes -g") 20 | find_package(Boost REQUIRED thread filesystem) 21 | 22 | find_library(ZIP_LIBRARY zip REQUIRED) 23 | find_library(PNG_LIBRARY png REQUIRED) 24 | find_library(GENICAM_BASE_LIBRARY genicam_base REQUIRED thirdparty/GenICam/lib64) 25 | find_library(GENICAM_API_LIBRARY genicam_api REQUIRED thirdparty/GenICam/lib64) 26 | #find_library(GENICAM_MATHPARSER_LIBRARY genicam_base REQUIRED thirdparty/GenICam/lib64) 27 | add_executable(camtest ${SOURCES} ${HEADERS}) 28 | 29 | target_link_libraries(camtest ${Boost_THREAD_LIBRARY} ${Boost_FILESYSTEM_LIBRARY} ${ZIP_LIBRARY} 30 | ${PNG_LIBRARY} ${GENICAM_BASE_LIBRARY} ${GENICAM_API_LIBRARY}) 31 | -------------------------------------------------------------------------------- /thirdparty/GenICam/include/GenApi/IDestroy.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // (c) 2004 by Basler Vision Technologies 3 | // Section: Vision Components 4 | // Project: GenApi 5 | // Author: Fritz Dierks 6 | // $Header: /cvs/genicam/genicam/library/CPP/include/GenApi/IDestroy.h,v 1.8 2007/08/16 13:56:39 hartmut_nebelung Exp $ 7 | //----------------------------------------------------------------------------- 8 | /*! 9 | \file IDestroy.h 10 | \brief Definition of interface IDestroy 11 | */ 12 | 13 | #ifndef GENAPI_IDESTROY_H 14 | #define GENAPI_IDESTROY_H 15 | 16 | #include 17 | 18 | #pragma warning ( push ) 19 | #pragma warning ( disable : 4251 ) // XXX needs to have dll-interface to be used by clients of class YYY 20 | 21 | namespace GenApi 22 | { 23 | 24 | //************************************************************* 25 | // IDestroy interface 26 | //************************************************************* 27 | /** 28 | * \ingroup internal_itf 29 | * \brief Interface to destroy an object 30 | */ 31 | 32 | interface IDestroy 33 | { 34 | //! Makes the object to destro itself 35 | virtual void Destroy() = 0; 36 | 37 | }; 38 | 39 | } 40 | 41 | #pragma warning ( pop ) 42 | 43 | #endif // GENAPI_IDESTROY_H 44 | -------------------------------------------------------------------------------- /thirdparty/GenICam/include/GenApi/impl/SwissKnifeT.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // (c) 2005 by Basler Vision Technologies 3 | // Section: Vision Components 4 | // Project: GenApi 5 | // Author: Margret Albrecht 6 | // $Header: /cvs/genicam/genicam/library/CPP/include/GenApi/impl/SwissKnifeT.h,v 1.3 2006/07/18 13:31:53 rueder Exp $ 7 | //----------------------------------------------------------------------------- 8 | /*! 9 | \file 10 | \brief Definition of the SwissknifeT class template 11 | */ 12 | 13 | #ifndef GENAPI_SWISSKNIFET_H 14 | #define GENAPI_SWISSKNIFET_H 15 | 16 | namespace GenApi 17 | { 18 | /** 19 | \brief Implementation of the SwissKnife Interface 20 | */ 21 | template 22 | class GENAPI_DECL SwissKnifeT : public Base 23 | { 24 | public: 25 | 26 | 27 | //! Implementation of SwissKnife::GetValue(double value) 28 | virtual double _GetValue(double value) 29 | { 30 | AutoLock l(Base::GetLock()); 31 | 32 | #ifdef LOG4C 33 | m_pValueLog->info("_GetValue(value)..."); 34 | #endif 35 | double Value = Base::_GetValue(value); 36 | #ifdef LOG4C 37 | m_pValueLog->info("...GetValue(value) = %f", Value ); 38 | #endif 39 | return Value; 40 | 41 | } 42 | 43 | 44 | }; 45 | 46 | 47 | 48 | } 49 | 50 | #endif -------------------------------------------------------------------------------- /src/Gvcp.h: -------------------------------------------------------------------------------- 1 | #ifndef GVCP_H 2 | #define GVCP_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | enum EnAddrs 9 | { 10 | DATASTREAM_PACKET_SIZE = 0x00000d04, 11 | GRABBING_STOPPED = 0x0001020c, 12 | PIXEL_FORMAT = 0x0001010c, 13 | GENICAM_ZIPFILEINFO_ADDRESS = 0x00000200 14 | }; 15 | 16 | enum EnVals 17 | { 18 | EXCLUSIVE_ACCESS = 0x03, 19 | STOP_GRAB_VALUE = 0x01000000, 20 | PIXEL_FORMAT_8BIT_VALUE = 0x01000801, 21 | PIXEL_FORMAT_12BIT_VALUE = 0x01000c01 22 | }; 23 | 24 | class GigEVision; 25 | 26 | class GvcpManager 27 | { 28 | 29 | public: 30 | GvcpManager(GigEVision& gev); 31 | 32 | ~GvcpManager(); 33 | 34 | void Connect(const std::string& sAddr, const std::string& sPort); 35 | 36 | uint32_t Read(const std::string& sKey); 37 | uint32_t Read(uint32_t addr); 38 | 39 | std::vector ReadBlock(const std::string& sKey, uint32_t nSize); 40 | std::vector ReadBlock(uint32_t addr, uint32_t nSize); 41 | 42 | bool Write(const std::string& sKey, uint32_t nVal); 43 | bool Write(uint32_t addr, uint32_t nVal); 44 | 45 | bool RequestResend(uint32_t nImage, uint32_t nStartPack, uint32_t nEndPack); 46 | 47 | boost::asio::ip::address_v4 FindCam(); 48 | 49 | void StartHeartbeat(); 50 | 51 | void StopHeartbeat(); 52 | 53 | private: 54 | void Heartbeat(); 55 | GigEVision& m_gev; 56 | boost::asio::ip::udp::socket m_sock; 57 | boost::asio::ip::udp::resolver::iterator m_it; 58 | std::auto_ptr m_heartbeatTimer; 59 | boost::thread m_ioThread; 60 | int m_nMsgNr; 61 | bool m_bHeartbeatRun; 62 | }; 63 | 64 | 65 | #endif // GVCP_H 66 | -------------------------------------------------------------------------------- /thirdparty/GenICam/include/GenApi/impl/MathParser/SymTable.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // (c) 2006 by Basler Vision Technologies 3 | // Section: Vision Components 4 | // Project: GenApi 5 | // Author: Margret Albrecht 6 | // $Header: /cvs/genicam/genicam/library/CPP/include/GenApi/impl/MathParser/SymTable.h,v 1.7 2007/08/16 13:56:50 hartmut_nebelung Exp $ 7 | // 8 | // License: Derived from Kirill Zaborski's MathParser library (http://kirya.narod.ru/mathparser.html ). 9 | // This library comes under LGPL license (see http://www.gnu.org/licenses/lgpl.html). 10 | // Kirill's implementation is a C++ port of the CCalc library from Walery Studennikov (http://www.sama.ru/~despair/ccalc/) 11 | // which also comes under the LGPL. 12 | //----------------------------------------------------------------------------- 13 | /*! 14 | \file 15 | \brief Implementation of CSymTable 16 | */ 17 | #if !defined(AFX_SYMTABLE_H__F8B4AD7F_07F9_4AB2_B206_04549837C7ED__INCLUDED_) 18 | #define AFX_SYMTABLE_H__F8B4AD7F_07F9_4AB2_B206_04549837C7ED__INCLUDED_ 19 | 20 | #if defined (_MSC_VER) && (_MSC_VER > 1000) 21 | #pragma once 22 | #endif 23 | 24 | class CSymTable 25 | { 26 | public: 27 | typedef struct { 28 | char Sym[4]; 29 | char Len; 30 | char Index; 31 | char More; 32 | } SymbolRec; 33 | private: 34 | SymbolRec* table[256]; 35 | public: 36 | void PrepareSymTable( const char *symbols ); 37 | int FindSymbol( const char *str, int *nchars ); 38 | CSymTable(); 39 | virtual ~CSymTable(); 40 | 41 | }; 42 | 43 | #endif // !defined(AFX_SYMTABLE_H__F8B4AD7F_07F9_4AB2_B206_04549837C7ED__INCLUDED_) 44 | -------------------------------------------------------------------------------- /thirdparty/GenICam/include/Base/GCBase.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | (c) 2005 by STEMMER IMAGING 3 | 4 | License: This file is published under the license of the EMVA GenICam Standard Group. 5 | A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'. 6 | If for some reason you are missing this file please contact the EMVA or visit the website 7 | (http://www.genicam.org) for a full copy. 8 | 9 | THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS" 10 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 11 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 12 | PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP 13 | OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 14 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 15 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 16 | OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 17 | WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 18 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 19 | POSSIBILITY OF SUCH DAMAGE. 20 | 21 | ****************************************************************************/ 22 | 23 | /// \file 24 | /// \brief Common GenICam base include file. 25 | /// \version $Revision: 1.8 $ 26 | /// \date $Date: 2007/02/16 15:45:09 $ 27 | /// \ingroup Base_PublicUtilities 28 | 29 | 30 | #ifndef GENICAM_GCBASE_H 31 | #define GENICAM_GCBASE_H 32 | 33 | #include "GCTypes.h" 34 | #include "GCString.h" 35 | #include "GCStringVector.h" 36 | #include "GCException.h" 37 | #include "GCError.h" 38 | 39 | #include "GCUtilities.h" 40 | 41 | #endif // GENICAM_GCBASE_H 42 | -------------------------------------------------------------------------------- /thirdparty/GenICam/include/GenICam.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | (c) 2005 by STEMMER IMAGING 3 | 4 | License: This file is published under the license of the EMVA GenICam Standard Group. 5 | A text file describing the legal terms is included in your installation as 'license.txt'. 6 | If for some reason you are missing this file please contact the EMVA or visit the website 7 | (http://www.genicam.org) for a full copy. 8 | 9 | THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS" 10 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 11 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 12 | PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP 13 | OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 14 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 15 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 16 | OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 17 | WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 18 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 19 | POSSIBILITY OF SUCH DAMAGE. 20 | 21 | ****************************************************************************/ 22 | 23 | /// \file $Source: /cvs/genicam/genicam/library/CPP/include/GenICam.h,v $ 24 | /// \brief Common GenICam include file. 25 | /// \version $Revision: 1.5.2.1 $ 26 | /// \date $Date: 2009/02/02 13:27:34 $ 27 | 28 | 29 | #ifndef GENICAM_OVERALL_H 30 | #define GENICAM_OVERALL_H 31 | 32 | #if defined (_WIN32) || defined (__unix__) 33 | # include "Base/GCBase.h" 34 | # include "GenApi/GenApi.h" 35 | #else 36 | # error Unknown/unsupported platform 37 | #endif 38 | 39 | #endif // GENICAM_OVERALL_H 40 | -------------------------------------------------------------------------------- /thirdparty/GenICam/include/GenApi/impl/MathParser/MathParserDll.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // (c) 2006 by Basler Vision Technologies 3 | // Section: Vision Components 4 | // Project: GenApi 5 | // Author: Margret Albrecht 6 | // $Header: /cvs/genicam/genicam/library/CPP/include/GenApi/impl/MathParser/MathParserDll.h,v 1.5 2007/08/16 13:56:49 hartmut_nebelung Exp $ 7 | // 8 | // License: Derived from Kirill Zaborski's MathParser library (http://kirya.narod.ru/mathparser.html ). 9 | // This library comes under LGPL license (see http://www.gnu.org/licenses/lgpl.html). 10 | // Kirill's implementation is a C++ port of the CCalc library from Walery Studennikov (http://www.sama.ru/~despair/ccalc/) 11 | // which also comes under the LGPL. 12 | //----------------------------------------------------------------------------- 13 | /*! 14 | \file 15 | \brief Export Macros 16 | */ 17 | 18 | // The following ifdef block is the standard way of creating macros which make exporting 19 | // from a DLL simpler. All files within this DLL are compiled with the MATHPARSERDLL_EXPORTS 20 | // symbol defined on the command line. this symbol should not be defined on any project 21 | // that uses this DLL. This way any other project whose source files include this file see 22 | // MATHPARSERDLL_API functions as being imported from a DLL, whereas this DLL sees symbols 23 | // defined with this macro as being exported. 24 | 25 | #if defined (_MSC_VER) 26 | 27 | #ifdef MATHPARSERDLL_EXPORTS 28 | # define MATHPARSERDLL_API __declspec(dllexport) 29 | #else 30 | # define MATHPARSERDLL_API __declspec(dllimport) 31 | #endif 32 | 33 | #elif defined (__GNUC__) && defined (__ELF__) 34 | 35 | #ifdef MATHPARSERDLL_EXPORTS 36 | # define MATHPARSERDLL_API __attribute__((visibility("default"))) 37 | #else 38 | # define MATHPARSERDLL_API 39 | #endif 40 | 41 | #else 42 | # define MATHPARSERDLL_API 43 | #endif 44 | -------------------------------------------------------------------------------- /thirdparty/GenICam/README: -------------------------------------------------------------------------------- 1 | 2 | Installation on a Windows system 3 | ================================ 4 | The provided Merge module are supposed to be integrated into a setup by your API supplier. 5 | 6 | For testing purposes use the GenApiTestBinSetup_win32_vc80_v1_1.msi resp. GenApiTestBinSetup_win64_vc80_v1_1.msi In a shell (DOS-box) setup your environment for testing. 7 | set GENICAM_ROOT_V1_1=c:\Projectes\GenICamTest 8 | set GENICAM_LOG_CONFIG=c:\Projects\GenICamTest\log\config\TestLogging.properties 9 | set TEST_RESULT_FILE=c:\Projects\GenICamTest\log\mylog.txt 10 | 11 | Installation on a Linux system 12 | ================================ 13 | Installation on a Linux-i686 system extract the files with the -i686 suffix. On a Linux-x64_86 system use the corresponding packages with the -x64_86.tgz suffix. 14 | 15 | mkdir /opt/genicam 16 | tar xzvf genicam-1.1.2-linux-i686.tgz -C /opt/genicam 17 | tar xzvf genicam-sdk-1.1.2-linux-i686.tgz -C /opt/genicam 18 | tar xzvf genicam-tests-1.1.2-linux-i686.tgz -C /opt/genicam 19 | 20 | Add these variables to your environment, e.g. by placing these lines in your profile or .bashrc file. 21 | export GENICAM_ROOT_V1_1=/opt/genicam 22 | export GENICAM_CACHE=$HOME/tmp 23 | 24 | In order to execute the GenApi test using the standard test setting do the following 25 | export GENICAM_LOG_CONFIG=/opt/genicam/share/genicam/log/config/TestLogging.properties 26 | export TEST_RESULT_FILE=$HOME/tmp/mylog.txt 27 | /opt/genicam/bin/GenicamPluginTester /opt/genicam/lib/libgenicam_test.so 28 | 29 | Installation of the GenICam-packages at alternative locations is also possible, e.g. if /opt/genicam is not available. Simply adopt the steps above by replacing the path /opt/genicam by a path you prefer. 30 | 31 | In case you develop application using the GenICam SDK add 32 | the GenICam include path to your preproceccesor options, e.g: 33 | CPPFLAGS += $(GENICAM_ROOT_V1_1)/include 34 | and the GenICam lib resp. lib64 path to your linker options, e.g: 35 | LDFLAGS += $(GENICAM_ROOT_V1_1)/lib -lgenicam_base -l genciam_genapi -lgenicam_mathparser -lgenicam_log. 36 | -------------------------------------------------------------------------------- /thirdparty/GenICam/include/GenApi/GenApi.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // (c) 2006 by Basler Vision Technologies 3 | // Section: Vision Components 4 | // Project: GenApi 5 | // Author: Fritz Dierks 6 | // $Header: /cvs/genicam/genicam/library/CPP/include/GenApi/GenApi.h,v 1.14.2.1 2008/07/14 08:25:14 hartmut_nebelung Exp $ 7 | // 8 | // License: This file is published under the license of the EMVA GenICam Standard Group. 9 | // A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'. 10 | // If for some reason you are missing this file please contact the EMVA or visit the website 11 | // (http://www.genicam.org) for a full copy. 12 | // 13 | // THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS" 14 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 15 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 16 | // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP 17 | // OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18 | // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 19 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 20 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 21 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 23 | // POSSIBILITY OF SUCH DAMAGE. 24 | //----------------------------------------------------------------------------- 25 | /*! 26 | \file 27 | \brief Main include file for using GenApi with smart pointers 28 | \ingroup GenApi_PublicInterface 29 | */ 30 | 31 | #ifndef GENAPI_GENAPI_H 32 | #define GENAPI_GENAPI_H 33 | 34 | #include 35 | #include 36 | #include "GenApiVersion.h" 37 | #include "Pointer.h" 38 | #include "NodeMapRef.h" 39 | #include "NodeCallbackImpl.h" 40 | #include "Persistence.h" 41 | 42 | #if defined (_MSC_VER) 43 | # include "GenApiLinkage.h" 44 | #endif 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /thirdparty/GenICam/include/GenApi/impl/MathParser/StrMap.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // (c) 2006 by Basler Vision Technologies 3 | // Section: Vision Components 4 | // Project: GenApi 5 | // Author: Margret Albrecht 6 | // $Header: /cvs/genicam/genicam/library/CPP/include/GenApi/impl/MathParser/StrMap.h,v 1.7.2.2 2008/12/12 18:23:03 hartmut_nebelung Exp $ 7 | // 8 | // License: Derived from Kirill Zaborski's MathParser library (http://kirya.narod.ru/mathparser.html ). 9 | // This library comes under LGPL license (see http://www.gnu.org/licenses/lgpl.html). 10 | // Kirill's implementation is a C++ port of the CCalc library from Walery Studennikov (http://www.sama.ru/~despair/ccalc/) 11 | // which also comes under the LGPL. 12 | //----------------------------------------------------------------------------- 13 | /*! 14 | \file 15 | \brief Definition of CStrMap 16 | */ 17 | #ifndef _STRMAP_H_ 18 | #define _STRMAP_H_ 19 | 20 | 21 | #if defined (_MSC_VER) && (_MSC_VER > 1000) 22 | #pragma once 23 | #endif 24 | 25 | #include "MathParserDll.h" 26 | 27 | /** 28 | * \ingroup internal_impl 29 | * 30 | * \brief Map for variables in swissknife expression 31 | */ 32 | class MATHPARSERDLL_API CStrMap 33 | { 34 | int FCount, FCapacity; 35 | int FExtraLen, FRecordLen; 36 | int FDoDuplicate; 37 | char *FList; 38 | public: 39 | CStrMap(int extrabytes=sizeof(double), int dup=0); 40 | void CreateFromChain( int extrabytes, const char *strchain, const void *data ); 41 | ~CStrMap(void); 42 | void AddString(const char *str, void *data); 43 | void AddStrLen(const char *str, size_t len, const void *data); 44 | void ShrinkMem(void); 45 | void Trim(int NewCount); 46 | void TrimClear(int NewCount); 47 | void SetCapacity(int NewCapacity); 48 | int IndexOf(const char *str, const void **data); 49 | int LenIndexOf(const char *str, size_t len, const void **data); 50 | int Replace(const char *str,void *data); 51 | int LenReplace(const char *str, size_t len, void *data); 52 | const char * GetString(int index, size_t *len, void **data); 53 | void FillFromChain(const char *strchain, const void *data); 54 | }; 55 | 56 | #endif //_STRMAP_H_ 57 | -------------------------------------------------------------------------------- /thirdparty/GenICam/include/GenApi/impl/MathParser/Int64Lexer.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // (c) 2006 by Basler Vision Technologies 3 | // Section: Vision Components 4 | // Project: GenApi 5 | // Author: Margret Albrecht 6 | // $Header: /cvs/genicam/genicam/library/CPP/include/GenApi/impl/MathParser/Int64Lexer.h,v 1.8 2007/08/16 13:56:49 hartmut_nebelung Exp $ 7 | // 8 | // License: Derived from Kirill Zaborski's MathParser library (http://kirya.narod.ru/mathparser.html ). 9 | // This library comes under LGPL license (see http://www.gnu.org/licenses/lgpl.html). 10 | // Kirill's implementation is a C++ port of the CCalc library from Walery Studennikov (http://www.sama.ru/~despair/ccalc/) 11 | // which also comes under the LGPL. 12 | //----------------------------------------------------------------------------- 13 | /*! 14 | \file 15 | \brief Definition of CInt64Lexer 16 | */ 17 | 18 | #ifndef _INT64LEXER_H_ 19 | #define _INT64LEXER_H_ 20 | 21 | #if defined (_MSC_VER) && (_MSC_VER > 1000) 22 | #pragma once 23 | #endif 24 | 25 | #include 26 | 27 | #include 28 | #include 29 | 30 | #include "SymTable.h" 31 | #include "Lexer.h" // some typdefs 32 | 33 | /** 34 | * \ingroup internal_impl 35 | * 36 | * \brief Lexical analyzer for CIntSwissKnife 37 | */ 38 | class CInt64Lexer 39 | { 40 | char *m_pSS; 41 | char *SS; 42 | public: 43 | // input params 44 | int cssn; // Comment Start Symbol Number. -1 if none 45 | char *ComEnd; // End of comment 46 | CSymTable *SymTable; 47 | hqCharType *CharTypeTable; 48 | 49 | // output params 50 | char *Name; 51 | size_t NameLen; 52 | int64_t ExtValue; 53 | int64_t IntValue; 54 | hqTokenType PrevTokenType; 55 | hqCharType CharType; 56 | int NoIntegers; 57 | int SetParseString(const char *str); 58 | hqTokenType GetNextToken(void); 59 | CInt64Lexer(void); 60 | ~CInt64Lexer(void); 61 | char * GetCurrentPos(void) const; 62 | }; 63 | 64 | /* Misc */ 65 | 66 | void InitCharTypeTable( hqCharType *CharTypeTable, int CharTypes ); 67 | 68 | #endif //_INT64LEXER_H_ 69 | -------------------------------------------------------------------------------- /thirdparty/GenICam/include/GenApi/GenApiVersion.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // (c) 2006 by Basler Vision Technologies 3 | // Section: Vision Components 4 | // Project: GenApi 5 | // Author: Fritz Dierks 6 | // $Header: /cvs/genicam/genicam/library/CPP/include/GenApi/GenApiVersion.h,v 1.7 2007/11/13 19:41:09 hartmut_nebelung Exp $ 7 | // 8 | // License: This file is published under the license of the EMVA GenICam Standard Group. 9 | // A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'. 10 | // If for some reason you are missing this file please contact the EMVA or visit the website 11 | // (http://www.genicam.org) for a full copy. 12 | // 13 | // THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS" 14 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 15 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 16 | // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP 17 | // OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18 | // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 19 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 20 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 21 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 23 | // POSSIBILITY OF SUCH DAMAGE. 24 | //----------------------------------------------------------------------------- 25 | /*! 26 | \file 27 | \brief central versioning counters 28 | */ 29 | 30 | #ifndef GENAPI_VERSION_H 31 | #define GENAPI_VERSION_H 32 | 33 | #include "../GenICamVersion.h" 34 | 35 | // CAUTION: the following symbols exist for compatibility reasons only 36 | // For new clde please use the GENICAM_ symbols from GenICamVersion.h only 37 | 38 | #define GENAPI_VERSION_MAJOR GENICAM_VERSION_MAJOR 39 | #define GENAPI_VERSION_MINOR GENICAM_VERSION_MINOR 40 | #define GENAPI_VERSION_SUBMINOR GENICAM_VERSION_SUBMINOR 41 | #define GENAPI_VERSION_BUILD GENICAM_VERSION_BUILD 42 | 43 | 44 | #endif // GENAPI_VERSION_H 45 | -------------------------------------------------------------------------------- /thirdparty/GenICam/include/GenApi/impl/PrivateTypes.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // (c) 2006 by Basler Vision Technologies 3 | // Section: Vision Components 4 | // Project: GenApi 5 | // Author: Alexander Happe 6 | // $Header: /cvs/genicam/genicam/library/CPP/include/GenApi/impl/PrivateTypes.h,v 1.7 2007/08/16 13:56:26 hartmut_nebelung Exp $ 7 | // 8 | // License: This file is published under the license of the EMVA GenICam Standard Group. 9 | // A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'. 10 | // If for some reason you are missing this file please contact the EMVA or visit the website 11 | // (http://www.genicam.org) for a full copy. 12 | // 13 | // THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS" 14 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 15 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 16 | // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP 17 | // OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18 | // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 19 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 20 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 21 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 23 | // POSSIBILITY OF SUCH DAMAGE. 24 | //----------------------------------------------------------------------------- 25 | /*! 26 | \file 27 | 28 | \brief Common types used in the GenApi implementation. 29 | */ 30 | 31 | #ifndef GENAPI_PRIVATETYPES_H 32 | #define GENAPI_PRIVATETYPES_H 33 | 34 | #include "../IInteger.h" 35 | #include 36 | 37 | namespace GenApi 38 | { 39 | typedef std::list UInt64List_t; 40 | typedef std::list pUInt64List_t; 41 | typedef std::list Int64List_t; 42 | typedef std::list pInt64List_t; 43 | 44 | //! List of Integer-node references 45 | typedef std::list IntegerList_t; 46 | } 47 | 48 | 49 | #endif // ifndef GENAPI_PRIVATETYPES_H 50 | -------------------------------------------------------------------------------- /src/Main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | #include "GigEVision.h" 11 | #include "GenICam.h" 12 | #include "Gvcp.h" 13 | #include "Gvsp.h" 14 | 15 | 16 | int main(int argc, char** argv) 17 | { 18 | try 19 | { 20 | if(argc != 3) 21 | throw std::runtime_error(str(boost::format("Usage: %1% ") % argv[0])); 22 | 23 | GigEVision vis; 24 | vis.Gvcp().Connect(argv[1], argv[2]); 25 | std::cout << "Cam Addr: " << vis.Gvcp().FindCam().to_string() << std::endl; 26 | vis.GenICam().ReadXmlFile(); 27 | vis.GenICam().PrintNodes(); 28 | 29 | // format bool values as strings 30 | std::cout.setf (std::ios::boolalpha); 31 | std::cout << "Access acquired: " 32 | << vis.Gvcp().Write("Cust::GevCCPReg", EXCLUSIVE_ACCESS) << std::endl; 33 | std::cout << "Set stream port: " 34 | << vis.Gvcp().Write("Std::GevSCPHostPort", 12221) << std::endl; 35 | std::cout << "Set stream addr: " 36 | << vis.Gvcp().Write("Std::GevSCDA", 37 | boost::asio::ip::address_v4::from_string("169.254.0.2").to_ulong()) << std::endl; 38 | std::cout << "Set pixel format: " << vis.Gvcp().Write(PIXEL_FORMAT, PIXEL_FORMAT_8BIT_VALUE) << std::endl; 39 | std::cout << "Pixel format: " << (vis.Gvcp().Read(PIXEL_FORMAT) == PIXEL_FORMAT_8BIT_VALUE ? 40 | "8bit" : "12bit") << std::endl; 41 | std::cout << "Start: " 42 | << vis.Gvcp().Write("Cust::AcquisitionStartReg", 0x0) << std::endl; 43 | 44 | vis.Gvcp().StartHeartbeat(); 45 | 46 | sleep(10); 47 | vis.Gvsp().Stop(); 48 | vis.Gvcp().StopHeartbeat(); 49 | 50 | std::cout << "Stop: " << vis.Gvcp().Write("Cust::AcquisitionStopReg", STOP_GRAB_VALUE) << std::endl; 51 | 52 | std::cout << "Waiting..." << std::flush; 53 | while(vis.Gvcp().Read(GRABBING_STOPPED) != STOP_GRAB_VALUE) 54 | std::cout << "." << std::flush; 55 | std::cout << " stopped" << std::endl; 56 | } 57 | catch(std::exception& e) 58 | { 59 | std::cout << "Exception: " << e.what() << std::endl; 60 | return 1; 61 | } 62 | 63 | return 0; 64 | } 65 | 66 | 67 | -------------------------------------------------------------------------------- /thirdparty/GenICam/include/Log/LogDll.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // (c) 2006 by Basler Vision Technologies 3 | // Section: Vision Components 4 | // Project: GenApi 5 | // Author: Fritz Dierks 6 | // $Header: /cvs/genicam/genicam/library/CPP/include/Log/LogDll.h,v 1.6 2007/08/16 13:56:43 hartmut_nebelung Exp $ 7 | // 8 | // License: This file is published under the license of the EMVA GenICam Standard Group. 9 | // A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'. 10 | // If for some reason you are missing this file please contact the EMVA or visit the website 11 | // (http://www.genicam.org) for a full copy. 12 | // 13 | // THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS" 14 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 15 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 16 | // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP 17 | // OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18 | // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 19 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 20 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 21 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 23 | // POSSIBILITY OF SUCH DAMAGE. 24 | //----------------------------------------------------------------------------- 25 | /*! 26 | \file 27 | \brief declspec's to be used for Log Windows dll 28 | \ingroup GenApi_PublicImpl 29 | */ 30 | 31 | #if ! defined (LOGDLL_H) 32 | #define LOGDLL_H 33 | 34 | #if defined(_MSC_VER) 35 | # pragma once 36 | # ifdef LOG_EXPORTS 37 | # define LOG_DECL __declspec(dllexport) 38 | # else 39 | # define LOG_DECL __declspec(dllimport) 40 | # endif 41 | #elif defined (__GNUC__) && defined (__ELF__) 42 | # ifdef LOG_EXPORTS 43 | # define LOG_DECL __attribute__((visibility("default"))) 44 | # else 45 | # define LOG_DECL 46 | # endif 47 | #else 48 | # define LOG_DECL 49 | #endif 50 | 51 | #endif /* ! defined (LOGDLL_H) */ 52 | -------------------------------------------------------------------------------- /thirdparty/GenICam/include/GenApi/Log.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // (c) 2006 by Basler Vision Technologies 3 | // Section: Vision Components 4 | // Project: GenApi 5 | // Author: Fritz Dierks 6 | // $Header: /cvs/genicam/genicam/library/CPP/include/GenApi/Log.h,v 1.7 2007/11/13 19:41:09 hartmut_nebelung Exp $ 7 | // 8 | // License: This file is published under the license of the EMVA GenICam Standard Group. 9 | // A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'. 10 | // If for some reason you are missing this file please contact the EMVA or visit the website 11 | // (http://www.genicam.org) for a full copy. 12 | // 13 | // THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS" 14 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 15 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 16 | // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP 17 | // OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18 | // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 19 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 20 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 21 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 23 | // POSSIBILITY OF SUCH DAMAGE. 24 | //----------------------------------------------------------------------------- 25 | /** 26 | \file 27 | \brief includes all include files from Log module. 28 | \ingroup GenApi_PublicImpl 29 | */ 30 | 31 | #ifndef GENAPI_DEF_LOG_H_ 32 | #define GENAPI_DEF_LOG_H_ 33 | 34 | // This is the central point for enabling/disabling the logging 35 | // Don't enable LOG4C manually at any other point (just don't, believe me. Fritz :-) 36 | #ifdef _DEBUG 37 | #define LOG4C 38 | #else 39 | // in release mode logging is not enabled 40 | #endif 41 | 42 | #include 43 | 44 | //! Operator required for using hex opeator etc 45 | //! \ingroup GenApi_PublicImpl 46 | log4cpp::CategoryStream& operator <<(log4cpp::CategoryStream &ostr, const GenICam::gcstring &str); 47 | 48 | #endif // GENAPI_DEF_LOG_H_ 49 | -------------------------------------------------------------------------------- /thirdparty/GenICam/include/GenApi/impl/MathParser/Lexer.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // (c) 2006 by Basler Vision Technologies 3 | // Section: Vision Components 4 | // Project: GenApi 5 | // Author: Margret Albrecht 6 | // $Header: /cvs/genicam/genicam/library/CPP/include/GenApi/impl/MathParser/Lexer.h,v 1.9 2007/08/16 13:56:49 hartmut_nebelung Exp $ 7 | // 8 | // License: Derived from Kirill Zaborski's MathParser library (http://kirya.narod.ru/mathparser.html ). 9 | // This library comes under LGPL license (see http://www.gnu.org/licenses/lgpl.html). 10 | // Kirill's implementation is a C++ port of the CCalc library from Walery Studennikov (http://www.sama.ru/~despair/ccalc/) 11 | // which also comes under the LGPL. 12 | //----------------------------------------------------------------------------- 13 | /*! 14 | \file 15 | \brief Definition of CLexer 16 | */ 17 | 18 | #ifndef _LEXER_H_ 19 | #define _LEXER_H_ 20 | 21 | #if defined (_MSC_VER) && (_MSC_VER > 1000) 22 | #pragma once 23 | #endif 24 | 25 | #include 26 | 27 | #include 28 | #include 29 | #include "SymTable.h" 30 | 31 | 32 | 33 | typedef unsigned char uchar; 34 | 35 | typedef enum { 36 | CH_LETTER = 0x01, CH_DIGIT = 0x02, CH_SEPARAT = 0x04, 37 | CH_SYMBOL = 0x08, CH_QUOTE = 0x10, 38 | CH_UNKNOWN= 0x7E, CH_FINAL = 0x7F 39 | } hqCharType; 40 | 41 | typedef enum { 42 | TOK_ERROR, TOK_NONE, TOK_FINAL, TOK_INT, TOK_FLOAT, TOK_SYMBOL, 43 | TOK_NAME, TOK_STRING 44 | } hqTokenType; 45 | 46 | class CLexer{ 47 | char *m_pSS; 48 | char *SS; 49 | public: 50 | // input params 51 | int cssn; // Comment Start Symbol Number. -1 if none 52 | char *ComEnd; // End of comment 53 | CSymTable *SymTable; 54 | hqCharType *CharTypeTable; 55 | 56 | // output params 57 | char *Name; 58 | size_t NameLen; 59 | double ExtValue; 60 | int IntValue; 61 | hqTokenType PrevTokenType; 62 | hqCharType CharType; 63 | int NoIntegers; 64 | int SetParseString(const char *str ); 65 | hqTokenType GetNextToken(); 66 | CLexer(); 67 | ~CLexer(); 68 | char* GetCurrentPos(); 69 | }; 70 | 71 | /* Misc */ 72 | 73 | void InitCharTypeTable( hqCharType *CharTypeTable, int CharTypes ); 74 | 75 | #endif //_LEXER_H_ 76 | -------------------------------------------------------------------------------- /thirdparty/GenICam/include/GenApi/impl/PointerImpl.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // (c) 2006 by Basler Vision Technologies 3 | // Section: Vision Components 4 | // Project: GenApi 5 | // Author: Fritz Dierks 6 | // $Header: /cvs/genicam/genicam/library/CPP/include/GenApi/impl/PointerImpl.h,v 1.4 2007/08/16 13:56:26 hartmut_nebelung Exp $ 7 | // 8 | // License: This file is published under the license of the EMVA GenICam Standard Group. 9 | // A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'. 10 | // If for some reason you are missing this file please contact the EMVA or visit the website 11 | // (http://www.genicam.org) for a full copy. 12 | // 13 | // THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS" 14 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 15 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 16 | // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP 17 | // OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18 | // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 19 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 20 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 21 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 23 | // POSSIBILITY OF SUCH DAMAGE. 24 | //----------------------------------------------------------------------------- 25 | /*! 26 | \file 27 | \brief Definition of private drivates from CPointer 28 | \ingroup GenApi_PublicUtilities 29 | */ 30 | 31 | #ifndef GENAPI_POINTERPRIVATE_H 32 | #define GENAPI_POINTERPRIVATE_H 33 | 34 | #include "../Pointer.h" 35 | #include "INodePrivate.h" 36 | #include "INodeMapPrivate.h" 37 | 38 | namespace GenApi 39 | { 40 | 41 | //! \addtogroup GenApi_PublicImpl 42 | //! \{ 43 | 44 | //! SmartPointer for INodePrivate interface pointer 45 | typedef CPointer CNodePrivatePtr; 46 | 47 | //! SmartPointer for INodeMapPrivate interface pointer 48 | typedef CPointer CNodeMapPrivatePtr; 49 | //! \} 50 | 51 | } 52 | 53 | #endif // ifndef GENAPI_POINTERPRIVATE_H 54 | -------------------------------------------------------------------------------- /thirdparty/GenICam/include/GenApi/NodeCallback.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // (c) 2006 by Basler Vision Technologies 3 | // Section: Vision Components 4 | // Project: GenApi 5 | // Author: Hartmut Nebelung 6 | // $Header: /cvs/genicam/genicam/library/CPP/include/GenApi/NodeCallback.h,v 1.11.2.1 2008/07/14 08:30:46 hartmut_nebelung Exp $ 7 | // 8 | // License: This file is published under the license of the EMVA GenICam Standard Group. 9 | // A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'. 10 | // If for some reason you are missing this file please contact the EMVA or visit the website 11 | // (http://www.genicam.org) for a full copy. 12 | // 13 | // THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS" 14 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 15 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 16 | // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP 17 | // OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18 | // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 19 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 20 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 21 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 23 | // POSSIBILITY OF SUCH DAMAGE. 24 | //----------------------------------------------------------------------------- 25 | /*! 26 | \file 27 | \brief Defines the NodeCallback class 28 | \ingroup GenApi_PublicImpl 29 | */ 30 | 31 | #ifndef GENAPI_NODECALLBACK_H 32 | #define GENAPI_NODECALLBACK_H 33 | 34 | #include "Callback.h" 35 | 36 | namespace GenApi 37 | { 38 | 39 | struct INode; 40 | class NodeCallbackBase; 41 | 42 | /** 43 | \brief Callback object for callback taking an INode pointer 44 | \ingroup GenApi_PublicImpl 45 | */ 46 | class GENAPI_DECL NodeCallback : public Callback1 47 | { 48 | public: 49 | NodeCallback( GenApi::NodeCallbackBase *pb ); 50 | NodeCallback( const NodeCallback& cb ); 51 | NodeCallback& operator=( const NodeCallback& cb ); 52 | 53 | }; 54 | 55 | } 56 | 57 | #endif // GENAPI_NODECALLBACK_H 58 | -------------------------------------------------------------------------------- /thirdparty/GenICam/include/GenApi/GenApiDll.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // (c) 2006 by Basler Vision Technologies 3 | // Section: Vision Components 4 | // Project: GenApi 5 | // Author: Fritz Dierks 6 | // $Header: /cvs/genicam/genicam/library/CPP/include/GenApi/GenApiDll.h,v 1.9 2007/11/13 19:41:09 hartmut_nebelung Exp $ 7 | // 8 | // License: This file is published under the license of the EMVA GenICam Standard Group. 9 | // A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'. 10 | // If for some reason you are missing this file please contact the EMVA or visit the website 11 | // (http://www.genicam.org) for a full copy. 12 | // 13 | // THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS" 14 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 15 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 16 | // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP 17 | // OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18 | // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 19 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 20 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 21 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 23 | // POSSIBILITY OF SUCH DAMAGE. 24 | //----------------------------------------------------------------------------- 25 | /*! 26 | \file 27 | \brief declspec's to be used for GenApi Windows dll 28 | \ingroup GenApi_PublicImpl 29 | */ 30 | 31 | #ifndef GENAPIDLL_H 32 | #define GENAPIDLL_H 33 | 34 | #if defined(_MSC_VER) 35 | # pragma once 36 | # ifdef GENAPI_EXPORTS 37 | # define GENAPI_DECL __declspec(dllexport) 38 | # else 39 | # define GENAPI_DECL __declspec(dllimport) 40 | # define GENAPI_EXPIMP_TEMPL extern 41 | # endif 42 | #elif defined (__GNUC__) && (__GNUC__ > 3) && defined (__ELF__) 43 | # ifdef GENAPI_EXPORTS 44 | # define GENAPI_DECL __attribute__((visibility("default"))) 45 | # else 46 | # define GENAPI_DECL 47 | # define GENAPI_EXPIMP_TEMPL extern 48 | # endif 49 | #else 50 | # define GENAPI_DECL 51 | # ifndef GENAPI_EXPORTS 52 | # define GENAPI_EXPIMP_TEMPL extern 53 | # endif 54 | #endif 55 | 56 | #endif /* GENAPIDLL_H */ 57 | -------------------------------------------------------------------------------- /thirdparty/GenICam/include/GenApi/DLLLoad.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // (c) 2006 by Basler Vision Technologies 3 | // Section: Vision Components 4 | // Project: GenApi 5 | // Author: Fritz Dierks 6 | // $Header: /cvs/genicam/genicam/library/CPP/include/GenApi/DLLLoad.h,v 1.7 2007/02/16 16:47:15 hartmut_nebelung Exp $ 7 | // 8 | // License: This file is published under the license of the EMVA GenICam Standard Group. 9 | // A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'. 10 | // If for some reason you are missing this file please contact the EMVA or visit the website 11 | // (http://www.genicam.org) for a full copy. 12 | // 13 | // THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS" 14 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 15 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 16 | // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP 17 | // OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18 | // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 19 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 20 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 21 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 23 | // POSSIBILITY OF SUCH DAMAGE. 24 | //----------------------------------------------------------------------------- 25 | /*! 26 | \file 27 | \brief Definition of function for laoding a DLL dynamically 28 | \ingroup GenApi_PublicImpl 29 | */ 30 | 31 | #ifndef GENAPI_DLLLOAD_H 32 | #define GENAPI_DLLLOAD_H 33 | 34 | #include 35 | #include 36 | 37 | #if defined (_MSC_VER) 38 | // nothing 39 | #elif defined (__GNUC__) 40 | # define __cdecl __attribute__((cdecl)) 41 | #else 42 | # error Unsupported compiler 43 | #endif 44 | 45 | namespace GenApi 46 | { 47 | //! Function prototype for the create function implemented by GenApi DLLs 48 | //! \ingroup GenApi_PublicImpl 49 | typedef INodeMap* (__cdecl * Create_f)(const char* pDeviceName); 50 | 51 | //! Function prototype for checking the DLL's GenApi version 52 | //! \ingroup GenApi_PublicImpl 53 | typedef void (__cdecl * GetGenApiVersion_f)(Version_t &Version); 54 | } 55 | 56 | #endif // ifndef GENAPI_DLLLOAD_H 57 | -------------------------------------------------------------------------------- /thirdparty/GenICam/include/GenICamVersion.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // (c) 2006 by Basler Vision Technologies 3 | // Section: Vision Components 4 | // Project: GenICam 5 | // Author: Fritz Dierks 6 | // $Header: /cvs/genicam/genicam/library/CPP/include/GenICamVersion.h,v 1.1 2007/11/14 12:35:43 hartmut_nebelung Exp $ 7 | // 8 | // License: This file is published under the license of the EMVA GenICam Standard Group. 9 | // A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'. 10 | // If for some reason you are missing this file please contact the EMVA or visit the website 11 | // (http://www.genicam.org) for a full copy. 12 | // 13 | // THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS" 14 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 15 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 16 | // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP 17 | // OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18 | // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 19 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 20 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 21 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 23 | // POSSIBILITY OF SUCH DAMAGE. 24 | //----------------------------------------------------------------------------- 25 | /*! 26 | \file 27 | \brief central versioning counters 28 | */ 29 | 30 | #ifndef GENICAM_VERSION_H 31 | #define GENICAM_VERSION_H 32 | 33 | 34 | // Includes a machine generated file containing the version and build number 35 | // The version numbers come from $(GENICAM_ROOT)/SetGenICamVersion.cmd 36 | #include "_GenICamVersion.h" 37 | 38 | // Don't ask... 39 | #define STRINGIFY(x) #x 40 | #define TOSTRING(x) STRINGIFY(x) 41 | 42 | // String versions of the version numbers 43 | #define GENICAM_VERSION_MAJOR_STR TOSTRING( GENICAM_VERSION_MAJOR ) 44 | #define GENICAM_VERSION_MINOR_STR TOSTRING( GENICAM_VERSION_MINOR ) 45 | #define GENICAM_VERSION_SUBMINOR_STR TOSTRING( GENICAM_VERSION_SUBMINOR ) 46 | #define GENICAM_VERSION_BUILD_STR TOSTRING( GENICAM_VERSION_BUILD ) 47 | #define GENICAM_ROOT_VERSION "GENICAM_ROOT_V" GENICAM_VERSION_MAJOR_STR "_" GENICAM_VERSION_MINOR_STR 48 | 49 | #endif // GENICAM_VERSION_H 50 | -------------------------------------------------------------------------------- /src/Gvsp.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | #include "GigEVision.h" 7 | #include "Gvsp.h" 8 | 9 | GvspManager::GvspManager(GigEVision& gev, int nPort): 10 | m_gev(gev), 11 | m_socket(gev.Service(), boost::asio::ip::udp::endpoint(boost::asio::ip::udp::v4(), nPort)), 12 | m_nCurrPartOfFrame(0), 13 | m_nImg(0), 14 | m_bRun(false) 15 | { 16 | StartReceive(); 17 | } 18 | 19 | GvspManager::~GvspManager() 20 | { 21 | Stop(); 22 | // TODO: socket wait or close 23 | } 24 | 25 | void GvspManager::Stop() 26 | { 27 | m_bRun = false; 28 | } 29 | 30 | void GvspManager::StartReceive() 31 | { 32 | m_bRun = true; 33 | boost::asio::ip::udp::endpoint ep; 34 | m_socket.async_receive_from(boost::asio::buffer(m_buff), ep, 35 | boost::bind(&GvspManager::RecHandler, this, 36 | boost::asio::placeholders::error, 37 | boost::asio::placeholders::bytes_transferred)); 38 | } 39 | 40 | void GvspManager::RecHandler(const boost::system::error_code& error, std::size_t nBytes) 41 | { 42 | if (!error || error == boost::asio::error::message_size) 43 | { 44 | uint16_t nPartOfFrame = ntohs(((uint16_t*)&m_buff)[3]); 45 | // std::cout << "Got data:" << nBytes << " bytes\tFrame# " << ntohl(((uint32_t*)&m_buff)[0]) 46 | // << "\tPart of frame# " << nPartOfFrame; 47 | 48 | if(m_buff[4] == 0x01) 49 | { 50 | m_nCurrPartOfFrame = nPartOfFrame; 51 | assert(m_nCurrPartOfFrame == 0); 52 | uint16_t nWidth = ntohs(((uint16_t*)&m_buff)[13]); 53 | uint16_t nHeight = ntohs(((uint16_t*)&m_buff)[15]); 54 | std::cout << "\tHeader width: " << nWidth << "\theight: " << nHeight << std::endl; 55 | m_img.recreate(nWidth, nHeight); 56 | } 57 | else if(m_buff[4] == 0x03) 58 | { 59 | if(nPartOfFrame != m_nCurrPartOfFrame+1) 60 | std::cout << "\n***Missing Package***" << std::endl; 61 | 62 | m_nCurrPartOfFrame = nPartOfFrame; 63 | int nPayloadSize = nBytes-8; 64 | std::copy(m_buff.begin()+8, m_buff.begin() + nPayloadSize, view(m_img).begin() + nPartOfFrame*nPayloadSize); 65 | } 66 | else if(m_buff[4] == 0x02) 67 | { 68 | std::cout << "\tFooter" << std::endl; 69 | boost::gil::png_write_view(str(boost::format("%|03|.png") % m_nImg++), view(m_img)); 70 | } 71 | else 72 | std::cout << "\tUnknown frame" << std::endl; 73 | 74 | if(m_bRun) 75 | StartReceive(); 76 | } 77 | else 78 | std::cerr << "Error receiving stream data" << std::endl; 79 | } 80 | 81 | -------------------------------------------------------------------------------- /thirdparty/GenICam/include/GenApi/impl/GenApiImpl.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // (c) 2006 by Basler Vision Technologies 3 | // Section: Vision Components 4 | // Project: GenApi 5 | // Author: Fritz Dierks 6 | // $Header: /cvs/genicam/genicam/library/CPP/include/GenApi/impl/GenApiImpl.h,v 1.10 2007/08/16 13:56:24 hartmut_nebelung Exp $ 7 | // 8 | // License: This file is published under the license of the EMVA GenICam Standard Group. 9 | // A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'. 10 | // If for some reason you are missing this file please contact the EMVA or visit the website 11 | // (http://www.genicam.org) for a full copy. 12 | // 13 | // THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS" 14 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 15 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 16 | // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP 17 | // OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18 | // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 19 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 20 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 21 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 23 | // POSSIBILITY OF SUCH DAMAGE. 24 | //----------------------------------------------------------------------------- 25 | /*! 26 | \file 27 | \brief Main include file all GenApi implementation headers 28 | */ 29 | 30 | #ifndef GENAPI_GENAPIIMPL_H 31 | #define GENAPI_GENAPIIMPL_H 32 | 33 | #include "../GenApi.h" 34 | 35 | #include "Node.h" 36 | #include "ValueNode.h" 37 | #include "Category.h" 38 | #include "Integer.h" 39 | #include "IntReg.h" 40 | #include "IntKey.h" 41 | #include "MaskedIntReg.h" 42 | #include "Register.h" 43 | #include "Port.h" 44 | #include "Enumeration.h" 45 | #include "EnumEntry.h" 46 | #include "EnumDelegate.h" 47 | #include "Converter.h" 48 | #include "IntConverter.h" 49 | #include "IntSwissKnife.h" 50 | #include "SwissKnife.h" 51 | #include "Txtkey.h" 52 | #include "IEEE1212Parser.h" 53 | #include "DcamAccessCtrlReg.h" 54 | #include "SmartFeature.h" 55 | #include "SimpleString.h" 56 | #include "NodeMap.h" 57 | #include "FltReg.h" 58 | #include "Float.h" 59 | #include "Boolean.h" 60 | #include "Command.h" 61 | #include "INodePrivate.h" 62 | #include "INodeMapPrivate.h" 63 | #include "PointerImpl.h" 64 | 65 | #endif 66 | -------------------------------------------------------------------------------- /thirdparty/GenICam/include/GenApi/IChunkPort.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // (c) 2006 by Basler Vision Technologies 3 | // Section: Vision Components 4 | // Project: GenApi 5 | // Author: Fritz Dierks 6 | // $Header: /cvs/genicam/genicam/library/CPP/include/GenApi/IChunkPort.h,v 1.11 2007/08/16 13:56:39 hartmut_nebelung Exp $ 7 | // 8 | // License: This file is published under the license of the EMVA GenICam Standard Group. 9 | // A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'. 10 | // If for some reason you are missing this file please contact the EMVA or visit the website 11 | // (http://www.genicam.org) for a full copy. 12 | // 13 | // THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS" 14 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 15 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 16 | // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP 17 | // OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18 | // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 19 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 20 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 21 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 23 | // POSSIBILITY OF SUCH DAMAGE. 24 | //----------------------------------------------------------------------------- 25 | /*! 26 | \file 27 | \brief Definition of interface IChunkPort 28 | \ingroup GenApi_PublicInterface 29 | */ 30 | 31 | #ifndef GENAPI_ICHUNKPORT_H 32 | #define GENAPI_ICHUNKPORT_H 33 | 34 | #include 35 | #include "GenApiDll.h" 36 | #include "Types.h" 37 | #include "IPort.h" 38 | 39 | #pragma warning ( push ) 40 | #pragma warning ( disable : 4251 ) // XXX needs to have dll-interface to be used by clients of class YYY 41 | 42 | namespace GenApi 43 | { 44 | //************************************************************* 45 | // IChunkPort interface 46 | //************************************************************* 47 | 48 | /** 49 | \brief Interface for ports attached to a chunk 50 | \ingroup GenApi_PublicInterface 51 | */ 52 | interface IChunkPort : virtual public IPort 53 | { 54 | //! Get the Id of the chunk the port should be attached to 55 | virtual GenICam::gcstring GetChunkID() const = 0; 56 | }; 57 | } 58 | 59 | #pragma warning ( pop ) 60 | 61 | #endif // ifndef GENAPI_ICHUNKPORT_H 62 | -------------------------------------------------------------------------------- /thirdparty/GenICam/include/GenApi/IPortConstruct.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // (c) 2006 by Basler Vision Technologies 3 | // Section: Vision Components 4 | // Project: GenApi 5 | // Author: Margret Albrecht 6 | // $Header: /cvs/genicam/genicam/library/CPP/include/GenApi/IPortConstruct.h,v 1.13 2007/08/16 13:56:41 hartmut_nebelung Exp $ 7 | // 8 | // License: This file is published under the license of the EMVA GenICam Standard Group. 9 | // A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'. 10 | // If for some reason you are missing this file please contact the EMVA or visit the website 11 | // (http://www.genicam.org) for a full copy. 12 | // 13 | // THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS" 14 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 15 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 16 | // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP 17 | // OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18 | // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 19 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 20 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 21 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 23 | // POSSIBILITY OF SUCH DAMAGE. 24 | //----------------------------------------------------------------------------- 25 | /*! 26 | \file 27 | \brief Definition of interface IPortConstruct 28 | \ingroup GenApi_PublicImpl 29 | */ 30 | 31 | #ifndef GENAPI_IPORTCONSTRUCT_H 32 | #define GENAPI_IPORTCONSTRUCT_H 33 | 34 | #include "GenApiDll.h" 35 | #include "Types.h" 36 | #include "IPort.h" 37 | 38 | #pragma warning ( push ) 39 | #pragma warning ( disable : 4251 ) // XXX needs to have dll-interface to be used by clients of class YYY 40 | 41 | namespace GenApi 42 | { 43 | //************************************************************* 44 | // IPortContruct interface 45 | //************************************************************* 46 | 47 | /** 48 | \brief Interface for ports 49 | \ingroup GenApi_PublicImpl 50 | */ 51 | interface IPortConstruct: virtual public IPort 52 | { 53 | //! Sets pointer the real port implementation; this function may called only once 54 | virtual void SetPortImpl(IPort* pPort) = 0; 55 | 56 | //! Determines if the port adapter must perform an endianess swap 57 | virtual EYesNo GetSwapEndianess() = 0; 58 | }; 59 | } 60 | 61 | #pragma warning ( pop ) 62 | 63 | #endif // ifndef GENAPI_IPORTCONSTRUCT_H 64 | -------------------------------------------------------------------------------- /thirdparty/GenICam/include/GenApi/INodeMapDyn.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // (c) 2006 by Basler Vision Technologies 3 | // Section: Vision Components 4 | // Project: GenApi 5 | // Author: Fritz Dierks 6 | // $Header: /cvs/genicam/genicam/library/CPP/include/GenApi/INodeMapDyn.h,v 1.11 2007/08/16 13:56:40 hartmut_nebelung Exp $ 7 | // 8 | // License: This file is published under the license of the EMVA GenICam Standard Group. 9 | // A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'. 10 | // If for some reason you are missing this file please contact the EMVA or visit the website 11 | // (http://www.genicam.org) for a full copy. 12 | // 13 | // THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS" 14 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 15 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 16 | // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP 17 | // OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18 | // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 19 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 20 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 21 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 23 | // POSSIBILITY OF SUCH DAMAGE. 24 | //----------------------------------------------------------------------------- 25 | /*! 26 | \file 27 | \brief Definition of interface INodeMapDyn 28 | \ingroup GenApi_PublicInterface 29 | */ 30 | 31 | #ifndef GENAPI_INODEMAPDYN_H 32 | #define GENAPI_INODEMAPDYN_H 33 | 34 | #include 35 | #include "INodeMap.h" 36 | 37 | #pragma warning ( push ) 38 | #pragma warning ( disable : 4251 ) // XXX needs to have dll-interface to be used by clients of class YYY 39 | 40 | namespace GenApi 41 | { 42 | 43 | //************************************************************* 44 | // INodeMap interface 45 | //************************************************************* 46 | 47 | /** 48 | \brief Interface to access the node map 49 | \ingroup GenApi_PublicInterface 50 | */ 51 | interface INodeMapDyn : virtual public INodeMap 52 | { 53 | //! Deletes all Nodes from the map 54 | virtual void ClearAllNodes() = 0; 55 | 56 | //! Loads an XML froma file 57 | virtual void LoadXMLFromFile(const GenICam::gcstring& FileName) = 0; 58 | 59 | //! Loads an XML from a string 60 | virtual void LoadXMLFromString(const GenICam::gcstring& XMLData) = 0; 61 | 62 | }; 63 | 64 | } 65 | 66 | #pragma warning ( pop ) 67 | 68 | #endif // ifndef GENAPI_INODEMAPDYN_H 69 | -------------------------------------------------------------------------------- /thirdparty/GenICam/include/GenApi/EventAdapter.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // (c) 2006 by Basler Vision Technologies 3 | // Section: Vision Components 4 | // Project: GenApi 5 | // Author: Fritz Dierks 6 | // $Header: /cvs/genicam/genicam/library/CPP/include/GenApi/EventAdapter.h,v 1.8 2007/08/16 13:56:38 hartmut_nebelung Exp $ 7 | // 8 | // License: This file is published under the license of the EMVA GenICam Standard Group. 9 | // A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'. 10 | // If for some reason you are missing this file please contact the EMVA or visit the website 11 | // (http://www.genicam.org) for a full copy. 12 | // 13 | // THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS" 14 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 15 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 16 | // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP 17 | // OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18 | // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 19 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 20 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 21 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 23 | // POSSIBILITY OF SUCH DAMAGE. 24 | //----------------------------------------------------------------------------- 25 | /** 26 | \file 27 | \brief Declaration of the CEventAdapter class. 28 | \ingroup GenApi_PublicUtilities 29 | */ 30 | 31 | #ifndef GENAPI_EVENTADAPTER_H 32 | #define GENAPI_EVENTADAPTER_H 33 | 34 | #include "Types.h" 35 | #include "INodeMap.h" 36 | #include "EventPort.h" 37 | 38 | #include 39 | 40 | namespace GenApi 41 | { 42 | 43 | /** 44 | \brief Delivers Events to ports 45 | \ingroup GenApi_PublicUtilities 46 | */ 47 | class GENAPI_DECL CEventAdapter 48 | { 49 | 50 | public: 51 | //! Constructor 52 | CEventAdapter(INodeMap* pNodeMap = NULL); 53 | 54 | //! Destructor 55 | virtual ~CEventAdapter(); 56 | 57 | //! Attaches to a node map and retrieves the chunk ports 58 | virtual void AttachNodeMap(INodeMap* pNodeMap); 59 | 60 | //! Detaches from the node emap 61 | virtual void DetachNodeMap(); 62 | 63 | //! Deliver message 64 | virtual void DeliverMessage( const uint8_t msg[], uint32_t numBytes ) = 0; 65 | 66 | 67 | protected: 68 | 69 | //! An array of attached ChunkPorts 70 | #pragma warning( push ) 71 | #pragma warning( disable: 4251 ) 72 | std::vector m_pEventPorts; 73 | #pragma warning( pop ) 74 | }; 75 | 76 | } 77 | 78 | #endif // GENAPI_EVENTADAPTER_H 79 | -------------------------------------------------------------------------------- /thirdparty/GenICam/include/Base/GCError.h: -------------------------------------------------------------------------------- 1 | //*************************************************************************** 2 | // (C) 2005 STEMMER IMAGING 3 | // 4 | /// \file 5 | /// GenICam Common Error Values 6 | /// \author Rupert Stelz (STEMMER IMAGING) 7 | /// \version 0.1 8 | /// \date 2005 9 | /// \ingroup Base_PublicUtilities 10 | // 11 | // License: This file is published under the license of the EMVA GenICam Standard Group. 12 | // A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'. 13 | // If for some reason you are missing this file please contact the EMVA or visit the website 14 | // (http://www.genicam.org) for a full copy. 15 | // 16 | // THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS" 17 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 18 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 19 | // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP 20 | // OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 21 | // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 22 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 23 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 25 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 26 | // POSSIBILITY OF SUCH DAMAGE. 27 | //*************************************************************************** 28 | 29 | // TLIClientDummy.dll GenICam TransportLayer Dummy Client 30 | 31 | #ifndef GC_ERROR_DEF_H 32 | #define GC_ERROR_DEF_H 33 | 34 | #include "GCTypes.h" 35 | 36 | namespace GenICam 37 | { 38 | /// Gen Cam Error 39 | //! \ingroup Base_PublicUtilities 40 | typedef int32_t GC_ERROR; 41 | 42 | //! Define a list wich maps error ids to error descrtiptions 43 | //! The list is filled in the cpp file 44 | //! \ingroup Base_PublicUtilities 45 | enum GCErrorID 46 | { 47 | GC_ERR_SUCCESS = 0, 48 | GC_ERR_INVALID_BUFFER_SIZE = -1, 49 | GC_ERR_INVALID_HANDLE = -2, 50 | GC_ERR_INVALID_ID = -3, 51 | GC_ERR_ACCESS_DENIED = -4, 52 | GC_ERR_NO_DATA = -5, 53 | GC_ERR_ERROR = -6, 54 | GC_ERR_INVALID_PARAMETER = -7, 55 | GC_ERR_TIMEOUT = -8, 56 | GC_ERR_INVALID_FILENAME = -9, 57 | GC_ERR_INVALID_ADDRESS = -10, 58 | GC_ERR_FILE_IO = -11 59 | }; 60 | 61 | //! Modules were errors can come from 62 | //! \ingroup Base_PublicUtilities 63 | enum GCModuleID { 64 | GC_MOD_SYSTEM = 0x0, 65 | GC_MOD_TLICLIENT = 0x20000000, 66 | GC_MOD_TLISYSTEM = 0x10000000, 67 | GC_MOD_FACTORY = 0x08000000, 68 | GC_MOD_GENAPI = 0x04000000 69 | 70 | }; 71 | 72 | #define GC_GET_ERROR(ErrorCode) (((ErrorCode ) & 0xFFFF ) | 0xFFFF0000) 73 | #define GC_IS_ERROR(ErrorCode) (((ErrorCode ) & 0x80000000) ? true : false) 74 | } 75 | #endif //GC_ERROR_DEF_H 76 | -------------------------------------------------------------------------------- /thirdparty/GenICam/License_ReadMe.txt: -------------------------------------------------------------------------------- 1 | ============== 2 | == Licenses == 3 | ============== 4 | 5 | 6 | Version 1.0 7 | 8 | 9 | GenICam comes in two versions 10 | ~ a runtime version 11 | ~ a development version. 12 | 13 | 14 | The runtime version comes under the following license: 15 | 16 | Copyright (c) 2006, . 17 | All rights reserved 18 | 19 | Redistribution and use in source and binary forms, without modification, 20 | are permitted provided that the following conditions are met: 21 | 22 | ~ Redistributions of source code must retain the above copyright notice, 23 | this list of conditions and the following disclaimer. 24 | 25 | ~ Redistributions in binary form must reproduce the above copyright notice, 26 | this list of conditions and the following disclaimer in the documentation 27 | and/or other materials provided with the distribution. 28 | 29 | ~ Neither the name of the GenICam standard group nor the names of its contributors 30 | may be used to endorse or promote products derived from this software without 31 | specific prior written permission. 32 | 33 | 34 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 35 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 36 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 37 | SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 38 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 39 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 40 | OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 41 | WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 42 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 43 | POSSIBILITY OF SUCH DAMAGE. 44 | 45 | The development version comes under the GenICam license (see below). 46 | 47 | 48 | GenICam uses the following 3rd party software packages: 49 | 50 | 51 | Package License Internet 52 | ================================================================================== 53 | Mathparser LGPL http://kirya.narod.ru/mathparser.html 54 | http://www.sama.ru/~despair/ccalc/ 55 | Xerces Apache http://xerces.apache.org 56 | Xalan Apache http://xalan.apache.org 57 | Log4Cpp LGPL http://log4cpp.sourceforge.net 58 | CppUnit LGPL http://cppunit.sourceforge.net 59 | setx Win2k ressource kit http://www.microsoft.com 60 | 61 | All license texts come as part of the GenICam distribution in the licenses 62 | subdiretory. If not you can download them from the internet. 63 | 64 | License File Internet 65 | ================================================================================== 66 | LGPL LGPL.txt http://www.gnu.org/licenses/lgpl.html 67 | Apache Apache.txt http://www.apache.org/licenses/LICENSE-2.0 68 | GenICam GenICam_License.pdf http://www.genicam.org 69 | setx setx_license.txt http://www.microsoft.com 70 | 71 | 72 | Last but not least GenICam redistributes the C/C++ runtime DLLs of the 73 | Microsoft Visual C++ compiler in the version 7.1 and 8.0 74 | 75 | -------------------------------------------------------------------------------- /thirdparty/GenICam/include/GenApi/ChunkAdapterGEV.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // (c) 2006 by Basler Vision Technologies 3 | // Section: Vision Components 4 | // Project: GenApi 5 | // Author: Fritz Dierks 6 | // $Header: /cvs/genicam/genicam/library/CPP/include/GenApi/ChunkAdapterGEV.h,v 1.7.2.1 2008/12/08 14:40:19 hartmut_nebelung Exp $ 7 | // 8 | // License: This file is published under the license of the EMVA GenICam Standard Group. 9 | // A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'. 10 | // If for some reason you are missing this file please contact the EMVA or visit the website 11 | // (http://www.genicam.org) for a full copy. 12 | // 13 | // THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS" 14 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 15 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 16 | // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP 17 | // OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18 | // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 19 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 20 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 21 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 23 | // POSSIBILITY OF SUCH DAMAGE. 24 | //----------------------------------------------------------------------------- 25 | /** 26 | \file 27 | \brief Declaration of the CChunkAdapterGEV class. 28 | */ 29 | 30 | #ifndef GENAPI_CHUNKADAPTERGEV_H 31 | #define GENAPI_CHUNKADAPTERGEV_H 32 | 33 | #include "ChunkAdapter.h" 34 | 35 | namespace GenApi 36 | { 37 | 38 | /* ------------------------------------------- */ 39 | // Declartion of GigE Vision Chunk message trailer 40 | 41 | // make sure everything is properly packed 42 | #pragma pack(push, 1) 43 | 44 | //! header of a GVCP request packet 45 | typedef struct GVCP_CHUNK_TRAILER 46 | { 47 | PACK_STRUCT_FIELD(uint32_t ChunkID); 48 | PACK_STRUCT_FIELD(uint32_t ChunkLength); 49 | } 50 | PACK_STRUCT_STRUCT GVCP_CHUNK_TRAILER; 51 | 52 | // restore the previous packing 53 | #pragma pack(pop) 54 | /* ------------------------------------------- */ 55 | 56 | 57 | //! Connects a chunked DCAM buffer to a node map 58 | class GENAPI_DECL CChunkAdapterGEV : public CChunkAdapter 59 | { 60 | 61 | public: 62 | //! Constructor 63 | CChunkAdapterGEV(INodeMap* pNodeMap = NULL); 64 | 65 | //! Destructor 66 | virtual ~CChunkAdapterGEV(); 67 | 68 | //! Checks if a buffer contains chunks in a known format 69 | virtual bool CheckBufferLayout(uint8_t *pBuffer, int64_t BufferLength); 70 | 71 | //! Attaches a buffer to the matching ChunkPort 72 | virtual void AttachBuffer(uint8_t *pBuffer, int64_t BufferLength, AttachStatistics_t *pAttachStatistics = NULL); 73 | 74 | }; 75 | 76 | } 77 | 78 | #endif // GENAPI_CHUNKADAPTERGEV_H 79 | -------------------------------------------------------------------------------- /thirdparty/GenICam/include/GenApi/impl/ValueCache.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // (c) 2006 by Basler Vision Technologies 3 | // Section: Vision Components 4 | // Project: GenApi 5 | // Author: Hartmut Nebelung 6 | // $Header: /cvs/genicam/genicam/library/CPP/include/GenApi/impl/ValueCache.h,v 1.6 2007/08/14 13:21:01 hartmut_nebelung Exp $ 7 | // 8 | // License: This file is published under the license of the EMVA GenICam Standard Group. 9 | // A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'. 10 | // If for some reason you are missing this file please contact the EMVA or visit the website 11 | // (http://www.genicam.org) for a full copy. 12 | // 13 | // THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS" 14 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 15 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 16 | // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP 17 | // OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18 | // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 19 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 20 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 21 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 23 | // POSSIBILITY OF SUCH DAMAGE. 24 | //----------------------------------------------------------------------------- 25 | /*! 26 | \file 27 | \brief Definition of CValueCache 28 | */ 29 | 30 | #ifndef GENAPI_VALUECACHE_H 31 | #define GENAPI_VALUECACHE_H 32 | 33 | #include "../Synch.h" 34 | #include "../Types.h" 35 | 36 | namespace GenApi 37 | { 38 | struct CValueCacheImpl; 39 | 40 | /** 41 | * \ingroup internal_impl 42 | * 43 | * \brief Cache for Registervalues 44 | */ 45 | class CValueCache : public LockableObject< CValueCache, ThreadingModel > 46 | { 47 | public: 48 | CValueCache(); 49 | ~CValueCache(); 50 | 51 | /// Look up a value 52 | void GetValue( int64_t Address, uint32_t Size, void *pValue ) const; 53 | 54 | /// Enter a new value 55 | void SetValue( int64_t Address, uint32_t Size, const void *pValue ); 56 | 57 | /// Invalidate a value 58 | void InvalidateValue( int64_t Address ); 59 | 60 | /// Query whether value is valid 61 | bool IsValueValid( int64_t Address ) const; 62 | 63 | /// Query wheher value is implemented 64 | //bool IsValuePresent( int64_t Address ) const; 65 | 66 | /// Clear all entries 67 | //void ClearAllEntries(); 68 | 69 | private: 70 | /// not implemented: copy constructor 71 | CValueCache( const CValueCache& ); 72 | 73 | /// not implmeneted: assignment operator 74 | CValueCache& operator=( const CValueCache& ); 75 | 76 | private: 77 | 78 | CValueCacheImpl* m_pImpl; 79 | }; 80 | }; 81 | 82 | #endif // GENAPI_VALUECACHE_H 83 | 84 | 85 | -------------------------------------------------------------------------------- /thirdparty/GenICam/include/GenApi/IEnumeration.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // (c) 2006 by Basler Vision Technologies 3 | // Section: Vision Components 4 | // Project: GenApi 5 | // Author: Fritz Dierks 6 | // $Header: /cvs/genicam/genicam/library/CPP/include/GenApi/IEnumeration.h,v 1.15 2007/08/16 13:56:40 hartmut_nebelung Exp $ 7 | // 8 | // License: This file is published under the license of the EMVA GenICam Standard Group. 9 | // A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'. 10 | // If for some reason you are missing this file please contact the EMVA or visit the website 11 | // (http://www.genicam.org) for a full copy. 12 | // 13 | // THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS" 14 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 15 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 16 | // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP 17 | // OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18 | // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 19 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 20 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 21 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 23 | // POSSIBILITY OF SUCH DAMAGE. 24 | //----------------------------------------------------------------------------- 25 | /*! 26 | \file 27 | \brief Definition of interface IEnumeration 28 | \ingroup GenApi_PublicInterface 29 | */ 30 | 31 | #ifndef GENAPI_IENUMERATION_H 32 | #define GENAPI_IENUMERATION_H 33 | 34 | #include 35 | #include "GenApiDll.h" 36 | #include "IEnumEntry.h" 37 | #include "Types.h" 38 | #include "IValue.h" 39 | 40 | #pragma warning ( push ) 41 | #pragma warning ( disable : 4251 ) // XXX needs to have dll-interface to be used by clients of class YYY 42 | 43 | 44 | namespace GenApi 45 | { 46 | //************************************************************* 47 | // Enumeration interface 48 | //************************************************************* 49 | 50 | /** 51 | \brief Interface for enumeration properties 52 | \ingroup GenApi_PublicInterface 53 | */ 54 | interface IEnumeration : virtual public IValue 55 | { 56 | 57 | //! Get list of symbolic Values 58 | virtual void GetSymbolics(StringList_t & Symbolics) = 0; 59 | 60 | //! Get list of entry nodes 61 | virtual void GetEntries(NodeList_t & Entries) = 0; 62 | 63 | //! Set string node value 64 | virtual IEnumeration& operator=(const GenICam::gcstring& ValueStr) = 0; 65 | 66 | //! Set integer node value 67 | virtual void SetIntValue(int64_t Value, bool Verify = true) = 0; 68 | 69 | //! Get string node value 70 | virtual GenICam::gcstring operator*() = 0; 71 | 72 | //! Get integer node value 73 | virtual int64_t GetIntValue(bool Verify = false) = 0; 74 | 75 | //! Get an entry node by name 76 | virtual IEnumEntry *GetEntryByName(const GenICam::gcstring& EntryName) = 0; 77 | 78 | }; 79 | 80 | } 81 | 82 | #pragma warning ( pop ) 83 | 84 | #endif // ifndef GENAPI_IENUMERATION_H 85 | -------------------------------------------------------------------------------- /thirdparty/GenICam/include/GenApi/INodeMap.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // (c) 2006 by Basler Vision Technologies 3 | // Section: Vision Components 4 | // Project: GenApi 5 | // Author: Fritz Dierks 6 | // $Header: /cvs/genicam/genicam/library/CPP/include/GenApi/INodeMap.h,v 1.13 2007/08/16 13:56:40 hartmut_nebelung Exp $ 7 | // 8 | // License: This file is published under the license of the EMVA GenICam Standard Group. 9 | // A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'. 10 | // If for some reason you are missing this file please contact the EMVA or visit the website 11 | // (http://www.genicam.org) for a full copy. 12 | // 13 | // THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS" 14 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 15 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 16 | // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP 17 | // OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18 | // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 19 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 20 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 21 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 23 | // POSSIBILITY OF SUCH DAMAGE. 24 | //----------------------------------------------------------------------------- 25 | /*! 26 | \file 27 | \brief Definition of interface INodeMap 28 | \ingroup GenApi_PublicInterface 29 | */ 30 | 31 | #ifndef GENAPI_INODEMAP_H 32 | #define GENAPI_INODEMAP_H 33 | 34 | #include 35 | #include "INode.h" 36 | #include "IPort.h" 37 | 38 | #pragma warning ( push ) 39 | #pragma warning ( disable : 4251 ) // XXX needs to have dll-interface to be used by clients of class YYY 40 | 41 | namespace GenApi 42 | { 43 | 44 | //************************************************************* 45 | // INodeMap interface 46 | //************************************************************* 47 | 48 | /** 49 | \brief Interface to access the node map 50 | \ingroup GenApi_PublicInterface 51 | */ 52 | interface INodeMap 53 | { 54 | //! Retrieves all nodes in the node map 55 | virtual void GetNodes(NodeList_t &Nodes) const = 0; 56 | 57 | //! Retrieves the node from the central map by Name 58 | virtual INode* GetNode( const GenICam::gcstring& Name) const = 0; 59 | 60 | //! Invalidates all nodes 61 | virtual void InvalidateNodes() const = 0; 62 | 63 | //! Connects a port to a port node with given name 64 | virtual bool Connect( IPort* pPort, const GenICam::gcstring& PortName) const = 0; 65 | 66 | //! Connects a port to the standard port "Device" 67 | virtual bool Connect( IPort* pPort) const = 0; 68 | 69 | //! Get device name 70 | /*! The device name identifies a device instance, e.g. for debuggin purposes. 71 | The default ist "Device". */ 72 | virtual GenICam::gcstring GetDeviceName() = 0; 73 | 74 | //! Fires nodes which have a polling time 75 | virtual void Poll( int64_t ElapsedTime ) = 0; 76 | }; 77 | } 78 | 79 | #pragma warning ( pop ) 80 | 81 | #endif // ifndef GENAPI_INODEMAP_H 82 | -------------------------------------------------------------------------------- /thirdparty/GenICam/include/GenApi/impl/BaseT.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // (c) 2006 by Basler Vision Technologies 3 | // Section: Vision Components 4 | // Project: GenApi 5 | // Author: Alexander Happe 6 | // $Header: /cvs/genicam/genicam/library/CPP/include/GenApi/impl/BaseT.h,v 1.9 2007/08/16 13:56:23 hartmut_nebelung Exp $ 7 | // 8 | // License: This file is published under the license of the EMVA GenICam Standard Group. 9 | // A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'. 10 | // If for some reason you are missing this file please contact the EMVA or visit the website 11 | // (http://www.genicam.org) for a full copy. 12 | // 13 | // THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS" 14 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 15 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 16 | // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP 17 | // OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18 | // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 19 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 20 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 21 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 23 | // POSSIBILITY OF SUCH DAMAGE. 24 | //----------------------------------------------------------------------------- 25 | /*! 26 | \file 27 | \brief Definition of the BaseT class template 28 | */ 29 | 30 | #ifndef GENAPI_BASET_H 31 | #define GENAPI_BASET_H 32 | 33 | #include "../IBase.h" 34 | #include "../EnumClasses.h" 35 | 36 | 37 | namespace GenApi 38 | { 39 | /** 40 | \brief Implementaion of the IBase interface 41 | */ 42 | template 43 | class GENAPI_DECL BaseT : public Base 44 | { 45 | public: 46 | //! Implementation of IBase::GetAccessMode() 47 | virtual EAccessMode GetAccessMode() const 48 | { 49 | AutoLock l(Base::GetLock()); 50 | 51 | // Use cache 52 | #if ! defined( DISABLE_ACCESS_MODE_CACHING ) || (DISABLE_ACCESS_MODE_CACHING == 0) 53 | 54 | if ( Base::m_AccessModeCache != _UndefinedAccesMode ) 55 | { 56 | EAccessMode AccessMode = Combine(Base::m_AccessModeCache, Base::m_ImposedAccessMode); 57 | #ifdef LOG4C 58 | Base::m_pAccessLog->info("GetAccessMode = '%s' (from cache)", EAccessModeClass::ToString(AccessMode).c_str() ); 59 | #endif 60 | 61 | return AccessMode; 62 | } 63 | 64 | #endif 65 | 66 | #ifdef LOG4C 67 | Base::m_pAccessLog->info("GetAccessMode..."); 68 | #endif 69 | 70 | EAccessMode NaturalAccessMode = Base::InternalGetAccessMode(); 71 | 72 | EAccessMode AccessMode = Combine(NaturalAccessMode, Base::m_ImposedAccessMode); 73 | 74 | #ifdef LOG4C 75 | Base::m_pAccessLog->info("...GetAccessMode = '%s' ", EAccessModeClass::ToString(AccessMode).c_str() ); 76 | #endif 77 | return AccessMode; 78 | 79 | } 80 | }; 81 | } 82 | 83 | #endif 84 | -------------------------------------------------------------------------------- /thirdparty/GenICam/include/GenApi/IDeviceInfo.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // (c) 2006 by Basler Vision Technologies 3 | // Section: Vision Components 4 | // Project: GenApi 5 | // Author: Fritz Dierks 6 | // $Header: /cvs/genicam/genicam/library/CPP/include/GenApi/IDeviceInfo.h,v 1.11 2007/08/16 13:56:39 hartmut_nebelung Exp $ 7 | // 8 | // License: This file is published under the license of the EMVA GenICam Standard Group. 9 | // A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'. 10 | // If for some reason you are missing this file please contact the EMVA or visit the website 11 | // (http://www.genicam.org) for a full copy. 12 | // 13 | // THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS" 14 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 15 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 16 | // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP 17 | // OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18 | // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 19 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 20 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 21 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 23 | // POSSIBILITY OF SUCH DAMAGE. 24 | //----------------------------------------------------------------------------- 25 | /*! 26 | \file 27 | \brief Definition of interface INodeMap 28 | \ingroup GenApi_PublicInterface 29 | */ 30 | 31 | #ifndef GENAPI_DEVICEINFO_H 32 | #define GENAPI_DEVICEINFO_H 33 | 34 | #include 35 | 36 | #pragma warning ( push ) 37 | #pragma warning ( disable : 4251 ) // XXX needs to have dll-interface to be used by clients of class YYY 38 | 39 | namespace GenApi 40 | { 41 | 42 | //************************************************************* 43 | // IDeviceInfo interface 44 | //************************************************************* 45 | 46 | /** 47 | \brief Interface to get information about the device (= nodemap) 48 | \ingroup GenApi_PublicInterface 49 | */ 50 | interface IDeviceInfo 51 | { 52 | //! Get the model name 53 | virtual GenICam::gcstring GetModelName() = 0; 54 | 55 | //! Get the vendor name 56 | virtual GenICam::gcstring GetVendorName() = 0; 57 | 58 | //! Get tool tip 59 | virtual GenICam::gcstring GetToolTip() = 0; 60 | 61 | //! Get the standard name space 62 | virtual GenICam::gcstring GetStandardNameSpace() = 0; 63 | 64 | //! Get the version of the DLL's GenApi implementation 65 | virtual void GetGenApiVersion(Version_t &Version, uint16_t &Build) = 0; 66 | 67 | //! Get the schema version number 68 | virtual void GetSchemaVersion(Version_t &Version) = 0; 69 | 70 | //! Get the version of the device description file 71 | virtual void GetDeviceVersion(Version_t &Version) = 0; 72 | 73 | //! Get the Guid describing the product 74 | virtual GenICam::gcstring GetProductGuid() = 0; 75 | 76 | //! Get the Guid describing the product version 77 | virtual GenICam::gcstring GetVersionGuid() = 0; 78 | }; 79 | } 80 | 81 | #pragma warning ( pop ) 82 | 83 | #endif // ifndef GENAPI_IDEVICEINFO_H 84 | -------------------------------------------------------------------------------- /thirdparty/GenICam/include/GenApi/impl/ValueNode.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // (c) 2006 by Basler Vision Technologies 3 | // Section: Vision Components 4 | // Project: GenApi 5 | // Author: Fritz Dierks 6 | // $Header: /cvs/genicam/genicam/library/CPP/include/GenApi/impl/ValueNode.h,v 1.8 2007/08/14 13:21:01 hartmut_nebelung Exp $ 7 | // 8 | // License: This file is published under the license of the EMVA GenICam Standard Group. 9 | // A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'. 10 | // If for some reason you are missing this file please contact the EMVA or visit the website 11 | // (http://www.genicam.org) for a full copy. 12 | // 13 | // THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS" 14 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 15 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 16 | // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP 17 | // OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18 | // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 19 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 20 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 21 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 23 | // POSSIBILITY OF SUCH DAMAGE. 24 | //----------------------------------------------------------------------------- 25 | /*! 26 | \file 27 | \brief Definition of CValueNode 28 | */ 29 | 30 | #ifndef GENAPI_VALUENODE_H 31 | #define GENAPI_VALUENODE_H 32 | 33 | #include "../IValue.h" 34 | #include "Node.h" 35 | #include "ValueT.h" 36 | #include "BaseT.h" 37 | #include "NodeT.h" 38 | 39 | #pragma warning ( push ) 40 | #pragma warning ( disable : 4275 ) // non dll-interface XXX used as base for dll-interface class YYY 41 | 42 | namespace GenApi 43 | { 44 | 45 | class GENAPI_DECL CValueNodeImpl : public CNodeImpl, virtual public IValue 46 | { 47 | protected: 48 | 49 | //------------------------------------------------------------- 50 | // IValue implementation 51 | //------------------------------------------------------------- 52 | 53 | //! Get content of the node as string 54 | virtual GenICam::gcstring InternalToString(bool Verify = false); 55 | 56 | //! Set content of the node as string 57 | virtual void InternalFromString(const GenICam::gcstring& ValueStr, bool Verify = true); 58 | 59 | //------------------------------------------------------------- 60 | // INodePrivate implementation 61 | //------------------------------------------------------------- 62 | virtual bool IsTerminalNode() const { return true; } 63 | 64 | 65 | 66 | protected: 67 | //! Dummy value 68 | GenICam::gcstring m_Value; 69 | }; 70 | 71 | //************************************************************* 72 | // CValueNode class 73 | //************************************************************* 74 | 75 | //! Generic Node with dummy IValue implementation 76 | /*! This node type is required for testing */ 77 | 78 | class GENAPI_DECL CValueNode : public BaseT< ValueT< NodeT < CValueNodeImpl > > > 79 | { 80 | }; 81 | 82 | } 83 | #pragma warning ( pop ) 84 | 85 | #endif // ifndef GENAPI_VALUENODE_H 86 | -------------------------------------------------------------------------------- /thirdparty/GenICam/include/GenApi/IBase.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // (c) 2006 by Basler Vision Technologies 3 | // Section: Vision Components 4 | // Project: GenApi 5 | // Author: Fritz Dierks 6 | // $Header: /cvs/genicam/genicam/library/CPP/include/GenApi/IBase.h,v 1.14 2007/08/16 13:56:39 hartmut_nebelung Exp $ 7 | // 8 | // License: This file is published under the license of the EMVA GenICam Standard Group. 9 | // A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'. 10 | // If for some reason you are missing this file please contact the EMVA or visit the website 11 | // (http://www.genicam.org) for a full copy. 12 | // 13 | // THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS" 14 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 15 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 16 | // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP 17 | // OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18 | // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 19 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 20 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 21 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 23 | // POSSIBILITY OF SUCH DAMAGE. 24 | //----------------------------------------------------------------------------- 25 | /*! 26 | \file 27 | \brief Definition of interface IBase 28 | \ingroup GenApi_PublicInterface 29 | */ 30 | 31 | 32 | #ifndef GENAPI_IBASE_H 33 | #define GENAPI_IBASE_H 34 | 35 | #include "GenApiDll.h" 36 | #include "Types.h" 37 | #include "Reference.h" 38 | 39 | #pragma warning ( push ) 40 | #pragma warning ( disable : 4251 ) // XXX needs to have dll-interface to be used by clients of class YYY 41 | 42 | namespace GenApi 43 | { 44 | //************************************************************* 45 | // IBase interface 46 | //************************************************************* 47 | 48 | /** 49 | \brief Base interface common to all nodes 50 | \ingroup GenApi_PublicInterface 51 | */ 52 | interface IBase 53 | { 54 | //! Get the access mode of the node 55 | virtual EAccessMode GetAccessMode() const = 0; 56 | }; 57 | 58 | //************************************************************* 59 | // CBaseRef class 60 | //************************************************************* 61 | 62 | /** 63 | \internal 64 | \brief Reference to an IBase pointer 65 | \ingroup GenApi_PublicImpl 66 | */ 67 | template 68 | class CBaseRefT : public CReferenceT 69 | { 70 | typedef CReferenceT ref; 71 | 72 | public: 73 | /*--------------------------------------------------------*/ 74 | // IBase 75 | /*--------------------------------------------------------*/ 76 | 77 | //! Get the access mode of the node 78 | virtual EAccessMode GetAccessMode() const 79 | { 80 | if(ref::m_Ptr) 81 | return ref::m_Ptr->GetAccessMode(); 82 | else 83 | return NI; 84 | } 85 | }; 86 | 87 | //! Reference to an IBase pointer 88 | //! \ingroup GenApi_PublicImpl 89 | typedef CBaseRefT CBaseRef; 90 | 91 | } 92 | #pragma warning ( pop ) 93 | 94 | #endif // ifndef GENAPI_IBASE_H 95 | -------------------------------------------------------------------------------- /thirdparty/GenICam/include/GenApi/RegisterSetHelper.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // (c) 2006 by Basler Vision Technologies 3 | // Section: Vision Components 4 | // Project: GenApi 5 | // Author: Alexander Happe / Fritz Dierks 6 | // $Header: /cvs/genicam/genicam/library/CPP/include/GenApi/RegisterSetHelper.h,v 1.7 2006/07/18 13:31:52 rueder Exp $ 7 | // 8 | // License: This file is published under the license of the EMVA GenICam Standard Group. 9 | // A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'. 10 | // If for some reason you are missing this file please contact the EMVA or visit the website 11 | // (http://www.genicam.org) for a full copy. 12 | // 13 | // THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS" 14 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 15 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 16 | // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP 17 | // OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18 | // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 19 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 20 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 21 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 23 | // POSSIBILITY OF SUCH DAMAGE. 24 | //----------------------------------------------------------------------------- 25 | /*! 26 | \file 27 | \brief Definition of CRegisterSetHelper 28 | \ingroup GenApi_PublicUtilities 29 | */ 30 | 31 | 32 | #ifndef REGISTER_SET_HELPER_H 33 | #define REGISTER_SET_HELPER_H 34 | 35 | namespace GenApi 36 | { 37 | /** 38 | \brief Copies data from buffer to variables ina type safe manner 39 | \ingroup GenApi_PublicUtilities 40 | */ 41 | class GENAPI_DECL CRegisterSetHelper 42 | { 43 | public: 44 | //! Memcopy fireing exceptions 45 | static size_t CopyData( void *pvDestination, size_t nbyDestSize, const void *pvSource, size_t nbySourceSize ) 46 | { 47 | if (nbyDestSize != nbySourceSize) 48 | { 49 | throw OUT_OF_RANGE_EXCEPTION("CopyData : Destination size (%ld) does not fit source size (%d)", nbyDestSize, nbySourceSize); 50 | } 51 | 52 | #if defined(_WINDOWS_) 53 | if ( IsBadWritePtr(pvDestination, nbyDestSize) || IsBadReadPtr(pvSource, nbySourceSize) ) 54 | { 55 | throw RUNTIME_EXCEPTION("Invalid user buffer"); 56 | } 57 | #endif 58 | 59 | memcpy( pvDestination, pvSource, nbySourceSize ); 60 | return nbySourceSize; 61 | } 62 | 63 | /** 64 | \brief Typesafe copy from variable to buffer 65 | */ 66 | template 67 | static size_t CopyToBuffer( void *pvDestination, size_t nbyDestSize, T *d ) 68 | { 69 | return CopyData( pvDestination, nbyDestSize, d, sizeof( *d ) ); 70 | } 71 | 72 | /** 73 | \brief Typesafe copy from buffer to variable 74 | */ 75 | template 76 | static size_t CopyFromBuffer( T *d, const void *pvDestination, size_t nbyDestSize) 77 | { 78 | return CopyData( d, sizeof( *d ), pvDestination, nbyDestSize); 79 | } 80 | }; 81 | 82 | } // namespace GenApi 83 | 84 | #endif // ifndef REGISTER_SET_HELPER_H 85 | -------------------------------------------------------------------------------- /thirdparty/GenICam/include/GenApi/impl/INodeMapPrivate.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // (c) 2006 by Basler Vision Technologies 3 | // Section: Vision Components 4 | // Project: GenApi 5 | // Author: Fritz Dierks 6 | // $Header: /cvs/genicam/genicam/library/CPP/include/GenApi/impl/INodeMapPrivate.h,v 1.7 2007/08/16 13:56:24 hartmut_nebelung Exp $ 7 | // 8 | // License: This file is published under the license of the EMVA GenICam Standard Group. 9 | // A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'. 10 | // If for some reason you are missing this file please contact the EMVA or visit the website 11 | // (http://www.genicam.org) for a full copy. 12 | // 13 | // THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS" 14 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 15 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 16 | // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP 17 | // OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18 | // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 19 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 20 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 21 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 23 | // POSSIBILITY OF SUCH DAMAGE. 24 | //----------------------------------------------------------------------------- 25 | /*! 26 | \file 27 | \brief Definition of interface INodeMapPrivate 28 | \ingroup GenApi_PublicImpl 29 | */ 30 | 31 | #ifndef GENAPI_INODEMAPPRIVATE_H 32 | #define GENAPI_INODEMAPPRIVATE_H 33 | 34 | #include 35 | #include "../Synch.h" 36 | #include "../Counter.h" 37 | #include "../INodeMap.h" 38 | #include "INodePrivate.h" 39 | 40 | #pragma warning ( push ) 41 | #pragma warning ( disable : 4251 ) // XXX needs to have dll-interface to be used by clients of class YYY 42 | 43 | namespace GenApi 44 | { 45 | /** 46 | \brief NodeMap functions used for initilaization 47 | \ingroup GenApi_PublicImpl 48 | */ 49 | interface INodeMapPrivate : virtual public INodeMap 50 | { 51 | //! Adds a node to the map 52 | virtual void AddNode( const GenICam::gcstring& key, GenApi::INodePrivate *node) = 0; 53 | 54 | //! Set property by name as string 55 | /*! return value true if the property was handled; false else */ 56 | virtual bool SetProperty(const GenICam::gcstring& pPropertyName, const GenICam::gcstring& pValueStr) = 0; 57 | 58 | //! Set property by name as stringwith attribute 59 | /*! return value true if the property was handled; false else */ 60 | virtual bool SetProperty(const GenICam::gcstring& pPropertyName, const GenICam::gcstring& pValueStr, const GenICam::gcstring& pAttributeStr) = 0; 61 | 62 | //! Returns the lock which guards the node map 63 | virtual ThreadingModel::LockType& GetLock() const = 0; 64 | 65 | //! Returns the object which counts the depth of SetValue() call-chains 66 | virtual Counter& GetBathometer() = 0; 67 | 68 | //! Retrieve all top-level nodes in the node map 69 | virtual void GetTopLevelNodes(NodeList_t &Nodes) const = 0; 70 | 71 | //! finalizes construction of the node map 72 | virtual void FinalConstruct() = 0; 73 | 74 | }; 75 | 76 | } 77 | 78 | #pragma warning ( pop ) 79 | 80 | #endif // ifndef GENAPI_INODEMAPPROVATE_H 81 | -------------------------------------------------------------------------------- /thirdparty/GenICam/include/GenApi/EventAdapter1394.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // (c) 2006 by Basler Vision Technologies 3 | // Section: Vision Components 4 | // Project: GenApi 5 | // Author: Hartmut Nebelung 6 | // $Header: /cvs/genicam/genicam/library/CPP/include/GenApi/EventAdapter1394.h,v 1.2 2007/08/16 13:56:38 hartmut_nebelung Exp $ 7 | // 8 | // License: This file is published under the license of the EMVA GenICam Standard Group. 9 | // A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'. 10 | // If for some reason you are missing this file please contact the EMVA or visit the website 11 | // (http://www.genicam.org) for a full copy. 12 | // 13 | // THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS" 14 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 15 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 16 | // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP 17 | // OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18 | // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 19 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 20 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 21 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 23 | // POSSIBILITY OF SUCH DAMAGE. 24 | //----------------------------------------------------------------------------- 25 | /** 26 | \file 27 | \brief Declaration of the CEventAdapter1394 class. 28 | */ 29 | #ifndef __EVENTADAPTER1394_H__ 30 | #define __EVENTADAPTER1394_H__ 31 | 32 | 33 | #if _MSC_VER > 1000 34 | #pragma once 35 | #endif 36 | 37 | #include "EventAdapter.h" 38 | #include "Log.h" 39 | 40 | namespace GenApi 41 | { 42 | // the opaque event data on IEEE 1394 43 | struct EventData1394; 44 | 45 | //! Distribute the events to the node map 46 | class GENAPI_DECL CEventAdapter1394 : public GenApi::CEventAdapter 47 | { 48 | public: 49 | //! constructor 50 | explicit CEventAdapter1394( INodeMap* pNodeMap=NULL ); 51 | private: 52 | //! not implemented: copy constructor 53 | CEventAdapter1394( const CEventAdapter1394& ); 54 | //! not implemented: assignment operator 55 | CEventAdapter1394& operator=( const CEventAdapter1394& ); 56 | 57 | public: 58 | virtual void DeliverMessage( const uint8_t msg[], uint32_t numBytes ); 59 | //! distributes events to node map 60 | void DeliverEventMessage( EventData1394& Event, uint32_t numBytes ); 61 | private: 62 | #ifdef LOG4C 63 | //! Logger for messages concerning the AccessMode 64 | log4cpp::Category *m_pAccessLog; 65 | 66 | //! Logger for messages concerning the getting and setting values 67 | log4cpp::Category *m_pValueLog; 68 | 69 | //! Logger for messages concerning the range check 70 | log4cpp::Category *m_pRangeLog; 71 | 72 | //! Logger for messages concerning the port access 73 | log4cpp::Category *m_pPortLog; 74 | 75 | //! Logger for messages concerning the caching access 76 | log4cpp::Category *m_pCacheLog; 77 | 78 | //! Logger for messages concerning administrative access, e.g. GetNode() 79 | log4cpp::Category *m_pAdminLog; 80 | 81 | //! Logger for messages concerning miscellaneoud access which does not fit to the other categories 82 | log4cpp::Category *m_pMiscLog; 83 | #endif 84 | }; 85 | } 86 | #endif //__EVENTADAPTER1394_H__ 87 | -------------------------------------------------------------------------------- /thirdparty/GenICam/include/GenApi/impl/MathParser/MathParser.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // (c) 2006 by Basler Vision Technologies 3 | // Section: Vision Components 4 | // Project: GenApi 5 | // Author: Margret Albrecht 6 | // $Header: /cvs/genicam/genicam/library/CPP/include/GenApi/impl/MathParser/MathParser.h,v 1.9.2.1 2009/03/27 09:59:48 hartmut_nebelung Exp $ 7 | // 8 | // License: Derived from Kirill Zaborski's MathParser library (http://kirya.narod.ru/mathparser.html ). 9 | // This library comes under LGPL license (see http://www.gnu.org/licenses/lgpl.html). 10 | // Kirill's implementation is a C++ port of the CCalc library from Walery Studennikov (http://www.sama.ru/~despair/ccalc/) 11 | // which also comes under the LGPL. 12 | //----------------------------------------------------------------------------- 13 | /*! 14 | \file 15 | \brief Definition of CMathParser 16 | 17 | 18 | */ 19 | #ifndef _MATHPARSER_H_ 20 | #define _MATHPARSER_H_ 21 | 22 | #if defined (_MSC_VER) && (_MSC_VER > 1000) 23 | #pragma once 24 | #endif 25 | 26 | #include "MathParserDll.h" 27 | #include 28 | #include 29 | #include "MathParserDll.h" 30 | #include "StrMap.h" 31 | #include "Lexer.h" 32 | 33 | #include 34 | 35 | #ifdef _MSC_VER // *JS* 36 | #pragma warning(push) 37 | #pragma warning(disable: 4251) // class 'xxx' needs to have dll-interface to be used by clients of class 'yyy' 38 | #endif 39 | 40 | #define ORIGINAL_STACK_SIZE 64 41 | 42 | extern const double DblErR; 43 | extern const double DblNiN; 44 | 45 | 46 | typedef double (*OneArgFunc) ( double arg ); 47 | typedef char* (*MultiArgFunc) ( int paramcnt, double *args, 48 | CStrMap *strparams, double *result ); 49 | typedef int (*PrmSrchFunc) ( const char *str, size_t len, double *value, 50 | void *param ); 51 | /** 52 | * \ingroup internal_impl 53 | * 54 | * \brief Expresion parser and evaluator of CSwissKnife 55 | */ 56 | class MATHPARSERDLL_API CMathParser{ 57 | typedef enum { 58 | // Binary 59 | OP_SHL, OP_SHR, OP_POW, 60 | OP_LOGIC_NEQ, OP_LOGIC_GEQ, OP_LOGIC_LEQ, 61 | OP_LOGIC_AND, OP_LOGIC_OR, // Logical 62 | OP_COMSTART, OP_ASSIGN, // For internal needs 63 | OP_OBR, // Special 64 | OP_ADD, OP_SUB, OP_MUL, OP_DIV, OP_MOD, OP_UNK, // Arithmetic 65 | OP_XOR, OP_NOT, OP_AND, OP_OR, // Bitwise 66 | OP_EQU, OP_GREATER, OP_LESS, 67 | OP_LOGIC, OP_LOGIC_SEP, OP_CBR, OP_COMMA, // Logical 68 | OP_FORMULAEND, // For script 69 | OP_FUNC_ONEARG, OP_FUNC_MULTIARG // Special 70 | } OperType_t; 71 | static const char OpPriorities[OP_FUNC_MULTIARG+1]; 72 | typedef struct { 73 | OperType_t OperType; 74 | const void *Func; 75 | char PrevValTop; 76 | CStrMap *StrParams; 77 | } Operation; 78 | static const Operation BrOp; 79 | static const Operation NegOp; 80 | std::vector OpStack; 81 | std::vector ValStack; 82 | int OpTop, ValTop; 83 | int ObrDist; 84 | CLexer Lexer; 85 | int script; 86 | CStrMap *VarParams; 87 | static CStrMap IntFunctions; 88 | static CSymTable MathSymTable; 89 | static char errbuf[256]; 90 | static hqCharType MathCharTypeTable[256]; 91 | static int initializations_performed; 92 | const char * ParseScript(double *result); 93 | const char * ParseFormula(double *result); 94 | const char * PrepareFormula(); 95 | const char * Calc(); 96 | const char * CalcToObr(); 97 | public: 98 | CStrMap *Parameters; 99 | CStrMap *ExtFunctions; 100 | PrmSrchFunc MoreParams; 101 | void *ParamFuncParam; 102 | CMathParser( const char *MoreLetters=NULL ); 103 | const char * Parse( const char *Formula, double *result); 104 | ~CMathParser(void); 105 | }; 106 | 107 | #ifdef _MSC_VER // *JS* 108 | #pragma warning(pop) 109 | #endif 110 | 111 | #endif //_MATHPARSER_H_ 112 | -------------------------------------------------------------------------------- /thirdparty/GenICam/include/GenApi/impl/Compatibility.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // (c) 2006 by Basler Vision Technologies 3 | // Section: Vision Components 4 | // Project: GenApi 5 | // Author: Margret Albrecht 6 | // $Header: /cvs/genicam/genicam/library/CPP/include/GenApi/impl/Compatibility.h,v 1.10.2.1 2008/08/18 15:29:38 hartmut_nebelung Exp $ 7 | // 8 | // License: This file is published under the license of the EMVA GenICam Standard Group. 9 | // A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'. 10 | // If for some reason you are missing this file please contact the EMVA or visit the website 11 | // (http://www.genicam.org) for a full copy. 12 | // 13 | // THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS" 14 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 15 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 16 | // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP 17 | // OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18 | // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 19 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 20 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 21 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 23 | // POSSIBILITY OF SUCH DAMAGE. 24 | //----------------------------------------------------------------------------- 25 | /*! 26 | \file 27 | \brief Definition of macros for cross-platform compatibility 28 | */ 29 | 30 | #ifndef GENAPI_COMPATIBILITY_H 31 | #define GENAPI_COMPATIBILITY_H 32 | 33 | #if defined (_MSC_VER) && defined (_WIN32) 34 | 35 | #define NOMINMAX 36 | 37 | #pragma comment( lib, "ws2_32.lib") 38 | #include 39 | 40 | #define __LITTLE_ENDIAN 1234 41 | #define __BIG_ENDIAN 4321 42 | #if defined( _M_IX86 ) || defined( _M_X64 ) // *JS* 43 | #define __BYTE_ORDER __LITTLE_ENDIAN 44 | #else 45 | #error Unsupported architecture 46 | #endif 47 | 48 | #include 49 | 50 | #pragma intrinsic(_byteswap_ushort) 51 | #pragma intrinsic(_byteswap_ulong) 52 | #pragma intrinsic(_byteswap_uint64) 53 | #define bswap_16(s) _byteswap_ushort(s) 54 | #define bswap_32(s) _byteswap_ulong(s) 55 | #define bswap_64(s) _byteswap_uint64(s) 56 | 57 | #define _DEFINE_GUID(name, l, w0, w1, c0, c1, c2, c3, c4, c5, c6, c7) \ 58 | GUID name = { l, w0, w1, { c0, c1, c2, c3, c4, c5, c6, c7 } }; 59 | 60 | #elif defined (__GNUC__) && defined (__unix__) 61 | 62 | #include 63 | #include 64 | #include 65 | #include 66 | 67 | #define _snprintf snprintf 68 | #define _strtoi64 strtoll 69 | #define _vsnprintf vsnprintf 70 | #define _strdup strdup 71 | #define _isnan isnan 72 | 73 | // these definitions break the stl-base code and should not be used! 74 | //#define min(x, y) (((x) < (y)) ? (x) : (y)) 75 | //#define mAX(x, y) (((x) > (y)) ? (x) : (y)) 76 | 77 | /* 78 | * Watch out! 79 | * In order not to break existing code, we have to duplicate the 80 | * broken MS Windows GUID handling. Never mix with code using the 81 | * rfc4122-compliant uuid framework implemented by libuuid! 82 | */ 83 | 84 | typedef struct _GUID { 85 | uint32_t Data1; 86 | uint16_t Data2; 87 | uint16_t Data3; 88 | unsigned char Data4[ 8 ]; 89 | } __attribute__ ((packed)) GUID; 90 | 91 | #define _DEFINE_GUID(name, l, w0, w1, c0, c1, c2, c3, c4, c5, c6, c7) \ 92 | GUID name = { l, w0, w1, { c0, c1, c2, c3, c4, c5, c6, c7 } } 93 | 94 | #define IsEqualGUID(a, b) (!memcmp(&a, &b, sizeof (GUID))) 95 | 96 | inline bool 97 | operator ==(const GUID &a, const GUID &b) 98 | { 99 | return IsEqualGUID(a, b); 100 | } 101 | 102 | #else 103 | # error Unsupported platform 104 | #endif 105 | 106 | #endif // ifndef GENAPI_COMPATIBILITY_H 107 | -------------------------------------------------------------------------------- /thirdparty/GenICam/include/GenApi/ICategory.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // (c) 2006 by Basler Vision Technologies 3 | // Section: Vision Components 4 | // Project: GenApi 5 | // Author: Fritz Dierks 6 | // $Header: /cvs/genicam/genicam/library/CPP/include/GenApi/ICategory.h,v 1.13 2007/08/16 13:56:39 hartmut_nebelung Exp $ 7 | // 8 | // License: This file is published under the license of the EMVA GenICam Standard Group. 9 | // A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'. 10 | // If for some reason you are missing this file please contact the EMVA or visit the website 11 | // (http://www.genicam.org) for a full copy. 12 | // 13 | // THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS" 14 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 15 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 16 | // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP 17 | // OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18 | // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 19 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 20 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 21 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 23 | // POSSIBILITY OF SUCH DAMAGE. 24 | //----------------------------------------------------------------------------- 25 | /*! 26 | \file 27 | \brief Definition of interface ICategory and types FeatureList_t : 28 | \ingroup GenApi_PublicInterface 29 | */ 30 | 31 | 32 | #ifndef GENAPI_ICATEGORY_H 33 | #define GENAPI_ICATEGORY_H 34 | 35 | #include "GenApiDll.h" 36 | #include "Types.h" 37 | #include "IValue.h" 38 | #include 39 | #include "Container.h" 40 | 41 | #include 42 | 43 | #pragma warning ( push ) 44 | #pragma warning ( disable : 4251 ) // XXX needs to have dll-interface to be used by clients of class YYY 45 | 46 | 47 | namespace GenApi 48 | { 49 | 50 | interface INode; 51 | 52 | 53 | //************************************************************* 54 | // ICategory interface 55 | //************************************************************* 56 | 57 | /** 58 | \brief Gives access to a category node 59 | \ingroup GenApi_PublicInterface 60 | */ 61 | interface ICategory : virtual public IValue 62 | { 63 | 64 | //! Get all features of the category (including sub-categories) 65 | virtual void GetFeatures(FeatureList_t &Features) const = 0; 66 | 67 | }; 68 | 69 | 70 | //************************************************************* 71 | // CCategoryRef class 72 | //************************************************************* 73 | 74 | /** 75 | \internal 76 | \brief Reference to an ICategory pointer 77 | \ingroup GenApi_PublicImpl 78 | */ 79 | template 80 | class CCategoryRefT : public CValueRefT 81 | { 82 | typedef CValueRefT ref; 83 | 84 | public: 85 | /*--------------------------------------------------------*/ 86 | // ICategory 87 | /*--------------------------------------------------------*/ 88 | 89 | //! Get all features of the category (including sub-categories) 90 | virtual void GetFeatures(FeatureList_t &Features) const 91 | { 92 | if(ref::m_Ptr) 93 | return ref::m_Ptr->GetFeatures(Features); 94 | else 95 | throw ACCESS_EXCEPTION("Feature not present (reference not valid)"); 96 | } 97 | 98 | }; 99 | 100 | //! Reference to an ICategory pointer 101 | //! \ingroup GenApi_PublicImpl 102 | typedef CCategoryRefT CCategoryRef; 103 | 104 | } 105 | #pragma warning ( pop ) 106 | 107 | #endif // ifndef GENAPI_ICATEGORY_H 108 | -------------------------------------------------------------------------------- /thirdparty/GenICam/include/Log/CLog.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // (c) 2006 by Basler Vision Technologies 3 | // Section: Vision Components 4 | // Project: GenApi 5 | // Author: Fritz Dierks 6 | // $Header: /cvs/genicam/genicam/library/CPP/include/Log/CLog.h,v 1.7 2007/08/16 13:56:43 hartmut_nebelung Exp $ 7 | // 8 | // License: This file is published under the license of the EMVA GenICam Standard Group. 9 | // A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'. 10 | // If for some reason you are missing this file please contact the EMVA or visit the website 11 | // (http://www.genicam.org) for a full copy. 12 | // 13 | // THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS" 14 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 15 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 16 | // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP 17 | // OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18 | // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 19 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 20 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 21 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 23 | // POSSIBILITY OF SUCH DAMAGE. 24 | //----------------------------------------------------------------------------- 25 | /** 26 | \file 27 | \brief Implementation of CLog. 28 | \ingroup Log_PublicUtilities 29 | */ 30 | 31 | #ifndef DEF_CLOG_H_ 32 | #define DEF_CLOG_H_ 33 | 34 | #pragma warning (push, 3) 35 | #include 36 | #include 37 | #include 38 | #include 39 | #include 40 | #include 41 | #include 42 | #include 43 | #include 44 | #if defined (_WIN32) 45 | #include 46 | #include 47 | #elif defined (__GNUC__) && defined (__unix__) 48 | #include 49 | #endif 50 | #include 51 | #pragma warning (pop) 52 | 53 | #include "LogDll.h" 54 | #include 55 | #include 56 | 57 | 58 | namespace GenICam 59 | { 60 | 61 | /** 62 | \brief Helper class encapsualting log4cpp 63 | \ingroup Log_PublicUtilities 64 | */ 65 | class LOG_DECL CLog 66 | { 67 | public: 68 | //! Retrieves the root category 69 | static log4cpp::Category& GetRootLogger( void ); 70 | 71 | //! REtrieves (and if necessary create) a category by name 72 | static log4cpp::Category& GetLogger( const GenICam::gcstring &LoggerName ); 73 | 74 | //! Push nested diagnostic context 75 | static void PushNDC( const GenICam::gcstring &ContextName ); 76 | 77 | //! Pop nested diagnostic context 78 | static void PopNDC( void ); 79 | 80 | //! initilizes log4cpp 81 | static void Initialize( void ); 82 | 83 | //! de-initializes log4cpp 84 | static void ShutDown( void ); 85 | 86 | //! Configures log4cpp to output messages >=ERROR on the Windows debug console 87 | static void ConfigureDefault(); 88 | 89 | //! Configures log4cpp from a file 90 | static bool ConfigureFromFile( const GenICam::gcstring &FileName ); 91 | 92 | //! Configures log4cpp from a file whose name is given by the environment variable GENICAM_LOG_CONFIG 93 | static bool ConfigureFromEnvironment( void ); 94 | 95 | //! Configures log4cpp from a string 96 | static bool ConfigureFromString( const GenICam::gcstring &ConfigData ); 97 | }; 98 | 99 | } 100 | 101 | #endif // DEF_CLOG_H_ 102 | -------------------------------------------------------------------------------- /thirdparty/GenICam/include/GenApi/impl/CommandT.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // (c) 2006 by Basler Vision Technologies 3 | // Section: Vision Components 4 | // Project: GenApi 5 | // Author: Alexander Happe 6 | // $Header: /cvs/genicam/genicam/library/CPP/include/GenApi/impl/CommandT.h,v 1.8.2.1 2008/05/30 15:16:12 hartmut_nebelung Exp $ 7 | // 8 | // License: This file is published under the license of the EMVA GenICam Standard Group. 9 | // A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'. 10 | // If for some reason you are missing this file please contact the EMVA or visit the website 11 | // (http://www.genicam.org) for a full copy. 12 | // 13 | // THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS" 14 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 15 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 16 | // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP 17 | // OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18 | // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 19 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 20 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 21 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 23 | // POSSIBILITY OF SUCH DAMAGE. 24 | //----------------------------------------------------------------------------- 25 | /*! 26 | \file 27 | \brief Definition of CommandT class template 28 | */ 29 | 30 | #ifndef GENAPI_COMMANDT_H 31 | #define GENAPI_COMMANDT_H 32 | 33 | 34 | namespace GenApi 35 | { 36 | 37 | /** 38 | \brief Implementation of the ICommand interface 39 | */ 40 | template 41 | class GENAPI_DECL CommandT : public Base 42 | { 43 | public: 44 | //! Execute the command 45 | virtual void Execute() 46 | { 47 | AutoLock l(Base::GetLock()); 48 | #ifdef LOG4C 49 | Counter& c(Base::GetBathometer()); 50 | if( 0 == c ) 51 | Base::m_pValueLog->info(">>>>" ); 52 | 53 | Base::m_pValueLog->info("Execute()"); 54 | #endif 55 | 56 | if( !IsWritable( this ) ) 57 | throw ACCESS_EXCEPTION("Node is not executable"); 58 | 59 | 60 | { 61 | typename Base::PostSetValueFinalizer PostSetValueCaller(this); // dtor calls Base::PostSetValue 62 | 63 | Base::PreSetValue(); // invalidates all nodes if this is the first call in a chain of SetValue-like calls 64 | Base::InternalExecute(); 65 | 66 | // now Base::PostSetValue is called by ~PostSetValueFinalizer, i.e. updates are fired 67 | // if this is the call on the top of a chain of SetValue calls 68 | } 69 | 70 | #ifdef LOG4C 71 | if( 0 == c ) 72 | Base::m_pValueLog->info("<<<<" ); 73 | #endif 74 | } 75 | 76 | //! Execute the command 77 | virtual void operator()() 78 | { 79 | Execute(); 80 | } 81 | 82 | //! Query whether the command is executed 83 | virtual bool IsDone() const 84 | { 85 | AutoLock l(Base::GetLock()); 86 | 87 | #ifdef LOG4C 88 | Base::m_pValueLog->info("IsDone..."); 89 | #endif 90 | const bool IsDone(Base::InternalIsDone()); 91 | #ifdef LOG4C 92 | if( IsDone ) 93 | Base::m_pValueLog->info("...IsDone = true"); 94 | else 95 | Base::m_pValueLog->info("...IsDone = false"); 96 | #endif 97 | return IsDone; 98 | } 99 | }; 100 | 101 | } 102 | 103 | #endif 104 | -------------------------------------------------------------------------------- /thirdparty/GenICam/include/GenApi/ChunkAdapterDcam.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // (c) 2004 by Basler Vision Technologies 3 | // Section: Vision Components 4 | // Project: GenApi 5 | // Author: Fritz Dierks 6 | // $Header: /cvs/genicam/genicam/library/CPP/include/GenApi/ChunkAdapterDcam.h,v 1.7.2.2 2008/12/08 14:40:19 hartmut_nebelung Exp $ 7 | // 8 | // License: This file is published under the license of the EMVA GenICam Standard Group. 9 | // A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'. 10 | // If for some reason you are missing this file please contact the EMVA or visit the website 11 | // (http://www.genicam.org) for a full copy. 12 | // 13 | // THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS" 14 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 15 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 16 | // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP 17 | // OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18 | // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 19 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 20 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 21 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 23 | // POSSIBILITY OF SUCH DAMAGE. 24 | //----------------------------------------------------------------------------- 25 | /** 26 | \file 27 | \brief Declaration of the CChunkAdapterDcam class. 28 | */ 29 | 30 | #ifndef GENAPI_CHUNKADAPTERDCAM_H 31 | #define GENAPI_CHUNKADAPTERDCAM_H 32 | 33 | #include "ChunkAdapter.h" 34 | #include "impl/Compatibility.h" 35 | 36 | namespace GenApi 37 | { 38 | // set the value of a GUID 39 | #define SET_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \ 40 | name.Data1 = l, name.Data2 = w1, name.Data3 = w2, \ 41 | name.Data4[0] = b1, name.Data4[1] = b2, name.Data4[2] = b3, name.Data4[3] = b4, \ 42 | name.Data4[4] = b5, name.Data4[5] = b6, name.Data4[6] = b7, name.Data4[7] = b8 43 | 44 | // make sure everything is properly packed 45 | #pragma pack(push, 1) 46 | 47 | typedef struct DCAM_CHUNK_TRAILER 48 | { 49 | PACK_STRUCT_FIELD( GUID ChunkID ); 50 | PACK_STRUCT_FIELD( uint32_t ChunkLength ); 51 | PACK_STRUCT_FIELD( uint32_t InverseChunkLength ); 52 | } PACK_STRUCT_STRUCT DCAM_CHUNK_TRAILER; 53 | 54 | typedef struct DCAM_CHECKSUM 55 | { 56 | PACK_STRUCT_FIELD( uint32_t CRCChecksum ); 57 | } PACK_STRUCT_STRUCT DCAM_CHECKSUM; 58 | 59 | // restore the previous packing 60 | #pragma pack(pop) 61 | /* ------------------------------------------- */ 62 | 63 | //! Connects a chunked DCAM buffer to a node map 64 | class GENAPI_DECL CChunkAdapterDcam : public CChunkAdapter 65 | { 66 | 67 | public: 68 | //! Constructor 69 | CChunkAdapterDcam(INodeMap* pNodeMap = NULL); 70 | 71 | //! Destructor 72 | virtual ~CChunkAdapterDcam(); 73 | 74 | //! Checks if a buffer contains chunks in a known format 75 | virtual bool CheckBufferLayout(uint8_t *pBuffer, int64_t BufferLength); 76 | 77 | //! Attaches a buffer to the matching ChunkPort 78 | virtual void AttachBuffer(uint8_t *pBuffer, int64_t BufferLength, AttachStatistics_t *pAttachStatistics = NULL); 79 | 80 | //! Checks if buffer has a CRC attached 81 | bool HasCRC(uint8_t *pBuffer, int64_t BufferLength); 82 | 83 | //! Checks CRC sum of buffer 84 | bool CheckCRC(uint8_t *pBuffer, int64_t BufferLength); 85 | 86 | protected: 87 | //! Checks the CRC of a buffer 88 | uint32_t CRC16(const unsigned char *pData, uint32_t nbyLength ); 89 | 90 | //! Checks the CRC of a buffer 91 | bool CheckBuffer(const unsigned char* pData, uint32_t nbyLength ); 92 | 93 | }; 94 | 95 | } 96 | 97 | #endif // GENAPI_CHUNKADAPTERDCAM_H 98 | -------------------------------------------------------------------------------- /thirdparty/GenICam/include/GenApi/Reference.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // (c) 2006 by Basler Vision Technologies 3 | // Section: Vision Components 4 | // Project: GenApi 5 | // Author: Fritz Dierks 6 | // $Header: /cvs/genicam/genicam/library/CPP/include/GenApi/Reference.h,v 1.7 2007/08/16 13:56:42 hartmut_nebelung Exp $ 7 | // 8 | // License: This file is published under the license of the EMVA GenICam Standard Group. 9 | // A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'. 10 | // If for some reason you are missing this file please contact the EMVA or visit the website 11 | // (http://www.genicam.org) for a full copy. 12 | // 13 | // THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS" 14 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 15 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 16 | // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP 17 | // OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18 | // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 19 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 20 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 21 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 23 | // POSSIBILITY OF SUCH DAMAGE. 24 | //----------------------------------------------------------------------------- 25 | /*! 26 | \file 27 | \brief Definition of template CReference 28 | \ingroup GenApi_PublicImpl 29 | */ 30 | 31 | #ifndef GENAPI_REFERENCE_H 32 | #define GENAPI_REFERENCE_H 33 | 34 | #include "Types.h" 35 | #include "GenApiDll.h" 36 | 37 | namespace GenApi 38 | { 39 | interface IBase; 40 | 41 | //************************************************************* 42 | // IReference interface 43 | //************************************************************* 44 | 45 | /** 46 | \brief Interface to construct a reference 47 | \ingroup GenApi_PublicImpl 48 | */ 49 | interface IReference 50 | { 51 | //! sets the implementation to a reference 52 | virtual void SetReference( GenApi::IBase *pBase ) = 0; 53 | }; 54 | 55 | //************************************************************* 56 | // IEnumReference interface 57 | //************************************************************* 58 | 59 | /** 60 | \brief Interface to construct an enum reference 61 | \ingroup GenApi_PublicImpl 62 | */ 63 | interface IEnumReference 64 | { 65 | //! sets the Enum value corresponding to a value 66 | virtual void SetEnumReference( int Index, GenICam::gcstring Name) = 0; 67 | 68 | //! sets the number of enum vallues 69 | virtual void SetNumEnums( int NumEnums ) = 0; 70 | }; 71 | 72 | //************************************************************* 73 | // CReference class 74 | //************************************************************* 75 | 76 | /** 77 | \brief Reference to an IBase derived pointer 78 | \ingroup GenApi_PublicImpl 79 | */ 80 | template 81 | class CReferenceT : public T, public IReference 82 | { 83 | public: 84 | // Constructor 85 | CReferenceT() : 86 | m_Ptr(NULL) 87 | {} 88 | 89 | /*--------------------------------------------------------*/ 90 | // IReference 91 | /*--------------------------------------------------------*/ 92 | 93 | //! sets the implementation to the reference 94 | virtual void SetReference( IBase *ptr ) 95 | { 96 | m_Ptr = dynamic_cast( ptr ); 97 | } 98 | 99 | protected: 100 | //! Pointer to the implementation the reference references to 101 | T *m_Ptr; 102 | }; 103 | 104 | } 105 | 106 | #endif // ifndef GENAPI_REFERENCE_H 107 | -------------------------------------------------------------------------------- /src/GenICam.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | 14 | #include "GigEVision.h" 15 | #include "Gvcp.h" 16 | #include "GenICam.h" 17 | 18 | GenICamManager::GenICamManager(GigEVision& gev): 19 | m_gev(gev) 20 | { 21 | 22 | } 23 | 24 | void GenICamManager::ReadXmlFile() 25 | { 26 | std::vector data = m_gev.Gvcp().ReadBlock(GENICAM_ZIPFILEINFO_ADDRESS, 512); 27 | std::string sTxt(data.begin(), data.end()); 28 | 29 | std::vector aParts; 30 | boost::algorithm::split(aParts, sTxt, boost::algorithm::is_any_of(";")); 31 | 32 | if(aParts.size() != 3) 33 | throw std::runtime_error("Error getting genicam file location on camera"); 34 | 35 | int nAddr, nSize; 36 | std::stringstream ss; 37 | ss << std::hex << aParts[1]; 38 | ss >> nAddr; 39 | ss.clear(); 40 | ss << std::hex << aParts[2]; 41 | ss >> nSize; 42 | 43 | data = m_gev.Gvcp().ReadBlock(nAddr, nSize); 44 | 45 | // TODO: find a way to decompress the zip-file in menory without writing the file to disk 46 | // TODO: use a platform independent path 47 | std::string sFilename("/tmp/genicam.zip"); 48 | std::string retData; 49 | 50 | try 51 | { 52 | std::ofstream os(sFilename.c_str(), std::ios::binary); 53 | os.write((char*)(&data[0]), data.size()); 54 | os.flush(); 55 | 56 | struct zip* zz = zip_open(sFilename.c_str(), 0, 0); 57 | if(zz == 0) 58 | throw std::runtime_error("Error opening genicam zipfile"); 59 | 60 | struct zip_file* zf = zip_fopen_index(zz, 0, 0); 61 | if(zf == 0) 62 | throw std::runtime_error("Error opening file in zip archive"); 63 | 64 | boost::array buff; 65 | 66 | int nRead = 0; 67 | while((nRead = zip_fread(zf, buff.data(), buff.size())) != 0) 68 | std::copy(buff.begin(), buff.begin()+nRead, std::back_inserter(retData)); 69 | 70 | // clean up file from disk 71 | boost::filesystem::remove(sFilename); 72 | } 73 | catch(std::exception& e) 74 | { 75 | boost::filesystem::remove(sFilename); 76 | throw e; 77 | } 78 | 79 | setenv("GENICAM_ROOT_V1_1", GENICAM_ROOT_PATH, true); 80 | m_cam._LoadXMLFromString(retData.c_str()); 81 | } 82 | 83 | uint32_t GenICamManager::GetAddress(const std::string& sKey) 84 | { 85 | GenApi::INode* pN = m_cam._GetNode(sKey.c_str()); 86 | uint32_t nAddr = 0; 87 | if(pN != 0) 88 | { 89 | GenICam::gcstring val, att; 90 | if(pN->GetProperty("Address", val, att)) 91 | { 92 | nAddr = boost::lexical_cast(val); 93 | } 94 | if(pN->GetProperty("pAddress", val, att) && val.length() > 0) 95 | { 96 | std::string sTmp(val); 97 | std::vector parts; 98 | boost::algorithm::split(parts, sTmp, boost::algorithm::is_any_of("\t")); 99 | for(size_t i=0; iGetProperty("Value", sAddr, sAtt)); 105 | nAddr += boost::lexical_cast(sAddr); 106 | } 107 | } 108 | } 109 | else 110 | throw std::runtime_error(str(boost::format("Can't find address for '%1%'") % sKey)); 111 | 112 | return nAddr; 113 | } 114 | 115 | void GenICamManager::PrintNodes(bool bWithProperties) const 116 | { 117 | GenApi::NodeList_t nodes; 118 | m_cam._GetNodes(nodes); 119 | 120 | for(GenApi::NodeList_t::const_iterator it = nodes.begin(); it!=nodes.end(); ++it) 121 | { 122 | std::cout << "Node: " << (*it)->GetName(true) << std::endl; 123 | if(bWithProperties) 124 | { 125 | GenICam::gcstring_vector props; 126 | (*it)->GetPropertyNames(props); 127 | for(GenICam::gcstring_vector::const_iterator pit = props.begin(); pit!=props.end(); ++pit) 128 | std::cout << "\tProp: " << *pit << std::endl; 129 | } 130 | } 131 | } 132 | 133 | 134 | -------------------------------------------------------------------------------- /thirdparty/GenICam/include/GenApi/impl/MathParser/Int64MathParser.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // (c) 2006 by Basler Vision Technologies 3 | // Section: Vision Components 4 | // Project: GenApi 5 | // Author: Margret Albrecht 6 | // $Header: /cvs/genicam/genicam/library/CPP/include/GenApi/impl/MathParser/Int64MathParser.h,v 1.8.2.1 2009/03/27 09:59:48 hartmut_nebelung Exp $ 7 | // 8 | // License: Derived from Kirill Zaborski's MathParser library (http://kirya.narod.ru/mathparser.html ). 9 | // This library comes under LGPL license (see http://www.gnu.org/licenses/lgpl.html). 10 | // Kirill's implementation is a C++ port of the CCalc library from Walery Studennikov (http://www.sama.ru/~despair/ccalc/) 11 | // which also comes under the LGPL. 12 | //----------------------------------------------------------------------------- 13 | /*! 14 | \file 15 | \brief Definition of CInt64MathParser 16 | 17 | * CInt64MathParser is derived from Kirill Zaborski's MathParser library (http://kirya.narod.ru/mathparser.html ). 18 | * This library is under LGPL license. Kirill's implementation seems to be a C++ port of the CCalc library 19 | * from Walery Studennikov (http://www.sama.ru/~despair/ccalc/). 20 | */ 21 | 22 | #ifndef _INT64MATHPARSER_H_ 23 | #define _INT64MATHPARSER_H_ 24 | 25 | #if defined (_MSC_VER) && (_MSC_VER > 1000) 26 | #pragma once 27 | #endif 28 | 29 | #include 30 | #include 31 | 32 | #include "MathParserDll.h" 33 | #include "StrMap.h" 34 | #include "Int64Lexer.h" 35 | 36 | #include 37 | 38 | #ifdef _MSC_VER // *JS* 39 | #pragma warning(push) 40 | #pragma warning(disable: 4251) // class 'xxx' needs to have dll-interface to be used by clients of class 'yyy' 41 | #endif 42 | 43 | #define ORIGINAL_STACK_SIZE 64 44 | 45 | extern const double DblErR; 46 | 47 | 48 | /** 49 | * \ingroup internal_impl 50 | * 51 | * \brief Parser and evaluator for CIntSwissKnife 52 | * 53 | */ 54 | 55 | class MATHPARSERDLL_API CInt64MathParser{ 56 | typedef int64_t (*OneArgFunc) ( int64_t arg ); 57 | typedef char* (*MultiArgFunc) ( int paramcnt, int64_t *args, 58 | CStrMap *strparams, int64_t *result ); 59 | typedef int (*PrmSrchFunc) ( const char *str, size_t len, int64_t *value, 60 | void *param ); 61 | typedef enum { 62 | // Binary 63 | OP_SHL, OP_SHR, OP_POW, 64 | OP_LOGIC_NEQ, OP_LOGIC_GEQ, OP_LOGIC_LEQ, 65 | OP_LOGIC_AND, OP_LOGIC_OR, // Logical 66 | OP_COMSTART, OP_ASSIGN, // For internal needs 67 | OP_OBR, // Special 68 | OP_ADD, OP_SUB, OP_MUL, OP_DIV, OP_MOD, OP_UNK, // Arithmetic 69 | OP_XOR, OP_NOT, OP_AND, OP_OR, // Bitwise 70 | OP_EQU, OP_GREATER, OP_LESS, 71 | OP_LOGIC, OP_LOGIC_SEP, OP_CBR, OP_COMMA, // Logical 72 | OP_FORMULAEND, // For script 73 | OP_FUNC_ONEARG, OP_FUNC_MULTIARG // Special 74 | } OperType_t; 75 | static const char OpPriorities[OP_FUNC_MULTIARG+1]; 76 | typedef struct { 77 | OperType_t OperType; 78 | const void *Func; 79 | char PrevValTop; 80 | CStrMap *StrParams; 81 | } Operation; 82 | static const Operation BrOp; 83 | static const Operation NegOp; 84 | std::vector OpStack; 85 | std::vector ValStack; 86 | int OpTop, ValTop; 87 | int ObrDist; 88 | CInt64Lexer Lexer; 89 | int script; 90 | CStrMap *VarParams; 91 | static CStrMap IntFunctions; 92 | static CSymTable MathSymTable; 93 | static char errbuf[256]; 94 | static hqCharType MathCharTypeTable[256]; 95 | static int initializations_performed; 96 | const char * ParseScript(int64_t *result); 97 | const char * ParseFormula(int64_t *result); 98 | const char * PrepareFormula(); 99 | const char * Calc(); 100 | const char * CalcToObr(); 101 | public: 102 | CStrMap *Parameters; 103 | CStrMap *ExtFunctions; 104 | PrmSrchFunc MoreParams; 105 | void *ParamFuncParam; 106 | CInt64MathParser( const char *MoreLetters=NULL ); 107 | const char * Parse( const char *Formula, int64_t *result); 108 | ~CInt64MathParser(); 109 | }; 110 | 111 | #ifdef _MSC_VER // *JS* 112 | #pragma warning(pop) 113 | #endif 114 | 115 | 116 | #endif // _INT64MATHPARSER_H_ 117 | -------------------------------------------------------------------------------- /thirdparty/GenICam/include/GenApi/impl/EnumDelegate.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // (c) 2006 by Basler Vision Technologies 3 | // Section: Vision Components 4 | // Project: GenApi 5 | // Author: Margret Albrecht 6 | // $Header: /cvs/genicam/genicam/library/CPP/include/GenApi/impl/EnumDelegate.h,v 1.10 2007/08/16 13:56:24 hartmut_nebelung Exp $ 7 | // 8 | // License: This file is published under the license of the EMVA GenICam Standard Group. 9 | // A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'. 10 | // If for some reason you are missing this file please contact the EMVA or visit the website 11 | // (http://www.genicam.org) for a full copy. 12 | // 13 | // THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS" 14 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 15 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 16 | // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP 17 | // OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18 | // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 19 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 20 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 21 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 23 | // POSSIBILITY OF SUCH DAMAGE. 24 | //----------------------------------------------------------------------------- 25 | /*! 26 | \file 27 | \brief Definition of CEnumDelegate and EnumEntryList_t. 28 | */ 29 | 30 | #ifndef GENAPI_ENUMDELEGATE_H 31 | #define GENAPI_ENUMDELEGATE_H 32 | 33 | #include 34 | #include "Node.h" 35 | 36 | 37 | namespace GenApi 38 | { 39 | 40 | 41 | interface IEnumEntry; 42 | 43 | 44 | //! Mapping of Enum Values to symbolic values 45 | //************************************************************* 46 | // EnumDelegate class 47 | //************************************************************* 48 | class GENAPI_DECL CEnumDelegate 49 | : public LockableObject 50 | { 51 | 52 | 53 | //! mapping of enum values to enum entry node 54 | typedef NodeList_t EnumEntryList_t; 55 | 56 | public: 57 | //! DefaultConstructor 58 | CEnumDelegate(); 59 | virtual ~CEnumDelegate(); 60 | //------------------------------------------------------------- 61 | // IValue implementation 62 | //------------------------------------------------------------- 63 | //! Get value of the node as string 64 | virtual GenICam::gcstring ToString(); 65 | 66 | 67 | /** 68 | * Maps a numerical value to it's corresponding symbolic representation. */ 69 | virtual void ToString(GenICam::gcstring &ValueStr, const int64_t &value); 70 | 71 | 72 | /** maps a symbolic value to its corresponding numeric value */ 73 | virtual bool FromString(const GenICam::gcstring &symbolicStr, int64_t &value); 74 | 75 | /** Returns the enum entry that is representing the numerical value. 76 | Returns NULL when there is no entry representing the numerical value. */ 77 | IEnumEntry* IntValueToEntry( const int64_t& value); 78 | 79 | 80 | 81 | /** retrieves the list of symbolic values 82 | * @return the list 83 | */ 84 | virtual void GetSymbolics(GenICam::gcstring_vector& Symbolics); 85 | /** retrieves the list of enumeration entries 86 | * @return the list 87 | */ 88 | virtual void GetEntries(NodeList_t & Entries); 89 | 90 | /** AddEntry inserts an entry into the map 91 | */ 92 | virtual void AddEntry(INode * pEnumEntry); 93 | 94 | 95 | private: 96 | CEnumDelegate(const CEnumDelegate&); 97 | CEnumDelegate& operator=(const CEnumDelegate&); 98 | 99 | EnumEntryList_t m_EnumEntryList; 100 | 101 | }; 102 | }; 103 | 104 | #endif // ifndef GENAPI_ENUMDELEGATE_H 105 | -------------------------------------------------------------------------------- /thirdparty/GenICam/include/GenApi/IEnumEntry.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // (c) 2006 by Basler Vision Technologies 3 | // Section: Vision Components 4 | // Project: GenApi 5 | // Author: Margret Albrecht 6 | // $Header: /cvs/genicam/genicam/library/CPP/include/GenApi/IEnumEntry.h,v 1.14 2007/08/16 13:56:39 hartmut_nebelung Exp $ 7 | // 8 | // License: This file is published under the license of the EMVA GenICam Standard Group. 9 | // A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'. 10 | // If for some reason you are missing this file please contact the EMVA or visit the website 11 | // (http://www.genicam.org) for a full copy. 12 | // 13 | // THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS" 14 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 15 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 16 | // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP 17 | // OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18 | // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 19 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 20 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 21 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 23 | // POSSIBILITY OF SUCH DAMAGE. 24 | //----------------------------------------------------------------------------- 25 | /*! 26 | \file 27 | \ingroup GenApi_PublicInterface 28 | */ 29 | 30 | #ifndef GENAPI_IENUMENTRY_H 31 | #define GENAPI_IENUMENTRY_H 32 | 33 | 34 | #include 35 | #include "GenApiDll.h" 36 | #include "IValue.h" 37 | 38 | #pragma warning ( push ) 39 | #pragma warning ( disable : 4251 ) // XXX needs to have dll-interface to be used by clients of class YYY 40 | 41 | namespace GenApi 42 | { 43 | 44 | //************************************************************* 45 | // IEnumEntry interface 46 | //************************************************************* 47 | 48 | /** 49 | \brief Interface of single enum value 50 | \ingroup GenApi_PublicInterfa 51 | */ 52 | /*! Maps of Enum Values to symbolic values */ 53 | interface IEnumEntry : virtual public IValue 54 | { 55 | 56 | public: 57 | //! Get numeric enum value 58 | virtual int64_t GetValue() = 0; 59 | //! Get symbolic enum value 60 | virtual GenICam::gcstring GetSymbolic()const = 0; 61 | }; 62 | 63 | //************************************************************* 64 | // CEnumEntryRef class 65 | //************************************************************* 66 | 67 | /** 68 | \internal 69 | \brief Reference to an IEnumEntry pointer 70 | \ingroup GenApi_PublicImpl 71 | */ 72 | template 73 | class CEnumEntryRefT : public CValueRefT 74 | { 75 | typedef CValueRefT ref; 76 | 77 | public: 78 | /*--------------------------------------------------------*/ 79 | // IEnumEntry 80 | /*--------------------------------------------------------*/ 81 | 82 | //! Get numeric enum value 83 | virtual int64_t GetValue() 84 | { 85 | if(ref::m_Ptr) 86 | return ref::m_Ptr->GetValue(); 87 | else 88 | throw ACCESS_EXCEPTION("Feature not present (reference not valid)"); 89 | } 90 | 91 | //! Get symbolic enum value 92 | virtual GenICam::gcstring GetSymbolic()const 93 | { 94 | if(ref::m_Ptr) 95 | return ref::m_Ptr->GetSymbolic(); 96 | else 97 | throw ACCESS_EXCEPTION("Feature not present (reference not valid)"); 98 | } 99 | 100 | }; 101 | 102 | //! Reference to an IEnumEntry pointer 103 | //! \ingroup GenApi_PublicImpl 104 | typedef CEnumEntryRefT CEnumEntryRef; 105 | 106 | 107 | } 108 | 109 | #pragma warning ( pop ) 110 | 111 | #endif // ifndef GENAPI_IENUMENTRY_H 112 | -------------------------------------------------------------------------------- /thirdparty/GenICam/include/Base/GCLinkage.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | //@tab=(8,4) 3 | 4 | //----------------------------------------------------------------------------- 5 | // (c) 2007 by Basler Vision Technologies 6 | // Section: Vision Components 7 | // Project: GenICam 8 | // Author: Fritz Dierks 9 | // $Header: /cvs/genicam/genicam/library/CPP/include/Base/GCLinkage.h,v 1.2.2.1 2008/07/14 08:37:44 hartmut_nebelung Exp $ 10 | // 11 | // License: This file is published under the license of the EMVA GenICam Standard Group. 12 | // A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'. 13 | // If for some reason you are missing this file please contact the EMVA or visit the website 14 | // (http://www.genicam.org) for a full copy. 15 | // 16 | // THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS" 17 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 18 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 19 | // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP 20 | // OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 21 | // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 22 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 23 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 25 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 26 | // POSSIBILITY OF SUCH DAMAGE. 27 | //----------------------------------------------------------------------------- 28 | /*! 29 | \file 30 | \brief helpers for pragma linkage 31 | */ 32 | 33 | #ifndef LINKAGE_H 34 | #define LINKAGE_H 35 | 36 | #if defined (_MSC_VER) 37 | 38 | # if (defined (WIN32) || defined (_WIN32)) && defined (_MT ) 39 | # if defined(_DEBUG) 40 | # define CONFIGURATION "MDd" 41 | # elif defined(NDEBUG) 42 | # define CONFIGURATION "MD" 43 | # else 44 | # error Invalid configuraiton 45 | # endif 46 | # else 47 | # error Invalid configuration 48 | # endif 49 | 50 | # if !defined(COMPILER) // COMPILER may be force set from outside 51 | # if _MSC_VER==1310 // Visual C++ .NET 2003 52 | # define COMPILER "VC71" 53 | # elif _MSC_VER==1400 // Visual C++ 2005 54 | # define COMPILER "VC80" 55 | # else 56 | # error Invalid compiler 57 | # endif 58 | # endif 59 | 60 | # define GENICAM_SUFFIX( CONFIGURATION, COMPILER, VERSION_MAJOR, VERSION_MINOR, EXTENSION ) \ 61 | "_" CONFIGURATION "_" COMPILER "_v" VERSION_MAJOR "_" VERSION_MINOR "." EXTENSION 62 | 63 | # define LIB_SUFFIX \ 64 | GENICAM_SUFFIX( CONFIGURATION, COMPILER, GENICAM_VERSION_MAJOR_STR, GENICAM_VERSION_MINOR_STR, "lib" ) 65 | # define DLL_SUFFIX \ 66 | GENICAM_SUFFIX( CONFIGURATION, COMPILER, GENICAM_VERSION_MAJOR_STR, GENICAM_VERSION_MINOR_STR, "dll" ) 67 | # define EXE_SUFFIX \ 68 | GENICAM_SUFFIX( CONFIGURATION, COMPILER, GENICAM_VERSION_MAJOR_STR, GENICAM_VERSION_MINOR_STR, "exe" ) 69 | 70 | #elif defined (__GNUC__) && defined (__ELF__) 71 | # if defined (NDEBUG) 72 | # define CONFIGURATION "" 73 | # else 74 | # define CONFIGURATION "_g" 75 | # endif 76 | 77 | # define GENICAM_SUFFIX( CONFIGURATION, VERSION_MAJOR, VERSION_MINOR, EXTENSION ) \ 78 | CONFIGURATION "." VERSION_MAJOR "." VERSION_MINOR "." EXTENSION 79 | 80 | # define LIB_SUFFIX \ 81 | GENICAM_SUFFIX( CONFIGURATION, GENICAM_VERSION_MAJOR_STR, GENICAM_VERSION_MINOR_STR, "lib" ) 82 | # define DLL_SUFFIX \ 83 | GENICAM_SUFFIX( CONFIGURATION, GENICAM_VERSION_MAJOR_STR, GENICAM_VERSION_MINOR_STR, "dll" ) 84 | # define EXE_SUFFIX \ 85 | GENICAM_SUFFIX( CONFIGURATION, GENICAM_VERSION_MAJOR_STR, GENICAM_VERSION_MINOR_STR, "exe" ) 86 | 87 | #else 88 | # error Unknown shared library support 89 | #endif 90 | 91 | #define LIB_NAME( MODULE ) \ 92 | MODULE ## LIB_SUFFIX 93 | 94 | #define DLL_NAME( MODULE ) \ 95 | MODULE ## DLL_SUFFIX 96 | 97 | #define EXE_NAME( MODULE ) \ 98 | MODULE ## EXE_SUFFIX 99 | 100 | #endif // LINKAGE_H 101 | -------------------------------------------------------------------------------- /thirdparty/GenICam/include/GenApi/impl/MaskedIntReg.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // (c) 2006 by Basler Vision Technologies 3 | // Section: Vision Components 4 | // Project: GenApi 5 | // Author: Fritz Dierks 6 | // $Header: /cvs/genicam/genicam/library/CPP/include/GenApi/impl/MaskedIntReg.h,v 1.9 2007/08/16 13:56:25 hartmut_nebelung Exp $ 7 | // 8 | // License: This file is published under the license of the EMVA GenICam Standard Group. 9 | // A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'. 10 | // If for some reason you are missing this file please contact the EMVA or visit the website 11 | // (http://www.genicam.org) for a full copy. 12 | // 13 | // THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS" 14 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 15 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 16 | // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP 17 | // OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18 | // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 19 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 20 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 21 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 23 | // POSSIBILITY OF SUCH DAMAGE. 24 | //----------------------------------------------------------------------------- 25 | /*! 26 | \file 27 | \brief Definition of CMaskedIntReg 28 | */ 29 | 30 | #ifndef GENAPI_MASKEDINTREG_H 31 | #define GENAPI_MASKEDINTREG_H 32 | 33 | #include "IntReg.h" 34 | 35 | 36 | namespace GenApi 37 | { 38 | //************************************************************* 39 | // CMaskedIntReg class 40 | //************************************************************* 41 | 42 | //! IInteger implementation for a masked register 43 | /*! Maps an integer (signed or unsigned) to a masked register 44 | */ 45 | class GENAPI_DECL CMaskedIntRegImpl : public CIntRegImpl 46 | { 47 | public: 48 | //! Constructor 49 | CMaskedIntRegImpl(); 50 | 51 | 52 | //------------------------------------------------------------- 53 | // INodePrivate implementation 54 | //------------------------------------------------------------- 55 | 56 | 57 | //! Initializes the object 58 | virtual void FinalConstruct(); 59 | 60 | //------------------------------------------------------------- 61 | // IInteger implementation 62 | //------------------------------------------------------------- 63 | 64 | protected: 65 | //! Set feature value 66 | virtual void InternalSetValue(int64_t Value, bool Verify = true); 67 | 68 | 69 | //! Get feature value 70 | virtual int64_t InternalGetValue(bool Verify = false); 71 | 72 | public: 73 | 74 | 75 | //------------------------------------------------------------- 76 | // Initializing 77 | //------------------------------------------------------------- 78 | //! Convert map 79 | BEGIN_CONVERT_MAP 80 | CONVERT_ENTRY(LSB, m_LSB) 81 | CONVERT_ENTRY(MSB, m_MSB) 82 | CHAIN_CONVERT_MAP(CIntRegImpl) 83 | END_CONVERT_MAP 84 | 85 | protected: 86 | //------------------------------------------------------------- 87 | // Memeber variables 88 | //------------------------------------------------------------- 89 | //! least siginificant bit of the integer with respect to the register 90 | uint32_t m_LSB; 91 | 92 | //! most siginificant bit of the integer with respect to the register 93 | uint32_t m_MSB; 94 | 95 | //! Mask with 1 were the integer is located; 0 otherwise 96 | uint64_t m_Mask; 97 | 98 | 99 | }; 100 | 101 | class GENAPI_DECL CMaskedIntReg 102 | : public BaseT< ValueT< NodeT < IntegerT< RegisterT< CMaskedIntRegImpl> > > > > 103 | { 104 | }; 105 | 106 | } 107 | 108 | #endif // GENAPI_MASKEDINTREG_H 109 | -------------------------------------------------------------------------------- /thirdparty/GenICam/include/GenApi/impl/ValueT.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // (c) 2006 by Basler Vision Technologies 3 | // Section: Vision Components 4 | // Project: GenApi 5 | // Author: Alexander Happe 6 | // $Header: /cvs/genicam/genicam/library/CPP/include/GenApi/impl/ValueT.h,v 1.11.2.1 2008/07/14 08:18:26 hartmut_nebelung Exp $ 7 | // 8 | // License: This file is published under the license of the EMVA GenICam Standard Group. 9 | // A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'. 10 | // If for some reason you are missing this file please contact the EMVA or visit the website 11 | // (http://www.genicam.org) for a full copy. 12 | // 13 | // THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS" 14 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 15 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 16 | // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP 17 | // OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18 | // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 19 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 20 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 21 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 23 | // POSSIBILITY OF SUCH DAMAGE. 24 | //----------------------------------------------------------------------------- 25 | /*! 26 | \file 27 | \brief Definition of the ValueT class template 28 | */ 29 | 30 | #ifndef GENAPI_VALUET_H 31 | #define GENAPI_VALUET_H 32 | 33 | #include "../IValue.h" 34 | #include 35 | 36 | 37 | 38 | namespace GenApi 39 | { 40 | 41 | /** 42 | \brief Implementation of the IValue interface 43 | */ 44 | template< class Base> 45 | class GENAPI_DECL ValueT 46 | : public Base 47 | { 48 | public: 49 | 50 | //! Implementation of IValue::ToString() 51 | virtual GenICam::gcstring ToString(bool Verify = false) 52 | { 53 | AutoLock l(Base::GetLock()); 54 | 55 | #ifdef LOG4C 56 | Base::m_pValueLog->info("ToString..."); 57 | #endif 58 | GenICam::gcstring ValueStr = Base::InternalToString(Verify); 59 | #ifdef LOG4C 60 | Base::m_pValueLog->info("...ToString = %s", ValueStr.c_str() ); 61 | #endif 62 | return ValueStr; 63 | } 64 | 65 | //! Implementation of IValue::FromString() 66 | virtual void FromString(const GenICam::gcstring& ValueStr, bool Verify = true) 67 | { 68 | AutoLock l(Base::GetLock()); 69 | 70 | #ifdef LOG4C 71 | Counter& c(Base::GetBathometer()); 72 | #pragma BullseyeCoverage off 73 | if( 0 == c ) 74 | Base::m_pValueLog->info(">>>>" ); 75 | #pragma BullseyeCoverage on 76 | 77 | Base::m_pValueLog->info("FromString = '%s' ", ValueStr.c_str() ); 78 | #endif 79 | 80 | if( Verify ) 81 | { 82 | if( !IsWritable( this ) ) 83 | throw ACCESS_EXCEPTION("Node is not writable"); 84 | } 85 | 86 | 87 | { 88 | typename Base::PostSetValueFinalizer PostSetValueCaller(this); // dtor calls Base::PostSetValue 89 | 90 | Base::PreSetValue(); // invalidates all nodes if this is the first call in a chain of SetValue-like calls 91 | Base::InternalFromString(ValueStr, Verify); 92 | 93 | // now Base::PostSetValue is called by ~PostSetValueFinalizer, i.e. updates are fired 94 | // if this is the call on the top of a chain of SetValue calls 95 | } 96 | 97 | #ifdef LOG4C 98 | if( 0 == c ) 99 | Base::m_pValueLog->info("<<<<" ); 100 | #endif 101 | 102 | } 103 | 104 | }; 105 | 106 | } // namespace GenApi 107 | 108 | #endif // GENAPI_VALUET_H 109 | -------------------------------------------------------------------------------- /thirdparty/GenICam/include/GenApi/Callback.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // (c) 2006 by Basler Vision Technologies 3 | // Section: Vision Components 4 | // Project: GenApi 5 | // Author: Hartmut Nebelung 6 | // $Header: /cvs/genicam/genicam/library/CPP/include/GenApi/Callback.h,v 1.9.2.1 2008/07/14 08:30:46 hartmut_nebelung Exp $ 7 | // 8 | // License: This file is published under the license of the EMVA GenICam Standard Group. 9 | // A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'. 10 | // If for some reason you are missing this file please contact the EMVA or visit the website 11 | // (http://www.genicam.org) for a full copy. 12 | // 13 | // THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS" 14 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 15 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 16 | // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP 17 | // OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18 | // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 19 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 20 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 21 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 23 | // POSSIBILITY OF SUCH DAMAGE. 24 | //----------------------------------------------------------------------------- 25 | /*! 26 | \file 27 | \brief Definition of template Base_Callback1Body and Callback1 28 | \ingroup GenApi_PublicImpl 29 | 30 | Defines a bunch of templates for creating callback-functors taking 1 Parameter 31 | (=> Callback1) and returning void. 32 | 33 | \note does not work with all stl containers, i.e. std::map 34 | 35 | */ 36 | 37 | #ifndef GENAPI_CALLBACK_H 38 | #define GENAPI_CALLBACK_H 39 | 40 | #include 41 | 42 | namespace GenApi 43 | { 44 | /** 45 | \brief abstract callback container 46 | \ingroup GenApi_PublicImpl 47 | */ 48 | template 49 | class Base_Callback1Body 50 | { 51 | public: 52 | //! destructor 53 | virtual ~Base_Callback1Body() 54 | {}; 55 | 56 | //! do operation with P1 as argument 57 | virtual void operator()(P1) const = 0; 58 | 59 | //! deep copy 60 | virtual Base_Callback1Body* clone() const = 0; 61 | }; 62 | 63 | /** 64 | \brief callback object with one parameter P1 65 | \ingroup GenApi_PublicImpl 66 | */ 67 | template 68 | class GENAPI_DECL Callback1 69 | { 70 | public: 71 | 72 | //! constructor, taking lifetime control of body 73 | Callback1( Base_Callback1Body* pBody) : 74 | m_pBody(pBody) 75 | { 76 | } 77 | 78 | //! copy constructor doing deep copy 79 | Callback1(const Callback1& callback) : 80 | m_pBody(callback.m_pBody ? callback.m_pBody->clone() : NULL) 81 | { 82 | } 83 | 84 | //! destructor, destroying body 85 | ~Callback1() 86 | { 87 | delete m_pBody; 88 | m_pBody = NULL; 89 | } 90 | 91 | //! assignment operator 92 | Callback1& operator=(const Callback1& callback) 93 | { 94 | if (this != &callback) 95 | { 96 | delete m_pBody; 97 | m_pBody = callback.m_pBody ? callback.m_pBody->clone() : NULL; 98 | } 99 | return *this; 100 | } 101 | 102 | //! do operation defined in body 103 | void operator()(P1 p1) 104 | { 105 | if (m_pBody) 106 | (*m_pBody)(p1); 107 | else 108 | assert( false && "Callback1:Empty body" ); 109 | } 110 | 111 | bool HasValidBody() const 112 | { 113 | return m_pBody != NULL; 114 | } 115 | 116 | private: 117 | Base_Callback1Body *m_pBody; 118 | }; 119 | 120 | 121 | } 122 | 123 | #endif // ifndef GENAPI_CALLBACK_H 124 | -------------------------------------------------------------------------------- /thirdparty/GenICam/include/GenApi/IPort.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // (c) 2006 by Basler Vision Technologies 3 | // Section: Vision Components 4 | // Project: GenApi 5 | // Author: Margret Albrecht 6 | // $Header: /cvs/genicam/genicam/library/CPP/include/GenApi/IPort.h,v 1.14 2007/08/16 13:56:41 hartmut_nebelung Exp $ 7 | // 8 | // License: This file is published under the license of the EMVA GenICam Standard Group. 9 | // A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'. 10 | // If for some reason you are missing this file please contact the EMVA or visit the website 11 | // (http://www.genicam.org) for a full copy. 12 | // 13 | // THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS" 14 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 15 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 16 | // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP 17 | // OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18 | // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 19 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 20 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 21 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 23 | // POSSIBILITY OF SUCH DAMAGE. 24 | //----------------------------------------------------------------------------- 25 | /*! 26 | \file 27 | \brief Definition of interface IPort 28 | \ingroup GenApi_PublicInterface 29 | */ 30 | 31 | #ifndef GENAPI_IPORT_H 32 | #define GENAPI_IPORT_H 33 | 34 | #include "GenApiDll.h" 35 | #include "Types.h" 36 | #include "IBase.h" 37 | 38 | #pragma warning ( push ) 39 | #pragma warning ( disable : 4251 ) // XXX needs to have dll-interface to be used by clients of class YYY 40 | 41 | namespace GenApi 42 | { 43 | //************************************************************* 44 | // IPort interface 45 | //************************************************************* 46 | 47 | /** 48 | \brief Interface for ports 49 | \ingroup GenApi_PublicInterface 50 | */ 51 | interface IPort : virtual public IBase 52 | { 53 | //! Reads a chunk of bytes from the port 54 | virtual void Read(void *pBuffer, int64_t Address, int64_t Length) = 0; 55 | 56 | //! Writes a chunk of bytes to the port 57 | virtual void Write(const void *pBuffer, int64_t Address, int64_t Length) = 0; 58 | }; 59 | 60 | //************************************************************* 61 | // CPortRef class 62 | //************************************************************* 63 | 64 | /** 65 | \internal 66 | \brief Reference to an IPort pointer 67 | \ingroup GenApi_PublicImpl 68 | */ 69 | template 70 | class CPortRefT : public CBaseRefT 71 | { 72 | typedef CBaseRefT ref; 73 | 74 | public: 75 | /*--------------------------------------------------------*/ 76 | // IPort 77 | /*--------------------------------------------------------*/ 78 | 79 | //! Reads a chunk of bytes from the port 80 | virtual void Read(void *pBuffer, int64_t Address, int64_t Length) 81 | { 82 | if(ref::m_Ptr) 83 | return ref::m_Ptr->Read(pBuffer, Address, Length); 84 | else 85 | throw ACCESS_EXCEPTION("Feature not present (reference not valid)"); 86 | } 87 | 88 | //! Writes a chunk of bytes to the port 89 | virtual void Write(const void *pBuffer, int64_t Address, int64_t Length) 90 | { 91 | if(ref::m_Ptr) 92 | return ref::m_Ptr->Write(pBuffer, Address, Length); 93 | else 94 | throw ACCESS_EXCEPTION("Feature not present (reference not valid)"); 95 | } 96 | 97 | }; 98 | 99 | //! Reference to an IEnumEntry pointer 100 | //! \ingroup GenApi_PublicImpl 101 | typedef CPortRefT CPortRef; 102 | 103 | 104 | 105 | } 106 | 107 | #pragma warning ( pop ) 108 | 109 | #endif // ifndef GENAPI_IPORT_H 110 | -------------------------------------------------------------------------------- /thirdparty/GenICam/include/GenApi/impl/StringT.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // (c) 2006 by Basler Vision Technologies 3 | // Section: Vision Components 4 | // Project: GenApi 5 | // Author: Alexander Happe 6 | // $Header: /cvs/genicam/genicam/library/CPP/include/GenApi/impl/StringT.h,v 1.9 2007/08/16 13:56:26 hartmut_nebelung Exp $ 7 | // 8 | // License: This file is published under the license of the EMVA GenICam Standard Group. 9 | // A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'. 10 | // If for some reason you are missing this file please contact the EMVA or visit the website 11 | // (http://www.genicam.org) for a full copy. 12 | // 13 | // THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS" 14 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 15 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 16 | // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP 17 | // OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18 | // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 19 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 20 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 21 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 23 | // POSSIBILITY OF SUCH DAMAGE. 24 | //----------------------------------------------------------------------------- 25 | /*! 26 | \file 27 | \brief Definition of the NodeT class template 28 | */ 29 | 30 | #ifndef GENAPI_STRINGT_H 31 | #define GENAPI_STRINGT_H 32 | 33 | #include "../IString.h" 34 | 35 | namespace GenApi 36 | { 37 | 38 | /** 39 | \brief Implementation of the IString interface 40 | */ 41 | template< class Base > 42 | class GENAPI_DECL StringT : public Base 43 | { 44 | public: 45 | //! Set node value 46 | virtual void SetValue(const GenICam::gcstring& Value, bool Verify = true) 47 | { 48 | AutoLock l(Base::GetLock()); 49 | 50 | #ifdef LOG4C 51 | Counter& c(Base::GetBathometer()); 52 | if( 0 == c ) 53 | Base::m_pValueLog->info(">>>>" ); 54 | 55 | Base::m_pValueLog->info("SetValue = '%s' ", Value.c_str() ); 56 | #endif 57 | 58 | { 59 | typename Base::PostSetValueFinalizer PostSetValueCaller(this); // dtor calls Base::PostSetValue 60 | 61 | Base::PreSetValue(); // invalidates all nodes if this is the first call in a chain of SetValue calls 62 | Base::InternalSetValue(Value, Verify); 63 | 64 | // now Base::PostSetValue is called by ~PostSetValueFinalizer, i.e. updates are fired 65 | // if this is the call on the top of a chain of SetValue calls 66 | } 67 | 68 | #ifdef LOG4C 69 | if( 0 == c ) 70 | Base::m_pValueLog->info("<<<<" ); 71 | #endif 72 | 73 | } 74 | 75 | //! Set node value 76 | virtual IString& operator=(const GenICam::gcstring& Value) 77 | { 78 | SetValue(Value); 79 | return *this; 80 | } 81 | 82 | //! Get node value 83 | virtual GenICam::gcstring GetValue(bool Verify = false) 84 | { 85 | AutoLock l(Base::GetLock()); 86 | 87 | #ifdef LOG4C 88 | Base::m_pValueLog->info("GetValue..."); 89 | #endif 90 | GenICam::gcstring ValueStr(Base::InternalGetValue(Verify)); 91 | #ifdef LOG4C 92 | Base::m_pValueLog->info("...GetValue = %s", ValueStr.c_str() ); 93 | #endif 94 | return ValueStr; 95 | 96 | } 97 | 98 | //! Get node value 99 | virtual GenICam::gcstring operator()() 100 | { 101 | return GetValue(); 102 | } 103 | 104 | //! Get node value 105 | virtual GenICam::gcstring operator*() 106 | { 107 | return GetValue(); 108 | } 109 | 110 | }; 111 | 112 | } 113 | 114 | #endif // GENAPI_STRINGT_H 115 | -------------------------------------------------------------------------------- /thirdparty/GenICam/include/GenApi/ChunkAdapter.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // (c) 2006 by Basler Vision Technologies 3 | // Section: Vision Components 4 | // Project: GenApi 5 | // Author: Fritz Dierks 6 | // $Header: /cvs/genicam/genicam/library/CPP/include/GenApi/ChunkAdapter.h,v 1.11 2007/08/16 13:56:37 hartmut_nebelung Exp $ 7 | // 8 | // License: This file is published under the license of the EMVA GenICam Standard Group. 9 | // A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'. 10 | // If for some reason you are missing this file please contact the EMVA or visit the website 11 | // (http://www.genicam.org) for a full copy. 12 | // 13 | // THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS" 14 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 15 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 16 | // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP 17 | // OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18 | // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 19 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 20 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 21 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 23 | // POSSIBILITY OF SUCH DAMAGE. 24 | //----------------------------------------------------------------------------- 25 | /** 26 | \file 27 | \brief Declaration of the CChunkAdapter class. 28 | \ingroup GenApi_PublicUtilities 29 | */ 30 | 31 | #ifndef GENAPI_CHUNKADAPTER_H 32 | #define GENAPI_CHUNKADAPTER_H 33 | 34 | #include "Types.h" 35 | #include "INodeMap.h" 36 | #include "ChunkPort.h" 37 | #include 38 | 39 | #pragma warning( push ) 40 | #pragma warning( disable: 4251 ) // GenApi::CChunkAdapter::m_pChunkPorts' : class 'std::vector<_Ty>' needs to have dll-interface 41 | 42 | namespace GenApi 43 | { 44 | 45 | // some useful macros 46 | #if defined( _MSC_VER ) 47 | #define PACK_STRUCT_FIELD(x) x 48 | #define PACK_STRUCT_STRUCT 49 | #else // assume GNU system 50 | #define PACK_STRUCT_FIELD(x) x __attribute__((packed)) 51 | #define PACK_STRUCT_STRUCT __attribute__((packed)) 52 | #endif 53 | 54 | //! Delivers information about the attached chunks and nodes 55 | //! \ingroup GenApi_PublicUtilities 56 | typedef struct AttachStatistics_t 57 | { 58 | int NumChunkPorts; //!< Number of chunk ports found in the node map 59 | int NumChunks; //!< Number of chunks found in the buffer 60 | int NumAttachedChunks; //!< Number of chunks from the buffer attached to a chunk port 61 | } AttachStatistics_t; 62 | 63 | 64 | /** 65 | \brief Connects a chunked buffer to a node map 66 | \ingroup GenApi_PublicUtilities 67 | */ 68 | class GENAPI_DECL CChunkAdapter 69 | { 70 | 71 | public: 72 | //! Destructor 73 | virtual ~CChunkAdapter(); 74 | 75 | //! Attaches to a node map and retrieves the chunk ports 76 | void AttachNodeMap(INodeMap* pNodeMap); 77 | 78 | //! Detaches from the node map 79 | void DetachNodeMap(); 80 | 81 | //! Checks if a buffer contains chunks in a known format 82 | /*! Implement that for a specific buffer layout */ 83 | virtual bool CheckBufferLayout(uint8_t *pBuffer, int64_t BufferLength) = 0; 84 | 85 | //! Attaches a buffer to the matching ChunkPort 86 | /*! Implement that for a specific buffer layout */ 87 | virtual void AttachBuffer(uint8_t *pBuffer, int64_t BufferLength, AttachStatistics_t *pAttachStatistics = NULL) = 0; 88 | 89 | //! Detaches a buffer 90 | void DetachBuffer(); 91 | 92 | //! Updates the base address of the buffer 93 | void UpdateBuffer(uint8_t *pBaseAddress); 94 | 95 | protected: 96 | 97 | //! Serves as default constructor 98 | CChunkAdapter(INodeMap* pNodeMap = NULL); 99 | 100 | //! An array of attached ChunkPorts 101 | std::vector m_pChunkPorts; 102 | 103 | }; 104 | 105 | } 106 | 107 | #pragma warning(pop) 108 | #endif // GENAPI_CHUNKADAPTER_H 109 | -------------------------------------------------------------------------------- /thirdparty/GenICam/include/GenApi/impl/DllManager.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // (c) 2006 by Basler Vision Technologies 3 | // Section: Vision Components 4 | // Project: GenApi 5 | // Author: AH 6 | // $Header: /cvs/genicam/genicam/library/CPP/include/GenApi/impl/DllManager.h,v 1.9 2007/08/16 13:56:23 hartmut_nebelung Exp $ 7 | // 8 | // License: This file is published under the license of the EMVA GenICam Standard Group. 9 | // A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'. 10 | // If for some reason you are missing this file please contact the EMVA or visit the website 11 | // (http://www.genicam.org) for a full copy. 12 | // 13 | // THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS" 14 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 15 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 16 | // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP 17 | // OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18 | // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 19 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 20 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 21 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 23 | // POSSIBILITY OF SUCH DAMAGE. 24 | //----------------------------------------------------------------------------- 25 | /*! 26 | \file 27 | \brief Definition of CDllManager 28 | */ 29 | 30 | #ifndef GENAPI_DLLMANAGER_H 31 | #define GENAPI_DLLMANAGER_H 32 | #if MSC_VER>1000 33 | #pragma once 34 | #endif // MSC_VER>1000 35 | 36 | namespace GenICam 37 | { 38 | class gcstring; 39 | } 40 | 41 | #include 42 | #include "../Synch.h" 43 | #include 44 | 45 | 46 | namespace GenApi 47 | { 48 | /** 49 | \brief Platform-independent dynamic library loader 50 | 51 | The DllManager allows to load dynamic libraries and to search for symbols within loaded 52 | libraries. A book-keeping is performed. All libraries which are not unloaded explicitly, 53 | are automatically unloaded when the DllManager is deleted. 54 | 55 | It is not possible to instantiate a DllManager object, instead the DllManager class exposes 56 | static member functions. 57 | */ 58 | class GENAPI_DECL DllManager : public LockableObject 59 | { 60 | public: 61 | 62 | typedef void * Handle; 63 | static const Handle INVALID_HANDLE; 64 | 65 | typedef void * Symbol; 66 | static const Symbol INVALID_SYMBOL; 67 | 68 | //! Load a dynamic library 69 | static Handle LoadLib(const GenICam::gcstring& fileName); 70 | 71 | //! Unload a dynamic library 72 | static bool FreeLib(const Handle handle); 73 | 74 | //! Retrieve a symbol from a dynamic library 75 | static Symbol FindSymbol(const Handle handle, const GenICam::gcstring& symbolName ); 76 | 77 | ~DllManager(void); 78 | 79 | private: 80 | //! Platform specific code to load a library 81 | static Handle InternalLoadLib(const GenICam::gcstring& fileName); 82 | 83 | //! Platform specific code to find a symbol in a library 84 | static Symbol InternalFindSymbol(const Handle handle, const GenICam::gcstring& symbolName); 85 | 86 | //! Platform specfic code to unload a library 87 | static bool InternalFreeLib(const Handle handle); 88 | 89 | //! Returns the one and only DllManager(singleton pattern) 90 | static DllManager& GetInstance(void); 91 | 92 | 93 | //! @name Hide constructors and assignment operator 94 | //@{ 95 | //! (singleton cannot be constructed outside) 96 | DllManager(void) {} 97 | DllManager(const DllManager&); 98 | DllManager& operator=(const DllManager&); 99 | //@} 100 | 101 | 102 | //! Container used to store handles 103 | //typedef std::multiset DllTable; 104 | typedef std::map DllTable; 105 | 106 | //! Container storing the library handles 107 | DllTable m_DllTable; 108 | 109 | }; 110 | 111 | 112 | } 113 | #endif // DLLMANAGER_H 114 | -------------------------------------------------------------------------------- /thirdparty/GenICam/include/GenApi/impl/VariableDelegate.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // (c) 2006 by Basler Vision Technologies 3 | // Section: Vision Components 4 | // Project: GenApi 5 | // Author: Margret Albrecht 6 | // $Header: /cvs/genicam/genicam/library/CPP/include/GenApi/impl/VariableDelegate.h,v 1.12 2007/11/13 19:41:06 hartmut_nebelung Exp $ 7 | // 8 | // License: This file is published under the license of the EMVA GenICam Standard Group. 9 | // A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'. 10 | // If for some reason you are missing this file please contact the EMVA or visit the website 11 | // (http://www.genicam.org) for a full copy. 12 | // 13 | // THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS" 14 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 15 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 16 | // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP 17 | // OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18 | // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 19 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 20 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 21 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 23 | // POSSIBILITY OF SUCH DAMAGE. 24 | //----------------------------------------------------------------------------- 25 | /*! 26 | \file 27 | \brief Definition of CVariableDelegate 28 | */ 29 | 30 | #ifndef GENAPI_VARIABLEDELEGATE_H 31 | #define GENAPI_VARIABLEDELEGATE_H 32 | 33 | #include "../GenApiDll.h" 34 | #include "Node.h" 35 | 36 | #include 37 | 38 | #ifdef _MSC_VER // *JS* 39 | #pragma warning(push) 40 | #pragma warning(disable: 4251) // class 'xxx' needs to have dll-interface to be used by clients of class 'yyy' 41 | #endif 42 | 43 | namespace GenApi 44 | { 45 | 46 | class CNodeMap; 47 | 48 | // 49 | //************************************************************* 50 | // VariableDelegate class 51 | //************************************************************* 52 | /** 53 | * \ingroup internal_impl 54 | * 55 | * \brief Mapping of variable names to values 56 | */ 57 | class GENAPI_DECL CVariableDelegate 58 | { 59 | public: 60 | //! mapping of variable names to values 61 | typedef std::map< GenICam::gcstring, INode* > Name2pValue_t; 62 | 63 | //! Default Constructor 64 | CVariableDelegate(); 65 | 66 | //! Default Destructor 67 | virtual ~CVariableDelegate() {} 68 | 69 | //------------------------------------------------------------- 70 | // IValue implementation 71 | //------------------------------------------------------------- 72 | 73 | //! Get value of all variables as cobined string 74 | virtual GenICam::gcstring ToString(); 75 | 76 | //------------------------------------------------------------- 77 | // IBase implementation 78 | //------------------------------------------------------------- 79 | //! Get the access mode of the node 80 | virtual EAccessMode GetAccessMode() const; 81 | 82 | //! Gets the Value of the Varaible with the given Name 83 | virtual bool GetValue(const GenICam::gcstring &nameStr, int64_t * value, bool Verify = false); 84 | 85 | //! Gets the Value of the Varaible with the given Name 86 | virtual bool GetValue(const GenICam::gcstring &nameStr, double * value, bool Verify = false); 87 | 88 | //! Inserts a variable in the variable map 89 | virtual bool AddEntry(const GenICam::gcstring &Value, const GenICam::gcstring &Symbolic, const GenICam::gcstring &parentName, INodeMapPrivate * pNodeMap); 90 | 91 | //! Gets Variables and attributes added to the map 92 | virtual void GetVariablesAndAttributes(GenICam::gcstring &Variables, GenICam::gcstring &Attributes); 93 | 94 | public: 95 | //! Map holding pointers to Values keyed with the variable name 96 | Name2pValue_t m_Map; 97 | 98 | }; 99 | }; 100 | 101 | #ifdef _MSC_VER // *JS* 102 | #pragma warning(pop) 103 | #endif 104 | 105 | #endif // ifndef GENAPI_VARIABLEDELEGATE_H 106 | -------------------------------------------------------------------------------- /thirdparty/GenICam/include/GenApi/impl/PersistenceImpl.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // (c) 2007 by National Instruments 3 | // Project: GenApi 4 | // Author: Eric Gross 5 | // $Header: /cvs/genicam/genicam/library/CPP/include/GenApi/impl/PersistenceImpl.h,v 1.1 2007/11/13 19:57:41 hartmut_nebelung Exp $ 6 | // 7 | // License: This file is published under the license of the EMVA GenICam Standard Group. 8 | // A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'. 9 | // If for some reason you are missing this file please contact the EMVA or visit the website 10 | // (http://www.genicam.org) for a full copy. 11 | // 12 | // THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS" 13 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 14 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 15 | // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP 16 | // OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 17 | // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 18 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 19 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 20 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 21 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 22 | // POSSIBILITY OF SUCH DAMAGE. 23 | //----------------------------------------------------------------------------- 24 | /*! 25 | \file 26 | \brief Definition of template CPointer 27 | \ingroup GenApi_PublicUtilities 28 | */ 29 | 30 | #ifndef _GENICAM_PERSISTENCEIMPL_H 31 | #define _GENICAM_PERSISTENCEIMPL_H 32 | 33 | #include 34 | #include 35 | #include 36 | #include 37 | #include 38 | #include 39 | #include 40 | 41 | using namespace GenICam; 42 | 43 | namespace GenApi 44 | { 45 | 46 | //! IIterator interface - a generic way to iterate the values of a node 47 | class IIterator { 48 | //! Resets the interator 49 | virtual void IterateReset() = 0; 50 | 51 | //! Advances the interator to the next element 52 | virtual void IterateIncrement() = 0; 53 | 54 | //! True if no more elements to interate are available 55 | virtual bool IterateIsDone() const = 0; 56 | 57 | //! Computes the maximum number of elements the interator can visit 58 | virtual int64_t IterateGetMaxIteratons() const = 0; 59 | }; 60 | 61 | 62 | //! Iterator which can walk the interfaces which are valid for selectors 63 | class IIteratorWrapper : public IIterator 64 | { 65 | public: 66 | //! Constructor 67 | IIteratorWrapper(IValue* node); 68 | 69 | //! Destructor 70 | ~IIteratorWrapper(); 71 | 72 | //! Resets the interator 73 | virtual void IterateReset(); 74 | 75 | //! Advances the interator to the next element 76 | virtual void IterateIncrement(); 77 | 78 | //! True if no more elements to interate are available 79 | virtual bool IterateIsDone() const; 80 | 81 | //! Computes the maximum number of elements the interator can visit 82 | virtual int64_t IterateGetMaxIteratons() const; 83 | 84 | private: 85 | //! holds a poiinter if the node to interate is an integer 86 | IInteger* interfaceIIntegerPtr; 87 | 88 | //! holds a poiinter if the node to interate is an enumeration 89 | IEnumeration* interfaceIEnumPtr; 90 | 91 | //! holds a poiinter if the node to interate is an boolean 92 | IBoolean* interfaceIBoolPtr; 93 | }; 94 | 95 | 96 | //! Generates a list of nodes that will be persisted 97 | void GetNodeListForPersistence(INodeMap *pNodeMap, FeatureList_t& nodeList, INode* recurseNode = NULL); 98 | 99 | //! Helper function to assist iterating a group of selectors for one or more features 100 | int64_t RecurseSelectors(IPersistScript& persistScript, FeatureList_t& featuresToPersist, FeatureList_t& selectors, FeatureList_t::iterator recursionSelector); 101 | 102 | //! Persists a node map into an IPersistScript that can be played back at some future time 103 | void PersistFeatures(INodeMap *pNodeMap, IPersistScript& persistScript); 104 | 105 | } 106 | 107 | #endif //_GENICAM_PERSISTENCEIMPL_H 108 | 109 | -------------------------------------------------------------------------------- /thirdparty/GenICam/include/GenApi/ICommand.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // (c) 2006 by Basler Vision Technologies 3 | // Section: Vision Components 4 | // Project: GenApi 5 | // Author: Hartmut Nebelung 6 | // $Header: /cvs/genicam/genicam/library/CPP/include/GenApi/ICommand.h,v 1.11 2007/08/16 13:56:39 hartmut_nebelung Exp $ 7 | // 8 | // License: This file is published under the license of the EMVA GenICam Standard Group. 9 | // A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'. 10 | // If for some reason you are missing this file please contact the EMVA or visit the website 11 | // (http://www.genicam.org) for a full copy. 12 | // 13 | // THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS" 14 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 15 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 16 | // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP 17 | // OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18 | // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 19 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 20 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 21 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 23 | // POSSIBILITY OF SUCH DAMAGE. 24 | //----------------------------------------------------------------------------- 25 | /*! 26 | \file 27 | \brief Definition of ICommand interface 28 | \ingroup GenApi_PublicInterface 29 | */ 30 | 31 | #ifndef GENAPI_ICOMMAND_H 32 | #define GENAPI_ICOMMAND_H 33 | 34 | #include "GenApiDll.h" 35 | #include "Types.h" 36 | #include "IValue.h" 37 | 38 | #pragma warning ( push ) 39 | #pragma warning ( disable : 4251 ) // XXX needs to have dll-interface to be used by clients of class YYY 40 | 41 | namespace GenApi 42 | { 43 | //************************************************************* 44 | // ICommand interface 45 | //************************************************************* 46 | 47 | //! Interface for command like properties 48 | //! \ingroup GenApi_PublicInterface 49 | interface ICommand : virtual public IValue 50 | { 51 | public: 52 | 53 | //! Execute the command 54 | virtual void Execute() = 0; 55 | 56 | //! Execute the command 57 | virtual void operator()() = 0; 58 | 59 | //! Query whether the command is executed 60 | virtual bool IsDone() const = 0; 61 | 62 | 63 | }; 64 | 65 | 66 | //************************************************************* 67 | // CCommandRef class 68 | //************************************************************* 69 | 70 | /** 71 | \internal 72 | \brief Reference to an IInteger pointer 73 | \ingroup GenApi_PublicImpl 74 | */ 75 | template 76 | class CCommandRefT : public CValueRefT 77 | { 78 | typedef CValueRefT ref; 79 | 80 | public: 81 | /*--------------------------------------------------------*/ 82 | // ICommand 83 | /*--------------------------------------------------------*/ 84 | 85 | //! Execute the command 86 | virtual void Execute() 87 | { 88 | if(ref::m_Ptr) 89 | return ref::m_Ptr->Execute(); 90 | else 91 | throw ACCESS_EXCEPTION("Feature not present (reference not valid)"); 92 | } 93 | 94 | //! Execute the command 95 | virtual void operator()() 96 | { 97 | if(ref::m_Ptr) 98 | ref::m_Ptr->operator()(); 99 | else 100 | throw ACCESS_EXCEPTION("Feature not present (reference not valid)"); 101 | } 102 | 103 | //! Query whether the command is executed 104 | virtual bool IsDone() const 105 | { 106 | if(ref::m_Ptr) 107 | return ref::m_Ptr->IsDone(); 108 | else 109 | throw ACCESS_EXCEPTION("Feature not present (reference not valid)"); 110 | } 111 | 112 | 113 | }; 114 | 115 | //! Reference to an ICommand pointer 116 | //! \ingroup GenApi_PublicImpl 117 | typedef CCommandRefT CCommandRef; 118 | 119 | 120 | 121 | } 122 | 123 | #pragma warning ( pop ) 124 | 125 | #endif // ifndef GENAPI_ICOMMAND_H 126 | -------------------------------------------------------------------------------- /thirdparty/GenICam/include/GenApi/impl/Category.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // (c) 2006 by Basler Vision Technologies 3 | // Section: Vision Components 4 | // Project: GenApi 5 | // Author: Fritz Dierks 6 | // $Header: /cvs/genicam/genicam/library/CPP/include/GenApi/impl/Category.h,v 1.13 2007/12/19 15:01:33 hartmut_nebelung Exp $ 7 | // 8 | // License: This file is published under the license of the EMVA GenICam Standard Group. 9 | // A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'. 10 | // If for some reason you are missing this file please contact the EMVA or visit the website 11 | // (http://www.genicam.org) for a full copy. 12 | // 13 | // THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS" 14 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 15 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 16 | // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP 17 | // OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18 | // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 19 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 20 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 21 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 23 | // POSSIBILITY OF SUCH DAMAGE. 24 | //----------------------------------------------------------------------------- 25 | /*! 26 | \file 27 | \brief Definition of CCategory 28 | */ 29 | 30 | #ifndef GENAPI_CATEGORY_H 31 | #define GENAPI_CATEGORY_H 32 | 33 | #include "../ICategory.h" 34 | #include "Node.h" 35 | #include "NodeMacros.h" 36 | #include "BaseT.h" 37 | #include "ValueT.h" 38 | #include "NodeT.h" 39 | 40 | #pragma warning ( push ) 41 | #pragma warning ( disable : 4275 ) // non dll-interface XXX used as base for dll-interface class YYY 42 | 43 | namespace GenApi 44 | { 45 | 46 | //************************************************************* 47 | // CCategory class 48 | //************************************************************* 49 | 50 | /** 51 | * \ingroup internal_impl 52 | * 53 | * \brief Holds a list of features and sub-categories 54 | */ 55 | class GENAPI_DECL CCategoryImpl : public CNodeImpl, public ICategory 56 | { 57 | public: 58 | 59 | //! Constructor 60 | CCategoryImpl(); 61 | 62 | //------------------------------------------------------------- 63 | // IValue implementation (partial only) 64 | //------------------------------------------------------------- 65 | 66 | protected: 67 | //! Get the INode interface of the node 68 | virtual INode* InternalGetNode(); 69 | 70 | //! Get display name of the node as string 71 | virtual GenICam::gcstring InternalToString(bool /*Verify = false*/) 72 | { 73 | return InternalGetNode()->GetDisplayName(); 74 | } 75 | 76 | //! Set content of the node as string 77 | #pragma BullseyeCoverage off 78 | virtual void InternalFromString(const GenICam::gcstring& /*ValueStr*/, bool /*Verify*/ ) 79 | { 80 | // Categories are read-only 81 | assert(false); 82 | } 83 | #pragma BullseyeCoverage on 84 | 85 | public: 86 | //------------------------------------------------------------- 87 | // ICategory implementation 88 | //------------------------------------------------------------- 89 | 90 | //! Get all features of the category (including sub-categories) 91 | virtual void GetFeatures(FeatureList_t &Features) const; 92 | 93 | //------------------------------------------------------------- 94 | // Initializing 95 | //------------------------------------------------------------- 96 | 97 | BEGIN_CONVERT_MAP 98 | CHAIN_CONVERT_MAP(CNodeImpl) 99 | END_CONVERT_MAP 100 | 101 | virtual void FinalConstruct(); 102 | 103 | //! Returns the current access mode of the node 104 | virtual EAccessMode InternalGetAccessMode() const; 105 | 106 | }; 107 | 108 | class GENAPI_DECL CCategory : public BaseT< ValueT< NodeT< CCategoryImpl > > > 109 | { 110 | }; 111 | 112 | } 113 | #pragma warning ( pop ) 114 | 115 | #endif // ifndef GENAPI_CATEGORY_H 116 | -------------------------------------------------------------------------------- /thirdparty/GenICam/include/GenApi/ISelector.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // (c) 2006 by Basler Vision Technologies 3 | // Section: Vision Components 4 | // Project: GenApi 5 | // Author: Hartmut Nebelung 6 | // $Header: /cvs/genicam/genicam/library/CPP/include/GenApi/ISelector.h,v 1.12 2007/08/16 13:56:41 hartmut_nebelung Exp $ 7 | // 8 | // License: This file is published under the license of the EMVA GenICam Standard Group. 9 | // A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'. 10 | // If for some reason you are missing this file please contact the EMVA or visit the website 11 | // (http://www.genicam.org) for a full copy. 12 | // 13 | // THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS" 14 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 15 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 16 | // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP 17 | // OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18 | // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 19 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 20 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 21 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 23 | // POSSIBILITY OF SUCH DAMAGE. 24 | //----------------------------------------------------------------------------- 25 | /*! 26 | \file 27 | \brief Definition of ISelector 28 | */ 29 | 30 | #ifndef GENAPI_ISELECTOR_H 31 | #define GENAPI_ISELECTOR_H 32 | 33 | #if defined (_MSC_VER) && (_MSC_VER > 1200) 34 | #pragma once 35 | #endif // _MSC_VER > 1200 36 | 37 | #include "GenApiDll.h" 38 | 39 | #pragma warning ( push ) 40 | #pragma warning ( disable : 4251 ) // XXX needs to have dll-interface to be used by clients of class YYY 41 | 42 | namespace GenApi 43 | { 44 | /** 45 | \brief Interface for groups of features selected by a single one 46 | \ingroup GenApi_PublicImpl 47 | */ 48 | interface ISelector : virtual public IBase 49 | { 50 | //! true iff this feature selects a group of features 51 | virtual bool IsSelector() const = 0; 52 | 53 | //! retrieve the group of selected features 54 | virtual void GetSelectedFeatures( FeatureList_t& ) const = 0; 55 | 56 | //! retrieve the group of features selecting this node 57 | virtual void GetSelectingFeatures( FeatureList_t& ) const = 0; 58 | }; 59 | 60 | //************************************************************* 61 | // CSelectorRef class 62 | //************************************************************* 63 | 64 | /** 65 | \internal 66 | \brief Reference to an ISelector pointer 67 | \ingroup GenApi_PublicImpl 68 | */ 69 | template 70 | class CSelectorRefT : public CBaseRefT 71 | { 72 | typedef CBaseRefT ref; 73 | 74 | public: 75 | /*--------------------------------------------------------*/ 76 | // ISelector 77 | /*--------------------------------------------------------*/ 78 | 79 | //! Get all features of the Selector 80 | virtual void GetSelectedFeatures(FeatureList_t &Features) const 81 | { 82 | if(ref::m_Ptr) 83 | return ref::m_Ptr->GetSelectedFeatures( Features ); 84 | else 85 | throw ACCESS_EXCEPTION("Feature not present (reference not valid)"); 86 | } 87 | 88 | //! retrieve the group of features selecting this node 89 | virtual void GetSelectingFeatures( FeatureList_t& Features) const 90 | { 91 | if(ref::m_Ptr) 92 | return ref::m_Ptr->GetSelectingFeatures( Features ); 93 | else 94 | throw ACCESS_EXCEPTION("Feature not present (reference not valid)"); 95 | } 96 | 97 | //! true iff this feature selects a group of features 98 | virtual bool IsSelector() const 99 | { 100 | if(ref::m_Ptr) 101 | return ref::m_Ptr->IsSelector(); 102 | else 103 | throw ACCESS_EXCEPTION("Feature not present (reference not valid)"); 104 | } 105 | }; 106 | 107 | //! Reference to an ISelector pointer 108 | //! \ingroup GenApi_PublicImpl 109 | typedef CSelectorRefT CSelectorRef; 110 | 111 | } 112 | 113 | #pragma warning ( pop ) 114 | 115 | 116 | #endif // GENAPI_ISELECTOR_H 117 | --------------------------------------------------------------------------------