IPortRecorder.h
Go to the documentation of this file.
1 //-----------------------------------------------------------------------------
2 // (c) 2009 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_IPORTRECORDER_H
32 #define GENAPI_IPORTRECORDER_H
33 
34 #include <GenApi/IPort.h>
35 
36 #ifdef _MSC_VER
37 # pragma warning ( push )
38 # pragma warning ( disable : 4251 ) // XXX needs to have dll-interface to be used by clients of class YYY
39 #endif
40 
41 namespace GENAPI_NAMESPACE
42 {
43 
44  GENICAM_INTERFACE GENAPI_DECL_ABSTRACT IPortWriteList
45  {
47  virtual void Write(const void *pBuffer, int64_t Address, int64_t Length) = 0;
48 
50  virtual void Replay(IPort* pPort) = 0;
51 
53  // Default = -1
54  virtual void SetCookie(const int64_t Value) = 0;
55 
57  virtual int64_t GetCookie() = 0;
58  };
59 
64  GENICAM_INTERFACE GENAPI_DECL_ABSTRACT IPortReplay : virtual public IPort
65  {
67 
72  virtual void Replay( IPortWriteList *pPortRecorder, bool Invalidate = true ) = 0;
73  };
74 
79  GENICAM_INTERFACE GENAPI_DECL_ABSTRACT IPortRecorder : public IPortReplay
80  {
82  virtual void StartRecording( IPortWriteList *pPortRecorder ) = 0;
83 
85  virtual void StopRecording() = 0;
86  };
87 
88  //*************************************************************
89  // CPortRecorderRef class
90  //*************************************************************
91 
97  template <class T>
98  class CPortRecorderRefT : public CPortRefT<T>
99  {
100  typedef CPortRefT<T> ref;
101 
102  public:
103  /*--------------------------------------------------------*/
104  // IPortRecorder
105  /*--------------------------------------------------------*/
106 
108 
113  virtual void Replay( IPortWriteList *pPortRecorder, bool Invalidate = true )
114  {
115  if(ref::m_Ptr)
116  return ref::m_Ptr->Replay(pPortRecorder, Invalidate);
117  else
118  throw ACCESS_EXCEPTION("Feature not present (reference not valid)");
119  }
120 
122  virtual void StartRecording( IPortWriteList *pPortRecorder )
123  {
124  if(ref::m_Ptr)
125  return ref::m_Ptr->StartRecording(pPortRecorder);
126  else
127  throw ACCESS_EXCEPTION("Feature not present (reference not valid)");
128  }
129 
131  virtual void StopRecording()
132  {
133  if(ref::m_Ptr)
134  return ref::m_Ptr->StopRecording();
135  else
136  throw ACCESS_EXCEPTION("Feature not present (reference not valid)");
137  }
138 
139  };
140 
144 
145 }
146 
147 #ifdef _MSC_VER
148 # pragma warning ( pop )
149 #endif
150 
151 #endif // ifndef GENAPI_IPORTRECORDER_H
#define GENICAM_INTERFACE
Definition: GenICamFwd.h:33
virtual void StopRecording()
stops recording
GENICAM_INTERFACE GENAPI_DECL_ABSTRACT IPortWriteList
Definition: IPortRecorder.h:45
virtual void StopRecording()=0
stops recording
__int64 int64_t
Definition: config-win32.h:21
GENICAM_INTERFACE GENAPI_DECL_ABSTRACT int64_t Address
Definition: IPort.h:57
virtual void StartRecording(IPortWriteList *pPortRecorder)
starts logging all WriteRegister commands to a list
GENICAM_INTERFACE GENAPI_DECL_ABSTRACT IPortRecorder
Interface for recording write commands on a port.
Definition: IPortRecorder.h:73
virtual void SetCookie(const int64_t Value)=0
Sets a cookie in case the port implementation want to cache a command list.
GENICAM_INTERFACE GENAPI_DECL_ABSTRACT IPortReplay
Interface for replaying write commands on a port.
Definition: IPortRecorder.h:58
GENICAM_INTERFACE GENAPI_DECL_ABSTRACT int64_t int64_t Length
Definition: IPort.h:57
#define ACCESS_EXCEPTION
Fires a access exception, e.g. throw ACCESS_EXCEPTION("Not everybody")
Definition: GCException.h:253
T * m_Ptr
Pointer to the implementation the reference references to.
Definition: Reference.h:101
virtual void Replay(IPortWriteList *pPortRecorder, bool Invalidate=true)
sends the commands to the camera.
virtual void Replay(IPort *pPort)=0
Replays the write command to the given port interface.
virtual int64_t GetCookie()=0
Gets the cookie a port implementation may have set for caching a command list.
GENICAM_INTERFACE GENAPI_DECL_ABSTRACT IPort
Interface for ports.
Definition: IPort.h:57
Definition of interface IPort.
virtual void Write(const void *pBuffer, int64_t Address, int64_t Length)=0
Writes a chunk of bytes to the port.
GENICAM_INTERFACE GENAPI_DECL_ABSTRACT bool Invalidate
Definition: IPortRecorder.h:72
Lexical analyzer for CIntSwissKnife.
Definition: Autovector.h:48
CPortRecorderRefT< IPortRecorder > CPortRecorderRef
Reference to an IPortRecorder pointer.


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