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 "IntegerT.h"
40 #include "RegisterT.h"
41 
42 namespace GENAPI_NAMESPACE
43 {
44  //*************************************************************
45  // CIntRegImpl class
46  //*************************************************************
47 
55  : public IInteger
56  , public CRegisterImpl
57  {
58  public:
60  CIntRegImpl();
61 
64  {
65  return intfIInteger;
66  }
67 
68  protected:
69 
70  //-------------------------------------------------------------
71  // IRegister implementation
72  //-------------------------------------------------------------
73 
75  virtual int64_t InternalGetLength();
76 
78  void UpdateMasks() const;
79 
81  mutable bool m_MasksAreValid;
82 
83  //-------------------------------------------------------------
84  // IInteger implementation
85  //-------------------------------------------------------------
86 
88  virtual void InternalSetValue(int64_t Value, bool Verify = true);
89 
91  virtual int64_t InternalGetValue(bool Verify = false, bool IgnoreCache = false);
92 
94  virtual int64_t InternalGetMin() const;
95 
97  virtual int64_t InternalGetMax() const;
98 
101  {
102  return int64_autovector_t();
103  }
104 
106  virtual int64_t InternalGetInc() const;
107 
110 
113 
114  //-------------------------------------------------------------
115  // INodePrivate implementation
116  //-------------------------------------------------------------
117 
118  virtual void SetInvalid(ESetInvalidMode simMode);
119 
120  public:
121  //-------------------------------------------------------------
122  // Initializing
123  //-------------------------------------------------------------
124 
125 
126  virtual void SetProperty( CProperty &Property );
127  virtual bool GetProperty(CNodeDataMap *pNodeDataMap, CPropertyID::EProperty_ID_t PropertyID, CNodeData::PropertyVector_t &PropertyList) const;
128 
129 
130  protected:
132  void ReadReg(uint8_t* ValueBytes, bool Verify = false, bool IgnoreCache = false);
133 
135  void WriteReg(uint8_t* ValueBytes, bool Verify = true);
136 
137  //-------------------------------------------------------------
138  // Member variables
139  //-------------------------------------------------------------
140 
142  mutable int64_t m_Min;
143 
145  mutable int64_t m_Max;
146 
149 
152 
155 
158 
160  mutable uint64_t m_SignBit;
161 
163  mutable uint64_t m_SignMask;
164 
165  };
166 
168  class CIntReg : public BaseT < ValueT < IntegerT < RegisterT < NodeT < CIntRegImpl > > > > >
169  {
170  };
171 }
172 
173 #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:148
uint64_t m_SignMask
The bit to be set to -1 if the number is negative.
Definition: IntReg.h:163
virtual void SetInvalid(ESetInvalidMode simMode)
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.
interface GENAPI_DECL_ABSTRACT IInteger
Interface for integer properties.
Definition: IInteger.h:61
virtual void SetProperty(CProperty &Property)
int64_t m_Max
maximum value to be stored in the Register
Definition: IntReg.h:145
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:168
enum GENAPI_NAMESPACE::_ERepresentation ERepresentation
recommended representation of a node value
Standard IRegister implementation Provides a chunk of memory which acts as a proxy to the register...
Definition: Register.h:58
IInteger implementation for a register.
Definition: IntReg.h:54
Vector of integers with reference counting.
Definition: Autovector.h:54
virtual const int64_autovector_t InternalGetListOfValidValues()
Get list of valid value.
Definition: IntReg.h:100
virtual ERepresentation InternalGetRepresentation() const
Get recommended representation.
interface GENAPI_DECL_ABSTRACT bool Verify
Definition: IBoolean.h:61
uint64_t m_SignBit
The bit indicating the sign of the number to be retrievend.
Definition: IntReg.h:160
GENICAM_NAMESPACE::gcstring m_Unit
the physical unit name
Definition: IntReg.h:154
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:142
virtual EInterfaceType InternalGetPrincipalInterfaceType() const
Implementation of IBase::GetPrincipalInterfaceType()
Definition: IntReg.h:63
A string class which is a clone of std::string.
Definition: GCString.h:52
EEndianess m_Endianess
endianess of the register
Definition: IntReg.h:157
virtual int64_t InternalGetMin() const
Get minimum value allowed.
ERepresentation m_Representation
representation of the integer
Definition: IntReg.h:151
ESetInvalidMode
Three different modes of operation for INodePrivate::SetInvalid()
Definition: INodePrivate.h:91
virtual GENICAM_NAMESPACE::gcstring InternalGetUnit()
Get the unit.
IInteger interface.
Definition: Types.h:193
virtual int64_t InternalGetLength()
Retrieves the Length of the register [Bytes].
bool m_MasksAreValid
if true the masks are valid
Definition: IntReg.h:81
Part of the generic device API.
Definition: Autovector.h:48
enum GENAPI_NAMESPACE::_EInterfaceType EInterfaceType
typedef for interface type


rc_genicam_api
Author(s): Heiko Hirschmueller
autogenerated on Thu Jun 6 2019 19:10:54