All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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  private:
69  CIEEE1212ParserImpl(const CIEEE1212ParserImpl&); // copy constructor not implemented
70  CIEEE1212ParserImpl& operator=(const CIEEE1212ParserImpl&); // assignment operator is not implemented
71  public:
72  void FinalConstruct();
73 
74  protected:
75 
78  {
79  return intfIRegister;
80  }
81 
82  //-------------------------------------------------------------
83  // IValue implementation
84  //-------------------------------------------------------------
85 
87  virtual GENICAM_NAMESPACE::gcstring InternalToString(bool Verify = false, bool IgnoreCache = false);
88 
89  //-------------------------------------------------------------
90  // Implementation of INodePrivate
91  //-------------------------------------------------------------
93  // \{
94  virtual void SetProperty(CProperty &Property);
95  virtual bool GetProperty(CNodeDataMap *pNodeDataMap, CPropertyID::EProperty_ID_t PropertyID, CNodeData::PropertyVector_t &PropertyList) const;
96  virtual void SetInvalid(INodePrivate::ESetInvalidMode simMode);
97  // \}
98 
99  virtual bool IsTerminalNode() const;
100 
101 
102  public:
103  //-------------------------------------------------------------
104  // Implementation
105  //-------------------------------------------------------------
106  bool GetValue( uint8_t Key, uint64_t& Value );
107  bool GetDescriptor( uint8_t Key, GENICAM_NAMESPACE::gcstring& Value );
108 
110  uint8_t* GetBuffer();
111 
112  //-------------------------------------------------------------
113  // Initializing
114  //-------------------------------------------------------------
115  public:
116  typedef uint8_t Key_t;
117  private:
118  // map type for numeric values
119  typedef std::map< Key_t, uint32_t > ValueMap_t;
121  typedef std::map< Key_t, GENICAM_NAMESPACE::gcstring > DescriptorMap_t;
122 
123  protected:
124  virtual void InternalGet(uint8_t *, int64_t, bool Verify = false, bool IgnoreCache = false );
125  private:
126  bool CheckAddressRange( void *pv ) const;
127  bool CheckIdentity() const;
128 
129  bool ParseConfRom( Key_t );
130  bool ParseDirectory( uint32_t *p, Key_t searchkey, Key_t mapkey );
131  bool ParseDescriptor( uint32_t *p, Key_t key );
132  bool ParseRootDirectory( uint32_t *p, Key_t key );
133  bool ParseUnitDependentDirectory( uint32_t *p, Key_t key );
134  bool ParseUnitDirectory( uint32_t *p, Key_t key );
135  static uint64_t UnitIdentifier( const uint32_t BusInfo[] );
136  uint32_t* LocateUnitDirectory( uint32_t *pInstance, Key_t key=0xD1);
137  bool InsertValues( uint32_t *q, bool lookup , Key_t key );
138 
139  uint32_t m_UnitId;
140  uint32_t m_CharSet;
141  uint32_t m_Language;
142  uint64_t m_Identity;
143 
145  uint32_t *m_pUnitDirectory;
146 
149 
152 
154  uint8_t *m_pBuffer;
155 
156  };
157 
158  class CIEEE1212Parser : public BaseT< ValueT< RegisterT< NodeT< CIEEE1212ParserImpl > > > >
159  {
160  };
161 
162 }
163 
164 #ifdef _MSC_VER // *JS*
165 #pragma warning(pop)
166 #endif
167 
168 #endif // GENAPI_IEEE1212PARSER_H
GENAPI_NAMESPACE
Lexical analyzer for CIntSwissKnife.
Definition: Destructible.h:30
GENAPI_NAMESPACE::intfIRegister
@ intfIRegister
IRegister interface.
Definition: Types.h:197
GENAPI_NAMESPACE::CIEEE1212ParserImpl
Definition: IEEE1212Parser.h:63
GENAPI_NAMESPACE::CIEEE1212ParserImpl::ParseRootDirectory
bool ParseRootDirectory(uint32_t *p, Key_t key)
GENAPI_NAMESPACE::CIEEE1212ParserImpl::GetValue
bool GetValue(uint8_t Key, uint64_t &Value)
GENAPI_NAMESPACE::CIEEE1212ParserImpl::ParseUnitDependentDirectory
bool ParseUnitDependentDirectory(uint32_t *p, Key_t key)
GENAPI_NAMESPACE::CIEEE1212ParserImpl::SetProperty
virtual void SetProperty(CProperty &Property)
GENAPI_NAMESPACE::CIEEE1212ParserImpl::UnitIdentifier
static uint64_t UnitIdentifier(const uint32_t BusInfo[])
GENICAM_NAMESPACE::gcstring
A string class which is a clone of std::string.
Definition: GCString.h:52
GENAPI_NAMESPACE::CIEEE1212ParserImpl::FinalConstruct
void FinalConstruct()
finalizes the construction of the node
GENAPI_NAMESPACE::CIEEE1212Parser
Definition: IEEE1212Parser.h:158
GENAPI_NAMESPACE::CIEEE1212ParserImpl::Key_t
uint8_t Key_t
Definition: IEEE1212Parser.h:116
GENAPI_NAMESPACE::CIEEE1212ParserImpl::InternalToString
virtual GENICAM_NAMESPACE::gcstring InternalToString(bool Verify=false, bool IgnoreCache=false)
Get value of the node as string.
GENAPI_NAMESPACE::BaseT
Implementation of the IBase interface.
Definition: BaseT.h:48
GENAPI_NAMESPACE::CIEEE1212ParserImpl::operator=
CIEEE1212ParserImpl & operator=(const CIEEE1212ParserImpl &)
GENAPI_NAMESPACE::CIEEE1212ParserImpl::InsertValues
bool InsertValues(uint32_t *q, bool lookup, Key_t key)
GENAPI_NAMESPACE::Verify
GENICAM_INTERFACE GENAPI_DECL_ABSTRACT bool Verify
Definition: IBoolean.h:61
GENAPI_NAMESPACE::CIEEE1212ParserImpl::GetProperty
virtual bool GetProperty(CNodeDataMap *pNodeDataMap, CPropertyID::EProperty_ID_t PropertyID, CNodeData::PropertyVector_t &PropertyList) const
GENAPI_NAMESPACE::EInterfaceType
enum GENAPI_NAMESPACE::_EInterfaceType EInterfaceType
typedef for interface type
GENAPI_NAMESPACE::CIEEE1212ParserImpl::m_Identity
uint64_t m_Identity
Unit Identifier.
Definition: IEEE1212Parser.h:142
GENAPI_NAMESPACE::CIEEE1212ParserImpl::InternalGetPrincipalInterfaceType
virtual EInterfaceType InternalGetPrincipalInterfaceType() const
Implementation of IBase::GetPrincipalInterfaceType()
Definition: IEEE1212Parser.h:77
GENAPI_NAMESPACE::CIEEE1212ParserImpl::~CIEEE1212ParserImpl
~CIEEE1212ParserImpl(void)
GENAPI_NAMESPACE::CIEEE1212ParserImpl::CheckAddressRange
bool CheckAddressRange(void *pv) const
GENAPI_NAMESPACE::CIEEE1212ParserImpl::InternalGet
virtual void InternalGet(uint8_t *, int64_t, bool Verify=false, bool IgnoreCache=false)
Retrieves a pointer to a buffer containing the register's contents.
GENAPI_NAMESPACE::CIEEE1212ParserImpl::m_CharSet
uint32_t m_CharSet
0 = minimal ascii (default)
Definition: IEEE1212Parser.h:140
GENAPI_NAMESPACE::CIEEE1212ParserImpl::m_ValueMap
ValueMap_t m_ValueMap
Map with numerical values found.
Definition: IEEE1212Parser.h:148
GENAPI_NAMESPACE::CIEEE1212ParserImpl::m_UnitId
uint32_t m_UnitId
Unit Specifier Id, assuming uniqueness.
Definition: IEEE1212Parser.h:139
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::CIEEE1212ParserImpl::SetInvalid
virtual void SetInvalid(INodePrivate::ESetInvalidMode simMode)
Initializes the object.
GENAPI_NAMESPACE::ESetInvalidMode
ESetInvalidMode
Three different modes of operation for INodePrivate::SetInvalid()
Definition: INodePrivate.h:91
GENAPI_NAMESPACE::CIEEE1212ParserImpl::CIEEE1212ParserImpl
CIEEE1212ParserImpl(void)
GENAPI_NAMESPACE::CIEEE1212ParserImpl::m_pUnitDirectory
uint32_t * m_pUnitDirectory
Pointer to the Unit Directory.
Definition: IEEE1212Parser.h:145
GENAPI_NAMESPACE::CIEEE1212ParserImpl::m_Language
uint32_t m_Language
0 = English (default)
Definition: IEEE1212Parser.h:141
GENAPI_NAMESPACE::CIEEE1212ParserImpl::GetDescriptor
bool GetDescriptor(uint8_t Key, GENICAM_NAMESPACE::gcstring &Value)
GENAPI_NAMESPACE::CIEEE1212ParserImpl::m_DescMap
DescriptorMap_t m_DescMap
Map with strings found.
Definition: IEEE1212Parser.h:151
GENAPI_NAMESPACE::CIEEE1212ParserImpl::ParseConfRom
bool ParseConfRom(Key_t)
int64_t
__int64 int64_t
Definition: config-win32.h:21
GENAPI_NAMESPACE::CIEEE1212ParserImpl::IsTerminalNode
virtual bool IsTerminalNode() const
GENAPI_NAMESPACE::CIEEE1212ParserImpl::CheckIdentity
bool CheckIdentity() const
GENAPI_NAMESPACE::CIEEE1212ParserImpl::GetBuffer
uint8_t * GetBuffer()
Gets the buffer; if required (re-)allocates memory.
GENAPI_NAMESPACE::CIEEE1212ParserImpl::ValueMap_t
std::map< Key_t, uint32_t > ValueMap_t
Definition: IEEE1212Parser.h:119
GENAPI_NAMESPACE::CIEEE1212ParserImpl::LocateUnitDirectory
uint32_t * LocateUnitDirectory(uint32_t *pInstance, Key_t key=0xD1)
Register.h
Definition of CRegister.
GENAPI_NAMESPACE::CIEEE1212ParserImpl::m_pBuffer
uint8_t * m_pBuffer
Buffer the register's content is cached in.
Definition: IEEE1212Parser.h:154
GENAPI_NAMESPACE::CIEEE1212ParserImpl::DescriptorMap_t
std::map< Key_t, GENICAM_NAMESPACE::gcstring > DescriptorMap_t
map type for textual descriptors
Definition: IEEE1212Parser.h:121
GENAPI_NAMESPACE::CIEEE1212ParserImpl::ParseUnitDirectory
bool ParseUnitDirectory(uint32_t *p, Key_t key)
GENAPI_NAMESPACE::CIEEE1212ParserImpl::ParseDescriptor
bool ParseDescriptor(uint32_t *p, Key_t key)
GENAPI_NAMESPACE::CIEEE1212ParserImpl::ParseDirectory
bool ParseDirectory(uint32_t *p, Key_t searchkey, Key_t mapkey)


rc_genicam_api
Author(s): Heiko Hirschmueller
autogenerated on Wed Dec 4 2024 03:10:11