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:

brainstem.result.Result

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:

brainstem.result.Result

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:

brainstem.result.Result

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:

brainstem.result.Result

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:

brainstem.result.Result

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:

brainstem.result.Result

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:

brainstem.result.Result

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:

brainstem.result.Result

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:

brainstem.result.Result

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:

brainstem.result.Result

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:

brainstem.result.Result

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:

brainstem.result.Result

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:

brainstem.result.Result

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:

brainstem.result.Result

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:

brainstem.result.Result

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

setPowerMode(value)[source]

Sets the power mode of the device

Parameters:

value (unsigned char) – The power mode (PD, PSE, Auto, Off).

Returns:

An error result from the list of defined error codes in brainstem.result.Result

Return type:

unsigned byte

setTotalAccumulatedPower(power)[source]

Sets the total accumulated power

Parameters:

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