Interface.h
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: Interface.h
10 
11  Description: Definition of class AVT::VmbAPI::Interface.
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 AVT_VMBAPI_INTERFACE_H
29 #define AVT_VMBAPI_INTERFACE_H
30 
31 #include <VimbaC/Include/VimbaC.h>
34 #include <vector>
35 
36 namespace AVT {
37 namespace VmbAPI {
38 
40 {
41  public:
42 
43  Interface( const VmbInterfaceInfo_t *pInterfaceInfo );
44 
45  virtual ~Interface();
46 
47  //
48  // Method: Open()
49  //
50  // Purpose: Open an interface handle for feature access.
51  //
52  // Parameters: none
53  //
54  // Returns:
55  // - VmbErrorSuccess: If no error
56  // - VmbErrorApiNotStarted: VmbStartup() was not called before the current command
57  // - VmbErrorNotFound: The designated interface cannot be found
58  //
59  // Details: An interface can be opened if interface-specific control is required, such as I/O pins
60  // on a frame grabber card. Control is then possible via feature access methods.
61  //
62  IMEXPORT virtual VmbErrorType Open();
63 
64  //
65  // Method: Close()
66  //
67  // Purpose: Close an interface.
68  //
69  // Parameters: none
70  //
71  // Returns:
72  // - VmbErrorSuccess: If no error
73  // - VmbErrorApiNotStarted: VmbStartup() was not called before the current command
74  // - VmbErrorBadHandle: The handle is not valid
75  //
76  IMEXPORT virtual VmbErrorType Close();
77 
78  //
79  // Method: GetID()
80  //
81  // Purpose: Gets the ID of an interface.
82  //
83  // Parameters: [out] std::string& interfaceID The ID of the interface
84  //
85  // Returns:
86  // - VmbErrorSuccess: If no error
87  //
88  // Details: This information remains static throughout the object's lifetime
89  //
90  VmbErrorType GetID( std::string &interfaceID ) const;
91 
92  //
93  // Method: GetType()
94  //
95  // Purpose: Gets the type, e.g. FireWire, GigE or USB of an interface.
96  //
97  // Parameters: [out] VmbInterfaceType& type The type of the interface
98  //
99  // Returns:
100  // - VmbErrorSuccess: If no error
101  //
102  // Details: This information remains static throughout the object's lifetime
103  //
104  IMEXPORT VmbErrorType GetType( VmbInterfaceType &type ) const;
105 
106  //
107  // Method: GetName()
108  //
109  // Purpose: Gets the name of an interface.
110  //
111  // Parameters: [out] std::string& name The name of the interface
112  //
113  // Returns:
114  // - VmbErrorSuccess: If no error
115  //
116  // This information remains static throughout the object's lifetime
117  //
118  VmbErrorType GetName( std::string &name ) const;
119 
120  //
121  // Method: GetSerialNumber()
122  //
123  // Purpose: Gets the serial number of an interface.
124  //
125  // Parameters: [out] std::string& serialNumber The serial number of the interface
126  //
127  // Returns:
128  // - VmbErrorSuccess: If no error
129  //
130  // This information remains static throughout the object's lifetime
131  //
132  VmbErrorType GetSerialNumber( std::string &serialNumber ) const;
133 
134  //
135  // Method: GetPermittedAccess()
136  //
137  // Purpose: Gets the access mode of an interface.
138  //
139  // Parameters: [out] VmbAccessModeType& accessMode The possible access mode of the interface
140  //
141  // Returns:
142  // - VmbErrorSuccess: If no error
143  //
144  IMEXPORT VmbErrorType GetPermittedAccess( VmbAccessModeType &accessMode ) const;
145 
146  private:
147  // Default ctor
148  Interface();
149  // Copy ctor
150  Interface( const Interface& );
151  // Assignment operator
152  Interface& operator=( const Interface& );
153 
154  struct Impl;
155  Impl *m_pImpl;
156 
157  // Array functions to pass data across DLL boundaries
158  IMEXPORT VmbErrorType GetID( char * const pID, VmbUint32_t &length ) const;
159  IMEXPORT VmbErrorType GetName( char * const pName, VmbUint32_t &length ) const;
160  IMEXPORT VmbErrorType GetSerialNumber( char * const pSerial, VmbUint32_t &length ) const;
161 };
162 
164 
165 }} // namespace AVT::VmbAPI
166 
167 #endif
virtual IMEXPORT VmbErrorType Open()
Definition: Interface.cpp:75
VmbErrorType GetID(std::string &interfaceID) const
VmbErrorType GetName(std::string &name) const
virtual IMEXPORT VmbErrorType Close()
Definition: Interface.cpp:98
VmbErrorType
VmbAccessModeType
Definition: VimbaC.h:122
IMEXPORT VmbErrorType GetPermittedAccess(VmbAccessModeType &accessMode) const
Definition: Interface.cpp:193
VmbInterfaceType
Definition: VimbaC.h:107
unsigned int VmbUint32_t
Interface & operator=(const Interface &)
Definition: Interface.cpp:59
VmbErrorType GetSerialNumber(std::string &serialNumber) const
IMEXPORT VmbErrorType GetType(VmbInterfaceType &type) const
Definition: Interface.cpp:138


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