Source code for ska_control_model.power_state
# -*- coding: utf-8 -*-
#
# This file is part of the SKA Control System project.
#
# Distributed under the terms of the BSD 3-clause new license.
# See LICENSE.txt for more info.
"""This module defines an enumerated type for power state."""
import enum
[docs]
class PowerState(enum.IntEnum):
"""
Enumerated type for power state.
Used by components that rely upon a power supply, such as hardware.
"""
UNKNOWN = 0
"""The power mode is not known."""
NO_SUPPLY = 1
"""
The component is unsupplied with power and cannot be commanded on.
For example, the power mode of a TPM will be ``NO_SUPPLY`` if the
subrack that powers the TPM is turned off: not only is the TPM
off, but it cannot even be turned on (until the subrack has been
turned on).
"""
OFF = 2
"""The component is turned off but can be commanded on."""
STANDBY = 3
"""The component is powered on and running in low-power standby mode."""
ON = 4
"""The component is powered on and running in fully-operational mode."""