Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
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
00087 struct FeatureInfo
00088 {
00089 std::string name;
00090 VmbFeatureData_t featureDataType;
00091 VmbFeatureFlags_t featureFlags;
00092 bool hasAffectedFeatures;
00093 bool hasSelectedFeatures;
00094 std::string category;
00095 std::string displayName;
00096 VmbUint32_t pollingTime;
00097 std::string unit;
00098 std::string representation;
00099 VmbFeatureVisibility_t visibility;
00100 std::string tooltip;
00101 std::string description;
00102 std::string sfncNamespace;
00103 bool isStreamable;
00104 };
00105
00106 FeatureInfo m_featureInfo;
00107
00108 FeatureContainer *m_pFeatureContainer;
00109
00110 private:
00111
00112 BaseFeature();
00113
00114
00115 BaseFeature( const BaseFeature& );
00116
00117 struct Impl;
00118 Impl *m_pImpl;
00119
00120
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 }}
00143
00144 #endif