TMC Constants
The ska_tmc_common.tmc_constants module defines the shared command,
configuration, schema-version, and Tango device-name constants used by TMC
components. Telescope-specific classes provide MID and LOW values while the
base classes retain values shared by both telescopes. The base class initializes
the constants to blank, and the child classes assign the appropriate values.
This module contains the consolidated constants shared across all TMC repositories.
Interface versions
- class ska_tmc_common.tmc_constants.InterfaceVersions
This is the base class for schema interface versions. It stores only the schema version information defined and managed by TMC. These constants can be used to specify the schema version when constructing input data for TMC subsystems.
Constants Constant
Value
DELAYMODEL_VERSION""ASSIGN_RESOURCES_SCHEMA_VERSION""RELEASE_RESOURCES_SCHEMA_VERSION""SDP_ASSIGN_RESOURCES_SCHEMA_VERSION"https://schema.skao.int/ska-sdp-assignres/0.4"
- class ska_tmc_common.tmc_constants.MidInterfaceVersions
This class extends InterfaceVersions and stores only the schema version information defined and managed by Mid TMC. These constants can be used to specify the schema version when constructing input data for Mid TMC subsystems.
Constants declared by this class Constant
Value
DELAYMODEL_VERSION"https://schema.skao.int/ska-mid-csp-delaymodel/3.0"DISH_VCC_CONFIG_INTERFACE_VERSION"https://schema.skao.int/ska-mid-cbf-initsysparam/1.0"
- class ska_tmc_common.tmc_constants.LowInterfaceVersions
This class extends InterfaceVersions and stores only the schema version information defined and managed by Low TMC. These constants can be used to specify the schema version when constructing input data for Low TMC subsystems.
Constants declared by this class Constant
Value
DELAYMODEL_VERSION"https://schema.skao.int/ska-low-csp-delaymodel/1.1"MCCS_RELEASE_INTERFACE"https://schema.skatelescope.org/ska-low-mccs-controller-release/2.0"ASSIGN_RESOURCES_SCHEMA_VERSION"https://schema.skao.int/ska-low-tmc-assignresources/4.1"RELEASE_RESOURCES_SCHEMA_VERSION"https://schema.skao.int/ska-low-tmc-releaseresources/3.0"MCCS_RELEASE_VERSION"https://schema.skatelescope.org/ska-low-mccs-controller-release/2.0"MCCS_ASSIGN_VERSION"https://schema.skao.int/ska-low-mccs-controller-allocate/3.0"
Device names
- class ska_tmc_common.tmc_constants.DeviceNames
Base class for storing TMC subsystem device names. This class contains the device names that are common to both the Mid and Low telescopes. These device names can be used to create device proxies in tests.
Constants Constant
Value
CENTRAL_NODE""CSP_MLN_DEVICE""SDP_MLN_DEVICE""SDP_MASTER_DEVICE""CSP_MASTER_DEVICE""TMC_SUBARRAY""CSP_SUBARRAY_LN""SDP_SUBARRAY_LN""CSP_SUBARRAY""SDP_SUBARRAY""
- class ska_tmc_common.tmc_constants.MidDeviceNames
This class extends DeviceNames and contains the device names for the Mid TMC subsystem. For subarrays, only the device name for subarray1 is currently set. Device names for additional subarrays can be added as needed.
Constants Constant
Value
CENTRAL_NODE"mid-tmc/central-node/0"CSP_MLN_DEVICE"mid-tmc/leaf-node-csp/0"SDP_MLN_DEVICE"mid-tmc/leaf-node-sdp/0"SDP_MASTER_DEVICE"mid-sdp/control/0"CSP_MASTER_DEVICE"mid-csp/control/0"TMC_SUBARRAY"mid-tmc/subarray/01"CSP_SUBARRAY_LN"mid-tmc/subarray-leaf-node-csp/01"SDP_SUBARRAY_LN"mid-tmc/subarray-leaf-node-sdp/01"DISH_LEAF_NODE_1"mid-tmc/leaf-node-dish/ska001"DISH_LEAF_NODE_36"mid-tmc/leaf-node-dish/ska036"DISH_LEAF_NODE_63"mid-tmc/leaf-node-dish/ska063"DISH_LEAF_NODE_100"mid-tmc/leaf-node-dish/ska100"DISH_LEAF_NODE_77"mid-tmc/leaf-node-dish/ska077"DISH_LEAF_NODE_099"mid-tmc/leaf-node-dish/ska099"DISH_LEAF_NODE_500"mid-tmc/leaf-node-dish/ska500"DISH_LEAF_NODE_999"mid-tmc/leaf-node-dish/ska999"DISH_LEAF_NODE_MKT"mid-tmc/leaf-node-dish/mkt001"DISH_MASTER_1"mid-dish/dish-manager/ska001"
- class ska_tmc_common.tmc_constants.LowDeviceNames
This class extends DeviceNames and contains the device names for the Low TMC subsystem. For subarrays, only the device name for subarray1 is currently set. Device names for additional subarrays can be added as needed.
Constants Constant
Value
CENTRAL_NODE"low-tmc/central-node/0"CSP_MLN_DEVICE"low-tmc/leaf-node-csp/0"SDP_MLN_DEVICE"low-tmc/leaf-node-sdp/0"MCCS_MLN_DEVICE"low-tmc/leaf-node-mccs/0"SDP_MASTER_DEVICE"low-sdp/control/0"CSP_MASTER_DEVICE"low-csp/control/0"MCCS_MASTER_DEVICE"low-mccs/control/control"TMC_SUBARRAY"low-tmc/subarray/01"CSP_SUBARRAY_LN"low-tmc/subarray-leaf-node-csp/01"SDP_SUBARRAY_LN"low-tmc/subarray-leaf-node-sdp/01"CSP_SUBARRAY"low-csp/subarray/01"SDP_SUBARRAY"low-sdp/subarray/01"
- class ska_tmc_common.tmc_constants.MidDevicePrefixes
This class contains the device name prefixes for the Mid telescope. These prefixes can be used to construct device names or extract device-specific information from devices using device name. Currently, this class defines only Mid telescope-specific constants.
Constants Constant
Value
DISH_LEAF_NODE_PREFIX"mid-tmc/leaf-node-dish/ska"DISH_DEVICE_PREFIX"mid-dish/dish-manager"
Command and validation constants
- class ska_tmc_common.tmc_constants.CommandResultStatus
This class maintains a dictionary of command result statuses, where the key represents the result code and the value contains the corresponding message. It is used for validating Dish-VCC and K-value results in TMC.
Constants Constant
Value
DISH_VCC_VALIDATION_RESULT_STATUS{ResultCode.FAILED: "TMC and CSP Master Dish VCC version is Different", ResultCode.NOT_ALLOWED: "CSP Master device is unavailable", ResultCode.OK: "TMC and CSP Master Dish Vcc Version is Same"}DISH_KVALUE_VALIDATION_RESULT_STATUS{ResultCode.FAILED: "k-value not identical", ResultCode.NOT_ALLOWED: "Dish Unavailable", ResultCode.OK: "k-value identical", ResultCode.UNKNOWN: "k-value not set", ResultCode.STARTED: "Dish leaf node initializing"}
- class ska_tmc_common.tmc_constants.ValidationKeys
This class defines the lists and dictionaries that specify the required keys for command input data. Input validation is performed by verifying that all required fields defined in these lists and dictionaries are present in the provided command input.
Note: These lists and dictionaries are intended only for checking the presence of required fields. They are not used for schema or semantic validation.
Constants Constant
Value
REQUIRED_MID_CONFIGURE_KEYS["pointing", "dish", "csp", "sdp", "tmc"]REQUIRED_LOW_CONFIGURE_KEYS["tmc"]REQUIRED_KEYS{"MID": REQUIRED_MID_CONFIGURE_KEYS, "LOW": REQUIRED_LOW_CONFIGURE_KEYS}REQUIRED_LOW_SCAN_KEYS["scan_id"]REQUIRED_LOW_ASSIGN_RESOURCE_KEYS["subarray_id"]
- class ska_tmc_common.tmc_constants.StringConstants
This class defines the string constants used throughout the TMC repositories. These constants are referenced by command classes instead of using hard-coded string literals, improving consistency and maintainability.
Constants Constant
Value
ERROR_MESSAGE"Malformed input string. Missing key: '{key}'"RELEASE_ALL_RESOURCES"ReleaseAllResources"END"End"CONFIGURE"Configure"SN_BACK_TO_IDLE"SUBARRAY_BACK_TO_IDLE"SN_BACK_TO_EMPTY"SUBARRAY_BACK_TO_EMPTY"COMMAND_COMPLETION_MESSAGE"Command Completed"COMMAND_STARTED_MESSAGE"Command Started"FIXED_TRAJECTORY"fixed"
Telescope configuration
- class ska_tmc_common.tmc_constants.TelescopeConfiguration
This class provides a centralized definition of telescope-level configuration constants. The constants defined in this class are used by command classes to configure command-related parameters and astronomy domain-specific information.
Constants Constant
Value
ARRAY_LAYOUT_DEFAULT""SUB_SYSTEMS{"mccs", "csp", "sdp"}MAJOR_CONFIG_VERSION2MINOR_CONFIG_VERSION2RECOVERY_ACTION_DICT{ObsState.EMPTY: {"ReleaseAllResources": [("ReleaseAllResources COMPLETED", {"component_unresourced": None}), ("ReleaseAllResources COMPLETED", {"release_completed": None})]}, ObsState.IDLE: {"End": [("CONFIGURING_IDLE", {"configure_completed": None})]}, ObsState.READY: {"Configure": [("CONFIGURING_READY", {"configure_completed": None})]}}YPOL_OFFSET_NS0.0SKA_EPOCH"1999-12-31T23:59:28Z"
- class ska_tmc_common.tmc_constants.MidTelescopeConfiguration
This class extends TelescopeConfiguration and defines Mid telescope-level configuration constants. The constants provided by this class are used by command classes to configure command related parameters and astronomy domain-specific information specific to the Mid telescope.
Constants declared by this class Constant
Value
ARRAY_LAYOUT_DEFAULT{"source_uris": ["gitlab://gitlab.com/ska-telescope/ska-telmodel-data?main#tmdata"], "array_layout_path": "instrument/ska1_mid/layout/mid-layout.json"}NUMBER_OF_DEVICE_EVENTS_COUNT2DEFAULT_TRAJECTORY{"name": "fixed", "attrs": {"x": 0.0, "y": 0.0}}DEFAULT_PROJECTION{"name": "SIN", "alignment": "ICRS"}FIRST_PROGRAM_TRACK_TABLE_SIZE50RADEC_TO_AZEL_CONVERSION_TIME0.02TIME_DELTA_IN_SECONDS1TRACK_TABLE_ENTRY_SIZE3TRACK_COMMAND_TIMEOUT10IERS_DATA_STORAGE_PATHjoin(dirname(__file__), "..", "..", "data", "iers_file.all")THREAD_JOIN_TIMEOUT2.8RESET_OFFSETS[0.0, 0.0]ADJUST_TIMEOUT10ALLOWED_BANDS["1", "2", "3", "4", "5a", "5b"]DISH_BANDPARAMS{"Band_1": "band1PointingModelParams", "Band_2": "band2PointingModelParams", "Band_3": "band3PointingModelParams", "Band_4": "band4PointingModelParams", "Band_5a": "band5aPointingModelParams", "Band_5b": "band5bPointingModelParams"}
- class ska_tmc_common.tmc_constants.LowTelescopeConfiguration
This class extends TelescopeConfiguration and defines Low telescope-level configuration constants. The constants provided by this class are used by command classes to configure command-related parameters and astronomy domain-specific information specific to the Low telescope.
Constants declared by this class Constant
Value
ARRAY_LAYOUT_DEFAULT{"source_uris": ["gitlab://gitlab.com/ska-telescope/ska-telmodel-data?main#tmdata"], "array_layout_path": "instrument/ska1_low/layout/low-layout.json"}NUMBER_OF_DEVICE_EVENTS_COUNT3RESULTCODE_OK(ResultCode.OK, "Command Completed")MCCSMLN_RESULTCODE_FAILED[ResultCode.FAILED, ResultCode.REJECTED]OBS_RESULTCODE_FAILED[ResultCode.FAILED, ResultCode.REJECTED, ResultCode.NOT_ALLOWED]