ChunkAdapterDcam.h
Go to the documentation of this file.
00001 //-----------------------------------------------------------------------------
00002 //  (c) 2004 by Basler Vision Technologies
00003 //  Section:  Vision Components
00004 //  Project:  GenApi
00005 //    Author:  Fritz Dierks
00006 //  $Header$
00007 //
00008 //  License: This file is published under the license of the EMVA GenICam  Standard Group.
00009 //  A text file describing the legal terms is included in  your installation as 'GenICam_license.pdf'.
00010 //  If for some reason you are missing  this file please contact the EMVA or visit the website
00011 //  (http://www.genicam.org) for a full copy.
00012 //
00013 //  THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS"
00014 //  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
00015 //  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
00016 //  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD  GROUP
00017 //  OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,  SPECIAL,
00018 //  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT  LIMITED TO,
00019 //  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,  DATA, OR PROFITS;
00020 //  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY  THEORY OF LIABILITY,
00021 //  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT  (INCLUDING NEGLIGENCE OR OTHERWISE)
00022 //  ARISING IN ANY WAY OUT OF THE USE  OF THIS SOFTWARE, EVEN IF ADVISED OF THE
00023 //  POSSIBILITY OF SUCH DAMAGE.
00024 //-----------------------------------------------------------------------------
00030 #ifndef GENAPI_CHUNKADAPTERDCAM_H
00031 #define GENAPI_CHUNKADAPTERDCAM_H
00032 
00033 #include <Base/GCTypes.h>
00034 #include <GenApi/ChunkAdapter.h>
00035 #include <GenApi/Compatibility.h>
00036 
00037 namespace GENAPI_NAMESPACE
00038 {
00039 
00040     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);
00041 
00042 
00043     // make sure everything is properly packed
00044 #   pragma pack(push, 1)
00045 
00046     typedef struct DCAM_CHUNK_TRAILER
00047     {
00048          GUID     ChunkID ;
00049          uint32_t ChunkLength ;
00050          uint32_t InverseChunkLength ;
00051     } DCAM_CHUNK_TRAILER;
00052 
00053     typedef struct DCAM_CHECKSUM
00054     {
00055         uint32_t CRCChecksum ;
00056     } DCAM_CHECKSUM;
00057 
00058     // restore the previous packing
00059 #   pragma pack(pop)
00060     /* ------------------------------------------- */
00061 
00063     class GENAPI_DECL CChunkAdapterDcam : public  CChunkAdapter
00064     {
00065 
00066     public:
00068         CChunkAdapterDcam(INodeMap* pNodeMap = NULL, int64_t MaxChunkCacheSize = -1);
00069 
00071         virtual ~CChunkAdapterDcam();
00072 
00074         virtual bool CheckBufferLayout(uint8_t *pBuffer, int64_t BufferLength);
00075 
00077         virtual void AttachBuffer(uint8_t *pBuffer, int64_t BufferLength, AttachStatistics_t *pAttachStatistics = NULL);
00078 
00080         bool HasCRC(uint8_t *pBuffer, int64_t BufferLength);
00081 
00083         bool CheckCRC(uint8_t *pBuffer, int64_t BufferLength);
00084 
00085     protected:
00087         uint32_t CRC16(const unsigned char *pData, uint32_t nbyLength );
00088 
00090         bool CheckBuffer(const unsigned char* pData, uint32_t nbyLength );
00091 
00092     };
00093 
00094 }
00095 
00096 #endif // GENAPI_CHUNKADAPTERDCAM_H


rc_genicam_api
Author(s): Heiko Hirschmueller
autogenerated on Thu Jun 6 2019 18:42:46