IEEE1212Parser.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: Hartmut Nebelung
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 //-----------------------------------------------------------------------------
32 #ifndef GENAPI_IEEE1212PARSER_H
33 #define GENAPI_IEEE1212PARSER_H
34 
35 #include <map>
36 #include "../Types.h"
37 #include "Register.h"
38 
39 #ifdef _MSC_VER // *JS*
40 #pragma warning(push)
41 #pragma warning(disable: 4251) // class 'xxx' needs to have dll-interface to be used by clients of class 'yyy'
42 #endif
43 
44 namespace GENAPI_NAMESPACE
45 {
46 
64  {
65  public:
66  CIEEE1212ParserImpl(void);
68 
69  void FinalConstruct();
70 
71  protected:
72 
75  {
76  return intfIRegister;
77  }
78 
79  //-------------------------------------------------------------
80  // IValue implementation
81  //-------------------------------------------------------------
82 
84  virtual GENICAM_NAMESPACE::gcstring InternalToString(bool Verify = false, bool IgnoreCache = false);
85 
86  //-------------------------------------------------------------
87  // Implementation of INodePrivate
88  //-------------------------------------------------------------
90  // \{
91  virtual void SetProperty(CProperty &Property);
92  virtual bool GetProperty(CNodeDataMap *pNodeDataMap, CPropertyID::EProperty_ID_t PropertyID, CNodeData::PropertyVector_t &PropertyList) const;
93  virtual void SetInvalid(INodePrivate::ESetInvalidMode simMode);
94  // \}
95 
96  virtual bool IsTerminalNode() const;
97 
98 
99  public:
100  //-------------------------------------------------------------
101  // Implementation
102  //-------------------------------------------------------------
103  bool GetValue( uint8_t Key, uint64_t& Value );
104  bool GetDescriptor( uint8_t Key, GENICAM_NAMESPACE::gcstring& Value );
105 
107  uint8_t* GetBuffer();
108 
109  //-------------------------------------------------------------
110  // Initializing
111  //-------------------------------------------------------------
112  public:
113  typedef uint8_t Key_t;
114  private:
115  // map type for numeric values
116  typedef std::map< Key_t, uint32_t > ValueMap_t;
118  typedef std::map< Key_t, GENICAM_NAMESPACE::gcstring > DescriptorMap_t;
119 
120  protected:
121  virtual void InternalGet(uint8_t *, int64_t, bool Verify = false, bool IgnoreCache = false );
122  private:
123  bool CheckAddressRange( void *pv ) const;
124  bool CheckIdentity() const;
125 
126  bool ParseConfRom( Key_t );
127  bool ParseDirectory( uint32_t *p, Key_t searchkey, Key_t mapkey );
128  bool ParseDescriptor( uint32_t *p, Key_t key );
129  bool ParseRootDirectory( uint32_t *p, Key_t key );
130  bool ParseUnitDependentDirectory( uint32_t *p, Key_t key );
131  bool ParseUnitDirectory( uint32_t *p, Key_t key );
132  static uint64_t UnitIdentifier( const uint32_t BusInfo[] );
133  uint32_t* LocateUnitDirectory( uint32_t *pInstance, Key_t key=0xD1);
134  bool InsertValues( uint32_t *q, bool lookup , Key_t key );
135 
136  uint32_t m_UnitId;
137  uint32_t m_CharSet;
138  uint32_t m_Language;
139  uint64_t m_Identity;
140 
142  uint32_t *m_pUnitDirectory;
143 
145  ValueMap_t m_ValueMap;
146 
148  DescriptorMap_t m_DescMap;
149 
151  uint8_t *m_pBuffer;
152 
153  };
154 
155  class CIEEE1212Parser : public BaseT< ValueT< RegisterT< NodeT< CIEEE1212ParserImpl > > > >
156  {
157  };
158 
159 }
160 
161 #ifdef _MSC_VER // *JS*
162 #pragma warning(pop)
163 #endif
164 
165 #endif // GENAPI_IEEE1212PARSER_H
virtual EInterfaceType InternalGetPrincipalInterfaceType() const
Implementation of IBase::GetPrincipalInterfaceType()
void FinalConstruct()
finalizes the construction of the node
bool ParseRootDirectory(uint32_t *p, Key_t key)
bool CheckAddressRange(void *pv) const
std::map< Key_t, uint32_t > ValueMap_t
static uint64_t UnitIdentifier(const uint32_t BusInfo[])
Definition of CRegister.
bool ParseDescriptor(uint32_t *p, Key_t key)
bool GetValue(uint8_t Key, uint64_t &Value)
virtual void SetProperty(CProperty &Property)
virtual bool GetProperty(CNodeDataMap *pNodeDataMap, CPropertyID::EProperty_ID_t PropertyID, CNodeData::PropertyVector_t &PropertyList) const
__int64 int64_t
Definition: config-win32.h:21
virtual GENICAM_NAMESPACE::gcstring InternalToString(bool Verify=false, bool IgnoreCache=false)
Get value of the node as string.
Implementation of the IBase interface.
Definition: BaseT.h:48
uint64_t m_Identity
Unit Identifier.
Standard IRegister implementation Provides a chunk of memory which acts as a proxy to the register...
Definition: Register.h:58
bool InsertValues(uint32_t *q, bool lookup, Key_t key)
bool GetDescriptor(uint8_t Key, GENICAM_NAMESPACE::gcstring &Value)
virtual bool IsTerminalNode() const
virtual void SetInvalid(INodePrivate::ESetInvalidMode simMode)
Initializes the object.
DescriptorMap_t m_DescMap
Map with strings found.
interface GENAPI_DECL_ABSTRACT bool Verify
Definition: IBoolean.h:61
uint32_t m_Language
0 = English (default)
virtual void InternalGet(uint8_t *, int64_t, bool Verify=false, bool IgnoreCache=false)
Retrieves a pointer to a buffer containing the register&#39;s contents.
uint32_t m_CharSet
0 = minimal ascii (default)
uint8_t * m_pBuffer
Buffer the register&#39;s content is cached in.
uint32_t * m_pUnitDirectory
Pointer to the Unit Directory.
uint32_t m_UnitId
Unit Specifier Id, assuming uniqueness.
A string class which is a clone of std::string.
Definition: GCString.h:52
ValueMap_t m_ValueMap
Map with numerical values found.
ESetInvalidMode
Three different modes of operation for INodePrivate::SetInvalid()
Definition: INodePrivate.h:91
bool ParseUnitDirectory(uint32_t *p, Key_t key)
IRegister interface.
Definition: Types.h:198
uint8_t * GetBuffer()
Gets the buffer; if required (re-)allocates memory.
bool ParseDirectory(uint32_t *p, Key_t searchkey, Key_t mapkey)
Part of the generic device API.
Definition: Autovector.h:48
enum GENAPI_NAMESPACE::_EInterfaceType EInterfaceType
typedef for interface type
std::map< Key_t, GENICAM_NAMESPACE::gcstring > DescriptorMap_t
map type for textual descriptors
uint32_t * LocateUnitDirectory(uint32_t *pInstance, Key_t key=0xD1)
bool ParseUnitDependentDirectory(uint32_t *p, Key_t key)


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