Skip to content

pylon/ChunkParser.h#

Low Level API: Definition of the IChunkParser interface.

Namespaces#

Name
GenApi
Contains definitions of the types of GenICam GenApi modules.
Pylon
Contains definitions of pylon types.

Classes#

Name
interface Pylon::IChunkParser
Low Level API: The interface for chunk parsers analyzing a data stream consisting of chunks.
interface Pylon::ISelfReliantChunkParser
Low Level API: Interface for chunk parsers with an own chunk data node map attached.
class Pylon::CChunkParser
Low Level API: Base class for chunk parsers returned by camera objects.

Defines#

Name
CHUNKPARSER_H__

Macros Documentation#

define CHUNKPARSER_H__#

#define CHUNKPARSER_H__ 

Source code#

//-----------------------------------------------------------------------------
//  Basler pylon SDK
//  Copyright (c) 2006-2022 Basler AG
//  http://www.baslerweb.com
//  Author:  Lutz Koschorreck
//-----------------------------------------------------------------------------
#pragma once

#ifndef CHUNKPARSER_H__
#define CHUNKPARSER_H__

#include <pylon/Platform.h>

#ifdef _MSC_VER
#   pragma pack(push, PYLON_PACKING)
#endif /* _MSC_VER */

#include <GenICamFwd.h>
#include <pylon/stdinclude.h>
#include <pylon/PylonBase.h>

// additional forwards
namespace GENAPI_NAMESPACE
{
    class CChunkAdapter;
    struct AttachStatistics_t;
}

namespace Pylon
{
    interface PUBLIC_INTERFACE IChunkParser
    {
    public:

        virtual void AttachBuffer( const void* pBuffer, int64_t BufferLength, GenApi::AttachStatistics_t* pAttachStatistics = NULL ) = 0;


        virtual void DetachBuffer() = 0;


        virtual void UpdateBuffer( const void* pBaseAddress ) = 0;

        virtual bool HasCRC() const = 0;


        virtual bool CheckCRC() const = 0;
    };

    interface ISelfReliantChunkParser : public IChunkParser
    {

        virtual GenApi::INodeMap* GetChunkDataNodeMap() = 0;


        virtual void Destroy() = 0;
    };


    class PYLONBASE_API CChunkParser : public ISelfReliantChunkParser
    {
    public:
        // \name IChunkParser implementation
        // \{
        void AttachBuffer( const void* pBuffer, int64_t BufferLength, GenApi::AttachStatistics_t* pAttachStatistics = NULL );
        void DetachBuffer();
        void UpdateBuffer( const void* pBaseAddress );
        GenApi::INodeMap* GetChunkDataNodeMap();
        void Destroy();
        // \}

    protected:
        explicit CChunkParser( GenApi::CChunkAdapter* pParser );
        virtual ~CChunkParser();

    protected:
        GenApi::CChunkAdapter* m_pParser;

        class PYLONBASE_API CBuffer
        {
        public:
            CBuffer( const void* pBuffer, int64_t BufferSize_by );
            ~CBuffer();
            operator bool() const;
            int64_t GetSize() const;
            const void* operator&() const;

        private:
            const void* m_pBuffer;
            int64_t m_BufferLength_by;

        } m_AttachedBuffer;

        bool m_IsBufferAttached;
    };

}

#ifdef _MSC_VER
#   pragma pack(pop)
#endif /* _MSC_VER */

#endif // __CHUNKPARSER_H__

Updated on 5 July 2022 at 15:30:01