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  };
199 
200  class CPort : public BaseT< NodeT< CPortImplIntern > >
201  {
202  };
203 
204 }
205 
206 #endif // ifndef GENAPI_PORT_H
virtual void StartRecording(IPortWriteList *pPortRecorder)
Starts logging all WriteRegister commands to a list.
EYesNo m_SwapEndianess
Determines if the port adapter must perform an endianess swap.
Definition: Port.h:188
GENICAM_INTERFACE GENAPI_DECL_ABSTRACT IPortStackedConstruct
Interface for ports.
virtual void EnabledStack()
Start stacking writes.
GENICAM_INTERFACE GENAPI_DECL_ABSTRACT IChunkPort
Interface for ports attached to a chunk.
Definition: IChunkPort.h:69
bool m_isStackingEnabled
Determines if write stacking is allowed.
Definition: Port.h:194
IPort interface.
Definition: Types.h:202
virtual void DisableStack()
Disable the write stack, all data in the stack will be lost.
CStringPolyRef m_ChunkID
The ChunkID.
Definition: Port.h:182
GENICAM_INTERFACE GENAPI_DECL_ABSTRACT IPortWriteList
Definition: IPortRecorder.h:45
virtual void Replay(IPortWriteList *pPortRecorder, bool Invalidate=true)
Sends the commands to the camera.
EYesNo m_CacheChunkData
Determines if the port adapter must cache the chunk data.
Definition: Port.h:191
CPortImplIntern()
Default constructor.
__int64 int64_t
Definition: config-win32.h:21
virtual EYesNo GetSwapEndianess()
Determines if the port adapter must perform an endianess swap.
virtual bool GetProperty(CNodeDataMap *pNodeDataMap, CPropertyID::EProperty_ID_t PropertyID, CNodeData::PropertyVector_t &PropertyList) const
GENICAM_INTERFACE GENAPI_DECL_ABSTRACT int64_t Address
Definition: IPort.h:57
virtual void SetProperty(CProperty &Property)
Implementation of the IBase interface.
Definition: BaseT.h:48
Definition of the NodeT class template.
virtual ~CPortImplIntern()
Destructor.
IPort * m_pPort
Pointer to node giving access to the real port implementation.
Definition: Port.h:173
GENICAM_INTERFACE GENAPI_DECL_ABSTRACT IPortRecorder
Interface for recording write commands on a port.
Definition: IPortRecorder.h:73
GENICAM_INTERFACE GENAPI_DECL_ABSTRACT IPortStacked
Interface for ports.
Definition: IPortStacked.h:63
virtual CValueCache * GetValueCache() const
Returns the value cache.
IPortStacked * m_pPortStack
Pointer to node giving access to the real port implementation with stack.
Definition: Port.h:176
GENICAM_INTERFACE GENAPI_DECL_ABSTRACT int64_t int64_t Length
Definition: IPort.h:57
enum GENAPI_NAMESPACE::_EYesNo EYesNo
Defines the choices of a Yes/No alternatives.
IPortWriteList * m_pPortWriteList
Pointer to node giving access to the real port implementation.
Definition: Port.h:179
Definition of the BaseT class template.
Standard IPort implementation.
Definition: Port.h:58
virtual void FlushStack()
Flush the write stack to the device.
Standard implementation for the INode and the ISelector interface.
Definition: Node.h:86
virtual EInterfaceType InternalGetPrincipalInterfaceType() const
Implementation of IBase::GetPrincipalInterfaceType()
Definition: Port.h:82
virtual EAccessMode InternalGetAccessMode() const
Get the access mode of the node.
virtual EYesNo CacheChunkData() const
Indicates if the chunk a adapter must hold a cached version of the chunk data.
GENICAM_INTERFACE GENAPI_DECL_ABSTRACT IPort
Interface for ports.
Definition: IPort.h:57
A string class which is a clone of std::string.
Definition: GCString.h:52
enum GENAPI_NAMESPACE::_EAccessMode EAccessMode
access mode of a node
GENICAM_INTERFACE GENAPI_DECL_ABSTRACT IPortConstruct
Interface for ports.
GENAPI_NAMESPACE::CValueCache * m_pValueCache
Pointer the value cache.
Definition: Port.h:185
std::vector< PORT_REGISTER_STACK_ENTRY > m_writeStackData
Write stack.
Definition: Port.h:197
Cache for Registervalues.
Definition: ValueCache.h:46
virtual void Write(const void *pBuffer, int64_t Address, int64_t Length)
Writes a chunk of bytes to the port.
GENICAM_INTERFACE GENAPI_DECL_ABSTRACT bool Invalidate
Definition: IPortRecorder.h:72
virtual GENICAM_NAMESPACE::gcstring GetChunkID() const
Get the Id of the chunk the port should be attached to.
virtual void Read(void *pBuffer, int64_t Address, int64_t Length)
Reads a chunk of bytes from the port.
Lexical analyzer for CIntSwissKnife.
Definition: Autovector.h:48
virtual void StopRecording()
Stops recording.
void SetPortImpl(IPort *pPort)
Sets pointer the real port implementation; this function may called only once.
enum GENAPI_NAMESPACE::_EInterfaceType EInterfaceType
typedef for interface type
A reference to a gcstring which can be either a gcstring variable, or a pointer to an IString...


rc_genicam_api
Author(s): Heiko Hirschmueller
autogenerated on Wed Mar 17 2021 02:48:41