# This file is part of ctrl_iip
# 
# Developed for the LSST Data Management System.
# This product includes software developed by the LSST Project
# (https://www.lsst.org).
# See the COPYRIGHT file at the top-level directory of this distribution
# for details of code ownership.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <https://www.gnu.org/licenses/>.


ROOT='ROOT'
DEVICE='DEVICE'
XFER_COMPONENTS='XFER_COMPONENTS'
COMPONENT='COMPONENT'
DISTRIBUTORS='DISTRIBUTORS'
FORWARDERS='FORWARDERS'
BASE_BROKER_NAME='BASE_BROKER_NAME'
NCSA_BROKER_NAME='NCSA_BROKER_NAME'
TEST_BROKER_NAME='TEST_BROKER_NAME'
BASE_BROKER_PASSWD='BASE_BROKER_PASSWD'
NCSA_BROKER_PASSWD='NCSA_BROKER_PASSWD'
TEST_BROKER_PASSWD='TEST_BROKER_PASSWD'
BASE_BROKER_ADDR='BASE_BROKER_ADDR'
NCSA_BROKER_ADDR='NCSA_BROKER_ADDR'
TEST_BROKER_ADDR='TEST_BROKER_ADDR'
CFG_FILE = 'L1SystemCfg.yaml'

HEALTHY='HEALTHY'
UNKNOWN='UNKNOWN'
RESPONSIVE='RESPONSIVE'
RESULT_SET='RESULT_SET'

MSG_TYPE='MSG_TYPE'
JOB_NUM='JOB_NUM'
XML='XML'
YAML='YAML'



JOB='JOB'
NEW_JOB='NEW_JOB'
NEW_JOB_ACK='NEW_JOB_ACK'
CHECK_HEALTH='CHECK_HEALTH'
BASE_RESOURCES='BASE_RESOURCES'
NCSA_RESOURCES='NCSA_RESOURCES'
NCSA_RESOURCES_QUERY='NCSA_RESOURCES_QUERY'
NCSA_RESOURCES_QUERY_ACK='NCSA_RESOURCES_QUERY_ACK'
NCSA_STANDBY='NCSA_STANDBY'
NCSA_STANDBY_ACK='NCSA_STANDBY_ACK'
NCSA_READOUT_ACK='NCSA_READOUT_ACK'

FORWARDERS='FORWARDERS'
FORWARDER_HEALTH_CHECK='FORWARDER_HEALTH_CHECK'
FORWARDER_HEALTH_ACK='FORWARDER_HEALTH_ACK'
FORWARDER_JOB_PARAMS='FORWARDER_JOB_PARAMS'
FORWARDER_JOB_PARAMS_ACK='FORWARDER_JOB_PARAMS_ACK'
FORWARDER_READOUT='FORWARDER_READOUT'
FORWARDER_READOUT_ACK='FORWARDER_READOUT_ACK'

DISTRIBUTOR_HEALTH_CHECK='DISTRIBUTOR_HEALTH_CHECK'
DISTRIBUTOR_HEALTH_ACK='DISTRIBUTOR_HEALTH_ACK'
DISTRIBUTOR_STANDBY='DISTRIBUTOR_STANDBY'
DISTRIBUTOR_STANDBY_ACK='DISTRIBUTOR_STANDBY_ACK'
DISTRIBUTOR_READOUT='DISTRIBUTOR_READOUT'
DISTRIBUTOR_READOUT_ACK='DISTRIBUTOR_READOUT_ACK'
DISTRIBUTOR_JOB_PARAMS='DISTRIBUTOR_JOB_PARAMS'
DISTRIBUTOR_JOB_PARAMS_ACK='DISTRIBUTOR_JOB_PARAMS_ACK'

