Skip to content

Pylon::CBaslerUniversalCameraEventHandler#

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

The camera event handler base class.

#include <pylon/BaslerUniversalCameraEventHandler.h>

Public Functions#

Name
virtual void OnCameraEvent(CBaslerUniversalInstantCamera & camera, intptr_t userProvidedId, GenApi::INode * pNode)
This method is called when a camera event has been received.
virtual void OnCameraEventHandlerRegistered(CBaslerUniversalInstantCamera & camera, const String_t & nodeName, intptr_t userProvidedId)
This method is called when the camera event handler has been registered.
virtual void OnCameraEventHandlerDeregistered(CBaslerUniversalInstantCamera & camera, const String_t & nodeName, intptr_t userProvidedId)
This method is called when the camera event handler has been deregistered.
virtual void DestroyCameraEventHandler()
Destroys the camera event handler.
CBaslerUniversalCameraEventHandler()
Create.
CBaslerUniversalCameraEventHandler(const CBaslerUniversalCameraEventHandler & )
Copy.
CBaslerUniversalCameraEventHandler & operator=(const CBaslerUniversalCameraEventHandler & )
Assign.
virtual ~CBaslerUniversalCameraEventHandler()
Destruct.

Public Functions Documentation#

function OnCameraEvent#

inline virtual void OnCameraEvent(
    CBaslerUniversalInstantCamera & camera,
    intptr_t userProvidedId,
    GenApi::INode * pNode
)

This method is called when a camera event has been received.

Parameters:

  • camera The source of the call.
  • userProvidedId The ID passed when registering for the event. It can be used to distinguish between different events.
  • pNode The node identified by node name when registering.

Error Safety:

C++ exceptions from this call will be caught and ignored. All event handlers are notified.

Thread Safety:

This method is called outside the lock of the camera object, outside the lock of the node map, and inside the lock of the camera event handler registry.

Only very short processing tasks should be performed by this method. Otherwise, the event notification will block the processing of images.

function OnCameraEventHandlerRegistered#

inline virtual void OnCameraEventHandlerRegistered(
    CBaslerUniversalInstantCamera & camera,
    const String_t & nodeName,
    intptr_t userProvidedId
)

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

Parameters:

  • camera The source of the call.
  • nodeName The name of the event data node updated on camera event, e.g. "ExposureEndEventTimestamp" for exposure end event.
  • userProvidedId This ID is passed as a parameter in CBaslerUniversalCameraEventHandler::OnCameraEvent and can be used to distinguish between different events.

Error Safety:

Exceptions from this call will propagate through.

Thread Safety:

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

function OnCameraEventHandlerDeregistered#

inline virtual void OnCameraEventHandlerDeregistered(
    CBaslerUniversalInstantCamera & camera,
    const String_t & nodeName,
    intptr_t userProvidedId
)

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

Parameters:

  • camera The source of the call.
  • nodeName The name of the event data node updated on camera event, e.g. "ExposureEndEventTimestamp" for exposure end event.
  • userProvidedId This ID is passed as a parameter in CBaslerUniversalCameraEventHandler::OnCameraEvent and can be used to distinguish between different events.

Error Safety:

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

Thread Safety:

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

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

function DestroyCameraEventHandler#

inline virtual void DestroyCameraEventHandler()

Destroys the camera event handler.

Error Safety:

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

function CBaslerUniversalCameraEventHandler#

inline CBaslerUniversalCameraEventHandler()

Create.

function CBaslerUniversalCameraEventHandler#

inline CBaslerUniversalCameraEventHandler(
    const CBaslerUniversalCameraEventHandler & 
)

Copy.

function operator=#

inline CBaslerUniversalCameraEventHandler & operator=(
    const CBaslerUniversalCameraEventHandler & 
)

Assign.

function ~CBaslerUniversalCameraEventHandler#

inline virtual ~CBaslerUniversalCameraEventHandler()

Destruct.