Image Component Library (ICL)
Public Member Functions | Private Attributes | List of all members
icl::io::pylon::ConcGrabberBuffer Class Reference

This is used for concurrent writing and reading of ConvBuffers. More...

#include <PylonUtils.h>

Public Member Functions

ICLIO_API ConcGrabberBuffer ()
 Constructor creates and initializes resources. More...
 
ICLIO_API ~ConcGrabberBuffer ()
 Destructor frees allocated memory. More...
 
ICLIO_API ConvBuffersgetNextReadBuffer ()
 returns a pointer to the most recent actualized ConvBuffers. More...
 
ICLIO_API ConvBuffersgetNextWriteBuffer ()
 returns a pointer to the next write ConvBuffers. More...
 
ICLIO_API void setReset ()
 mark ConvBuffers to be reset on next write-access. More...
 
ICLIO_API bool newAvailable ()
 tells whether a new ConvBuffers is available More...
 

Private Attributes

ConvBuffersm_Buffers [3]
 current objects which alternately are read and written. More...
 
utils::Mutex m_Mutex
 the Mutex is used for concurrent reading and writing. More...
 
int m_Write
 The object currently written to. More...
 
int m_Next
 The write object currently not written to. More...
 
int m_Read
 The object currently read from. More...
 
bool m_Avail
 tells whether an actualized object was written. More...
 

Detailed Description

This is used for concurrent writing and reading of ConvBuffers.

This class holds three pointers to ConvBuffers of which one is the currently read and the other two are alternately written to.

Constructor & Destructor Documentation

◆ ConcGrabberBuffer()

ICLIO_API icl::io::pylon::ConcGrabberBuffer::ConcGrabberBuffer ( )

Constructor creates and initializes resources.

◆ ~ConcGrabberBuffer()

ICLIO_API icl::io::pylon::ConcGrabberBuffer::~ConcGrabberBuffer ( )

Destructor frees allocated memory.

Member Function Documentation

◆ getNextReadBuffer()

ICLIO_API ConvBuffers* icl::io::pylon::ConcGrabberBuffer::getNextReadBuffer ( )

returns a pointer to the most recent actualized ConvBuffers.

ConvBuffers will then be marked and not overwritten till the next call to getNextImage()

◆ getNextWriteBuffer()

ICLIO_API ConvBuffers* icl::io::pylon::ConcGrabberBuffer::getNextWriteBuffer ( )

returns a pointer to the next write ConvBuffers.

sets the returned ConvBuffers as current writeable and marks the old writeable as new.

◆ newAvailable()

ICLIO_API bool icl::io::pylon::ConcGrabberBuffer::newAvailable ( )

tells whether a new ConvBuffers is available

◆ setReset()

ICLIO_API void icl::io::pylon::ConcGrabberBuffer::setReset ( )

mark ConvBuffers to be reset on next write-access.

Member Data Documentation

◆ m_Avail

bool icl::io::pylon::ConcGrabberBuffer::m_Avail
private

tells whether an actualized object was written.

◆ m_Buffers

ConvBuffers* icl::io::pylon::ConcGrabberBuffer::m_Buffers[3]
private

current objects which alternately are read and written.

◆ m_Mutex

utils::Mutex icl::io::pylon::ConcGrabberBuffer::m_Mutex
private

the Mutex is used for concurrent reading and writing.

◆ m_Next

int icl::io::pylon::ConcGrabberBuffer::m_Next
private

The write object currently not written to.

◆ m_Read

int icl::io::pylon::ConcGrabberBuffer::m_Read
private

The object currently read from.

◆ m_Write

int icl::io::pylon::ConcGrabberBuffer::m_Write
private

The object currently written to.


The documentation for this class was generated from the following file: