VmbCommonTypes.h
Go to the documentation of this file.
1 /*=============================================================================
2  Copyright (C) 2012 Allied Vision Technologies. All Rights Reserved.
3 
4  Redistribution of this header file, in original or modified form, without
5  prior written consent of Allied Vision Technologies is prohibited.
6 
7 -------------------------------------------------------------------------------
8 
9  File: VmbCommonTypes.h
10 
11  Description: Main header file for the common types of the Vimba APIs.
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 
28 #ifndef VMBCOMMONTYPES_H_INCLUDE_
29 #define VMBCOMMONTYPES_H_INCLUDE_
30 
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34 
35 // This file describes all necessary definitions for types used within
36 // Allied Vision's Vimba APIs. These type definitions are designed to be
37 // portable from other languages and other operating systems.
38 
39 #if defined (_MSC_VER)
40 
41  // 8 bit signed integer on Microsoft systems
42  typedef __int8 VmbInt8_t;
43  // 8 bit unsigned integer on Microsoft systems
44  typedef unsigned __int8 VmbUint8_t;
45  // 16 bit signed integer on Microsoft systems
46  typedef __int16 VmbInt16_t;
47  // 16 bit unsigned integer on Microsoft systems
48  typedef unsigned __int16 VmbUint16_t;
49  // 32 bit signed integer on Microsoft systems
50  typedef __int32 VmbInt32_t;
51  // 32 bit unsigned integer on Microsoft systems
52  typedef unsigned __int32 VmbUint32_t;
53  // 64 bit signed integer on Microsoft systems
54  typedef __int64 VmbInt64_t;
55  // 64 bit unsigned integer on Microsoft systems
56  typedef unsigned __int64 VmbUint64_t;
57 
58 #else // for non MS or GNU compilers without any warranty for the size
59 
60  //#pragma message("Compatibility warning: typedefs in " __FILE__ " may not have the correct number of bits")
61 
62  // 8 bit signed integer on non-Microsoft systems
63  typedef signed char VmbInt8_t;
64  // 8 bit unsigned integer on non-Microsoft systems
65  typedef unsigned char VmbUint8_t;
66  // 16 bit signed integer on non-Microsoft systems
67  typedef short VmbInt16_t;
68  // 16 bit unsigned integer on non-Microsoft systems
69  typedef unsigned short VmbUint16_t;
70  // 32 bit signed integer on non-Microsoft systems
71  typedef int VmbInt32_t;
72  // 32 bit signed integer on non-Microsoft systems
73  typedef unsigned int VmbUint32_t;
74  // 64 bit signed integer on non-Microsoft systems
75  typedef long long VmbInt64_t;
76  // 64 bit unsigned integer on non-Microsoft systems
77  typedef unsigned long long VmbUint64_t;
78 
79 #endif
80 
81  // Handle; e.g. for a camera
82  typedef void* VmbHandle_t;
83 
84 // Standard type for boolean values
85 #if defined(__cplusplus) || defined(__bool_true_false_are_defined)
86  typedef bool VmbBool_t;
87 #else
88  // Boolean type (equivalent to char)
89  typedef char VmbBool_t; // 1 means true and 0 means false
90 #endif
91  //
92  // enum for bool values
93  //
94  typedef enum VmbBoolVal
95  {
98  } VmbBoolVal;
99 
100  // char type
101  typedef unsigned char VmbUchar_t;
102 
103  //
104  // Error codes, returned by most functions: (not yet complete)
105  //
106  typedef enum VmbErrorType
107  {
108  VmbErrorSuccess = 0, // No error
109  VmbErrorInternalFault = -1, // Unexpected fault in VimbaC or driver
110  VmbErrorApiNotStarted = -2, // VmbStartup() was not called before the current command
111  VmbErrorNotFound = -3, // The designated instance (camera, feature etc.) cannot be found
112  VmbErrorBadHandle = -4, // The given handle is not valid
113  VmbErrorDeviceNotOpen = -5, // Device was not opened for usage
114  VmbErrorInvalidAccess = -6, // Operation is invalid with the current access mode
115  VmbErrorBadParameter = -7, // One of the parameters is invalid (usually an illegal pointer)
116  VmbErrorStructSize = -8, // The given struct size is not valid for this version of the API
117  VmbErrorMoreData = -9, // More data available in a string/list than space is provided
118  VmbErrorWrongType = -10, // Wrong feature type for this access function
119  VmbErrorInvalidValue = -11, // The value is not valid; either out of bounds or not an increment of the minimum
120  VmbErrorTimeout = -12, // Timeout during wait
121  VmbErrorOther = -13, // Other error
122  VmbErrorResources = -14, // Resources not available (e.g. memory)
123  VmbErrorInvalidCall = -15, // Call is invalid in the current context (e.g. callback)
124  VmbErrorNoTL = -16, // No transport layers are found
125  VmbErrorNotImplemented = -17, // API feature is not implemented
126  VmbErrorNotSupported = -18, // API feature is not supported
127  VmbErrorIncomplete = -19, // A multiple registers read or write is partially completed
128  } VmbErrorType;
129  typedef VmbInt32_t VmbError_t; // Type for an error returned by API methods; for values see VmbErrorType
130 
131  //
132  // Version information
133  //
134  typedef struct
135  {
136  VmbUint32_t major; // Major version number
137  VmbUint32_t minor; // Minor version number
138  VmbUint32_t patch; // Patch version number
139 
141 
142  //
143  // Indicate if pixel is monochrome or RGB.
144  //
145  typedef enum VmbPixelType
146  {
147  VmbPixelMono = 0x01000000, // Monochrome pixel
148  VmbPixelColor = 0x02000000 // Pixel bearing color information
149  } VmbPixelType;
150 
151  //
152  // Indicate number of bits for a pixel. Needed for building values of VmbPixelFormatType
153  //
154  typedef enum VmbPixelOccupyType
155  {
156  VmbPixelOccupy8Bit = 0x00080000, // Pixel effectively occupies 8 bits
157  VmbPixelOccupy10Bit = 0x000A0000, // Pixel effectively occupies 10 bits
158  VmbPixelOccupy12Bit = 0x000C0000, // Pixel effectively occupies 12 bits
159  VmbPixelOccupy14Bit = 0x000E0000, // Pixel effectively occupies 14 bits
160  VmbPixelOccupy16Bit = 0x00100000, // Pixel effectively occupies 16 bits
161  VmbPixelOccupy24Bit = 0x00180000, // Pixel effectively occupies 24 bits
162  VmbPixelOccupy32Bit = 0x00200000, // Pixel effectively occupies 32 bits
163  VmbPixelOccupy48Bit = 0x00300000, // Pixel effectively occupies 48 bits
164  VmbPixelOccupy64Bit = 0x00400000, // Pixel effectively occupies 48 bits
166 
167  //
168  // Pixel format types.
169  // As far as possible, the Pixel Format Naming Convention (PFNC) has been followed, allowing a few deviations.
170  // If data spans more than one byte, it is always LSB aligned, except if stated differently.
171  //
172  typedef enum VmbPixelFormatType
173  {
174  // mono formats
175  VmbPixelFormatMono8 = VmbPixelMono | VmbPixelOccupy8Bit | 0x0001, // Monochrome, 8 bits (PFNC:Mono8)
176  VmbPixelFormatMono10 = VmbPixelMono | VmbPixelOccupy16Bit | 0x0003, // Monochrome, 10 bits in 16 bits (PFNC:Mono10)
177  VmbPixelFormatMono10p = VmbPixelMono | VmbPixelOccupy10Bit | 0x0046, // Monochrome, 10 bits in 16 bits (PFNC:Mono10p)
178  VmbPixelFormatMono12 = VmbPixelMono | VmbPixelOccupy16Bit | 0x0005, // Monochrome, 12 bits in 16 bits (PFNC:Mono12)
179  VmbPixelFormatMono12Packed = VmbPixelMono | VmbPixelOccupy12Bit | 0x0006, // Monochrome, 2x12 bits in 24 bits (GEV:Mono12Packed)
180  VmbPixelFormatMono12p = VmbPixelMono | VmbPixelOccupy12Bit | 0x0047, // Monochrome, 2x12 bits in 24 bits (PFNC:MonoPacked)
181  VmbPixelFormatMono14 = VmbPixelMono | VmbPixelOccupy16Bit | 0x0025, // Monochrome, 14 bits in 16 bits (PFNC:Mono14)
182  VmbPixelFormatMono16 = VmbPixelMono | VmbPixelOccupy16Bit | 0x0007, // Monochrome, 16 bits (PFNC:Mono16)
183  // bayer formats
184  VmbPixelFormatBayerGR8 = VmbPixelMono | VmbPixelOccupy8Bit | 0x0008, // Bayer-color, 8 bits, starting with GR line (PFNC:BayerGR8)
185  VmbPixelFormatBayerRG8 = VmbPixelMono | VmbPixelOccupy8Bit | 0x0009, // Bayer-color, 8 bits, starting with RG line (PFNC:BayerRG8)
186  VmbPixelFormatBayerGB8 = VmbPixelMono | VmbPixelOccupy8Bit | 0x000A, // Bayer-color, 8 bits, starting with GB line (PFNC:BayerGB8)
187  VmbPixelFormatBayerBG8 = VmbPixelMono | VmbPixelOccupy8Bit | 0x000B, // Bayer-color, 8 bits, starting with BG line (PFNC:BayerBG8)
188  VmbPixelFormatBayerGR10 = VmbPixelMono | VmbPixelOccupy16Bit | 0x000C, // Bayer-color, 10 bits in 16 bits, starting with GR line (PFNC:BayerGR10)
189  VmbPixelFormatBayerRG10 = VmbPixelMono | VmbPixelOccupy16Bit | 0x000D, // Bayer-color, 10 bits in 16 bits, starting with RG line (PFNC:BayerRG10)
190  VmbPixelFormatBayerGB10 = VmbPixelMono | VmbPixelOccupy16Bit | 0x000E, // Bayer-color, 10 bits in 16 bits, starting with GB line (PFNC:BayerGB10)
191  VmbPixelFormatBayerBG10 = VmbPixelMono | VmbPixelOccupy16Bit | 0x000F, // Bayer-color, 10 bits in 16 bits, starting with BG line (PFNC:BayerBG10)
192  VmbPixelFormatBayerGR12 = VmbPixelMono | VmbPixelOccupy16Bit | 0x0010, // Bayer-color, 12 bits in 16 bits, starting with GR line (PFNC:BayerGR12)
193  VmbPixelFormatBayerRG12 = VmbPixelMono | VmbPixelOccupy16Bit | 0x0011, // Bayer-color, 12 bits in 16 bits, starting with RG line (PFNC:BayerRG12)
194  VmbPixelFormatBayerGB12 = VmbPixelMono | VmbPixelOccupy16Bit | 0x0012, // Bayer-color, 12 bits in 16 bits, starting with GB line (PFNC:BayerGB12)
195  VmbPixelFormatBayerBG12 = VmbPixelMono | VmbPixelOccupy16Bit | 0x0013, // Bayer-color, 12 bits in 16 bits, starting with BG line (PFNC:BayerBG12)
196  VmbPixelFormatBayerGR12Packed = VmbPixelMono | VmbPixelOccupy12Bit | 0x002A, // Bayer-color, 2x12 bits in 24 bits, starting with GR line (GEV:BayerGR12Packed)
197  VmbPixelFormatBayerRG12Packed = VmbPixelMono | VmbPixelOccupy12Bit | 0x002B, // Bayer-color, 2x12 bits in 24 bits, starting with RG line (GEV:BayerRG12Packed)
198  VmbPixelFormatBayerGB12Packed = VmbPixelMono | VmbPixelOccupy12Bit | 0x002C, // Bayer-color, 2x12 bits in 24 bits, starting with GB line (GEV:BayerGB12Packed)
199  VmbPixelFormatBayerBG12Packed = VmbPixelMono | VmbPixelOccupy12Bit | 0x002D, // Bayer-color, 2x12 bits in 24 bits, starting with BG line (GEV:BayerBG12Packed)
200  VmbPixelFormatBayerGR10p = VmbPixelMono | VmbPixelOccupy10Bit | 0x0056, // Bayer-color, 12 bits continuous packed, starting with GR line (PFNC:BayerGR10p)
201  VmbPixelFormatBayerRG10p = VmbPixelMono | VmbPixelOccupy10Bit | 0x0058, // Bayer-color, 12 bits continuous packed, starting with RG line (PFNC:BayerRG10p)
202  VmbPixelFormatBayerGB10p = VmbPixelMono | VmbPixelOccupy10Bit | 0x0054, // Bayer-color, 12 bits continuous packed, starting with GB line (PFNC:BayerGB10p)
203  VmbPixelFormatBayerBG10p = VmbPixelMono | VmbPixelOccupy10Bit | 0x0052, // Bayer-color, 12 bits continuous packed, starting with BG line (PFNC:BayerBG10p)
204  VmbPixelFormatBayerGR12p = VmbPixelMono | VmbPixelOccupy12Bit | 0x0057, // Bayer-color, 12 bits continuous packed, starting with GR line (PFNC:BayerGR12p)
205  VmbPixelFormatBayerRG12p = VmbPixelMono | VmbPixelOccupy12Bit | 0x0059, // Bayer-color, 12 bits continuous packed, starting with RG line (PFNC:BayerRG12p)
206  VmbPixelFormatBayerGB12p = VmbPixelMono | VmbPixelOccupy12Bit | 0x0055, // Bayer-color, 12 bits continuous packed, starting with GB line (PFNC:BayerGB12p)
207  VmbPixelFormatBayerBG12p = VmbPixelMono | VmbPixelOccupy12Bit | 0x0053, // Bayer-color, 12 bits continuous packed, starting with BG line (PFNC:BayerBG12p)
208  VmbPixelFormatBayerGR16 = VmbPixelMono | VmbPixelOccupy16Bit | 0x002E, // Bayer-color, 16 bits, starting with GR line (PFNC:BayerGR16)
209  VmbPixelFormatBayerRG16 = VmbPixelMono | VmbPixelOccupy16Bit | 0x002F, // Bayer-color, 16 bits, starting with RG line (PFNC:BayerRG16)
210  VmbPixelFormatBayerGB16 = VmbPixelMono | VmbPixelOccupy16Bit | 0x0030, // Bayer-color, 16 bits, starting with GB line (PFNC:BayerGB16)
211  VmbPixelFormatBayerBG16 = VmbPixelMono | VmbPixelOccupy16Bit | 0x0031, // Bayer-color, 16 bits, starting with BG line (PFNC:BayerBG16)
212  // rgb formats
213  VmbPixelFormatRgb8 = VmbPixelColor | VmbPixelOccupy24Bit | 0x0014, // RGB, 8 bits x 3 (PFNC:RGB8)
214  VmbPixelFormatBgr8 = VmbPixelColor | VmbPixelOccupy24Bit | 0x0015, // BGR, 8 bits x 3 (PFNC:BGR8)
215  VmbPixelFormatRgb10 = VmbPixelColor | VmbPixelOccupy48Bit | 0x0018, // RGB, 12 bits in 16 bits x 3 (PFNC:RGB12)
216  VmbPixelFormatBgr10 = VmbPixelColor | VmbPixelOccupy48Bit | 0x0019, // RGB, 12 bits in 16 bits x 3 (PFNC:RGB12)
217  VmbPixelFormatRgb12 = VmbPixelColor | VmbPixelOccupy48Bit | 0x001A, // RGB, 12 bits in 16 bits x 3 (PFNC:RGB12)
218  VmbPixelFormatBgr12 = VmbPixelColor | VmbPixelOccupy48Bit | 0x001B, // RGB, 12 bits in 16 bits x 3 (PFNC:RGB12)
219  VmbPixelFormatRgb16 = VmbPixelColor | VmbPixelOccupy48Bit | 0x0033, // RGB, 16 bits x 3 (PFNC:RGB16)
220  VmbPixelFormatBgr16 = VmbPixelColor | VmbPixelOccupy48Bit | 0x004B, // RGB, 16 bits x 3 (PFNC:RGB16)
221  // rgba formats
222  VmbPixelFormatArgb8 = VmbPixelColor | VmbPixelOccupy32Bit | 0x0016, // ARGB, 8 bits x 4 (PFNC:RGBa8)
223  VmbPixelFormatRgba8 = VmbPixelFormatArgb8, // RGBA, 8 bits x 4, legacy name
224  VmbPixelFormatBgra8 = VmbPixelColor | VmbPixelOccupy32Bit | 0x0017, // BGRA, 8 bits x 4 (PFNC:BGRa8)
225  VmbPixelFormatRgba10 = VmbPixelColor | VmbPixelOccupy64Bit | 0x005F, // RGBA, 8 bits x 4, legacy name
226  VmbPixelFormatBgra10 = VmbPixelColor | VmbPixelOccupy64Bit | 0x004C, // RGBA, 8 bits x 4, legacy name
227  VmbPixelFormatRgba12 = VmbPixelColor | VmbPixelOccupy64Bit | 0x0061, // RGBA, 8 bits x 4, legacy name
228  VmbPixelFormatBgra12 = VmbPixelColor | VmbPixelOccupy64Bit | 0x004E, // RGBA, 8 bits x 4, legacy name
229  VmbPixelFormatRgba16 = VmbPixelColor | VmbPixelOccupy64Bit | 0x0064, // RGBA, 8 bits x 4, legacy name
230  VmbPixelFormatBgra16 = VmbPixelColor | VmbPixelOccupy64Bit | 0x0051, // RGBA, 8 bits x 4, legacy name
231  // yuv/ycbcr formats
232  VmbPixelFormatYuv411 = VmbPixelColor | VmbPixelOccupy12Bit | 0x001E, // YUV 411 with 8 bits (GEV:YUV411Packed)
233  VmbPixelFormatYuv422 = VmbPixelColor | VmbPixelOccupy16Bit | 0x001F, // YUV 422 with 8 bits (GEV:YUV422Packed)
234  VmbPixelFormatYuv444 = VmbPixelColor | VmbPixelOccupy24Bit | 0x0020, // YUV 444 with 8 bits (GEV:YUV444Packed)
235  VmbPixelFormatYCbCr411_8_CbYYCrYY = VmbPixelColor | VmbPixelOccupy12Bit | 0x003C, // Y´CbCr 411 with 8 bits (PFNC:YCbCr411_8_CbYYCrYY) - identical to VmbPixelFormatYuv411
236  VmbPixelFormatYCbCr422_8_CbYCrY = VmbPixelColor | VmbPixelOccupy16Bit | 0x0043, // Y´CbCr 422 with 8 bits (PFNC:YCbCr422_8_CbYCrY) - identical to VmbPixelFormatYuv422
237  VmbPixelFormatYCbCr8_CbYCr = VmbPixelColor | VmbPixelOccupy24Bit | 0x003A, // Y´CbCr 444 with 8 bits (PFNC:YCbCr8_CbYCr) - identical to VmbPixelFormatYuv444
239  typedef VmbUint32_t VmbPixelFormat_t; // Type for the pixel format; for values see VmbPixelFormatType
240 
241 #ifdef __cplusplus
242 }
243 #endif
244 
245 #endif // VMBCOMMONTYPES_H_INCLUDE_
VmbInt32_t VmbError_t
char VmbBool_t
VmbPixelFormatType
long long VmbInt64_t
VmbBoolVal
int VmbInt32_t
VmbPixelType
VmbUint32_t minor
unsigned char VmbUint8_t
unsigned short VmbUint16_t
VmbPixelOccupyType
signed char VmbInt8_t
VmbErrorType
unsigned char VmbUchar_t
void * VmbHandle_t
VmbUint32_t major
VmbUint32_t patch
unsigned long long VmbUint64_t
VmbUint32_t VmbPixelFormat_t
unsigned int VmbUint32_t
short VmbInt16_t


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