Pleora Technologies Inc. eBUS SDK v6.2.8.5877 API



PvSystem Class Reference

Find interfaces (network adapters or USB host controllers) and devices reachable from this PC. More...

Public Member Functions

 PvSystem ()
 Constructor.
 
virtual ~PvSystem ()
 Destructor.
 
PvResult Find ()
 Find all interfaces and GigE Vision, USB3 Vision and Pleora Protocol devices reachable from this system. More...
 
PvResult FindDevice (const PvString &aDeviceToFind, const PvDeviceInfo **aDeviceInfo)
 Finds devices until a specific device is found. More...
 
void SetDetectionTimeout (uint32_t aTimeout)
 Sets the time to search the system devices. More...
 
uint32_t GetDetectionTimeout () const
 Get the maximum time to search for GigE Vision devices. More...
 
void SetSubnetBroadcastEnabled (bool aValue)
 Sets whether subnet broadcasts are used (or not) when detecting GigE Vision devices. More...
 
bool GetSubnetBroadcastEnabled () const
 Gets whether subnet broadcasts are used (or not) when detecting GigE Vision devices. More...
 
uint32_t GetGEVSupportedVersion () const
 Get the version of GigE Vision spec supported by the SDK. More...
 
uint32_t GetU3VSupportedVersion () const
 Get the version of USB3 Vision spec supported by the SDK. More...
 
PvResult RegisterEventSink (PvSystemEventSink *aEventSink)
 Register an event sink (for device finding notification). More...
 
PvResult UnregisterEventSink (PvSystemEventSink *aEventSink)
 Unregister an event sink. More...
 
uint32_t GetInterfaceCount () const
 Get the number of interfaces detected on the system. More...
 
const PvInterfaceGetInterface (uint32_t aIndex) const
 Get a PvInterface. More...
 
uint32_t GetDeviceCount () const
 Returns number of device that can be enumerated from PvSystem using GetDeviceInfo. More...
 
const PvDeviceInfoGetDeviceInfo (uint32_t aIndex) const
 Returns a pointer to a device of the PvSystem. More...
 

Detailed Description

Find interfaces (network adapters or USB host controllers) and devices reachable from this PC.

PvSystem finds all interfaces and returns PvInterface objects. PvInterface finds all devices on a specific interface and returns PvDeviceInfo based objects. PvDeviceInfo provides the information required to connect to a GigE Vision or USB3 Vision device.

Member Function Documentation

◆ Find()

PvResult PvSystem::Find ( )

Find all interfaces and GigE Vision, USB3 Vision and Pleora Protocol devices reachable from this system.

This method is blocking and won't return for the duration set using SetDetectionTimeout.

Returns
Includes:

◆ FindDevice()

PvResult PvSystem::FindDevice ( const PvString aDeviceToFind,
const PvDeviceInfo **  aDeviceInfo 
)

Finds devices until a specific device is found.

Performs a standard find operation and keeps listening for answers until a specific device is found.

More than one device can be found and added to the interfaces during this find operation. Do not assume only the device of interest is present in the system/interface data after this method returns.

If the device of interest is found, a pointer to the device info in the interface where the device was found is returned using the aDeviceInfo parameter.

Parameters
[in]aDeviceToFindString representing the device to find. Can be a MAC, IP or device name.
[out]aDeviceInfoIf the device is found, contains a pointer to a PvDeviceInfo about the device requested in aDeviceToFind.
Returns
Includes:

◆ GetDetectionTimeout()

uint32_t PvSystem::GetDetectionTimeout ( ) const

Get the maximum time to search for GigE Vision devices.

Search here is defined as the time to wait devices to answer after sending a discovery through each interface.

Only applies to Ethernet devices as USB devices enumeration does not include the notion of wait or timeout.

See SetDetectionTimeout.

Returns
See SetDetectionTimeout.

◆ GetDeviceCount()

uint32_t PvSystem::GetDeviceCount ( ) const

