ChunkAdapterDcam.h
Go to the documentation of this file.
1 //-----------------------------------------------------------------------------
2 // (c) 2004 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 //-----------------------------------------------------------------------------
30 #ifndef GENAPI_CHUNKADAPTERDCAM_H
31 #define GENAPI_CHUNKADAPTERDCAM_H
32 
33 #include <Base/GCTypes.h>
34 #include <GenApi/ChunkAdapter.h>
35 #include <GenApi/Compatibility.h>
36 
37 namespace GENAPI_NAMESPACE
38 {
39 
40  void GENAPI_DECL SET_GUID(GUID& name, uint32_t l, uint16_t w1, uint16_t w2, uint8_t b1, uint8_t b2, uint8_t b3, uint8_t b4, uint8_t b5, uint8_t b6, uint8_t b7, uint8_t b8);
41 
42 
43  // make sure everything is properly packed
44 # pragma pack(push, 1)
45 
46  typedef struct DCAM_CHUNK_TRAILER
47  {
48  GUID ChunkID ;
49  uint32_t ChunkLength ;
50  uint32_t InverseChunkLength ;
52 
53  typedef struct DCAM_CHECKSUM
54  {
55  uint32_t CRCChecksum ;
56  } DCAM_CHECKSUM;
57 
58  // restore the previous packing
59 # pragma pack(pop)
60  /* ------------------------------------------- */
61 
64  {
65 
66  public:
68  CChunkAdapterDcam(INodeMap* pNodeMap = NULL, int64_t MaxChunkCacheSize = -1);
69 
71  virtual ~CChunkAdapterDcam();
72 
74  virtual bool CheckBufferLayout(uint8_t *pBuffer, int64_t BufferLength);
75 
77  virtual void AttachBuffer(uint8_t *pBuffer, int64_t BufferLength, AttachStatistics_t *pAttachStatistics = NULL);
78 
80  bool HasCRC(uint8_t *pBuffer, int64_t BufferLength);
81 
83  bool CheckCRC(uint8_t *pBuffer, int64_t BufferLength);
84 
85  protected:
87  uint32_t CRC16(const unsigned char *pData, uint32_t nbyLength );
88 
90  bool CheckBuffer(const unsigned char* pData, uint32_t nbyLength );
91 
92  };
93 
94 }
95 
96 #endif // GENAPI_CHUNKADAPTERDCAM_H
__int64 int64_t
Definition: config-win32.h:21
GENICAM_INTERFACE INodeMap
Interface to access the node map.
Definition: INode.h:52
#define GENAPI_DECL
Definition: GenApiDll.h:55
struct GENAPI_NAMESPACE::DCAM_CHECKSUM DCAM_CHECKSUM
void GENAPI_DECL SET_GUID(GUID &name, uint32_t l, uint16_t w1, uint16_t w2, uint8_t b1, uint8_t b2, uint8_t b3, uint8_t b4, uint8_t b5, uint8_t b6, uint8_t b7, uint8_t b8)
Delivers information about the attached chunks and nodes.
Definition: ChunkAdapter.h:45
Connects a chunked DCAM buffer to a node map.
Definition of macros for cross-platform compatibility.
Declaration of the CChunkAdapter class.
struct GENAPI_NAMESPACE::DCAM_CHUNK_TRAILER DCAM_CHUNK_TRAILER
Connects a chunked buffer to a node map.
Definition: ChunkAdapter.h:57
Lexical analyzer for CIntSwissKnife.
Definition: Autovector.h:48
Platform-dependent type definitions.


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