START='START'
STANDBY='STANDBY'
ENABLE='ENABLE'
DISABLE='DISABLE'
EXIT='EXIT'
FAULT='FAULT'
FINAL='FINAL'
OFFLINE='OFFLINE'
NEXT_VISIT='NEXT_VISIT'
START_INTEGRATION='START_INTEGRATION'
READY='READY'
READOUT='READOUT'
READOUT_SENT='READOUT_SENT'
TELEMETRY='TELEMETRY'
SENTINEL_FILE='SENTINEL_FILE'
INSUFFICIENT_NCSA_RESOURCES='INSUFFICIENT_NCSA_RESOURCES'
PAIRING='PAIRING'
PAIRS='PAIRS'
NUMBER_OF_PAIRS='NUMBER_OF_PAIRS'
BROKER_NAME='BROKER_NAME'
BROKER_PASSWD='BROKER_PASSWD'
AFM_BROKER_NAME='AFM_BROKER_NAME'
AFM_BROKER_PASSWD='AFM_BROKER_PASSWD'
PFM_BROKER_NAME='PFM_BROKER_NAME'
PFM_BROKER_PASSWD='PFM_BROKER_PASSWD'
RAFTS='RAFTS'
RAFT_LIST='RAFT_LIST'
ACK_ID='ACK_ID'
ACK_BOOL='ACK_BOOL'
RAFT_NUM='RAFT_NUM'
INSUFFICIENT_FORWARDERS='INSUFFICIENT_FORWARDERS'
NEEDED_WORKERS='NEEDED_WORKERS'
NEEDED_DISTRIBUTORS='NEEDED_DISTRIBUTORS'
NEEDED_FORWARDERS='NEEDED_FORWARDERS'
AVAILABLE_WORKERS='AVAILABLE_WORKERS'
AVAILABLE_DISTRIBUTORS='AVAILABLE_DISTRIBUTORS'
AVAILABLE_FORWARDERS='AVAILABLE_FORWARDERS'
MISSING_DISTRIBUTORS='MISSING_DISTRIBUTORS'
NCSA_RESOURCES='NCSA_RESOURCES'
IN_READY_STATE='IN_READY_STATE'
FORWARDERS_LIST='FORWARDERS_LIST'
IDLE='IDLE'

NAME='NAME'
MATE='MATE'
STATE='STATE'
STATUS='STATUS'
SESSION_ID='SESSION_ID'
VISIT_ID='VISIT_ID'
IMAGE_ID='IMAGE_ID'
IMAGE_SRC='IMAGE_SRC'
BORE_SIGHT='BORE_SIGHT'
CCDS='CCDS'
CCD_LIST='CCD_LIST'
XFER_LOGIN='XFER_LOGIN'
TARGET_DIR='TARGET_DIR'
ROUTING_KEY='ROUTING_KEY'
PASSWD='PASSWD'
FQN='FQN'
CONSUME_QUEUE='CONSUME_QUEUE'
PUBLISH_QUEUE='PUBLISH_QUEUE'
REPLY_QUEUE='REPLY_QUEUE'
HOSTNAME='HOSTNAME'
DEFAULT_CONFIG_FILE='L1SystemCfg.yaml'
IP_ADDR='IP_ADDR'
AR='AR'
PP='PP'
CU='CU'

# Redis DB Names
AR_ACK_SCOREBOARD_DB = 1
PP_ACK_SCOREBOARD_DB = 2
CU_ACK_SCOREBOARD_DB = 3

DIST_SCOREBOARD_DB = 4
NCSA_JOB_SCBD_DB = 5
NCSA_ACK_SCBD_DB = 6

AR_FWD_SCOREBOARD_DB = 7
PP_FWD_SCOREBOARD_DB = 8
CU_FWD_SCOREBOARD_DB = 9

AR_JOB_SCOREBOARD_DB = 10
PP_JOB_SCOREBOARD_DB = 11
CU_JOB_SCOREBOARD_DB = 12

DMCS_JOB_SCOREBOARD_DB = 14
DMCS_BACKLOG_SCOREBOARD_DB = 15
