Windows AVTGigESDK
authorarthur <arthur@2c67d6c2-4361-4cd7-bd83-1149b1926c9b>
Sat, 7 Jan 2012 08:36:52 +0000 (08:36 +0000)
committerarthur <arthur@2c67d6c2-4361-4cd7-bd83-1149b1926c9b>
Sat, 7 Jan 2012 08:36:52 +0000 (08:36 +0000)
git-svn-id: https://valelab.ucsf.edu/svn/3rdpartypublic@98 2c67d6c2-4361-4cd7-bd83-1149b1926c9b

346 files changed:
AVTGigESDK_Win/GigESDK/Allied Vision Technologies GigE Filter Installer 1.22.exe [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/bin-pc/PvAPI.dll [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/bin-pc/PvJNI.dll [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/bin-pc/PvNET.dll [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/bin-pc/SampleViewer.exe [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/bin-pc/ipconfig.exe [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/bin-pc/x64/PvAPI.dll [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/bin-pc/x64/SampleViewer.exe [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/bin-pc/x64/ipconfig.exe [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/documents/AVT_Camera_and_Driver_Attributes.pdf [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/documents/AVT_PvAPI_Manual.pdf [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/documents/PvAPI_Release_Notes.pdf [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/AdjustPacket/AdjustPacket.cpp [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/AdjustPacket/AdjustPacket.sln [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/AdjustPacket/AdjustPacket.vcproj [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/AdjustPacket/StdAfx.cpp [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/AdjustPacket/StdAfx.h [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/BatchStream/BatchStream.cpp [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/BatchStream/BatchStream.sln [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/BatchStream/BatchStream.vcproj [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/BatchStream/StdAfx.cpp [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/BatchStream/StdAfx.h [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/CamMemory/CamMemory.cpp [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/CamMemory/CamMemory.sln [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/CamMemory/CamMemory.vcproj [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/CamMemory/StdAfx.cpp [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/CamMemory/StdAfx.h [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/CamMemory/XGetopt.cpp [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/CamMemory/XGetopt.h [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/CamSetup/CamSetup.cpp [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/CamSetup/CamSetup.sln [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/CamSetup/CamSetup.vcproj [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/CamSetup/StdAfx.cpp [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/CamSetup/StdAfx.h [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/CamSetup/XGetopt.cpp [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/CamSetup/XGetopt.h [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/ChangeROI/ChangeROI.cpp [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/ChangeROI/ChangeROI.sln [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/ChangeROI/ChangeROI.vcproj [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/ChangeROI/StdAfx.cpp [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/ChangeROI/StdAfx.h [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/EventCallback/EventCallback.cpp [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/EventCallback/EventCallback.sln [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/EventCallback/EventCallback.vcproj [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/EventCallback/StdAfx.cpp [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/EventCallback/StdAfx.h [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/GetXMLFile/GetXMLFile.cpp [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/GetXMLFile/GetXMLFile.sln [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/GetXMLFile/GetXMLFile.vcproj [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/HardTrigger/HardTrigger.cpp [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/HardTrigger/HardTrigger.sln [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/HardTrigger/HardTrigger.vcproj [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/HardTrigger/StdAfx.cpp [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/HardTrigger/StdAfx.h [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/Java/JListAttributes/.classpath [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/Java/JListAttributes/.project [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/Java/JListAttributes/build.xml [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/Java/JListAttributes/src/prosilica/JListAttributes.java [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/Java/JListCameras/.classpath [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/Java/JListCameras/.project [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/Java/JListCameras/build.xml [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/Java/JListCameras/src/prosilica/JListCameras.java [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/Java/JSnap/.classpath [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/Java/JSnap/.project [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/Java/JSnap/build.xml [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/Java/JSnap/src/prosilica/JSnap.java [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/Java/JStream/.classpath [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/Java/JStream/.project [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/Java/JStream/build.xml [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/Java/JStream/src/prosilica/JStream.java [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/Java/JThread/.classpath [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/Java/JThread/.project [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/Java/JThread/build.xml [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/Java/JThread/src/prosilica/JThread.java [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/Java/JThread3/.classpath [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/Java/JThread3/.project [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/Java/JThread3/bin/prosilica/JThread3.class [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/Java/JThread3/build.xml [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/Java/JThread3/src/prosilica/JThread3.java [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/Java/PvJNI/PvJNI.sln [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/Java/PvJNI/PvJNI.suo [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/Java/PvJNI/PvJNI/PvJNI.cpp [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/Java/PvJNI/PvJNI/PvJNI.h [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/Java/PvJNI/PvJNI/PvJNI.rc [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/Java/PvJNI/PvJNI/PvJNI.vcproj [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/Java/PvJNI/PvJNI/ReadMe.txt [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/Java/PvJNI/PvJNI/resource.h [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/Java/PvJNI/PvJNI/resource1.h [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/Java/PvJNI/PvJNI/stdafx.cpp [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/Java/PvJNI/PvJNI/stdafx.h [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/Java/PvJPI/.classpath [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/Java/PvJPI/.project [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/Java/PvJPI/build.xml [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/Java/PvJPI/src/prosilica/Pv.java [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/ListAttributes/ListAttributes.cpp [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/ListAttributes/ListAttributes.sln [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/ListAttributes/ListAttributes.vcproj [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/ListAttributes/StdAfx.cpp [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/ListAttributes/StdAfx.h [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/ListCameras/ListCameras.cpp [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/ListCameras/ListCameras.sln [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/ListCameras/ListCameras.vcproj [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/ListCameras/StdAfx.cpp [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/ListCameras/StdAfx.h [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/MultiStream/MultiStream.cpp [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/MultiStream/MultiStream.sln [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/MultiStream/MultiStream.vcproj [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/MultiStream/StdAfx.cpp [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/MultiStream/StdAfx.h [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/NET/AdjustPacket/AdjustPacket.cs [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/NET/AdjustPacket/AdjustPacket.cs.csproj [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/NET/AdjustPacket/AdjustPacket.cs.csproj.user [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/NET/AdjustPacket/AdjustPacket.sln [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/NET/AdjustPacket/AdjustPacket.suo [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/NET/AdjustPacket/App.ico [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/NET/AdjustPacket/AssemblyInfo.cs [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/NET/AdjustPacket/app.config [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/NET/BatchStream/App.ico [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/NET/BatchStream/AssemblyInfo.cs [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/NET/BatchStream/BatchStream.cs [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/NET/BatchStream/BatchStream.csproj [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/NET/BatchStream/BatchStream.csproj.user [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/NET/BatchStream/BatchStream.sln [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/NET/BatchStream/BatchStream.suo [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/NET/EventCallback/App.ico [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/NET/EventCallback/AssemblyInfo.cs [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/NET/EventCallback/EventCallback.cs [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/NET/EventCallback/EventCallback.csproj [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/NET/EventCallback/EventCallback.csproj.user [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/NET/EventCallback/EventCallback.sln [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/NET/EventCallback/EventCallback.suo [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/NET/EventCallback/app.config [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/NET/HardTrigger/App.ico [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/NET/HardTrigger/AssemblyInfo.cs [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/NET/HardTrigger/HardTrigger.cs [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/NET/HardTrigger/HardTrigger.csproj [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/NET/HardTrigger/HardTrigger.csproj.user [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/NET/HardTrigger/HardTrigger.sln [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/NET/HardTrigger/HardTrigger.suo [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/NET/ListCameras/App.ico [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/NET/ListCameras/AssemblyInfo.cs [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/NET/ListCameras/ListCameras.cs [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/NET/ListCameras/ListCameras.csproj [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/NET/ListCameras/ListCameras.csproj.user [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/NET/ListCameras/ListCameras.sln [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/NET/ListCameras/ListCameras.suo [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/NET/Ping/App.ico [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/NET/Ping/AssemblyInfo.cs [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/NET/Ping/Ping.csproj [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/NET/Ping/Ping.csproj.user [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/NET/Ping/ping.cs [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/NET/Ping/ping.sln [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/NET/Ping/ping.suo [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/NET/PvNET/AssemblyInfo.cs [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/NET/PvNET/Class1.cs [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/NET/PvNET/PvNET.csproj [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/NET/PvNET/PvNET.csproj.user [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/NET/PvNET/PvNET.sln [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/NET/PvNET/PvNET.suo [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/NET/ResetCamera/App.ico [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/NET/ResetCamera/AssemblyInfo.cs [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/NET/ResetCamera/ResetCamera.cs [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/NET/ResetCamera/ResetCamera.csproj [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/NET/ResetCamera/ResetCamera.csproj.user [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/NET/ResetCamera/ResetCamera.sln [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/NET/ResetCamera/ResetCamera.suo [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/NET/SoftTrigger/App.ico [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/NET/SoftTrigger/AssemblyInfo.cs [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/NET/SoftTrigger/SoftTrigger.cs [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/NET/SoftTrigger/SoftTrigger.csproj [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/NET/SoftTrigger/SoftTrigger.csproj.user [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/NET/SoftTrigger/SoftTrigger.sln [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/NET/SoftTrigger/SoftTrigger.suo [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/NET/Stream/App.ico [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/NET/Stream/AssemblyInfo.cs [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/NET/Stream/Stream.cs [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/NET/Stream/Stream.csproj [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/NET/Stream/Stream.csproj.user [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/NET/Stream/Stream.sln [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/NET/Stream/Stream.suo [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/NET/StreamAndGrab/App.ico [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/NET/StreamAndGrab/AssemblyInfo.cs [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/NET/StreamAndGrab/StreamAndGrab.cs [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/NET/StreamAndGrab/StreamAndGrab.csproj [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/NET/StreamAndGrab/StreamAndGrab.csproj.user [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/NET/StreamAndGrab/StreamAndGrab.sln [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/NET/StreamAndGrab/StreamAndGrab.suo [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/NET/StreamPnp/App.ico [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/NET/StreamPnp/AssemblyInfo.cs [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/NET/StreamPnp/StreamPnp.cs [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/NET/StreamPnp/StreamPnp.csproj [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/NET/StreamPnp/StreamPnp.csproj.user [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/NET/StreamPnp/StreamPnp.sln [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/NET/StreamPnp/StreamPnp.suo [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/Ping/Ping.cpp [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/Ping/Ping.sln [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/Ping/Ping.vcproj [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/Ping/StdAfx.cpp [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/Ping/StdAfx.h [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/ResetCamera/ResetCamera.cpp [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/ResetCamera/ResetCamera.sln [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/ResetCamera/ResetCamera.vcproj [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/ResetCamera/StdAfx.cpp [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/ResetCamera/StdAfx.h [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/SampleViewer/AboutDlg.cpp [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/SampleViewer/AboutDlg.h [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/SampleViewer/AttrTreeView.cpp [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/SampleViewer/AttrTreeView.h [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/SampleViewer/ChildFrame.cpp [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/SampleViewer/ChildFrame.h [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/SampleViewer/ColumnTreeCtrl.cpp [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/SampleViewer/ColumnTreeCtrl.h [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/SampleViewer/ColumnTreeView.cpp [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/SampleViewer/ColumnTreeView.h [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/SampleViewer/ContainerView.cpp [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/SampleViewer/ContainerView.h [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/SampleViewer/Controls.h [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/SampleViewer/CtrlFrame.cpp [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/SampleViewer/CtrlFrame.h [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/SampleViewer/EventsFrame.cpp [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/SampleViewer/EventsFrame.h [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/SampleViewer/FinderFrame.cpp [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/SampleViewer/FinderFrame.h [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/SampleViewer/HistFrame.cpp [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/SampleViewer/HistFrame.h [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/SampleViewer/IPInput.cpp [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/SampleViewer/IPInput.h [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/SampleViewer/ImageView.cpp [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/SampleViewer/ImageView.h [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/SampleViewer/InfoFrame.cpp [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/SampleViewer/InfoFrame.h [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/SampleViewer/ListFrame.cpp [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/SampleViewer/ListFrame.h [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/SampleViewer/MainFrame.cpp [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/SampleViewer/MainFrame.h [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/SampleViewer/SampleViewer.cpp [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/SampleViewer/SampleViewer.h [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/SampleViewer/SampleViewer.rc [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/SampleViewer/SampleViewer.sln [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/SampleViewer/SampleViewer.suo [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/SampleViewer/SampleViewer.vcproj [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/SampleViewer/SaveNextDlg.cpp [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/SampleViewer/SaveNextDlg.h [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/SampleViewer/SerialFrame.cpp [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/SampleViewer/SerialFrame.h [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/SampleViewer/StdAfx.cpp [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/SampleViewer/StdAfx.h [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/SampleViewer/ValueView.cpp [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/SampleViewer/ValueView.h [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/SampleViewer/res/SampleViewer.ico [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/SampleViewer/res/SampleViewer.rc2 [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/SampleViewer/res/bitmap1.bmp [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/SampleViewer/res/bitmap10.bmp [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/SampleViewer/res/bitmap2.bmp [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/SampleViewer/res/bitmap3.bmp [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/SampleViewer/res/bitmap4.bmp [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/SampleViewer/res/bitmap5.bmp [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/SampleViewer/res/bitmap6.bmp [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/SampleViewer/res/bitmap7.bmp [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/SampleViewer/res/bitmap8.bmp [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/SampleViewer/res/bitmap9.bmp [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/SampleViewer/res/icon1.ico [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/SampleViewer/res/icon2.ico [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/SampleViewer/res/icon3.ico [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/SampleViewer/res/icon4.ico [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/SampleViewer/res/icon5.ico [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/SampleViewer/res/icon6.ico [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/SampleViewer/res/icon7.ico [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/SampleViewer/resource.h [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/SoftTrigger/SoftTrigger.cpp [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/SoftTrigger/SoftTrigger.sln [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/SoftTrigger/SoftTrigger.vcproj [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/SoftTrigger/StdAfx.cpp [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/SoftTrigger/StdAfx.h [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/Stream/StdAfx.cpp [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/Stream/StdAfx.h [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/Stream/Stream.cpp [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/Stream/Stream.sln [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/Stream/Stream.vcproj [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/Stream2JPEG/Jpeg.c [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/Stream2JPEG/Jpeg.h [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/Stream2JPEG/Lock.c [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/Stream2JPEG/Lock.h [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/Stream2JPEG/Stream2JPEG.cpp [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/Stream2JPEG/Stream2JPEG.sln [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/Stream2JPEG/Stream2JPEG.vcproj [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/Stream2JPEG/Thread.c [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/Stream2JPEG/Thread.h [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/StreamAndGrab/StdAfx.cpp [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/StreamAndGrab/StdAfx.h [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/StreamAndGrab/StreamAndGrab.cpp [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/StreamAndGrab/StreamAndGrab.sln [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/StreamAndGrab/StreamAndGrab.vcproj [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/StreamPnp/StdAfx.cpp [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/StreamPnp/StdAfx.h [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/StreamPnp/StreamPnp.cpp [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/StreamPnp/StreamPnp.sln [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/StreamPnp/StreamPnp.vcproj [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/StreamWaitForFrameDone/StdAfx.cpp [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/StreamWaitForFrameDone/StdAfx.h [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/StreamWaitForFrameDone/StreamWaitForFrameDone.cpp [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/StreamWaitForFrameDone/StreamWaitForFrameDone.sln [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/StreamWaitForFrameDone/StreamWaitForFrameDone.vcproj [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/VB/Bitmap.bas [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/VB/ListAttributes/Form1.frm [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/VB/ListAttributes/General.bas [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/VB/ListAttributes/ListAttributes.vbp [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/VB/ListAttributes/ListAttributes.vbw [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/VB/PvApi.bas [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/VB/Snap/Form1.frm [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/VB/Snap/General.bas [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/VB/Snap/Snap.vbp [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/VB/Snap/Snap.vbw [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/VB/Stream/Form1.frm [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/VB/Stream/General.bas [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/VB/Stream/Stream.vbp [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/VB/Stream/Stream.vbw [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/ipconfig/ipconfig.sln [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/ipconfig/ipconfig.vcproj [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/ipconfig/src/ConfigEdit.cpp [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/ipconfig/src/ConfigEdit.h [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/ipconfig/src/MainDlg.cpp [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/ipconfig/src/MainDlg.h [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/ipconfig/src/StdAfx.cpp [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/ipconfig/src/StdAfx.h [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/ipconfig/src/ipconfig.cpp [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/ipconfig/src/ipconfig.h [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/ipconfig/src/ipconfig.ico [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/ipconfig/src/ipconfig.rc [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/ipconfig/src/ipconfig.rc2 [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/ipconfig/src/resource.h [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/siotest/siotest.cpp [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/siotest/siotest.sln [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/examples/siotest/siotest.vcproj [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/inc-pc/ImageLib.h [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/inc-pc/PvApi.h [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/inc-pc/PvRegIo.h [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/lib-pc/ImageLib.lib [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/lib-pc/PvAPI.lib [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/lib-pc/x64/ImageLib.lib [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/lib-pc/x64/PvAPI.lib [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/modules/ImageLib.sln [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/modules/ImageLib.vcproj [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/modules/tiff-src/ImageLibTiff.cpp [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/unins000.dat [new file with mode: 0644]
AVTGigESDK_Win/GigESDK/unins000.exe [new file with mode: 0644]

diff --git a/AVTGigESDK_Win/GigESDK/Allied Vision Technologies GigE Filter Installer 1.22.exe b/AVTGigESDK_Win/GigESDK/Allied Vision Technologies GigE Filter Installer 1.22.exe
new file mode 100644 (file)
index 0000000..7dfe088
Binary files /dev/null and b/AVTGigESDK_Win/GigESDK/Allied Vision Technologies GigE Filter Installer 1.22.exe differ
diff --git a/AVTGigESDK_Win/GigESDK/bin-pc/PvAPI.dll b/AVTGigESDK_Win/GigESDK/bin-pc/PvAPI.dll
new file mode 100644 (file)
index 0000000..b937774
Binary files /dev/null and b/AVTGigESDK_Win/GigESDK/bin-pc/PvAPI.dll differ
diff --git a/AVTGigESDK_Win/GigESDK/bin-pc/PvJNI.dll b/AVTGigESDK_Win/GigESDK/bin-pc/PvJNI.dll
new file mode 100644 (file)
index 0000000..7a31015
Binary files /dev/null and b/AVTGigESDK_Win/GigESDK/bin-pc/PvJNI.dll differ
diff --git a/AVTGigESDK_Win/GigESDK/bin-pc/PvNET.dll b/AVTGigESDK_Win/GigESDK/bin-pc/PvNET.dll
new file mode 100644 (file)
index 0000000..e487beb
Binary files /dev/null and b/AVTGigESDK_Win/GigESDK/bin-pc/PvNET.dll differ
diff --git a/AVTGigESDK_Win/GigESDK/bin-pc/SampleViewer.exe b/AVTGigESDK_Win/GigESDK/bin-pc/SampleViewer.exe
new file mode 100644 (file)
index 0000000..27929b8
Binary files /dev/null and b/AVTGigESDK_Win/GigESDK/bin-pc/SampleViewer.exe differ
diff --git a/AVTGigESDK_Win/GigESDK/bin-pc/ipconfig.exe b/AVTGigESDK_Win/GigESDK/bin-pc/ipconfig.exe
new file mode 100644 (file)
index 0000000..57bcc49
Binary files /dev/null and b/AVTGigESDK_Win/GigESDK/bin-pc/ipconfig.exe differ
diff --git a/AVTGigESDK_Win/GigESDK/bin-pc/x64/PvAPI.dll b/AVTGigESDK_Win/GigESDK/bin-pc/x64/PvAPI.dll
new file mode 100644 (file)
index 0000000..753c363
Binary files /dev/null and b/AVTGigESDK_Win/GigESDK/bin-pc/x64/PvAPI.dll differ
diff --git a/AVTGigESDK_Win/GigESDK/bin-pc/x64/SampleViewer.exe b/AVTGigESDK_Win/GigESDK/bin-pc/x64/SampleViewer.exe
new file mode 100644 (file)
index 0000000..fbc2488
Binary files /dev/null and b/AVTGigESDK_Win/GigESDK/bin-pc/x64/SampleViewer.exe differ
diff --git a/AVTGigESDK_Win/GigESDK/bin-pc/x64/ipconfig.exe b/AVTGigESDK_Win/GigESDK/bin-pc/x64/ipconfig.exe
new file mode 100644 (file)
index 0000000..d70ebae
Binary files /dev/null and b/AVTGigESDK_Win/GigESDK/bin-pc/x64/ipconfig.exe differ
diff --git a/AVTGigESDK_Win/GigESDK/documents/AVT_Camera_and_Driver_Attributes.pdf b/AVTGigESDK_Win/GigESDK/documents/AVT_Camera_and_Driver_Attributes.pdf
new file mode 100644 (file)
index 0000000..2a53037
Binary files /dev/null and b/AVTGigESDK_Win/GigESDK/documents/AVT_Camera_and_Driver_Attributes.pdf differ
diff --git a/AVTGigESDK_Win/GigESDK/documents/AVT_PvAPI_Manual.pdf b/AVTGigESDK_Win/GigESDK/documents/AVT_PvAPI_Manual.pdf
new file mode 100644 (file)
index 0000000..3d87924
Binary files /dev/null and b/AVTGigESDK_Win/GigESDK/documents/AVT_PvAPI_Manual.pdf differ
diff --git a/AVTGigESDK_Win/GigESDK/documents/PvAPI_Release_Notes.pdf b/AVTGigESDK_Win/GigESDK/documents/PvAPI_Release_Notes.pdf
new file mode 100644 (file)
index 0000000..6fd71a6
Binary files /dev/null and b/AVTGigESDK_Win/GigESDK/documents/PvAPI_Release_Notes.pdf differ
diff --git a/AVTGigESDK_Win/GigESDK/examples/AdjustPacket/AdjustPacket.cpp b/AVTGigESDK_Win/GigESDK/examples/AdjustPacket/AdjustPacket.cpp
new file mode 100644 (file)
index 0000000..7d308f2
--- /dev/null
@@ -0,0 +1,137 @@
+/*\r
+| ==============================================================================\r
+| Copyright (C) 2006-2011 Allied Vision Technologies.  All Rights Reserved.\r
+|\r
+| This code may be used in part, or in whole for your application development.\r
+|\r
+|==============================================================================\r
+|\r
+| AdjustPacket\r
+|\r
+| Opens camera by IP address. Calls PvCaptureAdjustPacketSize -- recommended for\r
+| minimizing dropped packets. This call sets camera PacketSize to largest sized\r
+| test packet, up to MAXSIZE, that doesn't fail on network card. See AVT GigE \r
+| Installation Guide for optimizing network hardware.\r
+|\r
+| NOTE: Some MS VISTA network card drivers become unresponsive if test packet fails.\r
+|       Use PvUint32Set(handle, "PacketSize", MaxAllowablePacketSize) instead. \r
+|       See network card properties for max allowable PacketSize/MTU/JumboFrameSize.\r
+|                                      \r
+|              e.g. usage: AdjustPacket 169.254.24.25\r
+|\r
+| Camera IP address can be found with ListCameras example code, \r
+| or DeviceIPAddress attribute in SampleViewer.\r
+|\r
+|==============================================================================\r
+|\r
+| THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED\r
+| WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF TITLE,\r
+| NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR  PURPOSE ARE\r
+| DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,\r
+| INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\r
+| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\r
+| OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED  AND ON ANY THEORY OF\r
+| LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+| NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
+| EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+|\r
+|==============================================================================\r
+*/\r
+\r
+#ifdef _WINDOWS\r
+#include "StdAfx.h"\r
+#endif\r
+\r
+#include <stdio.h>\r
+#include <stdlib.h>\r
+#include <string.h>\r
+\r
+#ifdef _WINDOWS\r
+#define WIN32_LEAN_AND_MEAN\r
+#include <Windows.h>\r
+#include <Winsock2.h>\r
+#endif\r
+\r
+#if defined(_LINUX) || defined(_QNX) || defined(_OSX)\r
+#include <unistd.h>\r
+#include <time.h>\r
+#include <arpa/inet.h>\r
+#endif\r
+\r
+#include <PvApi.h>\r
+\r
+#ifndef _WINDOWS\r
+#define TRUE 0\r
+#endif\r
+\r
+#define MAXSIZE 16000\r
+\r
+int main(int argc, char* argv[])\r
+{\r
+       tPvErr errCode;\r
+\r
+       // initialize the PvAPI\r
+       if((errCode = PvInitialize()) != ePvErrSuccess)\r
+    { \r
+               printf("PvInitialize err: %u\n", errCode);\r
+       }\r
+       else\r
+    { \r
+        // the only command line argument accepted is the IP@ of the camera to be open\r
+        if(argc>1)\r
+        {\r
+            unsigned long IP = inet_addr(argv[1]);\r
+             \r
+            if((IP == INADDR_NONE) || (IP == INADDR_ANY))\r
+                       {\r
+                               printf("A valid IP address must be entered\n");\r
+                       }\r
+                       else\r
+            {           \r
+                tPvHandle Handle; \r
+                \r
+                // open the camera\r
+                if((errCode = PvCameraOpenByAddr(IP,ePvAccessMaster,&Handle)) == ePvErrSuccess)\r
+                {\r
+                                       \r
+       \r
+                                       // NOTE: This call sets camera PacketSize to largest sized test packet, up to MaxSize, that doesn't fail\r
+                                       // on network card. Some MS VISTA network card drivers become unresponsive if test packet fails. \r
+                                       // Use PvUint32Set(handle, "PacketSize", MaxAllowablePacketSize) instead. See network card properties\r
+                                       // for max allowable PacketSize/MTU/JumboFrameSize. \r
+                                       if((errCode = PvCaptureAdjustPacketSize(Handle,MAXSIZE)) != ePvErrSuccess)\r
+                                       {\r
+                                               printf("PvCaptureAdjustPacketSize err: %u\n", errCode);\r
+                                       }\r
+                                       else\r
+                                       {\r
+                                               unsigned long Size;\r
+\r
+                                               if((errCode = PvAttrUint32Get(Handle,"PacketSize",&Size)) != ePvErrSuccess)  \r
+                                                       printf("Attribute get error: %u\n", errCode);\r
+                                               else\r
+                                                       printf("Packet size set to %lu bytes\n",Size);\r
+                                       }\r
+\r
+                                       \r
+                                       // close the camera\r
+                    PvCameraClose(Handle);\r
+\r
+\r
+                }\r
+                else if (errCode == ePvErrAccessDenied)\r
+                                       printf("PvCameraOpenByAddr: ePvErrAccessDenied:\nCamera already open, or camera wasn't properly closed and waiting to HeartbeatTimeout.");\r
+                               else\r
+                                       printf("PvCameraOpenByAddr err: %u\n", errCode);\r
+                       }\r
+                       \r
+        }\r
+        else\r
+            printf("usage : AdjustPacket <IP@>\n");\r
+\r
+        // uninitialise the API\r
+        PvUnInitialize();\r
+    }\r
+\r
+       return 0;\r
+}\r
diff --git a/AVTGigESDK_Win/GigESDK/examples/AdjustPacket/AdjustPacket.sln b/AVTGigESDK_Win/GigESDK/examples/AdjustPacket/AdjustPacket.sln
new file mode 100644 (file)
index 0000000..62bb575
--- /dev/null
@@ -0,0 +1,20 @@
+\r
+Microsoft Visual Studio Solution File, Format Version 9.00\r
+# Visual Studio 2005\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AdjustPacket", "AdjustPacket.vcproj", "{024724E5-05D2-442F-B744-A58CE176B5F3}"\r
+EndProject\r
+Global\r
+       GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
+               Debug|Win32 = Debug|Win32\r
+               Release|Win32 = Release|Win32\r
+       EndGlobalSection\r
+       GlobalSection(ProjectConfigurationPlatforms) = postSolution\r
+               {024724E5-05D2-442F-B744-A58CE176B5F3}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {024724E5-05D2-442F-B744-A58CE176B5F3}.Debug|Win32.Build.0 = Debug|Win32\r
+               {024724E5-05D2-442F-B744-A58CE176B5F3}.Release|Win32.ActiveCfg = Release|Win32\r
+               {024724E5-05D2-442F-B744-A58CE176B5F3}.Release|Win32.Build.0 = Release|Win32\r
+       EndGlobalSection\r
+       GlobalSection(SolutionProperties) = preSolution\r
+               HideSolutionNode = FALSE\r
+       EndGlobalSection\r
+EndGlobal\r
diff --git a/AVTGigESDK_Win/GigESDK/examples/AdjustPacket/AdjustPacket.vcproj b/AVTGigESDK_Win/GigESDK/examples/AdjustPacket/AdjustPacket.vcproj
new file mode 100644 (file)
index 0000000..e737c8a
--- /dev/null
@@ -0,0 +1,277 @@
+<?xml version="1.0" encoding="Windows-1252"?>\r
+<VisualStudioProject\r
+       ProjectType="Visual C++"\r
+       Version="8.00"\r
+       Name="AdjustPacket"\r
+       ProjectGUID="{024724E5-05D2-442F-B744-A58CE176B5F3}"\r
+       >\r
+       <Platforms>\r
+               <Platform\r
+                       Name="Win32"\r
+               />\r
+       </Platforms>\r
+       <ToolFiles>\r
+       </ToolFiles>\r
+       <Configurations>\r
+               <Configuration\r
+                       Name="Debug|Win32"\r
+                       OutputDirectory=".\Debug"\r
+                       IntermediateDirectory=".\Debug"\r
+                       ConfigurationType="1"\r
+                       InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       CharacterSet="2"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TypeLibraryName=".\Debug/AdjustPacket.tlb"\r
+                               HeaderFileName=""\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="0"\r
+                               AdditionalIncludeDirectories="../../inc-pc"\r
+                               PreprocessorDefinitions="_DEBUG;WIN32;_CONSOLE;_WINDOWS"\r
+                               MinimalRebuild="true"\r
+                               BasicRuntimeChecks="3"\r
+                               RuntimeLibrary="1"\r
+                               PrecompiledHeaderFile=".\Debug/AdjustPacket.pch"\r
+                               AssemblerListingLocation=".\Debug/"\r
+                               ObjectFile=".\Debug/"\r
+                               ProgramDataBaseFileName=".\Debug/"\r
+                               WarningLevel="3"\r
+                               WarnAsError="true"\r
+                               SuppressStartupBanner="true"\r
+                               DebugInformationFormat="4"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="_DEBUG"\r
+                               Culture="1033"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="pvapi.lib ws2_32.lib"\r
+                               OutputFile="../../bin-pc/AdjustPacket.exe"\r
+                               LinkIncremental="2"\r
+                               SuppressStartupBanner="true"\r
+                               AdditionalLibraryDirectories="../../lib-pc"\r
+                               GenerateDebugInformation="true"\r
+                               ProgramDatabaseFile=".\Debug/AdjustPacket.pdb"\r
+                               SubSystem="1"\r
+                               TargetMachine="1"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                               SuppressStartupBanner="true"\r
+                               OutputFile=".\Debug/AdjustPacket.bsc"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebDeploymentTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|Win32"\r
+                       OutputDirectory=".\Release"\r
+                       IntermediateDirectory=".\Release"\r
+                       ConfigurationType="1"\r
+                       InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       CharacterSet="2"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TypeLibraryName=".\Release/AdjustPacket.tlb"\r
+                               HeaderFileName=""\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="2"\r
+                               InlineFunctionExpansion="1"\r
+                               AdditionalIncludeDirectories="../../inc-pc"\r
+                               PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;_WINDOWS"\r
+                               StringPooling="true"\r
+                               RuntimeLibrary="0"\r
+                               EnableFunctionLevelLinking="true"\r
+                               PrecompiledHeaderFile=".\Release/AdjustPacket.pch"\r
+                               AssemblerListingLocation=".\Release/"\r
+                               ObjectFile=".\Release/"\r
+                               ProgramDataBaseFileName=".\Release/"\r
+                               WarningLevel="3"\r
+                               WarnAsError="true"\r
+                               SuppressStartupBanner="true"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="NDEBUG"\r
+                               Culture="1033"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="pvapi.lib ws2_32.lib"\r
+                               OutputFile="../../bin-pc/AdjustPacket.exe"\r
+                               LinkIncremental="1"\r
+                               SuppressStartupBanner="true"\r
+                               AdditionalLibraryDirectories="../../lib-pc"\r
+                               ProgramDatabaseFile=".\Release/AdjustPacket.pdb"\r
+                               SubSystem="1"\r
+                               TargetMachine="1"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                               SuppressStartupBanner="true"\r
+                               OutputFile=".\Release/AdjustPacket.bsc"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebDeploymentTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+       </Configurations>\r
+       <References>\r
+       </References>\r
+       <Files>\r
+               <Filter\r
+                       Name="Source Files"\r
+                       Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"\r
+                       >\r
+                       <File\r
+                               RelativePath="AdjustPacket.cpp"\r
+                               >\r
+                               <FileConfiguration\r
+                                       Name="Debug|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories=""\r
+                                               PreprocessorDefinitions=""\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Release|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories=""\r
+                                               PreprocessorDefinitions=""\r
+                                       />\r
+                               </FileConfiguration>\r
+                       </File>\r
+                       <File\r
+                               RelativePath="StdAfx.cpp"\r
+                               >\r
+                               <FileConfiguration\r
+                                       Name="Debug|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories=""\r
+                                               PreprocessorDefinitions=""\r
+                                               UsePrecompiledHeader="1"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Release|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories=""\r
+                                               PreprocessorDefinitions=""\r
+                                               UsePrecompiledHeader="1"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                       />\r
+                               </FileConfiguration>\r
+                       </File>\r
+               </Filter>\r
+               <Filter\r
+                       Name="Header Files"\r
+                       Filter="h;hpp;hxx;hm;inl"\r
+                       >\r
+                       <File\r
+                               RelativePath="StdAfx.h"\r
+                               >\r
+                       </File>\r
+               </Filter>\r
+               <Filter\r
+                       Name="Resource Files"\r
+                       Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"\r
+                       >\r
+               </Filter>\r
+       </Files>\r
+       <Globals>\r
+       </Globals>\r
+</VisualStudioProject>\r
diff --git a/AVTGigESDK_Win/GigESDK/examples/AdjustPacket/StdAfx.cpp b/AVTGigESDK_Win/GigESDK/examples/AdjustPacket/StdAfx.cpp
new file mode 100644 (file)
index 0000000..e8b69e2
--- /dev/null
@@ -0,0 +1,8 @@
+// stdafx.cpp : source file that includes just the standard includes\r
+//     Stream.pch will be the pre-compiled header\r
+//     stdafx.obj will contain the pre-compiled type information\r
+\r
+#include "stdafx.h"\r
+\r
+// TODO: reference any additional headers you need in STDAFX.H\r
+// and not in this file\r
diff --git a/AVTGigESDK_Win/GigESDK/examples/AdjustPacket/StdAfx.h b/AVTGigESDK_Win/GigESDK/examples/AdjustPacket/StdAfx.h
new file mode 100644 (file)
index 0000000..75d9e7c
--- /dev/null
@@ -0,0 +1,13 @@
+// stdafx.h : include file for standard system include files,\r
+//  or project specific include files that are used frequently, but\r
+//      are changed infrequently\r
+//\r
+\r
+#if !defined(AFX_STDAFX_H__224EC810_0DF9_4A31_A149_E69197045CE8__INCLUDED_)\r
+#define AFX_STDAFX_H__224EC810_0DF9_4A31_A149_E69197045CE8__INCLUDED_\r
+\r
+#if _MSC_VER > 1000\r
+#pragma once\r
+#endif // _MSC_VER > 1000\r
+\r
+#endif // !defined(AFX_STDAFX_H__224EC810_0DF9_4A31_A149_E69197045CE8__INCLUDED_)\r
diff --git a/AVTGigESDK_Win/GigESDK/examples/BatchStream/BatchStream.cpp b/AVTGigESDK_Win/GigESDK/examples/BatchStream/BatchStream.cpp
new file mode 100644 (file)
index 0000000..f682137
--- /dev/null
@@ -0,0 +1,427 @@
+/*\r
+| ==============================================================================\r
+| Copyright (C) 2006-2011 Allied Vision Technologies.  All Rights Reserved.\r
+|\r
+| This code may be used in part, or in whole for your application development.\r
+|\r
+|==============================================================================\r
+|\r
+| BatchStream\r
+|\r
+| This example shows how to manage FRAMESCOUNT number of frames, which\r
+| may be larger than the QUEUELIMIT frame limit. \r
+|\r
+| QUEUELIMIT limit on PvAPI < 1.26 is 100. No QUEUELIMIT for PvAPI >= 1.26.\r
+|\r
+| -Opens the first camera found. \r
+| -Sets camera to freerun continuous mode. \r
+| -Queues QUEUELIMIT or FRAMESCOUNT frames, whichever is less. \r
+| -Frames queued with callbacks. Callbacks function returns Frame.Status.\r
+| -Main thread call PvCaptureWaitForFrameDone on the 2nd last queued frame.\r
+|   When returned, queue the next QUEUELIMIT frames (or portion thereof).\r
+| -Ctrl+C to abort.\r
+\r
+|==============================================================================\r
+|\r
+| THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED\r
+| WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF TITLE,\r
+| NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR  PURPOSE ARE\r
+| DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,\r
+| INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\r
+| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\r
+| OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED  AND ON ANY THEORY OF\r
+| LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+| NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
+| EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+|\r
+|==============================================================================\r
+*/\r
+\r
+#ifdef _WINDOWS\r
+#include "StdAfx.h"\r
+#endif\r
+\r
+#include <stdio.h>\r
+#include <stdlib.h>\r
+#include <string.h>\r
+\r
+#ifdef _WINDOWS\r
+#define WIN32_LEAN_AND_MEAN\r
+#include <Windows.h>\r
+#endif\r
+\r
+#if defined(_LINUX) || defined(_QNX) || defined(_OSX)\r
+#include <unistd.h>\r
+#include <time.h>\r
+#include <signal.h>\r
+#endif\r
+\r
+#include <PvApi.h>\r
+\r
+#ifdef _WINDOWS\r
+#define _STDCALL __stdcall\r
+#else\r
+#define _STDCALL\r
+#define TRUE     0\r
+#endif\r
+\r
+#define FRAMESCOUNT 490\r
+#define QUEUELIMIT 99\r
+\r
+typedef struct \r
+{\r
+    unsigned long   UID;\r
+    tPvHandle       Handle;\r
+    tPvFrame        Frames[FRAMESCOUNT];\r
+       bool            Abort;\r
+        \r
+} tCamera;\r
+\r
+// global camera data\r
+tCamera GCamera;\r
+\r
+#if defined(_LINUX) || defined(_QNX) || defined(_OSX)\r
+void Sleep(unsigned int time)\r
+{\r
+    struct timespec t,r;\r
+    \r
+    t.tv_sec    = time / 1000;\r
+    t.tv_nsec   = (time % 1000) * 1000000;    \r
+    \r
+    while(nanosleep(&t,&r)==-1)\r
+        t = r;\r
+}\r
+\r
+//Define function equivalent to Windows SetConsoleCtrlHandler \r
+void SetConsoleCtrlHandler(void (*func)(int), int junk)\r
+{\r
+    signal(SIGINT, func);\r
+}\r
+#endif\r
+\r
+// wait for a camera to be plugged in\r
+void WaitForCamera()\r
+{\r
+    printf("Waiting for a camera");\r
+    while((PvCameraCount() == 0) && !GCamera.Abort)\r
+       {\r
+               printf(".");\r
+               Sleep(250);\r
+       }\r
+    printf("\n");\r
+}\r
+\r
+// CTRL+C handler\r
+#ifdef _WINDOWS\r
+BOOL WINAPI CtrlCHandler(DWORD dwCtrlType)\r
+#else\r
+void CtrlCHandler(int Signo)\r
+#endif  \r
+{\r
+    printf("Ctrl+C interrupt received, stopping camera.\n");    \r
+    \r
+       //Set flag to exit WaitForEver\r
+    GCamera.Abort = true;    \r
+        \r
+    #ifndef _WINDOWS\r
+    signal(SIGINT, CtrlCHandler);\r
+    #else\r
+    return true;\r
+    #endif\r
+}\r
+\r
+// Frame completed callback executes on seperate driver thread.\r
+// One callback thread per camera. If a frame callback function has not \r
+// completed, and the next frame returns, the next frame's callback function is queued. \r
+// This situation is best avoided (camera running faster than host can process frames). \r
+// Spend as little time in this thread as possible and offload processing\r
+// to other threads or save processing until later.\r
+//\r
+// Note: If a camera is unplugged, this callback will not get called until PvCaptureQueueClear.\r
+// i.e. callback with pFrame->Status = ePvErrUnplugged doesn't happen -- so don't rely\r
+// on this as a test for a missing camera. \r
+void _STDCALL FrameDoneCB(tPvFrame* pFrame)\r
+{\r
+       //report if any errors in returned frames\r
+       switch (pFrame->Status) {\r
+               case ePvErrSuccess:\r
+                       break;\r
+               case ePvErrDataMissing:\r
+                       //Possible improper network card settings. See GigE Installation Guide.\r
+                       printf("FrameCallback [%u]: Dropped packets.   \n", pFrame->FrameCount);\r
+                       break;\r
+               case ePvErrResources:\r
+                       printf("FrameCallback [%u]: Out of host memory!\n", pFrame->FrameCount);\r
+                       break;\r
+               case ePvErrCancelled:\r
+                       printf("FrameCallback [%u]: Frame cancelled.   \n", pFrame->FrameCount);\r
+                       break;\r
+               case ePvErrInternalFault:\r
+                       printf("FrameCallback [%u]: Internal fault. PvAPI.dll 1.24 w > 100 frames queued?\n", pFrame->FrameCount);\r
+                       break;\r
+               default:\r
+                       printf("FrameCallback [%u]: Error: %u          \n", pFrame->FrameCount, pFrame->Status);\r
+                       break;\r
+       }\r
+\r
+       //NOTE: No frame requeuing here. Done in main thread after PvCaptureWaitForFrameDone\r
+}\r
+\r
+// get the first camera found\r
+// return value: true == success, false == fail\r
+bool CameraGet()\r
+{\r
+    tPvUint32 count,connected;\r
+    tPvCameraInfoEx list;\r
+\r
+    //regardless if connected > 1, we only set UID of first camera in list\r
+       count = PvCameraListEx(&list,1,&connected, sizeof(tPvCameraInfoEx));\r
+    if(count == 1)\r
+    {\r
+        GCamera.UID = list.UniqueId;\r
+        printf("Got camera %s\n",list.SerialNumber);\r
+        return true;\r
+    }\r
+    else\r
+       {\r
+               printf("CameraGet: Failed to find a camera\n");\r
+               return false;\r
+       }\r
+}\r
+\r
+// open camera, allocate memory\r
+// return value: true == success, false == fail\r
+bool CameraSetup()\r
+{\r
+    tPvErr errCode;\r
+       bool failed = false;\r
+       unsigned long FrameSize = 0;\r
+\r
+       //open camera\r
+       if ((errCode = PvCameraOpen(GCamera.UID,ePvAccessMaster,&(GCamera.Handle))) != ePvErrSuccess)\r
+       {\r
+               if (errCode == ePvErrAccessDenied)\r
+                       printf("PvCameraOpen returned ePvErrAccessDenied:\nCamera already open as Master, or camera wasn't properly closed and still waiting to HeartbeatTimeout.");\r
+               else\r
+                       printf("PvCameraOpen err: %u\n", errCode);\r
+               return false;\r
+       }\r
+\r
+       // Allocating FRAMESCOUNT number of full sized images can be a LOT of memory!\r
+       // I.e. more than your host has. Set camera image size to 100 x 100 (or less)\r
+       if((PvAttrUint32Set(GCamera.Handle,"Width",100) != ePvErrSuccess) ||\r
+               (PvAttrUint32Set(GCamera.Handle,"Height",100) != ePvErrSuccess))\r
+       {               \r
+               printf("Failed to set camera width x height\n");\r
+               return false;\r
+       }       \r
+\r
+       // Calculate frame buffer size\r
+    if((errCode = PvAttrUint32Get(GCamera.Handle,"TotalBytesPerFrame",&FrameSize)) != ePvErrSuccess)\r
+       {\r
+               printf("CameraSetup: Get TotalBytesPerFrame err: %u\n", errCode);\r
+               return false;\r
+       }\r
+\r
+       // allocate the frame buffers\r
+    printf("Allocating memory...\n");\r
+       for(int i=0;i<FRAMESCOUNT && !failed;i++)\r
+    {\r
+        GCamera.Frames[i].ImageBuffer = new char[FrameSize];\r
+        if(GCamera.Frames[i].ImageBuffer)\r
+        {\r
+                       GCamera.Frames[i].ImageBufferSize = FrameSize;\r
+               }\r
+        else\r
+               {\r
+                       printf("Failed to allocate buffers.\n");\r
+                       failed = true;\r
+               }\r
+    }\r
+\r
+       if (!failed)\r
+               printf("memory allocated\n");\r
+\r
+       return !failed;\r
+}\r
+\r
+// close camera, free memory.\r
+void CameraUnsetup()\r
+{\r
+    tPvErr errCode;\r
+       \r
+    if((errCode = PvCameraClose(GCamera.Handle)) != ePvErrSuccess)\r
+       {\r
+               printf("CameraUnSetup: PvCameraClose err: %u\n", errCode);\r
+       }\r
+       else\r
+       {\r
+               printf("Camera closed.\n");\r
+       }\r
+       // delete image buffers\r
+    for(int i=0;i<FRAMESCOUNT;i++)\r
+        delete [] (char*)GCamera.Frames[i].ImageBuffer;\r
+\r
+    GCamera.Handle = NULL;\r
+}\r
+\r
+// setup and start streaming\r
+// return value: true == success, false == fail\r
+bool CameraStart()\r
+{\r
+    int i = 0;\r
+    int j = 0;\r
+       tPvErr errCode;\r
+       bool failed = false;\r
+\r
+    // NOTE: This call sets camera PacketSize to largest sized test packet, up to 8228, that doesn't fail\r
+       // on network card. Some MS VISTA network card drivers become unresponsive if test packet fails. \r
+       // Use PvUint32Set(handle, "PacketSize", MaxAllowablePacketSize) instead. See network card properties\r
+       // for max allowable PacketSize/MTU/JumboFrameSize. \r
+       if((errCode = PvCaptureAdjustPacketSize(GCamera.Handle,8228)) != ePvErrSuccess)\r
+       {\r
+               printf("CameraStart: PvCaptureAdjustPacketSize err: %u\n", errCode);\r
+               return false;\r
+       }\r
+\r
+    // start driver capture stream \r
+       if((errCode = PvCaptureStart(GCamera.Handle)) != ePvErrSuccess)\r
+       {\r
+               printf("CameraStart: PvCaptureStart err: %u\n", errCode);\r
+               return false;\r
+       }\r
+\r
+       // set the camera in freerun trigger, continuous mode, and start camera receiving triggers\r
+       if((PvAttrEnumSet(GCamera.Handle,"FrameStartTriggerMode","Freerun") != ePvErrSuccess) ||\r
+               (PvAttrEnumSet(GCamera.Handle,"AcquisitionMode","Continuous") != ePvErrSuccess) ||\r
+               (PvCommandRun(GCamera.Handle,"AcquisitionStart") != ePvErrSuccess))\r
+       {               \r
+               printf("CameraStart: failed to set camera attributes\n");\r
+               return false;\r
+       }       \r
+\r
+    // loop until failure or we have acquired all FRAMESCOUNT frames\r
+       while(j<FRAMESCOUNT && !failed  && !GCamera.Abort)\r
+    {\r
+        int last;\r
+                       \r
+               if ((j + QUEUELIMIT) < FRAMESCOUNT)\r
+                       last = j+QUEUELIMIT - 1;\r
+               else\r
+                       last = FRAMESCOUNT - 1;\r
+               \r
+               printf("Queueing frames [%u - %u]\n", j, last);\r
+               \r
+               // enqueue QUEUELIMIT frames at a time.\r
+        for(i=0;i<QUEUELIMIT && j<FRAMESCOUNT && !failed;i++,j++)\r
+               {       \r
+                       if((errCode = PvCaptureQueueFrame(GCamera.Handle,&(GCamera.Frames[j]),FrameDoneCB)) != ePvErrSuccess)\r
+                       {\r
+                               printf("CameraStart: PvCaptureQueueFrame err: %u\n", errCode);\r
+                               failed = true;\r
+                       }\r
+               }\r
+\r
+        //Wait for the 2nd last enqueued frame to return to host before queuing the next batch\r
+               //Always leave at least one frame on queue when requeuing, otherwise camera could return image \r
+               //with no frame queued, resulting in a dropped image.\r
+               if (!failed)\r
+               {\r
+                       printf("Waiting for frame [%u]", j-2);\r
+                       while((errCode = PvCaptureWaitForFrameDone(GCamera.Handle,&(GCamera.Frames[j-2]),2000)) == ePvErrTimeout)\r
+                               printf(".");\r
+                       printf("\n");\r
+               }\r
+\r
+               if(errCode == ePvErrSuccess)\r
+        { \r
+                       printf("Frame [%u] returned.\n", j-2);\r
+               }\r
+               else\r
+               {\r
+                       //likely camera unplugged\r
+                       printf("PvCaptureWaitForFrameDone err: %u\n", errCode);\r
+                       failed = true;\r
+               }                       \r
+    }\r
+       return !failed;\r
+}\r
+\r
+\r
+// stop streaming\r
+void CameraStop()\r
+{\r
+    tPvErr errCode;\r
+       \r
+       //stop camera receiving triggers\r
+       if ((errCode = PvCommandRun(GCamera.Handle,"AcquisitionStop")) != ePvErrSuccess)\r
+               printf("AcquisitionStop command err: %u\n", errCode);\r
+       else\r
+               printf("AcquisitionStop success.\n");\r
+    \r
+       //PvCaptureQueueClear aborts any actively written frame with Frame.Status = ePvErrDataMissing\r
+       //Further queued frames returned with Frame.Status = ePvErrCancelled\r
+       \r
+       //Add delay between AcquisitionStop and PvCaptureQueueClear\r
+       //to give actively written frame time to complete\r
+       Sleep(200);\r
+       \r
+       printf("Calling PvCaptureQueueClear...\n");\r
+       if ((errCode = PvCaptureQueueClear(GCamera.Handle)) != ePvErrSuccess)\r
+               printf("PvCaptureQueueClear err: %u\n", errCode);\r
+       else\r
+               printf("...Queue cleared.\n");  \r
+\r
+       //stop driver stream\r
+       if ((errCode = PvCaptureEnd(GCamera.Handle)) != ePvErrSuccess)\r
+               printf("PvCaptureEnd err: %u\n", errCode);\r
+       else\r
+               printf("Driver stream stopped.\n");\r
+}\r
+\r
+\r
+int main(int argc, char* argv[])\r
+{\r
+    tPvErr errCode;\r
+       \r
+       // initialize the PvAPI\r
+       if((errCode = PvInitialize()) != ePvErrSuccess)\r
+    { \r
+               printf("PvInitialize err: %u\n", errCode);\r
+       }\r
+       else\r
+       {\r
+        //IMPORTANT: Initialize camera structure. See tPvFrame in PvApi.h for more info.\r
+               memset(&GCamera,0,sizeof(tCamera));\r
+\r
+        //Set function to handle ctrl+C\r
+               SetConsoleCtrlHandler(CtrlCHandler, TRUE);\r
+               \r
+               printf("Press CTRL-C to terminate\n");\r
+               \r
+               // wait for a camera to be plugged in\r
+        WaitForCamera();\r
+\r
+        // grab a camera from the list\r
+        if(CameraGet() && !GCamera.Abort)\r
+        {\r
+            // open camera\r
+            if(CameraSetup())\r
+            {\r
+                // capture FRAMESCOUNT num frames\r
+                CameraStart();\r
+                               // stop streaming\r
+                CameraStop();\r
+                // unsetup the camera\r
+                CameraUnsetup();\r
+            }\r
+        }\r
+        else\r
+            printf("failed to find a camera\n");\r
+       \r
+        // uninitialise the API\r
+        PvUnInitialize();\r
+    }\r
+\r
+       return 0;\r
+}\r
diff --git a/AVTGigESDK_Win/GigESDK/examples/BatchStream/BatchStream.sln b/AVTGigESDK_Win/GigESDK/examples/BatchStream/BatchStream.sln
new file mode 100644 (file)
index 0000000..1bf5e08
--- /dev/null
@@ -0,0 +1,20 @@
+\r
+Microsoft Visual Studio Solution File, Format Version 9.00\r
+# Visual Studio 2005\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BatchStream", "BatchStream.vcproj", "{DDB10431-AA03-4296-94B3-FD24276223E4}"\r
+EndProject\r
+Global\r
+       GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
+               Debug|Win32 = Debug|Win32\r
+               Release|Win32 = Release|Win32\r
+       EndGlobalSection\r
+       GlobalSection(ProjectConfigurationPlatforms) = postSolution\r
+               {DDB10431-AA03-4296-94B3-FD24276223E4}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {DDB10431-AA03-4296-94B3-FD24276223E4}.Debug|Win32.Build.0 = Debug|Win32\r
+               {DDB10431-AA03-4296-94B3-FD24276223E4}.Release|Win32.ActiveCfg = Release|Win32\r
+               {DDB10431-AA03-4296-94B3-FD24276223E4}.Release|Win32.Build.0 = Release|Win32\r
+       EndGlobalSection\r
+       GlobalSection(SolutionProperties) = preSolution\r
+               HideSolutionNode = FALSE\r
+       EndGlobalSection\r
+EndGlobal\r
diff --git a/AVTGigESDK_Win/GigESDK/examples/BatchStream/BatchStream.vcproj b/AVTGigESDK_Win/GigESDK/examples/BatchStream/BatchStream.vcproj
new file mode 100644 (file)
index 0000000..f0661f6
--- /dev/null
@@ -0,0 +1,277 @@
+<?xml version="1.0" encoding="Windows-1252"?>\r
+<VisualStudioProject\r
+       ProjectType="Visual C++"\r
+       Version="8.00"\r
+       Name="BatchStream"\r
+       ProjectGUID="{DDB10431-AA03-4296-94B3-FD24276223E4}"\r
+       >\r
+       <Platforms>\r
+               <Platform\r
+                       Name="Win32"\r
+               />\r
+       </Platforms>\r
+       <ToolFiles>\r
+       </ToolFiles>\r
+       <Configurations>\r
+               <Configuration\r
+                       Name="Release|Win32"\r
+                       OutputDirectory=".\Release"\r
+                       IntermediateDirectory=".\Release"\r
+                       ConfigurationType="1"\r
+                       InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       CharacterSet="2"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TypeLibraryName=".\Release/BatchStream.tlb"\r
+                               HeaderFileName=""\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="2"\r
+                               InlineFunctionExpansion="1"\r
+                               AdditionalIncludeDirectories="../../inc-pc"\r
+                               PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;_WINDOWS"\r
+                               StringPooling="true"\r
+                               RuntimeLibrary="0"\r
+                               EnableFunctionLevelLinking="true"\r
+                               PrecompiledHeaderFile=".\Release/BatchStream.pch"\r
+                               AssemblerListingLocation=".\Release/"\r
+                               ObjectFile=".\Release/"\r
+                               ProgramDataBaseFileName=".\Release/"\r
+                               WarningLevel="3"\r
+                               WarnAsError="true"\r
+                               SuppressStartupBanner="true"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="NDEBUG"\r
+                               Culture="1033"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="pvapi.lib"\r
+                               OutputFile="../../bin-pc/BatchStream.exe"\r
+                               LinkIncremental="1"\r
+                               SuppressStartupBanner="true"\r
+                               AdditionalLibraryDirectories="../../lib-pc"\r
+                               ProgramDatabaseFile=".\Release/BatchStream.pdb"\r
+                               SubSystem="1"\r
+                               TargetMachine="1"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                               SuppressStartupBanner="true"\r
+                               OutputFile=".\Release/BatchStream.bsc"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebDeploymentTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Debug|Win32"\r
+                       OutputDirectory=".\Debug"\r
+                       IntermediateDirectory=".\Debug"\r
+                       ConfigurationType="1"\r
+                       InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       CharacterSet="2"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TypeLibraryName=".\Debug/BatchStream.tlb"\r
+                               HeaderFileName=""\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="0"\r
+                               AdditionalIncludeDirectories="../../inc-pc"\r
+                               PreprocessorDefinitions="_DEBUG;WIN32;_CONSOLE;_WINDOWS"\r
+                               MinimalRebuild="true"\r
+                               BasicRuntimeChecks="3"\r
+                               RuntimeLibrary="1"\r
+                               PrecompiledHeaderFile=".\Debug/BatchStream.pch"\r
+                               AssemblerListingLocation=".\Debug/"\r
+                               ObjectFile=".\Debug/"\r
+                               ProgramDataBaseFileName=".\Debug/"\r
+                               WarningLevel="3"\r
+                               WarnAsError="true"\r
+                               SuppressStartupBanner="true"\r
+                               DebugInformationFormat="4"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="_DEBUG"\r
+                               Culture="1033"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="pvapi.lib"\r
+                               OutputFile="../../bin-pc/BatchStream.exe"\r
+                               LinkIncremental="2"\r
+                               SuppressStartupBanner="true"\r
+                               AdditionalLibraryDirectories="../../lib-pc"\r
+                               GenerateDebugInformation="true"\r
+                               ProgramDatabaseFile=".\Debug/BatchStream.pdb"\r
+                               SubSystem="1"\r
+                               TargetMachine="1"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                               SuppressStartupBanner="true"\r
+                               OutputFile=".\Debug/BatchStream.bsc"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebDeploymentTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+       </Configurations>\r
+       <References>\r
+       </References>\r
+       <Files>\r
+               <Filter\r
+                       Name="Source Files"\r
+                       Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"\r
+                       >\r
+                       <File\r
+                               RelativePath="BatchStream.cpp"\r
+                               >\r
+                               <FileConfiguration\r
+                                       Name="Release|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories=""\r
+                                               PreprocessorDefinitions=""\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Debug|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories=""\r
+                                               PreprocessorDefinitions=""\r
+                                       />\r
+                               </FileConfiguration>\r
+                       </File>\r
+                       <File\r
+                               RelativePath="StdAfx.cpp"\r
+                               >\r
+                               <FileConfiguration\r
+                                       Name="Release|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories=""\r
+                                               PreprocessorDefinitions=""\r
+                                               UsePrecompiledHeader="1"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Debug|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories=""\r
+                                               PreprocessorDefinitions=""\r
+                                               UsePrecompiledHeader="1"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                       />\r
+                               </FileConfiguration>\r
+                       </File>\r
+               </Filter>\r
+               <Filter\r
+                       Name="Header Files"\r
+                       Filter="h;hpp;hxx;hm;inl"\r
+                       >\r
+                       <File\r
+                               RelativePath="StdAfx.h"\r
+                               >\r
+                       </File>\r
+               </Filter>\r
+               <Filter\r
+                       Name="Resource Files"\r
+                       Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"\r
+                       >\r
+               </Filter>\r
+       </Files>\r
+       <Globals>\r
+       </Globals>\r
+</VisualStudioProject>\r
diff --git a/AVTGigESDK_Win/GigESDK/examples/BatchStream/StdAfx.cpp b/AVTGigESDK_Win/GigESDK/examples/BatchStream/StdAfx.cpp
new file mode 100644 (file)
index 0000000..e8b69e2
--- /dev/null
@@ -0,0 +1,8 @@
+// stdafx.cpp : source file that includes just the standard includes\r
+//     Stream.pch will be the pre-compiled header\r
+//     stdafx.obj will contain the pre-compiled type information\r
+\r
+#include "stdafx.h"\r
+\r
+// TODO: reference any additional headers you need in STDAFX.H\r
+// and not in this file\r
diff --git a/AVTGigESDK_Win/GigESDK/examples/BatchStream/StdAfx.h b/AVTGigESDK_Win/GigESDK/examples/BatchStream/StdAfx.h
new file mode 100644 (file)
index 0000000..16311b6
--- /dev/null
@@ -0,0 +1,19 @@
+// stdafx.h : include file for standard system include files,\r
+//  or project specific include files that are used frequently, but\r
+//      are changed infrequently\r
+//\r
+\r
+#if !defined(AFX_STDAFX_H__224EC810_0DF9_4A31_A149_E69197045CE8__INCLUDED_)\r
+#define AFX_STDAFX_H__224EC810_0DF9_4A31_A149_E69197045CE8__INCLUDED_\r
+\r
+#if _MSC_VER > 1000\r
+#pragma once\r
+#endif // _MSC_VER > 1000\r
+\r
+\r
+// TODO: reference additional headers your program requires here\r
+\r
+//{{AFX_INSERT_LOCATION}}\r
+// Microsoft Visual C++ will insert additional declarations immediately before the previous line.\r
+\r
+#endif // !defined(AFX_STDAFX_H__224EC810_0DF9_4A31_A149_E69197045CE8__INCLUDED_)\r
diff --git a/AVTGigESDK_Win/GigESDK/examples/CamMemory/CamMemory.cpp b/AVTGigESDK_Win/GigESDK/examples/CamMemory/CamMemory.cpp
new file mode 100644 (file)
index 0000000..259c3d6
--- /dev/null
@@ -0,0 +1,259 @@
+/*\r
+| ==============================================================================\r
+| Copyright (C) 2006-2011 Allied Vision Technologies.  All Rights Reserved.\r
+|\r
+| This code may be used in part, or in whole for your application development.\r
+|\r
+|==============================================================================\r
+|\r
+| CamMemory\r
+|\r
+| Prosilica series cameras have 512 Bytes of non-volatile memory:\r
+|   MemoryUserDefined (17200h) \r
+|\r
+| This sample code reads and writes to the user-defined memory using register\r
+| access.\r
+| \r
+|     e.g. usage: CamMemory -i 169.254.23.10 -s "factory camera 14"\r
+|     e.g. usage: CamMemory -i 169.254.23.10 -g\r
+|\r
+| Camera IP address can be found with ListCameras example code, \r
+| or DeviceIPAddress attribute in SampleViewer.\r
+|\r
+|==============================================================================\r
+|\r
+| THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED\r
+| WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF TITLE,\r
+| NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR  PURPOSE ARE\r
+| DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,\r
+| INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\r
+| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\r
+| OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED  AND ON ANY THEORY OF\r
+| LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+| NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
+| EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+|\r
+|==============================================================================\r
+*/\r
+\r
+#ifdef _WINDOWS\r
+#include "StdAfx.h"\r
+#endif\r
+\r
+#include <stdio.h>\r
+#include <stdlib.h>\r
+#include <string.h>\r
+#include <ctype.h>\r
+\r
+#ifdef _WINDOWS\r
+#define WIN32_LEAN_AND_MEAN\r
+#include <Windows.h>\r
+#include <Winsock2.h>\r
+#include "XGetopt.h"\r
+#endif\r
+\r
+#ifndef _WINDOWS\r
+#define strncpy_s(dest,len,src,count) strncpy(dest,src,count)\r
+#define sprintf_s(dest,len,format,args...) sprintf(dest,format,args)\r
+#define sscanf_s sscanf\r
+#define strcpy_s(dst,len,src) strcpy(dst,src)\r
+#define _strdup(src) strdup(src)\r
+#define strtok_s(tok,del,ctx) strtok(tok,del)\r
+#endif\r
+\r
+#if defined(_LINUX) || defined(_QNX) || defined(_OSX)\r
+#include <unistd.h>\r
+#include <time.h>\r
+#include <signal.h>\r
+#include <arpa/inet.h>\r
+#include <strings.h>\r
+#endif\r
+\r
+#include <PvApi.h>\r
+#include <PvRegIo.h>  //register access\r
+\r
+#if defined(_LINUX) || defined(_QNX) || defined(_OSX)\r
+// put the calling thread to sleep for a given amount of millisecond\r
+void Sleep(unsigned int time)\r
+{\r
+    struct timespec t,r;\r
+    \r
+    t.tv_sec    = time / 1000;\r
+    t.tv_nsec   = (time % 1000) * 1000000;    \r
+    \r
+    while(nanosleep(&t,&r)==-1)\r
+        t = r;\r
+}\r
+#endif\r
+\r
+// display the usage details\r
+void ShowUsage()\r
+{\r
+    printf("usage: CamMemory -u <camera unique ID>| -i <camera IP> -g|-s [<string>]\n");\r
+    printf("-u\tcamera unique ID\n");\r
+    printf("-i\tcamera IP address\n");\r
+    printf("-g\tget string\n");\r
+    printf("-s\tset string\n");\r
+}\r
+\r
+// Read and print MemoryUserDefined\r
+tPvErr MemRead(tPvHandle aCamera)\r
+{\r
+    tPvErr lErr;\r
+    unsigned char lBuffer[512];\r
+    \r
+    lErr = PvMemoryRead(aCamera,0x17200,512,lBuffer);\r
+    \r
+    if(lErr == ePvErrSuccess)\r
+    {\r
+        printf("value = '%s'\n",lBuffer);\r
+        \r
+        /*print as hex.\r
+               for(int i=0;i<512;i++)\r
+        {\r
+            printf("0x%02X ",lBuffer[i]);\r
+            if(!((i + 1) % 16))\r
+                printf("\n");       \r
+        }*/\r
+        \r
+        printf("\n");\r
+    }\r
+    \r
+    return lErr;   \r
+}\r
+\r
+// Write the given string to MemoryUserDefined\r
+tPvErr MemWrite(tPvHandle aCamera,const char* aString)\r
+{ \r
+    if(strlen(aString) < 512)\r
+    {\r
+        unsigned char lBuffer[512];\r
+        unsigned long Size = 0;\r
+    \r
+        memset(lBuffer,0,512);\r
+    \r
+        strcpy_s((char*)lBuffer, 512, aString);\r
+    \r
+        return PvMemoryWrite(aCamera,0x17200,512,lBuffer,&Size); \r
+    }\r
+    else\r
+       {\r
+               printf("String length > 512\n");\r
+               return ePvErrBadParameter;\r
+       }\r
+}\r
+\r
+\r
+int main(int argc, char* argv[])\r
+{\r
+    tPvErr errCode;\r
+       int err = 0;\r
+\r
+       // initialize the PvAPI\r
+       if((errCode = PvInitialize()) != ePvErrSuccess)\r
+    { \r
+               printf("PvInitialize err: %u\n", errCode);\r
+       }\r
+       else\r
+    {\r
+        int c;\r
+        unsigned long uid = 0;\r
+        unsigned long addr = 0;\r
+        bool bGet = false;\r
+        bool bSet = false;\r
+    \r
+        while ((c = getopt (argc, argv, "u:i:gs:h?")) != -1)\r
+        {\r
+            switch(c)\r
+            {\r
+                case 'u':\r
+                {\r
+                    if(optarg)\r
+                        uid = atol(optarg);\r
+                    \r
+                    break;    \r
+                }\r
+                case 'i':\r
+                {\r
+                    if(optarg)\r
+                        addr = inet_addr(optarg);\r
+                    \r
+                    break;    \r
+                }                \r
+                case 'g':\r
+                {\r
+                    bGet = true;\r
+                    break;\r
+                }\r
+                case 's':\r
+                {\r
+                    bSet = true;\r
+                    break;\r
+                }\r
+                case '?':\r
+                case 'h':\r
+                {\r
+                    ShowUsage();\r
+                    break;    \r
+                }\r
+                default:\r
+                    break;\r
+            }\r
+        }\r
+\r
+               if(uid || ((addr != INADDR_NONE) && (addr != INADDR_ANY)))\r
+        {\r
+            tPvHandle       Camera;\r
+            tPvAccessFlags  Flags = (bSet ? ePvAccessMaster : ePvAccessMonitor);\r
+            \r
+            if(uid)\r
+            {\r
+                // wait a bit to leave some time to the API to detect any camera\r
+                Sleep(500);\r
+                // and open the camera\r
+                errCode = PvCameraOpen(uid,Flags,&Camera);\r
+            }\r
+            else\r
+                errCode = PvCameraOpenByAddr(addr,Flags,&Camera);\r
+                \r
+            if(errCode == ePvErrSuccess)\r
+            {   \r
+                if(bGet) // get value\r
+                    errCode = MemRead(Camera);\r
+                else\r
+                if(bSet) // set value\r
+                    errCode = MemWrite(Camera,argv[argc-1]);          \r
+\r
+                if(errCode != ePvErrSuccess)\r
+                                       fprintf(stderr,"Error: %u\n",errCode);\r
+\r
+                err = 1;\r
+\r
+                // close the camera\r
+                PvCameraClose(Camera);\r
+            }\r
+            else\r
+            {\r
+                if(errCode == ePvErrNotFound || errCode == ePvErrUnplugged)\r
+                    fprintf(stderr,"No camera detected.\n");\r
+                else\r
+                if(errCode == ePvErrAccessDenied)\r
+                    fprintf(stderr,"Camera already in use.\n");\r
+                else\r
+                                       fprintf(stderr,"PvCameraOpen fail: %u\n", errCode);\r
+\r
+                err = 1;    \r
+            }    \r
+        }\r
+        else\r
+        {\r
+            ShowUsage();\r
+            err = 1;  \r
+        }\r
+\r
+        PvUnInitialize();\r
+    }\r
+    \r
+       return err;\r
+}\r
+\r
diff --git a/AVTGigESDK_Win/GigESDK/examples/CamMemory/CamMemory.sln b/AVTGigESDK_Win/GigESDK/examples/CamMemory/CamMemory.sln
new file mode 100644 (file)
index 0000000..7c53eb0
--- /dev/null
@@ -0,0 +1,20 @@
+\r
+Microsoft Visual Studio Solution File, Format Version 9.00\r
+# Visual Studio 2005\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CamMemory", "CamMemory.vcproj", "{757DF83A-43F7-4D0F-B3DF-4A57402B4AA0}"\r
+EndProject\r
+Global\r
+       GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
+               Debug|Win32 = Debug|Win32\r
+               Release|Win32 = Release|Win32\r
+       EndGlobalSection\r
+       GlobalSection(ProjectConfigurationPlatforms) = postSolution\r
+               {757DF83A-43F7-4D0F-B3DF-4A57402B4AA0}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {757DF83A-43F7-4D0F-B3DF-4A57402B4AA0}.Debug|Win32.Build.0 = Debug|Win32\r
+               {757DF83A-43F7-4D0F-B3DF-4A57402B4AA0}.Release|Win32.ActiveCfg = Release|Win32\r
+               {757DF83A-43F7-4D0F-B3DF-4A57402B4AA0}.Release|Win32.Build.0 = Release|Win32\r
+       EndGlobalSection\r
+       GlobalSection(SolutionProperties) = preSolution\r
+               HideSolutionNode = FALSE\r
+       EndGlobalSection\r
+EndGlobal\r
diff --git a/AVTGigESDK_Win/GigESDK/examples/CamMemory/CamMemory.vcproj b/AVTGigESDK_Win/GigESDK/examples/CamMemory/CamMemory.vcproj
new file mode 100644 (file)
index 0000000..78719a5
--- /dev/null
@@ -0,0 +1,304 @@
+<?xml version="1.0" encoding="Windows-1252"?>\r
+<VisualStudioProject\r
+       ProjectType="Visual C++"\r
+       Version="8.00"\r
+       Name="CamMemory"\r
+       ProjectGUID="{757DF83A-43F7-4D0F-B3DF-4A57402B4AA0}"\r
+       >\r
+       <Platforms>\r
+               <Platform\r
+                       Name="Win32"\r
+               />\r
+       </Platforms>\r
+       <ToolFiles>\r
+       </ToolFiles>\r
+       <Configurations>\r
+               <Configuration\r
+                       Name="Debug|Win32"\r
+                       OutputDirectory=".\Debug"\r
+                       IntermediateDirectory=".\Debug"\r
+                       ConfigurationType="1"\r
+                       InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       CharacterSet="2"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TypeLibraryName=".\Debug/CamMemory.tlb"\r
+                               HeaderFileName=""\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="0"\r
+                               AdditionalIncludeDirectories="../../inc-pc"\r
+                               PreprocessorDefinitions="_DEBUG;WIN32;_CONSOLE;_WINDOWS"\r
+                               MinimalRebuild="true"\r
+                               BasicRuntimeChecks="3"\r
+                               RuntimeLibrary="1"\r
+                               PrecompiledHeaderFile=".\Debug/CamMemory.pch"\r
+                               AssemblerListingLocation=".\Debug/"\r
+                               ObjectFile=".\Debug/"\r
+                               ProgramDataBaseFileName=".\Debug/"\r
+                               WarningLevel="3"\r
+                               WarnAsError="true"\r
+                               SuppressStartupBanner="true"\r
+                               DebugInformationFormat="4"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="_DEBUG"\r
+                               Culture="1033"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="pvapi.lib ws2_32.lib"\r
+                               OutputFile="../../bin-pc/CamMemory.exe"\r
+                               LinkIncremental="2"\r
+                               SuppressStartupBanner="true"\r
+                               AdditionalLibraryDirectories="../../lib-pc"\r
+                               GenerateDebugInformation="true"\r
+                               ProgramDatabaseFile=".\Debug/CamMemory.pdb"\r
+                               SubSystem="1"\r
+                               TargetMachine="1"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                               SuppressStartupBanner="true"\r
+                               OutputFile=".\Debug/CamMemory.bsc"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebDeploymentTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|Win32"\r
+                       OutputDirectory=".\Release"\r
+                       IntermediateDirectory=".\Release"\r
+                       ConfigurationType="1"\r
+                       InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       CharacterSet="2"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TypeLibraryName=".\Release/CamMemory.tlb"\r
+                               HeaderFileName=""\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="2"\r
+                               InlineFunctionExpansion="1"\r
+                               AdditionalIncludeDirectories="../../inc-pc"\r
+                               PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;_WINDOWS"\r
+                               StringPooling="true"\r
+                               RuntimeLibrary="0"\r
+                               EnableFunctionLevelLinking="true"\r
+                               PrecompiledHeaderFile=".\Release/CamMemory.pch"\r
+                               AssemblerListingLocation=".\Release/"\r
+                               ObjectFile=".\Release/"\r
+                               ProgramDataBaseFileName=".\Release/"\r
+                               BrowseInformation="1"\r
+                               WarningLevel="3"\r
+                               WarnAsError="false"\r
+                               SuppressStartupBanner="true"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="NDEBUG"\r
+                               Culture="1033"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="pvapi.lib ws2_32.lib"\r
+                               OutputFile="../../bin-pc/CamMemory.exe"\r
+                               LinkIncremental="1"\r
+                               SuppressStartupBanner="true"\r
+                               AdditionalLibraryDirectories="../../lib-pc"\r
+                               ProgramDatabaseFile=".\Release/CamMemory.pdb"\r
+                               SubSystem="1"\r
+                               TargetMachine="1"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                               SuppressStartupBanner="true"\r
+                               OutputFile=".\Release/CamMemory.bsc"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebDeploymentTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+       </Configurations>\r
+       <References>\r
+       </References>\r
+       <Files>\r
+               <Filter\r
+                       Name="Source Files"\r
+                       Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"\r
+                       >\r
+                       <File\r
+                               RelativePath="CamMemory.cpp"\r
+                               >\r
+                               <FileConfiguration\r
+                                       Name="Debug|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories=""\r
+                                               PreprocessorDefinitions=""\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Release|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories=""\r
+                                               PreprocessorDefinitions=""\r
+                                       />\r
+                               </FileConfiguration>\r
+                       </File>\r
+                       <File\r
+                               RelativePath="StdAfx.cpp"\r
+                               >\r
+                               <FileConfiguration\r
+                                       Name="Debug|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories=""\r
+                                               PreprocessorDefinitions=""\r
+                                               UsePrecompiledHeader="1"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Release|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories=""\r
+                                               PreprocessorDefinitions=""\r
+                                               UsePrecompiledHeader="1"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                       />\r
+                               </FileConfiguration>\r
+                       </File>\r
+                       <File\r
+                               RelativePath="XGetopt.cpp"\r
+                               >\r
+                               <FileConfiguration\r
+                                       Name="Debug|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories=""\r
+                                               PreprocessorDefinitions=""\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Release|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories=""\r
+                                               PreprocessorDefinitions=""\r
+                                       />\r
+                               </FileConfiguration>\r
+                       </File>\r
+               </Filter>\r
+               <Filter\r
+                       Name="Header Files"\r
+                       Filter="h;hpp;hxx;hm;inl"\r
+                       >\r
+                       <File\r
+                               RelativePath="StdAfx.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="XGetopt.h"\r
+                               >\r
+                       </File>\r
+               </Filter>\r
+               <Filter\r
+                       Name="Resource Files"\r
+                       Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"\r
+                       >\r
+               </Filter>\r
+       </Files>\r
+       <Globals>\r
+       </Globals>\r
+</VisualStudioProject>\r
diff --git a/AVTGigESDK_Win/GigESDK/examples/CamMemory/StdAfx.cpp b/AVTGigESDK_Win/GigESDK/examples/CamMemory/StdAfx.cpp
new file mode 100644 (file)
index 0000000..e8b69e2
--- /dev/null
@@ -0,0 +1,8 @@
+// stdafx.cpp : source file that includes just the standard includes\r
+//     Stream.pch will be the pre-compiled header\r
+//     stdafx.obj will contain the pre-compiled type information\r
+\r
+#include "stdafx.h"\r
+\r
+// TODO: reference any additional headers you need in STDAFX.H\r
+// and not in this file\r
diff --git a/AVTGigESDK_Win/GigESDK/examples/CamMemory/StdAfx.h b/AVTGigESDK_Win/GigESDK/examples/CamMemory/StdAfx.h
new file mode 100644 (file)
index 0000000..75d9e7c
--- /dev/null
@@ -0,0 +1,13 @@
+// stdafx.h : include file for standard system include files,\r
+//  or project specific include files that are used frequently, but\r
+//      are changed infrequently\r
+//\r
+\r
+#if !defined(AFX_STDAFX_H__224EC810_0DF9_4A31_A149_E69197045CE8__INCLUDED_)\r
+#define AFX_STDAFX_H__224EC810_0DF9_4A31_A149_E69197045CE8__INCLUDED_\r
+\r
+#if _MSC_VER > 1000\r
+#pragma once\r
+#endif // _MSC_VER > 1000\r
+\r
+#endif // !defined(AFX_STDAFX_H__224EC810_0DF9_4A31_A149_E69197045CE8__INCLUDED_)\r
diff --git a/AVTGigESDK_Win/GigESDK/examples/CamMemory/XGetopt.cpp b/AVTGigESDK_Win/GigESDK/examples/CamMemory/XGetopt.cpp
new file mode 100644 (file)
index 0000000..4d1d7e6
--- /dev/null
@@ -0,0 +1,220 @@
+// XGetopt.cpp  Version 1.2\r
+//\r
+// Author:  Hans Dietrich\r
+//          hdietrich2@hotmail.com\r
+//\r
+// Description:\r
+//     XGetopt.cpp implements getopt(), a function to parse command lines.\r
+//\r
+// History\r
+//     Version 1.2 - 2003 May 17\r
+//     - Added Unicode support\r
+//\r
+//     Version 1.1 - 2002 March 10\r
+//     - Added example to XGetopt.cpp module header \r
+//\r
+// This software is released into the public domain.\r
+// You are free to use it in any way you like.\r
+//\r
+// This software is provided "as is" with no expressed\r
+// or implied warranty.  I accept no liability for any\r
+// damage or loss of business that this software may cause.\r
+//\r
+///////////////////////////////////////////////////////////////////////////////\r
+\r
+\r
+///////////////////////////////////////////////////////////////////////////////\r
+// if you are using precompiled headers then include this line:\r
+//#include "stdafx.h"\r
+///////////////////////////////////////////////////////////////////////////////\r
+\r
+\r
+///////////////////////////////////////////////////////////////////////////////\r
+// if you are not using precompiled headers then include these lines:\r
+#include <windows.h>\r
+#include <stdio.h>\r
+#include <string.h>\r
+#include <TCHAR.H>\r
+///////////////////////////////////////////////////////////////////////////////\r
+\r
+\r
+#include "XGetopt.h"\r
+\r
+\r
+///////////////////////////////////////////////////////////////////////////////\r
+//\r
+//  X G e t o p t . c p p\r
+//\r
+//\r
+//  NAME\r
+//       getopt -- parse command line options\r
+//\r
+//  SYNOPSIS\r
+//       int getopt(int argc, char *argv[], char *optstring)\r
+//\r
+//       extern char *optarg;\r
+//       extern int optind;\r
+//\r
+//  DESCRIPTION\r
+//       The getopt() function parses the command line arguments. Its\r
+//       arguments argc and argv are the argument count and array as\r
+//       passed into the application on program invocation.  In the case\r
+//       of Visual C++ programs, argc and argv are available via the\r
+//       variables __argc and __argv (double underscores), respectively.\r
+//       getopt returns the next option letter in argv that matches a\r
+//       letter in optstring.  (Note:  Unicode programs should use\r
+//       __targv instead of __argv.  Also, all character and string\r
+//       literals should be enclosed in _T( ) ).\r
+//\r
+//       optstring is a string of recognized option letters;  if a letter\r
+//       is followed by a colon, the option is expected to have an argument\r
+//       that may or may not be separated from it by white space.  optarg\r
+//       is set to point to the start of the option argument on return from\r
+//       getopt.\r
+//\r
+//       Option letters may be combined, e.g., "-ab" is equivalent to\r
+//       "-a -b".  Option letters are case sensitive.\r
+//\r
+//       getopt places in the external variable optind the argv index\r
+//       of the next argument to be processed.  optind is initialized\r
+//       to 0 before the first call to getopt.\r
+//\r
+//       When all options have been processed (i.e., up to the first\r
+//       non-option argument), getopt returns EOF, optarg will point\r
+//       to the argument, and optind will be set to the argv index of\r
+//       the argument.  If there are no non-option arguments, optarg\r
+//       will be set to NULL.\r
+//\r
+//       The special option "--" may be used to delimit the end of the\r
+//       options;  EOF will be returned, and "--" (and everything after it)\r
+//       will be skipped.\r
+//\r
+//  RETURN VALUE\r
+//       For option letters contained in the string optstring, getopt\r
+//       will return the option letter.  getopt returns a question mark (?)\r
+//       when it encounters an option letter not included in optstring.\r
+//       EOF is returned when processing is finished.\r
+//\r
+//  BUGS\r
+//       1)  Long options are not supported.\r
+//       2)  The GNU double-colon extension is not supported.\r
+//       3)  The environment variable POSIXLY_CORRECT is not supported.\r
+//       4)  The + syntax is not supported.\r
+//       5)  The automatic permutation of arguments is not supported.\r
+//       6)  This implementation of getopt() returns EOF if an error is\r
+//           encountered, instead of -1 as the latest standard requires.\r
+//\r
+//  EXAMPLE\r
+//       BOOL CMyApp::ProcessCommandLine(int argc, char *argv[])\r
+//       {\r
+//           int c;\r
+//\r
+//           while ((c = getopt(argc, argv, _T("aBn:"))) != EOF)\r
+//           {\r
+//               switch (c)\r
+//               {\r
+//                   case _T('a'):\r
+//                       TRACE(_T("option a\n"));\r
+//                       //\r
+//                       // set some flag here\r
+//                       //\r
+//                       break;\r
+//\r
+//                   case _T('B'):\r
+//                       TRACE( _T("option B\n"));\r
+//                       //\r
+//                       // set some other flag here\r
+//                       //\r
+//                       break;\r
+//\r
+//                   case _T('n'):\r
+//                       TRACE(_T("option n: value=%d\n"), atoi(optarg));\r
+//                       //\r
+//                       // do something with value here\r
+//                       //\r
+//                       break;\r
+//\r
+//                   case _T('?'):\r
+//                       TRACE(_T("ERROR: illegal option %s\n"), argv[optind-1]);\r
+//                       return FALSE;\r
+//                       break;\r
+//\r
+//                   default:\r
+//                       TRACE(_T("WARNING: no handler for option %c\n"), c);\r
+//                       return FALSE;\r
+//                       break;\r
+//               }\r
+//           }\r
+//           //\r
+//           // check for non-option args here\r
+//           //\r
+//           return TRUE;\r
+//       }\r
+//\r
+///////////////////////////////////////////////////////////////////////////////\r
+\r
+char   *optarg;                // global argument pointer\r
+int            optind = 0;     // global argv index\r
+\r
+int getopt(int argc, char *argv[], char *optstring)\r
+{\r
+       static char *next = NULL;\r
+       if (optind == 0)\r
+               next = NULL;\r
+\r
+       optarg = NULL;\r
+\r
+       if (next == NULL || *next == _T('\0'))\r
+       {\r
+               if (optind == 0)\r
+                       optind++;\r
+\r
+               if (optind >= argc || argv[optind][0] != _T('-') || argv[optind][1] == _T('\0'))\r
+               {\r
+                       optarg = NULL;\r
+                       if (optind < argc)\r
+                               optarg = argv[optind];\r
+                       return EOF;\r
+               }\r
+\r
+               if (_tcscmp(argv[optind], _T("--")) == 0)\r
+               {\r
+                       optind++;\r
+                       optarg = NULL;\r
+                       if (optind < argc)\r
+                               optarg = argv[optind];\r
+                       return EOF;\r
+               }\r
+\r
+               next = argv[optind];\r
+               next++;         // skip past -\r
+               optind++;\r
+       }\r
+\r
+       char c = *next++;\r
+       char *cp = _tcschr(optstring, c);\r
+\r
+       if (cp == NULL || c == _T(':'))\r
+               return _T('?');\r
+\r
+       cp++;\r
+       if (*cp == _T(':'))\r
+       {\r
+               if (*next != _T('\0'))\r
+               {\r
+                       optarg = next;\r
+                       next = NULL;\r
+               }\r
+               else if (optind < argc)\r
+               {\r
+                       optarg = argv[optind];\r
+                       optind++;\r
+               }\r
+               else\r
+               {\r
+                       return _T('?');\r
+               }\r
+       }\r
+\r
+       return c;\r
+}\r
diff --git a/AVTGigESDK_Win/GigESDK/examples/CamMemory/XGetopt.h b/AVTGigESDK_Win/GigESDK/examples/CamMemory/XGetopt.h
new file mode 100644 (file)
index 0000000..d684a76
--- /dev/null
@@ -0,0 +1,23 @@
+// XGetopt.h  Version 1.2\r
+//\r
+// Author:  Hans Dietrich\r
+//          hdietrich2@hotmail.com\r
+//\r
+// This software is released into the public domain.\r
+// You are free to use it in any way you like.\r
+//\r
+// This software is provided "as is" with no expressed\r
+// or implied warranty.  I accept no liability for any\r
+// damage or loss of business that this software may cause.\r
+//\r
+///////////////////////////////////////////////////////////////////////////////\r
+\r
+#ifndef XGETOPT_H\r
+#define XGETOPT_H\r
+\r
+extern int optind, opterr;\r
+extern char *optarg;\r
+\r
+int getopt(int argc, char *argv[], char *optstring);\r
+\r
+#endif //XGETOPT_H\r
diff --git a/AVTGigESDK_Win/GigESDK/examples/CamSetup/CamSetup.cpp b/AVTGigESDK_Win/GigESDK/examples/CamSetup/CamSetup.cpp
new file mode 100644 (file)
index 0000000..3ce536d
--- /dev/null
@@ -0,0 +1,483 @@
+/*\r
+| ==============================================================================\r
+| Copyright (C) 2011 Allied Vision Technologies.  All Rights Reserved.\r
+|\r
+| Redistribution of this header file, in original or modified form, without\r
+| prior written consent of AVT is prohibited.\r
+|\r
+|==============================================================================\r
+|\r
+| CamSetup\r
+|\r
+| Demonstrates how to save or load the camera and driver settings from/to a text\r
+| file. Uses PvAttrList function to return all camera and driver attributes.\r
+|\r
+|       e.g. usage:  CamSetup -i 169.254.1.1 -s mysettings.txt\r
+|\r
+| Camera IP address can be found with ListCameras example code, \r
+| or DeviceIPAddress attribute in SampleViewer.\r
+|\r
+| NOTE: See "AVT Camera and Driver Attributes" document for distinguishing between\r
+| camera settings and driver settings. Camera settings remain active\r
+| as long as the camera is powered on. Driver settings remain active only\r
+| for the duration of PvCameraOpen. Once PvCameraClose, driver settings are lost.\r
+|\r
+| Camera settings can also be saved and loaded from a camera's non-volatile \r
+| ConfigFile memory.\r
+| \r
+|==============================================================================\r
+|\r
+| THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED\r
+| WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF TITLE,\r
+| NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR  PURPOSE ARE\r
+| DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,\r
+| INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\r
+| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\r
+| OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED  AND ON ANY THEORY OF\r
+| LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+| NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
+| EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+|\r
+|==============================================================================\r
+*/\r
+\r
+#ifdef _WINDOWS\r
+#include "StdAfx.h"\r
+#endif\r
+\r
+#include <stdio.h>\r
+#include <stdlib.h>\r
+#include <string.h>\r
+#include <ctype.h>\r
+\r
+#ifdef _WINDOWS\r
+#define WIN32_LEAN_AND_MEAN\r
+#include <Windows.h>\r
+#include <Winsock2.h>\r
+#include "XGetopt.h"\r
+#endif\r
+\r
+#ifndef _WINDOWS\r
+#define strncpy_s(dest,len,src,count) strncpy(dest,src,count)\r
+#define sprintf_s(dest,len,format,args...) sprintf(dest,format,args)\r
+#define sscanf_s sscanf\r
+#define strcpy_s(dst,len,src) strcpy(dst,src)\r
+#define _strdup(src) strdup(src)\r
+#define strtok_s(tok,del,ctx) strtok(tok,del)\r
+#endif\r
+\r
+#if defined(_LINUX) || defined(_QNX) || defined(_OSX)\r
+#include <unistd.h>\r
+#include <time.h>\r
+#include <signal.h>\r
+#include <arpa/inet.h>\r
+#include <strings.h>\r
+#endif\r
+\r
+#include <PvApi.h>\r
+\r
+#if defined(_LINUX) || defined(_QNX) || defined(_OSX)\r
+// put the calling thread to sleep for a given amount of millisecond\r
+void Sleep(unsigned int time)\r
+{\r
+    struct timespec t,r;\r
+    \r
+    t.tv_sec    = time / 1000;\r
+    t.tv_nsec   = (time % 1000) * 1000000;    \r
+    \r
+    while(nanosleep(&t,&r)==-1)\r
+        t = r;\r
+}\r
+#endif\r
+\r
+// display the usage details\r
+void ShowUsage()\r
+{\r
+    printf("usage: CamSetup -u <camera unique ID>| -i <camera IP> -l|-s <file>\n");\r
+    printf("-u\tcamera unique ID\n");\r
+    printf("-i\tcamera IP address\n");\r
+    printf("-l\tload setup\n");\r
+    printf("-s\tsave setup\n");\r
+}\r
+\r
+// trim the supplied string left and right\r
+char* strtrim(char *aString)\r
+{\r
+    int i;\r
+    int lLength = strlen(aString);\r
+    char* lOut = aString;\r
+    \r
+    // trim right\r
+    for(i=lLength-1;i>=0;i--)   \r
+        if(isspace(aString[i]))\r
+            aString[i]='\0';\r
+        else\r
+            break;\r
+                \r
+    lLength = strlen(aString);    \r
+        \r
+    // trim left\r
+    for(i=0;i<lLength;i++)\r
+        if(isspace(aString[i]))\r
+            lOut = &aString[i+1];    \r
+        else\r
+            break;    \r
+    \r
+    return lOut;\r
+}\r
+\r
+// set camera or driver attribute based on string value\r
+bool String2Value(tPvHandle aCamera,const char* aLabel,tPvDatatype aType,char* aValue)\r
+{\r
+    switch(aType)\r
+    {           \r
+        case ePvDatatypeString:\r
+        {   \r
+            return (PvAttrStringSet(aCamera,aLabel,aValue) == ePvErrSuccess);    \r
+        }\r
+        case ePvDatatypeEnum:\r
+        {            \r
+            return (PvAttrEnumSet(aCamera,aLabel,aValue) == ePvErrSuccess);\r
+        }\r
+        case ePvDatatypeUint32:\r
+        {\r
+            tPvUint32 lValue = atol(aValue);\r
+            tPvUint32 lMin,lMax;\r
+            \r
+           if(PvAttrRangeUint32(aCamera,aLabel,&lMin,&lMax) == ePvErrSuccess)\r
+           {\r
+               if(lMin > lValue)\r
+                   lValue = lMin;\r
+               else\r
+               if(lMax < lValue)\r
+                   lValue = lMax;\r
+                                        \r
+               return PvAttrUint32Set(aCamera,aLabel,lValue) == ePvErrSuccess;\r
+           }\r
+           else\r
+               return false;\r
+        }\r
+        case ePvDatatypeFloat32:\r
+        {\r
+            tPvFloat32 lValue = (tPvFloat32)atof(aValue);\r
+            tPvFloat32 lMin,lMax;\r
+            \r
+           if(PvAttrRangeFloat32(aCamera,aLabel,&lMin,&lMax) == ePvErrSuccess)\r
+           {\r
+                if(lMin > lValue)\r
+                   lValue = lMin;\r
+                else\r
+                if(lMax < lValue)\r
+                   lValue = lMax;            \r
+            \r
+                return PvAttrFloat32Set(aCamera,aLabel,lValue) == ePvErrSuccess;\r
+           }\r
+           else\r
+               return false;\r
+        }\r
+        case ePvDatatypeBoolean:\r
+        {\r
+            if(!(strcmp(aValue,"true")))\r
+                return PvAttrBooleanSet(aCamera,aLabel,true) == ePvErrSuccess;\r
+            else\r
+                return PvAttrBooleanSet(aCamera,aLabel,false) == ePvErrSuccess;\r
+        }\r
+        default:\r
+            return false;\r
+    }       \r
+}\r
+\r
+// encode the value of a given attribute in a string\r
+bool Value2String(tPvHandle aCamera,const char* aLabel,tPvDatatype aType,char* aString,unsigned long aLength)\r
+{   \r
+    switch(aType)\r
+    {           \r
+        case ePvDatatypeString:\r
+        {   \r
+            return PvAttrStringGet(aCamera,aLabel,aString,aLength,NULL) == ePvErrSuccess;     \r
+        }\r
+        case ePvDatatypeEnum:\r
+        {            \r
+            return PvAttrEnumGet(aCamera,aLabel,aString,aLength,NULL) == ePvErrSuccess;\r
+        }\r
+        case ePvDatatypeUint32:\r
+        {\r
+            tPvUint32 lValue;\r
+            \r
+            if(PvAttrUint32Get(aCamera,aLabel,&lValue) == ePvErrSuccess)\r
+            {\r
+                sprintf_s(aString, aLength, "%lu",lValue);\r
+                return true;\r
+            }\r
+            else\r
+                return false;\r
+            \r
+        }\r
+        case ePvDatatypeFloat32:\r
+        {\r
+            tPvFloat32 lValue;\r
+            \r
+            if(PvAttrFloat32Get(aCamera,aLabel,&lValue) == ePvErrSuccess)\r
+            {\r
+                sprintf_s(aString, aLength, "%g",lValue);\r
+                return true;\r
+            }\r
+            else\r
+                return false;\r
+        }\r
+        case ePvDatatypeBoolean:\r
+        {\r
+            tPvBoolean lValue;\r
+            \r
+            if(PvAttrBooleanGet(aCamera,aLabel,&lValue) == ePvErrSuccess)\r
+            {\r
+                if(lValue)\r
+                    strcpy_s(aString, aLength, "true");\r
+                else\r
+                    strcpy_s(aString, aLength, "false");\r
+                \r
+                return true;\r
+            }\r
+            else\r
+                return false;            \r
+        }        \r
+        default:\r
+            return false;\r
+    }        \r
+}\r
+\r
+// write a given attribute in a text file\r
+void WriteAttribute(tPvHandle aCamera,const char* aLabel,FILE* aFile)\r
+{\r
+    tPvAttributeInfo lInfo;\r
+\r
+    if(PvAttrInfo(aCamera,aLabel,&lInfo) == ePvErrSuccess)\r
+    {\r
+        if(lInfo.Datatype != ePvDatatypeCommand &&\r
+           (lInfo.Flags & ePvFlagWrite))\r
+        {\r
+            char lValue[128];\r
+            \r
+            //get attribute\r
+                       if(Value2String(aCamera,aLabel,lInfo.Datatype,lValue,128))\r
+                fprintf(aFile,"%s = %s\n",aLabel,lValue);\r
+            else\r
+                fprintf(stderr,"attribute %s couldn't be saved\n",aLabel);            \r
+        }   \r
+    }\r
+}\r
+\r
+// read the attribute from text file\r
+void ReadAttribute(tPvHandle aCamera,char* aLine)\r
+{\r
+    char* lValue = strchr(aLine,'=');\r
+    char* lLabel;\r
+    \r
+    if(lValue)\r
+    {\r
+        lValue[0] = '\0';\r
+        lValue++;    \r
+    \r
+        lLabel = strtrim(aLine);\r
+        lValue = strtrim(lValue);\r
+        \r
+        if(strlen(lLabel) && strlen(lValue))\r
+        {\r
+            tPvAttributeInfo lInfo;\r
+                           \r
+            if(PvAttrInfo(aCamera,lLabel,&lInfo) == ePvErrSuccess)\r
+            {\r
+                if(lInfo.Datatype != ePvDatatypeCommand &&\r
+                (lInfo.Flags & ePvFlagWrite))\r
+                {      \r
+                    //set attribute\r
+                                       if(!String2Value(aCamera,lLabel,lInfo.Datatype,lValue))\r
+                        fprintf(stderr,"attribute %s couldn't be loaded\n",lLabel);                          \r
+                } \r
+            }     \r
+        }\r
+    }\r
+}\r
+\r
+// load the setup of a camera from the given file\r
+bool SetupLoad(tPvHandle aCamera,const char* aFile)\r
+{\r
+    FILE* lFile = NULL;\r
+\r
+       #ifdef _WINDOWS\r
+               fopen_s(&lFile, aFile, "r");\r
+       #else\r
+               lFile = fopen(aFile,"r");\r
+       #endif\r
+    \r
+    if(lFile)\r
+    {\r
+        char lLine[256];\r
+        \r
+        while(!feof(lFile))\r
+        {\r
+            //read attributes from file\r
+                       if(fgets(lLine,256,lFile))\r
+                ReadAttribute(aCamera,lLine);\r
+        }\r
+        \r
+        fclose(lFile);\r
+        \r
+        return true;\r
+    }\r
+    else\r
+        return false;    \r
+}\r
+\r
+// save the setup of a camera from the given file\r
+bool SetupSave(tPvHandle aCamera,const char* aFile)\r
+{\r
+    FILE* lFile = NULL;\r
+\r
+       #ifdef _WINDOWS\r
+               fopen_s(&lFile, aFile, "w+");\r
+       #else\r
+               lFile = fopen(aFile,"w+");\r
+       #endif\r
+    \r
+    if(lFile)\r
+    {\r
+        bool            lRet = true;\r
+        tPvAttrListPtr  lAttrs; \r
+        tPvUint32       lCount;    \r
+        \r
+        //Get all attributes\r
+               if(PvAttrList(aCamera,&lAttrs,&lCount) == ePvErrSuccess)\r
+        {\r
+            //Write attributes to file\r
+                       for(tPvUint32 i=0;i<lCount;i++)\r
+                WriteAttribute(aCamera,lAttrs[i],lFile);\r
+        }     \r
+        else\r
+            lRet = false;   \r
+        \r
+        fclose(lFile);\r
+        \r
+        return lRet;\r
+    }\r
+    else\r
+        return false;    \r
+}\r
+\r
+//\r
+int main(int argc, char* argv[])\r
+{\r
+    int err = 0;\r
+       tPvErr errCode;\r
+\r
+       // initialize the PvAPI\r
+       if((errCode = PvInitialize()) != ePvErrSuccess)\r
+    { \r
+               printf("PvInitialize err: %u\n", errCode);\r
+               err = 1;\r
+       }\r
+       else\r
+    {\r
+        int c;\r
+        unsigned long uid = 0;\r
+        unsigned long addr = 0;\r
+        bool bLoad = false;\r
+        bool bSave = false;\r
+    \r
+        while ((c = getopt (argc, argv, "u:i:ls:h?")) != -1)\r
+        {\r
+            switch(c)\r
+            {\r
+                case 'u':\r
+                {\r
+                    if(optarg)\r
+                        uid = atol(optarg);\r
+                    \r
+                    break;    \r
+                }\r
+                case 'i':\r
+                {\r
+                    if(optarg)\r
+                        addr = inet_addr(optarg);\r
+                    \r
+                    break;    \r
+                }                \r
+                case 'l':\r
+                {\r
+                    bLoad = true;\r
+                    break;\r
+                }\r
+                case 's':\r
+                {\r
+                    bSave = true;\r
+                    break;\r
+                }\r
+                case '?':\r
+                case 'h':\r
+                {\r
+                    ShowUsage();\r
+                    break;    \r
+                }\r
+                default:\r
+                    break;\r
+            }\r
+        }\r
+\r
+        if((uid || ((addr != INADDR_NONE) && (addr != INADDR_ANY))) && (bSave || bLoad))\r
+        {\r
+            tPvHandle       Camera;\r
+            tPvAccessFlags  Flags = (bLoad ? ePvAccessMaster : ePvAccessMonitor);\r
+            bool            Done = false;\r
+\r
+            if(uid)\r
+            {\r
+                // wait a bit to leave some time to the API to detect any camera\r
+                Sleep(500);\r
+                // and open the camera\r
+                errCode = PvCameraOpen(uid,Flags,&Camera);\r
+            }\r
+            else\r
+                errCode = PvCameraOpenByAddr(addr,Flags,&Camera);\r
+                \r
+            if(errCode == ePvErrSuccess)\r
+            {   \r
+                if(bLoad) // load the camera setup\r
+                    Done = SetupLoad(Camera,argv[argc-1]);\r
+                else\r
+                if(bSave) // save the camera setup\r
+                    Done = SetupSave(Camera,argv[argc-1]);          \r
+\r
+                if(!Done)\r
+                    fprintf(stderr,"Error occured in saving/loading.\n");\r
+\r
+                err = 1;\r
+\r
+                // close the camera\r
+                PvCameraClose(Camera);\r
+            }\r
+            else\r
+            {\r
+                if(errCode == ePvErrNotFound || errCode == ePvErrUnplugged)\r
+                    fprintf(stderr,"Could not find camera\n");\r
+                else\r
+                if(errCode == ePvErrAccessDenied)\r
+                    fprintf(stderr,"Camera already in use\n");\r
+                else\r
+                                       fprintf(stderr,"PvCameraOpen err: %u\n", errCode);\r
+\r
+                err = 1;    \r
+            }    \r
+        }\r
+        else\r
+        {\r
+            ShowUsage();\r
+            err = 1;  \r
+        }\r
+\r
+        // uninitialize the API\r
+        PvUnInitialize();\r
+    }\r
+    \r
+       return err;\r
+}\r
+\r
diff --git a/AVTGigESDK_Win/GigESDK/examples/CamSetup/CamSetup.sln b/AVTGigESDK_Win/GigESDK/examples/CamSetup/CamSetup.sln
new file mode 100644 (file)
index 0000000..6d0a50d
--- /dev/null
@@ -0,0 +1,20 @@
+\r
+Microsoft Visual Studio Solution File, Format Version 9.00\r
+# Visual Studio 2005\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CamSetup", "CamSetup.vcproj", "{54F0028A-1C0F-48A9-97DA-747D6D774811}"\r
+EndProject\r
+Global\r
+       GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
+               Debug|Win32 = Debug|Win32\r
+               Release|Win32 = Release|Win32\r
+       EndGlobalSection\r
+       GlobalSection(ProjectConfigurationPlatforms) = postSolution\r
+               {54F0028A-1C0F-48A9-97DA-747D6D774811}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {54F0028A-1C0F-48A9-97DA-747D6D774811}.Debug|Win32.Build.0 = Debug|Win32\r
+               {54F0028A-1C0F-48A9-97DA-747D6D774811}.Release|Win32.ActiveCfg = Release|Win32\r
+               {54F0028A-1C0F-48A9-97DA-747D6D774811}.Release|Win32.Build.0 = Release|Win32\r
+       EndGlobalSection\r
+       GlobalSection(SolutionProperties) = preSolution\r
+               HideSolutionNode = FALSE\r
+       EndGlobalSection\r
+EndGlobal\r
diff --git a/AVTGigESDK_Win/GigESDK/examples/CamSetup/CamSetup.vcproj b/AVTGigESDK_Win/GigESDK/examples/CamSetup/CamSetup.vcproj
new file mode 100644 (file)
index 0000000..2a443bb
--- /dev/null
@@ -0,0 +1,304 @@
+<?xml version="1.0" encoding="Windows-1252"?>\r
+<VisualStudioProject\r
+       ProjectType="Visual C++"\r
+       Version="8.00"\r
+       Name="CamSetup"\r
+       ProjectGUID="{54F0028A-1C0F-48A9-97DA-747D6D774811}"\r
+       >\r
+       <Platforms>\r
+               <Platform\r
+                       Name="Win32"\r
+               />\r
+       </Platforms>\r
+       <ToolFiles>\r
+       </ToolFiles>\r
+       <Configurations>\r
+               <Configuration\r
+                       Name="Debug|Win32"\r
+                       OutputDirectory=".\Debug"\r
+                       IntermediateDirectory=".\Debug"\r
+                       ConfigurationType="1"\r
+                       InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       CharacterSet="2"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TypeLibraryName=".\Debug/CamSetup.tlb"\r
+                               HeaderFileName=""\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="0"\r
+                               AdditionalIncludeDirectories="../../inc-pc"\r
+                               PreprocessorDefinitions="_DEBUG;WIN32;_CONSOLE;_WINDOWS"\r
+                               MinimalRebuild="true"\r
+                               BasicRuntimeChecks="3"\r
+                               RuntimeLibrary="1"\r
+                               PrecompiledHeaderFile=".\Debug/CamSetup.pch"\r
+                               AssemblerListingLocation=".\Debug/"\r
+                               ObjectFile=".\Debug/"\r
+                               ProgramDataBaseFileName=".\Debug/"\r
+                               WarningLevel="3"\r
+                               WarnAsError="false"\r
+                               SuppressStartupBanner="true"\r
+                               DebugInformationFormat="4"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="_DEBUG"\r
+                               Culture="1033"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="pvapi.lib ws2_32.lib"\r
+                               OutputFile="../../bin-pc/CamSetup.exe"\r
+                               LinkIncremental="2"\r
+                               SuppressStartupBanner="true"\r
+                               AdditionalLibraryDirectories="../../lib-pc"\r
+                               GenerateDebugInformation="true"\r
+                               ProgramDatabaseFile=".\Debug/CamSetup.pdb"\r
+                               SubSystem="1"\r
+                               TargetMachine="1"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                               SuppressStartupBanner="true"\r
+                               OutputFile=".\Debug/CamSetup.bsc"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebDeploymentTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|Win32"\r
+                       OutputDirectory=".\Release"\r
+                       IntermediateDirectory=".\Release"\r
+                       ConfigurationType="1"\r
+                       InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       CharacterSet="2"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TypeLibraryName=".\Release/CamSetup.tlb"\r
+                               HeaderFileName=""\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="2"\r
+                               InlineFunctionExpansion="1"\r
+                               AdditionalIncludeDirectories="../../inc-pc"\r
+                               PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;_WINDOWS"\r
+                               StringPooling="true"\r
+                               RuntimeLibrary="0"\r
+                               EnableFunctionLevelLinking="true"\r
+                               PrecompiledHeaderFile=".\Release/CamSetup.pch"\r
+                               AssemblerListingLocation=".\Release/"\r
+                               ObjectFile=".\Release/"\r
+                               ProgramDataBaseFileName=".\Release/"\r
+                               BrowseInformation="1"\r
+                               WarningLevel="3"\r
+                               WarnAsError="false"\r
+                               SuppressStartupBanner="true"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="NDEBUG"\r
+                               Culture="1033"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="pvapi.lib ws2_32.lib"\r
+                               OutputFile="../../bin-pc/CamSetup.exe"\r
+                               LinkIncremental="1"\r
+                               SuppressStartupBanner="true"\r
+                               AdditionalLibraryDirectories="../../lib-pc"\r
+                               ProgramDatabaseFile=".\Release/CamSetup.pdb"\r
+                               SubSystem="1"\r
+                               TargetMachine="1"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                               SuppressStartupBanner="true"\r
+                               OutputFile=".\Release/CamSetup.bsc"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebDeploymentTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+       </Configurations>\r
+       <References>\r
+       </References>\r
+       <Files>\r
+               <Filter\r
+                       Name="Source Files"\r
+                       Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"\r
+                       >\r
+                       <File\r
+                               RelativePath="CamSetup.cpp"\r
+                               >\r
+                               <FileConfiguration\r
+                                       Name="Debug|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories=""\r
+                                               PreprocessorDefinitions=""\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Release|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories=""\r
+                                               PreprocessorDefinitions=""\r
+                                       />\r
+                               </FileConfiguration>\r
+                       </File>\r
+                       <File\r
+                               RelativePath="StdAfx.cpp"\r
+                               >\r
+                               <FileConfiguration\r
+                                       Name="Debug|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories=""\r
+                                               PreprocessorDefinitions=""\r
+                                               UsePrecompiledHeader="1"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Release|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories=""\r
+                                               PreprocessorDefinitions=""\r
+                                               UsePrecompiledHeader="1"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                       />\r
+                               </FileConfiguration>\r
+                       </File>\r
+                       <File\r
+                               RelativePath="XGetopt.cpp"\r
+                               >\r
+                               <FileConfiguration\r
+                                       Name="Debug|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories=""\r
+                                               PreprocessorDefinitions=""\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Release|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories=""\r
+                                               PreprocessorDefinitions=""\r
+                                       />\r
+                               </FileConfiguration>\r
+                       </File>\r
+               </Filter>\r
+               <Filter\r
+                       Name="Header Files"\r
+                       Filter="h;hpp;hxx;hm;inl"\r
+                       >\r
+                       <File\r
+                               RelativePath="StdAfx.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="XGetopt.h"\r
+                               >\r
+                       </File>\r
+               </Filter>\r
+               <Filter\r
+                       Name="Resource Files"\r
+                       Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"\r
+                       >\r
+               </Filter>\r
+       </Files>\r
+       <Globals>\r
+       </Globals>\r
+</VisualStudioProject>\r
diff --git a/AVTGigESDK_Win/GigESDK/examples/CamSetup/StdAfx.cpp b/AVTGigESDK_Win/GigESDK/examples/CamSetup/StdAfx.cpp
new file mode 100644 (file)
index 0000000..e8b69e2
--- /dev/null
@@ -0,0 +1,8 @@
+// stdafx.cpp : source file that includes just the standard includes\r
+//     Stream.pch will be the pre-compiled header\r
+//     stdafx.obj will contain the pre-compiled type information\r
+\r
+#include "stdafx.h"\r
+\r
+// TODO: reference any additional headers you need in STDAFX.H\r
+// and not in this file\r
diff --git a/AVTGigESDK_Win/GigESDK/examples/CamSetup/StdAfx.h b/AVTGigESDK_Win/GigESDK/examples/CamSetup/StdAfx.h
new file mode 100644 (file)
index 0000000..75d9e7c
--- /dev/null
@@ -0,0 +1,13 @@
+// stdafx.h : include file for standard system include files,\r
+//  or project specific include files that are used frequently, but\r
+//      are changed infrequently\r
+//\r
+\r
+#if !defined(AFX_STDAFX_H__224EC810_0DF9_4A31_A149_E69197045CE8__INCLUDED_)\r
+#define AFX_STDAFX_H__224EC810_0DF9_4A31_A149_E69197045CE8__INCLUDED_\r
+\r
+#if _MSC_VER > 1000\r
+#pragma once\r
+#endif // _MSC_VER > 1000\r
+\r
+#endif // !defined(AFX_STDAFX_H__224EC810_0DF9_4A31_A149_E69197045CE8__INCLUDED_)\r
diff --git a/AVTGigESDK_Win/GigESDK/examples/CamSetup/XGetopt.cpp b/AVTGigESDK_Win/GigESDK/examples/CamSetup/XGetopt.cpp
new file mode 100644 (file)
index 0000000..4d1d7e6
--- /dev/null
@@ -0,0 +1,220 @@
+// XGetopt.cpp  Version 1.2\r
+//\r
+// Author:  Hans Dietrich\r
+//          hdietrich2@hotmail.com\r
+//\r
+// Description:\r
+//     XGetopt.cpp implements getopt(), a function to parse command lines.\r
+//\r
+// History\r
+//     Version 1.2 - 2003 May 17\r
+//     - Added Unicode support\r
+//\r
+//     Version 1.1 - 2002 March 10\r
+//     - Added example to XGetopt.cpp module header \r
+//\r
+// This software is released into the public domain.\r
+// You are free to use it in any way you like.\r
+//\r
+// This software is provided "as is" with no expressed\r
+// or implied warranty.  I accept no liability for any\r
+// damage or loss of business that this software may cause.\r
+//\r
+///////////////////////////////////////////////////////////////////////////////\r
+\r
+\r
+///////////////////////////////////////////////////////////////////////////////\r
+// if you are using precompiled headers then include this line:\r
+//#include "stdafx.h"\r
+///////////////////////////////////////////////////////////////////////////////\r
+\r
+\r
+///////////////////////////////////////////////////////////////////////////////\r
+// if you are not using precompiled headers then include these lines:\r
+#include <windows.h>\r
+#include <stdio.h>\r
+#include <string.h>\r
+#include <TCHAR.H>\r
+///////////////////////////////////////////////////////////////////////////////\r
+\r
+\r
+#include "XGetopt.h"\r
+\r
+\r
+///////////////////////////////////////////////////////////////////////////////\r
+//\r
+//  X G e t o p t . c p p\r
+//\r
+//\r
+//  NAME\r
+//       getopt -- parse command line options\r
+//\r
+//  SYNOPSIS\r
+//       int getopt(int argc, char *argv[], char *optstring)\r
+//\r
+//       extern char *optarg;\r
+//       extern int optind;\r
+//\r
+//  DESCRIPTION\r
+//       The getopt() function parses the command line arguments. Its\r
+//       arguments argc and argv are the argument count and array as\r
+//       passed into the application on program invocation.  In the case\r
+//       of Visual C++ programs, argc and argv are available via the\r
+//       variables __argc and __argv (double underscores), respectively.\r
+//       getopt returns the next option letter in argv that matches a\r
+//       letter in optstring.  (Note:  Unicode programs should use\r
+//       __targv instead of __argv.  Also, all character and string\r
+//       literals should be enclosed in _T( ) ).\r
+//\r
+//       optstring is a string of recognized option letters;  if a letter\r
+//       is followed by a colon, the option is expected to have an argument\r
+//       that may or may not be separated from it by white space.  optarg\r
+//       is set to point to the start of the option argument on return from\r
+//       getopt.\r
+//\r
+//       Option letters may be combined, e.g., "-ab" is equivalent to\r
+//       "-a -b".  Option letters are case sensitive.\r
+//\r
+//       getopt places in the external variable optind the argv index\r
+//       of the next argument to be processed.  optind is initialized\r
+//       to 0 before the first call to getopt.\r
+//\r
+//       When all options have been processed (i.e., up to the first\r
+//       non-option argument), getopt returns EOF, optarg will point\r
+//       to the argument, and optind will be set to the argv index of\r
+//       the argument.  If there are no non-option arguments, optarg\r
+//       will be set to NULL.\r
+//\r
+//       The special option "--" may be used to delimit the end of the\r
+//       options;  EOF will be returned, and "--" (and everything after it)\r
+//       will be skipped.\r
+//\r
+//  RETURN VALUE\r
+//       For option letters contained in the string optstring, getopt\r
+//       will return the option letter.  getopt returns a question mark (?)\r
+//       when it encounters an option letter not included in optstring.\r
+//       EOF is returned when processing is finished.\r
+//\r
+//  BUGS\r
+//       1)  Long options are not supported.\r
+//       2)  The GNU double-colon extension is not supported.\r
+//       3)  The environment variable POSIXLY_CORRECT is not supported.\r
+//       4)  The + syntax is not supported.\r
+//       5)  The automatic permutation of arguments is not supported.\r
+//       6)  This implementation of getopt() returns EOF if an error is\r
+//           encountered, instead of -1 as the latest standard requires.\r
+//\r
+//  EXAMPLE\r
+//       BOOL CMyApp::ProcessCommandLine(int argc, char *argv[])\r
+//       {\r
+//           int c;\r
+//\r
+//           while ((c = getopt(argc, argv, _T("aBn:"))) != EOF)\r
+//           {\r
+//               switch (c)\r
+//               {\r
+//                   case _T('a'):\r
+//                       TRACE(_T("option a\n"));\r
+//                       //\r
+//                       // set some flag here\r
+//                       //\r
+//                       break;\r
+//\r
+//                   case _T('B'):\r
+//                       TRACE( _T("option B\n"));\r
+//                       //\r
+//                       // set some other flag here\r
+//                       //\r
+//                       break;\r
+//\r
+//                   case _T('n'):\r
+//                       TRACE(_T("option n: value=%d\n"), atoi(optarg));\r
+//                       //\r
+//                       // do something with value here\r
+//                       //\r
+//                       break;\r
+//\r
+//                   case _T('?'):\r
+//                       TRACE(_T("ERROR: illegal option %s\n"), argv[optind-1]);\r
+//                       return FALSE;\r
+//                       break;\r
+//\r
+//                   default:\r
+//                       TRACE(_T("WARNING: no handler for option %c\n"), c);\r
+//                       return FALSE;\r
+//                       break;\r
+//               }\r
+//           }\r
+//           //\r
+//           // check for non-option args here\r
+//           //\r
+//           return TRUE;\r
+//       }\r
+//\r
+///////////////////////////////////////////////////////////////////////////////\r
+\r
+char   *optarg;                // global argument pointer\r
+int            optind = 0;     // global argv index\r
+\r
+int getopt(int argc, char *argv[], char *optstring)\r
+{\r
+       static char *next = NULL;\r
+       if (optind == 0)\r
+               next = NULL;\r
+\r
+       optarg = NULL;\r
+\r
+       if (next == NULL || *next == _T('\0'))\r
+       {\r
+               if (optind == 0)\r
+                       optind++;\r
+\r
+               if (optind >= argc || argv[optind][0] != _T('-') || argv[optind][1] == _T('\0'))\r
+               {\r
+                       optarg = NULL;\r
+                       if (optind < argc)\r
+                               optarg = argv[optind];\r
+                       return EOF;\r
+               }\r
+\r
+               if (_tcscmp(argv[optind], _T("--")) == 0)\r
+               {\r
+                       optind++;\r
+                       optarg = NULL;\r
+                       if (optind < argc)\r
+                               optarg = argv[optind];\r
+                       return EOF;\r
+               }\r
+\r
+               next = argv[optind];\r
+               next++;         // skip past -\r
+               optind++;\r
+       }\r
+\r
+       char c = *next++;\r
+       char *cp = _tcschr(optstring, c);\r
+\r
+       if (cp == NULL || c == _T(':'))\r
+               return _T('?');\r
+\r
+       cp++;\r
+       if (*cp == _T(':'))\r
+       {\r
+               if (*next != _T('\0'))\r
+               {\r
+                       optarg = next;\r
+                       next = NULL;\r
+               }\r
+               else if (optind < argc)\r
+               {\r
+                       optarg = argv[optind];\r
+                       optind++;\r
+               }\r
+               else\r
+               {\r
+                       return _T('?');\r
+               }\r
+       }\r
+\r
+       return c;\r
+}\r
diff --git a/AVTGigESDK_Win/GigESDK/examples/CamSetup/XGetopt.h b/AVTGigESDK_Win/GigESDK/examples/CamSetup/XGetopt.h
new file mode 100644 (file)
index 0000000..d684a76
--- /dev/null
@@ -0,0 +1,23 @@
+// XGetopt.h  Version 1.2\r
+//\r
+// Author:  Hans Dietrich\r
+//          hdietrich2@hotmail.com\r
+//\r
+// This software is released into the public domain.\r
+// You are free to use it in any way you like.\r
+//\r
+// This software is provided "as is" with no expressed\r
+// or implied warranty.  I accept no liability for any\r
+// damage or loss of business that this software may cause.\r
+//\r
+///////////////////////////////////////////////////////////////////////////////\r
+\r
+#ifndef XGETOPT_H\r
+#define XGETOPT_H\r
+\r
+extern int optind, opterr;\r
+extern char *optarg;\r
+\r
+int getopt(int argc, char *argv[], char *optstring);\r
+\r
+#endif //XGETOPT_H\r
diff --git a/AVTGigESDK_Win/GigESDK/examples/ChangeROI/ChangeROI.cpp b/AVTGigESDK_Win/GigESDK/examples/ChangeROI/ChangeROI.cpp
new file mode 100644 (file)
index 0000000..cbf3a44
--- /dev/null
@@ -0,0 +1,185 @@
+/*\r
+| ==============================================================================\r
+| Copyright (C) 2011 Allied Vision Technologies.  All Rights Reserved.\r
+|\r
+| Redistribution of this header file, in original or modified form, without\r
+| prior written consent of AVT is prohibited.\r
+|\r
+|==============================================================================\r
+|\r
+| ChangeROI\r
+|\r
+| Opens the first camera found on the host computer and changes \r
+| its Region of Interest (ROI).\r
+|\r
+|==============================================================================\r
+|\r
+| THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED\r
+| WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF TITLE,\r
+| NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR  PURPOSE ARE\r
+| DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,\r
+| INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\r
+| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\r
+| OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED  AND ON ANY THEORY OF\r
+| LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+| NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
+| EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+|\r
+|==============================================================================\r
+*/\r
+\r
+#ifdef _WINDOWS\r
+#include "StdAfx.h"\r
+#endif\r
+\r
+#include <stdio.h>\r
+#include <stdlib.h>\r
+#include <string.h>\r
+\r
+#ifdef _WINDOWS\r
+#define WIN32_LEAN_AND_MEAN\r
+#include <Windows.h>\r
+#endif\r
+\r
+#if defined(_LINUX) || defined(_QNX) || defined(_OSX)\r
+#include <unistd.h>\r
+#include <time.h>\r
+#endif\r
+\r
+#include <PvApi.h>\r
+\r
+#ifndef _WINDOWS\r
+#define TRUE 0\r
+#endif\r
+\r
+// camera data\r
+typedef struct \r
+{\r
+    tPvHandle       Handle;\r
+    tPvCameraInfo   Info;\r
+\r
+} tCamera;\r
+\r
+// global camera data\r
+tCamera GCamera;\r
+\r
+#if defined(_LINUX) || defined(_QNX) || defined(_OSX)\r
+void Sleep(unsigned int time)\r
+{\r
+    struct timespec t,r;\r
+    \r
+    t.tv_sec    = time / 1000;\r
+    t.tv_nsec   = (time % 1000) * 1000000;    \r
+    \r
+    while(nanosleep(&t,&r)==-1)\r
+        t = r;\r
+}\r
+#endif\r
+\r
+// wait for a camera to be plugged\r
+void WaitForCamera()\r
+{\r
+    printf("waiting for a camera");\r
+    while(!PvCameraCount())\r
+    {\r
+        printf(".");fflush(stdout);\r
+        Sleep(250);\r
+    }\r
+    printf("\n");\r
+}\r
+\r
+// get the first camera found\r
+bool CameraGrab()\r
+{\r
+    return PvCameraList(&(GCamera.Info),1,NULL) >= 1;\r
+}\r
+\r
+// open the camera\r
+bool CameraOpen()\r
+{\r
+    if(!PvCameraOpen(GCamera.Info.UniqueId,ePvAccessMaster,&(GCamera.Handle)))\r
+    {\r
+        printf("Camera open : %s\n",GCamera.Info.SerialString);\r
+        return true;\r
+    }\r
+    else\r
+        return false;\r
+}\r
+\r
+// close the camera\r
+void CameraClose()\r
+{\r
+    if(GCamera.Handle)\r
+        PvCameraClose(GCamera.Handle); \r
+}\r
+\r
+// change some camera settings\r
+void CameraChange()\r
+{\r
+    tPvErr Err;\r
+    unsigned long sWidth,sHeight;\r
+    unsigned long rWidth,rHeight;\r
+    unsigned long CenterX,CenterY;\r
+\r
+    // read the sensor size\r
+    if(!(Err = PvAttrUint32Get(GCamera.Handle,"SensorWidth",&sWidth)) &&\r
+       !(Err = PvAttrUint32Get(GCamera.Handle,"SensorHeight",&sHeight)))\r
+    {\r
+        rWidth  = sWidth / 2;\r
+        rHeight = sHeight / 2;\r
+\r
+        CenterX = rWidth - 1;\r
+        CenterY = rHeight - 1;\r
+\r
+        printf("Camera's sensor is %lux%lu, changing it to %lux%lu\n",sWidth,sHeight,rWidth,rHeight);\r
+    \r
+        // set the width&height\r
+        if(!(Err = PvAttrUint32Set(GCamera.Handle,"Width",rWidth)) &&\r
+           !(Err = PvAttrUint32Set(GCamera.Handle,"Height",rHeight)))\r
+           {\r
+               if(!(Err = PvAttrUint32Set(GCamera.Handle,"RegionX",CenterX - rWidth / 2)))\r
+                Err = PvAttrUint32Set(GCamera.Handle,"RegionY",CenterY - rHeight / 2);\r
+           }\r
+    }\r
+\r
+    if(!Err)\r
+        printf("ROI changed\n");\r
+    else\r
+        printf("ROI failed to be changed\n");    \r
+}\r
+\r
+int main(int argc, char* argv[])\r
+{\r
+    // initialise the Prosilica API\r
+    if(!PvInitialize())\r
+    { \r
+        memset(&GCamera,0,sizeof(tCamera));\r
+       \r
+        // wait for a camera to be plugged\r
+        WaitForCamera();\r
+\r
+        if(CameraGrab())\r
+        {\r
+            // open the camera\r
+            if(CameraOpen())\r
+            {\r
+                // change some attributes\r
+                CameraChange();\r
+                        \r
+                // unsetup the camera\r
+                CameraClose();\r
+            }\r
+            else\r
+                printf("failed to open the camera\n");\r
+        }\r
+        else\r
+            printf("failed to grab a camera!\n");\r
+\r
+        // uninitialise the API\r
+        PvUnInitialize();\r
+    }\r
+    else\r
+        printf("failed to initialise the API\n");\r
+    \r
+       return 0;\r
+}\r
diff --git a/AVTGigESDK_Win/GigESDK/examples/ChangeROI/ChangeROI.sln b/AVTGigESDK_Win/GigESDK/examples/ChangeROI/ChangeROI.sln
new file mode 100644 (file)
index 0000000..3f78447
--- /dev/null
@@ -0,0 +1,23 @@
+\r
+Microsoft Visual Studio Solution File, Format Version 9.00\r
+# Visual Studio 2005\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ChangeROI", "ChangeROI.vcproj", "{17B90894-234A-41A8-853B-585B1D61857B}"\r
+EndProject\r
+Global\r
+       GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
+               Debug|Win32 = Debug|Win32\r
+               Release|Win32 = Release|Win32\r
+               Win64 Release|Win32 = Win64 Release|Win32\r
+       EndGlobalSection\r
+       GlobalSection(ProjectConfigurationPlatforms) = postSolution\r
+               {17B90894-234A-41A8-853B-585B1D61857B}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {17B90894-234A-41A8-853B-585B1D61857B}.Debug|Win32.Build.0 = Debug|Win32\r
+               {17B90894-234A-41A8-853B-585B1D61857B}.Release|Win32.ActiveCfg = Release|Win32\r
+               {17B90894-234A-41A8-853B-585B1D61857B}.Release|Win32.Build.0 = Release|Win32\r
+               {17B90894-234A-41A8-853B-585B1D61857B}.Win64 Release|Win32.ActiveCfg = Win64 Release|Win32\r
+               {17B90894-234A-41A8-853B-585B1D61857B}.Win64 Release|Win32.Build.0 = Win64 Release|Win32\r
+       EndGlobalSection\r
+       GlobalSection(SolutionProperties) = preSolution\r
+               HideSolutionNode = FALSE\r
+       EndGlobalSection\r
+EndGlobal\r
diff --git a/AVTGigESDK_Win/GigESDK/examples/ChangeROI/ChangeROI.vcproj b/AVTGigESDK_Win/GigESDK/examples/ChangeROI/ChangeROI.vcproj
new file mode 100644 (file)
index 0000000..4345299
--- /dev/null
@@ -0,0 +1,391 @@
+<?xml version="1.0" encoding="Windows-1252"?>\r
+<VisualStudioProject\r
+       ProjectType="Visual C++"\r
+       Version="8.00"\r
+       Name="ChangeROI"\r
+       ProjectGUID="{17B90894-234A-41A8-853B-585B1D61857B}"\r
+       >\r
+       <Platforms>\r
+               <Platform\r
+                       Name="Win32"\r
+               />\r
+       </Platforms>\r
+       <ToolFiles>\r
+       </ToolFiles>\r
+       <Configurations>\r
+               <Configuration\r
+                       Name="Debug|Win32"\r
+                       OutputDirectory=".\Debug"\r
+                       IntermediateDirectory=".\Debug"\r
+                       ConfigurationType="1"\r
+                       InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       CharacterSet="2"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TypeLibraryName=".\Debug/ChangeROI.tlb"\r
+                               HeaderFileName=""\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="0"\r
+                               AdditionalIncludeDirectories="../../inc-pc"\r
+                               PreprocessorDefinitions="_DEBUG;WIN32;_CONSOLE;_WINDOWS"\r
+                               MinimalRebuild="true"\r
+                               BasicRuntimeChecks="3"\r
+                               RuntimeLibrary="1"\r
+                               PrecompiledHeaderFile=".\Debug/ChangeROI.pch"\r
+                               AssemblerListingLocation=".\Debug/"\r
+                               ObjectFile=".\Debug/"\r
+                               ProgramDataBaseFileName=".\Debug/"\r
+                               WarningLevel="3"\r
+                               WarnAsError="true"\r
+                               SuppressStartupBanner="true"\r
+                               DebugInformationFormat="4"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="_DEBUG"\r
+                               Culture="1033"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="pvapi.lib"\r
+                               OutputFile="../../bin-pc/ChangeROI.exe"\r
+                               LinkIncremental="2"\r
+                               SuppressStartupBanner="true"\r
+                               AdditionalLibraryDirectories="../../lib-pc"\r
+                               GenerateDebugInformation="true"\r
+                               ProgramDatabaseFile=".\Debug/ChangeROI.pdb"\r
+                               SubSystem="1"\r
+                               TargetMachine="1"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                               SuppressStartupBanner="true"\r
+                               OutputFile=".\Debug/ChangeROI.bsc"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebDeploymentTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Win64 Release|Win32"\r
+                       OutputDirectory=".\ChangeROI___Win32_Win64_Release"\r
+                       IntermediateDirectory=".\ChangeROI___Win32_Win64_Release"\r
+                       ConfigurationType="1"\r
+                       InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       CharacterSet="2"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TypeLibraryName=".\ChangeROI___Win32_Win64_Release/ChangeROI.tlb"\r
+                               HeaderFileName=""\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="2"\r
+                               InlineFunctionExpansion="1"\r
+                               AdditionalIncludeDirectories="../../inc-pc"\r
+                               PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;_WINDOWS"\r
+                               StringPooling="true"\r
+                               RuntimeLibrary="0"\r
+                               EnableFunctionLevelLinking="true"\r
+                               PrecompiledHeaderFile=".\ChangeROI___Win32_Win64_Release/ChangeROI.pch"\r
+                               AssemblerListingLocation=".\ChangeROI___Win32_Win64_Release/"\r
+                               ObjectFile=".\ChangeROI___Win32_Win64_Release/"\r
+                               ProgramDataBaseFileName=".\ChangeROI___Win32_Win64_Release/"\r
+                               WarningLevel="3"\r
+                               WarnAsError="true"\r
+                               SuppressStartupBanner="true"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="NDEBUG"\r
+                               Culture="1033"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalOptions="/machine:AMD64"\r
+                               AdditionalDependencies="pvapi.lib bufferoverflowU.lib"\r
+                               OutputFile="../../bin-pc/x64/ChangeROI.exe"\r
+                               LinkIncremental="2"\r
+                               SuppressStartupBanner="true"\r
+                               AdditionalLibraryDirectories="../../lib-pc/x64"\r
+                               ProgramDatabaseFile=".\ChangeROI___Win32_Win64_Release/ChangeROI.pdb"\r
+                               SubSystem="1"\r
+                               TargetMachine="1"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                               SuppressStartupBanner="true"\r
+                               OutputFile=".\ChangeROI___Win32_Win64_Release/ChangeROI.bsc"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebDeploymentTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|Win32"\r
+                       OutputDirectory=".\Release"\r
+                       IntermediateDirectory=".\Release"\r
+                       ConfigurationType="1"\r
+                       InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       CharacterSet="2"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TypeLibraryName=".\Release/ChangeROI.tlb"\r
+                               HeaderFileName=""\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="2"\r
+                               InlineFunctionExpansion="1"\r
+                               AdditionalIncludeDirectories="../../inc-pc"\r
+                               PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;_WINDOWS"\r
+                               StringPooling="true"\r
+                               RuntimeLibrary="0"\r
+                               EnableFunctionLevelLinking="true"\r
+                               PrecompiledHeaderFile=".\Release/ChangeROI.pch"\r
+                               AssemblerListingLocation=".\Release/"\r
+                               ObjectFile=".\Release/"\r
+                               ProgramDataBaseFileName=".\Release/"\r
+                               WarningLevel="3"\r
+                               WarnAsError="true"\r
+                               SuppressStartupBanner="true"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="NDEBUG"\r
+                               Culture="1033"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="pvapi.lib"\r
+                               OutputFile="../../bin-pc/ChangeROI.exe"\r
+                               LinkIncremental="1"\r
+                               SuppressStartupBanner="true"\r
+                               AdditionalLibraryDirectories="../../lib-pc"\r
+                               ProgramDatabaseFile=".\Release/ChangeROI.pdb"\r
+                               SubSystem="1"\r
+                               TargetMachine="1"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                               SuppressStartupBanner="true"\r
+                               OutputFile=".\Release/ChangeROI.bsc"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebDeploymentTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+       </Configurations>\r
+       <References>\r
+       </References>\r
+       <Files>\r
+               <Filter\r
+                       Name="Source Files"\r
+                       Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"\r
+                       >\r
+                       <File\r
+                               RelativePath="ChangeROI.cpp"\r
+                               >\r
+                               <FileConfiguration\r
+                                       Name="Debug|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories=""\r
+                                               PreprocessorDefinitions=""\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Win64 Release|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories=""\r
+                                               PreprocessorDefinitions=""\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Release|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories=""\r
+                                               PreprocessorDefinitions=""\r
+                                       />\r
+                               </FileConfiguration>\r
+                       </File>\r
+                       <File\r
+                               RelativePath="StdAfx.cpp"\r
+                               >\r
+                               <FileConfiguration\r
+                                       Name="Debug|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories=""\r
+                                               PreprocessorDefinitions=""\r
+                                               UsePrecompiledHeader="1"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Win64 Release|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories=""\r
+                                               PreprocessorDefinitions=""\r
+                                               UsePrecompiledHeader="1"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Release|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories=""\r
+                                               PreprocessorDefinitions=""\r
+                                               UsePrecompiledHeader="1"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                       />\r
+                               </FileConfiguration>\r
+                       </File>\r
+               </Filter>\r
+               <Filter\r
+                       Name="Header Files"\r
+                       Filter="h;hpp;hxx;hm;inl"\r
+                       >\r
+                       <File\r
+                               RelativePath="StdAfx.h"\r
+                               >\r
+                       </File>\r
+               </Filter>\r
+               <Filter\r
+                       Name="Resource Files"\r
+                       Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"\r
+                       >\r
+               </Filter>\r
+       </Files>\r
+       <Globals>\r
+       </Globals>\r
+</VisualStudioProject>\r
diff --git a/AVTGigESDK_Win/GigESDK/examples/ChangeROI/StdAfx.cpp b/AVTGigESDK_Win/GigESDK/examples/ChangeROI/StdAfx.cpp
new file mode 100644 (file)
index 0000000..e8b69e2
--- /dev/null
@@ -0,0 +1,8 @@
+// stdafx.cpp : source file that includes just the standard includes\r
+//     Stream.pch will be the pre-compiled header\r
+//     stdafx.obj will contain the pre-compiled type information\r
+\r
+#include "stdafx.h"\r
+\r
+// TODO: reference any additional headers you need in STDAFX.H\r
+// and not in this file\r
diff --git a/AVTGigESDK_Win/GigESDK/examples/ChangeROI/StdAfx.h b/AVTGigESDK_Win/GigESDK/examples/ChangeROI/StdAfx.h
new file mode 100644 (file)
index 0000000..75d9e7c
--- /dev/null
@@ -0,0 +1,13 @@
+// stdafx.h : include file for standard system include files,\r
+//  or project specific include files that are used frequently, but\r
+//      are changed infrequently\r
+//\r
+\r
+#if !defined(AFX_STDAFX_H__224EC810_0DF9_4A31_A149_E69197045CE8__INCLUDED_)\r
+#define AFX_STDAFX_H__224EC810_0DF9_4A31_A149_E69197045CE8__INCLUDED_\r
+\r
+#if _MSC_VER > 1000\r
+#pragma once\r
+#endif // _MSC_VER > 1000\r
+\r
+#endif // !defined(AFX_STDAFX_H__224EC810_0DF9_4A31_A149_E69197045CE8__INCLUDED_)\r
diff --git a/AVTGigESDK_Win/GigESDK/examples/EventCallback/EventCallback.cpp b/AVTGigESDK_Win/GigESDK/examples/EventCallback/EventCallback.cpp
new file mode 100644 (file)
index 0000000..4d5f57a
--- /dev/null
@@ -0,0 +1,560 @@
+/*\r
+| ==============================================================================\r
+| Copyright (C) 2011 Allied Vision Technologies.  All Rights Reserved.\r
+|\r
+| Redistribution of this header file, in original or modified form, without\r
+| prior written consent of AVT is prohibited.\r
+|\r
+|==============================================================================\r
+|\r
+| EventCallback\r
+|\r
+| Based on StreamPnp. Adding PvCameraEventCallbackRegister mechanism,\r
+| allowing callback to occur on many different camera signals/events. As of\r
+| firmware 1.42, the following events are available:\r
+|   AcquisitionStart\r
+|   AcquisitionEnd\r
+|   FrameTrigger\r
+|   ExposureEnd\r
+|   AcquisitionRecordTrigger\r
+|   SyncIn1Rise\r
+|   SyncIn1Fall\r
+|   SyncIn2Rise\r
+|   SyncIn2Fall\r
+|   SyncIn3Rise\r
+|   SyncIn3Fall\r
+|   SyncIn4Rise\r
+|   SyncIn4Fall\r
+| See Event Controls section of the "Camera and Driver" attributes document\r
+| online at http://www.alliedvisiontec.com for the latest listing of supported\r
+| events.\r
+|\r
+| Three callback mechanisms at work here: \r
+| - PvLinkCallbackRegister: Callback when camera first recognized or unplugged\r
+| - PvCameraEventCallbackRegister: See above\r
+| - FrameCallback: when frame completes.\r
+|\r
+| Program flow:\r
+| - Main thread registers link callback, waits for Ctrl+C escape\r
+| - Link callback registers event callbacks, sets camera to 5 FPS, starts streaming.\r
+| - Event callbacks print the returned event\r
+| - Frame Callbacks requeue frames for streaming.\r
+|\r
+|==============================================================================\r
+|\r
+| THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED\r
+| WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF TITLE,\r
+| NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR  PURPOSE ARE\r
+| DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,\r
+| INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\r
+| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\r
+| OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED  AND ON ANY THEORY OF\r
+| LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+| NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
+| EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+|\r
+|==============================================================================\r
+*/\r
+\r
+#ifdef _WINDOWS\r
+#include "StdAfx.h"\r
+#endif\r
+\r
+#include <stdio.h>\r
+#include <stdlib.h>\r
+#include <string.h>\r
+\r
+#ifdef _WINDOWS\r
+#define WIN32_LEAN_AND_MEAN\r
+#include <Windows.h>\r
+#include <Winsock2.h>\r
+#endif\r
+\r
+#if defined(_LINUX) || defined(_QNX) || defined(_OSX)\r
+#include <unistd.h>\r
+#include <pthread.h>\r
+#include <signal.h>\r
+#include <sys/times.h>\r
+#include <arpa/inet.h>\r
+#endif\r
+\r
+#include <PvApi.h>\r
+\r
+#ifdef _WINDOWS\r
+#define _STDCALL __stdcall\r
+#else\r
+#define _STDCALL\r
+#define TRUE     0\r
+#endif\r
+\r
+#define FRAMESCOUNT 10\r
+\r
+typedef struct \r
+{\r
+    unsigned long   UID;\r
+    tPvHandle       Handle;\r
+    tPvFrame        Frames[FRAMESCOUNT]; \r
+    bool            Abort;\r
+    \r
+} tCamera;\r
+\r
+// global camera data\r
+tCamera         GCamera;\r
+\r
+#if defined(_LINUX) || defined(_QNX) || defined(_OSX)\r
+struct tms      gTMS;\r
+unsigned long   gT00 = times(&gTMS);\r
+\r
+void Sleep(unsigned int time)\r
+{\r
+    struct timespec t,r;\r
+    \r
+    t.tv_sec    = time / 1000;\r
+    t.tv_nsec   = (time % 1000) * 1000000;    \r
+    \r
+    while(nanosleep(&t,&r)==-1)\r
+        t = r;\r
+}\r
+\r
+void SetConsoleCtrlHandler(void (*func)(int), int junk)\r
+{\r
+    signal(SIGINT, func);\r
+}\r
+#endif\r
+\r
+// wait until ctrl+C abort\r
+void WaitForEver()\r
+{\r
+  while(!GCamera.Abort)\r
+        Sleep(500);\r
+}\r
+\r
+// CTRL-C handler\r
+#ifdef _WINDOWS\r
+BOOL WINAPI CtrlCHandler(DWORD dwCtrlType)\r
+#else\r
+void CtrlCHandler(int Signo)\r
+#endif \r
+{  \r
+    printf("Ctrl+C interrupt received.\n");\r
+       GCamera.Abort = true;       \r
+    #ifndef _WINDOWS\r
+    signal(SIGINT, CtrlCHandler);\r
+    #else\r
+    return true;\r
+    #endif\r
+}\r
+\r
+// Event callback.  This is called by PvApi when camera event(s) occur.\r
+void _STDCALL F_CameraEventCallback(void*                   Context,\r
+                                    tPvHandle               Camera,\r
+                                    const tPvCameraEvent*      EventList,\r
+                                    unsigned long                      EventListLength)\r
+{\r
+       //multiple events may have occurred for this one callback\r
+       for (unsigned long i = 0; i < EventListLength; i++)\r
+       {\r
+               switch (EventList[i].EventId) {\r
+                       case 40000:\r
+                               printf("EventAcquisitionStart\n");\r
+                               break;\r
+                       case 40001:\r
+                               printf("EventAcquisitionEnd\n");\r
+                               break;\r
+                       case 40002:\r
+                               printf("EventFrameTrigger\n");\r
+                               break;\r
+                       case 40003:\r
+                               printf("EventExposureEnd\n");\r
+                               break;\r
+                       case 40004:\r
+                               printf("EventAcquisitionRecordTrigger\n");\r
+                               break;\r
+                       case 40010:\r
+                               printf("EventSyncIn1Rise\n");\r
+                               break;\r
+                       case 40011:\r
+                               printf("EventSyncIn1Fall\n");\r
+                               break;\r
+                       case 40012:\r
+                               printf("EventSyncIn2Rise\n");\r
+                               break;\r
+                       case 40013:\r
+                               printf("EventSyncIn2Fall\n");\r
+                               break;\r
+                       case 40014:\r
+                               printf("EventSyncIn3Rise\n");\r
+                               break;\r
+                       case 40015:\r
+                               printf("EventSyncIn3Fall\n");\r
+                               break;\r
+                       case 40016:\r
+                               printf("EventSyncIn4Rise\n");\r
+                               break;\r
+                       case 40017:\r
+                               printf("EventSyncIn4Fall\n");\r
+                               break;\r
+                       case 65534:\r
+                               printf("EventOverflow error\n");\r
+                               break;\r
+                       default:\r
+                               printf("Event %u\n",EventList[i].EventId);\r
+                               break;\r
+               }\r
+       }\r
+}\r
+\r
+// setup event channel\r
+// return value: true == success, false == fail\r
+bool EventSetup()\r
+{\r
+       unsigned long EventBitmask;\r
+       tPvErr errCode;\r
+       \r
+       // check if events supported with this camera firmware\r
+       if (PvAttrExists(GCamera.Handle,"EventsEnable1") == ePvErrNotFound)\r
+       {\r
+        printf("This camera does not support event notifications.\n");\r
+        return false;\r
+       }\r
+       \r
+       //Clear all events\r
+       //EventsEnable1 is a bitmask of all events. Bits correspond to last two digits of EventId.\r
+       // e.g: Bit 1 is EventAcquisitionStart, Bit 2 is EventAcquisitionEnd, Bit 10 is EventSyncIn1Rise. \r
+    if ((errCode = PvAttrUint32Set(GCamera.Handle,"EventsEnable1",0)) != ePvErrSuccess)\r
+       {\r
+               printf("Set EventsEnable1 err: %u\n", errCode);\r
+               return false;\r
+       }\r
+            \r
+       //Set individual events (could do in one step with EventsEnable1).\r
+       if ((errCode = PvAttrEnumSet(GCamera.Handle,"EventSelector","AcquisitionStart")) != ePvErrSuccess)\r
+       {\r
+               printf("Set EventsSelector err: %u\n", errCode);\r
+               return false;\r
+       }\r
+    if ((errCode = PvAttrEnumSet(GCamera.Handle,"EventNotification","On")) != ePvErrSuccess)\r
+       {\r
+               printf("Set EventsNotification err: %u\n", errCode);\r
+               return false;\r
+       }\r
+\r
+       if ((errCode = PvAttrEnumSet(GCamera.Handle,"EventSelector","AcquisitionEnd")) != ePvErrSuccess)\r
+       {\r
+               printf("Set EventsSelector err: %u\n", errCode);\r
+               return false;\r
+       }\r
+    if ((errCode = PvAttrEnumSet(GCamera.Handle,"EventNotification","On")) != ePvErrSuccess)\r
+       {\r
+               printf("Set EventsNotification err: %u\n", errCode);\r
+               return false;\r
+       }\r
+\r
+       if ((errCode = PvAttrEnumSet(GCamera.Handle,"EventSelector","FrameTrigger")) != ePvErrSuccess)\r
+       {\r
+               printf("Set EventsSelector err: %u\n", errCode);\r
+               return false;\r
+       }\r
+    if ((errCode = PvAttrEnumSet(GCamera.Handle,"EventNotification","On")) != ePvErrSuccess)\r
+       {\r
+               printf("Set EventsNotification err: %u\n", errCode);\r
+               return false;\r
+       }\r
+       \r
+       //Get and print bitmask\r
+       PvAttrUint32Get(GCamera.Handle,"EventsEnable1", &EventBitmask);\r
+       printf("Events set. EventsEnable1 bitmask: %u\n", EventBitmask);\r
+\r
+    //register callback function\r
+       if ((errCode = PvCameraEventCallbackRegister(GCamera.Handle,F_CameraEventCallback,NULL)) != ePvErrSuccess)\r
+    {\r
+               printf("PvCameraEventCallbackRegister err: %u\n", errCode);\r
+        return false;\r
+    }     \r
+       return true;\r
+}\r
+\r
+// unsetup event channel\r
+void EventUnsetup()\r
+{\r
+    // wait so that the "AcquisitionEnd" [from CameraStop()] can be received on the event channel\r
+    Sleep(1000);\r
+       // clear all events\r
+       PvAttrUint32Set(GCamera.Handle,"EventsEnable1",0);\r
+    // unregister callback function\r
+       PvCameraEventCallbackUnRegister(GCamera.Handle,F_CameraEventCallback);\r
+}\r
+\r
+// Frame completed callback executes on seperate driver thread.\r
+// One callback thread per camera. If a frame callback function has not \r
+// completed, and the next frame returns, the next frame's callback function is queued. \r
+// This situation is best avoided (camera running faster than host can process frames). \r
+// Spend as little time in this thread as possible and offload processing\r
+// to other threads or save processing until later.\r
+//\r
+// Note: If a camera is unplugged, this callback will not get called until PvCaptureQueueClear.\r
+// i.e. callback with pFrame->Status = ePvErrUnplugged doesn't happen -- so don't rely\r
+// on this as a test for a missing camera. \r
+void _STDCALL FrameDoneCB(tPvFrame* pFrame)\r
+{ \r
+       // if frame hasn't been cancelled, requeue frame\r
+    if(pFrame->Status != ePvErrCancelled)\r
+               PvCaptureQueueFrame(GCamera.Handle,pFrame,FrameDoneCB); \r
+}\r
+\r
+// open camera, allocate memory\r
+// return value: true == success, false == fail\r
+bool CameraSetup()\r
+{\r
+    tPvErr errCode;\r
+       bool failed = false;\r
+       unsigned long FrameSize = 0;\r
+\r
+       // open camera\r
+       if ((errCode = PvCameraOpen(GCamera.UID,ePvAccessMaster,&(GCamera.Handle))) != ePvErrSuccess)\r
+       {\r
+               if (errCode == ePvErrAccessDenied)\r
+                       printf("PvCameraOpen returned ePvErrAccessDenied:\nCamera already open, or not properly closed.\n");\r
+               else\r
+                       printf("PvCameraOpen err: %u\n", errCode);\r
+               return false;\r
+       }\r
+\r
+       // Calculate frame buffer size\r
+    if((errCode = PvAttrUint32Get(GCamera.Handle,"TotalBytesPerFrame",&FrameSize)) != ePvErrSuccess)\r
+       {\r
+               printf("CameraSetup: Get TotalBytesPerFrame err: %u\n", errCode);\r
+               return false;\r
+       }\r
+\r
+       // allocate the frame buffers\r
+    for(int i=0;i<FRAMESCOUNT && !failed;i++)\r
+    {\r
+        GCamera.Frames[i].ImageBuffer = new char[FrameSize];\r
+        if(GCamera.Frames[i].ImageBuffer)\r
+        {\r
+                       GCamera.Frames[i].ImageBufferSize = FrameSize;\r
+               }\r
+        else\r
+               {\r
+                       printf("CameraSetup: Failed to allocate buffers.\n");\r
+                       failed = true;\r
+               }\r
+    }\r
+\r
+       return !failed;\r
+}\r
+\r
+// close camera, free memory.\r
+void CameraUnsetup()\r
+{\r
+    tPvErr errCode;\r
+       \r
+    if((errCode = PvCameraClose(GCamera.Handle)) != ePvErrSuccess)\r
+       {\r
+               printf("CameraUnSetup: PvCameraClose err: %u\n", errCode);\r
+       }\r
+       else\r
+       {\r
+               printf("Camera closed.\n");\r
+       }\r
+       // delete image buffers\r
+    for(int i=0;i<FRAMESCOUNT;i++)\r
+        delete [] (char*)GCamera.Frames[i].ImageBuffer;\r
+\r
+    GCamera.Handle = NULL;\r
+}\r
+\r
+\r
+// setup and start streaming\r
+// return value: true == success, false == fail\r
+bool CameraStart()\r
+{\r
+    tPvErr errCode;\r
+       bool failed = false;\r
+\r
+    // NOTE: This call sets camera PacketSize to largest sized test packet, up to 8228, that doesn't fail\r
+       // on network card. Some MS VISTA network card drivers become unresponsive if test packet fails. \r
+       // Use PvUint32Set(handle, "PacketSize", MaxAllowablePacketSize) instead. See network card properties\r
+       // for max allowable PacketSize/MTU/JumboFrameSize. \r
+       if((errCode = PvCaptureAdjustPacketSize(GCamera.Handle,8228)) != ePvErrSuccess)\r
+       {\r
+               printf("CameraStart: PvCaptureAdjustPacketSize err: %u\n", errCode);\r
+               return false;\r
+       }\r
+\r
+    //&nbs