AncillaryData.cpp
Go to the documentation of this file.
1 /*=============================================================================
2  Copyright (C) 2012 Allied Vision Technologies. All Rights Reserved.
3 
4  Redistribution of this file, in original or modified form, without
5  prior written consent of Allied Vision Technologies is prohibited.
6 
7 -------------------------------------------------------------------------------
8 
9  File: AncillaryData.cpp
10 
11  Description: Implementation of class AVT::VmbAPI::AncillaryData.
12 
13 -------------------------------------------------------------------------------
14 
15  THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
16  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF TITLE,
17  NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18  DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
19  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
22  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
23  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
24  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 
26 =============================================================================*/
27 
29 
30 #define IMAGE_CHUNK_TRAILER_LENGTH 8
31 
32 
33 namespace AVT {
34 namespace VmbAPI {
35 
37 {
39 };
40 
42 {
43  // No default ctor
44 }
45 
47 {
48  // No copy ctor
49 }
50 
52 {
53  // No assignment operator
54  return *this;
55 }
56 
58  : m_pImpl( new Impl() )
59 {
60  m_pImpl->m_pFrame = pFrame;
61 }
62 
64 {
65  delete m_pImpl;
66 }
67 
69 {
71 
72  if (m_pImpl->m_pFrame->ancillarySize > 0)
73  {
75  result = VmbErrorSuccess;
76  }
77 
78  return result;
79 }
80 
82 {
84 
85  if (m_pImpl->m_pFrame->ancillarySize > 0)
86  {
88  result = VmbErrorSuccess;
89  }
90 
91  return result;
92 }
93 
95 {
96  nSize = m_pImpl->m_pFrame->ancillarySize;
97 
98  return VmbErrorSuccess;
99 }
100 
102 {
103  VmbError_t res;
104  VmbHandle_t hHandle;
105 
106  res = VmbAncillaryDataOpen( m_pImpl->m_pFrame, &hHandle );
107 
108  if ( VmbErrorSuccess == res )
109  {
110  SetHandle( hHandle );
111  }
112 
113  return (VmbErrorType)res;
114 }
115 
117 {
119 
120  res = VmbAncillaryDataClose( GetHandle() );
121 
122  Reset();
123 
124  RevokeHandle();
125 
126  return (VmbErrorType)res;
127 }
128 
129 }} // namespace AVT::VmbAPI
VmbInt32_t VmbError_t
IMEXPORT VmbErrorType GetBuffer(VmbUchar_t *&pBuffer)
IMEXPORT VmbErrorType Open()
VmbUint32_t ancillarySize
Definition: VimbaC.h:285
IMEXPORT VmbErrorType GetSize(VmbUint32_t &size) const
#define IMAGE_CHUNK_TRAILER_LENGTH
VmbErrorType
VmbUint32_t imageSize
Definition: VimbaC.h:284
IMEXPORT VmbError_t Close()
unsigned char VmbUchar_t
void * VmbHandle_t
IMEXPORTC VmbError_t VMB_CALL VmbAncillaryDataOpen(VmbFrame_t *pFrame, VmbHandle_t *pAncillaryDataHandle)
IMEXPORTC VmbError_t VMB_CALL VmbAncillaryDataClose(VmbHandle_t ancillaryDataHandle)
unsigned int VmbUint32_t
void SetHandle(const VmbHandle_t handle)
void * buffer
Definition: VimbaC.h:275
AncillaryData & operator=(const AncillaryData &)


avt_vimba_camera
Author(s): Miquel Massot , Allied Vision Technologies
autogenerated on Mon Jun 10 2019 12:50:38