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
Definition of the ValueT class template.
virtual int64_t InternalGetInc() const
Get increment.
ESign m_Sign
sign of the integer
Definition: IntReg.h:149
uint64_t m_SignMask
The bit to be set to -1 if the number is negative.
Definition: IntReg.h:164
virtual void SetInvalid(ESetInvalidMode simMode)
GENICAM_INTERFACE IInteger
Interface for integer properties.
Definition: IFloat.h:114
GENICAM_INTERFACE GENAPI_DECL_ABSTRACT bool Verify
Definition: IBoolean.h:61
enum GENAPI_NAMESPACE::_EEndianess EEndianess
Endianess of a value in a register.
Definition of CRegister.
void UpdateMasks() const
pre-computes some masks
enum GENAPI_NAMESPACE::_ESign ESign
signed or unsigned integers
__int64 int64_t
Definition: config-win32.h:21
void WriteReg(uint8_t *ValueBytes, bool Verify=true)
helpers to handle the register access incl. swapping
virtual int64_t InternalGetMax() const
Get maximum value allowed.
virtual void SetProperty(CProperty &Property)
int64_t m_Max
maximum value to be stored in the Register
Definition: IntReg.h:146
virtual int64_t InternalGetValue(bool Verify=false, bool IgnoreCache=false)
Get feature value.
Implementation of the IBase interface.
Definition: BaseT.h:48
Definition of the RegisterT class template.
Definition of the NodeT class template.
implements the IntReg node
Definition: IntReg.h:169
enum GENAPI_NAMESPACE::_ERepresentation ERepresentation
recommended representation of a node value
virtual int64_t InternalGetLength(bool Verify=false)
Retrieves the Length of the register [Bytes].
Standard IRegister implementation Provides a chunk of memory which acts as a proxy to the register...
Definition: Register.h:59
IInteger implementation for a register.
Definition: IntReg.h:55
Vector of integers with reference counting.
Definition: Autovector.h:54
virtual const int64_autovector_t InternalGetListOfValidValues()
Get list of valid value.
Definition: IntReg.h:101
virtual ERepresentation InternalGetRepresentation() const
Get recommended representation.
uint64_t m_SignBit
The bit indicating the sign of the number to be retrieved.
Definition: IntReg.h:161
GENICAM_NAMESPACE::gcstring m_Unit
the physical unit name
Definition: IntReg.h:155
Definition of the IntegerT class template.
void ReadReg(uint8_t *ValueBytes, bool Verify=false, bool IgnoreCache=false)
helpers to handle the register access incl. swapping
Definition of the BaseT class template.
virtual void InternalSetValue(int64_t Value, bool Verify=true)
Set feature value.
virtual bool GetProperty(CNodeDataMap *pNodeDataMap, CPropertyID::EProperty_ID_t PropertyID, CNodeData::PropertyVector_t &PropertyList) const
int64_t m_Min
minimum value to be stored in the Register
Definition: IntReg.h:143
virtual EInterfaceType InternalGetPrincipalInterfaceType() const
Implementation of IBase::GetPrincipalInterfaceType()
Definition: IntReg.h:64
A string class which is a clone of std::string.
Definition: GCString.h:52
EEndianess m_Endianess
endianess of the register
Definition: IntReg.h:158
virtual int64_t InternalGetMin() const
Get minimum value allowed.
ERepresentation m_Representation
representation of the integer
Definition: IntReg.h:152
ESetInvalidMode
Three different modes of operation for INodePrivate::SetInvalid()
Definition: INodePrivate.h:91
virtual GENICAM_NAMESPACE::gcstring InternalGetUnit()
Get the unit.
Declaration of CNodeMap.
IInteger interface.
Definition: Types.h:193
bool m_MasksAreValid
if true the masks are valid
Definition: IntReg.h:82
Lexical analyzer for CIntSwissKnife.
Definition: Autovector.h:48
enum GENAPI_NAMESPACE::_EInterfaceType EInterfaceType
typedef for interface type


rc_genicam_api
Author(s): Heiko Hirschmueller
autogenerated on Wed Mar 17 2021 02:48:40