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 "../IInteger.h"
42 #include "../IEnumeration.h"
43 
44 namespace GENAPI_NAMESPACE
45 {
46 
48  typedef std::list<IValue *> ValueList_t;
49 
50  //*************************************************************
51  // CRegisterImpl class
52  //*************************************************************
59  : public IRegister
60  , public CNodeImpl
61  {
62  public:
64  CRegisterImpl();
65 
66  protected:
67  //-------------------------------------------------------------
69  //-------------------------------------------------------------
70 
72  virtual GENICAM_NAMESPACE::gcstring InternalToString(bool Verify = false, bool IgnoreCache = false);
73 
75  virtual void InternalFromString(const GENICAM_NAMESPACE::gcstring& valueString, bool Verify = true);
76 
77  public:
78 
81  {
82  return intfIRegister;
83  }
84 
85  //-------------------------------------------------------------
86  // INodePrivate implementation
87  //-------------------------------------------------------------
88 
90  virtual void SetInvalid(INodePrivate::ESetInvalidMode simMode);
91 
93  virtual void FinalConstruct();
94 
95  //-------------------------------------------------------------
96  // IBase implementation
97  //-------------------------------------------------------------
98 
99  protected:
101  virtual EAccessMode InternalGetAccessMode() const;
102 
103  //-------------------------------------------------------------
104  // IRegister implementation
105  //-------------------------------------------------------------
106 
108  virtual void InternalSet(const uint8_t *pBuffer, int64_t Length, bool Verify = true);
109 
111  virtual void InternalGet(uint8_t *ppBuffer, int64_t pLength, bool Verify = false, bool IgnoreCache = false) ;
112 
114  virtual int64_t InternalGetLength();
115 
117  virtual int64_t InternalGetAddress(bool Verify, bool IgnoreCache);
118 
120  virtual ECachingMode InternalGetCachingMode() const;
121 
122  public:
123  //-------------------------------------------------------------
124  // Initializing
125  //-------------------------------------------------------------
126 
127 
128  virtual void SetProperty(CProperty &Property);
129  virtual bool GetProperty(CNodeDataMap *pNodeDataMap, CPropertyID::EProperty_ID_t PropertyID, CNodeData::PropertyVector_t &PropertyList) const;
130 
131 
132  protected:
134  void UpdateAddress(bool Verify, bool IgnoreCache );
135 
136  //-------------------------------------------------------------
137  // Member variables
138  //-------------------------------------------------------------
139 
142 
145 
148 
151 
153  std::list<CIntegerPolyRef> m_Addresses;
154 
156  std::list<CIntegerOffsetPolyRef> m_Indexes;
157 
160  };
161 
162 
163 
165  : public NodeT< RegisterT < ValueT < BaseT < CRegisterImpl > > > >
166 {};
167 
168 
169 }
170 
171 #endif // ifndef GENAPI_REGISTER_H
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:156
std::list< IValue * > ValueList_t
List of EnumInt-node references.
Definition: Register.h:48
int64_t m_Address
Address of the register.
Definition: Register.h:144
virtual bool GetProperty(CNodeDataMap *pNodeDataMap, CPropertyID::EProperty_ID_t PropertyID, CNodeData::PropertyVector_t &PropertyList) const
virtual int64_t InternalGetLength()
Retrieves the Length of the register [Bytes].
void UpdateAddress(bool Verify, bool IgnoreCache)
Recomputes the Address.
__int64 int64_t
Definition: config-win32.h:21
CIntegerPolyRef m_Length
Length of the register.
Definition: Register.h:150
std::list< CIntegerPolyRef > m_Addresses
List of Addresses or pointer to address supplying nodes.
Definition: Register.h:153
interface GENAPI_DECL_ABSTRACT IRegister
Interface for registers.
Definition: IRegister.h:61
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:58
enum GENAPI_NAMESPACE::_ECachingMode ECachingMode
caching mode of a register
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.
interface GENAPI_DECL_ABSTRACT bool Verify
Definition: IBoolean.h:61
int64_t m_AddressValid
TRue if m_Address is valid.
Definition: Register.h:147
CRegisterImpl()
Default Contructor.
Definition of the BaseT class template.
interface GENAPI_DECL_ABSTRACT int64_t int64_t Length
Definition: IPort.h:57
Standard implementation for the INode and the ISelector interface.
Definition: Node.h:85
CPort * m_pPort
pointer to Port node providing access to the port
Definition: Register.h:141
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:80
EAccessMode m_AccessMode
the access mode
Definition: Register.h:159
virtual ECachingMode InternalGetCachingMode() const
Get Caching Mode.
ESetInvalidMode
Three different modes of operation for INodePrivate::SetInvalid()
Definition: INodePrivate.h:91
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)
Part of the generic device API.
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 Thu Jun 6 2019 19:10:54