Skip to content

Pylon::CBaslerUniversalImageEventHandler#

Module: Instant Camera / Universal Instant Camera for All Basler Devices

The image event handler base class.

#include <pylon/BaslerUniversalImageEventHandler.h>

Public Functions#

Name
virtual void OnImagesSkipped(CBaslerUniversalInstantCamera & camera, size_t countOfSkippedImages)
This method is called when images have been skipped using the GrabStrategy_LatestImageOnly strategy or the GrabStrategy_LatestImages strategy.
virtual void OnImageGrabbed(CBaslerUniversalInstantCamera & camera, const CBaslerUniversalGrabResultPtr & grabResult)
This method is called when an image has been grabbed.
virtual void OnImageEventHandlerRegistered(CBaslerUniversalInstantCamera & camera)
This method is called when the image event handler has been registered.
virtual void OnImageEventHandlerDeregistered(CBaslerUniversalInstantCamera & camera)
This method is called when the image event handler has been deregistered.
virtual void DestroyImageEventHandler()
Destroys the image event handler.
CBaslerUniversalImageEventHandler()
Create.
CBaslerUniversalImageEventHandler(const CBaslerUniversalImageEventHandler & )
Copy.
CBaslerUniversalImageEventHandler & operator=(const CBaslerUniversalImageEventHandler & )
Assign.
virtual ~CBaslerUniversalImageEventHandler()
Destruct.

Public Functions Documentation#

function OnImagesSkipped#

inline virtual void OnImagesSkipped(
    CBaslerUniversalInstantCamera & camera,
    size_t countOfSkippedImages
)

This method is called when images have been skipped using the GrabStrategy_LatestImageOnly strategy or the GrabStrategy_LatestImages strategy.

Parameters:

  • camera The source of the call.
  • countOfSkippedImages The number of images skipped. This countOfSkippedImages does not include the number of images lost in the case of a buffer under run in the driver.

Error Safety:

Exceptions from this call will propagate through. The notification of event handlers stops when an exception is triggered.

Thread Safety:

This method is called outside the lock of the camera object but inside the lock of the image event handler registry.

function OnImageGrabbed#

inline virtual void OnImageGrabbed(
    CBaslerUniversalInstantCamera & camera,
    const CBaslerUniversalGrabResultPtr & grabResult
)

This method is called when an image has been grabbed.

Parameters:

  • camera The source of the call.
  • grabResult The grab result data.

Error Safety:

Exceptions from this call will propagate through. The notification of event handlers stops when an exception is triggered.

Thread Safety:

This method is called outside the lock of the camera object but inside the lock of the image event handler registry.

The grab result smart pointer passed does always reference a grab result data object. The status of the grab needs to be checked before accessing the grab result data. See CGrabResultData::GrabSucceeded(), CGrabResultData::GetErrorCode() and CGrabResultData::GetErrorDescription() for more information.

function OnImageEventHandlerRegistered#

inline virtual void OnImageEventHandlerRegistered(
    CBaslerUniversalInstantCamera & camera
)

This method is called when the image event handler has been registered.

Parameters:

  • camera The source of the call.

Error Safety:

Exceptions from this call will propagate through.

Thread Safety:

This method is called inside the lock of the image event handler registry.

function OnImageEventHandlerDeregistered#

inline virtual void OnImageEventHandlerDeregistered(
    CBaslerUniversalInstantCamera & camera
)

This method is called when the image event handler has been deregistered.

Parameters:

  • camera The source of the call.

Error Safety:

C++ exceptions from this call will be caught and ignored.

Thread Safety:

This method is called inside the lock of the image event handler registry.

The image event handler is automatically deregistered when the Instant Camera object is destroyed.

function DestroyImageEventHandler#

inline virtual void DestroyImageEventHandler()

Destroys the image event handler.

Error Safety:

C++ exceptions from this call will be caught and ignored.

function CBaslerUniversalImageEventHandler#

inline CBaslerUniversalImageEventHandler()

Create.

function CBaslerUniversalImageEventHandler#

inline CBaslerUniversalImageEventHandler(
    const CBaslerUniversalImageEventHandler &
)

Copy.

function operator=#

inline CBaslerUniversalImageEventHandler & operator=(
    const CBaslerUniversalImageEventHandler &
)

Assign.

function ~CBaslerUniversalImageEventHandler#

inline virtual ~CBaslerUniversalImageEventHandler()

Destruct.