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     // Details:    After configuration of the interface, close it by calling this function.
00077     //
00078     IMEXPORT virtual VmbErrorType Close();
00079 
00080     //
00081     // Method:      GetID()
00082     //
00083     // Purpose:     Gets the ID of an interface.
00084     //
00085     // Parameters:  [out]   std::string     &ID         The ID of the interface
00086     //
00087     // Returns:
00088     //  - VmbErrorSuccess:       If no error
00089     //
00090     //              This information remains static throughout the object's lifetime
00091     //
00092     VmbErrorType GetID( std::string &ID ) const;
00093 
00094     //
00095     // Method:      GetType()
00096     //
00097     // Purpose:     Gets the type, e.g. FireWire, Ethernet, USB, of an interface.
00098     //
00099     // Parameters:  [out]   VmbInterfaceType     &type  The type of the interface
00100     //
00101     // Returns:
00102     //  - VmbErrorSuccess:       If no error
00103     //
00104     //              This information remains static throughout the object's lifetime
00105     //
00106     IMEXPORT VmbErrorType GetType( VmbInterfaceType &type ) const;
00107 
00108     //
00109     // Method:      GetName()
00110     //
00111     // Purpose:     Gets the name of an interface.
00112     //
00113     // Parameters:  [out]   std::string     &name       The name of the interface
00114     //
00115     // Returns:
00116     //  - VmbErrorSuccess:       If no error
00117     //
00118     //              This information remains static throughout the object's lifetime
00119     //
00120     VmbErrorType GetName( std::string &name ) const;
00121 
00122     //
00123     // Method:      GetSerialNumber()
00124     //
00125     // Purpose:     Gets the serial number of an interface.
00126     //
00127     // Parameters:  [out]   std::string &serialNumber   The serial number of the interface
00128     //
00129     // Returns:
00130     //  - VmbErrorSuccess:       If no error
00131     //
00132     //              This information remains static throughout the object's lifetime
00133     //
00134     VmbErrorType GetSerialNumber( std::string &serialNumber ) const;
00135 
00136     //
00137     // Method:      GetPermittedAccess()
00138     //
00139     // Purpose:     Gets the access mode of an interface.
00140     //
00141     // Parameters:  [out]   VmbAccessModeType   &accessMode The possible access mode of the interface
00142     //
00143     // Returns:
00144     //  - VmbErrorSuccess:       If no error
00145     //
00146     IMEXPORT VmbErrorType GetPermittedAccess( VmbAccessModeType &accessMode ) const;
00147 
00148   private:
00149     // Default ctor
00150     Interface();
00151     // Copy ctor
00152     Interface( const Interface& );
00153     // Assignment operator
00154     Interface& operator=( const Interface& );
00155 
00156     struct Impl;
00157     Impl *m_pImpl;
00158 
00159     // Array functions to pass data across DLL boundaries
00160     IMEXPORT VmbErrorType GetID( char * const pID, VmbUint32_t &length ) const;
00161     IMEXPORT VmbErrorType GetName( char * const pName, VmbUint32_t &length ) const;
00162     IMEXPORT VmbErrorType GetSerialNumber( char * const pSerial, VmbUint32_t &length ) const;
00163 };
00164 
00165 #include <VimbaCPP/Include/Interface.hpp>
00166 
00167 }} // namespace AVT::VmbAPI
00168 
00169 #endif


avt_vimba_camera
Author(s): Miquel Massot , Allied Vision Technologies
autogenerated on Thu Aug 27 2015 12:29:49