.. _configurelow: ============ Configure ============ Configure command on TMC Subarry Node 1. The Subarray node provides API for Configure workflow. 2. Input JSON is as per schema detailed at : https://developer.skao.int/projects/ska-schemas/en/latest/schemas/tmc/ska-low-tmc-configure.html 3. Configure prepares already assigned low-frequency array resources (MCCS, CSP, SDP context) so the subarray can start scans; success moves the observation state to **READY**. 4. The Sub-array node **accepts the command** if :- A. Admin mode reported by each of the system - CSP,SDP subarray are in **ONLINE/ENGINEERING/RESERVED** B. Operational state of the Sub-array node is **ON/OFF/INIT/STANDBY/ALARM** 5. The Sub-array Node **rejects the command** if :- A. Admin mode reported by each of the system - CSP,SDP Sub-array are in **OFFLINE** or **NOT FITTED**. B. Operational state of central node is **FAULT/UNKNOWN/DISABLE** . 6. The Input JSON is validated as below, and Command is `'Rejected'` with **exception message if they are not met** :- A. JSON should not be empty or malformed B. JSON validation against the schema specified in the Telescope Model ( https://developer.skao.int/projects/ska-schemas/en/latest/schemas/tmc/ska-low-tmc-configure.html ) 7. The following **state requirements** are applied for the **command execution** :- A. TMC Subarray is in `observation state` **IDLE** or **READY** . B. :term:`isSubarrayAvailable` is checked to ensure the subsystems (CSP, SDP and MCCS) are :term:`available` 8. The command execution involves below key operations :- A. Input jsons are prepared for each of the subsystems as follows - * **MCCS preparation** TMC Subarry node adds MCCS interface URL and only MCCS section is extracted from input json and sent to MCCS Leaf node. * **CSP preparation** 1. In common section subarray_id is introduced 2. For each station beam in **["csp"]["lowcbf"]["stations"]["stn_beams"]** delay_poly is populated in the form of csp-sln-dev_name/delayModelStationBeamNumber 3. if lowcbf.timing_beams.beams exists , For each timing (PST) beam a. delay_poly is populated in the form of **csp-sln-dev_name/delayModelPSTBeam** b. jones field is populated with Kafka topic address in 0th index of `jones_cal` key published by `recieve_addresses` attribute of SDP. In case SDP section is not available in JSON it is populated with jones_uri. 3. Once Assign resource command is completed receiveAddresses attribute gets populated from SDP Subarry node.This information is used to populate SDP visibility destinations for **["csp"]["lowcbf"]["vis"]["stn_beams"]** 4. If version ≥ 5.0 , delay_center and rfi_frequency_masks information is added if OET has not sent. 5. If version ≥ 6.0: a. beam_delay_centre information is added if OET has not sent it. b. if lowcbf.search_beams.beams exists , For each search (PSS) beam * delay_poly is populated in the form of **csp-sln-dev_name/delayModelPSSBeam** * jones field is populated with Kafka topic address in 0th index of `jones_cal` key published by `recieve_addresses` attribute of SDP. In case SDP section is not available in JSON it is populated with jones_uri. * **SDP preparation** No keys are added, removed, or renamed before sending , only SDP section is extracted from input json and sent to SDP Leaf node. B. The command is then invoked on the relevant TMC CSP, SDP, MCCS leaf Nodes. * If leaf node rejects configure command , command failure is reported as **'RESULT_CODE - FAILED'** on Long Running Command Result attribute of the TMC Subarry node.Command will not be sent to remaining subsystems in this case if multiple subsystems are involved . * If all leaf node accept command , the TMC Subarry node will wait for command completion. 9. The Sub-array node monitors the progress of command via the Sub-array node ObsState transitions and the long running command results. A. Command is successful when the TMC Subarray Node transitions to **READY** ObsState. This is reported as **'RESULT_CODE - OK'** on Long Running Command Result attribute of the Subarray node. B. Command failure is reported in any of the below cases as **'RESULT_CODE - FAILED'** on Long Running Command Result attribute of the Subarray node. * The CSP Leaf node/SDP Leaf node/MCCS Leaf node reports **'RESULT_CODE - FAILED'** on its Long Running Command Result attribute * The command times out if TMC SubarrayNode does not transition to **READY** within the timeout period specified by `CommandTimeOutDefault` property specified in helm chart of the TMC Subarray node . 10. On success the system is ready for Scan; on failure it may revert to **IDLE** or **FAULT** depending on severity.