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... | |
iDevice & | operator= (const iDevice &device) |
The assignment operator makes a copy of the existing device object More... | |
virtual | ~iDevice () |
Deletes the device object More... | |
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