Skip to content

Commit

Permalink
add thirdparty GenICam Sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
hirsch committed Aug 11, 2009
1 parent 662166d commit 2ba1e8d
Show file tree
Hide file tree
Showing 159 changed files with 19,548 additions and 0 deletions.
74 changes: 74 additions & 0 deletions thirdparty/GenICam/License_ReadMe.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
==============
== Licenses ==
==============


Version 1.0


GenICam comes in two versions
~ a runtime version
~ a development version.


The runtime version comes under the following license:

Copyright (c) 2006, <owner of the software module>.
All rights reserved

Redistribution and use in source and binary forms, without modification,
are permitted provided that the following conditions are met:

~ Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.

~ Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

~ Neither the name of the GenICam standard group nor the names of its contributors
may be used to endorse or promote products derived from this software without
specific prior written permission.


THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.

The development version comes under the GenICam license (see below).


GenICam uses the following 3rd party software packages:


Package License Internet
==================================================================================
Mathparser LGPL http://kirya.narod.ru/mathparser.html
http://www.sama.ru/~despair/ccalc/
Xerces Apache http://xerces.apache.org
Xalan Apache http://xalan.apache.org
Log4Cpp LGPL http://log4cpp.sourceforge.net
CppUnit LGPL http://cppunit.sourceforge.net
setx Win2k ressource kit http://www.microsoft.com

All license texts come as part of the GenICam distribution in the licenses
subdiretory. If not you can download them from the internet.

License File Internet
==================================================================================
LGPL LGPL.txt http://www.gnu.org/licenses/lgpl.html
Apache Apache.txt http://www.apache.org/licenses/LICENSE-2.0
GenICam GenICam_License.pdf http://www.genicam.org
setx setx_license.txt http://www.microsoft.com


Last but not least GenICam redistributes the C/C++ runtime DLLs of the
Microsoft Visual C++ compiler in the version 7.1 and 8.0

35 changes: 35 additions & 0 deletions thirdparty/GenICam/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@

Installation on a Windows system
================================
The provided Merge module are supposed to be integrated into a setup by your API supplier.

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.
set GENICAM_ROOT_V1_1=c:\Projectes\GenICamTest
set GENICAM_LOG_CONFIG=c:\Projects\GenICamTest\log\config\TestLogging.properties
set TEST_RESULT_FILE=c:\Projects\GenICamTest\log\mylog.txt

Installation on a Linux system
================================
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.

mkdir /opt/genicam
tar xzvf genicam-1.1.2-linux-i686.tgz -C /opt/genicam
tar xzvf genicam-sdk-1.1.2-linux-i686.tgz -C /opt/genicam
tar xzvf genicam-tests-1.1.2-linux-i686.tgz -C /opt/genicam

Add these variables to your environment, e.g. by placing these lines in your profile or .bashrc file.
export GENICAM_ROOT_V1_1=/opt/genicam
export GENICAM_CACHE=$HOME/tmp

In order to execute the GenApi test using the standard test setting do the following
export GENICAM_LOG_CONFIG=/opt/genicam/share/genicam/log/config/TestLogging.properties
export TEST_RESULT_FILE=$HOME/tmp/mylog.txt
/opt/genicam/bin/GenicamPluginTester /opt/genicam/lib/libgenicam_test.so

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.

In case you develop application using the GenICam SDK add
the GenICam include path to your preproceccesor options, e.g:
CPPFLAGS += $(GENICAM_ROOT_V1_1)/include
and the GenICam lib resp. lib64 path to your linker options, e.g:
LDFLAGS += $(GENICAM_ROOT_V1_1)/lib -lgenicam_base -l genciam_genapi -lgenicam_mathparser -lgenicam_log.
Binary file added thirdparty/GenICam/bin/gcxalan
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
//-----------------------------------------------------------------------------
// (c) 2006, 2007 by Basler Vision Technologies
// Section: Vision Components
// Project: GenApi
// Author: Fritz Dierks
// $Header: /cvs/genicam/genicam/examples/CPP/GenApi/Generic/UsingGenApi_1/UsingGenApi.cpp,v 1.9 2007/12/17 13:58:10 hartmut_nebelung Exp $
//
// License: This file is published under the license of the EMVA GenICam Standard Group.
// A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'.
// If for some reason you are missing this file please contact the EMVA or visit the website
// (http://www.genicam.org) for a full copy.
//
// THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP
// OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
//-----------------------------------------------------------------------------
/*!
\file
\brief Shows how to use GenApi
*/

