VimbaCPPCommon.h 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. /*=============================================================================
  2. Copyright (C) 2012 - 2017 Allied Vision Technologies. All Rights Reserved.
  3. Redistribution of this file, in original or modified form, without
  4. prior written consent of Allied Vision Technologies is prohibited.
  5. -------------------------------------------------------------------------------
  6. File: VimbaCPPCommon.h
  7. Description: Common type definitions used in Vimba CPP API.
  8. -------------------------------------------------------------------------------
  9. THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
  10. WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF TITLE,
  11. NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  12. DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
  13. INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  14. (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  15. LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
  16. AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
  17. TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  18. OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  19. =============================================================================*/
  20. #ifndef AVT_VMBAPI_CPPCOMMON_H
  21. #define AVT_VMBAPI_CPPCOMMON_H
  22. #if defined (_WIN32)
  23. #if defined AVT_VMBAPI_CPP_EXPORTS // DLL exports
  24. #define IMEXPORT __declspec(dllexport)
  25. #elif defined AVT_VMBAPI_CPP_LIB // static LIB
  26. #define IMEXPORT
  27. #else // import
  28. #define IMEXPORT __declspec(dllimport)
  29. #endif
  30. #elif defined (__GNUC__) && (__GNUC__ >= 4) && defined (__ELF__)
  31. #define IMEXPORT
  32. #elif defined (__APPLE__)
  33. #define IMEXPORT
  34. #else
  35. #error Unknown platform, file needs adaption
  36. #endif
  37. #include <vector>
  38. #include <string>
  39. #include "VimbaC/Include/VmbCommonTypes.h"
  40. namespace AVT {
  41. namespace VmbAPI {
  42. enum UpdateTriggerType
  43. {
  44. UpdateTriggerPluggedIn = 0, // A new camera was discovered by Vimba
  45. UpdateTriggerPluggedOut = 1, // A camera has disappeared from the bus
  46. UpdateTriggerOpenStateChanged = 3 // The possible opening mode of a camera has changed (e.g., because it was opened by another application)
  47. };
  48. //
  49. // Indicate the frame allocation mode.
  50. //
  51. enum FrameAllocationMode
  52. {
  53. FrameAllocation_AnnounceFrame = 0, // Use announce frame mode
  54. FrameAllocation_AllocAndAnnounceFrame = 1 // Use alloc and announce mode
  55. };
  56. typedef std::vector<VmbUint64_t> Uint64Vector;
  57. typedef std::vector<VmbInt64_t> Int64Vector;
  58. typedef std::vector<VmbUchar_t> UcharVector;
  59. typedef std::vector<std::string> StringVector;
  60. class EnumEntry;
  61. typedef std::vector<EnumEntry> EnumEntryVector;
  62. }} // AVT::VmbAPI
  63. #endif