All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
FltReg.h
Go to the documentation of this file.
1 //-----------------------------------------------------------------------------
2 // (c) 2006 by Basler Vision Technologies
3 // Section: Vision Components
4 // Project: GenApi
5 // Author: Margret Albrecht
6 // $Header$
7 //
8 // License: This file is published under the license of the EMVA GenICam Standard Group.
9 // A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'.
10 // If for some reason you are missing this file please contact the EMVA or visit the website
11 // (http://www.genicam.org) for a full copy.
12 //
13 // THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS"
14 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15 // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP
17 // OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
20 // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
21 // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22 // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
23 // POSSIBILITY OF SUCH DAMAGE.
24 //-----------------------------------------------------------------------------
31 #ifndef GENAPI_FLTREG_H
32 #define GENAPI_FLTREG_H
33 
34 #include "../IFloat.h"
35 #include "FloatT.h"
36 #include "Register.h"
37 
38 namespace GENAPI_NAMESPACE
39 {
40  //*************************************************************
41  // CFltReg class
42  //*************************************************************
43 
45  class CFltRegImpl : public IFloat, public CRegisterImpl
46  {
47  public:
49  CFltRegImpl();
50 
51  protected:
52 
55  {
56  return intfIFloat;
57  }
58 
59  //-------------------------------------------------------------
60  // IRegister implementation
61  //-------------------------------------------------------------
62 
64  virtual int64_t InternalGetLength(bool Verify = false);
65 
66  //-------------------------------------------------------------
67  // IFloat implementation
68  //-------------------------------------------------------------
69 
71  virtual void InternalSetValue(double dblValue, bool Verify = true);
72 
74  virtual double InternalGetValue(bool Verify = false, bool IgnoreCache = false);
75 
77  virtual double InternalGetMin() ;
78 
80  virtual double InternalGetMax() ;
81 
83  virtual bool InternalHasInc()
84  {
85  // a swiss knife does not know about its increments
86  return false;
87  }
88 
91  {
92  return double_autovector_t();
93  }
94 
96  #pragma BullseyeCoverage off
97  // (untestable, function never called)
98  virtual double InternalGetInc()
99  {
100  assert(false);
101  return -1.0;
102  }
103  #pragma BullseyeCoverage on
104 
105 
108  {
110  return m_Representation;
111  else
112  return PureNumber;
113  }
114 
117  {
118  return m_Unit;
119  }
120 
123  {
124  return m_DisplayNotation;
125  }
126 
129  {
130  return m_DisplayPrecision;
131  }
132 
133  //-------------------------------------------------------------
134  // Initializing
135  //-------------------------------------------------------------
136  public:
137 
138  virtual void SetProperty( CProperty &Property );
139  virtual bool GetProperty(CNodeDataMap *pNodeDataMap, CPropertyID::EProperty_ID_t PropertyID, CNodeData::PropertyVector_t &PropertyList) const;
140 
141  protected:
143  void ReadReg(uint8_t* ValueBytes, bool Verify = false, bool IgnoreCache = false);
144 
146  void WriteReg(uint8_t* pValueBytes, bool Verify = true);
147 
148  //-------------------------------------------------------------
149  // Memeber variables
150  //-------------------------------------------------------------
151 
154 
157 
160 
163 
166 
167  };
168 
170  class CFltReg
171  : public BaseT< ValueT< FloatT < RegisterT < NodeT< CFltRegImpl > > > > >
172  {
173  };
174 }
175 
176 #endif // GENAPI_FLTREG_H
GENAPI_NAMESPACE
Lexical analyzer for CIntSwissKnife.
Definition: Destructible.h:30
GENAPI_NAMESPACE::CFltRegImpl::InternalSetValue
virtual void InternalSetValue(double dblValue, bool Verify=true)
Set node value.
GENAPI_NAMESPACE::CFltRegImpl::InternalGetMax
virtual double InternalGetMax()
Get maximum value allowed.
GENAPI_NAMESPACE::CFltRegImpl::CFltRegImpl
CFltRegImpl()
Constructor.
GENAPI_NAMESPACE::PureNumber
@ PureNumber
Decimal number in an edit control.
Definition: Types.h:93
GENAPI_NAMESPACE::double_autovector_t
Vector of doubles with reference counting.
Definition: Autovector.h:76
GENAPI_NAMESPACE::CFltRegImpl::InternalGetLength
virtual int64_t InternalGetLength(bool Verify=false)
Retrieves the Length of the register [Bytes].
GENAPI_NAMESPACE::EDisplayNotation
enum GENAPI_NAMESPACE::_EDisplayNotation EDisplayNotation
typedef for float notation
GENICAM_NAMESPACE::gcstring
A string class which is a clone of std::string.
Definition: GCString.h:52
GENAPI_NAMESPACE::CFltRegImpl::GetProperty
virtual bool GetProperty(CNodeDataMap *pNodeDataMap, CPropertyID::EProperty_ID_t PropertyID, CNodeData::PropertyVector_t &PropertyList) const
GENAPI_NAMESPACE::CFltRegImpl::m_Unit
GENICAM_NAMESPACE::gcstring m_Unit
the physical unit name
Definition: FltReg.h:159
GENAPI_NAMESPACE::_UndefinedRepresentation
@ _UndefinedRepresentation
Definition: Types.h:97
GENAPI_NAMESPACE::CFltRegImpl::InternalGetUnit
virtual GENICAM_NAMESPACE::gcstring InternalGetUnit() const
Get the unit.
Definition: FltReg.h:116
GENAPI_NAMESPACE::CFltRegImpl::m_Endianess
EEndianess m_Endianess
endianess of the register
Definition: FltReg.h:156
GENAPI_NAMESPACE::CFltRegImpl::InternalGetRepresentation
virtual ERepresentation InternalGetRepresentation() const
Get recommended representation.
Definition: FltReg.h:107
GENAPI_NAMESPACE::BaseT
Implementation of the IBase interface.
Definition: BaseT.h:48
GENAPI_NAMESPACE::CFltRegImpl::InternalGetListOfValidValues
virtual const double_autovector_t InternalGetListOfValidValues()
Get list of valid value.
Definition: FltReg.h:90
GENAPI_NAMESPACE::EEndianess
enum GENAPI_NAMESPACE::_EEndianess EEndianess
Endianess of a value in a register.
GENAPI_NAMESPACE::intfIFloat
@ intfIFloat
IFloat interface.
Definition: Types.h:195
GENAPI_NAMESPACE::ERepresentation
enum GENAPI_NAMESPACE::_ERepresentation ERepresentation
recommended representation of a node value
GENAPI_NAMESPACE::Verify
GENICAM_INTERFACE GENAPI_DECL_ABSTRACT bool Verify
Definition: IBoolean.h:61
GENAPI_NAMESPACE::CFltRegImpl::InternalGetInc
virtual double InternalGetInc()
Get the constant increment if there is any.
Definition: FltReg.h:98
GENAPI_NAMESPACE::CFltRegImpl::SetProperty
virtual void SetProperty(CProperty &Property)
GENAPI_NAMESPACE::EInterfaceType
enum GENAPI_NAMESPACE::_EInterfaceType EInterfaceType
typedef for interface type
GENAPI_NAMESPACE::CFltRegImpl::WriteReg
void WriteReg(uint8_t *pValueBytes, bool Verify=true)
helper to handle the register access incl. swapping
GENAPI_NAMESPACE::CFltRegImpl::InternalGetDisplayPrecision
virtual int64_t InternalGetDisplayPrecision() const
Get the precision to be used when converting the float to a string.
Definition: FltReg.h:128
FloatT.h
Definition of the FloatT class template.
GENAPI_NAMESPACE::CFltRegImpl::InternalGetPrincipalInterfaceType
virtual EInterfaceType InternalGetPrincipalInterfaceType() const
Implementation of IBase::GetPrincipalInterfaceType()
Definition: FltReg.h:54
GENAPI_NAMESPACE::CFltRegImpl::InternalGetMin
virtual double InternalGetMin()
Get minimum value allowed.
GENAPI_NAMESPACE::CRegisterImpl
Standard IRegister implementation Provides a chunk of memory which acts as a proxy to the register.
Definition: Register.h:59
GENAPI_NAMESPACE::IFloat
GENICAM_INTERFACE GENAPI_DECL_ABSTRACT IFloat
Interface for float properties.
Definition: IFloat.h:60
GENAPI_NAMESPACE::CFltRegImpl::InternalGetValue
virtual double InternalGetValue(bool Verify=false, bool IgnoreCache=false)
Get node value.
GENAPI_NAMESPACE::CFltRegImpl::InternalHasInc
virtual bool InternalHasInc()
True if the float has a constant increment.
Definition: FltReg.h:83
int64_t
__int64 int64_t
Definition: config-win32.h:21
GENAPI_NAMESPACE::CFltRegImpl::InternalGetDisplayNotation
virtual EDisplayNotation InternalGetDisplayNotation() const
Get the way the float should be converted to a string.
Definition: FltReg.h:122
GENAPI_NAMESPACE::CFltRegImpl::m_Representation
ERepresentation m_Representation
The float's reprsentation.
Definition: FltReg.h:153
GENAPI_NAMESPACE::CFltRegImpl::ReadReg
void ReadReg(uint8_t *ValueBytes, bool Verify=false, bool IgnoreCache=false)
helper to handle the register access incl. swapping
GENAPI_NAMESPACE::CFltRegImpl::m_DisplayPrecision
int64_t m_DisplayPrecision
the precision the float is converted with to a string
Definition: FltReg.h:165
GENAPI_NAMESPACE::CFltRegImpl::m_DisplayNotation
EDisplayNotation m_DisplayNotation
the printf format specifier used to convert the float number to a string
Definition: FltReg.h:162
GENAPI_NAMESPACE::CFltRegImpl
IFloat implementation for a register.
Definition: FltReg.h:45
GENAPI_NAMESPACE::CFltReg
the clkass implementing the FltReg node
Definition: FltReg.h:170
Register.h
Definition of CRegister.


rc_genicam_api
Author(s): Heiko Hirschmueller
autogenerated on Wed Dec 4 2024 03:10:11