Returns number of device that can be enumerated from PvSystem using GetDeviceInfo.

Returns
Device count.

◆ GetDeviceInfo()

const PvDeviceInfo * PvSystem::GetDeviceInfo ( uint32_t  aIndex) const

Returns a pointer to a device of the PvSystem.

The GetDeviceCount and GetDeviceInfo methods of PvSystem are a shortcut for users only interested in retrieving devices without having to handle the interface to device topology.

Parameters
[in]aIndexZero-based index of the device info. Valid range is [0 .. GetDeviceCount - 1].
Returns
Pointer to the requested PvDeviceInfo.

◆ GetGEVSupportedVersion()

uint32_t PvSystem::GetGEVSupportedVersion ( ) const

Get the version of GigE Vision spec supported by the SDK.

The high 16 bits contain the major version and The low 16 bits the minor version.

Returns
GigE Vision spec version supported by the SDK.

◆ GetInterface()

const PvInterface * PvSystem::GetInterface ( uint32_t  aIndex) const

Get a PvInterface.

Interfaces are ordered in the PvSystem array as provided by the OS.

Parameters
[in]aIndexThe interface's index in the array; a number ranging from 0 to GetInterfaceCount-1.
Returns
A pointer to a PvInterface object, or NULL if the index is out of bounds.

◆ GetInterfaceCount()

uint32_t PvSystem::GetInterfaceCount ( ) const

Get the number of interfaces detected on the system.

Returns
The number of interfaces detected on the system; the range for the PvSystem::GetInterface method.

◆ GetSubnetBroadcastEnabled()

bool PvSystem::GetSubnetBroadcastEnabled ( ) const

Gets whether subnet broadcasts are used (or not) when detecting GigE Vision devices.

Returns
True if subnet broadcasts are to be used when detecting GigE Vision devices.

◆ GetU3VSupportedVersion()

uint32_t PvSystem::GetU3VSupportedVersion ( ) const

Get the version of USB3 Vision spec supported by the SDK.

The high 16 bits contain the major version and The low 16 bits the minor version.

Returns
USB3 Vision spec version supported by the SDK.

◆ RegisterEventSink()

PvResult PvSystem::RegisterEventSink ( PvSystemEventSink aEventSink)

Register an event sink (for device finding notification).

To use this method, see PvSystemEventSink.

Parameters
[in]aEventSinkA pointer to the event sink object.
Returns
Includes:

◆ SetDetectionTimeout()

void PvSystem::SetDetectionTimeout ( uint32_t  aTimeout)

Sets the time to search the system devices.

Time the PvSystem::Find methods wait for responses from GigE Vision or Pleora Protocol devices before returning.

GigE Vision devices may wait up to 1 second before answering a discovery request and this detection timeout allows enough time for all discovery answers to come back in.

USB3 Vision devices detection is instant. You can set this timeout to its minimum supported value if you are only interested in detecting USB3 Vision devices.

Pleora Protocol and some GigE Vision devices answer as soon as the discovery request is received. Experimenting with this timeout and discovery stability is a way improving discovery performance. Another would be to stick with the safe, default delay and use the event sink callback to be notified as soon as a device is discovered.

Parameters
[in]aTimeoutTime to search for devices in ms. The default value of 1500 is generally a good value in most situations. Values beyond 100 to 60000 are set to 100 and 60000, respectively.

◆ SetSubnetBroadcastEnabled()

void PvSystem::SetSubnetBroadcastEnabled ( bool  aValue)

Sets whether subnet broadcasts are used (or not) when detecting GigE Vision devices.

Parameters
[in]aValueTrue if subnet broadcasts are to be used when detecting GigE Vision devices.

◆ UnregisterEventSink()

PvResult PvSystem::UnregisterEventSink ( PvSystemEventSink aEventSink)

Unregister an event sink.

To use this method, see PvSystemEventSink.

Parameters
[in]aEventSinkA pointer to the event sink object.
Returns
Includes:

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

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