Pleora Technologies Inc. eBUS SDK v6.2.8.5877 API



PvSystemEventSink Class Reference

Observer interface for an observable PvSystem object. More...

Public Member Functions

 PvSystemEventSink ()
 Constructor.
 
virtual ~PvSystemEventSink ()
 Destructor.
 
virtual void OnDeviceFound (const PvInterface *aInterface, const PvDeviceInfo *aDeviceInfo, bool &aIgnore)
 Filter found devices. More...
 

Detailed Description

Observer interface for an observable PvSystem object.

PvSystemEventSink contains a callback that lets you define what happens when a PvSystem object finds a GigE Vision, USB3 Vision or Pleora Protocol device. The actual behavior is for you to define, but you could use this class to:

  • automatically filter devices that you determine are inappropriate.
  • automatically connect to the first device (reducing the time for the overall find-select-connect process).
  • begin displaying available devices before the search timeout expires.

To comply with the auto-find controller (PvSystemEventSink object) protocol:

  1. Create a class (MyFinder) that inherits from PvSystemEventSink (you can also extend an existing class).
  2. Declare the OnDeviceFound method.
  3. Define the code for the OnDeviceFound method.

To use the auto-find controller (PvSystemEventSink object):

  1. Create an instance of your MySink class. Use MySink::MySink.
  2. Find devices as you normally would (see PvSystem), but before using PvSystem::Find, register your MySink class. Use PvSystem::RegisterEventSink.
  3. Once you're done finding devices, unregister the event sink. Use PvSystem::UnregisterEventSink.

Member Function Documentation

◆ OnDeviceFound()

void PvSystemEventSink::OnDeviceFound ( const PvInterface aInterface,
const PvDeviceInfo aDeviceInfo,
bool &  aIgnore 
)
virtual

Filter found devices.

This method lets you control how devices are treated, once found.

The aIgnore parameter lets you control (using your own code) whether devices appear in the list of found devices. However, the method provides enough information that you can use it for other purposes. For example, you might use the method to automatically select or automatically connect to a device the moment it is found (reducing the time for the overall find-select-connect process).

Parameters
[in]aInterfaceA pointer to the interface on which the device was found.
[in]aDeviceInfoA pointer to the connectivity information for the found device.
[out]aIgnoreTrue to treat the device as if it wasn't found; otherwise, false.

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

Copyright (c) 2002-2021 Pleora Technologies Inc.
www.pleora.com