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
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
40namespace 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 IBoolean & operator=(bool Value)
Set node value.
Definition IBoolean.h:62
Definition of interface IPort.
Container holding a list of port write commands.
Definition PortWriteList.h:45
virtual void Replay(IPort *pPort)
Replays the write command to the given port interface.
virtual int64_t GetCookie()
Gets the cookie a port implementation may have set for caching a command list.
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)
Writes a chunk of bytes to the port.
virtual ~CPortWriteList()
Destructor.
virtual void SetCookie(const int64_t Value)
Sets a cookie in case the port implementation want to cache a command list.
std::list< WriteCommand_t > * m_pWriteCommands
a list holding the write commands
Definition PortWriteList.h:83
The data associated with a write command.
Definition PortWriteList.h:76