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 PvInterface * | GetInterface (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 PvDeviceInfo * | GetDeviceInfo (uint32_t aIndex) const |
Returns a pointer to a device of the PvSystem. More... | |
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.
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.
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.
[in] | aDeviceToFind | String representing the device to find. Can be a MAC, IP or device name. |
[out] | aDeviceInfo | If the device is found, contains a pointer to a PvDeviceInfo about the device requested in aDeviceToFind. |
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.
uint32_t PvSystem::GetDeviceCount | ( | ) | const |
Returns number of device that can be enumerated from PvSystem using 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.
[in] | aIndex | Zero-based index of the device info. Valid range is [0 .. GetDeviceCount - 1]. |
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.
const PvInterface * PvSystem::GetInterface | ( | uint32_t | aIndex | ) | const |
Get a PvInterface.
Interfaces are ordered in the PvSystem array as provided by the OS.
[in] | aIndex | The interface's index in the array; a number ranging from 0 to GetInterfaceCount-1. |
uint32_t PvSystem::GetInterfaceCount | ( | ) | const |
Get the number of interfaces detected on the system.
bool PvSystem::GetSubnetBroadcastEnabled | ( | ) | const |
Gets whether subnet broadcasts are used (or not) when detecting GigE Vision devices.
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.
PvResult PvSystem::RegisterEventSink | ( | PvSystemEventSink * | aEventSink | ) |
Register an event sink (for device finding notification).
To use this method, see PvSystemEventSink.
[in] | aEventSink | A pointer to the event sink object. |
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.
[in] | aTimeout | Time 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. |
void PvSystem::SetSubnetBroadcastEnabled | ( | bool | aValue | ) |
Sets whether subnet broadcasts are used (or not) when detecting GigE Vision devices.
[in] | aValue | True if subnet broadcasts are to be used when detecting GigE Vision devices. |
PvResult PvSystem::UnregisterEventSink | ( | PvSystemEventSink * | aEventSink | ) |
Unregister an event sink.
To use this method, see PvSystemEventSink.
[in] | aEventSink | A pointer to the event sink object. |
Copyright (c) 2002-2021 Pleora Technologies Inc.
www.pleora.com