IRegisterDevice.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: IRegisterDevice.h
10 
11  Description: Definition of interface AVT::VmbAPI::IRegisterDevice.
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_IREGISTERDEVICE_H
29 #define AVT_VMBAPI_IREGISTERDEVICE_H
30 
32 #include <vector>
33 
34 namespace AVT {
35 namespace VmbAPI {
36 
38 {
39  public:
40 
41  virtual ~IRegisterDevice() {};
42 
43  //
44  // Method: ReadRegisters()
45  //
46  // Purpose: Reads one or more registers consecutively. The number of registers to be read is determined by the number of provided addresses.
47  //
48  // Parameters: [in ] const Uint64Vector& addresses A list of register addresses
49  // [out] Uint64Vector& buffer The returned data as vector
50  //
51  // Returns:
52  // - VmbErrorSuccess: If all requested registers have been read
53  // - VmbErrorBadParameter: Vectors "addresses" and/or "buffer" are empty.
54  // - VmbErrorIncomplete: If at least one, but not all registers have been read. See overload ReadRegisters( const Uint64Vector&, Uint64Vector&, VmbUint32_t& ).
55  //
56  virtual VmbErrorType ReadRegisters( const Uint64Vector &addresses, Uint64Vector &buffer ) const = 0;
57 
58  //
59  // Method: ReadRegisters()
60  //
61  // Purpose: Same as ReadRegisters( const Uint64Vector&, Uint64Vector& ), but returns the number of successful read operations in case of an error.
62  //
63  // Parameters: [in ] const Uint64Vector& addresses A list of register addresses
64  // [out] Uint64Vector& buffer The returned data as vector
65  // [out] VmbUint32_t& completedReads The number of successfully read registers
66  //
67  // Returns:
68  // - VmbErrorSuccess: If all requested registers have been read
69  // - VmbErrorBadParameter: Vectors "addresses" and/or "buffer" are empty.
70  // - VmbErrorIncomplete: If at least one, but not all registers have been read.
71  //
72  virtual VmbErrorType ReadRegisters( const Uint64Vector &addresses, Uint64Vector &buffer, VmbUint32_t &completedReads ) const = 0;
73 
74  //
75  // Method: WriteRegisters()
76  //
77  // Purpose: Writes one or more registers consecutively. The number of registers to be written is determined by the number of provided addresses.
78  //
79  // Parameters: [in ] const Uint64Vector& addresses A list of register addresses
80  // [in ] const Uint64Vector& buffer The data to write as vector
81  //
82  // Returns:
83  // - VmbErrorSuccess: If all requested registers have been written
84  // - VmbErrorBadParameter: Vectors "addresses" and/or "buffer" are empty.
85  // - VmbErrorIncomplete: If at least one, but not all registers have been written. See overload WriteRegisters( const Uint64Vector&, const Uint64Vector&, VmbUint32_t& ).
86  //
87  virtual VmbErrorType WriteRegisters( const Uint64Vector &addresses, const Uint64Vector &buffer ) = 0;
88 
89  //
90  // Method: WriteRegisters()
91  //
92  // Purpose: Same as WriteRegisters( const Uint64Vector&, const Uint64Vector& ), but returns the number of successful write operations in case of an error VmbErrorIncomplete.
93  //
94  // Parameters: [in ] const Uint64Vector& addresses A list of register addresses
95  // [in ] const Uint64Vector& buffer The data to write as vector
96  // [out] VmbUint32_t& completedWrites The number of successfully read registers
97  //
98  // Returns:
99  // - VmbErrorSuccess: If all requested registers have been written
100  // - VmbErrorBadParameter: Vectors "addresses" and/or "buffer" are empty.
101  // - VmbErrorIncomplete: If at least one, but not all registers have been written.
102  //
103  virtual VmbErrorType WriteRegisters( const Uint64Vector &addresses, const Uint64Vector &buffer, VmbUint32_t &completedWrites ) = 0;
104 
105  //
106  // Method: ReadMemory()
107  //
108  // Purpose: Reads a block of memory. The number of bytes to read is determined by the size of the provided buffer.
109  //
110  // Parameters: [in ] const VmbUint64_t& address The address to read from
111  // [out] UcharVector& buffer The returned data as vector
112  //
113  // Returns:
114  // - VmbErrorSuccess: If all requested bytes have been read
115  // - VmbErrorBadParameter: Vector "buffer" is empty.
116  // - VmbErrorIncomplete: If at least one, but not all bytes have been read. See overload ReadMemory( const VmbUint64_t&, UcharVector&, VmbUint32_t& ).
117  //
118  virtual VmbErrorType ReadMemory( const VmbUint64_t &address, UcharVector &buffer ) const = 0;
119 
120  //
121  // Method: ReadMemory()
122  //
123  // Purpose: Same as ReadMemory( const Uint64Vector&, UcharVector& ), but returns the number of bytes successfully read in case of an error VmbErrorIncomplete.
124  //
125  // Parameters: [in ] const VmbUint64_t& address The address to read from
126  // [out] UcharVector& buffer The returned data as vector
127  // [out] VmbUint32_t& sizeComplete The number of successfully read bytes
128  //
129  // Returns:
130  // - VmbErrorSuccess: If all requested bytes have been read
131  // - VmbErrorBadParameter: Vector "buffer" is empty.
132  // - VmbErrorIncomplete: If at least one, but not all bytes have been read.
133  //
134  virtual VmbErrorType ReadMemory( const VmbUint64_t &address, UcharVector &buffer, VmbUint32_t &sizeComplete ) const = 0;
135 
136  //
137  // Method: WriteMemory()
138  //
139  // Purpose: Writes a block of memory. The number of bytes to write is determined by the size of the provided buffer.
140  //
141  // Parameters: [in] const VmbUint64_t& address The address to write to
142  // [in] const UcharVector& buffer The data to write as vector
143  //
144  // Returns:
145  // - VmbErrorSuccess: If all requested bytes have been written
146  // - VmbErrorBadParameter: Vector "buffer" is empty.
147  // - VmbErrorIncomplete: If at least one, but not all bytes have been written. See overload WriteMemory( const VmbUint64_t&, const UcharVector&, VmbUint32_t& ).
148  //
149  virtual VmbErrorType WriteMemory( const VmbUint64_t &address, const UcharVector &buffer ) = 0;
150 
151  //
152  // Method: WriteMemory()
153  //
154  // Purpose: Same as WriteMemory( const Uint64Vector&, const UcharVector& ), but returns the number of bytes successfully written in case of an error VmbErrorIncomplete.
155  //
156  // Parameters: [in] const VmbUint64_t& address The address to write to
157  // [in] const UcharVector& buffer The data to write as vector
158  // [out] VmbUint32_t& sizeComplete The number of successfully written bytes
159  //
160  // Returns:
161  // - VmbErrorSuccess: If all requested bytes have been written
162  // - VmbErrorBadParameter: Vector "buffer" is empty.
163  // - VmbErrorIncomplete: If at least one, but not all bytes have been written.
164  //
165  virtual VmbErrorType WriteMemory( const VmbUint64_t &address, const UcharVector &buffer, VmbUint32_t &sizeComplete ) = 0;
166 };
167 
168 }} // namespace AVT::VmbAPI
169 
170 #endif
virtual VmbErrorType ReadRegisters(const Uint64Vector &addresses, Uint64Vector &buffer) const =0
VmbErrorType
virtual VmbErrorType ReadMemory(const VmbUint64_t &address, UcharVector &buffer) const =0
unsigned long long VmbUint64_t
std::vector< VmbUint64_t > Uint64Vector
std::vector< VmbUchar_t > UcharVector
virtual VmbErrorType WriteMemory(const VmbUint64_t &address, const UcharVector &buffer)=0
unsigned int VmbUint32_t
virtual VmbErrorType WriteRegisters(const Uint64Vector &addresses, const Uint64Vector &buffer)=0


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