VisionBox Interface Library  1.7.5.0 (2021-12-10)
VIB::PowerOverEthernet Class Reference
+ Inheritance diagram for VIB::PowerOverEthernet:

Detailed Description

This class represents the PowerOverEthernet (PoE) module, which allows gathering information about the current state of attached PoE devices.

Public Types

enum  POE_ERROR
 Error flags of the PoE port, used by GetPortState() More...
 
enum  POE_STATE
 State of the PoE port, used by GetPortState() More...
 

Public Member Functions

bool GetNumberOfPorts (unsigned int &NumberOfPorts)
 Return the number of ports More...
 
bool GetPortState (const unsigned int PortIndex, VIB::PowerOverEthernet::POE_STATE &State, unsigned int &Error, unsigned int &PoEClass)
 Returns the current state of the given port More...
 
 PowerOverEthernet ()
 Default constructor for the device object More...
 
- Public Member Functions inherited from VIB::iDevice
bool Close ()
 Closes a device More...
 
 iDevice (const iDevice &device)
 The copy constructor makes a copy of the existing device object More...
 
bool isOpen (bool &state)
 Returns the open state of a device object More...
 
bool Open (unsigned int Index=0)
 Opens a device More...
 
iDeviceoperator= (const iDevice &device)
 The assignment operator makes a copy of the existing device object More...
 
virtual ~iDevice ()
 Deletes the device object More...
 

Member Enumeration Documentation

◆ POE_ERROR

Error flags of the PoE port, used by GetPortState()

Enumerator
POE_ERROR_NO 

No Error.

POE_ERROR_PORT_NCSI 

Communication problem with Ethernet controller (not PoE related)

POE_ERROR_POE_CLASS 

Invalid PoE Class.

POE_ERROR_POE_VOLTAGE_FAULT 

PoE voltage fault.

POE_ERROR_POE_CURRENT_FAULT 

PoE over-current condition.

POE_ERROR_POE_THERMAL_FAULT 

PoE over-temperature condition.

◆ POE_STATE

State of the PoE port, used by GetPortState()

Enumerator
POE_STATE_OFF 

The PoE port is not powered.

POE_STATE_SEARCHING 

Waiting for connected PoE device.

POE_STATE_POWERED 

The connected PoE device is powered.

POE_STATE_OFF_MAXPWR 

The total maximum power budget has been exceeded.

Constructor & Destructor Documentation

◆ PowerOverEthernet()

VIB::PowerOverEthernet::PowerOverEthernet ( )

Default constructor for the device object

The device must be opened with Open() before it can be used.

Member Function Documentation

◆ GetNumberOfPorts()

bool VIB::PowerOverEthernet::GetNumberOfPorts ( unsigned int &  NumberOfPorts)

Return the number of ports

Parameters
NumberOfPortscontains the number of PoE ports
Returns
true for success, use VIBSystem::GetLastErrorString() for an error description

◆ GetPortState()

bool VIB::PowerOverEthernet::GetPortState ( const unsigned int  PortIndex,
VIB::PowerOverEthernet::POE_STATE State,
unsigned int &  Error,
unsigned int &  PoEClass 
)

Returns the current state of the given port

Parameters
PortIndexPort index 0 ... (GetNumberOfPorts() - 1)
StateCurrent PoE state
ErrorPending error flags, multiple bits can be active, see POE_ERROR
PoEClassPoE power class used by the device, valid if State is POE_STATE_POWERED
Returns
true for success, use VIBSystem::GetLastErrorString() for an error description