All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
IntReg.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_INTREG_H
32 #define GENAPI_INTREG_H
33 
34 #include "Register.h"
35 #include "../IRegister.h"
36 #include "BaseT.h"
37 #include "ValueT.h"
38 #include "NodeT.h"
39 #include "NodeMap.h"
40 #include "IntegerT.h"
41 #include "RegisterT.h"
42 
43 namespace GENAPI_NAMESPACE
44 {
45  //*************************************************************
46  // CIntRegImpl class
47  //*************************************************************
48 
56  : public IInteger
57  , public CRegisterImpl
58  {
59  public:
61  CIntRegImpl();
62 
65  {
66  return intfIInteger;
67  }
68 
69  protected:
70 
71  //-------------------------------------------------------------
72  // IRegister implementation
73  //-------------------------------------------------------------
74 
76  virtual int64_t InternalGetLength( bool Verify = false );
77 
79  void UpdateMasks() const;
80 
82  mutable bool m_MasksAreValid;
83 
84  //-------------------------------------------------------------
85  // IInteger implementation
86  //-------------------------------------------------------------
87 
89  virtual void InternalSetValue(int64_t Value, bool Verify = true);
90 
92  virtual int64_t InternalGetValue(bool Verify = false, bool IgnoreCache = false);
93 
95  virtual int64_t InternalGetMin() const;
96 
98  virtual int64_t InternalGetMax() const;
99 
102  {
103  return int64_autovector_t();
104  }
105 
107  virtual int64_t InternalGetInc() const;
108 
111 
114 
115  //-------------------------------------------------------------
116  // INodePrivate implementation
117  //-------------------------------------------------------------
118 
119  virtual void SetInvalid(ESetInvalidMode simMode);
120 
121  public:
122  //-------------------------------------------------------------
123  // Initializing
124  //-------------------------------------------------------------
125 
126 
127  virtual void SetProperty( CProperty &Property );
128  virtual bool GetProperty(CNodeDataMap *pNodeDataMap, CPropertyID::EProperty_ID_t PropertyID, CNodeData::PropertyVector_t &PropertyList) const;
129 
130 
131  protected:
133  void ReadReg(uint8_t* ValueBytes, bool Verify = false, bool IgnoreCache = false);
134 
136  void WriteReg(uint8_t* ValueBytes, bool Verify = true);
137 
138  //-------------------------------------------------------------
139  // Member variables
140  //-------------------------------------------------------------
141 
143  mutable int64_t m_Min;
144 
146  mutable int64_t m_Max;
147 
150 
153 
156 
159 
161  mutable uint64_t m_SignBit;
162 
164  mutable uint64_t m_SignMask;
165 
166  };
167 
169  class CIntReg : public BaseT < ValueT < IntegerT < RegisterT < NodeT < CIntRegImpl > > > > >
170  {
171  };
172 }
173 
174 #endif // GENAPI_INTREG_H
GENAPI_NAMESPACE::IInteger
GENICAM_INTERFACE IInteger
Interface for integer properties.
Definition: IFloat.h:114
GENAPI_NAMESPACE
Lexical analyzer for CIntSwissKnife.
Definition: Destructible.h:30
GENAPI_NAMESPACE::CIntRegImpl::m_Representation
ERepresentation m_Representation
representation of the integer
Definition: IntReg.h:152
GENAPI_NAMESPACE::intfIInteger
@ intfIInteger
IInteger interface.
Definition: Types.h:192
GENAPI_NAMESPACE::CIntRegImpl::InternalGetInc
virtual int64_t InternalGetInc() const
Get increment.
NodeMap.h
Declaration of CNodeMap.
GENICAM_NAMESPACE::gcstring
A string class which is a clone of std::string.
Definition: GCString.h:52
GENAPI_NAMESPACE::CIntRegImpl::UpdateMasks
void UpdateMasks() const
pre-computes some masks
GENAPI_NAMESPACE::CIntRegImpl::m_Endianess
EEndianess m_Endianess
endianess of the register
Definition: IntReg.h:158
NodeT.h
Definition of the NodeT class template.
GENAPI_NAMESPACE::BaseT
Implementation of the IBase interface.
Definition: BaseT.h:48
GENAPI_NAMESPACE::EEndianess
enum GENAPI_NAMESPACE::_EEndianess EEndianess
Endianess of a value in a register.
GENAPI_NAMESPACE::CIntRegImpl::ReadReg
void ReadReg(uint8_t *ValueBytes, bool Verify=false, bool IgnoreCache=false)
helpers to handle the register access incl. swapping
GENAPI_NAMESPACE::CIntRegImpl::InternalGetRepresentation
virtual ERepresentation InternalGetRepresentation() const
Get recommended representation.
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::CIntRegImpl::InternalGetPrincipalInterfaceType
virtual EInterfaceType InternalGetPrincipalInterfaceType() const
Implementation of IBase::GetPrincipalInterfaceType()
Definition: IntReg.h:64
GENAPI_NAMESPACE::CIntRegImpl::m_Min
int64_t m_Min
minimum value to be stored in the Register
Definition: IntReg.h:143
GENAPI_NAMESPACE::CIntRegImpl::m_Sign
ESign m_Sign
sign of the integer
Definition: IntReg.h:149
GENAPI_NAMESPACE::EInterfaceType
enum GENAPI_NAMESPACE::_EInterfaceType EInterfaceType
typedef for interface type
GENAPI_NAMESPACE::CIntRegImpl::InternalGetUnit
virtual GENICAM_NAMESPACE::gcstring InternalGetUnit()
Get the unit.
GENAPI_NAMESPACE::CIntRegImpl::SetProperty
virtual void SetProperty(CProperty &Property)
BaseT.h
Definition of the BaseT class template.
RegisterT.h
Definition of the RegisterT class template.
GENAPI_NAMESPACE::CIntRegImpl::CIntRegImpl
CIntRegImpl()
Constructor.
GENAPI_NAMESPACE::CIntReg
implements the IntReg node
Definition: IntReg.h:169
GENAPI_NAMESPACE::CIntRegImpl::m_MasksAreValid
bool m_MasksAreValid
if true the masks are valid
Definition: IntReg.h:82
GENAPI_NAMESPACE::CIntRegImpl::WriteReg
void WriteReg(uint8_t *ValueBytes, bool Verify=true)
helpers to handle the register access incl. swapping
GENAPI_NAMESPACE::CIntRegImpl::InternalGetMax
virtual int64_t InternalGetMax() const
Get maximum value allowed.
GENAPI_NAMESPACE::CIntRegImpl::m_Unit
GENICAM_NAMESPACE::gcstring m_Unit
the physical unit name
Definition: IntReg.h:155
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::CIntRegImpl::InternalGetLength
virtual int64_t InternalGetLength(bool Verify=false)
Retrieves the Length of the register [Bytes].
GENAPI_NAMESPACE::ESetInvalidMode
ESetInvalidMode
Three different modes of operation for INodePrivate::SetInvalid()
Definition: INodePrivate.h:91
GENAPI_NAMESPACE::CIntRegImpl::m_SignMask
uint64_t m_SignMask
The bit to be set to -1 if the number is negative.
Definition: IntReg.h:164
GENAPI_NAMESPACE::CIntRegImpl::InternalGetMin
virtual int64_t InternalGetMin() const
Get minimum value allowed.
GENAPI_NAMESPACE::CIntRegImpl::InternalGetListOfValidValues
virtual const int64_autovector_t InternalGetListOfValidValues()
Get list of valid value.
Definition: IntReg.h:101
GENAPI_NAMESPACE::CIntRegImpl::m_SignBit
uint64_t m_SignBit
The bit indicating the sign of the number to be retrieved.
Definition: IntReg.h:161
GENAPI_NAMESPACE::CIntRegImpl::GetProperty
virtual bool GetProperty(CNodeDataMap *pNodeDataMap, CPropertyID::EProperty_ID_t PropertyID, CNodeData::PropertyVector_t &PropertyList) const
GENAPI_NAMESPACE::ESign
enum GENAPI_NAMESPACE::_ESign ESign
signed or unsigned integers
int64_t
__int64 int64_t
Definition: config-win32.h:21
GENAPI_NAMESPACE::CIntRegImpl::InternalGetValue
virtual int64_t InternalGetValue(bool Verify=false, bool IgnoreCache=false)
Get feature value.
GENAPI_NAMESPACE::CIntRegImpl::InternalSetValue
virtual void InternalSetValue(int64_t Value, bool Verify=true)
Set feature value.
ValueT.h
Definition of the ValueT class template.
GENAPI_NAMESPACE::int64_autovector_t
Vector of integers with reference counting.
Definition: Autovector.h:54
GENAPI_NAMESPACE::CIntRegImpl::m_Max
int64_t m_Max
maximum value to be stored in the Register
Definition: IntReg.h:146
Register.h
Definition of CRegister.
GENAPI_NAMESPACE::CIntRegImpl::SetInvalid
virtual void SetInvalid(ESetInvalidMode simMode)
GENAPI_NAMESPACE::CIntRegImpl
IInteger implementation for a register.
Definition: IntReg.h:55
IntegerT.h
Definition of the IntegerT class template.


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