All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Port.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_PORT_H
32 #define GENAPI_PORT_H
33 
34 #include "../Types.h"
35 #include "../IPortConstruct.h"
36 #include "../IChunkPort.h"
37 #include "../IPortRecorder.h"
38 #include "../IString.h"
39 #include "Node.h"
40 #include "NodeT.h"
41 //#include "NodeMap.h"
42 #include "BaseT.h"
43 
44 class CNodeImpl;
45 
46 namespace GENAPI_NAMESPACE
47 {
48 
49  class CValueCache;
50 
51  //*************************************************************
52  // CPort class
53  //*************************************************************
54 
56 
59  public IPortConstruct,
60  public IChunkPort,
61  public IPortRecorder,
62  public IPortStackedConstruct,
63  public CNodeImpl
64  {
65  public:
67  //constructor
69 
71  virtual ~CPortImplIntern();
72 
73  //-------------------------------------------------------------
74  // IBase implementation
75  //-------------------------------------------------------------
76 
77  protected:
79  virtual EAccessMode InternalGetAccessMode() const;
80 
83  {
84  return intfIPort;
85  }
86 
87  //-------------------------------------------------------------
88  // IPort implementation
89  //-------------------------------------------------------------
90 
91  public:
93  virtual void Read(void *pBuffer, int64_t Address, int64_t Length);
94 
96  virtual void Write(const void *pBuffer, int64_t Address, int64_t Length);
97 
98  //-------------------------------------------------------------
99  // IPortConstruct implementation
100  //-------------------------------------------------------------
101 
103  void SetPortImpl(IPort* pPort);
104 
106  void SetPortImpl(IPortStacked *pPort);
107 
108  //-------------------------------------------------------------
109  // IChunkPort implementation
110  //-------------------------------------------------------------
111 
113  virtual GENICAM_NAMESPACE::gcstring GetChunkID() const;
114 
116  virtual EYesNo GetSwapEndianess();
117 
119  virtual EYesNo CacheChunkData() const;
120 
121  //-------------------------------------------------------------
122  // IPortRecorder implementation
123  //-------------------------------------------------------------
124 
126  virtual void StartRecording( IPortWriteList *pPortRecorder );
127 
129  virtual void StopRecording();
130 
131  //-------------------------------------------------------------
132  // IPortReplay implementation
133  //-------------------------------------------------------------
134 
136 
141  virtual void Replay( IPortWriteList *pPortRecorder, bool Invalidate = true );
142 
143  //-------------------------------------------------------------
144  // IPortStacked Interface
145  //-------------------------------------------------------------
147  virtual void EnabledStack();
148 
150  virtual void FlushStack();
151 
153  virtual void DisableStack();
154 
155  //-------------------------------------------------------------
156  // Initializing
157  //-------------------------------------------------------------
158 
159 
160  virtual void SetProperty(CProperty &Property);
161  virtual bool GetProperty(CNodeDataMap *pNodeDataMap, CPropertyID::EProperty_ID_t PropertyID, CNodeData::PropertyVector_t &PropertyList) const;
162 
164  virtual CValueCache* GetValueCache() const;
165 
166 
167  protected:
168  //-------------------------------------------------------------
169  // Member variables
170  //-------------------------------------------------------------
171 
174 
177 
180 
183 
186 
189 
192 
195 
197  std::vector<PORT_REGISTER_STACK_ENTRY> m_writeStackData;
198  private:
199  CPortImplIntern(const CPortImplIntern&); // do not allow copy constructor
200  CPortImplIntern& operator=(const CPortImplIntern&); // do not allow assignments
201  };
202 
203  class CPort : public BaseT< NodeT< CPortImplIntern > >
204  {
205  };
206 
207 }
208 
209 #endif // ifndef GENAPI_PORT_H
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::CPortImplIntern::m_pPort
IPort * m_pPort
Pointer to node giving access to the real port implementation.
Definition: Port.h:173
GENAPI_NAMESPACE::CPortImplIntern::m_writeStackData
std::vector< PORT_REGISTER_STACK_ENTRY > m_writeStackData
Write stack.
Definition: Port.h:197
GENAPI_NAMESPACE::CPortImplIntern::m_CacheChunkData
EYesNo m_CacheChunkData
Determines if the port adapter must cache the chunk data.
Definition: Port.h:191
GENAPI_NAMESPACE::IPortWriteList
GENICAM_INTERFACE GENAPI_DECL_ABSTRACT IPortWriteList
Definition: IPortRecorder.h:45
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::CPortImplIntern::GetProperty
virtual bool GetProperty(CNodeDataMap *pNodeDataMap, CPropertyID::EProperty_ID_t PropertyID, CNodeData::PropertyVector_t &PropertyList) const
GENAPI_NAMESPACE::CPortImplIntern::operator=
CPortImplIntern & operator=(const CPortImplIntern &)
GENAPI_NAMESPACE::CValueCache
Cache for Registervalues.
Definition: ValueCache.h:46
NodeT.h
Definition of the NodeT class template.
GENAPI_NAMESPACE::BaseT
Implementation of the IBase interface.
Definition: BaseT.h:48
GENAPI_NAMESPACE::CPortImplIntern::StartRecording
virtual void StartRecording(IPortWriteList *pPortRecorder)
Starts logging all WriteRegister commands to a list.
GENAPI_NAMESPACE::CPortImplIntern
Standard IPort implementation.
Definition: Port.h:58
GENAPI_NAMESPACE::CPortImplIntern::GetSwapEndianess
virtual EYesNo GetSwapEndianess()
Determines if the port adapter must perform an endianess swap.
GENAPI_NAMESPACE::CPortImplIntern::CacheChunkData
virtual EYesNo CacheChunkData() const
Indicates if the chunk a adapter must hold a cached version of the chunk data.
GENAPI_NAMESPACE::CPortImplIntern::SetPortImpl
void SetPortImpl(IPort *pPort)
Sets pointer the real port implementation; this function may called only once.
GENAPI_NAMESPACE::CPortImplIntern::m_isStackingEnabled
bool m_isStackingEnabled
Determines if write stacking is allowed.
Definition: Port.h:194
GENAPI_NAMESPACE::CPortImplIntern::GetChunkID
virtual GENICAM_NAMESPACE::gcstring GetChunkID() const
Get the Id of the chunk the port should be attached to.
GENAPI_NAMESPACE::EInterfaceType
enum GENAPI_NAMESPACE::_EInterfaceType EInterfaceType
typedef for interface type
GENAPI_NAMESPACE::CPortImplIntern::m_SwapEndianess
EYesNo m_SwapEndianess
Determines if the port adapter must perform an endianess swap.
Definition: Port.h:188
GENAPI_NAMESPACE::IPortStacked
GENICAM_INTERFACE GENAPI_DECL_ABSTRACT IPortStacked
Interface for ports.
Definition: IPortStacked.h:63
GENAPI_NAMESPACE::CPortImplIntern::CPortImplIntern
CPortImplIntern()
Default constructor.
GENAPI_NAMESPACE::CPortImplIntern::FlushStack
virtual void FlushStack()
Flush the write stack to the device.
BaseT.h
Definition of the BaseT class template.
GENAPI_NAMESPACE::CPortImplIntern::Read
virtual void Read(void *pBuffer, int64_t Address, int64_t Length)
Reads a chunk of bytes from the port.
GENAPI_NAMESPACE::CPortImplIntern::InternalGetAccessMode
virtual EAccessMode InternalGetAccessMode() const
Get the access mode of the node.
GENAPI_NAMESPACE::IPortStackedConstruct
GENICAM_INTERFACE GENAPI_DECL_ABSTRACT IPortStackedConstruct
Interface for ports.
Definition: IPortConstruct.h:63
GENAPI_NAMESPACE::intfIPort
@ intfIPort
IPort interface.
Definition: Types.h:201
GENAPI_NAMESPACE::Address
GENICAM_INTERFACE GENAPI_DECL_ABSTRACT int64_t Address
Definition: IPort.h:57
Node.h
GENAPI_NAMESPACE::CPortImplIntern::DisableStack
virtual void DisableStack()
Disable the write stack, all data in the stack will be lost.
GENAPI_NAMESPACE::Length
GENICAM_INTERFACE GENAPI_DECL_ABSTRACT int64_t int64_t Length
Definition: IPort.h:57
GENAPI_NAMESPACE::IPortRecorder
GENICAM_INTERFACE GENAPI_DECL_ABSTRACT IPortRecorder
Interface for recording write commands on a port.
Definition: IPortRecorder.h:73
GENAPI_NAMESPACE::CPortImplIntern::~CPortImplIntern
virtual ~CPortImplIntern()
Destructor.
GENAPI_NAMESPACE::EYesNo
enum GENAPI_NAMESPACE::_EYesNo EYesNo
Defines the choices of a Yes/No alternatives.
GENAPI_NAMESPACE::CPortImplIntern::m_pPortWriteList
IPortWriteList * m_pPortWriteList
Pointer to node giving access to the real port implementation.
Definition: Port.h:179
GENAPI_NAMESPACE::CPortImplIntern::SetProperty
virtual void SetProperty(CProperty &Property)
GENAPI_NAMESPACE::CPortImplIntern::InternalGetPrincipalInterfaceType
virtual EInterfaceType InternalGetPrincipalInterfaceType() const
Implementation of IBase::GetPrincipalInterfaceType()
Definition: Port.h:82
int64_t
__int64 int64_t
Definition: config-win32.h:21
GENAPI_NAMESPACE::CPortImplIntern::m_ChunkID
CStringPolyRef m_ChunkID
The ChunkID.
Definition: Port.h:182
GENAPI_NAMESPACE::IPort
GENICAM_INTERFACE GENAPI_DECL_ABSTRACT IPort
Interface for ports.
Definition: IPort.h:57
GENAPI_NAMESPACE::CPortImplIntern::m_pPortStack
IPortStacked * m_pPortStack
Pointer to node giving access to the real port implementation with stack.
Definition: Port.h:176
GENAPI_NAMESPACE::CPortImplIntern::m_pValueCache
GENAPI_NAMESPACE::CValueCache * m_pValueCache
Pointer the value cache.
Definition: Port.h:185
GENAPI_NAMESPACE::CPortImplIntern::GetValueCache
virtual CValueCache * GetValueCache() const
Returns the value cache.
GENAPI_NAMESPACE::CPortImplIntern::StopRecording
virtual void StopRecording()
Stops recording.
GENAPI_NAMESPACE::CPortImplIntern::EnabledStack
virtual void EnabledStack()
Start stacking writes.
GENAPI_NAMESPACE::IPortConstruct
GENICAM_INTERFACE GENAPI_DECL_ABSTRACT IPortConstruct
Interface for ports.
Definition: IPortConstruct.h:52
GENAPI_NAMESPACE::Invalidate
GENICAM_INTERFACE GENAPI_DECL_ABSTRACT bool Invalidate
Definition: IPortRecorder.h:72
GENAPI_NAMESPACE::CPortImplIntern::Replay
virtual void Replay(IPortWriteList *pPortRecorder, bool Invalidate=true)
Sends the commands to the camera.
GENAPI_NAMESPACE::IChunkPort
GENICAM_INTERFACE GENAPI_DECL_ABSTRACT IChunkPort
Interface for ports attached to a chunk.
Definition: IChunkPort.h:69
GENAPI_NAMESPACE::CStringPolyRef
A reference to a gcstring which can be either a gcstring variable, or a pointer to an IString.
Definition: PolyReference.h:1064
GENAPI_NAMESPACE::CPortImplIntern::Write
virtual void Write(const void *pBuffer, int64_t Address, int64_t Length)
Writes a chunk of bytes to the port.
GENAPI_NAMESPACE::CPort
Definition: Port.h:203


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