#if WIN32
// Required for SetDllDirectory; this function exists only with WinXK SP1 or higher
#define _WIN32_WINNT 0x0502
#include <Windows.h>
#endif
#include <stdio.h>
#include <conio.h>
#include <string>

// Required for using GenApi
#include <GenApi/GenApi.h>
using namespace GenICam;
using namespace GenApi;

#if WIN32
int setenv( const char name[], const char value[], int replace )
{
GC_UNUSED( replace );
::SetEnvironmentVariable( name, value );
return 0;
}
#endif

int main(int /*argc*/, char* /*argv[]*/)
{
// Setup the environment variables pointing out GenICam's home directory
// The following code assumes that an environment variable GENICAM_ROOT exists
// Note that this variable is normally not present at runtime
std::string MyGenICamRoot( getenv("GENICAM_ROOT") );

// GENICAM_ROOT_VERSION holds the path to the GenICam root directory
// GENICAM_ROOT_VERSION expands to something like "GENICAM_ROOT_V1_0" depending on the GenICam version used
// This variable must be present at runtime
setenv(GENICAM_ROOT_VERSION, MyGenICamRoot.c_str(), false );

// GENICAM_CACHE holds a path to a location were cached XML files are stored
// This location must be writable therefore it is normally different from the home directory
// were users without admin rights cannot write files.
std::string MyGenICamBCache( MyGenICamRoot );
MyGenICamBCache += "/xml/GenApi/cache";
setenv("GENICAM_CACHE", MyGenICamBCache.c_str(), false );

#if WIN32
// The GenICam DLLs from the installation must be in the PATH.
// Note that SetDllDirectory is avaliable only under WinXP SP1 and higher
std::string MyGenICamBin( MyGenICamRoot );
MyGenICamBin += "/bin/Win32_i86";
::SetDllDirectory( MyGenICamBin.c_str() );
#endif

// Get a camera description file
// This is an example for a very primitive camera description file
const GenICam::gcstring CameraDescriptionFile =
"<?xml version=\"1.0\" encoding=\"utf-8\"?> \n"
"<RegisterDescription \n"
" ModelName=\"UsingGenApiExample\" \n"
" VendorName=\"Generic\" \n"
" ToolTip=\"Sample nodes\" \n"
" StandardNameSpace=\"GEV\" \n"
" SchemaMajorVersion=\"1\" \n"
" SchemaMinorVersion=\"0\" \n"
" SchemaSubMinorVersion=\"1\" \n"
" MajorVersion=\"2\" \n"
" MinorVersion=\"3\" \n"
" SubMinorVersion=\"4\" \n"
" ProductGuid=\"55D10620-B3F2-428f-AA26-E613FDACB0F2\" \n"
" VersionGuid=\"5B673AA5-1C47-417e-959D-CB5445368A5A\" \n"
" xmlns=\"http://www.genicam.org/GenApi/Version_1_0\" \n"
" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" \n"
" xsi:schemaLocation=\"http://www.genicam.org/GenApi/Version_1_0 \n"
" http://www.genicam.org/GenApi/GenApiSchema_Version_1_0.xsd\"> \n"
" \n"
" <Integer Name=\"TheValue\"> \n"
" <Value>0</Value> \n"
" </Integer> \n"
" \n"
"</RegisterDescription> \n";


// Create a camera access object and load the camera description file
CNodeMapRef Camera;
Camera._LoadXMLFromString(CameraDescriptionFile);

// Get the Value node and access it
CIntegerPtr ptrValue = Camera._GetNode("TheValue");

// access the node
assert( 0 == *ptrValue());
*ptrValue = 42;
int64_t Value = *ptrValue();
assert( 42 == Value);

printf("UsingGenApi_1 : GenICam worked all right.\n");

return ! (42 == Value);

}




