Skip to content

Pylon::CChunkParser#

Module: Low Level API

Low Level API: Base class for chunk parsers returned by camera objects. More…

#include <pylon/ChunkParser.h>

Inherits from Pylon::ISelfReliantChunkParser, Pylon::IChunkParser

Protected Classes#

Name
class CBuffer

Public Functions#

Name
virtual void AttachBuffer(const void * pBuffer, int64_t BufferLength, GenApi::AttachStatistics_t * pAttachStatistics =NULL)
Pass in a buffer and let the chunk parser analyze it.
virtual void DetachBuffer()
Detaches a buffer from the chunk parser. The buffer will no longer accessed by the chunk parser.
virtual void UpdateBuffer(const void * pBaseAddress)
Pass in a buffer and let the chunk parser update the camera object's parameters.
virtual GenApi::INodeMap * GetChunkDataNodeMap()
Provides access to the chunk data node map that the parser updates.
virtual void Destroy()
Makes the object to destroy itself.
virtual bool HasCRC() const
Checks if buffer has a CRC attached.
virtual bool CheckCRC() const
Checks CRC sum of buffer.

Protected Functions#

Name
CChunkParser(GenApi::CChunkAdapter * pParser)
default constructor - make it protected to prevent this class from instantiation
virtual ~CChunkParser()
destructor

Protected Attributes#

Name
GenApi::CChunkAdapter * m_pParser
Pointer to the GenApi workhorse.
class Pylon::CChunkParser::CBuffer m_AttachedBuffer
bool m_IsBufferAttached

Detailed Description#

class Pylon::CChunkParser;

Low Level API: Base class for chunk parsers returned by camera objects.

Part implementation of chunk parser of common functionality.

Public Functions Documentation#

AttachBuffer#

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

Pass in a buffer and let the chunk parser analyze it.

Parameters:

  • pBuffer Pointer to the new buffer
  • BufferLength Size of the new buffer in bytes
  • pAttachStatistics (optional) Pointer to a record taking statistic data of the analyzed buffer

Reimplements: Pylon::IChunkParser::AttachBuffer

Corresponding parameters of the camera object reflecting the chunked data will be updated.

DetachBuffer#

virtual void DetachBuffer()

Detaches a buffer from the chunk parser. The buffer will no longer accessed by the chunk parser.

Reimplements: Pylon::IChunkParser::DetachBuffer

An attached buffer must be detached before freeing it. When attaching a new buffer, the previous one gets detached automatically.

UpdateBuffer#

virtual void UpdateBuffer(
    const void * pBaseAddress
)

Pass in a buffer and let the chunk parser update the camera object's parameters.

Parameters:

  • pBaseAddress Pointer to the new buffer

Reimplements: Pylon::IChunkParser::UpdateBuffer

This method can be used when the layout of the chunk data hasn't changed since a previous buffer has been attached to the chunk parser. In this case UpdateBuffer is slightly faster than AttachBuffer, because the buffer's layout is reused. If you call UpdateBuffer without having called AttachBuffer first, a LogicalErrorException is raised.

GetChunkDataNodeMap#

virtual GenApi::INodeMap * GetChunkDataNodeMap()

Provides access to the chunk data node map that the parser updates.

Return: The chunk data node map of the parser

Reimplements: Pylon::ISelfReliantChunkParser::GetChunkDataNodeMap

Destroy#

virtual void Destroy()

Makes the object to destroy itself.

Reimplements: Pylon::ISelfReliantChunkParser::Destroy

This is an alternative to destroying it via the IPylonDevice interface. It is used when the device has been destroyed already.

HasCRC#

virtual bool HasCRC() const 

Checks if buffer has a CRC attached.

Return: true if the buffer contains CRC value.

CheckCRC#

virtual bool CheckCRC() const 

Checks CRC sum of buffer.

Return: true if the contained CRC equals the computed value.

Protected Functions Documentation#

CChunkParser#

explicit CChunkParser(
    GenApi::CChunkAdapter * pParser
)

default constructor - make it protected to prevent this class from instantiation

~CChunkParser#

virtual ~CChunkParser()

destructor

Protected Attributes Documentation#

m_pParser#

GenApi::CChunkAdapter * m_pParser;

Pointer to the GenApi workhorse.

m_AttachedBuffer#

class Pylon::CChunkParser::CBuffer m_AttachedBuffer;

m_IsBufferAttached#

bool m_IsBufferAttached;

Updated on 5 July 2022 at 15:30:01