Interface.h
Go to the documentation of this file.
00001 /*=============================================================================
00002   Copyright (C) 2012 Allied Vision Technologies.  All Rights Reserved.
00003 
00004   Redistribution of this file, in original or modified form, without
00005   prior written consent of Allied Vision Technologies is prohibited.
00006 
00007 -------------------------------------------------------------------------------
00008 
00009   File:        Interface.h
00010 
00011   Description: Definition of class AVT::VmbAPI::Interface.
00012 
00013 -------------------------------------------------------------------------------
00014 
00015   THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
00016   WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF TITLE,
00017   NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR  PURPOSE ARE
00018   DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, 
00019   INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 
00020   (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
00021   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED  
00022   AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR 
00023   TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
00024   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00025 
00026 =============================================================================*/
00027 
00028 #ifndef AVT_VMBAPI_INTERFACE_H
00029 #define AVT_VMBAPI_INTERFACE_H
00030 
00031 #include <VimbaC/Include/VimbaC.h>
00032 #include <VimbaCPP/Include/VimbaCPPCommon.h>
00033 #include <VimbaCPP/Include/FeatureContainer.h>
00034 #include <vector>
00035 
00036 namespace AVT {
00037 namespace VmbAPI {
00038 
00039 class Interface : public FeatureContainer
00040 {
00041   public:
00042 
00043     Interface( const VmbInterfaceInfo_t *pInterfaceInfo );
00044 
00045     virtual ~Interface();
00046 
00047     //
00048     // Method:      Open()
00049     //
00050     // Purpose:     Open an interface handle for feature access.
00051     //
00052     // Parameters:  none
00053     //
00054     // Returns:
00055     //  - VmbErrorSuccess:       If no error
00056     //  - VmbErrorApiNotStarted: VmbStartup() was not called before the current command
00057     //  - VmbErrorNotFound:      The designated interface cannot be found   
00058     //
00059     // Details:   An interface can be opened if interface-specific control is required, such as I/O pins
00060     //            on a frame grabber card. Control is then possible via feature access methods.
00061     //
00062     IMEXPORT virtual VmbErrorType Open();
00063 
00064     //
00065     // Method:      Close()
00066     //
00067     // Purpose:     Close an interface.
00068     //
00069     // Parameters:  none    
00070     //
00071     // Returns:
00072     //  - VmbErrorSuccess:       If no error
00073     //  - VmbErrorApiNotStarted: VmbStartup() was not called before the current command
00074     //  - VmbErrorBadHandle:     The handle is not valid
00075     //
00076     IMEXPORT virtual VmbErrorType Close();
00077 
00078     //
00079     // Method:      GetID()
00080     //
00081     // Purpose:     Gets the ID of an interface.
00082     //
00083     // Parameters:  [out]   std::string&        interfaceID          The ID of the interface
00084     //
00085     // Returns:
00086     //  - VmbErrorSuccess:       If no error
00087     //
00088     // Details:    This information remains static throughout the object's lifetime
00089     //
00090     VmbErrorType GetID( std::string &interfaceID ) const;
00091 
00092     //
00093     // Method:      GetType()
00094     //
00095     // Purpose:     Gets the type, e.g. FireWire, GigE or USB of an interface.
00096     //
00097     // Parameters:  [out]   VmbInterfaceType&   type        The type of the interface
00098     //
00099     // Returns:
00100     //  - VmbErrorSuccess:       If no error
00101     //
00102     //  Details:    This information remains static throughout the object's lifetime
00103     //
00104     IMEXPORT VmbErrorType GetType( VmbInterfaceType &type ) const;
00105 
00106     //
00107     // Method:      GetName()
00108     //
00109     // Purpose:     Gets the name of an interface.
00110     //
00111     // Parameters:  [out]   std::string&        name        The name of the interface
00112     //
00113     // Returns:
00114     //  - VmbErrorSuccess:       If no error
00115     //
00116     //              This information remains static throughout the object's lifetime
00117     //
00118     VmbErrorType GetName( std::string &name ) const;
00119 
00120     //
00121     // Method:      GetSerialNumber()
00122     //
00123     // Purpose:     Gets the serial number of an interface.
00124     //
00125     // Parameters:  [out]   std::string&    serialNumber    The serial number of the interface
00126     //
00127     // Returns:
00128     //  - VmbErrorSuccess:       If no error
00129     //
00130     //              This information remains static throughout the object's lifetime
00131     //
00132     VmbErrorType GetSerialNumber( std::string &serialNumber ) const;
00133 
00134     //
00135     // Method:      GetPermittedAccess()
00136     //
00137     // Purpose:     Gets the access mode of an interface.
00138     //
00139     // Parameters:  [out]   VmbAccessModeType&  accessMode  The possible access mode of the interface
00140     //
00141     // Returns:
00142     //  - VmbErrorSuccess:       If no error
00143     //
00144     IMEXPORT VmbErrorType GetPermittedAccess( VmbAccessModeType &accessMode ) const;
00145 
00146   private:
00147     // Default ctor
00148     Interface();
00149     // Copy ctor
00150     Interface( const Interface& );
00151     // Assignment operator
00152     Interface& operator=( const Interface& );
00153 
00154     struct Impl;
00155     Impl *m_pImpl;
00156 
00157     // Array functions to pass data across DLL boundaries
00158     IMEXPORT VmbErrorType GetID( char * const pID, VmbUint32_t &length ) const;
00159     IMEXPORT VmbErrorType GetName( char * const pName, VmbUint32_t &length ) const;
00160     IMEXPORT VmbErrorType GetSerialNumber( char * const pSerial, VmbUint32_t &length ) const;
00161 };
00162 
00163 #include <VimbaCPP/Include/Interface.hpp>
00164 
00165 }} // namespace AVT::VmbAPI
00166 
00167 #endif


avt_vimba_camera
Author(s): Miquel Massot , Allied Vision Technologies
autogenerated on Thu Jun 6 2019 18:23:39