41 changes: 41 additions & 0 deletions thirdparty/GenICam/include/Base/GCBase.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/****************************************************************************
(c) 2005 by STEMMER IMAGING
License: This file is published under the license of the EMVA GenICam Standard Group.
A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'.
If for some reason you are missing this file please contact the EMVA or visit the website
(http://www.genicam.org) for a full copy.
THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP
OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
****************************************************************************/

/// \file
/// \brief Common GenICam base include file.
/// \version $Revision: 1.8 $
/// \date $Date: 2007/02/16 15:45:09 $
/// \ingroup Base_PublicUtilities


#ifndef GENICAM_GCBASE_H
#define GENICAM_GCBASE_H

#include "GCTypes.h"
#include "GCString.h"
#include "GCStringVector.h"
#include "GCException.h"
#include "GCError.h"

#include "GCUtilities.h"

#endif // GENICAM_GCBASE_H
75 changes: 75 additions & 0 deletions thirdparty/GenICam/include/Base/GCError.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
//***************************************************************************
// (C) 2005 STEMMER IMAGING
//
/// \file
/// GenICam Common Error Values
/// \author Rupert Stelz (STEMMER IMAGING)
/// \version 0.1
/// \date 2005
/// \ingroup Base_PublicUtilities
//
// License: This file is published under the license of the EMVA GenICam Standard Group.
// A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'.
// If for some reason you are missing this file please contact the EMVA or visit the website
// (http://www.genicam.org) for a full copy.
//
// THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP
// OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
//***************************************************************************

// TLIClientDummy.dll GenICam TransportLayer Dummy Client

#ifndef GC_ERROR_DEF_H
#define GC_ERROR_DEF_H

#include "GCTypes.h"

namespace GenICam
{
/// Gen Cam Error
//! \ingroup Base_PublicUtilities
typedef int32_t GC_ERROR;

//! Define a list wich maps error ids to error descrtiptions
//! The list is filled in the cpp file
//! \ingroup Base_PublicUtilities
enum GCErrorID
{
GC_ERR_SUCCESS = 0,
GC_ERR_INVALID_BUFFER_SIZE = -1,
GC_ERR_INVALID_HANDLE = -2,
GC_ERR_INVALID_ID = -3,
GC_ERR_ACCESS_DENIED = -4,
GC_ERR_NO_DATA = -5,
GC_ERR_ERROR = -6,
GC_ERR_INVALID_PARAMETER = -7,
GC_ERR_TIMEOUT = -8,
GC_ERR_INVALID_FILENAME = -9,
GC_ERR_INVALID_ADDRESS = -10,
GC_ERR_FILE_IO = -11
};

//! Modules were errors can come from
//! \ingroup Base_PublicUtilities
enum GCModuleID {
GC_MOD_SYSTEM = 0x0,
GC_MOD_TLICLIENT = 0x20000000,
GC_MOD_TLISYSTEM = 0x10000000,
GC_MOD_FACTORY = 0x08000000,
GC_MOD_GENAPI = 0x04000000

};

#define GC_GET_ERROR(ErrorCode) (((ErrorCode ) & 0xFFFF ) | 0xFFFF0000)
#define GC_IS_ERROR(ErrorCode) (((ErrorCode ) & 0x80000000) ? true : false)
}
#endif //GC_ERROR_DEF_H
Loading

0 comments on commit 2ba1e8d

Please sign in to comment.