Register.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: Fritz Dierks
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_REGISTER_H
32 #define GENAPI_REGISTER_H
33 
34 #include "NodeT.h"
35 #include "RegisterT.h"
36 #include "BaseT.h"
37 #include "ValueT.h"
38 #include "Port.h"
39 #include "PrivateTypes.h"
40 #include "Node.h"
41 #include "NodeMap.h"
42 #include "../IInteger.h"
43 #include "../IEnumeration.h"
44 
45 namespace GENAPI_NAMESPACE
46 {
47 
49  typedef std::list<IValue *> ValueList_t;
50 
51  //*************************************************************
52  // CRegisterImpl class
53  //*************************************************************
60  : public IRegister
61  , public CNodeImpl
62  {
63  public:
65  CRegisterImpl();
66 
67  protected:
68  //-------------------------------------------------------------
70  //-------------------------------------------------------------
71 
73  virtual GENICAM_NAMESPACE::gcstring InternalToString(bool Verify = false, bool IgnoreCache = false);
74 
76  virtual void InternalFromString(const GENICAM_NAMESPACE::gcstring& valueString, bool Verify = true);
77 
78  public:
79 
82  {
83  return intfIRegister;
84  }
85 
86  //-------------------------------------------------------------
87  // INodePrivate implementation
88  //-------------------------------------------------------------
89 
91  virtual void SetInvalid(INodePrivate::ESetInvalidMode simMode);
92 
94  virtual void FinalConstruct();
95 
96  //-------------------------------------------------------------
97  // IBase implementation
98  //-------------------------------------------------------------
99 
100  protected:
102  virtual EAccessMode InternalGetAccessMode() const;
103 
104  //-------------------------------------------------------------
105  // IRegister implementation
106  //-------------------------------------------------------------
107 
109  virtual void InternalSet(const uint8_t *pBuffer, int64_t Length, bool Verify = true);
110 
112  virtual void InternalGet(uint8_t *ppBuffer, int64_t pLength, bool Verify = false, bool IgnoreCache = false) ;
113 
115  virtual int64_t InternalGetLength(bool Verify);
116 
118  virtual int64_t InternalGetAddress(bool Verify, bool IgnoreCache);
119 
121  virtual ECachingMode InternalGetCachingMode() const;
122 
123  public:
124  //-------------------------------------------------------------
125  // Initializing
126  //-------------------------------------------------------------
127 
128 
129  virtual void SetProperty(CProperty &Property);
130  virtual bool GetProperty(CNodeDataMap *pNodeDataMap, CPropertyID::EProperty_ID_t PropertyID, CNodeData::PropertyVector_t &PropertyList) const;
131 
132 
133  protected:
135  void UpdateAddress(bool Verify, bool IgnoreCache );
136 
137  //-------------------------------------------------------------
138  // Member variables
139  //-------------------------------------------------------------
140 
143 
146 
149 
152 
154  std::list<CIntegerPolyRef> m_Addresses;
155 
157  std::list<CIntegerOffsetPolyRef> m_Indexes;
158 
161  };
162 
163 
164 
166  : public NodeT< RegisterT < ValueT < BaseT < CRegisterImpl > > > >
167 {};
168 
169 
170 }
171 
172 #endif // ifndef GENAPI_REGISTER_H
virtual int64_t InternalGetLength(bool Verify)
Retrieves the Length of the register [Bytes].
virtual EAccessMode InternalGetAccessMode() const
Get the access mode of the node.
Definition of the ValueT class template.
std::list< CIntegerOffsetPolyRef > m_Indexes
List of Indexes or pointer to address supplying nodes.
Definition: Register.h:157
GENICAM_INTERFACE GENAPI_DECL_ABSTRACT bool Verify
Definition: IBoolean.h:61
std::list< IValue * > ValueList_t
List of EnumInt-node references.
Definition: Register.h:49
int64_t m_Address
Address of the register.
Definition: Register.h:145
virtual bool GetProperty(CNodeDataMap *pNodeDataMap, CPropertyID::EProperty_ID_t PropertyID, CNodeData::PropertyVector_t &PropertyList) const
void UpdateAddress(bool Verify, bool IgnoreCache)
Recomputes the Address.
__int64 int64_t
Definition: config-win32.h:21
GENICAM_INTERFACE GENAPI_DECL_ABSTRACT IRegister
Interface for registers.
Definition: IRegister.h:61
CIntegerPolyRef m_Length
Length of the register.
Definition: Register.h:151
std::list< CIntegerPolyRef > m_Addresses
List of Addresses or pointer to address supplying nodes.
Definition: Register.h:154
Definition of the RegisterT class template.
Definition of the NodeT class template.
Implementation of the INode interface.
Definition: NodeT.h:50
Standard IRegister implementation Provides a chunk of memory which acts as a proxy to the register...
Definition: Register.h:59
enum GENAPI_NAMESPACE::_ECachingMode ECachingMode
caching mode of a register
GENICAM_INTERFACE GENAPI_DECL_ABSTRACT int64_t int64_t Length
Definition: IPort.h:57
virtual void InternalGet(uint8_t *ppBuffer, int64_t pLength, bool Verify=false, bool IgnoreCache=false)
Retrieves a pointer to a buffer containing the register&#39;s contents.
int64_t m_AddressValid
TRue if m_Address is valid.
Definition: Register.h:148
CRegisterImpl()
Default Contructor.
Definition of the BaseT class template.
Standard implementation for the INode and the ISelector interface.
Definition: Node.h:86
CPort * m_pPort
pointer to Port node providing access to the port
Definition: Register.h:142
A string class which is a clone of std::string.
Definition: GCString.h:52
Definition of CPort.
enum GENAPI_NAMESPACE::_EAccessMode EAccessMode
access mode of a node
virtual void FinalConstruct()
finalizes the construction of the node
virtual void InternalSet(const uint8_t *pBuffer, int64_t Length, bool Verify=true)
Set the register&#39;s contents.
A reference to an int64 which can bei either an int64 variable, or a pointer to an IInteger...
Definition: PolyReference.h:68
virtual EInterfaceType InternalGetPrincipalInterfaceType() const
Implementation of IBase::GetPrincipalInterfaceType()
Definition: Register.h:81
EAccessMode m_AccessMode
the access mode
Definition: Register.h:160
virtual ECachingMode InternalGetCachingMode() const
Get Caching Mode.
ESetInvalidMode
Three different modes of operation for INodePrivate::SetInvalid()
Definition: INodePrivate.h:91
Declaration of CNodeMap.
IRegister interface.
Definition: Types.h:198
virtual void SetInvalid(INodePrivate::ESetInvalidMode simMode)
Initializes the object.
virtual void InternalFromString(const GENICAM_NAMESPACE::gcstring &valueString, bool Verify=true)
Set value of the node as string.
Common types used in the GenApi implementation.
virtual int64_t InternalGetAddress(bool Verify, bool IgnoreCache)
Retrieves the Address of the register.
virtual void SetProperty(CProperty &Property)
Lexical analyzer for CIntSwissKnife.
Definition: Autovector.h:48
enum GENAPI_NAMESPACE::_EInterfaceType EInterfaceType
typedef for interface type
virtual GENICAM_NAMESPACE::gcstring InternalToString(bool Verify=false, bool IgnoreCache=false)
Implements interface IValue (called by IValueT)


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