This repository has been archived on 2025-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
BreCal/src/lib_brecal_utils/brecal_utils/database/enums.py

39 lines
1.1 KiB
Python

from enum import Enum
class ParticipantType(Enum):
"""determines the type of a participant"""
NONE = 0
BSMD = 1
TERMINAL = 2
PILOT = 4
AGENCY = 8
MOORING = 16
PORT_ADMINISTRATION = 32
TUG = 64
class ShipcallType(Enum):
"""determines the type of a shipcall, as this changes the applicable validation rules"""
INCOMING = 1
OUTGOING = 2
SHIFTING = 3
class ParticipantwiseTimeDelta():
"""stores the time delta for every participant, which triggers the validation rules in the rule set '0001'"""
AGENCY = 1200.0 # 20 h * 60 min/h = 1200 min
MOORING = 960.0 # 16 h * 60 min/h = 960 min
PILOT = 960.0 # 16 h * 60 min/h = 960 min
PORT_ADMINISTRATION = 960.0 # 16 h * 60 min/h = 960 min
TUG = 960.0 # 16 h * 60 min/h = 960 min
TERMINAL = 960.0 # 16 h * 60 min/h = 960 min
class StatusFlags(Enum):
"""
these enumerators ensure that each traffic light validation rule state corresponds to a value, which will be used in the ValidationRules object to identify
the necessity of notifications.
"""
NONE = 0
GREEN = 1
YELLOW = 2
RED = 3