Class PvSystem
Find interfaces (network adapters or USB host controllers) and devices reachable from this PC
Implements
Inherited Members
Namespace: eBUSDotNet
Assembly: eBUSDotNet.dll
Syntax
public class PvSystem : IDisposable
Remarks
PvSystem finds all interfaces (network adapters) and returns PvInterface objects. PvInterface finds all devices on a specific interface and returns PvDeviceInfo objects. PvDeviceInfo provides the information required to connect to a GigE Vision or USB3 Vision device.
To connect to the GigE Vision device, see PvDevice or PvDeviceGEV.
To connect to the USB3 Vision device, see PvDevice or PvDeviceU3V.
Constructors
View SourcePvSystem()
Constructor.
Declaration
public PvSystem()
Fields
View SourceswigCMemOwn
Determines who is responsible for deleting the underlying C++ object.
Declaration
protected bool swigCMemOwn
Field Value
| Type | Description |
|---|---|
| bool |
Properties
View SourceDetectionTimeout
Gets or sets the device detection timeout in milliseconds.
Declaration
public uint DetectionTimeout { get; set; }
Property Value
| Type | Description |
|---|---|
| uint |
DeviceCount
Gets the number of devices detected by the system.
Declaration
public uint DeviceCount { get; }
Property Value
| Type | Description |
|---|---|
| uint |
GEVSupportedVersion
Gets the maximum GigE Vision version supported by the system.
Declaration
public uint GEVSupportedVersion { get; }
Property Value
| Type | Description |
|---|---|
| uint |
InterfaceCount
Gets the number of interfaces detected by the system.
Declaration
public uint InterfaceCount { get; }
Property Value
| Type | Description |
|---|---|
| uint |
SubnetBroadcastEnabled
Gets or sets whether subnet broadcast is enabled during device detection.
Declaration
public bool SubnetBroadcastEnabled { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
U3VSupportedVersion
Gets the maximum USB3 Vision version supported by the system.
Declaration
public uint U3VSupportedVersion { get; }
Property Value
| Type | Description |
|---|---|
| uint |
Methods
View SourceDiscoverSessions()
Scans for active sessions advertised via SAP. This is typically used to discover RTP streams, and is unnecessary to call for GEV and U3V devices.
Declaration
public uint DiscoverSessions()
Returns
| Type | Description |
|---|---|
| uint | The number of active sessions currently advertised with SAP. |
Dispose()
Dispose.
Declaration
public void Dispose()
Dispose(bool)
Dispose
Declaration
protected virtual void Dispose(bool disposing)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | disposing |
~PvSystem()
Destructor.
Declaration
protected ~PvSystem()
Find()
Find all interfaces and GigE Vision, USB3 Vision and Pleora Protocol devices reachable from this system.
Declaration
public PvResult Find()
Returns
| Type | Description |
|---|---|
| PvResult | Includes:
|
Remarks
The Find method searches for all GigE Vision, USB3 Vision and Pleora Protocol devices reachable from this system. PvSystem searches using all interfaces on the system. The method is blocking and won't return for the duration set using DetectionTimeout.
FindDevice(string, out PvDeviceInfo)
Finds devices until a specific device is found.
Declaration
public PvResult FindDevice(string aDeviceToFind, out PvDeviceInfo aDeviceInfo)
Parameters
| Type | Name | Description |
|---|---|---|
| string | aDeviceToFind | String representing the device to find. Can be a MAC, IP or device name. |
| PvDeviceInfo | aDeviceInfo | If the device is found, contains a pointer to a PvDeviceInfo about the device requested in aDeviceToFind. |
Returns
| Type | Description |
|---|---|
| PvResult | Includes:
|
Remarks
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.
GetDeviceInfo(uint)
Returns a pointer to a device of the PvSystem.
Declaration
public PvDeviceInfo GetDeviceInfo(uint aIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| uint | aIndex | Zero-based index of the device info. Valid range is [0 .. GetDeviceCount - 1]. |
Returns
| Type | Description |
|---|---|
| PvDeviceInfo | Pointer to the requested PvDeviceInfo. |
GetInterface(uint)
Get a #PvInterface.
Declaration
public PvInterface GetInterface(uint aIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| uint | aIndex | The interface's index in the array; a number ranging from 0 to #GetInterfaceCount-1. |
Returns
| Type | Description |
|---|---|
| PvInterface | A pointer to a #PvInterface object, or NULL if the index is out of bounds. |
GetSessionInfo(uint, PvSessionInfo)
Returns SDP information about an active session (unused by GEV and U3V).
Declaration
public PvResult GetSessionInfo(uint aIndex, PvSessionInfo aSessionInfo)
Parameters
| Type | Name | Description |
|---|---|---|
| uint | aIndex | Zero-based index of the session to retrieve information about. Valid range is [0 .. DiscoverSessions() - 1]. |
| PvSessionInfo | aSessionInfo | Output parameter to receive the session information. |
Returns
| Type | Description |
|---|---|
| PvResult | Includes:
|
RegisterEventSink(PvSystemEventSink)
Register an event sink (for device finding notification).
Declaration
public PvResult RegisterEventSink(PvSystemEventSink aEventSink)
Parameters
| Type | Name | Description |
|---|---|---|
| PvSystemEventSink | aEventSink | A pointer to the event sink object. |
Returns
| Type | Description |
|---|---|
| PvResult | Includes:
|
UnregisterEventSink(PvSystemEventSink)
Unregister an event sink
Declaration
public PvResult UnregisterEventSink(PvSystemEventSink aEventSink)
Parameters
| Type | Name | Description |
|---|---|---|
| PvSystemEventSink | aEventSink | A pointer to the event sink object. |
Returns
| Type | Description |
|---|---|
| PvResult | Includes:
|
Events
View SourceOnDeviceFound
Raised each time a device is discovered during a find operation.
Declaration
public event OnDeviceFoundHandler OnDeviceFound
Event Type
| Type | Description |
|---|---|
| OnDeviceFoundHandler |