BaseFeature.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:        BaseFeature.h
00010 
00011   Description: Definition of base class AVT::VmbAPI::BaseFeature.
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_BASEFEATURE_H
00029 #define AVT_VMBAPI_BASEFEATURE_H
00030 
00031 #include <VimbaC/Include/VimbaC.h>
00032 #include <VimbaCPP/Include/VimbaCPPCommon.h>
00033 #include <VimbaCPP/Include/BasicLockable.h>
00034 #include <VimbaCPP/Include/Feature.h>
00035 
00036 namespace AVT {
00037 namespace VmbAPI {
00038 
00039 class BaseFeature : public virtual BasicLockable
00040 {
00041   friend class Feature;
00042 
00043   public:
00044     BaseFeature( const VmbFeatureInfo_t *pFeatureInfo, FeatureContainer *pFeatureContainer );
00045     virtual ~BaseFeature();
00046 
00047     IMEXPORT virtual    VmbErrorType GetValue( VmbInt64_t &value ) const;
00048     IMEXPORT virtual    VmbErrorType GetValue( double &value ) const;
00049     IMEXPORT virtual    VmbErrorType GetValue( bool &value ) const;
00050 
00051     IMEXPORT virtual    VmbErrorType SetValue( const VmbInt32_t &value );
00052     IMEXPORT virtual    VmbErrorType SetValue( const VmbInt64_t &value );
00053     IMEXPORT virtual    VmbErrorType SetValue( const double &value );
00054     IMEXPORT virtual    VmbErrorType SetValue( const char *pValue );
00055     IMEXPORT virtual    VmbErrorType SetValue( bool value );
00056 
00057     IMEXPORT virtual    VmbErrorType GetEntry( EnumEntry &entry, const char * pStrEntryName ) const;
00058 
00059     IMEXPORT virtual    VmbErrorType GetRange( VmbInt64_t &minimum, VmbInt64_t &maximum ) const;
00060     IMEXPORT virtual    VmbErrorType GetRange( double &minimum, double &maximum ) const;
00061 
00062     IMEXPORT virtual    VmbErrorType HasIncrement( VmbBool_t &incrementSupported) const;
00063     IMEXPORT virtual    VmbErrorType GetIncrement( VmbInt64_t &increment ) const;
00064     IMEXPORT virtual    VmbErrorType GetIncrement( double &increment ) const;
00065 
00066     IMEXPORT virtual    VmbErrorType IsValueAvailable( const char *pValue, bool &available ) const;
00067     IMEXPORT virtual    VmbErrorType IsValueAvailable( const VmbInt64_t value, bool &available ) const;
00068 
00069     IMEXPORT virtual    VmbErrorType RunCommand();
00070     IMEXPORT virtual    VmbErrorType IsCommandDone( bool &isDone ) const;
00071 
00072     IMEXPORT            VmbErrorType GetDataType( VmbFeatureDataType &dataType ) const;
00073     IMEXPORT            VmbErrorType GetFlags( VmbFeatureFlagsType &flags ) const;
00074     IMEXPORT            VmbErrorType GetPollingTime( VmbUint32_t &pollingTime ) const;
00075     IMEXPORT            VmbErrorType GetVisibility( VmbFeatureVisibilityType &visibility ) const;
00076     IMEXPORT            VmbErrorType IsReadable( bool &isReadable );
00077     IMEXPORT            VmbErrorType IsWritable( bool &isWritable );
00078     IMEXPORT            VmbErrorType IsStreamable( bool &isStreamable ) const;
00079 
00080     IMEXPORT            VmbErrorType RegisterObserver( const IFeatureObserverPtr &observer );
00081     IMEXPORT            VmbErrorType UnregisterObserver( const IFeatureObserverPtr &observer );
00082 
00083     void ResetFeatureContainer();
00084 
00085   protected:
00086     // Copy of feature infos
00087     struct FeatureInfo
00088     {
00089         std::string                     name;                   // Verbose name
00090         VmbFeatureData_t                featureDataType;        // Data type of this feature
00091         VmbFeatureFlags_t               featureFlags;           // Access flags for this feature
00092         bool                            hasAffectedFeatures;    // true if the feature selects or invalidates other features
00093         bool                            hasSelectedFeatures;    // true if the feature selects other features
00094         std::string                     category;               // Category this feature can be found in
00095         std::string                     displayName;            // Feature name to be used in GUIs
00096         VmbUint32_t                     pollingTime;            // Predefined polling time for volatile features
00097         std::string                     unit;                   // Measuring unit as given in the XML file
00098         std::string                     representation;         // Representation of a numeric feature
00099         VmbFeatureVisibility_t          visibility;             // GUI visibility
00100         std::string                     tooltip;                // Short description
00101         std::string                     description;            // Longer description
00102         std::string                     sfncNamespace;          // Namespace this feature resides in
00103         bool                            isStreamable;           // Feature can be stored or loaded from/into a file
00104     };
00105 
00106     FeatureInfo m_featureInfo;
00107 
00108     FeatureContainer *m_pFeatureContainer;
00109 
00110   private:
00111     // Default ctor
00112     BaseFeature();
00113 
00114     // Copy ctor
00115     BaseFeature( const BaseFeature& );
00116 
00117     struct Impl;
00118     Impl *m_pImpl;
00119 
00120     // Array functions to pass data across DLL boundaries
00121     IMEXPORT virtual    VmbErrorType GetValue( char * const pValue, VmbUint32_t &length ) const;
00122     IMEXPORT virtual    VmbErrorType GetValue( VmbUchar_t *pValue, VmbUint32_t &size, VmbUint32_t &sizeFilled ) const;
00123     IMEXPORT virtual    VmbErrorType GetValues( const char **pValues, VmbUint32_t &size );
00124     IMEXPORT virtual    VmbErrorType GetValues( VmbInt64_t *pValues, VmbUint32_t &Size );
00125 
00126     IMEXPORT virtual    VmbErrorType SetValue( const VmbUchar_t *pValue, VmbUint32_t size );
00127 
00128     IMEXPORT virtual    VmbErrorType GetEntries( EnumEntry *pEntries, VmbUint32_t &size );
00129 
00130     IMEXPORT virtual    VmbErrorType GetName( char * const pName, VmbUint32_t &length ) const;
00131     IMEXPORT            VmbErrorType GetDisplayName( char * const pDisplayName, VmbUint32_t &length ) const;
00132     IMEXPORT            VmbErrorType GetCategory( char * const pCategory, VmbUint32_t &length ) const;
00133     IMEXPORT            VmbErrorType GetUnit( char * const pUnit, VmbUint32_t &length ) const;
00134     IMEXPORT            VmbErrorType GetRepresentation( char * const pRepresentation, VmbUint32_t &length ) const;
00135     IMEXPORT            VmbErrorType GetToolTip( char * const pToolTip, VmbUint32_t &length ) const;
00136     IMEXPORT            VmbErrorType GetDescription( char * const pDescription, VmbUint32_t &length ) const;
00137     IMEXPORT            VmbErrorType GetSFNCNamespace( char * const pSFNCNamespace, VmbUint32_t &length ) const;
00138     IMEXPORT            VmbErrorType GetAffectedFeatures( FeaturePtr *pAffectedFeatures, VmbUint32_t &nSize );
00139     IMEXPORT            VmbErrorType GetSelectedFeatures( FeaturePtr *pSelectedFeatures, VmbUint32_t &nSize );
00140 };
00141 
00142 }} // namespace AVT::VmbAPI
00143 
00144 #endif


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