PoE¶
See the PoE Entity for generic information.
- class brainstem.entity.PoE(module, index)[source]¶
This entity is only available on certain modules, and provides a Power over Ethernet control ability.
- getPairAccumulatedPower(pair)[source]¶
Gets the accumulated power for a given pair.
- Parameters:
pair (unsigned char) –
- Selects PoE pair to access
0 = Pair 1/2
1 = Pair 3/4
- Returns:
- Object containing error code and returned value on success.
- errorunsigned byte
An error result from the list of defined error codes
- valueint
Variable to be filled with the total accumulated POE power in milli-watts (mW).
- Return type:
- getPairCapacitance(pair)[source]¶
Gets the Capacitance for a given pair
- Parameters:
pair (unsigned char) –
- Selects PoE pair to access
0 = Pair 1/2
1 = Pair 3/4
- Returns:
- Object containing error code and returned value on success.
- errorunsigned byte
An error result from the list of defined error codes
- valueint
The capacitance in nanofarads (1 == 1e-9F).
- Return type:
- getPairCurrent(pair)[source]¶
Gets the Current for a given pair.
- Parameters:
pair (unsigned char) –
- Selects PoE pair to access
0 = Pair 1/2
1 = Pair 3/4
- Returns:
- Object containing error code and returned value on success.
- errorunsigned byte
An error result from the list of defined error codes
- valueint
The current in microamps (1 == 1e-6V).
- Return type:
- getPairDetectionStatus(pair)[source]¶
Gets detected status of the POE connection for a given pair.
- Parameters:
pair (unsigned char) –
- Selects PoE pair to access
0 = Pair 1/2
1 = Pair 3/4
- Returns:
- Object containing error code and returned value on success.
- errorunsigned byte
An error result from the list of defined error codes
- valueunsigned char
The current detected status of the pairs.
- Return type:
- getPairDiscoveredClass(pair)[source]¶
Gets the discovered class for a given pair.
- Parameters:
pair (unsigned char) –
- Selects PoE pair to access
0 = Pair 1/2
1 = Pair 3/4
- Returns:
- Object containing error code and returned value on success.
- errorunsigned byte
An error result from the list of defined error codes
- valueunsigned char
The negotiated POE class by the device (PSE/PD).
- Return type:
- getPairEnabled(pair)[source]¶
Gets the current enable value of the indicated POE pair.
- Parameters:
pair (unsigned char) –
- Selects PoE pair to access
0 = Pair 1/2
1 = Pair 3/4
- Returns:
- Object containing error code and returned value on success.
- errorunsigned byte
An error result from the list of defined error codes
- valuebool
1 = Enabled; 0 = Disabled;
- Return type:
- getPairPower(pair)[source]¶
Get the instantaneous power consumption for a given pair The equivalent of Voltage x Current
- Parameters:
pair (unsigned char) –
- Selects PoE pair to access
0 = Pair 1/2
1 = Pair 3/4
- Returns:
- Object containing error code and returned value on success.
- errorunsigned byte
An error result from the list of defined error codes
- valueint
Variable to be filled with the pairs power in milli-watts (mW).
- Return type:
- getPairRequestedClass(pair)[source]¶
Gets the requested class for a given pair.
- Parameters:
pair (unsigned char) –
- Selects PoE pair to access
0 = Pair 1/2
1 = Pair 3/4
- Returns:
- Object containing error code and returned value on success.
- errorunsigned byte
An error result from the list of defined error codes
- valueunsigned char
The requested POE class by the device (PD).
- Return type:
- getPairResistance(pair)[source]¶
Gets the Resistance for a given pair.
- Parameters:
pair (unsigned char) –
- Selects PoE pair to access
0 = Pair 1/2
1 = Pair 3/4
- Returns:
- Object containing error code and returned value on success.
- errorunsigned byte
An error result from the list of defined error codes
- valueint
The resistance in milliohms (1 == 1e-3Z).
- Return type:
- getPairSourcingClass(pair)[source]¶
Gets the sourcing class for a given pair.
- Parameters:
pair (unsigned char) –
- Selects PoE pair to access
0 = Pair 1/2
1 = Pair 3/4
- Returns:
- Object containing error code and returned value on success.
- errorunsigned byte
An error result from the list of defined error codes
- valueunsigned char
The POE class being offered by the device (PSE).
- Return type:
- getPairVoltage(pair)[source]¶
Gets the Voltage for a given pair.
- Parameters:
pair (unsigned char) –
- Selects PoE pair to access
0 = Pair 1/2
1 = Pair 3/4
- Returns:
- Object containing error code and returned value on success.
- errorunsigned byte
An error result from the list of defined error codes
- valueint
The voltage in microvolts (1 == 1e-6V).
- Return type:
- getPowerMode()[source]¶
Gets the power mode of the device
- Returns:
- Object containing error code and returned value on success.
- errorunsigned byte
An error result from the list of defined error codes
- valueunsigned char
The power mode (PD, PSE, Auto, Off).
- Return type:
- getPowerState()[source]¶
Gets the power state of the device
- Returns:
- Object containing error code and returned value on success.
- errorunsigned byte
An error result from the list of defined error codes
- valueunsigned char
The power state (PD, PSE, Off).
- Return type:
- getTotalAccumulatedPower()[source]¶
Gets the total Accumulated Power
- Returns:
- Object containing error code and returned value on success.
- errorunsigned byte
An error result from the list of defined error codes
- valueint
Variable to be filled with the total accumulated POE power in milli-watts (mW).
- Return type:
- getTotalPower()[source]¶
Gets the total instantaneous power consumption The equivalent of Pair1(Voltage x Current) + Pair2(Voltage x Current)
- Returns:
- Object containing error code and returned value on success.
- errorunsigned byte
An error result from the list of defined error codes
- valueint
Variable to be filled with the total POE power in milli-watts (mW).
- Return type:
- setPairAccumulatedPower(pair, power)[source]¶
Sets the accumulated power for a given pair.
- Parameters:
pair (unsigned char) –
- Selects PoE pair to access
0 = Pair 1/2
1 = Pair 3/4
power (int) – The power accumulator value to be set in milli-watts (mW).
- Returns:
An error result from the list of defined error codes in brainstem.result.Result
- Return type:
unsigned byte
- setPairEnabled(pair, enable)[source]¶
Enables or disables the indicated POE pair.
- Parameters:
pair (unsigned char) –
- Selects PoE pair to access
0 = Pair 1/2
1 = Pair 3/4
enable (bool) – 1 = Enable port; 0 = Disable port.
- Returns:
An error result from the list of defined error codes in brainstem.result.Result
- Return type:
unsigned byte
- setPairSourcingClass(pair, value)[source]¶
Sets the sourcing class for a given pair.
- Parameters:
pair (unsigned char) –
- Selects PoE pair to access
0 = Pair 1/2
1 = Pair 3/4
value (unsigned char) – The POE class being offered by the device (PSE).
- Returns:
An error result from the list of defined error codes in brainstem.result.Result
- Return type:
unsigned byte