Pleora Technologies Inc. eBUS SDK v6.2.8.5877 API



PvInterface Class Reference

Represents one interface (network adapter or USB host controller) on a system (the PC) More...

Public Member Functions

virtual ~PvInterface ()
 Destructor.
 
PvInterfaceType GetType () const
 Get the interface type. More...
 
PvString GetName () const
 Get the description of the NIC, as reported by the OS. More...
 
PvString GetDisplayID () const
 Get a string that can be used in a user interface to identify the interface. More...
 
PvString GetUniqueID () const
 Get a string uniquely identifying the interface. More...
 
PvString GetCompareID () const
 Get a string that can be used to sort interfaces. More...
 
uint32_t GetDeviceCount () const
 Get the number of found devices on this PvInterface. More...
 
const PvDeviceInfoGetDeviceInfo (uint32_t aIndex) const
 Get information identifying a device. More...
 

Static Public Member Functions

static bool Compare (const PvInterface *a1, const PvInterface *a2)
 Static method used for sorting interfaces. More...
 

Detailed Description

Represents one interface (network adapter or USB host controller) on a system (the PC)

To use this class, see PvSystem.

Member Function Documentation

◆ Compare()

bool PvInterface::Compare ( const PvInterface a1,
const PvInterface a2 
)
static

Static method used for sorting interfaces.

Parameters
[in]a1A first interface.
[in]a2A second interface.
Returns
  • 0 if the provided interfaces have the same ID.
  • <0 if the value of the first character that doesn't match is lower in a1's ID or all compared characters match but the compared ID is shorter.
  • >0 if the value of the first character that doesn't match is greater in a1's ID or all compared characters match but the compared ID is longer.

◆ GetCompareID()

PvString PvInterface::GetCompareID ( ) const

Get a string that can be used to sort interfaces.

The content of the compare ID is not garanteed to be represent anything or to be constant between revisions of the eBUS SDK.

It should only be used to opaquely, uniquely compare other interface sorting IDs to allow consistent sorting and ordering of interfaces, typically in a user interface context.

Returns
String that can be used to sort interfaces.

◆ GetDeviceCount()

uint32_t PvInterface::GetDeviceCount ( ) const

Get the number of found devices on this PvInterface.

Returns
The number of devices found through this PvInterface.

◆ GetDeviceInfo()

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

Get information identifying a device.

Returns information identifying a device discovered on this interface (network adapter or USB host controller). This information can be used to connect and control it with a PvDevice object.

To connect, use PvDevice::CreateAndConnect (supports both GigE Vision and USB3 Vision devices), PvDeviceGEV::Connect or PvDeviceU3V::Connect.

Parameters
[in]aIndexThe device's array position. The zero-based parameter accepts 0 through GetDeviceCount-1.
Returns
Information identifying a device; a PvDeviceInfo object. If aIndex is out of bounds, the return is NULL.

◆ GetDisplayID()

PvString PvInterface::GetDisplayID ( ) const

Get a string that can be used in a user interface to identify the interface.

Returns
The interface's display ID.

◆ GetName()

PvString PvInterface::GetName ( ) const

Get the description of the NIC, as reported by the OS.

Returns
The description of the NIC, as reported by the OS. The value is intended only for human reading.

◆ GetType()

PvInterfaceType PvInterface::GetType ( ) const

Get the interface type.

Returns
Type of interface (network interface or USB host controller)

◆ GetUniqueID()

PvString PvInterface::GetUniqueID ( ) const

Get a string uniquely identifying the interface.

The content of the unique ID is not garanteed to be represent anything or to be constant between revisions of the eBUS SDK. It should only be used to opaquely, uniquely match other interface unique IDs from within the same application life cycle.

Do not assume the unique ID will be using a MAC address for network adapters or anything specifc for USB host controllers.

If you need the MAC address of a network adapter, use PvNetworkAdapter::GetMACAddress.

If you need specific information about a USB host controller, use the PvUSBHostController class.

Returns
The interface's unique ID.

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

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