Skip to content
Snippets Groups Projects
Select Git revision
  • 36c5888f58a73a5e72861a3f3f9d579eab53f41f
  • master default protected
  • fix_for_hba_element_list
  • add-stations-upto-cs302
  • L2SS-2347-dithering-dont-change-power-freq
  • L2SS-2347-dithering-is-global-setting
  • refactor-control-power-properties
  • update-lcu-rollout-procedure
  • test-pytango-10.0.3
  • deploy-components-parallel
  • L2SS-2357-fix-ruff
  • sync-up-with-meta-pypcc
  • stabilise-landing-page
  • all-stations-lofar2
  • v0.39.7-backports
  • Move-sdptr-to-v1.5.0
  • fix-build-ubuntu
  • tokens-in-env-files
  • fix-build
  • L2SS-2214-deploy-cdb
  • fix-missing-init
  • v0.56.2 protected
  • v0.56.1 protected
  • v0.56.1-rc8 protected
  • v0.56.1-rc7 protected
  • v0.56.1-rc6 protected
  • v0.56.1-rc5 protected
  • v0.56.1-rc4 protected
  • v0.56.1-rc3 protected
  • v0.56.1-rc2 protected
  • v0.56.0 protected
  • 0.53.0rc2
  • 0.53.0rc1
  • last-working-mapper-refactor
  • v0.52.9 protected
  • v0.52.8 protected
  • v0.52.7 protected
  • v0.55.5-r2 protected
  • v0.52.8-rc1 protected
  • v0.55.5 protected
  • v0.55.4 protected
41 results

state.py

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    state.py 1.08 KiB
    # Copyright (C) 2024 ASTRON (Netherlands Institute for Radio Astronomy)
    # SPDX-License-Identifier: Apache-2.0
    
    from enum import IntEnum
    
    __all__ = ["ProtectionStateEnum"]
    
    
    class ProtectionStateEnum(IntEnum):
        """Protection states enumeration
    
        Valid transitions:
        off -> armed
        armed -> active
        active -> transitioning
        active -> fault
        active -> aborted
        active -> off
        transitioning -> active
        """
    
        DEACTIVATED = 0  # protective control measures are disabled outright
        OFF = 1  # No protective shutdown is ongoing
        ARMED = 2  # A protective shutdown is being prepared
        ACTIVE = 3  # A protective shutdown is ongoing and the stationmanager is locked against state transitions
        TRANSITIONING = 4  # Protective shutdown transitions are taking place, the shutdown is ongoing the stationmanager is locked
        FAULT = 5  # The protective shutdown encountered an unrecoverable exception
        ABORTED = 6  # If the protective shutdown was aborted before completion
    
        """"""
    
        @staticmethod
        def keys():
            return [s.name for s in ProtectionStateEnum]