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. | |
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. | |
PowerOverEthernet () | |
Default constructor for the device object. | |
Public Member Functions inherited from VIB::iDevice | |
bool | Close () |
Closes a device. | |
iDevice (const iDevice &device) | |
The copy constructor makes a copy of the existing device object. | |
bool | isOpen (bool &state) |
Returns the open state of a device object. | |
bool | Open (unsigned int Index=0) |
Opens a device. | |
iDevice & | operator= (const iDevice &device) |
The assignment operator makes a copy of the existing device object. | |
virtual | ~iDevice () |
Deletes the device object. |
Error flags of the PoE port, used by GetPortState()
VIB::PowerOverEthernet::PowerOverEthernet | ( | ) |
Default constructor for the device object.
The device must be opened with Open() before it can be used.
bool VIB::PowerOverEthernet::GetNumberOfPorts | ( | unsigned int & | NumberOfPorts | ) |
Return the number of ports.
NumberOfPorts | contains the number of PoE ports |
true
for success, use VIBSystem::GetLastErrorString() for an error descriptionbool 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.
PortIndex | Port index 0 ... (GetNumberOfPorts() - 1) |
State | Current PoE state |
Error | Pending error flags, multiple bits can be active, see POE_ERROR |
PoEClass | PoE power class used by the device, valid if State is POE_STATE_POWERED |
true
for success, use VIBSystem::GetLastErrorString() for an error description