j5.components.power_output module

Classes for supporting toggleable power output channels.

class j5.components.power_output.PowerOutput(identifier: int, backend: j5.components.power_output.PowerOutputInterface)[source]

Bases: j5.components.component.Component

A power output channel.

It can be enabled/disabled, and the current being drawn on this channel can be measured.

current

Get the current being drawn on this power output, in amperes.

Returns:current being drawn on this power output, in amperes.
identifier

An integer to identify the component on a board.

Returns:component identifier.
static interface_class() → Type[j5.components.power_output.PowerOutputInterface][source]

Get the interface class that is required to use this component.

Returns:interface class.
is_enabled

Get whether the output is enabled.

Returns:output enabled
class j5.components.power_output.PowerOutputGroup(outputs: Mapping[T, j5.components.power_output.PowerOutput])[source]

Bases: object

A group of PowerOutputs.

power_off() → None[source]

Disable all outputs in the group.

power_on() → None[source]

Enable all outputs in the group.

class j5.components.power_output.PowerOutputInterface[source]

Bases: j5.components.component.Interface

An interface containing the methods required to control a power output channel.

get_power_output_current(identifier: int) → float[source]

Get the current being drawn on a power output, in amperes.

Parameters:identifier – power output to fetch current of.
Returns:current of the output.
get_power_output_enabled(identifier: int) → bool[source]

Get whether a power output is enabled.

Parameters:identifier – power output to fetch status of.
Returns:status of the power output.
set_power_output_enabled(identifier: int, enabled: bool) → None[source]

Set whether a power output is enabled.

Parameters:
  • identifier – power output to enable / disable
  • enabled – status of the power output.