GenApi  3.5.1
ChunkAdapter.h
Go to the documentation of this file.
1 //-----------------------------------------------------------------------------
2 // (c) 2006 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_CHUNKADAPTER_H
30 #define GENAPI_CHUNKADAPTER_H
31 
32 #include <GenApi/Types.h>
33 #include <GenApi/INodeMap.h>
34 #include <GenApi/ChunkPort.h>
35 #include <vector>
36 
37 namespace GENAPI_NAMESPACE
38 {
39 
40 
43  typedef struct AttachStatistics_t
44  {
46  int NumChunks;
49 
50 
55  class GENAPI_DECL CChunkAdapter
56  {
57 
58  public:
60  virtual ~CChunkAdapter();
61  private:
62  CChunkAdapter(const CChunkAdapter&); // copy constructor is not implemented
63  CChunkAdapter& operator=(const CChunkAdapter&); // assignment operator is not implemented
64  public:
66  void AttachNodeMap(INodeMap* pNodeMap);
67 
69  void DetachNodeMap();
70 
72 
73  virtual bool CheckBufferLayout(uint8_t *pBuffer, int64_t BufferLength) = 0;
74 
76 
77  virtual void AttachBuffer(uint8_t *pBuffer, int64_t BufferLength, AttachStatistics_t *pAttachStatistics = NULL) = 0;
78 
80  void DetachBuffer();
81 
83  void UpdateBuffer(uint8_t *pBaseAddress);
84 
86  void ClearCaches();
87 
88  protected:
89 
91  CChunkAdapter(INodeMap* pNodeMap = NULL, int64_t MaxChunkCacheSize = -1);
92 
94 
95  std::vector<CChunkPort*> *m_ppChunkPorts;
96 
98 
100 
101  };
102 
103 }
104 
105 #endif // GENAPI_CHUNKADAPTER_H
Common types used in the public GenApi interface.
int NumAttachedChunks
Number of chunks from the buffer attached to a chunk port.
Definition: ChunkAdapter.h:47
struct GENAPI_NAMESPACE::AttachStatistics_t AttachStatistics_t
int64_t m_MaxChunkCacheSize
the maximum size of a chunk to be cached
Definition: ChunkAdapter.h:99
int NumChunkPorts
Number of chunk ports found in the node map.
Definition: ChunkAdapter.h:45
virtual IBoolean & operator=(bool Value)
Set node value.
Definition: IBoolean.h:62
Definition: ChunkAdapter.h:43
Definition of interface INodeMap.
GENICAM_INTERFACE INodeMap
Interface to access the node map.
Definition: INode.h:50
int NumChunks
Number of chunks found in the buffer.
Definition: ChunkAdapter.h:46
std::vector< CChunkPort * > * m_ppChunkPorts
An array of attached ChunkPorts.
Definition: ChunkAdapter.h:95
Connects a chunked buffer to a node map.
Definition: ChunkAdapter.h:55
Declaration of the CChunkPort class.
Definition: ChunkAdapter.h:37