AncillaryData.h 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. /*=============================================================================
  2. Copyright (C) 2012 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: AncillaryData.h
  7. Description: Definition of class AVT::VmbAPI::AncillaryData.
  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_ANCILLARYDATA_H
  21. #define AVT_VMBAPI_ANCILLARYDATA_H
  22. #include <VimbaC/Include/VmbCommonTypes.h>
  23. #include <VimbaCPP/Include/VimbaCPPCommon.h>
  24. #include <VimbaCPP/Include/FeatureContainer.h>
  25. namespace AVT {
  26. namespace VmbAPI {
  27. class AncillaryData : public FeatureContainer
  28. {
  29. public:
  30. AncillaryData( VmbFrame_t *pFrame );
  31. ~AncillaryData();
  32. //
  33. // Method: Open()
  34. //
  35. // Purpose: Opens the ancillary data to allow access to the elements of the ancillary data via feature access.
  36. //
  37. // Returns:
  38. //
  39. // - VmbErrorSuccess: If no error
  40. // - VmbErrorApiNotStarted: VmbStartup() was not called before the current command
  41. //
  42. // Details: This function can only succeed if the given frame has been filled by the API.
  43. //
  44. IMEXPORT VmbErrorType Open();
  45. //
  46. // Method: Close()
  47. //
  48. // Purpose: Closes the ancillary data inside a frame.
  49. //
  50. // Returns:
  51. //
  52. // - VmbErrorSuccess: If no error
  53. // - VmbErrorApiNotStarted: VmbStartup() was not called before the current command
  54. // - VmbErrorBadHandle: The given handle is not valid
  55. //
  56. // Details: After reading the ancillary data and before re-queuing the frame, ancillary data
  57. // must be closed.
  58. //
  59. IMEXPORT VmbError_t Close();
  60. //
  61. // Method: GetBuffer()
  62. //
  63. // Purpose: Returns the underlying buffer
  64. //
  65. // Parameters: [out] VmbUchar_t*& pBuffer A pointer to the buffer
  66. //
  67. // Returns:
  68. //
  69. // - VmbErrorSuccess: If no error
  70. //
  71. IMEXPORT VmbErrorType GetBuffer( VmbUchar_t* &pBuffer );
  72. //
  73. // Method: GetBuffer()
  74. //
  75. // Purpose: Returns the underlying buffer
  76. //
  77. // Parameters: [out] const VmbUchar_t*& pBuffer A pointer to the buffer
  78. //
  79. // Returns:
  80. //
  81. // - VmbErrorSuccess: If no error
  82. //
  83. IMEXPORT VmbErrorType GetBuffer( const VmbUchar_t* &pBuffer ) const;
  84. //
  85. // Method: GetSize()
  86. //
  87. // Purpose: Returns the size of the underlying buffer
  88. //
  89. // Parameters: [out] VmbUint32_t& size The size of the buffer
  90. //
  91. // Returns:
  92. //
  93. // - VmbErrorSuccess: If no error
  94. //
  95. IMEXPORT VmbErrorType GetSize( VmbUint32_t &size ) const;
  96. private:
  97. struct Impl;
  98. Impl *m_pImpl;
  99. // No default ctor
  100. AncillaryData();
  101. // No copy ctor
  102. AncillaryData( const AncillaryData& );
  103. // No assignment operator
  104. AncillaryData& operator=( const AncillaryData& );
  105. };
  106. }} // namespace AVT::VmbAPI
  107. #endif