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 <cstring>
34 #include <Base/GCTypes.h>
35 #include <GenApi/ChunkAdapter.h>
36 #include <GenApi/Compatibility.h>
37 
38 namespace GENAPI_NAMESPACE
39 {
40 
41  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);
42 
43 
44  // make sure everything is properly packed
45 # pragma pack(push, 1)
46 
47  typedef struct DCAM_CHUNK_TRAILER
48  {
49  GUID ChunkID;
50  uint32_t ChunkLength;
52  explicit DCAM_CHUNK_TRAILER() : ChunkLength(0), InverseChunkLength(0)
53  {
54  memset(&ChunkID, 0, sizeof(ChunkID));
55  }
57 
58  typedef struct DCAM_CHECKSUM
59  {
60  uint32_t CRCChecksum;
61  } DCAM_CHECKSUM;
62 
63  // restore the previous packing
64 # pragma pack(pop)
65  /* ------------------------------------------- */
66 
69  {
70 
71  public:
73  CChunkAdapterDcam(INodeMap* pNodeMap = NULL, int64_t MaxChunkCacheSize = -1);
74 
76  virtual ~CChunkAdapterDcam();
77 
79  virtual bool CheckBufferLayout(uint8_t *pBuffer, int64_t BufferLength);
80 
82  virtual void AttachBuffer(uint8_t *pBuffer, int64_t BufferLength, AttachStatistics_t *pAttachStatistics = NULL);
83 
85  bool HasCRC(uint8_t *pBuffer, int64_t BufferLength);
86 
88  bool CheckCRC(uint8_t *pBuffer, int64_t BufferLength);
89 
90  protected:
92  uint32_t CRC16(const unsigned char *pData, uint32_t nbyLength );
93 
95  bool CheckBuffer(const unsigned char* pData, uint32_t nbyLength );
96 
97  };
98 
99 }
100 
101 #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.
Connects a chunked buffer to a node map.
Definition: ChunkAdapter.h:57
Lexical analyzer for CIntSwissKnife.
Definition: Destructible.h:30
Platform-dependent type definitions.


rc_genicam_api
Author(s): Heiko Hirschmueller
autogenerated on Sun Jun 18 2023 02:43:55