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  virtual bool CanBeWritten(bool Verify);
97 
98  //-------------------------------------------------------------
99  // IBase implementation
100  //-------------------------------------------------------------
101 
102  protected:
104  virtual EAccessMode InternalGetAccessMode() const;
105 
106  //-------------------------------------------------------------
107  // IRegister implementation
108  //-------------------------------------------------------------
109 
111  virtual void InternalSet(const uint8_t *pBuffer, int64_t Length, bool Verify = true);
112 
114  virtual void InternalGet(uint8_t *ppBuffer, int64_t pLength, bool Verify = false, bool IgnoreCache = false) ;
115 
117  virtual int64_t InternalGetLength(bool Verify);
118 
120  virtual int64_t InternalGetAddress(bool Verify, bool IgnoreCache);
121 
123  virtual ECachingMode InternalGetCachingMode() const;
124 
125  public:
126  //-------------------------------------------------------------
127  // Initializing
128  //-------------------------------------------------------------
129 
130 
131  virtual void SetProperty(CProperty &Property);
132  virtual bool GetProperty(CNodeDataMap *pNodeDataMap, CPropertyID::EProperty_ID_t PropertyID, CNodeData::PropertyVector_t &PropertyList) const;
133 
134 
135  protected:
137  void UpdateAddress(bool Verify, bool IgnoreCache );
138 
139  //-------------------------------------------------------------
140  // Member variables
141  //-------------------------------------------------------------
142 
145 
148 
151 
154 
156  std::list<CIntegerPolyRef> m_Addresses;
157 
159  std::list<CIntegerOffsetPolyRef> m_Indexes;
160 
163  };
164 
165 
166 
168  : public NodeT< RegisterT < ValueT < BaseT < CRegisterImpl > > > >
169 {};
170 
171 
172 }
173 
174 #endif // ifndef GENAPI_REGISTER_H
GENAPI_NAMESPACE::CRegisterImpl::m_Addresses
std::list< CIntegerPolyRef > m_Addresses
List of Addresses or pointer to address supplying nodes.
Definition: Register.h:156
GENAPI_NAMESPACE
Lexical analyzer for CIntSwissKnife.
Definition: Destructible.h:30
GENAPI_NAMESPACE::EAccessMode
enum GENAPI_NAMESPACE::_EAccessMode EAccessMode
access mode of a node
GENAPI_NAMESPACE::intfIRegister
@ intfIRegister
IRegister interface.
Definition: Types.h:197
GENAPI_NAMESPACE::CRegisterImpl::m_AccessMode
EAccessMode m_AccessMode
the access mode
Definition: Register.h:162
GENAPI_NAMESPACE::CRegisterImpl::UpdateAddress
void UpdateAddress(bool Verify, bool IgnoreCache)
Recomputes the Address.
GENAPI_NAMESPACE::CRegisterImpl::InternalToString
virtual GENICAM_NAMESPACE::gcstring InternalToString(bool Verify=false, bool IgnoreCache=false)
Implements interface IValue (called by IValueT)
GENAPI_NAMESPACE::CRegisterImpl::SetProperty
virtual void SetProperty(CProperty &Property)
PrivateTypes.h
Common types used in the GenApi implementation.
GENAPI_NAMESPACE::CRegisterImpl::InternalFromString
virtual void InternalFromString(const GENICAM_NAMESPACE::gcstring &valueString, bool Verify=true)
Set value of the node as string.
GENAPI_NAMESPACE::CRegisterImpl::InternalGetAddress
virtual int64_t InternalGetAddress(bool Verify, bool IgnoreCache)
Retrieves the Address of the register.
Port.h
Definition of CPort.
NodeMap.h
Declaration of CNodeMap.
GENAPI_NAMESPACE::CNodeImpl
Standard implementation for the INode and the ISelector interface.
Definition: Node.h:86
GENICAM_NAMESPACE::gcstring
A string class which is a clone of std::string.
Definition: GCString.h:52
GENAPI_NAMESPACE::CRegisterImpl::CanBeWritten
virtual bool CanBeWritten(bool Verify)
GENAPI_NAMESPACE::ValueList_t
std::list< IValue * > ValueList_t
List of EnumInt-node references.
Definition: Register.h:49
GENAPI_NAMESPACE::CRegisterImpl::InternalGetAccessMode
virtual EAccessMode InternalGetAccessMode() const
Get the access mode of the node.
GENAPI_NAMESPACE::CRegisterImpl::InternalGet
virtual void InternalGet(uint8_t *ppBuffer, int64_t pLength, bool Verify=false, bool IgnoreCache=false)
Retrieves a pointer to a buffer containing the register's contents.
GENAPI_NAMESPACE::CRegisterImpl::InternalGetLength
virtual int64_t InternalGetLength(bool Verify)
Retrieves the Length of the register [Bytes].
NodeT.h
Definition of the NodeT class template.
GENAPI_NAMESPACE::CIntegerPolyRef
A reference to an int64 which can bei either an int64 variable, or a pointer to an IInteger,...
Definition: PolyReference.h:68
GENAPI_NAMESPACE::CRegisterImpl::m_AddressValid
int64_t m_AddressValid
TRue if m_Address is valid.
Definition: Register.h:150
GENAPI_NAMESPACE::CRegisterImpl::SetInvalid
virtual void SetInvalid(INodePrivate::ESetInvalidMode simMode)
Initializes the object.
GENAPI_NAMESPACE::IRegister
GENICAM_INTERFACE GENAPI_DECL_ABSTRACT IRegister
Interface for registers.
Definition: IRegister.h:61
GENAPI_NAMESPACE::NodeT
Implementation of the INode interface.
Definition: NodeT.h:50
GENAPI_NAMESPACE::CRegisterImpl::m_pPort
CPort * m_pPort
pointer to Port node providing access to the port
Definition: Register.h:144
GENAPI_NAMESPACE::CRegisterImpl::CRegisterImpl
CRegisterImpl()
Default Contructor.
GENAPI_NAMESPACE::Verify
GENICAM_INTERFACE GENAPI_DECL_ABSTRACT bool Verify
Definition: IBoolean.h:61
GENAPI_NAMESPACE::CRegisterImpl::GetProperty
virtual bool GetProperty(CNodeDataMap *pNodeDataMap, CPropertyID::EProperty_ID_t PropertyID, CNodeData::PropertyVector_t &PropertyList) const
GENAPI_NAMESPACE::CRegisterImpl::m_Length
CIntegerPolyRef m_Length
Length of the register.
Definition: Register.h:153
GENAPI_NAMESPACE::EInterfaceType
enum GENAPI_NAMESPACE::_EInterfaceType EInterfaceType
typedef for interface type
BaseT.h
Definition of the BaseT class template.
RegisterT.h
Definition of the RegisterT class template.
GENAPI_NAMESPACE::CRegisterImpl::m_Indexes
std::list< CIntegerOffsetPolyRef > m_Indexes
List of Indexes or pointer to address supplying nodes.
Definition: Register.h:159
GENAPI_NAMESPACE::CRegisterImpl::m_Address
int64_t m_Address
Address of the register.
Definition: Register.h:147
Node.h
GENAPI_NAMESPACE::CRegisterImpl::InternalGetPrincipalInterfaceType
virtual EInterfaceType InternalGetPrincipalInterfaceType() const
Implementation of IBase::GetPrincipalInterfaceType()
Definition: Register.h:81
GENAPI_NAMESPACE::Length
GENICAM_INTERFACE GENAPI_DECL_ABSTRACT int64_t int64_t Length
Definition: IPort.h:57
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::ESetInvalidMode
ESetInvalidMode
Three different modes of operation for INodePrivate::SetInvalid()
Definition: INodePrivate.h:91
GENAPI_NAMESPACE::CRegister
Definition: Register.h:167
int64_t
__int64 int64_t
Definition: config-win32.h:21
GENAPI_NAMESPACE::ECachingMode
enum GENAPI_NAMESPACE::_ECachingMode ECachingMode
caching mode of a register
GENAPI_NAMESPACE::CRegisterImpl::InternalSet
virtual void InternalSet(const uint8_t *pBuffer, int64_t Length, bool Verify=true)
Set the register's contents.
GENAPI_NAMESPACE::CRegisterImpl::FinalConstruct
virtual void FinalConstruct()
finalizes the construction of the node
GENAPI_NAMESPACE::CRegisterImpl::InternalGetCachingMode
virtual ECachingMode InternalGetCachingMode() const
Get Caching Mode.
ValueT.h
Definition of the ValueT class template.
GENAPI_NAMESPACE::CPort
Definition: Port.h:203


rc_genicam_api
Author(s): Heiko Hirschmueller
autogenerated on Wed Nov 22 2023 03:12:04