GenApi  3.5.1
PortWriteList.h
Go to the documentation of this file.
1 //-----------------------------------------------------------------------------
2 // (c) 2009 by Basler Vision Technologies
3 // Author: Fritz Dierks
4 //
5 // License: This file is published under the license of the EMVA GenICam Standard Group.
6 // A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'.
7 // If for some reason you are missing this file please contact the EMVA or visit the website
8 // (http://www.genicam.org) for a full copy.
9 //
10 // THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS"
11 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
12 // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
13 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP
14 // OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
15 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
16 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
17 // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
18 // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
19 // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
20 // POSSIBILITY OF SUCH DAMAGE.
21 //
22 //-----------------------------------------------------------------------------
29 #ifndef GENAPI_PORTWRITELIST_H
30 #define GENAPI_PORTWRITELIST_H
31 
32 #include <GenApi/IPortRecorder.h>
33 #include <list>
34 
35 #ifdef _MSC_VER
36 # pragma warning ( push )
37 # pragma warning ( disable : 4251 ) // XXX needs to have dll-interface to be used by clients of class YYY
38 #endif
39 
40 namespace GENAPI_NAMESPACE
41 {
42 
44  class GENAPI_DECL CPortWriteList : public IPortWriteList
45  {
46  public:
49 
51  virtual ~CPortWriteList();
52  private:
53  CPortWriteList(const CPortWriteList&); // copy constructor not implemented
54  CPortWriteList& operator=(const CPortWriteList&); // assignment operator is not implemented
55  public:
56  /*---------------------------------------------------------------*/
57  // IPortWriteList
58  /*---------------------------------------------------------------*/
59 
61  virtual void Write(const void *pBuffer, int64_t Address, int64_t Length);
62 
64  virtual void Replay(IPort* pPort);
65 
67  // Default = -1
68  virtual void SetCookie(const int64_t Value);
69 
71  virtual int64_t GetCookie();
72 
73  protected:
75  typedef struct
76  {
77  int64_t Address;
78  int64_t Length;
79  char *pData;
81 
83  std::list<WriteCommand_t> *m_pWriteCommands;
84 
86  int64_t m_Cookie;
87  };
88 
89 }
90 
91 #ifdef _MSC_VER
92 # pragma warning ( pop )
93 #endif
94 
95 #endif // ifndef GENAPI_PORTWRITELIST_H
virtual void Replay(IPort *pPort)=0
Replays the write command to the given port interface.
Container holding a list of port write commands.
Definition: PortWriteList.h:44
std::list< WriteCommand_t > * m_pWriteCommands
a list holding the write commands
Definition: PortWriteList.h:83
virtual IBoolean & operator=(bool Value)
Set node value.
Definition: IBoolean.h:62
GENICAM_INTERFACE GENAPI_DECL_ABSTRACT IPort
Interface for ports.
Definition: IPort.h:55
Definition of interface IPort.
int64_t m_Cookie
A cookie helper for caching.
Definition: PortWriteList.h:86
virtual void Write(const void *pBuffer, int64_t Address, int64_t Length)=0
Writes a chunk of bytes to the port.
The data associated with a write command.
Definition: PortWriteList.h:75
virtual int64_t GetCookie()=0
Gets the cookie a port implementation may have set for caching a command list.
virtual void SetCookie(const int64_t Value)=0
Sets a cookie in case the port implementation want to cache a command list.
Definition: ChunkAdapter.h:37