diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000000000000000000000000000000000000..929b6bb4f5a33f37a97181698c5a0626021018f0 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,10 @@ +* text eol=lf + +*.py text +*.json text +*.sh text + +*.png binary +*.h5 binary +*.jpg binary +*.bin binary diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 598995eb3d4f9f7732d3a33f95a5a874233217fd..3cc164dc1d8ed501c517047c5dcbf86f104d6fa3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,6 +2,7 @@ # images is in place. image: artefact.skao.int/ska-tango-images-tango-itango:9.3.5 variables: + GIT_SUBMODULE_STRATEGY: recursive PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip" cache: paths: @@ -18,7 +19,8 @@ newline_at_eof: before_script: - pip3 install -r tangostationcontrol/test-requirements.txt script: - - flake8 --filename *.sh,*.conf,*.md,*.yml --select=W292 --exclude .tox,.egg-info,docker +# TODO(Corne): Ignore shell files in submodules more cleanly + - flake8 --filename *.sh,*.conf,*.md,*.yml --select=W292 --exclude docker-compose/tango-prometheus-exporter,.tox,.egg-info,docker python_linting: stage: linting before_script: @@ -41,6 +43,7 @@ shellcheck: - sudo apt-get update - sudo apt-get install -y shellcheck script: +# TODO(Corne): Ignore shell files in submodules - shellcheck **/*.sh unit_test: stage: unit-tests @@ -48,27 +51,29 @@ unit_test: - sudo apt-get update - sudo apt-get install -y git script: +<<<<<<< HEAD - cd tangostationcontrol - tox -e py37 integration_test: +======= + - cd devices + - tox -e py37 +integration_test_docker: +>>>>>>> master stage: integration-tests - allow_failure: true + image: docker:latest tags: - privileged services: - - name: docker:20.10.8-dind + - name: docker:dind variables: DOCKER_TLS_CERTDIR: "/certs" -# Everything below does not work currently, we need a privileged container -# that can run the dind service before_script: - - sudo apt update - - sudo apt install -y docker.io - - export USER=$(id | awk -F'=' '{print $2}' | awk -F'(' '{print $2}' | awk -F')' '{print $1}') - - echo $USER -# - sudo usermod -aG docker $USER - - sudo docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY + - apk add --update make bash docker-compose + - apk add --update bind-tools + - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY script: +<<<<<<< HEAD - touch /home/$USER/.Xauthority - source bootstrap/etc/lofar20rc.sh - export HOSTNAME=$(cat /run/systemd/netif/leases/2 | grep ^ADDRESS= | awk -F'=' '{print $2}') @@ -87,3 +92,20 @@ wheel_packaging: script: - cd tangostationcontrol - python setup.py bdist_wheel +======= + - touch /root/.Xauthority +# Hack BASH_SOURCE into sourced files, docker its sh shell won't set this + - export BASH_SOURCE=$(pwd)/bootstrap/etc/lofar20rc.sh +# Hack HOSTNAME env variable into host.docker.internal, set in docker-compose + - export HOSTNAME=host.docker.internal +# - export HOSTNAME=$(hostname -i) +# - export HOSTNAME=$(cat /run/systemd/netif/leases/2 | grep ^ADDRESS= | awk -F'=' '{print $2}') +# source the lofarrc file and mask its non zero exit code + - . bootstrap/etc/lofar20rc.sh || true +# TANGO_HOST must be unset our databaseds will be unreachable + - unset TANGO_HOST +# Allow integration test to execute + - chmod u+x $CI_PROJECT_DIR/sbin/run_integration_test.sh +# Do not remove 'bash' or statement will be ignored by primitive docker shell + - bash $CI_PROJECT_DIR/sbin/run_integration_test.sh +>>>>>>> master diff --git a/CDB/LOFAR_ConfigDb.json b/CDB/LOFAR_ConfigDb.json index b28c57984889d07dd0544702d6712861bdb72903..e903a459ef687aa8ee11164c58cc0c22c43c1347 100644 --- a/CDB/LOFAR_ConfigDb.json +++ b/CDB/LOFAR_ConfigDb.json @@ -1,984 +1,869 @@ -{ - "servers": { - "docker_device": { - "LTS": { - "Docker": { - "LTS/Docker/1": {} - } - } - }, - "Femto": { - "CS999": { - "Femto": { - "opc-ua/test-femto/1": {} - } - } - }, - "observation_control": { - "LTS": { - "ObservationControl": { - "LTS/ObservationControl/1": {} - } - } - }, - "boot": { - "LTS": { - "Boot": { - "LTS/Boot/1": {} - } - } - }, - "RECV": { - "LTS": { - "RECV": { - "LTS/RECV/1": { - "attribute_properties": { - "Ant_mask_RW": { - "archive_period": [ - "600000" - ] - }, - "CLK_Enable_PWR_R": { - "archive_period": [ - "600000" - ] - }, - "CLK_I2C_STATUS_R": { - "archive_period": [ - "600000" - ], - "archive_rel_change": [ - "-1", - "1" - ], - "rel_change": [ - "-1", - "1" - ] - }, - "CLK_PLL_error_R": { - "archive_period": [ - "600000" - ] - }, - "CLK_PLL_locked_R": { - "archive_period": [ - "600000" - ] - }, - "CLK_monitor_rate_RW": { - "archive_period": [ - "600000" - ], - "archive_rel_change": [ - "-1", - "1" - ], - "rel_change": [ - "-1", - "1" - ] - }, - "CLK_translator_busy_R": { - "archive_period": [ - "600000" - ] - }, - "HBA_element_LNA_pwr_R": { - "archive_period": [ - "600000" - ], - "archive_rel_change": [ - "-1", - "1" - ], - "rel_change": [ - "-1", - "1" - ] - }, - "HBA_element_LNA_pwr_RW": { - "archive_period": [ - "600000" - ], - "archive_rel_change": [ - "-1", - "1" - ], - "rel_change": [ - "-1", - "1" - ] - }, - "HBA_element_beamformer_delays_R": { - "archive_period": [ - "600000" - ], - "archive_rel_change": [ - "-1", - "1" - ], - "rel_change": [ - "-1", - "1" - ] - }, - "HBA_element_beamformer_delays_RW": { - "archive_period": [ - "600000" - ], - "archive_rel_change": [ - "-1", - "1" - ], - "rel_change": [ - "-1", - "1" - ] - }, - "HBA_element_led_R": { - "archive_period": [ - "600000" - ], - "archive_rel_change": [ - "-1", - "1" - ], - "rel_change": [ - "-1", - "1" - ] - }, - "HBA_element_led_RW": { - "archive_period": [ - "600000" - ], - "archive_rel_change": [ - "-1", - "1" - ], - "rel_change": [ - "-1", - "1" - ] - }, - "HBA_element_pwr_R": { - "archive_period": [ - "600000" - ], - "archive_rel_change": [ - "-1", - "1" - ], - "rel_change": [ - "-1", - "1" - ] - }, - "HBA_element_pwr_RW": { - "archive_period": [ - "600000" - ], - "archive_rel_change": [ - "-1", - "1" - ], - "rel_change": [ - "-1", - "1" - ] - }, - "RCU_ADC_lock_R": { - "archive_period": [ - "600000" - ], - "archive_rel_change": [ - "-1", - "1" - ], - "rel_change": [ - "-1", - "1" - ] - }, - "RCU_I2C_STATUS_R": { - "archive_period": [ - "600000" - ], - "archive_rel_change": [ - "-1", - "1" - ], - "rel_change": [ - "-1", - "1" - ] - }, - "RCU_ID_R": { - "archive_period": [ - "600000" - ], - "archive_rel_change": [ - "-1", - "1" - ], - "rel_change": [ - "-1", - "1" - ] - }, - "RCU_LED0_R": { - "archive_period": [ - "600000" - ] - }, - "RCU_LED0_RW": { - "archive_period": [ - "600000" - ] - }, - "RCU_LED1_R": { - "archive_period": [ - "600000" - ] - }, - "RCU_LED1_RW": { - "archive_period": [ - "600000" - ] - }, - "RCU_Pwr_dig_R": { - "archive_period": [ - "600000" - ] - }, - "RCU_attenuator_R": { - "archive_period": [ - "600000" - ], - "archive_rel_change": [ - "-1", - "1" - ], - "rel_change": [ - "-1", - "1" - ] - }, - "RCU_attenuator_RW": { - "archive_period": [ - "600000" - ], - "archive_rel_change": [ - "-1", - "1" - ], - "rel_change": [ - "-1", - "1" - ] - }, - "RCU_band_R": { - "archive_period": [ - "600000" - ], - "archive_rel_change": [ - "-1", - "1" - ], - "rel_change": [ - "-1", - "1" - ] - }, - "RCU_band_RW": { - "archive_period": [ - "600000" - ], - "archive_rel_change": [ - "-1", - "1" - ], - "rel_change": [ - "-1", - "1" - ] - }, - "RCU_mask_RW": { - "archive_period": [ - "600000" - ] - }, - "RCU_monitor_rate_RW": { - "archive_period": [ - "600000" - ], - "archive_rel_change": [ - "-1.0", - "1.0" - ], - "rel_change": [ - "-1.0", - "1.0" - ] - }, - "RCU_temperature_R": { - "archive_period": [ - "600000" - ], - "archive_rel_change": [ - "-1.0", - "1.0" - ], - "rel_change": [ - "-1.0", - "1.0" - ] - }, - "RCU_translator_busy_R": { - "archive_period": [ - "600000" - ] - }, - "RCU_version_R": { - "archive_period": [ - "600000" - ] - }, - "State": { - "archive_period": [ - "600000" - ], - "event_period": [ - "0" - ] - }, - "Status": { - "archive_period": [ - "600000" - ], - "event_period": [ - "0" - ] - } - }, - "properties": { - "OPC_Server_Name": [ - "ltspi.astron.nl" - ], - "OPC_Server_Port": [ - "4842" - ], - "OPC_Time_Out": [ - "5.0" - ], - "polled_attr": [ - "state", - "1000", - "status", - "1000", - "ant_mask_rw", - "1000", - "rcu_adc_lock_r", - "1000", - "rcu_attenuator_r", - "1000", - "rcu_attenuator_rw", - "1000", - "rcu_band_r", - "1000", - "rcu_band_rw", - "1000", - "rcu_id_r", - "1000", - "rcu_led0_r", - "1000", - "rcu_led0_rw", - "1000", - "rcu_mask_rw", - "1000", - "rcu_monitor_rate_rw", - "1000", - "rcu_pwr_dig_r", - "1000", - "rcu_temperature_r", - "1000", - "rcu_version_r", - "1000", - "hba_element_beamformer_delays_r", - "1000", - "hba_element_beamformer_delays_rw", - "1000", - "hba_element_led_r", - "1000", - "hba_element_led_rw", - "1000", - "hba_element_pwr_r", - "1000", - "hba_element_pwr_rw", - "1000", - "clk_enable_pwr_r", - "1000", - "clk_i2c_status_r", - "1000", - "clk_monitor_rate_rw", - "1000", - "clk_pll_error_r", - "1000", - "clk_pll_locked_r", - "1000", - "clk_translator_busy_r", - "1000", - "hba_element_lna_pwr_r", - "1000", - "hba_element_lna_pwr_rw", - "1000", - "rcu_i2c_status_r", - "1000", - "rcu_led1_r", - "1000", - "rcu_led1_rw", - "1000", - "rcu_translator_busy_r", - "1000" - ] - } - } - } - } - }, - "random_data": { - "LTS": { - "Random_Data": { - "LTS/random_data/1": { - "properties": { - "polled_attr": [ - "rnd1", - "1000", - "rnd2", - "1000", - "rnd3", - "1000", - "rnd4", - "1000", - "rnd5", - "1000", - "rnd6", - "1000", - "rnd7", - "1000", - "rnd8", - "1000", - "rnd9", - "1000", - "rnd10", - "1000", - "rnd11", - "1000", - "rnd12", - "1000", - "rnd13", - "1000", - "rnd14", - "1000", - "rnd15", - "1000", - "rnd16", - "1000", - "rnd17", - "1000", - "rnd18", - "1000", - "rnd19", - "1000", - "rnd20", - "1000", - "rnd21", - "1000", - "state", - "1000", - "status", - "1000" - ] - } - }, - "LTS/random_data/2": { - "properties": { - "polled_attr": [ - "rnd1", - "100", - "rnd2", - "100", - "rnd3", - "100", - "rnd4", - "100", - "rnd5", - "100", - "rnd6", - "100", - "rnd7", - "100", - "rnd8", - "100", - "rnd9", - "100", - "rnd10", - "100", - "rnd11", - "100", - "rnd12", - "100", - "rnd13", - "100", - "rnd14", - "100", - "rnd15", - "100", - "rnd16", - "100", - "rnd17", - "100", - "rnd18", - "100", - "rnd19", - "100", - "rnd20", - "100" - ] - } - } - } - } - }, - "SDP": { - "LTS": { - "SDP": { - "LTS/SDP/1": { - "attribute_properties": { - "SDP_mask_RW": { - "event_period": [ - "60000" - ] - }, - "State": { - "archive_period": [ - "600000" - ] - }, - "Status": { - "archive_period": [ - "600000" - ] - }, - "fpga_mask_RW": { - "archive_period": [ - "600000" - ] - }, - "fpga_scrap_R": { - "archive_period": [ - "600000" - ], - "archive_rel_change": [ - "-1", - "1" - ], - "rel_change": [ - "-1", - "1" - ] - }, - "fpga_scrap_RW": { - "archive_period": [ - "600000" - ], - "archive_rel_change": [ - "-1", - "1" - ], - "rel_change": [ - "-1", - "1" - ] - }, - "fpga_status_R": { - "archive_period": [ - "600000" - ] - }, - "fpga_temp_R": { - "archive_period": [ - "600000" - ], - "archive_rel_change": [ - "-1", - "1" - ], - "rel_change": [ - "-1", - "1" - ] - }, - "fpga_version_R": { - "archive_period": [ - "600000" - ] - }, - "fpga_weights_R": { - "archive_period": [ - "600000" - ], - "archive_rel_change": [ - "-1", - "1" - ], - "rel_change": [ - "-1", - "1" - ] - }, - "fpga_weights_RW": { - "archive_period": [ - "600000" - ], - "archive_rel_change": [ - "-1", - "1" - ], - "rel_change": [ - "-1", - "1" - ] - }, - "tr_busy_R": { - "archive_period": [ - "600000" - ] - }, - "tr_reload_RW": { - "archive_period": [ - "600000" - ] - }, - "tr_tod_R": { - "archive_period": [ - "600000" - ], - "archive_rel_change": [ - "-1", - "1" - ], - "rel_change": [ - "-1", - "1" - ] - }, - "tr_uptime_R": { - "archive_period": [ - "600000" - ], - "archive_rel_change": [ - "-3600", - "3600" - ], - "rel_change": [ - "-10", - "10" - ] - } - }, - "properties": { - "OPC_Server_Name": [ - "dop36.astron.nl" - ], - "OPC_Server_Port": [ - "4840" - ], - "OPC_Time_Out": [ - "5.0" - ], - "FPGA_sdp_info_station_id_RW_default": [ - "901", - "901", - "901", - "901", - "901", - "901", - "901", - "901", - "901", - "901", - "901", - "901", - "901", - "901", - "901", - "901" - ], - "polled_attr": [ - "fpga_temp_r", - "1000", - "state", - "1000", - "status", - "1000", - "fpga_mask_rw", - "1000", - "fpga_scrap_r", - "1000", - "fpga_scrap_rw", - "1000", - "fpga_status_r", - "1000", - "fpga_version_r", - "1000", - "fpga_weights_r", - "1000", - "fpga_weights_rw", - "1000", - "tr_busy_r", - "1000", - "tr_reload_rw", - "1000", - "tr_tod_r", - "1000", - "tr_uptime_r", - "1000" - ] - } - } - } - } - }, - "SST": { - "LTS": { - "SST": { - "LTS/SST/1": { - "properties": { - "Statistics_Client_UDP_Port": [ - "5001" - ], - "Statistics_Client_TCP_Port": [ - "5101" - ], - "OPC_Server_Name": [ - "dop36.astron.nl" - ], - "OPC_Server_Port": [ - "4840" - ], - "OPC_Time_Out": [ - "5.0" - ], - "FPGA_sst_offload_hdr_eth_destination_mac_RW_default": [ - "6c:2b:59:97:be:dd", - "6c:2b:59:97:be:dd", - "6c:2b:59:97:be:dd", - "6c:2b:59:97:be:dd", - "6c:2b:59:97:be:dd", - "6c:2b:59:97:be:dd", - "6c:2b:59:97:be:dd", - "6c:2b:59:97:be:dd", - "6c:2b:59:97:be:dd", - "6c:2b:59:97:be:dd", - "6c:2b:59:97:be:dd", - "6c:2b:59:97:be:dd", - "6c:2b:59:97:be:dd", - "6c:2b:59:97:be:dd", - "6c:2b:59:97:be:dd", - "6c:2b:59:97:be:dd" - ], - "FPGA_sst_offload_hdr_ip_destination_address_RW_default": [ - "10.99.250.250", - "10.99.250.250", - "10.99.250.250", - "10.99.250.250", - "10.99.250.250", - "10.99.250.250", - "10.99.250.250", - "10.99.250.250", - "10.99.250.250", - "10.99.250.250", - "10.99.250.250", - "10.99.250.250", - "10.99.250.250", - "10.99.250.250", - "10.99.250.250", - "10.99.250.250" - ], - "FPGA_sst_offload_hdr_udp_destination_port_RW_default": [ - "5001", - "5001", - "5001", - "5001", - "5001", - "5001", - "5001", - "5001", - "5001", - "5001", - "5001", - "5001", - "5001", - "5001", - "5001", - "5001" - ] - } - } - } - } - }, - "XST": { - "LTS": { - "XST": { - "LTS/XST/1": { - "properties": { - "Statistics_Client_UDP_Port": [ - "5002" - ], - "Statistics_Client_TCP_Port": [ - "5102" - ], - "OPC_Server_Name": [ - "dop36.astron.nl" - ], - "OPC_Server_Port": [ - "4840" - ], - "OPC_Time_Out": [ - "5.0" - ], - "FPGA_xst_offload_hdr_eth_destination_mac_RW_default": [ - "6c:2b:59:97:be:dd", - "6c:2b:59:97:be:dd", - "6c:2b:59:97:be:dd", - "6c:2b:59:97:be:dd", - "6c:2b:59:97:be:dd", - "6c:2b:59:97:be:dd", - "6c:2b:59:97:be:dd", - "6c:2b:59:97:be:dd", - "6c:2b:59:97:be:dd", - "6c:2b:59:97:be:dd", - "6c:2b:59:97:be:dd", - "6c:2b:59:97:be:dd", - "6c:2b:59:97:be:dd", - "6c:2b:59:97:be:dd", - "6c:2b:59:97:be:dd", - "6c:2b:59:97:be:dd" - ], - "FPGA_xst_offload_hdr_ip_destination_address_RW_default": [ - "10.99.250.250", - "10.99.250.250", - "10.99.250.250", - "10.99.250.250", - "10.99.250.250", - "10.99.250.250", - "10.99.250.250", - "10.99.250.250", - "10.99.250.250", - "10.99.250.250", - "10.99.250.250", - "10.99.250.250", - "10.99.250.250", - "10.99.250.250", - "10.99.250.250", - "10.99.250.250" - ], - "FPGA_xst_offload_hdr_udp_destination_port_RW_default": [ - "5002", - "5002", - "5002", - "5002", - "5002", - "5002", - "5002", - "5002", - "5002", - "5002", - "5002", - "5002", - "5002", - "5002", - "5002", - "5002" - ] - } - } - } - } - }, - "UNB2": { - "LTS": { - "UNB2": { - "LTS/UNB2/1": { - "properties": { - "OPC_Server_Name": [ - "despi.astron.nl" - ], - "OPC_Server_Port": [ - "4842" - ], - "OPC_Time_Out": [ - "5.0" - ] - } - } - } - } - }, - "StatsCrosslet": { - "CS997": { - "StatsCrosslet": { - "opc-ua/test-crossletstats/1": { - "attribute_properties": { - "visibilities_imag": { - "archive_rel_change": [ - "-0.1", - "0.1" - ], - "rel_change": [ - "-0.1", - "0.1" - ] - }, - "visibilities_real": { - "archive_rel_change": [ - "-0.1", - "0.1" - ], - "rel_change": [ - "-0.1", - "0.1" - ] - } - }, - "properties": { - "polled_attr": [ - "integration_time", - "0", - "pause_time", - "0", - "rcu_modes", - "0", - "state", - "0", - "status", - "0", - "subband", - "0", - "time_stamp", - "0", - "visibilities_imag", - "0", - "visibilities_real", - "0" - ] - } - } - } - } - } - } -} +{ + "servers": { + "docker_device": { + "LTS": { + "Docker": { + "LTS/Docker/1": {} + } + } + }, + "Femto": { + "CS999": { + "Femto": { + "opc-ua/test-femto/1": {} + } + } + }, + "observation_control": { + "LTS": { + "ObservationControl": { + "LTS/ObservationControl/1": {} + } + } + }, + "boot": { + "LTS": { + "Boot": { + "LTS/Boot/1": {} + } + } + }, + "APSCT": { + "LTS": { + "APSCT": { + "LTS/APSCT/1": { + "properties": { + } + } + } + } + }, + "APSPU": { + "LTS": { + "APSPU": { + "LTS/APSPU/1": { + "properties": { + } + } + } + } + }, + "RECV": { + "LTS": { + "RECV": { + "LTS/RECV/1": { + "attribute_properties": { + "Ant_mask_RW": { + "archive_period": [ + "600000" + ] + }, + "CLK_Enable_PWR_R": { + "archive_period": [ + "600000" + ] + }, + "CLK_I2C_STATUS_R": { + "archive_period": [ + "600000" + ], + "archive_rel_change": [ + "-1", + "1" + ], + "rel_change": [ + "-1", + "1" + ] + }, + "CLK_PLL_error_R": { + "archive_period": [ + "600000" + ] + }, + "CLK_PLL_locked_R": { + "archive_period": [ + "600000" + ] + }, + "CLK_monitor_rate_RW": { + "archive_period": [ + "600000" + ], + "archive_rel_change": [ + "-1", + "1" + ], + "rel_change": [ + "-1", + "1" + ] + }, + "CLK_translator_busy_R": { + "archive_period": [ + "600000" + ] + }, + "HBA_element_LNA_pwr_R": { + "archive_period": [ + "600000" + ], + "archive_rel_change": [ + "-1", + "1" + ], + "rel_change": [ + "-1", + "1" + ] + }, + "HBA_element_LNA_pwr_RW": { + "archive_period": [ + "600000" + ], + "archive_rel_change": [ + "-1", + "1" + ], + "rel_change": [ + "-1", + "1" + ] + }, + "HBA_element_beamformer_delays_R": { + "archive_period": [ + "600000" + ], + "archive_rel_change": [ + "-1", + "1" + ], + "rel_change": [ + "-1", + "1" + ] + }, + "HBA_element_beamformer_delays_RW": { + "archive_period": [ + "600000" + ], + "archive_rel_change": [ + "-1", + "1" + ], + "rel_change": [ + "-1", + "1" + ] + }, + "HBA_element_led_R": { + "archive_period": [ + "600000" + ], + "archive_rel_change": [ + "-1", + "1" + ], + "rel_change": [ + "-1", + "1" + ] + }, + "HBA_element_led_RW": { + "archive_period": [ + "600000" + ], + "archive_rel_change": [ + "-1", + "1" + ], + "rel_change": [ + "-1", + "1" + ] + }, + "HBA_element_pwr_R": { + "archive_period": [ + "600000" + ], + "archive_rel_change": [ + "-1", + "1" + ], + "rel_change": [ + "-1", + "1" + ] + }, + "HBA_element_pwr_RW": { + "archive_period": [ + "600000" + ], + "archive_rel_change": [ + "-1", + "1" + ], + "rel_change": [ + "-1", + "1" + ] + }, + "RCU_ADC_lock_R": { + "archive_period": [ + "600000" + ], + "archive_rel_change": [ + "-1", + "1" + ], + "rel_change": [ + "-1", + "1" + ] + }, + "RCU_I2C_STATUS_R": { + "archive_period": [ + "600000" + ], + "archive_rel_change": [ + "-1", + "1" + ], + "rel_change": [ + "-1", + "1" + ] + }, + "RCU_ID_R": { + "archive_period": [ + "600000" + ], + "archive_rel_change": [ + "-1", + "1" + ], + "rel_change": [ + "-1", + "1" + ] + }, + "RCU_LED0_R": { + "archive_period": [ + "600000" + ] + }, + "RCU_LED0_RW": { + "archive_period": [ + "600000" + ] + }, + "RCU_LED1_R": { + "archive_period": [ + "600000" + ] + }, + "RCU_LED1_RW": { + "archive_period": [ + "600000" + ] + }, + "RCU_Pwr_dig_R": { + "archive_period": [ + "600000" + ] + }, + "RCU_attenuator_R": { + "archive_period": [ + "600000" + ], + "archive_rel_change": [ + "-1", + "1" + ], + "rel_change": [ + "-1", + "1" + ] + }, + "RCU_attenuator_RW": { + "archive_period": [ + "600000" + ], + "archive_rel_change": [ + "-1", + "1" + ], + "rel_change": [ + "-1", + "1" + ] + }, + "RCU_band_R": { + "archive_period": [ + "600000" + ], + "archive_rel_change": [ + "-1", + "1" + ], + "rel_change": [ + "-1", + "1" + ] + }, + "RCU_band_RW": { + "archive_period": [ + "600000" + ], + "archive_rel_change": [ + "-1", + "1" + ], + "rel_change": [ + "-1", + "1" + ] + }, + "RCU_mask_RW": { + "archive_period": [ + "600000" + ] + }, + "RCU_monitor_rate_RW": { + "archive_period": [ + "600000" + ], + "archive_rel_change": [ + "-1.0", + "1.0" + ], + "rel_change": [ + "-1.0", + "1.0" + ] + }, + "RCU_temperature_R": { + "archive_period": [ + "600000" + ], + "archive_rel_change": [ + "-1.0", + "1.0" + ], + "rel_change": [ + "-1.0", + "1.0" + ] + }, + "RCU_translator_busy_R": { + "archive_period": [ + "600000" + ] + }, + "RCU_version_R": { + "archive_period": [ + "600000" + ] + }, + "State": { + "archive_period": [ + "600000" + ], + "event_period": [ + "0" + ] + }, + "Status": { + "archive_period": [ + "600000" + ], + "event_period": [ + "0" + ] + } + }, + "properties": { + "polled_attr": [ + "state", + "1000", + "status", + "1000", + "ant_mask_rw", + "1000", + "rcu_adc_lock_r", + "1000", + "rcu_attenuator_r", + "1000", + "rcu_attenuator_rw", + "1000", + "rcu_band_r", + "1000", + "rcu_band_rw", + "1000", + "rcu_id_r", + "1000", + "rcu_led0_r", + "1000", + "rcu_led0_rw", + "1000", + "rcu_mask_rw", + "1000", + "rcu_monitor_rate_rw", + "1000", + "rcu_pwr_dig_r", + "1000", + "rcu_temperature_r", + "1000", + "rcu_version_r", + "1000", + "hba_element_beamformer_delays_r", + "1000", + "hba_element_beamformer_delays_rw", + "1000", + "hba_element_led_r", + "1000", + "hba_element_led_rw", + "1000", + "hba_element_pwr_r", + "1000", + "hba_element_pwr_rw", + "1000", + "clk_enable_pwr_r", + "1000", + "clk_i2c_status_r", + "1000", + "clk_monitor_rate_rw", + "1000", + "clk_pll_error_r", + "1000", + "clk_pll_locked_r", + "1000", + "clk_translator_busy_r", + "1000", + "hba_element_lna_pwr_r", + "1000", + "hba_element_lna_pwr_rw", + "1000", + "rcu_i2c_status_r", + "1000", + "rcu_led1_r", + "1000", + "rcu_led1_rw", + "1000", + "rcu_translator_busy_r", + "1000" + ] + } + } + } + } + }, + "random_data": { + "LTS": { + "Random_Data": { + "LTS/random_data/1": { + "properties": { + "polled_attr": [ + "rnd1", + "1000", + "rnd2", + "1000", + "rnd3", + "1000", + "rnd4", + "1000", + "rnd5", + "1000", + "rnd6", + "1000", + "rnd7", + "1000", + "rnd8", + "1000", + "rnd9", + "1000", + "rnd10", + "1000", + "rnd11", + "1000", + "rnd12", + "1000", + "rnd13", + "1000", + "rnd14", + "1000", + "rnd15", + "1000", + "rnd16", + "1000", + "rnd17", + "1000", + "rnd18", + "1000", + "rnd19", + "1000", + "rnd20", + "1000", + "rnd21", + "1000", + "state", + "1000", + "status", + "1000" + ] + } + }, + "LTS/random_data/2": { + "properties": { + "polled_attr": [ + "rnd1", + "100", + "rnd2", + "100", + "rnd3", + "100", + "rnd4", + "100", + "rnd5", + "100", + "rnd6", + "100", + "rnd7", + "100", + "rnd8", + "100", + "rnd9", + "100", + "rnd10", + "100", + "rnd11", + "100", + "rnd12", + "100", + "rnd13", + "100", + "rnd14", + "100", + "rnd15", + "100", + "rnd16", + "100", + "rnd17", + "100", + "rnd18", + "100", + "rnd19", + "100", + "rnd20", + "100" + ] + } + } + } + } + }, + "SDP": { + "LTS": { + "SDP": { + "LTS/SDP/1": { + "attribute_properties": { + "SDP_mask_RW": { + "event_period": [ + "60000" + ] + }, + "State": { + "archive_period": [ + "600000" + ] + }, + "Status": { + "archive_period": [ + "600000" + ] + }, + "fpga_mask_RW": { + "archive_period": [ + "600000" + ] + }, + "fpga_scrap_R": { + "archive_period": [ + "600000" + ], + "archive_rel_change": [ + "-1", + "1" + ], + "rel_change": [ + "-1", + "1" + ] + }, + "fpga_scrap_RW": { + "archive_period": [ + "600000" + ], + "archive_rel_change": [ + "-1", + "1" + ], + "rel_change": [ + "-1", + "1" + ] + }, + "fpga_status_R": { + "archive_period": [ + "600000" + ] + }, + "fpga_temp_R": { + "archive_period": [ + "600000" + ], + "archive_rel_change": [ + "-1", + "1" + ], + "rel_change": [ + "-1", + "1" + ] + }, + "fpga_version_R": { + "archive_period": [ + "600000" + ] + }, + "fpga_weights_R": { + "archive_period": [ + "600000" + ], + "archive_rel_change": [ + "-1", + "1" + ], + "rel_change": [ + "-1", + "1" + ] + }, + "fpga_weights_RW": { + "archive_period": [ + "600000" + ], + "archive_rel_change": [ + "-1", + "1" + ], + "rel_change": [ + "-1", + "1" + ] + }, + "tr_busy_R": { + "archive_period": [ + "600000" + ] + }, + "tr_reload_RW": { + "archive_period": [ + "600000" + ] + }, + "tr_tod_R": { + "archive_period": [ + "600000" + ], + "archive_rel_change": [ + "-1", + "1" + ], + "rel_change": [ + "-1", + "1" + ] + }, + "tr_uptime_R": { + "archive_period": [ + "600000" + ], + "archive_rel_change": [ + "-3600", + "3600" + ], + "rel_change": [ + "-10", + "10" + ] + } + }, + "properties": { + "polled_attr": [ + "fpga_temp_r", + "1000", + "state", + "1000", + "status", + "1000", + "fpga_mask_rw", + "1000", + "fpga_scrap_r", + "1000", + "fpga_scrap_rw", + "1000", + "fpga_status_r", + "1000", + "fpga_version_r", + "1000", + "fpga_weights_r", + "1000", + "fpga_weights_rw", + "1000", + "tr_busy_r", + "1000", + "tr_reload_rw", + "1000", + "tr_tod_r", + "1000", + "tr_uptime_r", + "1000" + ] + } + } + } + } + }, + "SST": { + "LTS": { + "SST": { + "LTS/SST/1": { + "properties": { + "Statistics_Client_UDP_Port": [ + "5001" + ], + "Statistics_Client_TCP_Port": [ + "5101" + ], + "FPGA_sst_offload_hdr_udp_destination_port_RW_default": [ + "5001", + "5001", + "5001", + "5001", + "5001", + "5001", + "5001", + "5001", + "5001", + "5001", + "5001", + "5001", + "5001", + "5001", + "5001", + "5001" + ] + } + } + } + } + }, + "XST": { + "LTS": { + "XST": { + "LTS/XST/1": { + "properties": { + "Statistics_Client_UDP_Port": [ + "5002" + ], + "Statistics_Client_TCP_Port": [ + "5102" + ], + "FPGA_xst_offload_hdr_udp_destination_port_RW_default": [ + "5002", + "5002", + "5002", + "5002", + "5002", + "5002", + "5002", + "5002", + "5002", + "5002", + "5002", + "5002", + "5002", + "5002", + "5002", + "5002" + ] + } + } + } + } + }, + "UNB2": { + "LTS": { + "UNB2": { + "LTS/UNB2/1": { + "properties": { + } + } + } + } + }, + "StatsCrosslet": { + "CS997": { + "StatsCrosslet": { + "opc-ua/test-crossletstats/1": { + "attribute_properties": { + "visibilities_imag": { + "archive_rel_change": [ + "-0.1", + "0.1" + ], + "rel_change": [ + "-0.1", + "0.1" + ] + }, + "visibilities_real": { + "archive_rel_change": [ + "-0.1", + "0.1" + ], + "rel_change": [ + "-0.1", + "0.1" + ] + } + }, + "properties": { + "polled_attr": [ + "integration_time", + "0", + "pause_time", + "0", + "rcu_modes", + "0", + "state", + "0", + "status", + "0", + "subband", + "0", + "time_stamp", + "0", + "visibilities_imag", + "0", + "visibilities_real", + "0" + ] + } + } + } + } + } + } +} diff --git a/CDB/MAXIV-ConfigDb.json b/CDB/MAXIV-ConfigDb.json index 5c4c63a977632948cb6351169902d4654fe376ae..2087ec3feb67a7ed362fd415a9ab4c654d6741f6 100644 --- a/CDB/MAXIV-ConfigDb.json +++ b/CDB/MAXIV-ConfigDb.json @@ -1,24 +1,24 @@ -{ - "servers": { - "Femto": { - "TangoRestServer": { - "tango-rest": { - "TangoRestServer": { - "tango-rest/rest/0": { - "properties": { - "TANGO_DB": [ - "tango://databaseds:10000/sys/database/2" - ], - "TOMCAT_AUTH_METHOD": [ - "plain" - ], - "TOMCAT_PORT": [ - "8080" - ] - } - } - } - } - } - } -} +{ + "servers": { + "Femto": { + "TangoRestServer": { + "tango-rest": { + "TangoRestServer": { + "tango-rest/rest/0": { + "properties": { + "TANGO_DB": [ + "tango://databaseds:10000/sys/database/2" + ], + "TOMCAT_AUTH_METHOD": [ + "plain" + ], + "TOMCAT_PORT": [ + "8080" + ] + } + } + } + } + } + } +} diff --git a/CDB/default_ConfigDb.json b/CDB/default_ConfigDb.json index 52e0cb91f9c04a2a6fd732ae859c5c619a5e8c7b..a33ece273af53c2a3934b49b4d1d09b539ae0dc8 100644 --- a/CDB/default_ConfigDb.json +++ b/CDB/default_ConfigDb.json @@ -1,80 +1,80 @@ -{ - "servers": { - "DataBaseds": { - "2": { - "DataBase": { - "sys/database/2": {} - } - } - }, - "TangoAccessControl": { - "1": { - "TangoAccessControl": { - "sys/access_control/1": {} - } - } - }, - "TangoRestServer": { - "rest": { - "TangoRestServer": { - "sys/rest/0": {} - } - } - }, - "TangoTest": { - "test": { - "TangoTest": { - "sys/tg_test/1": {} - } - } - }, - "hdbppcm-srv": { - "01": { - "HdbConfigurationManager": { - "archiving/hdbpp/confmanager01": { - "properties": { - "ArchiverList": [ - "archiving/hdbpp/eventsubscriber01" - ], - "LibConfiguration": [ - "host=archiver-maria-db", - "libname=libhdb++mysql.so.6", - "dbname=hdbpp", - "port=3306", - "user=tango", - "password=tango" - ], - "MaxSearchSize": [ - "1000" - ] - } - } - } - } - }, - "hdbppes-srv": { - "01": { - "HdbEventSubscriber": { - "archiving/hdbpp/eventsubscriber01": { - "properties": { - "CheckPeriodicTimeoutDelay": [ - "5" - ], - "LibConfiguration": [ - "host=archiver-maria-db", - "libname=libhdb++mysql.so.6", - "dbname=hdbpp", - "port=3306", - "user=tango", - "password=tango" - ], - "PollingThreadPeriod": [ - "3" - ] - } - } - } - } - } - } -} +{ + "servers": { + "DataBaseds": { + "2": { + "DataBase": { + "sys/database/2": {} + } + } + }, + "TangoAccessControl": { + "1": { + "TangoAccessControl": { + "sys/access_control/1": {} + } + } + }, + "TangoRestServer": { + "rest": { + "TangoRestServer": { + "sys/rest/0": {} + } + } + }, + "TangoTest": { + "test": { + "TangoTest": { + "sys/tg_test/1": {} + } + } + }, + "hdbppcm-srv": { + "01": { + "HdbConfigurationManager": { + "archiving/hdbpp/confmanager01": { + "properties": { + "ArchiverList": [ + "archiving/hdbpp/eventsubscriber01" + ], + "LibConfiguration": [ + "host=archiver-maria-db", + "libname=libhdb++mysql.so.6", + "dbname=hdbpp", + "port=3306", + "user=tango", + "password=tango" + ], + "MaxSearchSize": [ + "1000" + ] + } + } + } + } + }, + "hdbppes-srv": { + "01": { + "HdbEventSubscriber": { + "archiving/hdbpp/eventsubscriber01": { + "properties": { + "CheckPeriodicTimeoutDelay": [ + "5" + ], + "LibConfiguration": [ + "host=archiver-maria-db", + "libname=libhdb++mysql.so.6", + "dbname=hdbpp", + "port=3306", + "user=tango", + "password=tango" + ], + "PollingThreadPeriod": [ + "3" + ] + } + } + } + } + } + } +} diff --git a/CDB/integration_ConfigDb.json b/CDB/integration_ConfigDb.json index 46e7b25bc23440689d8ac41a5c50a37f50b63baa..aa67083d5c849d9fb653726f71387d71057923a1 100644 --- a/CDB/integration_ConfigDb.json +++ b/CDB/integration_ConfigDb.json @@ -1,5 +1,43 @@ { "servers": { + "APSCT": { + "LTS": { + "APSCT": { + "LTS/APSCT/1": { + "properties": { + "OPC_Server_Name": [ + "apsct-sim" + ], + "OPC_Server_Port": [ + "4843" + ], + "OPC_Time_Out": [ + "5.0" + ] + } + } + } + } + }, + "APSPU": { + "LTS": { + "APSPU": { + "LTS/APSPU/1": { + "properties": { + "OPC_Server_Name": [ + "apspu-sim" + ], + "OPC_Server_Port": [ + "4843" + ], + "OPC_Time_Out": [ + "5.0" + ] + } + } + } + } + }, "RECV": { "LTS": { "RECV": { @@ -9,7 +47,7 @@ "recv-sim" ], "OPC_Server_Port": [ - "4843" + "4840" ], "OPC_Time_Out": [ "5.0" @@ -253,7 +291,7 @@ "unb2-sim" ], "OPC_Server_Port": [ - "4844" + "4841" ], "OPC_Time_Out": [ "5.0" diff --git a/CDB/jasper_ConfigDb.json b/CDB/jasper_ConfigDb.json index b8ce969d8a47e9b5ebba6402f29a84579c88bebd..8455c1859e4a122f38b95be929c81a3af164aede 100644 --- a/CDB/jasper_ConfigDb.json +++ b/CDB/jasper_ConfigDb.json @@ -1,816 +1,816 @@ -{ - "servers": { - "Femto": { - "CS999": { - "Femto": { - "opc-ua/test-femto/1": {} - } - } - }, - "observation_control": { - "LTS": { - "ObservationControl": { - "LTS/ObservationControl/1": {} - } - } - }, - "RECV": { - "LTS": { - "RECV": { - "LTS/RECV/1": { - "attribute_properties": { - "Ant_mask_RW": { - "archive_period": [ - "600000" - ] - }, - "CLK_Enable_PWR_R": { - "archive_period": [ - "600000" - ] - }, - "CLK_I2C_STATUS_R": { - "archive_period": [ - "600000" - ], - "archive_rel_change": [ - "-1", - "1" - ], - "rel_change": [ - "-1", - "1" - ] - }, - "CLK_PLL_error_R": { - "archive_period": [ - "600000" - ] - }, - "CLK_PLL_locked_R": { - "archive_period": [ - "600000" - ] - }, - "CLK_monitor_rate_RW": { - "archive_period": [ - "600000" - ], - "archive_rel_change": [ - "-1", - "1" - ], - "rel_change": [ - "-1", - "1" - ] - }, - "CLK_translator_busy_R": { - "archive_period": [ - "600000" - ] - }, - "HBA_element_LNA_pwr_R": { - "archive_period": [ - "600000" - ], - "archive_rel_change": [ - "-1", - "1" - ], - "rel_change": [ - "-1", - "1" - ] - }, - "HBA_element_LNA_pwr_RW": { - "archive_period": [ - "600000" - ], - "archive_rel_change": [ - "-1", - "1" - ], - "rel_change": [ - "-1", - "1" - ] - }, - "HBA_element_beamformer_delays_R": { - "archive_period": [ - "600000" - ], - "archive_rel_change": [ - "-1", - "1" - ], - "rel_change": [ - "-1", - "1" - ] - }, - "HBA_element_beamformer_delays_RW": { - "archive_period": [ - "600000" - ], - "archive_rel_change": [ - "-1", - "1" - ], - "rel_change": [ - "-1", - "1" - ] - }, - "HBA_element_led_R": { - "archive_period": [ - "600000" - ], - "archive_rel_change": [ - "-1", - "1" - ], - "rel_change": [ - "-1", - "1" - ] - }, - "HBA_element_led_RW": { - "archive_period": [ - "600000" - ], - "archive_rel_change": [ - "-1", - "1" - ], - "rel_change": [ - "-1", - "1" - ] - }, - "HBA_element_pwr_R": { - "archive_period": [ - "600000" - ], - "archive_rel_change": [ - "-1", - "1" - ], - "rel_change": [ - "-1", - "1" - ] - }, - "HBA_element_pwr_RW": { - "archive_period": [ - "600000" - ], - "archive_rel_change": [ - "-1", - "1" - ], - "rel_change": [ - "-1", - "1" - ] - }, - "RCU_ADC_lock_R": { - "archive_period": [ - "600000" - ], - "archive_rel_change": [ - "-1", - "1" - ], - "rel_change": [ - "-1", - "1" - ] - }, - "RCU_I2C_STATUS_R": { - "archive_period": [ - "600000" - ], - "archive_rel_change": [ - "-1", - "1" - ], - "rel_change": [ - "-1", - "1" - ] - }, - "RCU_ID_R": { - "archive_period": [ - "600000" - ], - "archive_rel_change": [ - "-1", - "1" - ], - "rel_change": [ - "-1", - "1" - ] - }, - "RCU_LED0_R": { - "archive_period": [ - "600000" - ] - }, - "RCU_LED0_RW": { - "archive_period": [ - "600000" - ] - }, - "RCU_LED1_R": { - "archive_period": [ - "600000" - ] - }, - "RCU_LED1_RW": { - "archive_period": [ - "600000" - ] - }, - "RCU_Pwr_dig_R": { - "archive_period": [ - "600000" - ] - }, - "RCU_attenuator_R": { - "archive_period": [ - "600000" - ], - "archive_rel_change": [ - "-1", - "1" - ], - "rel_change": [ - "-1", - "1" - ] - }, - "RCU_attenuator_RW": { - "archive_period": [ - "600000" - ], - "archive_rel_change": [ - "-1", - "1" - ], - "rel_change": [ - "-1", - "1" - ] - }, - "RCU_band_R": { - "archive_period": [ - "600000" - ], - "archive_rel_change": [ - "-1", - "1" - ], - "rel_change": [ - "-1", - "1" - ] - }, - "RCU_band_RW": { - "archive_period": [ - "600000" - ], - "archive_rel_change": [ - "-1", - "1" - ], - "rel_change": [ - "-1", - "1" - ] - }, - "RCU_mask_RW": { - "archive_period": [ - "600000" - ] - }, - "RCU_monitor_rate_RW": { - "archive_period": [ - "600000" - ], - "archive_rel_change": [ - "-1.0", - "1.0" - ], - "rel_change": [ - "-1.0", - "1.0" - ] - }, - "RCU_temperature_R": { - "archive_period": [ - "600000" - ], - "archive_rel_change": [ - "-1.0", - "1.0" - ], - "rel_change": [ - "-1.0", - "1.0" - ] - }, - "RCU_translator_busy_R": { - "archive_period": [ - "600000" - ] - }, - "RCU_version_R": { - "archive_period": [ - "600000" - ] - }, - "State": { - "archive_period": [ - "600000" - ], - "event_period": [ - "0" - ] - }, - "Status": { - "archive_period": [ - "600000" - ], - "event_period": [ - "0" - ] - } - }, - "properties": { - "OPC_Server_Name": [ - "ltspi.astron.nl" - ], - "OPC_Server_Port": [ - "4842" - ], - "OPC_Time_Out": [ - "5.0" - ], - "polled_attr": [ - "state", - "1000", - "status", - "1000", - "ant_mask_rw", - "1000", - "rcu_adc_lock_r", - "1000", - "rcu_attenuator_r", - "1000", - "rcu_attenuator_rw", - "1000", - "rcu_band_r", - "1000", - "rcu_band_rw", - "1000", - "rcu_id_r", - "1000", - "rcu_led0_r", - "1000", - "rcu_led0_rw", - "1000", - "rcu_mask_rw", - "1000", - "rcu_monitor_rate_rw", - "1000", - "rcu_pwr_dig_r", - "1000", - "rcu_temperature_r", - "1000", - "rcu_version_r", - "1000", - "hba_element_beamformer_delays_r", - "1000", - "hba_element_beamformer_delays_rw", - "1000", - "hba_element_led_r", - "1000", - "hba_element_led_rw", - "1000", - "hba_element_pwr_r", - "1000", - "hba_element_pwr_rw", - "1000", - "clk_enable_pwr_r", - "1000", - "clk_i2c_status_r", - "1000", - "clk_monitor_rate_rw", - "1000", - "clk_pll_error_r", - "1000", - "clk_pll_locked_r", - "1000", - "clk_translator_busy_r", - "1000", - "hba_element_lna_pwr_r", - "1000", - "hba_element_lna_pwr_rw", - "1000", - "rcu_i2c_status_r", - "1000", - "rcu_led1_r", - "1000", - "rcu_led1_rw", - "1000", - "rcu_translator_busy_r", - "1000" - ] - } - } - } - } - }, - "random_data": { - "LTS": { - "Random_Data": { - "LTS/random_data/1": { - "properties": { - "polled_attr": [ - "rnd1", - "1000", - "rnd2", - "1000", - "rnd3", - "1000", - "rnd4", - "1000", - "rnd5", - "1000", - "rnd6", - "1000", - "rnd7", - "1000", - "rnd8", - "1000", - "rnd9", - "1000", - "rnd10", - "1000", - "rnd11", - "1000", - "rnd12", - "1000", - "rnd13", - "1000", - "rnd14", - "1000", - "rnd15", - "1000", - "rnd16", - "1000", - "rnd17", - "1000", - "rnd18", - "1000", - "rnd19", - "1000", - "rnd20", - "1000", - "rnd21", - "1000", - "state", - "1000", - "status", - "1000" - ] - } - }, - "LTS/random_data/2": { - "properties": { - "polled_attr": [ - "rnd1", - "100", - "rnd2", - "100", - "rnd3", - "100", - "rnd4", - "100", - "rnd5", - "100", - "rnd6", - "100", - "rnd7", - "100", - "rnd8", - "100", - "rnd9", - "100", - "rnd10", - "100", - "rnd11", - "100", - "rnd12", - "100", - "rnd13", - "100", - "rnd14", - "100", - "rnd15", - "100", - "rnd16", - "100", - "rnd17", - "100", - "rnd18", - "100", - "rnd19", - "100", - "rnd20", - "100" - ] - } - } - } - } - }, - "SDP": { - "LTS": { - "SDP": { - "LTS/SDP/1": { - "attribute_properties": { - "SDP_mask_RW": { - "event_period": [ - "60000" - ] - }, - "State": { - "archive_period": [ - "600000" - ] - }, - "Status": { - "archive_period": [ - "600000" - ] - }, - "fpga_mask_RW": { - "archive_period": [ - "600000" - ] - }, - "fpga_scrap_R": { - "archive_period": [ - "600000" - ], - "archive_rel_change": [ - "-1", - "1" - ], - "rel_change": [ - "-1", - "1" - ] - }, - "fpga_scrap_RW": { - "archive_period": [ - "600000" - ], - "archive_rel_change": [ - "-1", - "1" - ], - "rel_change": [ - "-1", - "1" - ] - }, - "fpga_status_R": { - "archive_period": [ - "600000" - ] - }, - "fpga_temp_R": { - "archive_period": [ - "600000" - ], - "archive_rel_change": [ - "-1", - "1" - ], - "rel_change": [ - "-1", - "1" - ] - }, - "fpga_version_R": { - "archive_period": [ - "600000" - ] - }, - "fpga_weights_R": { - "archive_period": [ - "600000" - ], - "archive_rel_change": [ - "-1", - "1" - ], - "rel_change": [ - "-1", - "1" - ] - }, - "fpga_weights_RW": { - "archive_period": [ - "600000" - ], - "archive_rel_change": [ - "-1", - "1" - ], - "rel_change": [ - "-1", - "1" - ] - }, - "tr_busy_R": { - "archive_period": [ - "600000" - ] - }, - "tr_reload_RW": { - "archive_period": [ - "600000" - ] - }, - "tr_tod_R": { - "archive_period": [ - "600000" - ], - "archive_rel_change": [ - "-1", - "1" - ], - "rel_change": [ - "-1", - "1" - ] - }, - "tr_uptime_R": { - "archive_period": [ - "600000" - ], - "archive_rel_change": [ - "-3600", - "3600" - ], - "rel_change": [ - "-10", - "10" - ] - } - }, - "properties": { - "OPC_Server_Name": [ - "dop36.astron.nl" - ], - "OPC_Server_Port": [ - "4840" - ], - "OPC_Time_Out": [ - "5.0" - ], - "polled_attr": [ - "fpga_temp_r", - "1000", - "state", - "1000", - "status", - "1000", - "fpga_mask_rw", - "1000", - "fpga_scrap_r", - "1000", - "fpga_scrap_rw", - "1000", - "fpga_status_r", - "1000", - "fpga_version_r", - "1000", - "fpga_weights_r", - "1000", - "fpga_weights_rw", - "1000", - "tr_busy_r", - "1000", - "tr_reload_rw", - "1000", - "tr_tod_r", - "1000", - "tr_uptime_r", - "1000" - ] - } - } - } - } - }, - "SST": { - "LTS": { - "SST": { - "LTS/SST/1": { - "properties": { - "Statistics_Client_Port": [ - "5001" - ], - "OPC_Server_Name": [ - "dop36.astron.nl" - ], - "OPC_Server_Port": [ - "4840" - ], - "OPC_Time_Out": [ - "5.0" - ] - } - } - } - } - }, - "UNB2": { - "LTS": { - "UNB2": { - "LTS/UNB2/1": { - "properties": { - "OPC_Server_Name": [ - "despi.astron.nl" - ], - "OPC_Server_Port": [ - "4842" - ], - "OPC_Time_Out": [ - "5.0" - ] - } - } - } - } - }, - "StatsCrosslet": { - "CS997": { - "StatsCrosslet": { - "opc-ua/test-crossletstats/1": { - "attribute_properties": { - "visibilities_imag": { - "archive_rel_change": [ - "-0.1", - "0.1" - ], - "rel_change": [ - "-0.1", - "0.1" - ] - }, - "visibilities_real": { - "archive_rel_change": [ - "-0.1", - "0.1" - ], - "rel_change": [ - "-0.1", - "0.1" - ] - } - }, - "properties": { - "polled_attr": [ - "integration_time", - "0", - "pause_time", - "0", - "rcu_modes", - "0", - "state", - "0", - "status", - "0", - "subband", - "0", - "time_stamp", - "0", - "visibilities_imag", - "0", - "visibilities_real", - "0" - ] - } - } - } - } - } - } -} +{ + "servers": { + "Femto": { + "CS999": { + "Femto": { + "opc-ua/test-femto/1": {} + } + } + }, + "observation_control": { + "LTS": { + "ObservationControl": { + "LTS/ObservationControl/1": {} + } + } + }, + "RECV": { + "LTS": { + "RECV": { + "LTS/RECV/1": { + "attribute_properties": { + "Ant_mask_RW": { + "archive_period": [ + "600000" + ] + }, + "CLK_Enable_PWR_R": { + "archive_period": [ + "600000" + ] + }, + "CLK_I2C_STATUS_R": { + "archive_period": [ + "600000" + ], + "archive_rel_change": [ + "-1", + "1" + ], + "rel_change": [ + "-1", + "1" + ] + }, + "CLK_PLL_error_R": { + "archive_period": [ + "600000" + ] + }, + "CLK_PLL_locked_R": { + "archive_period": [ + "600000" + ] + }, + "CLK_monitor_rate_RW": { + "archive_period": [ + "600000" + ], + "archive_rel_change": [ + "-1", + "1" + ], + "rel_change": [ + "-1", + "1" + ] + }, + "CLK_translator_busy_R": { + "archive_period": [ + "600000" + ] + }, + "HBA_element_LNA_pwr_R": { + "archive_period": [ + "600000" + ], + "archive_rel_change": [ + "-1", + "1" + ], + "rel_change": [ + "-1", + "1" + ] + }, + "HBA_element_LNA_pwr_RW": { + "archive_period": [ + "600000" + ], + "archive_rel_change": [ + "-1", + "1" + ], + "rel_change": [ + "-1", + "1" + ] + }, + "HBA_element_beamformer_delays_R": { + "archive_period": [ + "600000" + ], + "archive_rel_change": [ + "-1", + "1" + ], + "rel_change": [ + "-1", + "1" + ] + }, + "HBA_element_beamformer_delays_RW": { + "archive_period": [ + "600000" + ], + "archive_rel_change": [ + "-1", + "1" + ], + "rel_change": [ + "-1", + "1" + ] + }, + "HBA_element_led_R": { + "archive_period": [ + "600000" + ], + "archive_rel_change": [ + "-1", + "1" + ], + "rel_change": [ + "-1", + "1" + ] + }, + "HBA_element_led_RW": { + "archive_period": [ + "600000" + ], + "archive_rel_change": [ + "-1", + "1" + ], + "rel_change": [ + "-1", + "1" + ] + }, + "HBA_element_pwr_R": { + "archive_period": [ + "600000" + ], + "archive_rel_change": [ + "-1", + "1" + ], + "rel_change": [ + "-1", + "1" + ] + }, + "HBA_element_pwr_RW": { + "archive_period": [ + "600000" + ], + "archive_rel_change": [ + "-1", + "1" + ], + "rel_change": [ + "-1", + "1" + ] + }, + "RCU_ADC_lock_R": { + "archive_period": [ + "600000" + ], + "archive_rel_change": [ + "-1", + "1" + ], + "rel_change": [ + "-1", + "1" + ] + }, + "RCU_I2C_STATUS_R": { + "archive_period": [ + "600000" + ], + "archive_rel_change": [ + "-1", + "1" + ], + "rel_change": [ + "-1", + "1" + ] + }, + "RCU_ID_R": { + "archive_period": [ + "600000" + ], + "archive_rel_change": [ + "-1", + "1" + ], + "rel_change": [ + "-1", + "1" + ] + }, + "RCU_LED0_R": { + "archive_period": [ + "600000" + ] + }, + "RCU_LED0_RW": { + "archive_period": [ + "600000" + ] + }, + "RCU_LED1_R": { + "archive_period": [ + "600000" + ] + }, + "RCU_LED1_RW": { + "archive_period": [ + "600000" + ] + }, + "RCU_Pwr_dig_R": { + "archive_period": [ + "600000" + ] + }, + "RCU_attenuator_R": { + "archive_period": [ + "600000" + ], + "archive_rel_change": [ + "-1", + "1" + ], + "rel_change": [ + "-1", + "1" + ] + }, + "RCU_attenuator_RW": { + "archive_period": [ + "600000" + ], + "archive_rel_change": [ + "-1", + "1" + ], + "rel_change": [ + "-1", + "1" + ] + }, + "RCU_band_R": { + "archive_period": [ + "600000" + ], + "archive_rel_change": [ + "-1", + "1" + ], + "rel_change": [ + "-1", + "1" + ] + }, + "RCU_band_RW": { + "archive_period": [ + "600000" + ], + "archive_rel_change": [ + "-1", + "1" + ], + "rel_change": [ + "-1", + "1" + ] + }, + "RCU_mask_RW": { + "archive_period": [ + "600000" + ] + }, + "RCU_monitor_rate_RW": { + "archive_period": [ + "600000" + ], + "archive_rel_change": [ + "-1.0", + "1.0" + ], + "rel_change": [ + "-1.0", + "1.0" + ] + }, + "RCU_temperature_R": { + "archive_period": [ + "600000" + ], + "archive_rel_change": [ + "-1.0", + "1.0" + ], + "rel_change": [ + "-1.0", + "1.0" + ] + }, + "RCU_translator_busy_R": { + "archive_period": [ + "600000" + ] + }, + "RCU_version_R": { + "archive_period": [ + "600000" + ] + }, + "State": { + "archive_period": [ + "600000" + ], + "event_period": [ + "0" + ] + }, + "Status": { + "archive_period": [ + "600000" + ], + "event_period": [ + "0" + ] + } + }, + "properties": { + "OPC_Server_Name": [ + "ltspi.astron.nl" + ], + "OPC_Server_Port": [ + "4842" + ], + "OPC_Time_Out": [ + "5.0" + ], + "polled_attr": [ + "state", + "1000", + "status", + "1000", + "ant_mask_rw", + "1000", + "rcu_adc_lock_r", + "1000", + "rcu_attenuator_r", + "1000", + "rcu_attenuator_rw", + "1000", + "rcu_band_r", + "1000", + "rcu_band_rw", + "1000", + "rcu_id_r", + "1000", + "rcu_led0_r", + "1000", + "rcu_led0_rw", + "1000", + "rcu_mask_rw", + "1000", + "rcu_monitor_rate_rw", + "1000", + "rcu_pwr_dig_r", + "1000", + "rcu_temperature_r", + "1000", + "rcu_version_r", + "1000", + "hba_element_beamformer_delays_r", + "1000", + "hba_element_beamformer_delays_rw", + "1000", + "hba_element_led_r", + "1000", + "hba_element_led_rw", + "1000", + "hba_element_pwr_r", + "1000", + "hba_element_pwr_rw", + "1000", + "clk_enable_pwr_r", + "1000", + "clk_i2c_status_r", + "1000", + "clk_monitor_rate_rw", + "1000", + "clk_pll_error_r", + "1000", + "clk_pll_locked_r", + "1000", + "clk_translator_busy_r", + "1000", + "hba_element_lna_pwr_r", + "1000", + "hba_element_lna_pwr_rw", + "1000", + "rcu_i2c_status_r", + "1000", + "rcu_led1_r", + "1000", + "rcu_led1_rw", + "1000", + "rcu_translator_busy_r", + "1000" + ] + } + } + } + } + }, + "random_data": { + "LTS": { + "Random_Data": { + "LTS/random_data/1": { + "properties": { + "polled_attr": [ + "rnd1", + "1000", + "rnd2", + "1000", + "rnd3", + "1000", + "rnd4", + "1000", + "rnd5", + "1000", + "rnd6", + "1000", + "rnd7", + "1000", + "rnd8", + "1000", + "rnd9", + "1000", + "rnd10", + "1000", + "rnd11", + "1000", + "rnd12", + "1000", + "rnd13", + "1000", + "rnd14", + "1000", + "rnd15", + "1000", + "rnd16", + "1000", + "rnd17", + "1000", + "rnd18", + "1000", + "rnd19", + "1000", + "rnd20", + "1000", + "rnd21", + "1000", + "state", + "1000", + "status", + "1000" + ] + } + }, + "LTS/random_data/2": { + "properties": { + "polled_attr": [ + "rnd1", + "100", + "rnd2", + "100", + "rnd3", + "100", + "rnd4", + "100", + "rnd5", + "100", + "rnd6", + "100", + "rnd7", + "100", + "rnd8", + "100", + "rnd9", + "100", + "rnd10", + "100", + "rnd11", + "100", + "rnd12", + "100", + "rnd13", + "100", + "rnd14", + "100", + "rnd15", + "100", + "rnd16", + "100", + "rnd17", + "100", + "rnd18", + "100", + "rnd19", + "100", + "rnd20", + "100" + ] + } + } + } + } + }, + "SDP": { + "LTS": { + "SDP": { + "LTS/SDP/1": { + "attribute_properties": { + "SDP_mask_RW": { + "event_period": [ + "60000" + ] + }, + "State": { + "archive_period": [ + "600000" + ] + }, + "Status": { + "archive_period": [ + "600000" + ] + }, + "fpga_mask_RW": { + "archive_period": [ + "600000" + ] + }, + "fpga_scrap_R": { + "archive_period": [ + "600000" + ], + "archive_rel_change": [ + "-1", + "1" + ], + "rel_change": [ + "-1", + "1" + ] + }, + "fpga_scrap_RW": { + "archive_period": [ + "600000" + ], + "archive_rel_change": [ + "-1", + "1" + ], + "rel_change": [ + "-1", + "1" + ] + }, + "fpga_status_R": { + "archive_period": [ + "600000" + ] + }, + "fpga_temp_R": { + "archive_period": [ + "600000" + ], + "archive_rel_change": [ + "-1", + "1" + ], + "rel_change": [ + "-1", + "1" + ] + }, + "fpga_version_R": { + "archive_period": [ + "600000" + ] + }, + "fpga_weights_R": { + "archive_period": [ + "600000" + ], + "archive_rel_change": [ + "-1", + "1" + ], + "rel_change": [ + "-1", + "1" + ] + }, + "fpga_weights_RW": { + "archive_period": [ + "600000" + ], + "archive_rel_change": [ + "-1", + "1" + ], + "rel_change": [ + "-1", + "1" + ] + }, + "tr_busy_R": { + "archive_period": [ + "600000" + ] + }, + "tr_reload_RW": { + "archive_period": [ + "600000" + ] + }, + "tr_tod_R": { + "archive_period": [ + "600000" + ], + "archive_rel_change": [ + "-1", + "1" + ], + "rel_change": [ + "-1", + "1" + ] + }, + "tr_uptime_R": { + "archive_period": [ + "600000" + ], + "archive_rel_change": [ + "-3600", + "3600" + ], + "rel_change": [ + "-10", + "10" + ] + } + }, + "properties": { + "OPC_Server_Name": [ + "dop36.astron.nl" + ], + "OPC_Server_Port": [ + "4840" + ], + "OPC_Time_Out": [ + "5.0" + ], + "polled_attr": [ + "fpga_temp_r", + "1000", + "state", + "1000", + "status", + "1000", + "fpga_mask_rw", + "1000", + "fpga_scrap_r", + "1000", + "fpga_scrap_rw", + "1000", + "fpga_status_r", + "1000", + "fpga_version_r", + "1000", + "fpga_weights_r", + "1000", + "fpga_weights_rw", + "1000", + "tr_busy_r", + "1000", + "tr_reload_rw", + "1000", + "tr_tod_r", + "1000", + "tr_uptime_r", + "1000" + ] + } + } + } + } + }, + "SST": { + "LTS": { + "SST": { + "LTS/SST/1": { + "properties": { + "Statistics_Client_Port": [ + "5001" + ], + "OPC_Server_Name": [ + "dop36.astron.nl" + ], + "OPC_Server_Port": [ + "4840" + ], + "OPC_Time_Out": [ + "5.0" + ] + } + } + } + } + }, + "UNB2": { + "LTS": { + "UNB2": { + "LTS/UNB2/1": { + "properties": { + "OPC_Server_Name": [ + "despi.astron.nl" + ], + "OPC_Server_Port": [ + "4842" + ], + "OPC_Time_Out": [ + "5.0" + ] + } + } + } + } + }, + "StatsCrosslet": { + "CS997": { + "StatsCrosslet": { + "opc-ua/test-crossletstats/1": { + "attribute_properties": { + "visibilities_imag": { + "archive_rel_change": [ + "-0.1", + "0.1" + ], + "rel_change": [ + "-0.1", + "0.1" + ] + }, + "visibilities_real": { + "archive_rel_change": [ + "-0.1", + "0.1" + ], + "rel_change": [ + "-0.1", + "0.1" + ] + } + }, + "properties": { + "polled_attr": [ + "integration_time", + "0", + "pause_time", + "0", + "rcu_modes", + "0", + "state", + "0", + "status", + "0", + "subband", + "0", + "time_stamp", + "0", + "visibilities_imag", + "0", + "visibilities_real", + "0" + ] + } + } + } + } + } + } +} diff --git a/CDB/recv-sim-config.json b/CDB/recv-sim-config.json deleted file mode 100644 index e9585345e783b54e8bd21bd6e46f90692b8ee095..0000000000000000000000000000000000000000 --- a/CDB/recv-sim-config.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "servers": { - "RECV": { - "LTS": { - "RECV": { - "LTS/RECV/1": { - "properties": { - "OPC_Server_Name": [ - "recv-sim" - ], - "OPC_Server_Port": [ - "4843" - ], - "OPC_Time_Out": [ - "5.0" - ] - } - } - } - } - } - } -} diff --git a/CDB/sdp-sim-config.json b/CDB/sdp-sim-config.json deleted file mode 100644 index f733a85a6c570ccdc25646d894bace08c78e9acf..0000000000000000000000000000000000000000 --- a/CDB/sdp-sim-config.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "servers": { - "SDP": { - "LTS": { - "SDP": { - "LTS/SDP/1": { - "properties": { - "OPC_Server_Name": [ - "sdptr-sim" - ], - "OPC_Server_Port": [ - "4840" - ], - "OPC_Time_Out": [ - "5.0" - ] - } - } - } - } - }, - "SST": { - "LTS": { - "SST": { - "LTS/SST/1": { - "properties": { - "OPC_Server_Name": [ - "sdptr-sim" - ], - "OPC_Server_Port": [ - "4840" - ], - "OPC_Time_Out": [ - "5.0" - ] - } - } - } - } - }, - "XST": { - "LTS": { - "XST": { - "LTS/XST/1": { - "properties": { - "OPC_Server_Name": [ - "sdptr-sim" - ], - "OPC_Server_Port": [ - "4840" - ], - "OPC_Time_Out": [ - "5.0" - ] - } - } - } - } - } - } -} diff --git a/CDB/stations/DTS_ConfigDb.json b/CDB/stations/DTS_ConfigDb.json new file mode 100644 index 0000000000000000000000000000000000000000..48f333e2b01a05a9b2ae700cedee61e5fb396579 --- /dev/null +++ b/CDB/stations/DTS_ConfigDb.json @@ -0,0 +1,227 @@ +{ + "servers": { + "APSCT": { + "LTS": { + "APSCT": { + "LTS/APSCT/1": { + "properties": { + "OPC_Server_Name": [ + "DESPi3.nfra.nl" + ], + "OPC_Server_Port": [ + "4843" + ], + "OPC_Time_Out": [ + "5.0" + ] + } + } + } + } + }, + "APSPU": { + "LTS": { + "APSPU": { + "LTS/APSPU/1": { + "properties": { + "OPC_Server_Name": [ + "DESPi3.nfra.nl" + ], + "OPC_Server_Port": [ + "4842" + ], + "OPC_Time_Out": [ + "5.0" + ] + } + } + } + } + }, + "RECV": { + "LTS": { + "RECV": { + "LTS/RECV/1": { + "properties": { + "OPC_Server_Name": [ + "DESPi3.nfra.nl" + ], + "OPC_Server_Port": [ + "4840" + ], + "OPC_Time_Out": [ + "5.0" + ] + } + } + } + } + }, + "SDP": { + "LTS": { + "SDP": { + "LTS/SDP/1": { + "properties": { + "OPC_Server_Name": [ + "10.99.0.252" + ], + "OPC_Server_Port": [ + "4840" + ], + "OPC_Time_Out": [ + "5.0" + ], + "FPGA_sdp_info_station_id_RW_default": [ + "902", + "902", + "902", + "902", + "902", + "902", + "902", + "902", + "902", + "902", + "902", + "902", + "902", + "902", + "902", + "902" + ] + } + } + } + } + }, + "SST": { + "LTS": { + "SST": { + "LTS/SST/1": { + "properties": { + "OPC_Server_Name": [ + "10.99.0.252" + ], + "OPC_Server_Port": [ + "4840" + ], + "OPC_Time_Out": [ + "5.0" + ], + "FPGA_sst_offload_hdr_eth_destination_mac_RW_default": [ + "0c:c4:7a:c0:30:f1", + "0c:c4:7a:c0:30:f1", + "0c:c4:7a:c0:30:f1", + "0c:c4:7a:c0:30:f1", + "0c:c4:7a:c0:30:f1", + "0c:c4:7a:c0:30:f1", + "0c:c4:7a:c0:30:f1", + "0c:c4:7a:c0:30:f1", + "0c:c4:7a:c0:30:f1", + "0c:c4:7a:c0:30:f1", + "0c:c4:7a:c0:30:f1", + "0c:c4:7a:c0:30:f1", + "0c:c4:7a:c0:30:f1", + "0c:c4:7a:c0:30:f1", + "0c:c4:7a:c0:30:f1", + "0c:c4:7a:c0:30:f1" + ], + "FPGA_sst_offload_hdr_ip_destination_address_RW_default": [ + "10.99.250.250", + "10.99.250.250", + "10.99.250.250", + "10.99.250.250", + "10.99.250.250", + "10.99.250.250", + "10.99.250.250", + "10.99.250.250", + "10.99.250.250", + "10.99.250.250", + "10.99.250.250", + "10.99.250.250", + "10.99.250.250", + "10.99.250.250", + "10.99.250.250", + "10.99.250.250" + ] + } + } + } + } + }, + "XST": { + "LTS": { + "XST": { + "LTS/XST/1": { + "properties": { + "OPC_Server_Name": [ + "10.99.0.252" + ], + "OPC_Server_Port": [ + "4840" + ], + "OPC_Time_Out": [ + "5.0" + ], + "FPGA_xst_offload_hdr_eth_destination_mac_RW_default": [ + "0c:c4:7a:c0:30:f1", + "0c:c4:7a:c0:30:f1", + "0c:c4:7a:c0:30:f1", + "0c:c4:7a:c0:30:f1", + "0c:c4:7a:c0:30:f1", + "0c:c4:7a:c0:30:f1", + "0c:c4:7a:c0:30:f1", + "0c:c4:7a:c0:30:f1", + "0c:c4:7a:c0:30:f1", + "0c:c4:7a:c0:30:f1", + "0c:c4:7a:c0:30:f1", + "0c:c4:7a:c0:30:f1", + "0c:c4:7a:c0:30:f1", + "0c:c4:7a:c0:30:f1", + "0c:c4:7a:c0:30:f1", + "0c:c4:7a:c0:30:f1" + ], + "FPGA_xst_offload_hdr_ip_destination_address_RW_default": [ + "10.99.250.250", + "10.99.250.250", + "10.99.250.250", + "10.99.250.250", + "10.99.250.250", + "10.99.250.250", + "10.99.250.250", + "10.99.250.250", + "10.99.250.250", + "10.99.250.250", + "10.99.250.250", + "10.99.250.250", + "10.99.250.250", + "10.99.250.250", + "10.99.250.250", + "10.99.250.250" + ] + } + } + } + } + }, + "UNB2": { + "LTS": { + "UNB2": { + "LTS/UNB2/1": { + "properties": { + "OPC_Server_Name": [ + "DESPi3.nfra.nl" + ], + "OPC_Server_Port": [ + "4841" + ], + "OPC_Time_Out": [ + "5.0" + ] + } + } + } + } + } + } +} diff --git a/CDB/stations/LTS_ConfigDb.json b/CDB/stations/LTS_ConfigDb.json new file mode 100644 index 0000000000000000000000000000000000000000..ae87cfeaf8a1ceda043ecc3f130776fa73e944bc --- /dev/null +++ b/CDB/stations/LTS_ConfigDb.json @@ -0,0 +1,287 @@ +{ + "servers": { + "APSCT": { + "LTS": { + "APSCT": { + "LTS/APSCT/1": { + "properties": { + "OPC_Server_Name": [ + "ltspi.astron.nl" + ], + "OPC_Server_Port": [ + "4842" + ], + "OPC_Time_Out": [ + "5.0" + ], + "OPC_Node_Path_prefix": [ + "PCC" + ] + } + } + } + } + }, + "APSPU": { + "LTS": { + "APSPU": { + "LTS/APSPU/1": { + "properties": { + "OPC_Server_Name": [ + "ltspi.astron.nl" + ], + "OPC_Server_Port": [ + "4842" + ], + "OPC_Time_Out": [ + "5.0" + ], + "OPC_Node_Path_prefix": [ + "PCC" + ] + } + } + } + } + }, + "RECV": { + "LTS": { + "RECV": { + "LTS/RECV/1": { + "properties": { + "OPC_Server_Name": [ + "ltspi.astron.nl" + ], + "OPC_Server_Port": [ + "4842" + ], + "OPC_Node_Path_prefix": [ + "PCC" + ], + "OPC_Time_Out": [ + "5.0" + ] + } + } + } + } + }, + "SDP": { + "LTS": { + "SDP": { + "LTS/SDP/1": { + "properties": { + "OPC_Server_Name": [ + "dop369.astron.nl" + ], + "OPC_Server_Port": [ + "4840" + ], + "OPC_Time_Out": [ + "5.0" + ], + "FPGA_sdp_info_station_id_RW_default": [ + "901", + "901", + "901", + "901", + "901", + "901", + "901", + "901", + "901", + "901", + "901", + "901", + "901", + "901", + "901", + "901" + ] + } + } + } + } + }, + "SST": { + "LTS": { + "SST": { + "LTS/SST/1": { + "properties": { + "Statistics_Client_UDP_Port": [ + "5001" + ], + "Statistics_Client_TCP_Port": [ + "5101" + ], + "OPC_Server_Name": [ + "dop369.astron.nl" + ], + "OPC_Server_Port": [ + "4840" + ], + "OPC_Time_Out": [ + "5.0" + ], + "FPGA_sst_offload_hdr_eth_destination_mac_RW_default": [ + "6c:2b:59:97:be:dd", + "6c:2b:59:97:be:dd", + "6c:2b:59:97:be:dd", + "6c:2b:59:97:be:dd", + "6c:2b:59:97:be:dd", + "6c:2b:59:97:be:dd", + "6c:2b:59:97:be:dd", + "6c:2b:59:97:be:dd", + "6c:2b:59:97:be:dd", + "6c:2b:59:97:be:dd", + "6c:2b:59:97:be:dd", + "6c:2b:59:97:be:dd", + "6c:2b:59:97:be:dd", + "6c:2b:59:97:be:dd", + "6c:2b:59:97:be:dd", + "6c:2b:59:97:be:dd" + ], + "FPGA_sst_offload_hdr_ip_destination_address_RW_default": [ + "10.99.250.250", + "10.99.250.250", + "10.99.250.250", + "10.99.250.250", + "10.99.250.250", + "10.99.250.250", + "10.99.250.250", + "10.99.250.250", + "10.99.250.250", + "10.99.250.250", + "10.99.250.250", + "10.99.250.250", + "10.99.250.250", + "10.99.250.250", + "10.99.250.250", + "10.99.250.250" + ], + "FPGA_sst_offload_hdr_udp_destination_port_RW_default": [ + "5001", + "5001", + "5001", + "5001", + "5001", + "5001", + "5001", + "5001", + "5001", + "5001", + "5001", + "5001", + "5001", + "5001", + "5001", + "5001" + ] + } + } + } + } + }, + "XST": { + "LTS": { + "XST": { + "LTS/XST/1": { + "properties": { + "Statistics_Client_UDP_Port": [ + "5002" + ], + "Statistics_Client_TCP_Port": [ + "5102" + ], + "OPC_Server_Name": [ + "dop369.astron.nl" + ], + "OPC_Server_Port": [ + "4840" + ], + "OPC_Time_Out": [ + "5.0" + ], + "FPGA_xst_offload_hdr_eth_destination_mac_RW_default": [ + "6c:2b:59:97:be:dd", + "6c:2b:59:97:be:dd", + "6c:2b:59:97:be:dd", + "6c:2b:59:97:be:dd", + "6c:2b:59:97:be:dd", + "6c:2b:59:97:be:dd", + "6c:2b:59:97:be:dd", + "6c:2b:59:97:be:dd", + "6c:2b:59:97:be:dd", + "6c:2b:59:97:be:dd", + "6c:2b:59:97:be:dd", + "6c:2b:59:97:be:dd", + "6c:2b:59:97:be:dd", + "6c:2b:59:97:be:dd", + "6c:2b:59:97:be:dd", + "6c:2b:59:97:be:dd" + ], + "FPGA_xst_offload_hdr_ip_destination_address_RW_default": [ + "10.99.250.250", + "10.99.250.250", + "10.99.250.250", + "10.99.250.250", + "10.99.250.250", + "10.99.250.250", + "10.99.250.250", + "10.99.250.250", + "10.99.250.250", + "10.99.250.250", + "10.99.250.250", + "10.99.250.250", + "10.99.250.250", + "10.99.250.250", + "10.99.250.250", + "10.99.250.250" + ], + "FPGA_xst_offload_hdr_udp_destination_port_RW_default": [ + "5002", + "5002", + "5002", + "5002", + "5002", + "5002", + "5002", + "5002", + "5002", + "5002", + "5002", + "5002", + "5002", + "5002", + "5002", + "5002" + ] + } + } + } + } + }, + "UNB2": { + "LTS": { + "UNB2": { + "LTS/UNB2/1": { + "properties": { + "OPC_Server_Name": [ + "despi.astron.nl" + ], + "OPC_Server_Port": [ + "4842" + ], + "OPC_Node_Path_prefix": [ + "PCC" + ], + "OPC_Time_Out": [ + "5.0" + ] + } + } + } + } + } + } +} diff --git a/CDB/stations/simulators_configDb.json b/CDB/stations/simulators_configDb.json new file mode 100644 index 0000000000000000000000000000000000000000..7d246bdd6cbc80b7f0cc3e21110265fdc4bbd81a --- /dev/null +++ b/CDB/stations/simulators_configDb.json @@ -0,0 +1,209 @@ +{ + "servers": { + "APSCT": { + "LTS": { + "APSCT": { + "LTS/APSCT/1": { + "properties": { + "OPC_Server_Name": [ + "apsct-sim" + ], + "OPC_Server_Port": [ + "4843" + ], + "OPC_Time_Out": [ + "5.0" + ] + } + } + } + } + }, + "APSPU": { + "LTS": { + "APSPU": { + "LTS/APSPU/1": { + "properties": { + "OPC_Server_Name": [ + "apspu-sim" + ], + "OPC_Server_Port": [ + "4843" + ], + "OPC_Time_Out": [ + "5.0" + ] + } + } + } + } + }, + "RECV": { + "LTS": { + "RECV": { + "LTS/RECV/1": { + "properties": { + "OPC_Server_Name": [ + "recv-sim" + ], + "OPC_Server_Port": [ + "4840" + ], + "OPC_Time_Out": [ + "5.0" + ] + } + } + } + } + }, + "SDP": { + "LTS": { + "SDP": { + "LTS/SDP/1": { + "properties": { + "OPC_Server_Name": [ + "sdptr-sim" + ], + "OPC_Server_Port": [ + "4840" + ], + "OPC_Time_Out": [ + "5.0" + ] + } + } + } + } + }, + "SST": { + "LTS": { + "SST": { + "LTS/SST/1": { + "properties": { + "OPC_Server_Name": [ + "sdptr-sim" + ], + "OPC_Server_Port": [ + "4840" + ], + "OPC_Time_Out": [ + "5.0" + ], + "FPGA_sst_offload_hdr_eth_destination_mac_RW_default": [ + "01:23:45:67:89:AB", + "01:23:45:67:89:AB", + "01:23:45:67:89:AB", + "01:23:45:67:89:AB", + "01:23:45:67:89:AB", + "01:23:45:67:89:AB", + "01:23:45:67:89:AB", + "01:23:45:67:89:AB", + "01:23:45:67:89:AB", + "01:23:45:67:89:AB", + "01:23:45:67:89:AB", + "01:23:45:67:89:AB", + "01:23:45:67:89:AB", + "01:23:45:67:89:AB", + "01:23:45:67:89:AB", + "01:23:45:67:89:AB" + ], + "FPGA_sst_offload_hdr_ip_destination_address_RW_default": [ + "127.0.0.1", + "127.0.0.1", + "127.0.0.1", + "127.0.0.1", + "127.0.0.1", + "127.0.0.1", + "127.0.0.1", + "127.0.0.1", + "127.0.0.1", + "127.0.0.1", + "127.0.0.1", + "127.0.0.1", + "127.0.0.1", + "127.0.0.1", + "127.0.0.1", + "127.0.0.1" + ] + } + } + } + } + }, + "XST": { + "LTS": { + "XST": { + "LTS/XST/1": { + "properties": { + "OPC_Server_Name": [ + "sdptr-sim" + ], + "OPC_Server_Port": [ + "4840" + ], + "OPC_Time_Out": [ + "5.0" + ], + "FPGA_xst_offload_hdr_eth_destination_mac_RW_default": [ + "01:23:45:67:89:AB", + "01:23:45:67:89:AB", + "01:23:45:67:89:AB", + "01:23:45:67:89:AB", + "01:23:45:67:89:AB", + "01:23:45:67:89:AB", + "01:23:45:67:89:AB", + "01:23:45:67:89:AB", + "01:23:45:67:89:AB", + "01:23:45:67:89:AB", + "01:23:45:67:89:AB", + "01:23:45:67:89:AB", + "01:23:45:67:89:AB", + "01:23:45:67:89:AB", + "01:23:45:67:89:AB", + "01:23:45:67:89:AB" + ], + "FPGA_xst_offload_hdr_ip_destination_address_RW_default": [ + "127.0.0.1", + "127.0.0.1", + "127.0.0.1", + "127.0.0.1", + "127.0.0.1", + "127.0.0.1", + "127.0.0.1", + "127.0.0.1", + "127.0.0.1", + "127.0.0.1", + "127.0.0.1", + "127.0.0.1", + "127.0.0.1", + "127.0.0.1", + "127.0.0.1", + "127.0.0.1" + ] + } + } + } + } + }, + "UNB2": { + "LTS": { + "UNB2": { + "LTS/UNB2/1": { + "properties": { + "OPC_Server_Name": [ + "unb2-sim" + ], + "OPC_Server_Port": [ + "4841" + ], + "OPC_Time_Out": [ + "5.0" + ] + } + } + } + } + } + } +} diff --git a/CDB/test_ConfigDb.json b/CDB/test_ConfigDb.json index b73683f9f1df2b8af3f0f712e9f601bbb292ce50..7030e2d97166b244c3d3c682d4a975386510ecbc 100644 --- a/CDB/test_ConfigDb.json +++ b/CDB/test_ConfigDb.json @@ -1,75 +1,75 @@ -{ - "servers": { - "RECV": { - "1": { - "RECV": { - "LTS/RECV/1": { - "properties": { - "OPC_Server_Name": [ - "ltspi.astron.nl" - ] - } - } - } - } - }, - "SDP": { - "1": { - "SDP": { - "LTS/SDP/1": { - "properties": { - "OPC_Server_Name": [ - "dop36.astron.nl" - ] - } - } - } - } - }, - "APSCTL": { - "1": { - "APSCTL": { - "LTS/APSCTL/1": { - "properties": { - "OPC_Server_Name": [ - "ltspi.astron.nl" - ], - "OPC_Server_Port": [ - "4844" - ], - "OPC_Time_Out": [ - "5.0" - ] - } - } - } - } - }, - "test_device": { - "1": { - "test_device": { - "LTS/test_device/1": { - "attribute_properties": { - "Ant_mask_RW": { - "archive_period": [ - "600000" - ] - } - }, - "properties": { - "OPC_Server_Name": [ - "host.docker.internal" - ], - "OPC_Server_Port": [ - "4842" - ], - "OPC_Time_Out": [ - "5.0" - ] - } - } - } - } - } - } -} +{ + "servers": { + "RECV": { + "1": { + "RECV": { + "LTS/RECV/1": { + "properties": { + "OPC_Server_Name": [ + "ltspi.astron.nl" + ] + } + } + } + } + }, + "SDP": { + "1": { + "SDP": { + "LTS/SDP/1": { + "properties": { + "OPC_Server_Name": [ + "dop36.astron.nl" + ] + } + } + } + } + }, + "APSCTL": { + "1": { + "APSCTL": { + "LTS/APSCTL/1": { + "properties": { + "OPC_Server_Name": [ + "ltspi.astron.nl" + ], + "OPC_Server_Port": [ + "4844" + ], + "OPC_Time_Out": [ + "5.0" + ] + } + } + } + } + }, + "test_device": { + "1": { + "test_device": { + "LTS/test_device/1": { + "attribute_properties": { + "Ant_mask_RW": { + "archive_period": [ + "600000" + ] + } + }, + "properties": { + "OPC_Server_Name": [ + "host.docker.internal" + ], + "OPC_Server_Port": [ + "4842" + ], + "OPC_Time_Out": [ + "5.0" + ] + } + } + } + } + } + } +} diff --git a/CDB/thijs_ConfigDb.json b/CDB/thijs_ConfigDb.json index 95fa70578a94531454684fdc5ee5bb6df7e8e3a7..5cd6813622bc642a8e2fd4ce1001158da3977dae 100644 --- a/CDB/thijs_ConfigDb.json +++ b/CDB/thijs_ConfigDb.json @@ -1,137 +1,137 @@ -{ - "servers": { - "RECV": { - "1": { - "RECV": { - "LTS/RECV/1": { - "properties": { - "OPC_Server_Name": [ - "host.docker.internal" - ] - } - } - } - } - }, - "SDP": { - "1": { - "SDP": { - "LTS/SDP/1": { - "properties": { - "OPC_Server_Name": [ - "dop36.astron.nl" - ], - "OPC_Server_Port": [ - "4840" - ], - "OPC_Time_Out": [ - "5.0" - ] - } - } - } - } - }, - "example_device": { - "1": { - "example_device": { - "LTS/example_device/1": { - "properties": { - "OPC_Server_Name": [ - "host.docker.internal" - ], - "OPC_Server_Port": [ - "4842" - ], - "OPC_Time_Out": [ - "5.0" - ] - } - } - } - } - }, - "ini_device": { - "1": { - "ini_device": { - "LTS/ini_device/1": { - "properties": { - "OPC_Server_Name": [ - "host.docker.internal" - ], - "OPC_Server_Port": [ - "4844" - ], - "OPC_Time_Out": [ - "5.0" - ] - } - } - } - } - }, - "APSCTL": { - "1": { - "APSCTL": { - "LTS/APSCTL/1": { - "properties": { - "OPC_Server_Name": [ - "ltspi.astron.nl" - ], - "OPC_Server_Port": [ - "4844" - ], - "OPC_Time_Out": [ - "5.0" - ] - } - } - } - } - }, - "SST": { - "1": { - "SST": { - "LTS/SST/1": { - "properties": { - "Statistics_Client_UDP_Port": [ - "5001" - ], - "Statistics_Client_TCP_Port": [ - "5101" - ], - "OPC_Server_Name": [ - "dop36.astron.nl" - ], - "OPC_Server_Port": [ - "4840" - ], - "OPC_Time_Out": [ - "5.0" - ] - } - } - } - } - }, - "SNMP": { - "1": { - "SNMP": { - "LTS/SNMP/1": { - "properties": { - "SNMP_community": [ - "public" - ], - "SNMP_host": [ - "192.168.178.17" - ], - "SNMP_timeout": [ - "5.0" - ] - } - } - } - } - } - } -} +{ + "servers": { + "RECV": { + "1": { + "RECV": { + "LTS/RECV/1": { + "properties": { + "OPC_Server_Name": [ + "host.docker.internal" + ] + } + } + } + } + }, + "SDP": { + "1": { + "SDP": { + "LTS/SDP/1": { + "properties": { + "OPC_Server_Name": [ + "dop36.astron.nl" + ], + "OPC_Server_Port": [ + "4840" + ], + "OPC_Time_Out": [ + "5.0" + ] + } + } + } + } + }, + "example_device": { + "1": { + "example_device": { + "LTS/example_device/1": { + "properties": { + "OPC_Server_Name": [ + "host.docker.internal" + ], + "OPC_Server_Port": [ + "4842" + ], + "OPC_Time_Out": [ + "5.0" + ] + } + } + } + } + }, + "ini_device": { + "1": { + "ini_device": { + "LTS/ini_device/1": { + "properties": { + "OPC_Server_Name": [ + "host.docker.internal" + ], + "OPC_Server_Port": [ + "4844" + ], + "OPC_Time_Out": [ + "5.0" + ] + } + } + } + } + }, + "APSCTL": { + "1": { + "APSCTL": { + "LTS/APSCTL/1": { + "properties": { + "OPC_Server_Name": [ + "ltspi.astron.nl" + ], + "OPC_Server_Port": [ + "4844" + ], + "OPC_Time_Out": [ + "5.0" + ] + } + } + } + } + }, + "SST": { + "1": { + "SST": { + "LTS/SST/1": { + "properties": { + "Statistics_Client_UDP_Port": [ + "5001" + ], + "Statistics_Client_TCP_Port": [ + "5101" + ], + "OPC_Server_Name": [ + "dop36.astron.nl" + ], + "OPC_Server_Port": [ + "4840" + ], + "OPC_Time_Out": [ + "5.0" + ] + } + } + } + } + }, + "SNMP": { + "1": { + "SNMP": { + "LTS/SNMP/1": { + "properties": { + "SNMP_community": [ + "public" + ], + "SNMP_host": [ + "192.168.178.17" + ], + "SNMP_timeout": [ + "5.0" + ] + } + } + } + } + } + } +} diff --git a/CDB/thomas_ConfigDb.json b/CDB/thomas_ConfigDb.json index 93256085f0acbb13bd111e414c548ae8724d6eaa..c1d50d969298798a95755fd340c9061f08762310 100644 --- a/CDB/thomas_ConfigDb.json +++ b/CDB/thomas_ConfigDb.json @@ -1,43 +1,43 @@ -{ - "servers": { - "RECV": { - "LTS": { - "RECV": { - "LTS/RECV/1": { - "properties": { - "OPC_Server_Name": [ - "okeanos" - ] - } - } - } - } - }, - "SDP": { - "LTS": { - "SDP": { - "LTS/SDP/1": { - "properties": { - "OPC_Server_Name": [ - "okeanos" - ] - } - } - } - } - }, - "SST": { - "LTS": { - "SST": { - "LTS/SST/1": { - "properties": { - "OPC_Server_Name": [ - "okeanos" - ] - } - } - } - } - } - } -} +{ + "servers": { + "RECV": { + "LTS": { + "RECV": { + "LTS/RECV/1": { + "properties": { + "OPC_Server_Name": [ + "okeanos" + ] + } + } + } + } + }, + "SDP": { + "LTS": { + "SDP": { + "LTS/SDP/1": { + "properties": { + "OPC_Server_Name": [ + "okeanos" + ] + } + } + } + } + }, + "SST": { + "LTS": { + "SST": { + "LTS/SST/1": { + "properties": { + "OPC_Server_Name": [ + "okeanos" + ] + } + } + } + } + } + } +} diff --git a/CDB/thomas_arm64_ConfigDb.json b/CDB/thomas_arm64_ConfigDb.json index 298794f42247cee40ea88fc507e587f16e695adc..0bf870680b8ff66ae6f46851b01870f4dd4f6ee8 100644 --- a/CDB/thomas_arm64_ConfigDb.json +++ b/CDB/thomas_arm64_ConfigDb.json @@ -1,43 +1,43 @@ -{ - "servers": { - "RECV": { - "LTS": { - "RECV": { - "LTS/RECV/1": { - "properties": { - "OPC_Server_Name": [ - "arm2" - ] - } - } - } - } - }, - "SDP": { - "LTS": { - "SDP": { - "LTS/SDP/1": { - "properties": { - "OPC_Server_Name": [ - "okeanos" - ] - } - } - } - } - }, - "SST": { - "LTS": { - "SST": { - "LTS/SST/1": { - "properties": { - "OPC_Server_Name": [ - "okeanos" - ] - } - } - } - } - } - } -} +{ + "servers": { + "RECV": { + "LTS": { + "RECV": { + "LTS/RECV/1": { + "properties": { + "OPC_Server_Name": [ + "arm2" + ] + } + } + } + } + }, + "SDP": { + "LTS": { + "SDP": { + "LTS/SDP/1": { + "properties": { + "OPC_Server_Name": [ + "okeanos" + ] + } + } + } + } + }, + "SST": { + "LTS": { + "SST": { + "LTS/SST/1": { + "properties": { + "OPC_Server_Name": [ + "okeanos" + ] + } + } + } + } + } + } +} diff --git a/CDB/unb2-sim-config.json b/CDB/unb2-sim-config.json deleted file mode 100644 index a98fa27492e3835867b214cfd2789caf949de460..0000000000000000000000000000000000000000 --- a/CDB/unb2-sim-config.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "servers": { - "UNB2": { - "LTS": { - "UNB2": { - "LTS/UNB2/1": { - "properties": { - "OPC_Server_Name": [ - "unb2-sim" - ], - "OPC_Server_Port": [ - "4844" - ], - "OPC_Time_Out": [ - "5.0" - ] - } - } - } - } - } - } -} diff --git a/CDB/windows_ConfigDb.json b/CDB/windows_ConfigDb.json index ac8b7ef7f50b35f8f245ceaea5b5d525d7fd755e..d00826eddf16687cc0329f68f8ae86b0543d7a82 100644 --- a/CDB/windows_ConfigDb.json +++ b/CDB/windows_ConfigDb.json @@ -1,108 +1,108 @@ -{ - "servers": { - "RECV": { - "1": { - "RECV": { - "LTS/RECV/1": { - "properties": { - "OPC_Server_Name": [ - "host.docker.internal" - ] - } - } - } - } - }, - "SDP": { - "1": { - "SDP": { - "LTS/SDP/1": { - "properties": { - "OPC_Server_Name": [ - "host.docker.internal" - ] - } - } - } - } - }, - "ini_device": { - "1": { - "ini_device": { - "LTS/ini_device/1": { - "attribute_properties": { - "Ant_mask_RW": { - "archive_period": [ - "600000" - ] - } - }, - "properties": { - "SNMP_community": [ - "public" - ], - "SNMP_host": [ - "172.22.176.1" - ], - "SNMP_timeout": [ - "5.0" - ] - } - } - } - } - }, - "SNMP": { - "1": { - "SNMP": { - "LTS/SNMP/1": { - "attribute_properties": { - "Ant_mask_RW": { - "archive_period": [ - "600000" - ] - } - }, - "properties": { - "SNMP_community": [ - "public" - ], - "SNMP_host": [ - "172.22.176.1" - ], - "SNMP_timeout": [ - "5.0" - ] - } - } - } - } - }, - "test_device": { - "1": { - "test_device": { - "LTS/test_device/1": { - "attribute_properties": { - "Ant_mask_RW": { - "archive_period": [ - "600000" - ] - } - }, - "properties": { - "OPC_Server_Name": [ - "host.docker.internal" - ], - "OPC_Server_Port": [ - "4842" - ], - "OPC_Time_Out": [ - "5.0" - ] - } - } - } - } - } - } -} +{ + "servers": { + "RECV": { + "1": { + "RECV": { + "LTS/RECV/1": { + "properties": { + "OPC_Server_Name": [ + "host.docker.internal" + ] + } + } + } + } + }, + "SDP": { + "1": { + "SDP": { + "LTS/SDP/1": { + "properties": { + "OPC_Server_Name": [ + "host.docker.internal" + ] + } + } + } + } + }, + "ini_device": { + "1": { + "ini_device": { + "LTS/ini_device/1": { + "attribute_properties": { + "Ant_mask_RW": { + "archive_period": [ + "600000" + ] + } + }, + "properties": { + "SNMP_community": [ + "public" + ], + "SNMP_host": [ + "172.22.176.1" + ], + "SNMP_timeout": [ + "5.0" + ] + } + } + } + } + }, + "SNMP": { + "1": { + "SNMP": { + "LTS/SNMP/1": { + "attribute_properties": { + "Ant_mask_RW": { + "archive_period": [ + "600000" + ] + } + }, + "properties": { + "SNMP_community": [ + "public" + ], + "SNMP_host": [ + "172.22.176.1" + ], + "SNMP_timeout": [ + "5.0" + ] + } + } + } + } + }, + "test_device": { + "1": { + "test_device": { + "LTS/test_device/1": { + "attribute_properties": { + "Ant_mask_RW": { + "archive_period": [ + "600000" + ] + } + }, + "properties": { + "OPC_Server_Name": [ + "host.docker.internal" + ], + "OPC_Server_Port": [ + "4842" + ], + "OPC_Time_Out": [ + "5.0" + ] + } + } + } + } + } + } +} diff --git a/bin/dump_ConfigDb.sh b/bin/dump_ConfigDb.sh index 7745c18482000fe2e7a726e27b6fa5eeae57e88e..0dc634c458b76cd5d3c13e2d7dab6e905f66248a 100755 --- a/bin/dump_ConfigDb.sh +++ b/bin/dump_ConfigDb.sh @@ -1,4 +1,4 @@ #!/bin/bash -# writes the JSON dump to stdout -docker exec -it dsconfig python -m dsconfig.dump +# writes the JSON dump to stdout, Do not change -i into -it incompatible with gitlab ci! +docker exec -i "${CONTAINER_NAME_PREFIX}"dsconfig python -m dsconfig. diff --git a/bin/itango_console.sh b/bin/itango_console.sh index fb4c9b8a285adca3211633fb89e6e9e59bd01087..c2474781787257c6ab3ee0656659415f09380b29 100755 --- a/bin/itango_console.sh +++ b/bin/itango_console.sh @@ -1,2 +1,2 @@ #!/bin/bash -exec docker exec -it itango itango3 +exec docker exec -it "${CONTAINER_NAME_PREFIX}"itango itango3 diff --git a/bin/itango_shell.sh b/bin/itango_shell.sh index abab9ef8515fd5ce1a1bf2d6d452a538426a499a..334953de3cca29ff459f6c861637c0859b1da97b 100755 --- a/bin/itango_shell.sh +++ b/bin/itango_shell.sh @@ -1,2 +1,2 @@ #!/bin/bash -exec docker exec -it itango /bin/bash +exec docker exec -it "${CONTAINER_NAME_PREFIX}"itango /bin/bash diff --git a/bootstrap/etc/lofar20rc.sh b/bootstrap/etc/lofar20rc.sh index 9a9dd658b56f5d30bb1ff8c5de692bd8fe2164de..6e4a5c9bc8d6a78c1b61cca02159ee01291d3805 100755 --- a/bootstrap/etc/lofar20rc.sh +++ b/bootstrap/etc/lofar20rc.sh @@ -16,6 +16,14 @@ if [ ! -f "${LOFAR20_DIR}/.git/hooks/post-checkout" ]; then alias git="cp ${LOFAR20_DIR}/bin/update_submodules.sh ${LOFAR20_DIR}/.git/hooks/post-checkout; cp ${LOFAR20_DIR}/bin/update_submodules.sh ${LOFAR20_DIR}/.git/hooks/post-merge; unalias git; git" fi +if [ ! -z ${CI_BUILD_ID+x} ]; then + export CONTAINER_NAME_PREFIX=${CI_BUILD_ID}- +elif [ ! -z ${CI_JOB_ID+x} ]; then + export CONTAINER_NAME_PREFIX=${CI_JOB_ID}- +else + unset CONTAINER_NAME_PREFIX +fi + # This needs to be modified for a development environment. # In case you run multiple Docker networks on the same host in parallel, you need to specify a unique # network name for each of them. @@ -26,7 +34,6 @@ export NETWORK_MODE=tangonet # Example: export TANGO_HOST=station-xk25.astron.nl:10000 export TANGO_HOST=$(hostname):10000 - # # NO MODIFICATION BEYOND THIS POINT! # diff --git a/docker-compose/.env b/docker-compose/.env index 85ebd21e4cfc0392b1f3f4452f22c861f1d304fe..00b12b0fcb55b351ebf9e56b37ae2c1f0fc6f4a9 100644 --- a/docker-compose/.env +++ b/docker-compose/.env @@ -8,7 +8,7 @@ TANGO_CPP_VERSION=9.3.5 TANGO_DB_VERSION=10.4.11 TANGO_DSCONFIG_VERSION=1.5.1 TANGO_HDBPP_VIEWER_VERSION=2021-05-28 -TANGO_ITANGO_VERSION=9.3.5 +TANGO_ITANGO_VERSION=9.3.7 TANGO_JAVA_VERSION=9.3.4 TANGO_POGO_VERSION=9.6.32 TANGO_REST_VERSION=1.14.2 diff --git a/docker-compose/Makefile b/docker-compose/Makefile index 81e5e4a85223a042b1325343fb01cc941ef3311c..649e63518d5f1276a2f1fb696d90a2b79fef0f24 100644 --- a/docker-compose/Makefile +++ b/docker-compose/Makefile @@ -138,7 +138,7 @@ build-nocache: ## rebuild images from scratch $(DOCKER_COMPOSE_ARGS) docker-compose $(COMPOSE_FILE_ARGS) build --no-cache --progress=plain $(SERVICE) up: minimal ## start the base TANGO system and prepare all services - $(DOCKER_COMPOSE_ARGS) docker-compose $(COMPOSE_FILE_ARGS) up --no-start + $(DOCKER_COMPOSE_ARGS) docker-compose $(COMPOSE_FILE_ARGS) up --no-start --no-recreate down: ## stop all services and tear down the system $(DOCKER_COMPOSE_ARGS) docker-compose $(COMPOSE_FILE_ARGS) down @@ -159,6 +159,7 @@ bootstrap: pull build # first start, initialise from scratch $(MAKE) start dsconfig # boot up containers to load configurations sleep 5 # wait for dsconfig container to come up ../sbin/update_ConfigDb.sh ../CDB/LOFAR_ConfigDb.json # load default configuration + ../sbin/update_ConfigDb.sh ../CDB/stations/simulators_ConfigDb.json # by default, use simulators start: up ## start a service (usage: make start <servicename>) if [ $(UNAME_S) = Linux ]; then touch ~/.Xauthority; chmod a+r ~/.Xauthority; fi diff --git a/docker-compose/apsct-sim.yml b/docker-compose/apsct-sim.yml new file mode 100644 index 0000000000000000000000000000000000000000..d30f5a026f734bb72ee91c7bf533df677f37ca88 --- /dev/null +++ b/docker-compose/apsct-sim.yml @@ -0,0 +1,17 @@ +# +# Docker compose file that launches an APSCT simulator +# +# Defines: +# - apsct-sim +# +version: '2' + +services: + apsct-sim: + build: + context: pypcc-sim-base + container_name: ${CONTAINER_NAME_PREFIX}apsct-sim + networks: + - control + entrypoint: python3 pypcc2.py --simulator --port 4843 --config APSCTTR + restart: on-failure diff --git a/docker-compose/apspu-sim.yml b/docker-compose/apspu-sim.yml new file mode 100644 index 0000000000000000000000000000000000000000..d3fc5fa04f6ce0d6ddfe4c8f87887ab7500720e3 --- /dev/null +++ b/docker-compose/apspu-sim.yml @@ -0,0 +1,17 @@ +# +# Docker compose file that launches an APSPU simulator +# +# Defines: +# - apspu-sim +# +version: '2' + +services: + apspu-sim: + build: + context: pypcc-sim-base + container_name: ${CONTAINER_NAME_PREFIX}apspu-sim + networks: + - control + entrypoint: python3 pypcc2.py --simulator --port 4842 --config APSPUTR + restart: on-failure diff --git a/docker-compose/archiver.yml b/docker-compose/archiver.yml index 84dded354d22c97eeccd51ea97d8ff41b909f01e..da37892ea2b04739311fe9756f00d760a4992ca8 100644 --- a/docker-compose/archiver.yml +++ b/docker-compose/archiver.yml @@ -3,7 +3,7 @@ version: '2' services: archiver-maria-db: image: ${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_USER}/mariadb_hdbpp:2021-05-28 - container_name: archiver-maria-db + container_name: ${CONTAINER_NAME_PREFIX}archiver-maria-db networks: - control ports: @@ -17,13 +17,19 @@ services: - MYSQL_USER=tango - MYSQL_PASSWORD=tango - TANGO_HOST=${TANGO_HOST} + logging: + driver: syslog + options: + syslog-address: udp://${HOSTNAME}:1514 + syslog-format: rfc3164 + tag: "{{.Name}}" restart: unless-stopped hdbpp-es: image: ${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_USER}/tango-archiver:2021-05-28 networks: - control - container_name: hdbpp-es + container_name: ${CONTAINER_NAME_PREFIX}hdbpp-es depends_on: - databaseds - dsconfig @@ -36,13 +42,19 @@ services: wait-for-it.sh archiver-maria-db:3306 --timeout=30 --strict -- wait-for-it.sh ${TANGO_HOST} --timeout=30 --strict -- hdbppes-srv 01" + logging: + driver: syslog + options: + syslog-address: udp://${HOSTNAME}:1514 + syslog-format: rfc3164 + tag: "{{.Name}}" restart: unless-stopped hdbpp-cm: image: ${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_USER}/tango-archiver:${TANGO_ARCHIVER_VERSION} networks: - control - container_name: hdbpp-cm + container_name: ${CONTAINER_NAME_PREFIX}hdbpp-cm depends_on: - databaseds - dsconfig @@ -55,10 +67,16 @@ services: wait-for-it.sh archiver-maria-db:3306 --timeout=30 --strict -- wait-for-it.sh ${TANGO_HOST} --timeout=30 --strict -- hdbppcm-srv 01" + logging: + driver: syslog + options: + syslog-address: udp://${HOSTNAME}:1514 + syslog-format: rfc3164 + tag: "{{.Name}}" dsconfig: image: ${DOCKER_REGISTRY_HOST}/${DOCKER_REGISTRY_USER}-tango-dsconfig:${TANGO_DSCONFIG_VERSION} - container_name: dsconfig + container_name: ${CONTAINER_NAME_PREFIX}dsconfig networks: - control depends_on: @@ -73,5 +91,11 @@ services: - ..:/opt/lofar/tango:rw - ${HOME}:/hosthome - ../docker/tango/tango-archiver:/tango-archiver + logging: + driver: syslog + options: + syslog-address: udp://${HOSTNAME}:1514 + syslog-format: rfc3164 + tag: "{{.Name}}" restart: unless-stopped diff --git a/docker-compose/device-apsct.yml b/docker-compose/device-apsct.yml new file mode 100644 index 0000000000000000000000000000000000000000..36a21fb6c81bce72c0f708e5aca924eb0de9e14f --- /dev/null +++ b/docker-compose/device-apsct.yml @@ -0,0 +1,44 @@ +# +# Docker compose file that launches an interactive iTango session. +# +# Connect to the interactive session with 'docker attach itango'. +# Disconnect with the Docker deattach sequence: <CTRL>+<P> <CTRL>+<Q> +# +# Defines: +# - itango: iTango interactive session +# +# Requires: +# - lofar-device-base.yml +# +version: '2' + +services: + device-apsct: + image: device-apsct + # build explicitly, as docker-compose does not understand a local image + # being shared among services. + build: + context: lofar-device-base + args: + SOURCE_IMAGE: ${DOCKER_REGISTRY_HOST}/${DOCKER_REGISTRY_USER}-tango-itango:${TANGO_ITANGO_VERSION} + container_name: ${CONTAINER_NAME_PREFIX}device-apsct + networks: + - control + ports: + - "5709:5709" # unique port for this DS + extra_hosts: + - "host.docker.internal:host-gateway" + volumes: + - ..:/opt/lofar/tango:rw + environment: + - TANGO_HOST=${TANGO_HOST} + entrypoint: + - /usr/local/bin/wait-for-it.sh + - ${TANGO_HOST} + - --timeout=30 + - --strict + - -- + # configure CORBA to _listen_ on 0:port, but tell others we're _reachable_ through ${HOSTNAME}:port, since CORBA + # can't know about our Docker port forwarding + - python3 -u /opt/lofar/tango/devices/devices/apsct.py LTS -v -ORBendPoint giop:tcp:0:5709 -ORBendPointPublish giop:tcp:${HOSTNAME}:5709 + restart: on-failure diff --git a/docker-compose/device-apspu.yml b/docker-compose/device-apspu.yml new file mode 100644 index 0000000000000000000000000000000000000000..f1ea50c89d5194c6829fcf29446090edae33e686 --- /dev/null +++ b/docker-compose/device-apspu.yml @@ -0,0 +1,44 @@ +# +# Docker compose file that launches an interactive iTango session. +# +# Connect to the interactive session with 'docker attach itango'. +# Disconnect with the Docker deattach sequence: <CTRL>+<P> <CTRL>+<Q> +# +# Defines: +# - itango: iTango interactive session +# +# Requires: +# - lofar-device-base.yml +# +version: '2' + +services: + device-apspu: + image: device-apspu + # build explicitly, as docker-compose does not understand a local image + # being shared among services. + build: + context: lofar-device-base + args: + SOURCE_IMAGE: ${DOCKER_REGISTRY_HOST}/${DOCKER_REGISTRY_USER}-tango-itango:${TANGO_ITANGO_VERSION} + container_name: ${CONTAINER_NAME_PREFIX}device-apspu + networks: + - control + ports: + - "5710:5710" # unique port for this DS + extra_hosts: + - "host.docker.internal:host-gateway" + volumes: + - ..:/opt/lofar/tango:rw + environment: + - TANGO_HOST=${TANGO_HOST} + entrypoint: + - /usr/local/bin/wait-for-it.sh + - ${TANGO_HOST} + - --timeout=30 + - --strict + - -- + # configure CORBA to _listen_ on 0:port, but tell others we're _reachable_ through ${HOSTNAME}:port, since CORBA + # can't know about our Docker port forwarding + - python3 -u /opt/lofar/tango/devices/devices/apspu.py LTS -v -ORBendPoint giop:tcp:0:5710 -ORBendPointPublish giop:tcp:${HOSTNAME}:5710 + restart: on-failure diff --git a/docker-compose/device-boot.yml b/docker-compose/device-boot.yml index 216e6961a85f921639074c042a80e868dbc10717..131e5644399eeae7b0e043a7aca9829d45a9a167 100644 --- a/docker-compose/device-boot.yml +++ b/docker-compose/device-boot.yml @@ -25,6 +25,8 @@ services: - control ports: - "5708:5708" # unique port for this DS + extra_hosts: + - "host.docker.internal:host-gateway" volumes: - ..:/opt/lofar/tango:rw environment: diff --git a/docker-compose/device-docker.yml b/docker-compose/device-docker.yml index 777939eb1025d3a9c07c35db61de7f58c3c65563..93e7cd8eaca8ea2ad6a024fa6fab7a1902b693c1 100644 --- a/docker-compose/device-docker.yml +++ b/docker-compose/device-docker.yml @@ -26,6 +26,8 @@ services: - control ports: - "5705:5705" # unique port for this DS + extra_hosts: + - "host.docker.internal:host-gateway" volumes: - ..:/opt/lofar/tango:rw - /var/run/docker.sock:/var/run/docker.sock:rw # we want to control our sibling containers, NOT do docker-in-docker (dind) diff --git a/docker-compose/device-observation_control.yml b/docker-compose/device-observation_control.yml index eb357e2ee69c0f8c233196ef01d1f428eec0ccc1..d15fb8a8e708ce7e01e27a300348a5f47b09aa24 100644 --- a/docker-compose/device-observation_control.yml +++ b/docker-compose/device-observation_control.yml @@ -25,6 +25,8 @@ services: - control ports: - "5703:5703" # unique port for this DS + extra_hosts: + - "host.docker.internal:host-gateway" volumes: - ..:/opt/lofar/tango:rw environment: diff --git a/docker-compose/device-recv.yml b/docker-compose/device-recv.yml index e846004bbdba834d9591bcbebb10e1e592b795ff..c1269ab89e34798b8766ced06d7df3394cbaf3b7 100644 --- a/docker-compose/device-recv.yml +++ b/docker-compose/device-recv.yml @@ -26,6 +26,8 @@ services: - control ports: - "5707:5707" # unique port for this DS + extra_hosts: + - "host.docker.internal:host-gateway" volumes: - ..:/opt/lofar/tango:rw environment: diff --git a/docker-compose/device-sdp.yml b/docker-compose/device-sdp.yml index 116df55c9bb926eb2e1ba173cf423cf7f94ef862..0768d39cd4a75d4d92abd59f42cbb436ac4c2f48 100644 --- a/docker-compose/device-sdp.yml +++ b/docker-compose/device-sdp.yml @@ -26,6 +26,8 @@ services: - control ports: - "5701:5701" # unique port for this DS + extra_hosts: + - "host.docker.internal:host-gateway" volumes: - ..:/opt/lofar/tango:rw environment: diff --git a/docker-compose/device-sst.yml b/docker-compose/device-sst.yml index be252a07e24cc56e0268d8e9c47969bcc89a301a..3924b4bf18c1a221a8859a32a73f9ccccb4fdfc1 100644 --- a/docker-compose/device-sst.yml +++ b/docker-compose/device-sst.yml @@ -29,6 +29,8 @@ services: - "5001:5001/udp" # port to receive SST UDP packets on - "5101:5101/tcp" # port to emit SST TCP packets on - "5702:5702" # unique port for this DS + extra_hosts: + - "host.docker.internal:host-gateway" volumes: - ..:/opt/lofar/tango:rw environment: diff --git a/docker-compose/device-unb2.yml b/docker-compose/device-unb2.yml index f6545cf1b1f9a5cd120929c8b63a32a3248d8577..9e9f8797ce62f57c3fd3434dd41c36412df2150f 100644 --- a/docker-compose/device-unb2.yml +++ b/docker-compose/device-unb2.yml @@ -1,39 +1,41 @@ -# -# Docker compose file that launches an interactive iTango session. -# -# Connect to the interactive session with 'docker attach itango'. -# Disconnect with the Docker deattach sequence: <CTRL>+<P> <CTRL>+<Q> -# -# Defines: -# - itango: iTango interactive session -# -# Requires: -# - lofar-device-base.yml -# -version: '2' - -services: - device-unb2: - image: device-unb2 - # build explicitly, as docker-compose does not understand a local image - # being shared among services. - build: - context: lofar-device-base - args: - SOURCE_IMAGE: ${DOCKER_REGISTRY_HOST}/${DOCKER_REGISTRY_USER}-tango-itango:${TANGO_ITANGO_VERSION} - container_name: ${CONTAINER_NAME_PREFIX}device-unb2 - networks: - - control - ports: - - "5704:5704" # unique port for this DS - volumes: - - ..:/opt/lofar/tango:rw - environment: - - TANGO_HOST=${TANGO_HOST} - working_dir: /opt/lofar/tango - entrypoint: - - bin/start-ds.sh - # configure CORBA to _listen_ on 0:port, but tell others we're _reachable_ through ${HOSTNAME}:port, since CORBA - # can't know about our Docker port forwarding - - l2ss-unb2 UNB2 LTS -v -ORBendPoint giop:tcp:0:5704 -ORBendPointPublish giop:tcp:${HOSTNAME}:5704 - restart: unless-stopped +# +# Docker compose file that launches an interactive iTango session. +# +# Connect to the interactive session with 'docker attach itango'. +# Disconnect with the Docker deattach sequence: <CTRL>+<P> <CTRL>+<Q> +# +# Defines: +# - itango: iTango interactive session +# +# Requires: +# - lofar-device-base.yml +# +version: '2' + +services: + device-unb2: + image: device-unb2 + # build explicitly, as docker-compose does not understand a local image + # being shared among services. + build: + context: lofar-device-base + args: + SOURCE_IMAGE: ${DOCKER_REGISTRY_HOST}/${DOCKER_REGISTRY_USER}-tango-itango:${TANGO_ITANGO_VERSION} + container_name: ${CONTAINER_NAME_PREFIX}device-unb2 + networks: + - control + ports: + - "5704:5704" # unique port for this DS + extra_hosts: + - "host.docker.internal:host-gateway" + volumes: + - ..:/opt/lofar/tango:rw + environment: + - TANGO_HOST=${TANGO_HOST} + working_dir: /opt/lofar/tango + entrypoint: + - bin/start-ds.sh + # configure CORBA to _listen_ on 0:port, but tell others we're _reachable_ through ${HOSTNAME}:port, since CORBA + # can't know about our Docker port forwarding + - l2ss-unb2 UNB2 LTS -v -ORBendPoint giop:tcp:0:5704 -ORBendPointPublish giop:tcp:${HOSTNAME}:5704 + restart: unless-stopped diff --git a/docker-compose/device-xst.yml b/docker-compose/device-xst.yml index 3509ee5a55090723a7ef34b5affb0261a528d567..6d7a1036dfa965750bcf7212ae865a1b71e3de3a 100644 --- a/docker-compose/device-xst.yml +++ b/docker-compose/device-xst.yml @@ -29,6 +29,8 @@ services: - "5002:5002/udp" # port to receive XST UDP packets on - "5102:5102/tcp" # port to emit XST TCP packets on - "5706:5706" # unique port for this DS + extra_hosts: + - "host.docker.internal:host-gateway" volumes: - ..:/opt/lofar/tango:rw environment: diff --git a/docker-compose/elk.yml b/docker-compose/elk.yml index bf6e22e3de6ea82571acba0ac8e7c69f3eeb2941..67f13baee061a74ebd08320f1e9f2f9f3e72f646 100644 --- a/docker-compose/elk.yml +++ b/docker-compose/elk.yml @@ -34,7 +34,8 @@ services: - "5601:5601" # kibana - "9200:9200" # elasticsearch - "5044:5044" # logstash beats input - - "1514:1514" # logstash syslog input + - "1514:1514/tcp" # logstash syslog input + - "1514:1514/udp" # logstash syslog input - "5959:5959" # logstash tcp json input depends_on: - elk-configure-host diff --git a/docker-compose/elk/logstash/conf.d/20-parse-grafana.conf b/docker-compose/elk/logstash/conf.d/20-parse-grafana.conf new file mode 100644 index 0000000000000000000000000000000000000000..37db44fda67109d7ef8a6beac1193004968a2349 --- /dev/null +++ b/docker-compose/elk/logstash/conf.d/20-parse-grafana.conf @@ -0,0 +1,16 @@ +filter { + if [program] == "grafana" { + kv { } + mutate { + rename => { + "t" => "timestamp" + "lvl" => "level" + "msg" => "message" + } + uppercase => [ "level" ] + } + date { + match => [ "timestamp", "ISO8601" ] + } + } +} diff --git a/docker-compose/elk/logstash/conf.d/21-parse-prometheus.conf b/docker-compose/elk/logstash/conf.d/21-parse-prometheus.conf new file mode 100644 index 0000000000000000000000000000000000000000..b8323625f329af02f9ff33556e408b94ecf7e0b6 --- /dev/null +++ b/docker-compose/elk/logstash/conf.d/21-parse-prometheus.conf @@ -0,0 +1,15 @@ +filter { + if [program] == "prometheus" { + kv { } + mutate { + rename => { + "ts" => "timestamp" + "msg" => "message" + } + uppercase => [ "level" ] + } + date { + match => [ "timestamp", "ISO8601" ] + } + } +} diff --git a/docker-compose/elk/logstash/conf.d/22-parse-tango-rest.conf b/docker-compose/elk/logstash/conf.d/22-parse-tango-rest.conf new file mode 100644 index 0000000000000000000000000000000000000000..5df0cd92bd32625a1eb91220bf4e7a9827799523 --- /dev/null +++ b/docker-compose/elk/logstash/conf.d/22-parse-tango-rest.conf @@ -0,0 +1,14 @@ +filter { + if [program] == "tango-rest" { + grok { + match => { + "message" => "%{TIMESTAMP_ISO8601:timestamp} %{WORD:level} %{GREEDYDATA:message}" + } + "overwrite" => [ "timestamp", "level", "message" ] + } + date { + match => [ "timestamp", "YYYY-MM-dd HH:mm:ss,SSS" ] + timezone => "UTC" + } + } +} diff --git a/docker-compose/elk/logstash/conf.d/23-parse-maria-db.conf b/docker-compose/elk/logstash/conf.d/23-parse-maria-db.conf new file mode 100644 index 0000000000000000000000000000000000000000..0a23fddd078e5e967bc5f791e020faaa20ed632a --- /dev/null +++ b/docker-compose/elk/logstash/conf.d/23-parse-maria-db.conf @@ -0,0 +1,32 @@ +filter { + # mark all our mariadb instances + grok { + match => { + "program" => [ "archiver-maria-db", "tangodb" ] + } + add_tag => [ "mariadb" ] + } + + # parse mariadb output + if "mariadb" in [tags] { + grok { + match => { + "message" => [ + "%{TIMESTAMP_ISO8601:timestamp} .%{WORD:level}. %{GREEDYDATA:message}", + "%{TIMESTAMP_ISO8601:timestamp} 0 .%{WORD:level}. %{GREEDYDATA:message}" + ] + } + "overwrite" => [ "timestamp", "level", "message" ] + } + mutate { + gsub => [ + "level", "Note", "Info" + ] + uppercase => [ "level" ] + } + date { + match => [ "timestamp", "YYYY-MM-dd HH:mm:ssZZ", "YYYY-MM-dd HH:mm:ss", "YYYY-MM-dd H:mm:ss" ] + timezone => "UTC" + } + } +} diff --git a/docker-compose/grafana.yml b/docker-compose/grafana.yml index b9060c70a53ecfb4d4027ebe1e78d9fe658050f6..eaddea1e290f554e9ad568b0cef632017d3a04ca 100644 --- a/docker-compose/grafana.yml +++ b/docker-compose/grafana.yml @@ -23,4 +23,10 @@ services: # - grafana-configs:/etc/grafana ports: - "3000:3000" + logging: + driver: syslog + options: + syslog-address: udp://${HOSTNAME}:1514 + syslog-format: rfc3164 + tag: "{{.Name}}" restart: unless-stopped diff --git a/docker-compose/grafana/Dockerfile b/docker-compose/grafana/Dockerfile index bc766bcd3b0d71f346fd70e34fa27dd91fc27b04..e51cce5eeaa0310c1ecd698d8d797e3163ce4457 100644 --- a/docker-compose/grafana/Dockerfile +++ b/docker-compose/grafana/Dockerfile @@ -1,5 +1,9 @@ FROM grafana/grafana +# Install some plugins +RUN grafana-cli plugins install briangann-datatable-panel +RUN grafana-cli plugins install ae3e-plotly-panel + COPY grafana.ini /etc/grafana/ # Add default configuration through provisioning (see https://grafana.com/docs/grafana/latest/administration/provisioning) diff --git a/docker-compose/grafana/dashboards/home.json b/docker-compose/grafana/dashboards/home.json index 51ed27cc87098fa85f7563d813c6807eb18a7b3d..f1b7a626e2ca470f513d22cadf240345cacf2f25 100644 --- a/docker-compose/grafana/dashboards/home.json +++ b/docker-compose/grafana/dashboards/home.json @@ -19,10 +19,12 @@ ] }, "editable": true, + "fiscalYearStartMonth": 0, "gnetId": null, "graphTooltip": 0, - "id": 3, + "id": 5, "links": [], + "liveNow": false, "panels": [ { "collapsed": false, @@ -47,6 +49,8 @@ "mode": "thresholds" }, "mappings": [], + "max": 100, + "min": 0, "thresholds": { "mode": "absolute", "steps": [ @@ -76,6 +80,7 @@ }, "id": 43, "options": { + "orientation": "auto", "reduceOptions": { "calcs": [ "lastNotNull" @@ -87,7 +92,7 @@ "showThresholdMarkers": false, "text": {} }, - "pluginVersion": "8.1.2", + "pluginVersion": "8.2.1", "targets": [ { "exemplar": true, @@ -176,10 +181,13 @@ "fields": "", "values": false }, - "text": {}, + "text": { + "titleSize": 20, + "valueSize": 20 + }, "textMode": "value_and_name" }, - "pluginVersion": "8.1.2", + "pluginVersion": "8.2.1", "targets": [ { "exemplar": true, @@ -191,6 +199,15 @@ } ], "title": "Device States", + "transformations": [ + { + "id": "renameByRegex", + "options": { + "regex": ".*/(.*)/1", + "renamePattern": "$1" + } + } + ], "type": "stat" }, { @@ -247,7 +264,7 @@ }, "gridPos": { "h": 9, - "w": 12, + "w": 10, "x": 10, "y": 1 }, @@ -267,7 +284,7 @@ "alias": "", "bucketAggs": [ { - "field": "extra.tango_device.keyword", + "field": "extra.lofar_id.keyword", "id": "2", "settings": { "min_doc_count": "0", @@ -300,8 +317,71 @@ } ], "title": "Errors", + "transformations": [ + { + "id": "renameByRegex", + "options": { + "regex": "\\(.*/.*/1\\)", + "renamePattern": "" + } + } + ], "type": "timeseries" }, + { + "datasource": null, + "description": "Links to other dashboards", + "gridPos": { + "h": 9, + "w": 4, + "x": 20, + "y": 1 + }, + "id": 47, + "options": { + "folderId": 0, + "maxItems": 10, + "query": "", + "showHeadings": false, + "showRecentlyViewed": false, + "showSearch": true, + "showStarred": false, + "tags": [] + }, + "pluginVersion": "8.2.1", + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": false, + "rawSql": "SELECT\n data_time AS \"time\",\n att_conf_id\nFROM att_scalar_devboolean_rw\nWHERE\n $__timeFilter(data_time)\nORDER BY data_time", + "refId": "A", + "select": [ + [ + { + "params": [ + "att_conf_id" + ], + "type": "column" + } + ] + ], + "table": "att_scalar_devboolean_rw", + "timeColumn": "data_time", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "title": "Dashboards", + "type": "dashlist" + }, { "datasource": "Prometheus", "description": "", @@ -341,7 +421,7 @@ "options": { "showHeader": false }, - "pluginVersion": "8.1.2", + "pluginVersion": "8.2.1", "targets": [ { "exemplar": true, @@ -358,6 +438,10 @@ "id": "labelsToFields", "options": {} }, + { + "id": "merge", + "options": {} + }, { "id": "organize", "options": { @@ -401,57 +485,19 @@ "type": "table" }, { - "collapsed": false, - "datasource": null, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 10 - }, - "id": 17, - "panels": [], - "title": "RECV", - "type": "row" - }, - { - "datasource": "Prometheus", - "description": "", + "datasource": "ELK logs", + "description": "List of the errors in the selected timespan", "fieldConfig": { "defaults": { "color": { - "mode": "palette-classic" + "mode": "thresholds" }, "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } + "align": "auto", + "displayMode": "auto", + "filterable": true }, "mappings": [], - "min": 0, "thresholds": { "mode": "absolute", "steps": [ @@ -464,47 +510,187 @@ "value": 80 } ] - }, - "unit": "celsius" + } }, - "overrides": [] + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "@timestamp" + }, + "properties": [ + { + "id": "custom.width", + "value": 149 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "level" + }, + "properties": [ + { + "id": "custom.width", + "value": 62 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "program" + }, + "properties": [ + { + "id": "custom.width", + "value": 287 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "extra.logger_name" + }, + "properties": [ + { + "id": "custom.width", + "value": 72 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "extra.lofar_id" + }, + "properties": [ + { + "id": "custom.width", + "value": 196 + } + ] + } + ] }, "gridPos": { - "h": 8, - "w": 5, + "h": 5, + "w": 24, "x": 0, - "y": 11 + "y": 10 }, - "id": 22, + "id": 56, "options": { - "legend": { - "calcs": [], - "displayMode": "hidden", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } + "showHeader": true, + "sortBy": [] }, - "pluginVersion": "8.1.2", + "pluginVersion": "8.2.1", "targets": [ { - "exemplar": true, - "expr": "device_attribute{device=\"lts/recv/1\",name=\"RCU_temperature_R\"} - 273.15", - "format": "time_series", - "hide": false, - "instant": false, - "interval": "", - "legendFormat": "{{x}}", - "refId": "A" + "alias": "", + "bucketAggs": [], + "metrics": [ + { + "hide": false, + "id": "1", + "settings": { + "limit": "500" + }, + "type": "logs" + } + ], + "query": "level:(ERROR or CRIT or FATAL)", + "refId": "A", + "timeField": "@timestamp" } ], - "title": "RCU temperatures", - "transformations": [], - "type": "timeseries" + "title": "Error Log", + "transformations": [ + { + "id": "organize", + "options": { + "excludeByName": { + "@version": true, + "_id": true, + "_index": true, + "_source": true, + "_type": true, + "extra.func_name": true, + "extra.interpreter": true, + "extra.interpreter_version": true, + "extra.line": true, + "extra.logger_name": true, + "extra.logstash_async_version": true, + "extra.path": true, + "extra.process_name": true, + "extra.software_version": true, + "extra.tango_device": true, + "extra.thread_name": true, + "highlight": true, + "host": true, + "logsource": true, + "pid": true, + "port": true, + "sort": true, + "tags": true, + "type": true + }, + "indexByName": { + "@timestamp": 0, + "@version": 5, + "_id": 6, + "_index": 7, + "_source": 8, + "_type": 9, + "extra.func_name": 10, + "extra.interpreter": 11, + "extra.interpreter_version": 12, + "extra.line": 13, + "extra.lofar_id": 4, + "extra.logger_name": 14, + "extra.logstash_async_version": 15, + "extra.path": 16, + "extra.process_name": 17, + "extra.software_version": 18, + "extra.tango_device": 19, + "extra.thread_name": 20, + "highlight": 21, + "host": 2, + "level": 1, + "logsource": 22, + "message": 23, + "pid": 24, + "port": 25, + "program": 3, + "sort": 26, + "tags": 27, + "type": 28 + }, + "renameByName": {} + } + } + ], + "type": "table" + }, + { + "collapsed": false, + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 15 + }, + "id": 49, + "panels": [], + "title": "APSCT & APSPU", + "type": "row" }, { "datasource": "Prometheus", + "description": "State of APSCT", "fieldConfig": { "defaults": { "color": { @@ -515,16 +701,12 @@ "mode": "absolute", "steps": [ { - "color": "transparent", + "color": "green", "value": null }, { "color": "red", - "value": 0 - }, - { - "color": "green", - "value": 3 + "value": 1 } ] } @@ -532,15 +714,15 @@ "overrides": [] }, "gridPos": { - "h": 8, - "w": 6, - "x": 5, - "y": 11 + "h": 3, + "w": 21, + "x": 0, + "y": 16 }, - "id": 21, + "id": 24, "options": { "colorMode": "background", - "graphMode": "area", + "graphMode": "none", "justifyMode": "auto", "orientation": "auto", "reduceOptions": { @@ -553,21 +735,70 @@ "text": {}, "textMode": "name" }, - "pluginVersion": "8.1.2", + "pluginVersion": "8.2.1", "targets": [ { "exemplar": true, - "expr": "sum by (x)(1 + (device_attribute{device=\"lts/recv/1\",name=\"RCU_ADC_lock_R\"} == bool 129)) * on(x) device_attribute{device=\"lts/recv/1\",name=\"RCU_mask_RW\"} - 3", + "expr": "1-device_attribute{device=\"lts/apsct/1\",name=\"APSCT_PWR_on_R\"}", "interval": "", - "legendFormat": "{{y}}", + "legendFormat": "Power", "refId": "A" + }, + { + "exemplar": true, + "expr": "device_attribute{device=\"lts/apsct/1\",name=\"APSCTTR_I2C_error_R\"}", + "hide": false, + "interval": "", + "legendFormat": "I2C", + "refId": "B" + }, + { + "exemplar": true, + "expr": "device_attribute{device=\"lts/apsct/1\",name=\"APSCT_PLL_200MHz_error_R\"}", + "hide": false, + "interval": "", + "legendFormat": "PLL", + "refId": "C" + }, + { + "exemplar": true, + "expr": "1-device_attribute{device=\"lts/apsct/1\",name=\"APSCT_PLL_200MHz_locked_R\"}", + "hide": false, + "interval": "", + "legendFormat": "PLL Lock", + "refId": "D" + }, + { + "exemplar": true, + "expr": "1-device_attribute{device=\"lts/apsct/1\",name=\"APSCT_INPUT_10MHz_good_R\"}", + "hide": false, + "interval": "", + "legendFormat": "10MHz", + "refId": "E" + }, + { + "exemplar": true, + "expr": "1-device_attribute{device=\"lts/apsct/1\",name=\"APSCT_INPUT_PPS_good_R\"}", + "hide": false, + "interval": "", + "legendFormat": "PPS", + "refId": "F" + }, + { + "exemplar": true, + "expr": "device_attribute{device=\"lts/apsct/1\",name=\"APSCT_PPS_ignore_R\"}", + "hide": false, + "interval": "", + "legendFormat": "PPS used", + "refId": "G" } ], - "title": "RCU ADC lock", + "title": "APS Clock State", "type": "stat" }, { "datasource": "Prometheus", + "description": "State of APSPU", "fieldConfig": { "defaults": { "color": { @@ -578,16 +809,12 @@ "mode": "absolute", "steps": [ { - "color": "transparent", + "color": "green", "value": null }, { "color": "red", "value": 1 - }, - { - "color": "green", - "value": 2 } ] } @@ -595,15 +822,15 @@ "overrides": [] }, "gridPos": { - "h": 8, - "w": 6, - "x": 11, - "y": 11 + "h": 3, + "w": 3, + "x": 21, + "y": 16 }, - "id": 25, + "id": 50, "options": { "colorMode": "background", - "graphMode": "area", + "graphMode": "none", "justifyMode": "auto", "orientation": "auto", "reduceOptions": { @@ -616,22 +843,38 @@ "text": {}, "textMode": "name" }, - "pluginVersion": "8.1.2", + "pluginVersion": "8.2.1", "targets": [ { "exemplar": true, - "expr": "(2 - device_attribute{device=\"lts/recv/1\",name=\"RCU_I2C_STATUS_R\"}) * on(x) device_attribute{device=\"lts/recv/1\",name=\"RCU_mask_RW\"}", + "expr": "device_attribute{device=\"lts/apspu/1\",name=\"APSPUTR_I2C_error_R\"}", + "hide": false, "interval": "", - "legendFormat": "{{y}}", - "refId": "A" + "legendFormat": "I2C", + "refId": "B" } ], - "title": "RCU I2C status", + "title": "APS Power Unit State", "type": "stat" }, { - "datasource": "Prometheus", - "fieldConfig": { + "collapsed": true, + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 19 + }, + "id": 53, + "panels": [], + "title": "UNB2", + "type": "row" + }, + { + "datasource": "Prometheus", + "description": "State of Unboard 2 I2C Bus", + "fieldConfig": { "defaults": { "color": { "mode": "thresholds" @@ -641,12 +884,16 @@ "mode": "absolute", "steps": [ { - "color": "green", + "color": "transparent", "value": null }, { - "color": "red", + "color": "green", "value": 1 + }, + { + "color": "red", + "value": 2 } ] } @@ -654,12 +901,12 @@ "overrides": [] }, "gridPos": { - "h": 5, - "w": 3, - "x": 17, - "y": 11 + "h": 3, + "w": 24, + "x": 0, + "y": 20 }, - "id": 24, + "id": 54, "options": { "colorMode": "background", "graphMode": "none", @@ -675,41 +922,50 @@ "text": {}, "textMode": "name" }, - "pluginVersion": "8.1.2", + "pluginVersion": "8.2.1", "targets": [ { "exemplar": true, - "expr": "1-device_attribute{device=\"lts/recv/1\",name=\"CLK_Enable_PWR_R\"}", + "expr": "(1 + (device_attribute{device=\"lts/unb2/1\",name=\"UNB2TR_I2C_bus_error_R\"} != bool 0)) * on(x) device_attribute{device=\"lts/recv/1\",name=\"RCU_mask_RW\"}", + "hide": false, "interval": "", - "legendFormat": "Power", + "legendFormat": "I2C {{x}}", "refId": "A" }, { "exemplar": true, - "expr": "device_attribute{device=\"lts/recv/1\",name=\"CLK_I2C_STATUS_R\"}", + "expr": "(1 + device_attribute{device=\"lts/unb2/1\",name=\"UNB2TR_I2C_bus_PS_error_R\"}) * on(x) device_attribute{device=\"lts/recv/1\",name=\"RCU_mask_RW\"}", "hide": false, "interval": "", - "legendFormat": "I2C", + "legendFormat": "PS {{x}}", "refId": "B" }, { "exemplar": true, - "expr": "device_attribute{device=\"lts/recv/1\",name=\"CLK_PLL_error_R\"}", + "expr": "(1 + sum by (x) (device_attribute{device=\"lts/unb2/1\",name=\"UNB2TR_I2C_bus_FPGA_PS_error_R\"})) * on(x) device_attribute{device=\"lts/recv/1\",name=\"RCU_mask_RW\"}", "hide": false, "interval": "", - "legendFormat": "PLL", + "legendFormat": "FPGA PS {{x}}", "refId": "C" }, { "exemplar": true, - "expr": "1-device_attribute{device=\"lts/recv/1\",name=\"CLK_PLL_locked_R\"}", + "expr": "(1 + sum by (x) (device_attribute{device=\"lts/unb2/1\",name=\"UNB2TR_I2C_bus_DDR4_error_R\"})) * on(x) device_attribute{device=\"lts/recv/1\",name=\"RCU_mask_RW\"}", "hide": false, "interval": "", - "legendFormat": "PLL Lock", + "legendFormat": "DDR {{x}}", "refId": "D" + }, + { + "exemplar": true, + "expr": "(1 + sum by (x) (device_attribute{device=\"lts/unb2/1\",name=\"UNB2TR_I2C_bus_QSFP_error_R\"})) * on(x) device_attribute{device=\"lts/recv/1\",name=\"RCU_mask_RW\"}", + "hide": false, + "interval": "", + "legendFormat": "QSFP {{x}}", + "refId": "E" } ], - "title": "Clock", + "title": "UNB2 I2C State", "type": "stat" }, { @@ -719,600 +975,141 @@ "h": 1, "w": 24, "x": 0, - "y": 19 + "y": 23 }, - "id": 46, + "id": 17, "panels": [], - "title": "Uniboard 2", + "title": "RECV", "type": "row" }, { "datasource": "Prometheus", - "description": "Temperature sensors of each node on each board", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic", - "seriesBy": "max" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "line" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 85 - } - ] - }, - "unit": "celsius" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 5, - "x": 0, - "y": 20 - }, - "id": 48, - "options": { - "legend": { - "calcs": [], - "displayMode": "hidden", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "targets": [ - { - "exemplar": true, - "expr": "device_attribute{device=\"lts/unb2/1\",name=\"UNB2_FPGA_POL_CORE_TEMP_R\"}", - "interval": "", - "legendFormat": "Core board {{x}} node {{y}}", - "refId": "A" - }, - { - "exemplar": true, - "expr": "device_attribute{device=\"lts/unb2/1\",name=\"UNB2_FPGA_POL_ERAM_TEMP_R\"}", - "hide": false, - "interval": "", - "legendFormat": "ERAM board {{x}} node {{y}}", - "refId": "B" - }, - { - "exemplar": true, - "expr": "device_attribute{device=\"lts/unb2/1\",name=\"UNB2_FPGA_POL_RXGXB_TEMP_R\"}", - "hide": false, - "interval": "", - "legendFormat": "TrRx board {{x}} node {{y}}", - "refId": "C" - }, - { - "exemplar": true, - "expr": "device_attribute{device=\"lts/unb2/1\",name=\"UNB2_FPGA_POL_HXGB_TEMP_R\"}", - "hide": false, - "interval": "", - "legendFormat": "TrHx board {{x}} node {{y}}", - "refId": "D" - }, - { - "exemplar": true, - "expr": "device_attribute{device=\"lts/unb2/1\",name=\"UNB2_FPGA_POL_PGM_TEMP_R\"}", - "hide": false, - "interval": "", - "legendFormat": "IO board {{x}} node {{y}}", - "refId": "E" - }, - { - "hide": false, - "refId": "F" - } - ], - "title": "Uniboard2 Node Temperatures", - "type": "timeseries" - }, - { - "datasource": "Prometheus", - "description": "Temperature sensors of the power supply on each board", "fieldConfig": { "defaults": { "color": { - "mode": "palette-classic", - "seriesBy": "max" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "line" - } + "mode": "thresholds" }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { - "color": "green", + "color": "transparent", "value": null }, { "color": "red", - "value": 85 - } - ] - }, - "unit": "celsius" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 5, - "x": 5, - "y": 20 - }, - "id": 50, - "options": { - "legend": { - "calcs": [], - "displayMode": "hidden", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "targets": [ - { - "exemplar": true, - "expr": "device_attribute{device=\"lts/unb2/1\",name=\"UNB2_POL_QSFP_N01_TEMP_R\"}", - "interval": "", - "legendFormat": "QSFP N01 board {{x}} ", - "refId": "A" - }, - { - "exemplar": true, - "expr": "device_attribute{device=\"lts/unb2/1\",name=\"UNB2_POL_QSFP_N23_TEMP_R\"}", - "hide": false, - "interval": "", - "legendFormat": "QSFP N23 board {{x}}", - "refId": "B" - }, - { - "exemplar": true, - "expr": "device_attribute{device=\"lts/unb2/1\",name=\"UNB2_POL_SWITCH_1V2_TEMP_R\"}", - "hide": false, - "interval": "", - "legendFormat": "Switch 1v2 board {{x}}", - "refId": "C" - }, - { - "exemplar": true, - "expr": "device_attribute{device=\"lts/unb2/1\",name=\"UNB2_POL_SWITCH_PHY_TEMP_R\"}", - "hide": false, - "interval": "", - "legendFormat": "Switch PHY board {{x}}", - "refId": "D" - }, - { - "exemplar": true, - "expr": "device_attribute{device=\"lts/unb2/1\",name=\"UNB2_POL_CLOCK_TEMP_R\"}", - "hide": false, - "interval": "", - "legendFormat": "Clock PWR board {{x}}", - "refId": "E" - }, - { - "exemplar": true, - "expr": "device_attribute{device=\"lts/unb2/1\",name=\"UNB2_DC_DC_48V_12V_TEMP_R\"}", - "hide": false, - "interval": "", - "legendFormat": "DC-DC board {{x}}", - "refId": "F" - } - ], - "title": "Uniboard2 Power Supply Temperatures", - "type": "timeseries" - }, - { - "datasource": "Prometheus", - "description": "Voltage sensors of each node on each board", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "axisSoftMax": 2, - "axisSoftMin": 0, - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "line" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null + "value": 0 }, - { - "color": "red", - "value": 85 - } - ] - }, - "unit": "volt" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 5, - "x": 10, - "y": 20 - }, - "id": 49, - "options": { - "legend": { - "calcs": [], - "displayMode": "hidden", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "targets": [ - { - "exemplar": true, - "expr": "device_attribute{device=\"lts/unb2/1\",name=\"UNB2_FPGA_POL_CORE_VOUT_R\"}", - "interval": "", - "legendFormat": "Core board {{x}} node {{y}}", - "refId": "A" - }, - { - "exemplar": true, - "expr": "device_attribute{device=\"lts/unb2/1\",name=\"UNB2_FPGA_POL_ERAM_VOUT_R\"}", - "hide": false, - "interval": "", - "legendFormat": "ERAM board {{x}} node {{y}}", - "refId": "B" - }, - { - "exemplar": true, - "expr": "device_attribute{device=\"lts/unb2/1\",name=\"UNB2_FPGA_POL_RXGXB_VOUT_R\"}", - "hide": false, - "interval": "", - "legendFormat": "TrRx board {{x}} node {{y}}", - "refId": "C" - }, - { - "exemplar": true, - "expr": "device_attribute{device=\"lts/unb2/1\",name=\"UNB2_FPGA_POL_HXGB_VOUT_R\"}", - "hide": false, - "interval": "", - "legendFormat": "TrHx board {{x}} node {{y}}", - "refId": "D" - }, - { - "exemplar": true, - "expr": "device_attribute{device=\"lts/unb2/1\",name=\"UNB2_FPGA_POL_PGM_VOUT_R\"}", - "hide": false, - "interval": "", - "legendFormat": "IO board {{x}} node {{y}}", - "refId": "E" - } - ], - "title": "Uniboard2 Voltages", - "type": "timeseries" - }, - { - "datasource": "Prometheus", - "description": "Voltage sensors of the power supply on each board", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic", - "seriesBy": "max" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "axisSoftMin": 0, - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "line" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ { "color": "green", - "value": null - }, - { - "color": "red", - "value": 85 + "value": 3 } ] - }, - "unit": "volt" + } }, "overrides": [] }, "gridPos": { "h": 8, - "w": 5, - "x": 15, - "y": 20 + "w": 6, + "x": 0, + "y": 24 }, - "id": 51, + "id": 21, "options": { - "legend": { - "calcs": [], - "displayMode": "hidden", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "targets": [ - { - "exemplar": true, - "expr": "device_attribute{device=\"lts/unb2/1\",name=\"UNB2_POL_QSFP_N01_VOUT_R\"}", - "interval": "", - "legendFormat": "QSFP N01 board {{x}} ", - "refId": "A" - }, - { - "exemplar": true, - "expr": "device_attribute{device=\"lts/unb2/1\",name=\"UNB2_POL_QSFP_N23_VOUT_R\"}", - "hide": false, - "interval": "", - "legendFormat": "QSFP N23 board {{x}}", - "refId": "B" - }, - { - "exemplar": true, - "expr": "device_attribute{device=\"lts/unb2/1\",name=\"UNB2_POL_SWITCH_1V2_VOUT_R\"}", - "hide": false, - "interval": "", - "legendFormat": "Switch 1v2 board {{x}}", - "refId": "C" - }, - { - "exemplar": true, - "expr": "device_attribute{device=\"lts/unb2/1\",name=\"UNB2_POL_SWITCH_PHY_VOUT_R\"}", - "hide": false, - "interval": "", - "legendFormat": "Switch PHY board {{x}}", - "refId": "D" - }, - { - "exemplar": true, - "expr": "device_attribute{device=\"lts/unb2/1\",name=\"UNB2_POL_CLOCK_VOUT_R\"}", - "hide": false, - "interval": "", - "legendFormat": "Clock PWR board {{x}}", - "refId": "E" + "colorMode": "background", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false }, - { - "exemplar": true, - "expr": "device_attribute{device=\"lts/unb2/1\",name=\"UNB2_DC_DC_48V_12V_VOUT_R\"}", - "hide": false, - "interval": "", - "legendFormat": "DC-DC board {{x}}", - "refId": "F" - } - ], - "title": "Uniboard2 Power Supply Voltages", - "type": "timeseries" - }, - { - "collapsed": false, - "datasource": null, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 28 + "text": {}, + "textMode": "name" }, - "id": 19, - "panels": [], - "title": "SDP", - "type": "row" + "pluginVersion": "8.2.1", + "targets": [ + { + "exemplar": true, + "expr": "sum by (x)(1 + (device_attribute{device=\"lts/recv/1\",name=\"RCU_ADC_locked_R\"})) * on(x) device_attribute{device=\"lts/recv/1\",name=\"RCU_mask_RW\"} - 3", + "instant": false, + "interval": "", + "legendFormat": "{{y}}", + "refId": "A" + } + ], + "title": "RCU Clock Lock", + "type": "stat" }, { "datasource": "Prometheus", - "description": "", "fieldConfig": { "defaults": { "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } + "mode": "thresholds" }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { - "color": "green", + "color": "transparent", "value": null }, { "color": "red", - "value": 80 + "value": 1 + }, + { + "color": "green", + "value": 2 } ] - }, - "unit": "celsius" + } }, "overrides": [] }, "gridPos": { "h": 8, - "w": 5, - "x": 0, - "y": 29 + "w": 6, + "x": 6, + "y": 24 }, - "id": 5, + "id": 25, "options": { - "legend": { - "calcs": [], - "displayMode": "hidden", - "placement": "bottom" + "colorMode": "background", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false }, - "tooltip": { - "mode": "single" - } + "text": {}, + "textMode": "name" }, - "pluginVersion": "8.1.2", + "pluginVersion": "8.2.1", "targets": [ { "exemplar": true, - "expr": "device_attribute{device=\"lts/sdp/1\",name=\"FPGA_temp_R\"}", - "format": "time_series", + "expr": "(1 + (device_attribute{device=\"lts/recv/1\",name=\"RECVTR_I2C_error_R\"} == bool 0)) * on(x) device_attribute{device=\"lts/recv/1\",name=\"RCU_mask_RW\"}", "hide": false, "instant": false, "interval": "", - "legendFormat": "{{x}}", + "legendFormat": "{{y}}", "refId": "A" } ], - "title": "FPGA temperatures", - "transformations": [], - "type": "timeseries" + "title": "RCU I2C State", + "type": "stat" }, { "datasource": "Prometheus", @@ -1331,12 +1128,12 @@ "value": null }, { - "color": "green", - "value": 50 + "color": "red", + "value": 1 }, { - "color": "red", - "value": 100 + "color": "green", + "value": 2 } ] } @@ -1345,14 +1142,14 @@ }, "gridPos": { "h": 8, - "w": 5, - "x": 5, - "y": 29 + "w": 6, + "x": 12, + "y": 24 }, - "id": 11, + "id": 51, "options": { "colorMode": "background", - "graphMode": "area", + "graphMode": "none", "justifyMode": "auto", "orientation": "auto", "reduceOptions": { @@ -1365,23 +1162,35 @@ "text": {}, "textMode": "name" }, - "pluginVersion": "8.1.2", + "pluginVersion": "8.2.1", "targets": [ { "exemplar": true, - "expr": "(50+50*device_attribute{device=\"lts/sdp/1\",name=\"TR_fpga_communication_error_R\"}) * on(x) device_attribute{device=\"lts/sdp/1\",name=\"TR_fpga_mask_R\"}", - "format": "time_series", + "expr": "(1 + device_attribute{device=\"lts/recv/1\",name=\"RCU_PWR_good_R\"}) * on(x) device_attribute{device=\"lts/recv/1\",name=\"RCU_mask_RW\"}", "hide": false, "instant": false, "interval": "", - "legendFormat": "{{x}}", + "legendFormat": "{{y}}", "refId": "A" } ], - "title": "FPGA communication", - "transformations": [], + "title": "RCU Power good", "type": "stat" }, + { + "collapsed": false, + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 32 + }, + "id": 19, + "panels": [], + "title": "SDP", + "type": "row" + }, { "datasource": "Prometheus", "description": "", @@ -1414,10 +1223,10 @@ "gridPos": { "h": 8, "w": 5, - "x": 10, - "y": 29 + "x": 0, + "y": 33 }, - "id": 9, + "id": 11, "options": { "colorMode": "background", "graphMode": "area", @@ -1433,11 +1242,11 @@ "text": {}, "textMode": "name" }, - "pluginVersion": "8.1.2", + "pluginVersion": "8.2.1", "targets": [ { "exemplar": true, - "expr": "(100-50*device_attribute{device=\"lts/sdp/1\",name=\"FPGA_processing_enable_R\"}) * on(x) device_attribute{device=\"lts/sdp/1\",name=\"TR_fpga_mask_R\"}", + "expr": "(50+50*device_attribute{device=\"lts/sdp/1\",name=\"TR_fpga_communication_error_R\"}) * on(x) device_attribute{device=\"lts/sdp/1\",name=\"TR_fpga_mask_R\"}", "format": "time_series", "hide": false, "instant": false, @@ -1446,91 +1255,66 @@ "refId": "A" } ], - "title": "FPGA processing enabled", + "title": "FPGA communication", "transformations": [], "type": "stat" }, { "datasource": "Prometheus", - "description": "Measured difference between PTP and PPS", + "description": "", "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": 60000, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "decimals": 2, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { - "color": "red", + "color": "transparent", "value": null }, { "color": "green", - "value": 0.001 + "value": 50 }, { "color": "red", - "value": 0.1 + "value": 100 } ] - }, - "unit": "s" + } }, "overrides": [] }, "gridPos": { "h": 8, "w": 5, - "x": 15, - "y": 29 + "x": 5, + "y": 33 }, - "id": 13, + "id": 9, "options": { - "legend": { - "calcs": [], - "displayMode": "hidden", - "placement": "bottom" + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false }, - "tooltip": { - "mode": "single" - } + "text": {}, + "textMode": "name" }, - "pluginVersion": "8.1.2", + "pluginVersion": "8.2.1", "targets": [ { "exemplar": true, - "expr": "device_attribute{device=\"lts/sdp/1\",name=\"TR_tod_pps_delta_R\"}", + "expr": "(100-50*device_attribute{device=\"lts/sdp/1\",name=\"FPGA_processing_enable_R\"}) * on(x) device_attribute{device=\"lts/sdp/1\",name=\"TR_fpga_mask_R\"}", "format": "time_series", "hide": false, "instant": false, @@ -1539,9 +1323,9 @@ "refId": "A" } ], - "title": "FPGA Clock offset", + "title": "FPGA processing enabled", "transformations": [], - "type": "timeseries" + "type": "stat" }, { "datasource": "Prometheus", @@ -1581,8 +1365,8 @@ "gridPos": { "h": 4, "w": 3, - "x": 20, - "y": 29 + "x": 10, + "y": 33 }, "id": 12, "options": { @@ -1600,7 +1384,7 @@ "text": {}, "textMode": "value" }, - "pluginVersion": "8.1.2", + "pluginVersion": "8.2.1", "targets": [ { "exemplar": true, @@ -1624,7 +1408,7 @@ "h": 1, "w": 24, "x": 0, - "y": 37 + "y": 41 }, "id": 27, "panels": [], @@ -1664,7 +1448,7 @@ "h": 8, "w": 5, "x": 0, - "y": 38 + "y": 42 }, "id": 28, "options": { @@ -1682,7 +1466,7 @@ "text": {}, "textMode": "name" }, - "pluginVersion": "8.1.2", + "pluginVersion": "8.2.1", "targets": [ { "exemplar": true, @@ -1762,7 +1546,7 @@ "h": 8, "w": 5, "x": 5, - "y": 38 + "y": 42 }, "id": 29, "options": { @@ -1871,7 +1655,7 @@ "h": 8, "w": 5, "x": 10, - "y": 38 + "y": 42 }, "id": 30, "options": { @@ -1964,7 +1748,7 @@ "h": 8, "w": 5, "x": 15, - "y": 38 + "y": 42 }, "id": 33, "options": { @@ -2059,7 +1843,7 @@ "h": 8, "w": 3, "x": 20, - "y": 38 + "y": 42 }, "id": 34, "options": { @@ -2096,7 +1880,7 @@ "h": 1, "w": 24, "x": 0, - "y": 46 + "y": 50 }, "id": 36, "panels": [], @@ -2133,10 +1917,10 @@ "overrides": [] }, "gridPos": { - "h": 8, + "h": 4, "w": 5, "x": 0, - "y": 47 + "y": 51 }, "id": 37, "options": { @@ -2154,7 +1938,7 @@ "text": {}, "textMode": "name" }, - "pluginVersion": "8.1.2", + "pluginVersion": "8.2.1", "targets": [ { "exemplar": true, @@ -2234,7 +2018,7 @@ "h": 8, "w": 5, "x": 5, - "y": 47 + "y": 51 }, "id": 38, "options": { @@ -2343,7 +2127,7 @@ "h": 8, "w": 5, "x": 10, - "y": 47 + "y": 51 }, "id": 39, "options": { @@ -2436,7 +2220,7 @@ "h": 8, "w": 5, "x": 15, - "y": 47 + "y": 51 }, "id": 40, "options": { @@ -2531,7 +2315,7 @@ "h": 8, "w": 3, "x": 20, - "y": 47 + "y": 51 }, "id": 41, "options": { @@ -2560,10 +2344,78 @@ "title": "XST Replicator load", "transformations": [], "type": "timeseries" + }, + { + "datasource": "Prometheus", + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "transparent", + "value": null + }, + { + "color": "green", + "value": 50 + }, + { + "color": "red", + "value": 100 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 5, + "x": 0, + "y": 55 + }, + "id": 45, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "name" + }, + "pluginVersion": "8.2.1", + "targets": [ + { + "exemplar": true, + "expr": "(100-50*device_attribute{device=\"lts/xst/1\",name=\"FPGA_xst_processing_enable_R\"}) * on(x) device_attribute{device=\"lts/sdp/1\",name=\"TR_fpga_mask_R\"}", + "format": "time_series", + "hide": false, + "instant": false, + "interval": "", + "legendFormat": "{{x}}", + "refId": "A" + } + ], + "title": "XST processing enabled", + "transformations": [], + "type": "stat" } ], "refresh": false, - "schemaVersion": 30, + "schemaVersion": 31, "style": "dark", "tags": [], "templating": { @@ -2575,7 +2427,7 @@ }, "timepicker": {}, "timezone": "", - "title": "LOFAR2.0 Station", - "uid": "6f7Pv8Vnz", - "version": 1 + "title": "Home", + "uid": "nC8N_kO7k", + "version": 6 } diff --git a/docker-compose/grafana/dashboards/sensors.json b/docker-compose/grafana/dashboards/sensors.json new file mode 100644 index 0000000000000000000000000000000000000000..43c85da09acc89c8ef487d60e8f46a5bd8605d3c --- /dev/null +++ b/docker-compose/grafana/dashboards/sensors.json @@ -0,0 +1,1190 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "gnetId": null, + "graphTooltip": 0, + "links": [], + "liveNow": false, + "panels": [ + { + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 16, + "title": "Temperatures", + "type": "row" + }, + { + "datasource": "Prometheus", + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "celsius" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 5, + "x": 0, + "y": 1 + }, + "id": 6, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "exemplar": true, + "expr": "device_attribute{device=\"lts/sdp/1\",name=\"FPGA_temp_R\"} != 0", + "format": "time_series", + "hide": false, + "instant": false, + "interval": "", + "legendFormat": "{{x}}", + "refId": "A" + } + ], + "title": "FPGA Temperatures", + "transformations": [], + "type": "timeseries" + }, + { + "datasource": "Prometheus", + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic", + "seriesBy": "max" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "line" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 85 + } + ] + }, + "unit": "celsius" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 5, + "x": 5, + "y": 1 + }, + "id": 4, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "targets": [ + { + "exemplar": true, + "expr": "device_attribute{device=\"lts/unb2/1\",name=\"UNB2_FPGA_POL_CORE_TEMP_R\"} ", + "interval": "", + "legendFormat": "Core board {{x}} node {{y}}", + "refId": "A" + }, + { + "exemplar": true, + "expr": "device_attribute{device=\"lts/unb2/1\",name=\"UNB2_FPGA_POL_ERAM_TEMP_R\"} ", + "hide": false, + "interval": "", + "legendFormat": "ERAM board {{x}} node {{y}}", + "refId": "B" + }, + { + "exemplar": true, + "expr": "device_attribute{device=\"lts/unb2/1\",name=\"UNB2_FPGA_POL_RXGXB_TEMP_R\"} ", + "hide": false, + "interval": "", + "legendFormat": "TrRx board {{x}} node {{y}}", + "refId": "C" + }, + { + "exemplar": true, + "expr": "device_attribute{device=\"lts/unb2/1\",name=\"UNB2_FPGA_POL_TXGB_TEMP_R\"} ", + "hide": false, + "interval": "", + "legendFormat": "TrHx board {{x}} node {{y}}", + "refId": "D" + }, + { + "exemplar": true, + "expr": "device_attribute{device=\"lts/unb2/1\",name=\"UNB2_FPGA_POL_PGM_TEMP_R\"} ", + "hide": false, + "interval": "", + "legendFormat": "IO board {{x}} node {{y}}", + "refId": "E" + }, + { + "exemplar": true, + "expr": "device_attribute{device=\"lts/unb2/1\",name=\"UNB2_FPGA_POL_HGXB_TEMP_R\"} ", + "hide": false, + "interval": "", + "legendFormat": "HGXB board {{x}} node {{y}}", + "refId": "F" + } + ], + "title": "Uniboard2 FPGA POL Temperatures", + "transformations": [], + "type": "timeseries" + }, + { + "datasource": "Prometheus", + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic", + "seriesBy": "max" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "line" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 85 + } + ] + }, + "unit": "celsius" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 5, + "x": 10, + "y": 1 + }, + "id": 22, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "targets": [ + { + "exemplar": true, + "expr": "device_attribute{device=\"lts/unb2/1\",name=\"UNB2_FPGA_QSFP_CAGE_TEMP_R\"}", + "interval": "", + "legendFormat": "FPGA QSFP Cage {{x}}, {{y}} ", + "refId": "A" + } + ], + "title": "Uniboard2 QSFP Cage Temperatures", + "type": "timeseries" + }, + { + "datasource": "Prometheus", + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic", + "seriesBy": "max" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "line" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 85 + } + ] + }, + "unit": "celsius" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 5, + "x": 15, + "y": 1 + }, + "id": 23, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "targets": [ + { + "exemplar": true, + "expr": "device_attribute{device=\"lts/unb2/1\",name=\"UNB2_FPGA_DDR4_SLOT_TEMP_R\"}", + "interval": "", + "legendFormat": "FPGA QSFP Cage {{x}}, {{y}} ", + "refId": "A" + } + ], + "title": "Uniboard2 DDR4 Temperatures", + "type": "timeseries" + }, + { + "datasource": "Prometheus", + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "celsius" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 5, + "x": 0, + "y": 9 + }, + "id": 2, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "exemplar": true, + "expr": "device_attribute{device=\"lts/recv/1\",name=\"RCU_TEMP_R\"}", + "format": "time_series", + "hide": false, + "instant": false, + "interval": "", + "legendFormat": "{{x}}", + "refId": "A" + } + ], + "title": "RCU Temperatures", + "transformations": [], + "type": "timeseries" + }, + { + "datasource": "Prometheus", + "description": "Temperatures reported by APSCT and APSPU", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic", + "seriesBy": "max" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "line" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 85 + } + ] + }, + "unit": "celsius" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 5, + "x": 5, + "y": 9 + }, + "id": 24, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "targets": [ + { + "exemplar": true, + "expr": "device_attribute{device=\"lts/apsct/1\",name=~\"APSCT_TEMP_R\"}", + "interval": "", + "legendFormat": "{{name}}", + "refId": "A" + }, + { + "exemplar": true, + "expr": "device_attribute{device=\"lts/apspu/1\",name=~\"APSPU_.*_TEMP_R\"}", + "hide": false, + "interval": "", + "legendFormat": "{{name}}", + "refId": "B" + } + ], + "title": "APS Temperatures", + "type": "timeseries" + }, + { + "datasource": "Prometheus", + "description": "Temperature sensors of the power supply on each board", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic", + "seriesBy": "max" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "line" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 85 + } + ] + }, + "unit": "celsius" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 5, + "x": 15, + "y": 9 + }, + "id": 8, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "targets": [ + { + "exemplar": true, + "expr": "device_attribute{device=\"lts/unb2/1\",name=\"UNB2_POL_QSFP_N01_TEMP_R\"} ", + "interval": "", + "legendFormat": "QSFP N01 board {{x}}", + "refId": "A" + }, + { + "exemplar": true, + "expr": "device_attribute{device=\"lts/unb2/1\",name=\"UNB2_POL_QSFP_N23_TEMP_R\"} ", + "hide": false, + "interval": "", + "legendFormat": "QSFP N23 board {{x}}", + "refId": "B" + }, + { + "exemplar": true, + "expr": "device_attribute{device=\"lts/unb2/1\",name=\"UNB2_POL_SWITCH_1V2_TEMP_R\"} ", + "hide": false, + "interval": "", + "legendFormat": "Switch 1v2 board {{x}}", + "refId": "C" + }, + { + "exemplar": true, + "expr": "device_attribute{device=\"lts/unb2/1\",name=\"UNB2_POL_SWITCH_PHY_TEMP_R\"} ", + "hide": false, + "interval": "", + "legendFormat": "Switch PHY board {{x}}", + "refId": "D" + }, + { + "exemplar": true, + "expr": "device_attribute{device=\"lts/unb2/1\",name=\"UNB2_POL_CLOCK_TEMP_R\"} ", + "hide": false, + "interval": "", + "legendFormat": "Clock PWR board {{x}}", + "refId": "E" + }, + { + "exemplar": true, + "expr": "device_attribute{device=\"lts/unb2/1\",name=\"UNB2_DC_DC_48V_12V_TEMP_R\"} ", + "hide": false, + "interval": "", + "legendFormat": "DC-DC board {{x}}", + "refId": "F" + } + ], + "title": "Uniboard2 Power Supply Temperatures", + "type": "timeseries" + }, + { + "collapsed": true, + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 17 + }, + "id": 18, + "panels": [], + "title": "Voltages", + "type": "row" + }, + { + "datasource": "Prometheus", + "description": "Voltage sensors of the power supplies of the APS", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic", + "seriesBy": "max" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 10, + "axisSoftMin": 0, + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "line" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 85 + } + ] + }, + "unit": "volt" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 5, + "x": 0, + "y": 18 + }, + "id": 21, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "targets": [ + { + "exemplar": true, + "expr": "device_attribute{device=\"lts/apspu/1\",name=~\"APSPU_.*_VOUT_R\"}", + "interval": "", + "legendFormat": "{{name}} {{x}} ", + "refId": "A" + } + ], + "title": "APSPU Voltages", + "type": "timeseries" + }, + { + "datasource": "Prometheus", + "description": "Voltage sensors of each node on each board", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 2, + "axisSoftMin": 0, + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "line" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 85 + } + ] + }, + "unit": "volt" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 5, + "x": 5, + "y": 18 + }, + "id": 10, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "targets": [ + { + "exemplar": true, + "expr": "device_attribute{device=\"lts/unb2/1\",name=\"UNB2_FPGA_POL_CORE_VOUT_R\"}", + "interval": "", + "legendFormat": "Core board {{x}} node {{y}}", + "refId": "A" + }, + { + "exemplar": true, + "expr": "device_attribute{device=\"lts/unb2/1\",name=\"UNB2_FPGA_POL_ERAM_VOUT_R\"}", + "hide": false, + "interval": "", + "legendFormat": "ERAM board {{x}} node {{y}}", + "refId": "B" + }, + { + "exemplar": true, + "expr": "device_attribute{device=\"lts/unb2/1\",name=\"UNB2_FPGA_POL_RXGXB_VOUT_R\"}", + "hide": false, + "interval": "", + "legendFormat": "TrRx board {{x}} node {{y}}", + "refId": "C" + }, + { + "exemplar": true, + "expr": "device_attribute{device=\"lts/unb2/1\",name=\"UNB2_FPGA_POL_TXGB_VOUT_R\"}", + "hide": false, + "interval": "", + "legendFormat": "TrHx board {{x}} node {{y}}", + "refId": "D" + }, + { + "exemplar": true, + "expr": "device_attribute{device=\"lts/unb2/1\",name=\"UNB2_FPGA_POL_PGM_VOUT_R\"}", + "hide": false, + "interval": "", + "legendFormat": "IO board {{x}} node {{y}}", + "refId": "E" + } + ], + "title": "Uniboard2 Voltages", + "type": "timeseries" + }, + { + "datasource": "Prometheus", + "description": "Voltage sensors of the power supply on each board", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic", + "seriesBy": "max" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMin": 0, + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "line" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 85 + } + ] + }, + "unit": "volt" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 5, + "x": 10, + "y": 18 + }, + "id": 12, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "targets": [ + { + "exemplar": true, + "expr": "device_attribute{device=\"lts/unb2/1\",name=\"UNB2_POL_QSFP_N01_VOUT_R\"}", + "interval": "", + "legendFormat": "QSFP N01 board {{x}} ", + "refId": "A" + }, + { + "exemplar": true, + "expr": "device_attribute{device=\"lts/unb2/1\",name=\"UNB2_POL_QSFP_N23_VOUT_R\"}", + "hide": false, + "interval": "", + "legendFormat": "QSFP N23 board {{x}}", + "refId": "B" + }, + { + "exemplar": true, + "expr": "device_attribute{device=\"lts/unb2/1\",name=\"UNB2_POL_SWITCH_1V2_VOUT_R\"}", + "hide": false, + "interval": "", + "legendFormat": "Switch 1v2 board {{x}}", + "refId": "C" + }, + { + "exemplar": true, + "expr": "device_attribute{device=\"lts/unb2/1\",name=\"UNB2_POL_SWITCH_PHY_VOUT_R\"}", + "hide": false, + "interval": "", + "legendFormat": "Switch PHY board {{x}}", + "refId": "D" + }, + { + "exemplar": true, + "expr": "device_attribute{device=\"lts/unb2/1\",name=\"UNB2_POL_CLOCK_VOUT_R\"}", + "hide": false, + "interval": "", + "legendFormat": "Clock PWR board {{x}}", + "refId": "E" + }, + { + "exemplar": true, + "expr": "device_attribute{device=\"lts/unb2/1\",name=\"UNB2_DC_DC_48V_12V_VOUT_R\"}", + "hide": false, + "interval": "", + "legendFormat": "DC-DC board {{x}}", + "refId": "F" + } + ], + "title": "Uniboard2 Power Supply Voltages", + "type": "timeseries" + }, + { + "collapsed": true, + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 26 + }, + "id": 20, + "panels": [], + "title": "Clock stability", + "type": "row" + }, + { + "datasource": "Prometheus", + "description": "Measured difference between PTP and PPS", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": 60000, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 2, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": null + }, + { + "color": "green", + "value": 0.001 + }, + { + "color": "red", + "value": 0.1 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 5, + "x": 0, + "y": 27 + }, + "id": 14, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "exemplar": true, + "expr": "device_attribute{device=\"lts/sdp/1\",name=\"TR_tod_pps_delta_R\"}", + "format": "time_series", + "hide": false, + "instant": false, + "interval": "", + "legendFormat": "{{x}}", + "refId": "A" + } + ], + "title": "FPGA Clock offset", + "transformations": [], + "type": "timeseries" + } + ], + "schemaVersion": 31, + "style": "dark", + "tags": [], + "templating": { + "list": [] + }, + "time": { + "from": "now-30m", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "Sensors", + "uid": "KMRmQzd7z", + "version": 1 +} diff --git a/docker-compose/grafana/dashboards/version-information.json b/docker-compose/grafana/dashboards/version-information.json index e82135a1ad0867223a061481c79bb8a0dd8f0d9f..8b5e17bebd870d923d8944293a2bc66bddf79544 100644 --- a/docker-compose/grafana/dashboards/version-information.json +++ b/docker-compose/grafana/dashboards/version-information.json @@ -679,7 +679,7 @@ }, "timepicker": {}, "timezone": "", - "title": "Version information", + "title": "Versions", "uid": "eR9posS7z", "version": 1 } diff --git a/docker-compose/integration-test.yml b/docker-compose/integration-test.yml index 23b114b08916f5850bc6a89ec26dcc1c45935cfd..defb45e3c3183516131795b283372ca784635d8c 100644 --- a/docker-compose/integration-test.yml +++ b/docker-compose/integration-test.yml @@ -15,6 +15,8 @@ services: container_name: ${CONTAINER_NAME_PREFIX}integration-test networks: - control + extra_hosts: + - "host.docker.internal:host-gateway" volumes: - ..:/opt/lofar/tango:rw environment: diff --git a/docker-compose/itango.yml b/docker-compose/itango.yml index 5b0874f2f3c936c1b57915580ac79be81b5edcb9..9b01c4ea25e2abc5849c9a98c29cc7601ba1115f 100644 --- a/docker-compose/itango.yml +++ b/docker-compose/itango.yml @@ -21,6 +21,8 @@ services: container_name: ${CONTAINER_NAME_PREFIX}itango networks: - control + extra_hosts: + - "host.docker.internal:host-gateway" volumes: - ..:/opt/lofar/tango:rw - ${HOME}:/hosthome diff --git a/docker-compose/jupyter/Dockerfile b/docker-compose/jupyter/Dockerfile index 8be3e9f3900b01e80893d38aedcb4f6397aa8fd0..5393cece6a74ff1de85e9c37ce6a8307e3a66cf5 100644 --- a/docker-compose/jupyter/Dockerfile +++ b/docker-compose/jupyter/Dockerfile @@ -25,6 +25,7 @@ RUN sudo pip3 install notebook-as-pdf # see https://github.com/jupyter/nbconvert/issues/1434 RUN sudo bash -c "echo DEFAULT_ARGS += [\\\"--no-sandbox\\\"] >> /usr/local/lib/python3.7/dist-packages/pyppeteer/launcher.py" +RUN sudo apt-get update -y RUN sudo apt-get install -y gconf-service libasound2 libatk1.0-0 libatk-bridge2.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget libcairo-gobject2 libxinerama1 libgtk2.0-0 libpangoft2-1.0-0 libthai0 libpixman-1-0 libxcb-render0 libharfbuzz0b libdatrie1 libgraphite2-3 libgbm1 # Allow Download as -> PDF via LaTeX diff --git a/docker-compose/jupyter/ipython-profiles/stationcontrol-jupyter/startup/01-devices.py b/docker-compose/jupyter/ipython-profiles/stationcontrol-jupyter/startup/01-devices.py index f6174de984585a0d6a8ebd64be104a9f31e1f7cd..05914fbf1bb3bbde3793c15f2f62b3e306bb022a 100644 --- a/docker-compose/jupyter/ipython-profiles/stationcontrol-jupyter/startup/01-devices.py +++ b/docker-compose/jupyter/ipython-profiles/stationcontrol-jupyter/startup/01-devices.py @@ -1,4 +1,6 @@ # Create shortcuts for our devices +apsct = DeviceProxy("LTS/APSCT/1") +apspu = DeviceProxy("LTS/APSPU/1") recv = DeviceProxy("LTS/RECV/1") sdp = DeviceProxy("LTS/SDP/1") sst = DeviceProxy("LTS/SST/1") @@ -8,4 +10,4 @@ boot = DeviceProxy("LTS/Boot/1") docker = DeviceProxy("LTS/Docker/1") # Put them in a list in case one wants to iterate -devices = [recv, sdp, sst, xst, unb2, boot, docker] +devices = [apsct, apspu, recv, sdp, sst, xst, unb2, boot, docker] diff --git a/docker-compose/lofar-device-base.yml b/docker-compose/lofar-device-base.yml index 22ecabca37c526867afe52461d7ce432964f8385..ce110ed85ba0cfb20b607ab7d08e70505d2392e8 100644 --- a/docker-compose/lofar-device-base.yml +++ b/docker-compose/lofar-device-base.yml @@ -20,5 +20,9 @@ services: args: SOURCE_IMAGE: ${DOCKER_REGISTRY_HOST}/${DOCKER_REGISTRY_USER}-tango-itango:${TANGO_ITANGO_VERSION} container_name: ${CONTAINER_NAME_PREFIX}lofar-device-base + # These parameters are just visual queues, you have to define them again + # in derived docker-compose files! networks: - control + extra_hosts: + - "host.docker.internal:host-gateway" diff --git a/docker-compose/prometheus.yml b/docker-compose/prometheus.yml index a0971c48fde4551809a936594aadcb6a79076712..abec3c84e5e86abc0e5a00dbbbdcb99b05e7daf8 100644 --- a/docker-compose/prometheus.yml +++ b/docker-compose/prometheus.yml @@ -16,4 +16,10 @@ services: - control ports: - "9090:9090" + logging: + driver: syslog + options: + syslog-address: udp://${HOSTNAME}:1514 + syslog-format: rfc3164 + tag: "{{.Name}}" restart: unless-stopped diff --git a/docker-compose/recv-sim/Dockerfile b/docker-compose/pypcc-sim-base/Dockerfile similarity index 100% rename from docker-compose/recv-sim/Dockerfile rename to docker-compose/pypcc-sim-base/Dockerfile diff --git a/docker-compose/recv-sim/requirements.txt b/docker-compose/pypcc-sim-base/requirements.txt similarity index 100% rename from docker-compose/recv-sim/requirements.txt rename to docker-compose/pypcc-sim-base/requirements.txt diff --git a/docker-compose/recv-sim.yml b/docker-compose/recv-sim.yml index edd4bc7e4efb589b55e9f7306da431ba91660b56..effee8b298b855e2007e50c379fa3df45010bd05 100644 --- a/docker-compose/recv-sim.yml +++ b/docker-compose/recv-sim.yml @@ -9,12 +9,9 @@ version: '2' services: recv-sim: build: - context: recv-sim + context: pypcc-sim-base container_name: ${CONTAINER_NAME_PREFIX}recv-sim networks: - control - volumes: - - ${HOME}:/hosthome - ports: - - "4843:4843" - restart: unless-stopped + entrypoint: python3 pypcc2.py --simulator --port 4840 --config RECVTR + restart: on-failure diff --git a/docker-compose/rest.yml b/docker-compose/rest.yml index b76ed39c5319b10403a93db6736ce8d640380efc..8e61958ba5c2a9e31677ca1b22acd7fa30cb0248 100644 --- a/docker-compose/rest.yml +++ b/docker-compose/rest.yml @@ -33,3 +33,10 @@ services: - /usr/bin/supervisord - --configuration - /etc/supervisor/supervisord.conf + logging: + driver: syslog + options: + syslog-address: udp://${HOSTNAME}:1514 + syslog-format: rfc3164 + tag: "{{.Name}}" + restart: unless-stopped diff --git a/docker-compose/sdptr-sim.yml b/docker-compose/sdptr-sim.yml index c61cf8cfa84a6c65647c7a8bae4d0569aa60dad6..c81c3db9ae4744e013b5a92f1ebb5e9bdaa6e92c 100644 --- a/docker-compose/sdptr-sim.yml +++ b/docker-compose/sdptr-sim.yml @@ -13,6 +13,4 @@ services: container_name: ${CONTAINER_NAME_PREFIX}sdptr-sim networks: - control - ports: - - "4840:4840" restart: unless-stopped diff --git a/docker-compose/sdptr-sim/Dockerfile b/docker-compose/sdptr-sim/Dockerfile index fa23fe4d6458f4b7023c24b36774566cbac2163c..57fe98141f180a4d15a1e2d87c2c67be8f5894ff 100644 --- a/docker-compose/sdptr-sim/Dockerfile +++ b/docker-compose/sdptr-sim/Dockerfile @@ -16,5 +16,7 @@ RUN cd /sdptr && \ ./configure && \ bash -c "make -j `nproc` install" +COPY simulator.conf /sdptr/src/simulator.conf + WORKDIR /sdptr/src -CMD ["sdptr", "--type=LTS", "--configfile=uniboard.conf", "--nodaemon"] +CMD ["sdptr", "--type=simulator", "--configfile=simulator.conf", "--nodaemon"] diff --git a/docker-compose/sdptr-sim/simulator.conf b/docker-compose/sdptr-sim/simulator.conf new file mode 100644 index 0000000000000000000000000000000000000000..5ad69a8aed4807b815eeea18993d2b06e747b29f --- /dev/null +++ b/docker-compose/sdptr-sim/simulator.conf @@ -0,0 +1,19 @@ +# sdptr.conf +# configuration file for the SDP Translator. +# +# this config file holds settings for all [type]. +# +# # settings per type +# [LB_CORE] # [ant_band_station_type] +# n_fpgas = 16 # 8 or 16 +# first_pfga_nr = 0 # 0 for LB or 16 for HB +# ip_prefix = 10.99. # first part of ip (last part is hardware dependent) +# n_beamsets = 1 # 1 for 'LB', 'HB Remote' and 'HB International' and 2 for 'HB Core' + + +[simulator] +n_fpgas = 16 +first_fpga_nr = 0 +ip_prefix = 127.0. +n_beamsets = 1 + diff --git a/docker-compose/tango-prometheus-exporter/ska-tango-grafana-exporter b/docker-compose/tango-prometheus-exporter/ska-tango-grafana-exporter index 774d39a40ca19c9d979ad22565e57b4af3e9a831..dddb23ff587f6e9c837cdb77e7955e94272eca6f 160000 --- a/docker-compose/tango-prometheus-exporter/ska-tango-grafana-exporter +++ b/docker-compose/tango-prometheus-exporter/ska-tango-grafana-exporter @@ -1 +1 @@ -Subproject commit 774d39a40ca19c9d979ad22565e57b4af3e9a831 +Subproject commit dddb23ff587f6e9c837cdb77e7955e94272eca6f diff --git a/docker-compose/tango.yml b/docker-compose/tango.yml index 9fa0f5cde06f91b7cdc078f5c6481b013442e5ae..420f2d005a340186be7fcc1f011d11681e025029 100644 --- a/docker-compose/tango.yml +++ b/docker-compose/tango.yml @@ -28,6 +28,12 @@ services: - tangodb:/var/lib/mysql ports: - "3306:3306" + logging: + driver: syslog + options: + syslog-address: udp://${HOSTNAME}:1514 + syslog-format: rfc3164 + tag: "{{.Name}}" restart: unless-stopped databaseds: @@ -55,4 +61,10 @@ services: - "2" - -ORBendPoint - giop:tcp::10000 + logging: + driver: syslog + options: + syslog-address: udp://${HOSTNAME}:1514 + syslog-format: rfc3164 + tag: "{{.Name}}" restart: unless-stopped diff --git a/docker-compose/unb2-sim.yml b/docker-compose/unb2-sim.yml index 95468917e21eb5a2d5c5789a01dbd049de6eb091..d1ecaaa70a3c1e52f39ab1453d2ec8eb191f8831 100644 --- a/docker-compose/unb2-sim.yml +++ b/docker-compose/unb2-sim.yml @@ -9,12 +9,9 @@ version: '2' services: unb2-sim: build: - context: unb2-sim + context: pypcc-sim-base container_name: ${CONTAINER_NAME_PREFIX}unb2-sim networks: - control - volumes: - - ${HOME}:/hosthome - ports: - - "4844:4844" - restart: unless-stopped + entrypoint: python3 pypcc2.py --simulator --port 4841 --config UNB2 + restart: on-failure diff --git a/docker-compose/unb2-sim/Dockerfile b/docker-compose/unb2-sim/Dockerfile deleted file mode 100644 index cbb4ce80185ee1cf0a84aabc457a7983e57b5651..0000000000000000000000000000000000000000 --- a/docker-compose/unb2-sim/Dockerfile +++ /dev/null @@ -1,10 +0,0 @@ -FROM ubuntu:20.04 - -COPY requirements.txt /requirements.txt - -RUN apt-get update && apt-get install -y python3 python3-pip python3-yaml git && \ - pip3 install -r requirements.txt && \ - git clone --depth 1 --branch master https://git.astron.nl/lofar2.0/pypcc - -WORKDIR /pypcc -CMD ["python3","pypcc2.py","--simulator", "--port=4844", "--config=UNB2"] diff --git a/docker-compose/unb2-sim/requirements.txt b/docker-compose/unb2-sim/requirements.txt deleted file mode 100644 index 5badf0e57069366adedc43ca2c2b59dc7dc4b35d..0000000000000000000000000000000000000000 --- a/docker-compose/unb2-sim/requirements.txt +++ /dev/null @@ -1,4 +0,0 @@ -#check if this file is necessary -opcua -numpy -recordclass>=0.16,<0.16.1 \ No newline at end of file diff --git a/docs/source/configure_station.rst b/docs/source/configure_station.rst index 412795ff05d649ab57d255f566178a50614091bb..0796d098044b64cf22e8984a450f3f51752e5f0b 100644 --- a/docs/source/configure_station.rst +++ b/docs/source/configure_station.rst @@ -1,7 +1,13 @@ Enter your LOFAR2.0 Hardware Configuration =========================================== -The software will need to be told various aspects of your station configuration, for example, the hostnames of the station hardware to control. The following settings are installation specific, and are stored as *properties* in the :ref:`tangodb`. The format used here is ``device.property``: +The software will need to be told various aspects of your station configuration, for example, the hostnames of the station hardware to control. The following settings are installation specific, and are stored as *properties* in the :ref:`tangodb`. + +Stock configurations are provided for several stations, as well as using simulators to simulate the station's interface (which is the default after bootstrapping a station). These are provided in the ``CDB/stations/`` directory, and can be loaded using for example:: + + sbin/update_ConfigDb.sh CDB/stations/LTS_ConfigDb.json + +The following sections describe the settings that are station dependent, and thus must or can be set. Mandatory settings ------------------- diff --git a/docs/source/developer.rst b/docs/source/developer.rst index 517dfa324298e9451bfa5f9b25eef9726476686e..38b18bc5d199546d93e0387788b640350471b61d 100644 --- a/docs/source/developer.rst +++ b/docs/source/developer.rst @@ -59,3 +59,40 @@ For more information, see: - https://huihoo.org/ace_tao/ACE-5.2+TAO-1.2/TAO/docs/ORBEndpoint.html - http://omniorb.sourceforge.net/omni42/omniNames.html - https://sourceforge.net/p/omniorb/svn/HEAD/tree/trunk/omniORB/src/lib/omniORB/orbcore/tcp/tcpEndpoint.cc + +Logging +------------------------- + +The ELK stack collects the logs from the containers, as well as any external processes that send theirs. It is the *Logstash* part of ELK that is responsible for this. The following interfaces are available for this purpose: + ++-------------+------------+-------------------------------------------------------------------------------------------------------------+ +| Interface | Port | Note | ++=============+============+=============================================================================================================+ +| Syslog | 1514/udp | Recommended over TCP, as the ELK stack might be down. | ++-------------+------------+-------------------------------------------------------------------------------------------------------------+ +| Syslog | 1514/tcp | | ++-------------+------------+-------------------------------------------------------------------------------------------------------------+ +| JSON | 5959/tcp | From python, recommended is the `LogStash Async <https://pypi.org/project/python-logstash-async/>`_ module. | ++-------------+------------+-------------------------------------------------------------------------------------------------------------+ +| Beats | 5044/tcp | Use `FileBeat <https://www.elastic.co/beats/filebeat>`_ to watch logs locally, and forward them to ELK. | ++-------------+------------+-------------------------------------------------------------------------------------------------------------+ + +We recommend making sure the contents of your log lines are parsed correctly, especially if logs are routed to the *Syslog* input. These configurations are stored in ``docker-compose/elk/logstash/conf.d``. An example: + +.. literalinclude:: ../../docker-compose/elk/logstash/conf.d/22-parse-tango-rest.conf + +Log from Python +````````````````` + +The ``common.lofar_logging`` module provides an easy way to log to the ELK stack from a Python Tango device. + +Log from Docker +````````````````` + +Not all Docker containers run our Python programs, and can forward the logs themselves. For those, we use the ``syslog`` log driver in Docker. Extend the ``docker compose`` files with: + +.. literalinclude:: ../../docker-compose/rest.yml + :start-at: logging: + :end-before: restart: + +Logs forwarded in this way are provided with the container name, their timestamp, and a log level guessed by Docker. It is thus wise to parse the message content further in Logstash (see above). diff --git a/docs/source/devices/boot.rst b/docs/source/devices/boot.rst new file mode 100644 index 0000000000000000000000000000000000000000..53e2bab88d35f4a751c8e3809a24c1d3a0113f6b --- /dev/null +++ b/docs/source/devices/boot.rst @@ -0,0 +1,26 @@ +.. _boot: + +Boot +==================== + +The ``boot == DeviceProxy("LTS/Boot/1")`` device is responsible for (re)starting and initialising the other devices. Devices which are not reachable, for example because their docker container is explicitly stopped, are skipped during initialisation. This device provides the following commands: + +:initialise_station(): Stop and start the other devices in the correct order, set their default values, and command them to initialise their hardware. This procedure runs asynchronously, causing this command to return immediately. Initialisation is aborted if an error is encountered. + + :returns: ``None`` + +The initialisation process can subsequently be followed through monitoring the following attributes: + +:initialising_R: Whether the initialisation procedure is still ongoing. + + :type: ``bool`` + +:initialisation_progress_R: Percentage completeness of the initialisation procedure. Each succesfully configured device increments progress. + + :type: ``int`` + +:initialisation_status_R: A description of what the device is currently trying to do. If an error occurs, this will hint towards the cause. + + :type: ``str`` + +A useful pattern is thus to call ``initialise_station()``, wait for ``initialising_R == False``, and then check whether the initalisation was succesful, if ``initialisation_progress_R == 100``. If a device fails to initialise, most likely the :doc:`../interfaces/logs` will need to be consulted. diff --git a/docs/source/devices/configure.rst b/docs/source/devices/configure.rst index aa96966d2ee9d383c60e6a1651d0064bb8b914d2..074cc4776b11bfef1b1a8908aca64eb3e060b3c5 100644 --- a/docs/source/devices/configure.rst +++ b/docs/source/devices/configure.rst @@ -4,7 +4,7 @@ Device Configuration The devices receive their configuration from two sources: - The TangoDB database, for static *properties*, -- Externally, from the user, or a control system, that set *control attributes* (see :doc:`devices` for what to set, and :ref:`attributes` for how to set them). +- Externally, from the user, or a control system, that set *control attributes* (see the section for each device for what to set, and :ref:`attributes` for how to set them). .. _tangodb: diff --git a/docs/source/devices/docker.rst b/docs/source/devices/docker.rst new file mode 100644 index 0000000000000000000000000000000000000000..df80cf64dc6be38f405688d9d11c7519c59079c3 --- /dev/null +++ b/docs/source/devices/docker.rst @@ -0,0 +1,18 @@ +.. _docker: + +Docker +==================== + +The ``docker == DeviceProxy("LTS/Docker/1")`` device controls the docker containers. It allows starting and stopping them, and querying whether they are running. Each container is represented by two attributes: + +:<container>_R: Returns whether the container is running. + + :type: ``bool`` + +:<container>_RW: Set to ``True`` to start the container, and to ``False`` to stop it. + + :type: ``bool`` + +.. warning:: Do *not* stop the ``tango`` container, as doing so cripples the Tango infrastructure, leaving the station inoperable. It is also not wise to stop the ``device_docker`` container, as doing so would render this device unreachable. + + diff --git a/docs/source/devices/recv.rst b/docs/source/devices/recv.rst new file mode 100644 index 0000000000000000000000000000000000000000..d92ac6eca48eacc17667133b057bc9b127e5e08f --- /dev/null +++ b/docs/source/devices/recv.rst @@ -0,0 +1,15 @@ +RECV +==================== + +The ``recv == DeviceProxy("LTS/RECV/1")`` device controls the RCUs, the LBA antennas, and HBA tiles. Central to its operation are the masks (see also :ref:`attribute-masks`): + +:RCU_mask_RW: Controls which RCUs will actually be configured when attributes referring to RCUs are written. + + :type: ``bool[N_RCUs]`` + +:Ant_mask_RW: Controls which antennas will actually be configured when attributes referring to antennas are written. + + :type: ``bool[N_RCUs][N_antennas_per_RCU]`` + +Typically, ``N_RCUs == 32``, and ``N_antennas_per_RCU == 3``. + diff --git a/docs/source/devices/sdp.rst b/docs/source/devices/sdp.rst new file mode 100644 index 0000000000000000000000000000000000000000..b5f38ca5b2d8fe346a1ee90ec5a3a49c0b939af7 --- /dev/null +++ b/docs/source/devices/sdp.rst @@ -0,0 +1,95 @@ +SDP +==================== + +The ``sdp == DeviceProxy("LTS/SDP/1")``` device controls the digital signal processing in SDP, performed by the firmware on the FPGAs on the Uniboards. Central to its operation is the mask (see also :ref:`attribute-masks`): + +:TR_fpga_mask_RW: Controls which FPGAs will actually be configured when attributes referring to FPGAs are written. + + :type: ``bool[N_fpgas]`` + +Typically, ``N_fpgas == 16``. + +See the following links for a full description of the SDP monitoring and control points: + +- https://support.astron.nl/confluence/pages/viewpage.action?spaceKey=L2M&title=L2+STAT+Decision%3A+SC+-+SDP+OPC-UA+interface +- https://plm.astron.nl/polarion/#/project/LOFAR2System/wiki/L2%20Interface%20Control%20Documents/SC%20to%20SDP%20ICD + +Basic configuration +--------------------- + +The following points are significant for the operations of this device: + +:FPGA_processing_enable_R: Whether the FPGA is processing its input. + + :type: ``bool[N_fpgas]`` + +:TR_fpga_communication_error_R: Whether the FPGAs can be reached. + + :type: ``bool[N_fpgas]`` + +Data-quality information +--------------------------- + +The following fields describe the data quality: + +:FPGA_signal_input_mean_R: Mean value of the last second of input (in ADC quantisation units). Should be close to 0. + + :type: ``double[N_fpgas][N_ants_per_fpga]`` + +:FPGA_signal_input_rms_R: Root means square value of the last second of input (in ADC quantisation units). ``rms^2 = mean^2 + std^2``. Values above 2048 indicate strong RFI. + + :type: ``double[N_fpgas][N_ants_per_fpga]`` + +Version Information +--------------------- + +The following fields provide version information: + +:FPGA_firmware_version_R: The active firmware images. + + :type: ``str[N_fpgas]`` + +:FPGA_hardware_version_R: The versions of the boards hosting the FPGAs. + + :type: ``str[N_fpgas]`` + +:TR_software_version_R: The version of the server providing the OPC-UA interface. + + :type: ``str[N_fpgas]`` + +Waveform Generator +--------------------- + +The antenna input of SDP can be replaced by an internal waveform generator for debugging and testing purposes. The generator is configured per antenna per FPGA: + +:FPGA_wg_enable_RW: Whether the waveform generator is enabled for each input. + + :type: ``bool[N_fpgas][N_ants_per_fpga]`` + +:FPGA_wg_phase_RW: The phases of the generated waves (in degrees). The generator needs to be turned off and on if this is changed, in order to bring the generators in sync. + + :type: ``float32[N_fpgas][N_ants_per_fpga]`` + +:FPGA_wg_frequency_RW: The frequencies of the generated waves (in Hz). The frequency of a subband ``s`` is LBA: ``s * 200e6/1024``, HBA low band: ``(512 + s) * 200e6/1024``, HBA high band: ``(1024 + s) * 200e6/1024``. + + :type: ``float32[N_fpgas][N_ants_per_fpga]`` + +:FPGA_wg_amplitude_RW: The amplitudes of the generated waves. Useful is a value of ``0.1``, as higher risks clipping. + + :type: ``float32[N_fpgas][N_ants_per_fpga]`` + +Usage example +``````````````````````` + +For example, the following code inserts a wave on LBA subband 102 on FPGAs 8 - 11:: + + # configure FPGAs to control + sdp.TR_fpga_mask_RW = [False] * 8 + [True] * 4 + [False] * 4 + + # configure waveform generator + sdp.FPGA_wg_phase_RW = [[0] * 12] * 16 + sdp.FPGA_wg_amplitude_RW = [[0.1] * 12] * 16 + sdp.FPGA_wg_frequency_RW = [[102 * 200e6/1024] * 12] * 16 + + # enable waveform generator + sdp.FPGA_wg_enable_RW = [[True] * 12] * 16 diff --git a/docs/source/devices/devices.rst b/docs/source/devices/sst-xst.rst similarity index 57% rename from docs/source/devices/devices.rst rename to docs/source/devices/sst-xst.rst index 1c6090bef3066def70a032b191688d8d0444cb03..b5c5c1c57cdd72da3f4b71c23110b75dc009fe6c 100644 --- a/docs/source/devices/devices.rst +++ b/docs/source/devices/sst-xst.rst @@ -1,79 +1,5 @@ -Devices -============ - -.. _boot: - -Boot ---------- - -The ``boot == DeviceProxy("LTS/Boot/1")`` device is responsible for (re)starting and initialising the other devices. Devices which are not reachable, for example because their docker container is explicitly stopped, are skipped during initialisation. This device provides the following commands: - -:initialise_station(): Stop and start the other devices in the correct order, set their default values, and command them to initialise their hardware. This procedure runs asynchronously, causing this command to return immediately. Initialisation is aborted if an error is encountered. - - :returns: ``None`` - -The initialisation process can subsequently be followed through monitoring the following attributes: - -:initialising_R: Whether the initialisation procedure is still ongoing. - - :type: ``bool`` - -:initialisation_progress_R: Percentage completeness of the initialisation procedure. Each succesfully configured device increments progress. - - :type: ``int`` - -:initialisation_status_R: A description of what the device is currently trying to do. If an error occurs, this will hint towards the cause. - - :type: ``str`` - -A useful pattern is thus to call ``initialise_station()``, wait for ``initialising_R == False``, and then check whether the initalisation was succesful, if ``initialisation_progress_R == 100``. If a device fails to initialise, most likely the :doc:`../interfaces/logs` will need to be consulted. - -.. _docker: - -Docker ---------- - -The ``docker == DeviceProxy("LTS/Docker/1")`` device controls the docker containers. It allows starting and stopping them, and querying whether they are running. Each container is represented by two attributes: - -:<container>_R: Returns whether the container is running. - - :type: ``bool`` - -:<container>_RW: Set to ``True`` to start the container, and to ``False`` to stop it. - - :type: ``bool`` - -.. warning:: Do *not* stop the ``tango`` container, as doing so cripples the Tango infrastructure, leaving the station inoperable. It is also not wise to stop the ``device_docker`` container, as doing so would render this device unreachable. - - -RECV ----------- - -The ``recv == DeviceProxy("LTS/RECV/1")`` device controls the RCUs, the LBA antennas, and HBA tiles. Central to its operation are the masks (see also :ref:`attribute-masks`): - -:RCU_mask_RW: Controls which RCUs will actually be configured when attributes referring to RCUs are written. - - :type: ``bool[N_RCUs]`` - -:Ant_mask_RW: Controls which antennas will actually be configured when attributes referring to antennas are written. - - :type: ``bool[N_RCUs][N_antennas_per_RCU]`` - -Typically, ``N_RCUs == 32``, and ``N_antennas_per_RCU == 3``. - -SDP ------------ - -The ``sdp == DeviceProxy("LTS/SDP/1")``` device controls the digital signal processing in SDP, performed by the firmware on the FPGAs on the Uniboards. Central to its operation is the mask (see also :ref:`attribute-masks`): - -:TR_fpga_mask_RW: Controls which FPGAs will actually be configured when attributes referring to FPGAs are written. - - :type: ``bool[N_fpgas]`` - -Typically, ``N_fpgas == 16``. - SST and XST ------------ +==================== The ``sst == DeviceProxy("LTS/SST/1")`` and ``xst == DeviceProxy("LTS/XST/1")`` devices manages the SSTs (subband statistics) and XSTs (crosslet statistics), respectively. The statistics are emitted piece-wise through UDP packets by the FPGAs on the Uniboards in SDP. By default, each device configures the statistics to be streamed to itself (the device), from where the user can obtain them. @@ -82,8 +8,13 @@ The statistics are exposed in two ways, as: - *Attributes*, representing the most recently received values, - *TCP stream*, to allow the capture and recording of the statistics over any period of time. +See the following links for a full description of the SST and XST monitoring and control points: + +- https://support.astron.nl/confluence/pages/viewpage.action?spaceKey=L2M&title=L2+STAT+Decision%3A+SC+-+SDP+OPC-UA+interface +- https://plm.astron.nl/polarion/#/project/LOFAR2System/wiki/L2%20Interface%20Control%20Documents/SC%20to%20SDP%20ICD + SST Statistics attributes -````````````````````````` +------------------------------ The SSTs represent the amplitude of the signal in each subband, for each antenna, as an integer value. They are exposed through the following attributes: @@ -106,13 +37,13 @@ The SSTs represent the amplitude of the signal in each subband, for each antenna Typically, ``N_ant == 192``, and ``N_subbands == 512``. XST Statistics attributes -````````````````````````` +------------------------------ The XSTs represent the cross-correlations between each pair of antennas, as complex values. The phases and amplitudes of the XSTs represent the phase and amplitude difference between the antennas, respectively. They are exposed as a matrix ``xst[a][b]``, of which only the triangle ``a<=b`` is filled, as the cross-correlation between antenna pairs ``(b,a)`` is equal to the complex conjugate of the cross-correlation of ``(a,b)``. The other triangle contains incidental values, but will be mostly 0. Complex values which cannot be represented in Tango attributes. Instead, the XST matrix is exposed as both their carthesian and polar parts: -:xst_power_R, xst_phase_R: Amplitude and phase of the crosslet statistics. +:xst_power_R, xst_phase_R: Amplitude and phase (in radians) of the crosslet statistics. :type: ``float32[N_ant][N_ant]`` @@ -145,8 +76,8 @@ Conversely, to calculate the block index for an antenna pair ``(a,b)``, use:: def block_nr(a: int, b: int) -> int: return baseline_index(a // 12, b // 12) -TCP stream -`````````` +Subscribe to statistics streams +--------------------------------- The TCP stream interface allows a user to subscribe to the statistics packet streams, combined into a single TCP stream. The statistics will be streamed until the user disconnects, or the device is turned off. Any number of subscribers is supported, as bandwidth allows. Simply connect to the following port: @@ -176,4 +107,3 @@ The correct port will automatically be chosen, depending on the given mode. See The writer can also parse a statistics stream stored in a file. This allows the stream to be captured and processed independently. Capturing the stream can for example be done using ``netcat``:: nc localhost 5101 > SST-packets.bin - diff --git a/docs/source/devices/using.rst b/docs/source/devices/using.rst index 8c2a58ca814fdea541e8e5dbcbe5b9ae189b5e84..66760ebfd53de7df20fe4e58144c7d4b99dc3ecb 100644 --- a/docs/source/devices/using.rst +++ b/docs/source/devices/using.rst @@ -75,7 +75,7 @@ Most devices provide the following commands, in order to configure the hardware :initialise_hardware(): For devices that control hardware, this command runs the hardware initialisation procedure. -Typically, ``set_defaults()`` and ``initialise_hardware()`` are called in that order in the ``STANDBY`` state. The :ref:`boot` device runs these commands as part of its station initialsation sequence. +Typically, ``set_defaults()`` and ``initialise_hardware()`` are called in that order in the ``STANDBY`` state. See also :ref:`boot`, which provides functionality to initialise all the devices. .. _attributes: diff --git a/docs/source/faq.rst b/docs/source/faq.rst index 367492e002e5d0d4bf20442c6e5e596ef78b852f..8e35fceab3ec6ea07124e1181fccffdbe3cea679 100644 --- a/docs/source/faq.rst +++ b/docs/source/faq.rst @@ -7,12 +7,19 @@ Connecting to devices My device is unreachable, but the device logs say it's running fine? `````````````````````````````````````````````````````````````````````````````````````````````````````````````` -The ``$HOSTNAME`` may have been incorrectly guessed by ``docker-compose/Makefile``, or you accidently set it to an incorrect value. See :ref:`corba`. +The ``$HOSTNAME`` may have been incorrectly guessed by ``docker-compose/Makefile``, or you accidently set it to an incorrect value. If you have ``$HOSTNAME`` set in the shell running ``make``, try:: + + unset HOSTNAME + make build + make stop + make start + +If this does not work, you need to set ``$HOSTNAME`` to something that resolves to your machine, both for external parties and for docker containers. See :ref:`corba`. I get "API_CorbaException: TRANSIENT CORBA system exception: TRANSIENT_NoUsableProfile" when trying to connect to a device? ```````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````` -The ``$HOSTNAME`` may have been incorrectly guessed by ``docker-compose/Makefile``, or you accidently set it to an incorrect value. See :ref:`corba`. +See the previous answer. Docker -------------------------------------------------------------------------------------------------------------- diff --git a/docs/source/index.rst b/docs/source/index.rst index 524d21369c9e0ded662f12a365d479ce3dc39abc..b81b9c631131a08319d1ec2e07f868455a9a956a 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -19,7 +19,11 @@ Even without having access to any LOFAR2.0 hardware, you can install the full st installation interfaces/overview devices/using - devices/devices + devices/boot + devices/docker + devices/recv + devices/sdp + devices/sst-xst devices/configure configure_station developer diff --git a/docs/source/installation.rst b/docs/source/installation.rst index cb0122ae95cc01de7f55e333345a6ec4d41bc369..58ccf2cd360261256774826a7904973ac6c44b70 100644 --- a/docs/source/installation.rst +++ b/docs/source/installation.rst @@ -20,13 +20,7 @@ Next, we bootstrap the system. This will build our docker images, start key ones cd docker-compose make bootstrap -If you lack access to LOFAR station hardware, load additional configurations to use the simulators instead:: - - for sim in ../CDB/*-sim-config.json; do - ../sbin/update_ConfigDb.sh ../CDB${sim}-config.json - done - -If you do have access to LOFAR station hardware, you will have to :doc:`configure_station`. +If you do have access to LOFAR station hardware, you must upload its configuration to the configuration database. See :doc:`configure_station`. Now we are ready to start the other containers:: diff --git a/docs/source/interfaces/logs.rst b/docs/source/interfaces/logs.rst index 2b5c605ec5e47cf8b98b09dba47f6e6954f468ba..fa0d29765c5d228454222a8f4a8d3d8f935c46be 100644 --- a/docs/source/interfaces/logs.rst +++ b/docs/source/interfaces/logs.rst @@ -15,11 +15,11 @@ ELK To monitor the logs remotely, or to browse older logs, use the *ELK stack* that is included on the station, and served on http://localhost:5601. ELK, or ElasticSearch + Logstash + Kibana, is a popular log collection and querying system. Currently, the following logs are collected in our ELK installation: - Logs of all devices, -- Logs of the Jupyter notebook server. +- Logs of the Docker containers. If you browse to the ELK stack (actually, it is Kibana providing the GUI), your go-to is the *Discover* view at http://localhost:5601/app/discover. There, you can construct (and save, load) a dashboard that provides a custom view of the logs, based on the *index pattern* ``logstash-*``. There is a lot to take in, and there are excellent Kibana tutorials on the web. -To get going, use for example `this dashboard <http://localhost:5601/app/discover#/?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now-60m,to:now))&_a=(columns:!(extra.tango_device,level,message),filters:!(),index:'1e8ca200-1be0-11ec-a85f-b97e4206c18b',interval:auto,query:(language:kuery,query:''),sort:!())>`_, which shows the logs of the last hour, with some useful columns added to the default timestamp and message columns. Expand the time range if no logs appear, to look further back. You should see something like: +To get going, use for example `this dashboard <http://localhost:5601/app/discover#/?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now-1h,to:now))&_a=(columns:!(extra.lofar_id,program,level,message),filters:!(),index:'1e8ca200-1be0-11ec-a85f-b97e4206c18b',interval:auto,query:(language:kuery,query:'extra.lofar_id.keyword%20:%20*'),sort:!())>`_, which shows the logs of the last hour, with some useful columns added to the default timestamp and message columns. Expand the time range if no logs appear, to look further back. You should see something like: .. image:: elk_last_hour.png diff --git a/jupyter-notebooks/Archiving_load_test.ipynb b/jupyter-notebooks/Archiving_load_test.ipynb new file mode 100644 index 0000000000000000000000000000000000000000..afe61dacb2c9d01c17035ab641b4affadd31d7fa --- /dev/null +++ b/jupyter-notebooks/Archiving_load_test.ipynb @@ -0,0 +1,1265 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "id": "d9f35471", + "metadata": {}, + "outputs": [], + "source": [ + "import sys, time\n", + "import numpy as np\n", + "sys.path.append('/hosthome/tango/devices')\n", + "from toolkit.archiver import *\n", + "from matplotlib import pyplot as plt" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "id": "5817986f", + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Attribute lts/recv/1/version_r not found in archiving list!\n", + "Attribute lts/recv/1/opcua_missing_attributes_r not found in archiving list!\n", + "Attribute lts/recv/1/ant_mask_rw removed!\n", + "Attribute lts/recv/1/ant_status_r not found in archiving list!\n", + "Attribute lts/recv/1/clk_enable_pwr_r removed!\n", + "Attribute lts/recv/1/clk_i2c_status_r removed!\n", + "Attribute lts/recv/1/clk_pll_error_r removed!\n", + "Attribute lts/recv/1/clk_pll_locked_r removed!\n", + "Attribute lts/recv/1/clk_monitor_rate_rw removed!\n", + "Attribute lts/recv/1/clk_translator_busy_r removed!\n", + "Attribute lts/recv/1/hba_element_beamformer_delays_r removed!\n", + "Attribute lts/recv/1/hba_element_beamformer_delays_rw removed!\n", + "Attribute lts/recv/1/hba_element_led_r removed!\n", + "Attribute lts/recv/1/hba_element_led_rw removed!\n", + "Attribute lts/recv/1/hba_element_lna_pwr_r removed!\n", + "Attribute lts/recv/1/hba_element_lna_pwr_rw removed!\n", + "Attribute lts/recv/1/hba_element_pwr_r removed!\n", + "Attribute lts/recv/1/hba_element_pwr_rw removed!\n", + "Attribute lts/recv/1/rcu_adc_lock_r removed!\n", + "Attribute lts/recv/1/rcu_attenuator_r removed!\n", + "Attribute lts/recv/1/rcu_attenuator_rw removed!\n", + "Attribute lts/recv/1/rcu_band_r removed!\n", + "Attribute lts/recv/1/rcu_band_rw removed!\n", + "Attribute lts/recv/1/rcu_i2c_status_r removed!\n", + "Attribute lts/recv/1/rcu_id_r removed!\n", + "Attribute lts/recv/1/rcu_led0_r removed!\n", + "Attribute lts/recv/1/rcu_led0_rw removed!\n", + "Attribute lts/recv/1/rcu_led1_r removed!\n", + "Attribute lts/recv/1/rcu_led1_rw removed!\n", + "Attribute lts/recv/1/rcu_mask_rw removed!\n", + "Attribute lts/recv/1/rcu_monitor_rate_rw removed!\n", + "Attribute lts/recv/1/rcu_pwr_dig_r removed!\n", + "Attribute lts/recv/1/rcu_translator_busy_r removed!\n", + "Attribute lts/recv/1/rcu_version_r removed!\n", + "Attribute lts/recv/1/state removed!\n", + "Attribute lts/recv/1/status removed!\n", + "Attribute lts/recv/1/rcu_temperature_r already in archiving list!\n", + "Attribute lts/sdp/1/version_r not found in archiving list!\n", + "Attribute lts/sdp/1/opcua_missing_attributes_r not found in archiving list!\n", + "Attribute lts/sdp/1/fpga_wg_amplitude_rw not found in archiving list!\n", + "Attribute lts/sdp/1/fpga_wg_frequency_rw not found in archiving list!\n", + "Attribute lts/sdp/1/fpga_wg_phase_rw not found in archiving list!\n", + "Attribute lts/sdp/1/fpga_beamlet_output_enable_r not found in archiving list!\n", + "Attribute lts/sdp/1/fpga_beamlet_output_enable_rw not found in archiving list!\n", + "Attribute lts/sdp/1/fpga_beamlet_output_hdr_eth_destination_mac_r not found in archiving list!\n", + "Attribute lts/sdp/1/fpga_beamlet_output_hdr_eth_destination_mac_rw not found in archiving list!\n", + "Attribute lts/sdp/1/fpga_beamlet_output_hdr_ip_destination_address_r not found in archiving list!\n", + "Attribute lts/sdp/1/fpga_beamlet_output_hdr_ip_destination_address_rw not found in archiving list!\n", + "Attribute lts/sdp/1/fpga_beamlet_output_hdr_udp_destination_port_r not found in archiving list!\n", + "Attribute lts/sdp/1/fpga_beamlet_output_hdr_udp_destination_port_rw not found in archiving list!\n", + "Attribute lts/sdp/1/fpga_beamlet_output_scale_r not found in archiving list!\n", + "Attribute lts/sdp/1/fpga_beamlet_output_scale_rw not found in archiving list!\n", + "Attribute lts/sdp/1/fpga_firmware_version_r not found in archiving list!\n", + "Attribute lts/sdp/1/fpga_global_node_index_r not found in archiving list!\n", + "Attribute lts/sdp/1/fpga_hardware_version_r not found in archiving list!\n", + "Attribute lts/sdp/1/fpga_processing_enable_r not found in archiving list!\n", + "Attribute lts/sdp/1/fpga_processing_enable_rw not found in archiving list!\n", + "Attribute lts/sdp/1/fpga_scrap_r removed!\n", + "Attribute lts/sdp/1/fpga_scrap_rw removed!\n", + "Attribute lts/sdp/1/fpga_signal_input_mean_r not found in archiving list!\n", + "Attribute lts/sdp/1/fpga_signal_input_rms_r not found in archiving list!\n", + "Attribute lts/sdp/1/fpga_sdp_info_antenna_band_index_r not found in archiving list!\n", + "Attribute lts/sdp/1/fpga_sdp_info_block_period_r not found in archiving list!\n", + "Attribute lts/sdp/1/fpga_sdp_info_f_adc_r not found in archiving list!\n", + "Attribute lts/sdp/1/fpga_sdp_info_fsub_type_r not found in archiving list!\n", + "Attribute lts/sdp/1/fpga_sdp_info_nyquist_sampling_zone_index_r not found in archiving list!\n", + "Attribute lts/sdp/1/fpga_sdp_info_nyquist_sampling_zone_index_rw not found in archiving list!\n", + "Attribute lts/sdp/1/fpga_sdp_info_observation_id_r not found in archiving list!\n", + "Attribute lts/sdp/1/fpga_sdp_info_observation_id_rw not found in archiving list!\n", + "Attribute lts/sdp/1/fpga_sdp_info_station_id_r not found in archiving list!\n", + "Attribute lts/sdp/1/fpga_sdp_info_station_id_rw not found in archiving list!\n", + "Attribute lts/sdp/1/fpga_subband_weights_r not found in archiving list!\n", + "Attribute lts/sdp/1/fpga_subband_weights_rw not found in archiving list!\n", + "Attribute lts/sdp/1/fpga_temp_r removed!\n", + "Attribute lts/sdp/1/fpga_weights_r removed!\n", + "Attribute lts/sdp/1/fpga_weights_rw removed!\n", + "Attribute lts/sdp/1/fpga_wg_amplitude_r not found in archiving list!\n", + "Attribute lts/sdp/1/fpga_wg_enable_r not found in archiving list!\n", + "Attribute lts/sdp/1/fpga_wg_enable_rw not found in archiving list!\n", + "Attribute lts/sdp/1/fpga_wg_frequency_r not found in archiving list!\n", + "Attribute lts/sdp/1/fpga_wg_phase_r not found in archiving list!\n", + "Attribute lts/sdp/1/tr_fpga_mask_r not found in archiving list!\n", + "Attribute lts/sdp/1/tr_fpga_mask_rw not found in archiving list!\n", + "Attribute lts/sdp/1/tr_fpga_communication_error_r not found in archiving list!\n", + "Attribute lts/sdp/1/tr_sdp_config_first_fpga_nr_r not found in archiving list!\n", + "Attribute lts/sdp/1/tr_sdp_config_nof_beamsets_r not found in archiving list!\n", + "Attribute lts/sdp/1/tr_sdp_config_nof_fpgas_r not found in archiving list!\n", + "Attribute lts/sdp/1/tr_software_version_r not found in archiving list!\n", + "Attribute lts/sdp/1/tr_start_time_r not found in archiving list!\n", + "Attribute lts/sdp/1/tr_tod_r removed!\n", + "Attribute lts/sdp/1/tr_tod_pps_delta_r not found in archiving list!\n", + "Attribute lts/sdp/1/state not found in archiving list!\n", + "Attribute lts/sdp/1/status not found in archiving list!\n", + "Device LTS/SST/1 offline\n", + "Device LTS/XST/1 offline\n", + "Device LTS/UNB2/1 offline\n" + ] + } + ], + "source": [ + "# Apply the chosen JSON configuration file in directory toolkit/archiver_config/\n", + "archiver = Archiver(selector_filename='lofar2.json')" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "id": "848dc5e7", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "lofar2.json\n" + ] + }, + { + "data": { + "text/plain": [ + "{'global_variables': {'development_polling_time': '10000',\n", + " 'development_archive_time': '60000'},\n", + " 'devices': {'LTS/RECV/1': {'environment': 'development',\n", + " 'include': ['rcu_temperature_r'],\n", + " 'exclude': ['CLK_Enable_PWR_R',\n", + " 'CLK_I2C_STATUS_R',\n", + " 'CLK_PLL_error_R',\n", + " 'CLK_PLL_locked_R',\n", + " 'CLK_translator_busy_R']},\n", + " 'LTS/SDP/1': {'environment': 'development', 'include': [], 'exclude': []},\n", + " 'LTS/SST/1': {'environment': 'development', 'include': [], 'exclude': []},\n", + " 'LTS/XST/1': {'environment': 'development', 'include': [], 'exclude': []},\n", + " 'LTS/UNB2/1': {'environment': 'development', 'include': [], 'exclude': []}}}" + ] + }, + "execution_count": 3, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# Print the configuration file (as a dictionary)\n", + "selector = archiver.selector\n", + "print(selector.filename)\n", + "env_dict = selector.get_dict()\n", + "env_dict" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "id": "a81e8b3b", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "OFF\n" + ] + } + ], + "source": [ + "device_name = 'LTS/RECV/1'\n", + "d=DeviceProxy(device_name) \n", + "state = str(d.state())\n", + "print(state)" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "id": "f5394d09", + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Attribute lts/recv/1/version_r will not be archived because polling is set to FALSE!\n", + "Attribute lts/recv/1/opcua_missing_attributes_r will not be archived because polling is set to FALSE!\n", + "Attribute lts/recv/1/ant_status_r will not be archived because polling is set to FALSE!\n" + ] + } + ], + "source": [ + "# Add RECV attributes to perform load test\n", + "archiver.add_attributes_by_device(device_name,global_archive_period=5000)" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "id": "ba3a25ac", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'tango://databaseds:10000/lts/recv/1/rcu_temperature_r': 'Read value for attribute RCU_temperature_R has not been updated'}" + ] + }, + "execution_count": 6, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# Print the errors for each attribute\n", + "# If the device is in OFF state, all its attributes should be in error (normal behaviour)\n", + "err_dict = archiver.get_subscriber_errors()\n", + "err_dict" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "id": "b4de92a0", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Device is now in ON state\n" + ] + } + ], + "source": [ + "# Start the device\n", + "if state == \"OFF\":\n", + " time.sleep(1)\n", + " d.initialise()\n", + " time.sleep(1)\n", + "state = str(d.state())\n", + "if state == \"STANDBY\":\n", + " d.on()\n", + "state = str(d.state())\n", + "if state == \"ON\":\n", + " d.set_defaults()\n", + " print(\"Device is now in ON state\")" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "id": "5d40b87c", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "('tango://databaseds:10000/lts/recv/1/rcu_temperature_r',\n", + " 'tango://databaseds:10000/lts/recv/1/ant_mask_rw',\n", + " 'tango://databaseds:10000/lts/recv/1/clk_enable_pwr_r',\n", + " 'tango://databaseds:10000/lts/recv/1/clk_i2c_status_r',\n", + " 'tango://databaseds:10000/lts/recv/1/clk_pll_error_r',\n", + " 'tango://databaseds:10000/lts/recv/1/clk_pll_locked_r',\n", + " 'tango://databaseds:10000/lts/recv/1/clk_monitor_rate_rw',\n", + " 'tango://databaseds:10000/lts/recv/1/clk_translator_busy_r',\n", + " 'tango://databaseds:10000/lts/recv/1/hba_element_beamformer_delays_r',\n", + " 'tango://databaseds:10000/lts/recv/1/hba_element_beamformer_delays_rw',\n", + " 'tango://databaseds:10000/lts/recv/1/hba_element_led_r',\n", + " 'tango://databaseds:10000/lts/recv/1/hba_element_led_rw',\n", + " 'tango://databaseds:10000/lts/recv/1/hba_element_lna_pwr_r',\n", + " 'tango://databaseds:10000/lts/recv/1/hba_element_lna_pwr_rw',\n", + " 'tango://databaseds:10000/lts/recv/1/hba_element_pwr_r',\n", + " 'tango://databaseds:10000/lts/recv/1/hba_element_pwr_rw',\n", + " 'tango://databaseds:10000/lts/recv/1/rcu_adc_lock_r',\n", + " 'tango://databaseds:10000/lts/recv/1/rcu_attenuator_r',\n", + " 'tango://databaseds:10000/lts/recv/1/rcu_attenuator_rw',\n", + " 'tango://databaseds:10000/lts/recv/1/rcu_band_r',\n", + " 'tango://databaseds:10000/lts/recv/1/rcu_band_rw',\n", + " 'tango://databaseds:10000/lts/recv/1/rcu_i2c_status_r',\n", + " 'tango://databaseds:10000/lts/recv/1/rcu_id_r',\n", + " 'tango://databaseds:10000/lts/recv/1/rcu_led0_r',\n", + " 'tango://databaseds:10000/lts/recv/1/rcu_led0_rw',\n", + " 'tango://databaseds:10000/lts/recv/1/rcu_led1_r',\n", + " 'tango://databaseds:10000/lts/recv/1/rcu_led1_rw',\n", + " 'tango://databaseds:10000/lts/recv/1/rcu_mask_rw',\n", + " 'tango://databaseds:10000/lts/recv/1/rcu_monitor_rate_rw',\n", + " 'tango://databaseds:10000/lts/recv/1/rcu_pwr_dig_r',\n", + " 'tango://databaseds:10000/lts/recv/1/rcu_translator_busy_r',\n", + " 'tango://databaseds:10000/lts/recv/1/rcu_version_r',\n", + " 'tango://databaseds:10000/lts/recv/1/state',\n", + " 'tango://databaseds:10000/lts/recv/1/status')" + ] + }, + "execution_count": 8, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# Print the attributes currently managed by the event subscriber\n", + "attrs = archiver.get_subscriber_attributes()\n", + "attrs" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "id": "678879e3", + "metadata": { + "scrolled": true + }, + "outputs": [ + { + "data": { + "text/plain": [ + "{'tango://databaseds:10000/lts/recv/1/rcu_temperature_r': 'Read value for attribute RCU_temperature_R has not been updated',\n", + " 'tango://databaseds:10000/lts/recv/1/ant_mask_rw': 'Read value for attribute Ant_mask_RW has not been updated',\n", + " 'tango://databaseds:10000/lts/recv/1/clk_enable_pwr_r': 'Read value for attribute CLK_Enable_PWR_R has not been updated',\n", + " 'tango://databaseds:10000/lts/recv/1/clk_i2c_status_r': 'Read value for attribute CLK_I2C_STATUS_R has not been updated',\n", + " 'tango://databaseds:10000/lts/recv/1/clk_pll_error_r': 'Read value for attribute CLK_PLL_error_R has not been updated',\n", + " 'tango://databaseds:10000/lts/recv/1/clk_pll_locked_r': 'Read value for attribute CLK_PLL_locked_R has not been updated',\n", + " 'tango://databaseds:10000/lts/recv/1/clk_monitor_rate_rw': 'Read value for attribute CLK_monitor_rate_RW has not been updated',\n", + " 'tango://databaseds:10000/lts/recv/1/clk_translator_busy_r': 'Read value for attribute CLK_translator_busy_R has not been updated',\n", + " 'tango://databaseds:10000/lts/recv/1/hba_element_beamformer_delays_r': 'Read value for attribute HBA_element_beamformer_delays_R has not been updated',\n", + " 'tango://databaseds:10000/lts/recv/1/hba_element_beamformer_delays_rw': 'Read value for attribute HBA_element_beamformer_delays_RW has not been updated',\n", + " 'tango://databaseds:10000/lts/recv/1/hba_element_led_r': 'Read value for attribute HBA_element_led_R has not been updated',\n", + " 'tango://databaseds:10000/lts/recv/1/hba_element_led_rw': 'Read value for attribute HBA_element_led_RW has not been updated',\n", + " 'tango://databaseds:10000/lts/recv/1/hba_element_lna_pwr_r': 'Read value for attribute HBA_element_LNA_pwr_R has not been updated',\n", + " 'tango://databaseds:10000/lts/recv/1/hba_element_lna_pwr_rw': 'Read value for attribute HBA_element_LNA_pwr_RW has not been updated',\n", + " 'tango://databaseds:10000/lts/recv/1/hba_element_pwr_r': 'Read value for attribute HBA_element_pwr_R has not been updated',\n", + " 'tango://databaseds:10000/lts/recv/1/hba_element_pwr_rw': 'Read value for attribute HBA_element_pwr_RW has not been updated',\n", + " 'tango://databaseds:10000/lts/recv/1/rcu_adc_lock_r': 'Read value for attribute RCU_ADC_lock_R has not been updated',\n", + " 'tango://databaseds:10000/lts/recv/1/rcu_attenuator_r': 'Read value for attribute RCU_attenuator_R has not been updated',\n", + " 'tango://databaseds:10000/lts/recv/1/rcu_attenuator_rw': 'Read value for attribute RCU_attenuator_RW has not been updated',\n", + " 'tango://databaseds:10000/lts/recv/1/rcu_band_r': 'Read value for attribute RCU_band_R has not been updated',\n", + " 'tango://databaseds:10000/lts/recv/1/rcu_band_rw': 'Read value for attribute RCU_band_RW has not been updated',\n", + " 'tango://databaseds:10000/lts/recv/1/rcu_i2c_status_r': 'Read value for attribute RCU_I2C_STATUS_R has not been updated',\n", + " 'tango://databaseds:10000/lts/recv/1/rcu_id_r': 'Read value for attribute RCU_ID_R has not been updated',\n", + " 'tango://databaseds:10000/lts/recv/1/rcu_led0_r': 'Read value for attribute RCU_LED0_R has not been updated',\n", + " 'tango://databaseds:10000/lts/recv/1/rcu_led0_rw': 'Read value for attribute RCU_LED0_RW has not been updated',\n", + " 'tango://databaseds:10000/lts/recv/1/rcu_led1_r': 'Read value for attribute RCU_LED1_R has not been updated',\n", + " 'tango://databaseds:10000/lts/recv/1/rcu_led1_rw': 'Read value for attribute RCU_LED1_RW has not been updated',\n", + " 'tango://databaseds:10000/lts/recv/1/rcu_mask_rw': 'Read value for attribute RCU_mask_RW has not been updated',\n", + " 'tango://databaseds:10000/lts/recv/1/rcu_monitor_rate_rw': 'Read value for attribute RCU_monitor_rate_RW has not been updated',\n", + " 'tango://databaseds:10000/lts/recv/1/rcu_pwr_dig_r': 'Read value for attribute RCU_Pwr_dig_R has not been updated',\n", + " 'tango://databaseds:10000/lts/recv/1/rcu_translator_busy_r': 'Read value for attribute RCU_translator_busy_R has not been updated',\n", + " 'tango://databaseds:10000/lts/recv/1/rcu_version_r': 'Read value for attribute RCU_version_R has not been updated',\n", + " 'tango://databaseds:10000/lts/recv/1/status': 'Storing Error: mysql_stmt_bind_param() failed, err=Buffer type is not supported'}" + ] + }, + "execution_count": 9, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# Print the errors for each attribute\n", + "err_dict = archiver.get_subscriber_errors()\n", + "err_dict" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "id": "d3904658", + "metadata": { + "scrolled": true + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Attribute Poll Period Archive Period \n", + "----------\n", + "LTS/RECV/1/rcu_temperature_r 10000 60000 \n", + "LTS/RECV/1/ant_mask_rw 1000 5000 \n", + "LTS/RECV/1/clk_enable_pwr_r 1000 5000 \n", + "LTS/RECV/1/clk_i2c_status_r 1000 5000 \n", + "LTS/RECV/1/clk_pll_error_r 1000 5000 \n", + "LTS/RECV/1/clk_pll_locked_r 1000 5000 \n", + "LTS/RECV/1/clk_monitor_rate_rw 1000 5000 \n", + "LTS/RECV/1/clk_translator_busy_r 1000 5000 \n", + "LTS/RECV/1/hba_element_beamformer_delays_r 1000 5000 \n", + "LTS/RECV/1/hba_element_beamformer_delays_rw 1000 5000 \n", + "LTS/RECV/1/hba_element_led_r 1000 5000 \n", + "LTS/RECV/1/hba_element_led_rw 1000 5000 \n", + "LTS/RECV/1/hba_element_lna_pwr_r 1000 5000 \n", + "LTS/RECV/1/hba_element_lna_pwr_rw 1000 5000 \n", + "LTS/RECV/1/hba_element_pwr_r 1000 5000 \n", + "LTS/RECV/1/hba_element_pwr_rw 1000 5000 \n", + "LTS/RECV/1/rcu_adc_lock_r 1000 5000 \n", + "LTS/RECV/1/rcu_attenuator_r 1000 5000 \n", + "LTS/RECV/1/rcu_attenuator_rw 1000 5000 \n", + "LTS/RECV/1/rcu_band_r 1000 5000 \n", + "LTS/RECV/1/rcu_band_rw 1000 5000 \n", + "LTS/RECV/1/rcu_i2c_status_r 1000 5000 \n", + "LTS/RECV/1/rcu_id_r 1000 5000 \n", + "LTS/RECV/1/rcu_led0_r 1000 5000 \n", + "LTS/RECV/1/rcu_led0_rw 1000 5000 \n", + "LTS/RECV/1/rcu_led1_r 1000 5000 \n", + "LTS/RECV/1/rcu_led1_rw 1000 5000 \n", + "LTS/RECV/1/rcu_mask_rw 1000 5000 \n", + "LTS/RECV/1/rcu_monitor_rate_rw 1000 5000 \n", + "LTS/RECV/1/rcu_pwr_dig_r 1000 5000 \n", + "LTS/RECV/1/rcu_translator_busy_r 1000 5000 \n", + "LTS/RECV/1/rcu_version_r 1000 5000 \n", + "LTS/RECV/1/state 1000 5000 \n", + "LTS/RECV/1/status 1000 5000 \n" + ] + } + ], + "source": [ + "# Print the attribute periods\n", + "def print_periods(attrs):\n", + " print(\"{:<45} {:<15} {:<15}\".format('Attribute','Poll Period','Archive Period'))\n", + " print(\"----------\")\n", + " for a in attrs:\n", + " ap = AttributeProxy(a)\n", + " att_fqname = ap.get_device_proxy().name()+'/'+ap.name()\n", + " print(\"{:<45} {:<15} {:<15}\".format(att_fqname,ap.get_poll_period(),ap.get_property('archive_period')['archive_period'][0],sep='\\t'))\n", + "\n", + "attrs = archiver.get_subscriber_attributes()\n", + "print_periods(attrs)" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "id": "27ef5564", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "'133.0 events/period'" + ] + }, + "execution_count": 11, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# Print the current event subscriber archive frequency (number of total archive events per minute)\n", + "# Be aware that these statistics need some time (even minutes) since the device initialization to be reliable\n", + "archiver.get_subscriber_load()" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "id": "241b5282", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Attribute Record Freq Failure Freq \n", + "----------\n", + "LTS/RECV/1/rcu_temperature_r 0.0 1.0 \n", + "LTS/RECV/1/ant_mask_rw 10.0 3.0 \n", + "LTS/RECV/1/clk_enable_pwr_r 0.0 12.0 \n", + "LTS/RECV/1/clk_i2c_status_r 0.0 12.0 \n", + "LTS/RECV/1/clk_pll_error_r 0.0 12.0 \n", + "LTS/RECV/1/clk_pll_locked_r 0.0 12.0 \n", + "LTS/RECV/1/clk_monitor_rate_rw 10.0 3.0 \n", + "LTS/RECV/1/clk_translator_busy_r 0.0 12.0 \n", + "LTS/RECV/1/hba_element_beamformer_delays_r 0.0 12.0 \n", + "LTS/RECV/1/hba_element_beamformer_delays_rw 10.0 3.0 \n", + "LTS/RECV/1/hba_element_led_r 0.0 12.0 \n", + "LTS/RECV/1/hba_element_led_rw 10.0 3.0 \n", + "LTS/RECV/1/hba_element_lna_pwr_r 0.0 12.0 \n", + "LTS/RECV/1/hba_element_lna_pwr_rw 10.0 3.0 \n", + "LTS/RECV/1/hba_element_pwr_r 0.0 12.0 \n", + "LTS/RECV/1/hba_element_pwr_rw 10.0 3.0 \n", + "LTS/RECV/1/rcu_adc_lock_r 0.0 12.0 \n", + "LTS/RECV/1/rcu_attenuator_r 0.0 12.0 \n", + "LTS/RECV/1/rcu_attenuator_rw 10.0 3.0 \n", + "LTS/RECV/1/rcu_band_r 0.0 12.0 \n", + "LTS/RECV/1/rcu_band_rw 10.0 3.0 \n", + "LTS/RECV/1/rcu_i2c_status_r 0.0 12.0 \n", + "LTS/RECV/1/rcu_id_r 0.0 12.0 \n", + "LTS/RECV/1/rcu_led0_r 10.0 3.0 \n", + "LTS/RECV/1/rcu_led0_rw 0.0 12.0 \n", + "LTS/RECV/1/rcu_led1_r 10.0 3.0 \n", + "LTS/RECV/1/rcu_led1_rw 10.0 3.0 \n", + "LTS/RECV/1/rcu_mask_rw 10.0 3.0 \n", + "LTS/RECV/1/rcu_monitor_rate_rw 0.0 12.0 \n", + "LTS/RECV/1/rcu_pwr_dig_r 0.0 12.0 \n", + "LTS/RECV/1/rcu_translator_busy_r 0.0 12.0 \n", + "LTS/RECV/1/rcu_version_r 13.0 0.0 \n", + "LTS/RECV/1/state 0.0 13.0 \n", + "LTS/RECV/1/status 0.0 6.0 \n" + ] + } + ], + "source": [ + "# Print the current attribute archive frequency (number of events per minute)\n", + "# E.G. if an attribute is supposed to be archived every 10s, its frequency value should be 6\n", + "def print_freq(attrs):\n", + " print(\"{:<45} {:<15} {:<15}\".format('Attribute','Record Freq','Failure Freq'))\n", + " print(\"----------\")\n", + " for a in attrs:\n", + " ap = AttributeProxy(a)\n", + " att_fqname = ap.get_device_proxy().name()+'/'+ap.name()\n", + " print(\"{:<45} {:<15} {:<15}\".format(att_fqname,archiver.get_attribute_freq(att_fqname),archiver.get_attribute_failures(att_fqname)))\n", + "\n", + "attrs = archiver.get_subscriber_attributes()\n", + "print_freq(attrs)" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "id": "25446390", + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Attribute LTS/RECV/1/rcu_id_r removed!\n" + ] + } + ], + "source": [ + "# Update the archive time of an attribute\n", + "archiver.update_archiving_attribute('LTS/RECV/1/rcu_id_r',polling_period=1000,event_period=10000)" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "id": "9cc4f883", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Attribute Poll Period Archive Period \n", + "----------\n", + "LTS/RECV/1/rcu_temperature_r 10000 60000 \n", + "LTS/RECV/1/ant_mask_rw 1000 5000 \n", + "LTS/RECV/1/clk_enable_pwr_r 1000 5000 \n", + "LTS/RECV/1/clk_i2c_status_r 1000 5000 \n", + "LTS/RECV/1/clk_pll_error_r 1000 5000 \n", + "LTS/RECV/1/clk_pll_locked_r 1000 5000 \n", + "LTS/RECV/1/clk_monitor_rate_rw 1000 5000 \n", + "LTS/RECV/1/clk_translator_busy_r 1000 5000 \n", + "LTS/RECV/1/hba_element_beamformer_delays_r 1000 5000 \n", + "LTS/RECV/1/hba_element_beamformer_delays_rw 1000 5000 \n", + "LTS/RECV/1/hba_element_led_r 1000 5000 \n", + "LTS/RECV/1/hba_element_led_rw 1000 5000 \n", + "LTS/RECV/1/hba_element_lna_pwr_r 1000 5000 \n", + "LTS/RECV/1/hba_element_lna_pwr_rw 1000 5000 \n", + "LTS/RECV/1/hba_element_pwr_r 1000 5000 \n", + "LTS/RECV/1/hba_element_pwr_rw 1000 5000 \n", + "LTS/RECV/1/rcu_adc_lock_r 1000 5000 \n", + "LTS/RECV/1/rcu_attenuator_r 1000 5000 \n", + "LTS/RECV/1/rcu_attenuator_rw 1000 5000 \n", + "LTS/RECV/1/rcu_band_r 1000 5000 \n", + "LTS/RECV/1/rcu_band_rw 1000 5000 \n", + "LTS/RECV/1/rcu_i2c_status_r 1000 5000 \n", + "LTS/RECV/1/rcu_led0_r 1000 5000 \n", + "LTS/RECV/1/rcu_led0_rw 1000 5000 \n", + "LTS/RECV/1/rcu_led1_r 1000 5000 \n", + "LTS/RECV/1/rcu_led1_rw 1000 5000 \n", + "LTS/RECV/1/rcu_mask_rw 1000 5000 \n", + "LTS/RECV/1/rcu_monitor_rate_rw 1000 5000 \n", + "LTS/RECV/1/rcu_pwr_dig_r 1000 5000 \n", + "LTS/RECV/1/rcu_translator_busy_r 1000 5000 \n", + "LTS/RECV/1/rcu_version_r 1000 5000 \n", + "LTS/RECV/1/state 1000 5000 \n", + "LTS/RECV/1/status 1000 5000 \n", + "LTS/RECV/1/rcu_id_r 1000 10000 \n", + "\n", + "Attribute Record Freq Failure Freq \n", + "----------\n", + "LTS/RECV/1/rcu_temperature_r 0.0 1.0 \n", + "LTS/RECV/1/ant_mask_rw 10.0 3.0 \n", + "LTS/RECV/1/clk_enable_pwr_r 0.0 12.0 \n", + "LTS/RECV/1/clk_i2c_status_r 0.0 12.0 \n", + "LTS/RECV/1/clk_pll_error_r 0.0 12.0 \n", + "LTS/RECV/1/clk_pll_locked_r 0.0 12.0 \n", + "LTS/RECV/1/clk_monitor_rate_rw 10.0 3.0 \n", + "LTS/RECV/1/clk_translator_busy_r 0.0 12.0 \n", + "LTS/RECV/1/hba_element_beamformer_delays_r 0.0 12.0 \n", + "LTS/RECV/1/hba_element_beamformer_delays_rw 10.0 3.0 \n", + "LTS/RECV/1/hba_element_led_r 0.0 12.0 \n", + "LTS/RECV/1/hba_element_led_rw 10.0 3.0 \n", + "LTS/RECV/1/hba_element_lna_pwr_r 0.0 12.0 \n", + "LTS/RECV/1/hba_element_lna_pwr_rw 10.0 3.0 \n", + "LTS/RECV/1/hba_element_pwr_r 0.0 12.0 \n", + "LTS/RECV/1/hba_element_pwr_rw 10.0 3.0 \n", + "LTS/RECV/1/rcu_adc_lock_r 0.0 12.0 \n", + "LTS/RECV/1/rcu_attenuator_r 0.0 12.0 \n", + "LTS/RECV/1/rcu_attenuator_rw 10.0 3.0 \n", + "LTS/RECV/1/rcu_band_r 0.0 12.0 \n", + "LTS/RECV/1/rcu_band_rw 10.0 3.0 \n", + "LTS/RECV/1/rcu_i2c_status_r 0.0 12.0 \n", + "LTS/RECV/1/rcu_led0_r 0.0 12.0 \n", + "LTS/RECV/1/rcu_led0_rw 10.0 3.0 \n", + "LTS/RECV/1/rcu_led1_r 0.0 12.0 \n", + "LTS/RECV/1/rcu_led1_rw 10.0 3.0 \n", + "LTS/RECV/1/rcu_mask_rw 10.0 3.0 \n", + "LTS/RECV/1/rcu_monitor_rate_rw 10.0 3.0 \n", + "LTS/RECV/1/rcu_pwr_dig_r 0.0 12.0 \n", + "LTS/RECV/1/rcu_translator_busy_r 0.0 12.0 \n", + "LTS/RECV/1/rcu_version_r 0.0 12.0 \n", + "LTS/RECV/1/state 13.0 0.0 \n", + "LTS/RECV/1/status 0.0 13.0 \n", + "LTS/RECV/1/rcu_id_r 0.0 6.0 \n" + ] + } + ], + "source": [ + "attrs = archiver.get_subscriber_attributes()\n", + "print_periods(attrs)\n", + "print()\n", + "print_freq(attrs)" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "id": "c3415c09", + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Attribute lts/sdp/1/version_r will not be archived because polling is set to FALSE!\n", + "Attribute lts/sdp/1/opcua_missing_attributes_r will not be archived because polling is set to FALSE!\n", + "Attribute lts/sdp/1/fpga_wg_amplitude_rw will not be archived because polling is set to FALSE!\n", + "Attribute lts/sdp/1/fpga_wg_frequency_rw will not be archived because polling is set to FALSE!\n", + "Attribute lts/sdp/1/fpga_wg_phase_rw will not be archived because polling is set to FALSE!\n", + "Attribute lts/sdp/1/fpga_beamlet_output_enable_r will not be archived because polling is set to FALSE!\n", + "Attribute lts/sdp/1/fpga_beamlet_output_enable_rw will not be archived because polling is set to FALSE!\n", + "Attribute lts/sdp/1/fpga_beamlet_output_hdr_eth_destination_mac_r will not be archived because polling is set to FALSE!\n", + "Attribute lts/sdp/1/fpga_beamlet_output_hdr_eth_destination_mac_rw will not be archived because polling is set to FALSE!\n", + "Attribute lts/sdp/1/fpga_beamlet_output_hdr_ip_destination_address_r will not be archived because polling is set to FALSE!\n", + "Attribute lts/sdp/1/fpga_beamlet_output_hdr_ip_destination_address_rw will not be archived because polling is set to FALSE!\n", + "Attribute lts/sdp/1/fpga_beamlet_output_hdr_udp_destination_port_r will not be archived because polling is set to FALSE!\n", + "Attribute lts/sdp/1/fpga_beamlet_output_hdr_udp_destination_port_rw will not be archived because polling is set to FALSE!\n", + "Attribute lts/sdp/1/fpga_beamlet_output_scale_r will not be archived because polling is set to FALSE!\n", + "Attribute lts/sdp/1/fpga_beamlet_output_scale_rw will not be archived because polling is set to FALSE!\n", + "Attribute lts/sdp/1/fpga_firmware_version_r will not be archived because polling is set to FALSE!\n", + "Attribute lts/sdp/1/fpga_global_node_index_r will not be archived because polling is set to FALSE!\n", + "Attribute lts/sdp/1/fpga_hardware_version_r will not be archived because polling is set to FALSE!\n", + "Attribute lts/sdp/1/fpga_processing_enable_r will not be archived because polling is set to FALSE!\n", + "Attribute lts/sdp/1/fpga_processing_enable_rw will not be archived because polling is set to FALSE!\n", + "Attribute lts/sdp/1/fpga_signal_input_mean_r will not be archived because polling is set to FALSE!\n", + "Attribute lts/sdp/1/fpga_signal_input_rms_r will not be archived because polling is set to FALSE!\n", + "Attribute lts/sdp/1/fpga_sdp_info_antenna_band_index_r will not be archived because polling is set to FALSE!\n", + "Attribute lts/sdp/1/fpga_sdp_info_block_period_r will not be archived because polling is set to FALSE!\n", + "Attribute lts/sdp/1/fpga_sdp_info_f_adc_r will not be archived because polling is set to FALSE!\n", + "Attribute lts/sdp/1/fpga_sdp_info_fsub_type_r will not be archived because polling is set to FALSE!\n", + "Attribute lts/sdp/1/fpga_sdp_info_nyquist_sampling_zone_index_r will not be archived because polling is set to FALSE!\n", + "Attribute lts/sdp/1/fpga_sdp_info_nyquist_sampling_zone_index_rw will not be archived because polling is set to FALSE!\n", + "Attribute lts/sdp/1/fpga_sdp_info_observation_id_r will not be archived because polling is set to FALSE!\n", + "Attribute lts/sdp/1/fpga_sdp_info_observation_id_rw will not be archived because polling is set to FALSE!\n", + "Attribute lts/sdp/1/fpga_sdp_info_station_id_r will not be archived because polling is set to FALSE!\n", + "Attribute lts/sdp/1/fpga_sdp_info_station_id_rw will not be archived because polling is set to FALSE!\n", + "Attribute lts/sdp/1/fpga_subband_weights_r will not be archived because polling is set to FALSE!\n", + "Attribute lts/sdp/1/fpga_subband_weights_rw will not be archived because polling is set to FALSE!\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "OFF\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Attribute lts/sdp/1/fpga_wg_amplitude_r will not be archived because polling is set to FALSE!\n", + "Attribute lts/sdp/1/fpga_wg_enable_r will not be archived because polling is set to FALSE!\n", + "Attribute lts/sdp/1/fpga_wg_enable_rw will not be archived because polling is set to FALSE!\n", + "Attribute lts/sdp/1/fpga_wg_frequency_r will not be archived because polling is set to FALSE!\n", + "Attribute lts/sdp/1/fpga_wg_phase_r will not be archived because polling is set to FALSE!\n", + "Attribute lts/sdp/1/tr_fpga_mask_r will not be archived because polling is set to FALSE!\n", + "Attribute lts/sdp/1/tr_fpga_mask_rw will not be archived because polling is set to FALSE!\n", + "Attribute lts/sdp/1/tr_fpga_communication_error_r will not be archived because polling is set to FALSE!\n", + "Attribute lts/sdp/1/tr_sdp_config_first_fpga_nr_r will not be archived because polling is set to FALSE!\n", + "Attribute lts/sdp/1/tr_sdp_config_nof_beamsets_r will not be archived because polling is set to FALSE!\n", + "Attribute lts/sdp/1/tr_sdp_config_nof_fpgas_r will not be archived because polling is set to FALSE!\n", + "Attribute lts/sdp/1/tr_software_version_r will not be archived because polling is set to FALSE!\n", + "Attribute lts/sdp/1/tr_start_time_r will not be archived because polling is set to FALSE!\n", + "Attribute lts/sdp/1/tr_tod_pps_delta_r will not be archived because polling is set to FALSE!\n" + ] + } + ], + "source": [ + "# Add SDP attributes to load test\n", + "sdp_name = 'LTS/SDP/1'\n", + "d2=DeviceProxy(sdp_name) \n", + "state = str(d2.state())\n", + "print(state)\n", + "archiver.add_attributes_by_device(sdp_name,global_archive_period=5000)" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "id": "141c52da", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Device is now in ON state\n" + ] + } + ], + "source": [ + "# Start the SDP device\n", + "if state == \"OFF\":\n", + " time.sleep(1)\n", + " d2.initialise()\n", + " time.sleep(1)\n", + "state = str(d2.state())\n", + "if state == \"STANDBY\":\n", + " d2.on()\n", + "state = str(d2.state())\n", + "if state == \"ON\":\n", + " d2.set_defaults()\n", + " print(\"Device is now in ON state\")" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "id": "b53e5b8b", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'tango://databaseds:10000/lts/recv/1/rcu_temperature_r': 'Read value for attribute RCU_temperature_R has not been updated',\n", + " 'tango://databaseds:10000/lts/recv/1/clk_enable_pwr_r': 'Read value for attribute CLK_Enable_PWR_R has not been updated',\n", + " 'tango://databaseds:10000/lts/recv/1/clk_i2c_status_r': 'Read value for attribute CLK_I2C_STATUS_R has not been updated',\n", + " 'tango://databaseds:10000/lts/recv/1/clk_pll_error_r': 'Read value for attribute CLK_PLL_error_R has not been updated',\n", + " 'tango://databaseds:10000/lts/recv/1/clk_pll_locked_r': 'Read value for attribute CLK_PLL_locked_R has not been updated',\n", + " 'tango://databaseds:10000/lts/recv/1/clk_translator_busy_r': 'Read value for attribute CLK_translator_busy_R has not been updated',\n", + " 'tango://databaseds:10000/lts/recv/1/hba_element_beamformer_delays_r': 'Read value for attribute HBA_element_beamformer_delays_R has not been updated',\n", + " 'tango://databaseds:10000/lts/recv/1/hba_element_led_r': 'Read value for attribute HBA_element_led_R has not been updated',\n", + " 'tango://databaseds:10000/lts/recv/1/hba_element_lna_pwr_r': 'Read value for attribute HBA_element_LNA_pwr_R has not been updated',\n", + " 'tango://databaseds:10000/lts/recv/1/hba_element_pwr_r': 'Read value for attribute HBA_element_pwr_R has not been updated',\n", + " 'tango://databaseds:10000/lts/recv/1/rcu_adc_lock_r': 'Read value for attribute RCU_ADC_lock_R has not been updated',\n", + " 'tango://databaseds:10000/lts/recv/1/rcu_attenuator_r': 'Read value for attribute RCU_attenuator_R has not been updated',\n", + " 'tango://databaseds:10000/lts/recv/1/rcu_band_r': 'Read value for attribute RCU_band_R has not been updated',\n", + " 'tango://databaseds:10000/lts/recv/1/rcu_i2c_status_r': 'Read value for attribute RCU_I2C_STATUS_R has not been updated',\n", + " 'tango://databaseds:10000/lts/recv/1/rcu_led0_r': 'Read value for attribute RCU_LED0_R has not been updated',\n", + " 'tango://databaseds:10000/lts/recv/1/rcu_led1_r': 'Read value for attribute RCU_LED1_R has not been updated',\n", + " 'tango://databaseds:10000/lts/recv/1/rcu_pwr_dig_r': 'Read value for attribute RCU_Pwr_dig_R has not been updated',\n", + " 'tango://databaseds:10000/lts/recv/1/rcu_translator_busy_r': 'Read value for attribute RCU_translator_busy_R has not been updated',\n", + " 'tango://databaseds:10000/lts/recv/1/rcu_version_r': 'Read value for attribute RCU_version_R has not been updated',\n", + " 'tango://databaseds:10000/lts/recv/1/status': 'Storing Error: mysql_stmt_bind_param() failed, err=Buffer type is not supported',\n", + " 'tango://databaseds:10000/lts/recv/1/rcu_id_r': 'Read value for attribute RCU_ID_R has not been updated',\n", + " 'tango://databaseds:10000/lts/sdp/1/fpga_scrap_r': 'Read value for attribute FPGA_scrap_R has not been updated',\n", + " 'tango://databaseds:10000/lts/sdp/1/fpga_scrap_rw': 'Read value for attribute FPGA_scrap_RW has not been updated',\n", + " 'tango://databaseds:10000/lts/sdp/1/fpga_temp_r': 'Read value for attribute FPGA_temp_R has not been updated',\n", + " 'tango://databaseds:10000/lts/sdp/1/fpga_weights_r': 'Read value for attribute FPGA_weights_R has not been updated',\n", + " 'tango://databaseds:10000/lts/sdp/1/fpga_weights_rw': 'Read value for attribute FPGA_weights_RW has not been updated',\n", + " 'tango://databaseds:10000/lts/sdp/1/tr_tod_r': 'Read value for attribute TR_tod_R has not been updated'}" + ] + }, + "execution_count": 17, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# Check errors\n", + "err_dict = archiver.get_subscriber_errors()\n", + "err_dict" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "id": "4fed6cf4", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Attribute Poll Period Archive Period \n", + "----------\n", + "LTS/RECV/1/rcu_temperature_r 10000 60000 \n", + "LTS/RECV/1/ant_mask_rw 1000 5000 \n", + "LTS/RECV/1/clk_enable_pwr_r 1000 5000 \n", + "LTS/RECV/1/clk_i2c_status_r 1000 5000 \n", + "LTS/RECV/1/clk_pll_error_r 1000 5000 \n", + "LTS/RECV/1/clk_pll_locked_r 1000 5000 \n", + "LTS/RECV/1/clk_monitor_rate_rw 1000 5000 \n", + "LTS/RECV/1/clk_translator_busy_r 1000 5000 \n", + "LTS/RECV/1/hba_element_beamformer_delays_r 1000 5000 \n", + "LTS/RECV/1/hba_element_beamformer_delays_rw 1000 5000 \n", + "LTS/RECV/1/hba_element_led_r 1000 5000 \n", + "LTS/RECV/1/hba_element_led_rw 1000 5000 \n", + "LTS/RECV/1/hba_element_lna_pwr_r 1000 5000 \n", + "LTS/RECV/1/hba_element_lna_pwr_rw 1000 5000 \n", + "LTS/RECV/1/hba_element_pwr_r 1000 5000 \n", + "LTS/RECV/1/hba_element_pwr_rw 1000 5000 \n", + "LTS/RECV/1/rcu_adc_lock_r 1000 5000 \n", + "LTS/RECV/1/rcu_attenuator_r 1000 5000 \n", + "LTS/RECV/1/rcu_attenuator_rw 1000 5000 \n", + "LTS/RECV/1/rcu_band_r 1000 5000 \n", + "LTS/RECV/1/rcu_band_rw 1000 5000 \n", + "LTS/RECV/1/rcu_i2c_status_r 1000 5000 \n", + "LTS/RECV/1/rcu_led0_r 1000 5000 \n", + "LTS/RECV/1/rcu_led0_rw 1000 5000 \n", + "LTS/RECV/1/rcu_led1_r 1000 5000 \n", + "LTS/RECV/1/rcu_led1_rw 1000 5000 \n", + "LTS/RECV/1/rcu_mask_rw 1000 5000 \n", + "LTS/RECV/1/rcu_monitor_rate_rw 1000 5000 \n", + "LTS/RECV/1/rcu_pwr_dig_r 1000 5000 \n", + "LTS/RECV/1/rcu_translator_busy_r 1000 5000 \n", + "LTS/RECV/1/rcu_version_r 1000 5000 \n", + "LTS/RECV/1/state 1000 5000 \n", + "LTS/RECV/1/status 1000 5000 \n", + "LTS/RECV/1/rcu_id_r 1000 10000 \n", + "LTS/SDP/1/fpga_scrap_r 1000 5000 \n", + "LTS/SDP/1/fpga_scrap_rw 1000 5000 \n", + "LTS/SDP/1/fpga_temp_r 1000 5000 \n", + "LTS/SDP/1/fpga_weights_r 1000 5000 \n", + "LTS/SDP/1/fpga_weights_rw 1000 5000 \n", + "LTS/SDP/1/tr_tod_r 1000 5000 \n", + "\n", + "Attribute Record Freq Failure Freq \n", + "----------\n", + "LTS/RECV/1/rcu_temperature_r 0.0 1.0 \n", + "LTS/RECV/1/ant_mask_rw 10.0 3.0 \n", + "LTS/RECV/1/clk_enable_pwr_r 0.0 12.0 \n", + "LTS/RECV/1/clk_i2c_status_r 0.0 12.0 \n", + "LTS/RECV/1/clk_pll_error_r 0.0 12.0 \n", + "LTS/RECV/1/clk_pll_locked_r 0.0 12.0 \n", + "LTS/RECV/1/clk_monitor_rate_rw 10.0 3.0 \n", + "LTS/RECV/1/clk_translator_busy_r 0.0 12.0 \n", + "LTS/RECV/1/hba_element_beamformer_delays_r 0.0 12.0 \n", + "LTS/RECV/1/hba_element_beamformer_delays_rw 10.0 3.0 \n", + "LTS/RECV/1/hba_element_led_r 0.0 12.0 \n", + "LTS/RECV/1/hba_element_led_rw 10.0 3.0 \n", + "LTS/RECV/1/hba_element_lna_pwr_r 0.0 12.0 \n", + "LTS/RECV/1/hba_element_lna_pwr_rw 10.0 3.0 \n", + "LTS/RECV/1/hba_element_pwr_r 0.0 12.0 \n", + "LTS/RECV/1/hba_element_pwr_rw 10.0 3.0 \n", + "LTS/RECV/1/rcu_adc_lock_r 0.0 12.0 \n", + "LTS/RECV/1/rcu_attenuator_r 0.0 12.0 \n", + "LTS/RECV/1/rcu_attenuator_rw 10.0 3.0 \n", + "LTS/RECV/1/rcu_band_r 0.0 12.0 \n", + "LTS/RECV/1/rcu_band_rw 10.0 3.0 \n", + "LTS/RECV/1/rcu_i2c_status_r 0.0 12.0 \n", + "LTS/RECV/1/rcu_led0_r 0.0 12.0 \n", + "LTS/RECV/1/rcu_led0_rw 10.0 3.0 \n", + "LTS/RECV/1/rcu_led1_r 0.0 12.0 \n", + "LTS/RECV/1/rcu_led1_rw 10.0 3.0 \n", + "LTS/RECV/1/rcu_mask_rw 10.0 3.0 \n", + "LTS/RECV/1/rcu_monitor_rate_rw 10.0 3.0 \n", + "LTS/RECV/1/rcu_pwr_dig_r 0.0 12.0 \n", + "LTS/RECV/1/rcu_translator_busy_r 0.0 12.0 \n", + "LTS/RECV/1/rcu_version_r 0.0 12.0 \n", + "LTS/RECV/1/state 13.0 0.0 \n", + "LTS/RECV/1/status 0.0 13.0 \n", + "LTS/RECV/1/rcu_id_r 0.0 6.0 \n", + "LTS/SDP/1/fpga_scrap_r 0.0 12.0 \n", + "LTS/SDP/1/fpga_scrap_rw 0.0 12.0 \n", + "LTS/SDP/1/fpga_temp_r 0.0 12.0 \n", + "LTS/SDP/1/fpga_weights_r 0.0 12.0 \n", + "LTS/SDP/1/fpga_weights_rw 0.0 12.0 \n", + "LTS/SDP/1/tr_tod_r 0.0 12.0 \n" + ] + } + ], + "source": [ + "# Check frequencies\n", + "attrs = archiver.get_subscriber_attributes()\n", + "print_periods(attrs)\n", + "print()\n", + "print_freq(attrs)" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "id": "6e495661", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "'lts/recv/1/ant_mask_rw'" + ] + }, + "execution_count": 19, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# Initialise the retriever object and print the archived attributes in the database\n", + "retriever = Retriever()\n", + "# Attribute chosen to be retrieved\n", + "attr_name = 'ant_mask_rw'\n", + "attr_fq_name = str(device_name+'/'+attr_name).lower()\n", + "attr_fq_name" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "id": "304f50f1", + "metadata": {}, + "outputs": [], + "source": [ + "# Retrieve records in the last n hours (works even with decimals)\n", + "\n", + "# Use alternatively one of the following two methods to retrieve data (last n hours or interval)\n", + "records= retriever.get_attribute_value_by_hours(attr_fq_name,hours=0.1)\n", + "#records = retriever.get_attribute_value_by_interval(attr_fq_name,'2021-09-01 16:00:00', '2021-09-01 16:03:00')\n", + "\n", + "if not records:\n", + " print('Empty result!')\n", + "else:\n", + " # Convert DB Array records into Python lists\n", + " data = build_array_from_record(records,records[0].dim_x_r)\n", + " # Extract only the value from the array \n", + " array_values = get_values_from_record(data)\n", + "\n", + "#records\n", + "#data\n", + "#array_values" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "id": "fb2c19f4", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[[<Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:11:45.984153',recv_time='2021-10-12 16:11:45.985227',insert_time='2021-10-12 16:11:47.172490',idx='0',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:11:45.984153',recv_time='2021-10-12 16:11:45.985227',insert_time='2021-10-12 16:11:47.172490',idx='1',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:11:45.984153',recv_time='2021-10-12 16:11:45.985227',insert_time='2021-10-12 16:11:47.172490',idx='2',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>],\n", + " [<Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:11:50.983968',recv_time='2021-10-12 16:11:50.985012',insert_time='2021-10-12 16:11:54.941481',idx='0',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:11:50.983968',recv_time='2021-10-12 16:11:50.985012',insert_time='2021-10-12 16:11:54.941481',idx='1',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:11:50.983968',recv_time='2021-10-12 16:11:50.985012',insert_time='2021-10-12 16:11:54.941481',idx='2',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>],\n", + " [<Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:11:55.984188',recv_time='2021-10-12 16:11:55.985084',insert_time='2021-10-12 16:11:58.436198',idx='0',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:11:55.984188',recv_time='2021-10-12 16:11:55.985084',insert_time='2021-10-12 16:11:58.436198',idx='1',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:11:55.984188',recv_time='2021-10-12 16:11:55.985084',insert_time='2021-10-12 16:11:58.436198',idx='2',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>],\n", + " [<Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:12:00.984500',recv_time='2021-10-12 16:12:00.985745',insert_time='2021-10-12 16:12:02.161066',idx='0',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:12:00.984500',recv_time='2021-10-12 16:12:00.985745',insert_time='2021-10-12 16:12:02.161066',idx='1',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:12:00.984500',recv_time='2021-10-12 16:12:00.985745',insert_time='2021-10-12 16:12:02.161066',idx='2',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>],\n", + " [<Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:12:05.984549',recv_time='2021-10-12 16:12:05.985632',insert_time='2021-10-12 16:12:07.162031',idx='0',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:12:05.984549',recv_time='2021-10-12 16:12:05.985632',insert_time='2021-10-12 16:12:07.162031',idx='1',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:12:05.984549',recv_time='2021-10-12 16:12:05.985632',insert_time='2021-10-12 16:12:07.162031',idx='2',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>],\n", + " [<Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:12:10.984455',recv_time='2021-10-12 16:12:10.985558',insert_time='2021-10-12 16:12:13.614716',idx='0',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:12:10.984455',recv_time='2021-10-12 16:12:10.985558',insert_time='2021-10-12 16:12:13.614716',idx='1',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:12:10.984455',recv_time='2021-10-12 16:12:10.985558',insert_time='2021-10-12 16:12:13.614716',idx='2',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>],\n", + " [<Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:12:15.984749',recv_time='2021-10-12 16:12:15.985754',insert_time='2021-10-12 16:12:17.710957',idx='0',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:12:15.984749',recv_time='2021-10-12 16:12:15.985754',insert_time='2021-10-12 16:12:17.710957',idx='1',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:12:15.984749',recv_time='2021-10-12 16:12:15.985754',insert_time='2021-10-12 16:12:17.710957',idx='2',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>],\n", + " [<Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:12:20.984437',recv_time='2021-10-12 16:12:20.985426',insert_time='2021-10-12 16:12:22.179278',idx='0',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:12:20.984437',recv_time='2021-10-12 16:12:20.985426',insert_time='2021-10-12 16:12:22.179278',idx='1',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:12:20.984437',recv_time='2021-10-12 16:12:20.985426',insert_time='2021-10-12 16:12:22.179278',idx='2',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>],\n", + " [<Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:12:25.984240',recv_time='2021-10-12 16:12:25.985322',insert_time='2021-10-12 16:12:27.121467',idx='0',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:12:25.984240',recv_time='2021-10-12 16:12:25.985322',insert_time='2021-10-12 16:12:27.121467',idx='1',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:12:25.984240',recv_time='2021-10-12 16:12:25.985322',insert_time='2021-10-12 16:12:27.121467',idx='2',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>],\n", + " [<Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:12:30.984213',recv_time='2021-10-12 16:12:30.985970',insert_time='2021-10-12 16:12:32.143646',idx='0',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:12:30.984213',recv_time='2021-10-12 16:12:30.985970',insert_time='2021-10-12 16:12:32.143646',idx='1',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:12:30.984213',recv_time='2021-10-12 16:12:30.985970',insert_time='2021-10-12 16:12:32.143646',idx='2',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>],\n", + " [<Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:12:35.984194',recv_time='2021-10-12 16:12:35.985136',insert_time='2021-10-12 16:12:37.105945',idx='0',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:12:35.984194',recv_time='2021-10-12 16:12:35.985136',insert_time='2021-10-12 16:12:37.105945',idx='1',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:12:35.984194',recv_time='2021-10-12 16:12:35.985136',insert_time='2021-10-12 16:12:37.105945',idx='2',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>],\n", + " [<Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:12:40.984436',recv_time='2021-10-12 16:12:40.985560',insert_time='2021-10-12 16:12:42.131690',idx='0',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:12:40.984436',recv_time='2021-10-12 16:12:40.985560',insert_time='2021-10-12 16:12:42.131690',idx='1',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:12:40.984436',recv_time='2021-10-12 16:12:40.985560',insert_time='2021-10-12 16:12:42.131690',idx='2',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>],\n", + " [<Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:12:45.984915',recv_time='2021-10-12 16:12:45.986000',insert_time='2021-10-12 16:12:47.175174',idx='0',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:12:45.984915',recv_time='2021-10-12 16:12:45.986000',insert_time='2021-10-12 16:12:47.175174',idx='1',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:12:45.984915',recv_time='2021-10-12 16:12:45.986000',insert_time='2021-10-12 16:12:47.175174',idx='2',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>],\n", + " [<Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:12:50.984633',recv_time='2021-10-12 16:12:50.985512',insert_time='2021-10-12 16:12:53.057782',idx='0',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:12:50.984633',recv_time='2021-10-12 16:12:50.985512',insert_time='2021-10-12 16:12:53.057782',idx='1',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:12:50.984633',recv_time='2021-10-12 16:12:50.985512',insert_time='2021-10-12 16:12:53.057782',idx='2',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>],\n", + " [<Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:12:55.984062',recv_time='2021-10-12 16:12:55.985186',insert_time='2021-10-12 16:12:57.789312',idx='0',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:12:55.984062',recv_time='2021-10-12 16:12:55.985186',insert_time='2021-10-12 16:12:57.789312',idx='1',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:12:55.984062',recv_time='2021-10-12 16:12:55.985186',insert_time='2021-10-12 16:12:57.789312',idx='2',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>],\n", + " [<Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:13:00.984010',recv_time='2021-10-12 16:13:00.985004',insert_time='2021-10-12 16:13:02.085417',idx='0',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:13:00.984010',recv_time='2021-10-12 16:13:00.985004',insert_time='2021-10-12 16:13:02.085417',idx='1',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:13:00.984010',recv_time='2021-10-12 16:13:00.985004',insert_time='2021-10-12 16:13:02.085417',idx='2',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>],\n", + " [<Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:13:05.984656',recv_time='2021-10-12 16:13:05.985886',insert_time='2021-10-12 16:13:07.114881',idx='0',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:13:05.984656',recv_time='2021-10-12 16:13:05.985886',insert_time='2021-10-12 16:13:07.114881',idx='1',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:13:05.984656',recv_time='2021-10-12 16:13:05.985886',insert_time='2021-10-12 16:13:07.114881',idx='2',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>],\n", + " [<Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:13:10.983994',recv_time='2021-10-12 16:13:10.984868',insert_time='2021-10-12 16:13:13.955591',idx='0',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:13:10.983994',recv_time='2021-10-12 16:13:10.984868',insert_time='2021-10-12 16:13:13.955591',idx='1',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:13:10.983994',recv_time='2021-10-12 16:13:10.984868',insert_time='2021-10-12 16:13:13.955591',idx='2',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>],\n", + " [<Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:13:15.984364',recv_time='2021-10-12 16:13:15.985187',insert_time='2021-10-12 16:13:17.261063',idx='0',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:13:15.984364',recv_time='2021-10-12 16:13:15.985187',insert_time='2021-10-12 16:13:17.261063',idx='1',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:13:15.984364',recv_time='2021-10-12 16:13:15.985187',insert_time='2021-10-12 16:13:17.261063',idx='2',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>],\n", + " [<Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:13:20.984283',recv_time='2021-10-12 16:13:20.985476',insert_time='2021-10-12 16:13:22.137614',idx='0',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:13:20.984283',recv_time='2021-10-12 16:13:20.985476',insert_time='2021-10-12 16:13:22.137614',idx='1',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:13:20.984283',recv_time='2021-10-12 16:13:20.985476',insert_time='2021-10-12 16:13:22.137614',idx='2',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>],\n", + " [<Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:13:25.984392',recv_time='2021-10-12 16:13:25.985198',insert_time='2021-10-12 16:13:32.429251',idx='0',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:13:25.984392',recv_time='2021-10-12 16:13:25.985198',insert_time='2021-10-12 16:13:32.429251',idx='1',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:13:25.984392',recv_time='2021-10-12 16:13:25.985198',insert_time='2021-10-12 16:13:32.429251',idx='2',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>],\n", + " [<Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:13:30.984191',recv_time='2021-10-12 16:13:30.985085',insert_time='2021-10-12 16:13:32.691181',idx='0',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:13:30.984191',recv_time='2021-10-12 16:13:30.985085',insert_time='2021-10-12 16:13:32.691181',idx='1',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:13:30.984191',recv_time='2021-10-12 16:13:30.985085',insert_time='2021-10-12 16:13:32.691181',idx='2',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>],\n", + " [<Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:13:35.984482',recv_time='2021-10-12 16:13:35.985543',insert_time='2021-10-12 16:13:36.243490',idx='0',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:13:35.984482',recv_time='2021-10-12 16:13:35.985543',insert_time='2021-10-12 16:13:36.243490',idx='1',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:13:35.984482',recv_time='2021-10-12 16:13:35.985543',insert_time='2021-10-12 16:13:36.243490',idx='2',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>],\n", + " [<Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:13:40.984427',recv_time='2021-10-12 16:13:40.985152',insert_time='2021-10-12 16:13:42.666220',idx='0',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:13:40.984427',recv_time='2021-10-12 16:13:40.985152',insert_time='2021-10-12 16:13:42.666220',idx='1',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:13:40.984427',recv_time='2021-10-12 16:13:40.985152',insert_time='2021-10-12 16:13:42.666220',idx='2',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>],\n", + " [<Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:13:45.984380',recv_time='2021-10-12 16:13:45.985301',insert_time='2021-10-12 16:13:45.987537',idx='0',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:13:45.984380',recv_time='2021-10-12 16:13:45.985301',insert_time='2021-10-12 16:13:45.987537',idx='1',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:13:45.984380',recv_time='2021-10-12 16:13:45.985301',insert_time='2021-10-12 16:13:45.987537',idx='2',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>],\n", + " [<Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:13:50.984643',recv_time='2021-10-12 16:13:50.985563',insert_time='2021-10-12 16:13:50.987682',idx='0',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:13:50.984643',recv_time='2021-10-12 16:13:50.985563',insert_time='2021-10-12 16:13:50.987682',idx='1',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:13:50.984643',recv_time='2021-10-12 16:13:50.985563',insert_time='2021-10-12 16:13:50.987682',idx='2',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>],\n", + " [<Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:13:55.983973',recv_time='2021-10-12 16:13:55.984880',insert_time='2021-10-12 16:13:55.986907',idx='0',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:13:55.983973',recv_time='2021-10-12 16:13:55.984880',insert_time='2021-10-12 16:13:55.986907',idx='1',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:13:55.983973',recv_time='2021-10-12 16:13:55.984880',insert_time='2021-10-12 16:13:55.986907',idx='2',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>],\n", + " [<Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:14:00.984719',recv_time='2021-10-12 16:14:00.985552',insert_time='2021-10-12 16:14:03.021740',idx='0',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:14:00.984719',recv_time='2021-10-12 16:14:00.985552',insert_time='2021-10-12 16:14:03.021740',idx='1',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:14:00.984719',recv_time='2021-10-12 16:14:00.985552',insert_time='2021-10-12 16:14:03.021740',idx='2',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>],\n", + " [<Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:14:05.984695',recv_time='2021-10-12 16:14:05.985635',insert_time='2021-10-12 16:14:05.989173',idx='0',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:14:05.984695',recv_time='2021-10-12 16:14:05.985635',insert_time='2021-10-12 16:14:05.989173',idx='1',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:14:05.984695',recv_time='2021-10-12 16:14:05.985635',insert_time='2021-10-12 16:14:05.989173',idx='2',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>],\n", + " [<Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:14:10.984766',recv_time='2021-10-12 16:14:10.988322',insert_time='2021-10-12 16:14:10.991811',idx='0',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:14:10.984766',recv_time='2021-10-12 16:14:10.988322',insert_time='2021-10-12 16:14:10.991811',idx='1',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:14:10.984766',recv_time='2021-10-12 16:14:10.988322',insert_time='2021-10-12 16:14:10.991811',idx='2',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>],\n", + " [<Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:14:15.984611',recv_time='2021-10-12 16:14:15.985512',insert_time='2021-10-12 16:14:15.987666',idx='0',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:14:15.984611',recv_time='2021-10-12 16:14:15.985512',insert_time='2021-10-12 16:14:15.987666',idx='1',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:14:15.984611',recv_time='2021-10-12 16:14:15.985512',insert_time='2021-10-12 16:14:15.987666',idx='2',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>],\n", + " [<Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:14:20.984560',recv_time='2021-10-12 16:14:20.985450',insert_time='2021-10-12 16:14:20.988027',idx='0',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:14:20.984560',recv_time='2021-10-12 16:14:20.985450',insert_time='2021-10-12 16:14:20.988027',idx='1',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:14:20.984560',recv_time='2021-10-12 16:14:20.985450',insert_time='2021-10-12 16:14:20.988027',idx='2',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>],\n", + " [<Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:14:25.984529',recv_time='2021-10-12 16:14:25.985516',insert_time='2021-10-12 16:14:28.424397',idx='0',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:14:25.984529',recv_time='2021-10-12 16:14:25.985516',insert_time='2021-10-12 16:14:28.424397',idx='1',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:14:25.984529',recv_time='2021-10-12 16:14:25.985516',insert_time='2021-10-12 16:14:28.424397',idx='2',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>],\n", + " [<Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:14:30.984777',recv_time='2021-10-12 16:14:30.985744',insert_time='2021-10-12 16:14:30.987772',idx='0',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:14:30.984777',recv_time='2021-10-12 16:14:30.985744',insert_time='2021-10-12 16:14:30.987772',idx='1',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:14:30.984777',recv_time='2021-10-12 16:14:30.985744',insert_time='2021-10-12 16:14:30.987772',idx='2',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>],\n", + " [<Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:14:37.039585',recv_time='2021-10-12 16:14:37.041323',insert_time='2021-10-12 16:14:37.273810',idx='0',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:14:37.039585',recv_time='2021-10-12 16:14:37.041323',insert_time='2021-10-12 16:14:37.273810',idx='1',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:14:37.039585',recv_time='2021-10-12 16:14:37.041323',insert_time='2021-10-12 16:14:37.273810',idx='2',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>],\n", + " [<Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:14:37.985042',recv_time='2021-10-12 16:14:37.985943',insert_time='2021-10-12 16:14:37.988002',idx='0',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:14:37.985042',recv_time='2021-10-12 16:14:37.985943',insert_time='2021-10-12 16:14:37.988002',idx='1',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:14:37.985042',recv_time='2021-10-12 16:14:37.985943',insert_time='2021-10-12 16:14:37.988002',idx='2',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>],\n", + " [<Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:14:41.984482',recv_time='2021-10-12 16:14:41.985286',insert_time='2021-10-12 16:14:41.987331',idx='0',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:14:41.984482',recv_time='2021-10-12 16:14:41.985286',insert_time='2021-10-12 16:14:41.987331',idx='1',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:14:41.984482',recv_time='2021-10-12 16:14:41.985286',insert_time='2021-10-12 16:14:41.987331',idx='2',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>],\n", + " [<Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:14:46.983903',recv_time='2021-10-12 16:14:46.984621',insert_time='2021-10-12 16:14:46.986645',idx='0',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:14:46.983903',recv_time='2021-10-12 16:14:46.984621',insert_time='2021-10-12 16:14:46.986645',idx='1',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:14:46.983903',recv_time='2021-10-12 16:14:46.984621',insert_time='2021-10-12 16:14:46.986645',idx='2',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>],\n", + " [<Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:14:51.985363',recv_time='2021-10-12 16:14:51.988993',insert_time='2021-10-12 16:14:51.996470',idx='0',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:14:51.985363',recv_time='2021-10-12 16:14:51.988993',insert_time='2021-10-12 16:14:51.996470',idx='1',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:14:51.985363',recv_time='2021-10-12 16:14:51.988993',insert_time='2021-10-12 16:14:51.996470',idx='2',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>],\n", + " [<Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:14:56.983913',recv_time='2021-10-12 16:14:56.984669',insert_time='2021-10-12 16:14:56.986431',idx='0',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:14:56.983913',recv_time='2021-10-12 16:14:56.984669',insert_time='2021-10-12 16:14:56.986431',idx='1',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:14:56.983913',recv_time='2021-10-12 16:14:56.984669',insert_time='2021-10-12 16:14:56.986431',idx='2',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>],\n", + " [<Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:15:01.984158',recv_time='2021-10-12 16:15:01.985027',insert_time='2021-10-12 16:15:01.987260',idx='0',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:15:01.984158',recv_time='2021-10-12 16:15:01.985027',insert_time='2021-10-12 16:15:01.987260',idx='1',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:15:01.984158',recv_time='2021-10-12 16:15:01.985027',insert_time='2021-10-12 16:15:01.987260',idx='2',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>],\n", + " [<Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:15:06.984749',recv_time='2021-10-12 16:15:06.985475',insert_time='2021-10-12 16:15:10.684370',idx='0',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:15:06.984749',recv_time='2021-10-12 16:15:06.985475',insert_time='2021-10-12 16:15:10.684370',idx='1',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:15:06.984749',recv_time='2021-10-12 16:15:06.985475',insert_time='2021-10-12 16:15:10.684370',idx='2',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>],\n", + " [<Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:15:09.984143',recv_time='2021-10-12 16:15:10.724971',insert_time='2021-10-12 16:15:10.939773',idx='0',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:15:09.984143',recv_time='2021-10-12 16:15:10.724971',insert_time='2021-10-12 16:15:10.939773',idx='1',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:15:09.984143',recv_time='2021-10-12 16:15:10.724971',insert_time='2021-10-12 16:15:10.939773',idx='2',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>],\n", + " [<Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:15:11.984527',recv_time='2021-10-12 16:15:11.985832',insert_time='2021-10-12 16:15:11.987864',idx='0',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:15:11.984527',recv_time='2021-10-12 16:15:11.985832',insert_time='2021-10-12 16:15:11.987864',idx='1',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:15:11.984527',recv_time='2021-10-12 16:15:11.985832',insert_time='2021-10-12 16:15:11.987864',idx='2',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>],\n", + " [<Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:15:16.984401',recv_time='2021-10-12 16:15:16.985325',insert_time='2021-10-12 16:15:16.987491',idx='0',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:15:16.984401',recv_time='2021-10-12 16:15:16.985325',insert_time='2021-10-12 16:15:16.987491',idx='1',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:15:16.984401',recv_time='2021-10-12 16:15:16.985325',insert_time='2021-10-12 16:15:16.987491',idx='2',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>],\n", + " [<Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:15:21.984689',recv_time='2021-10-12 16:15:21.987848',insert_time='2021-10-12 16:15:21.995639',idx='0',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:15:21.984689',recv_time='2021-10-12 16:15:21.987848',insert_time='2021-10-12 16:15:21.995639',idx='1',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:15:21.984689',recv_time='2021-10-12 16:15:21.987848',insert_time='2021-10-12 16:15:21.995639',idx='2',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>],\n", + " [<Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:15:26.985033',recv_time='2021-10-12 16:15:26.986515',insert_time='2021-10-12 16:15:26.989821',idx='0',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:15:26.985033',recv_time='2021-10-12 16:15:26.986515',insert_time='2021-10-12 16:15:26.989821',idx='1',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:15:26.985033',recv_time='2021-10-12 16:15:26.986515',insert_time='2021-10-12 16:15:26.989821',idx='2',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>],\n", + " [<Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:15:31.984568',recv_time='2021-10-12 16:15:31.985507',insert_time='2021-10-12 16:15:31.987596',idx='0',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:15:31.984568',recv_time='2021-10-12 16:15:31.985507',insert_time='2021-10-12 16:15:31.987596',idx='1',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:15:31.984568',recv_time='2021-10-12 16:15:31.985507',insert_time='2021-10-12 16:15:31.987596',idx='2',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>],\n", + " [<Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:15:36.984577',recv_time='2021-10-12 16:15:36.985529',insert_time='2021-10-12 16:15:36.987719',idx='0',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:15:36.984577',recv_time='2021-10-12 16:15:36.985529',insert_time='2021-10-12 16:15:36.987719',idx='1',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:15:36.984577',recv_time='2021-10-12 16:15:36.985529',insert_time='2021-10-12 16:15:36.987719',idx='2',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>],\n", + " [<Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:15:41.984143',recv_time='2021-10-12 16:15:41.985114',insert_time='2021-10-12 16:15:41.987742',idx='0',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:15:41.984143',recv_time='2021-10-12 16:15:41.985114',insert_time='2021-10-12 16:15:41.987742',idx='1',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:15:41.984143',recv_time='2021-10-12 16:15:41.985114',insert_time='2021-10-12 16:15:41.987742',idx='2',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>],\n", + " [<Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:15:46.983999',recv_time='2021-10-12 16:15:46.985104',insert_time='2021-10-12 16:15:46.988166',idx='0',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:15:46.983999',recv_time='2021-10-12 16:15:46.985104',insert_time='2021-10-12 16:15:46.988166',idx='1',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:15:46.983999',recv_time='2021-10-12 16:15:46.985104',insert_time='2021-10-12 16:15:46.988166',idx='2',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>],\n", + " [<Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:15:51.984200',recv_time='2021-10-12 16:15:51.985471',insert_time='2021-10-12 16:15:51.988197',idx='0',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:15:51.984200',recv_time='2021-10-12 16:15:51.985471',insert_time='2021-10-12 16:15:51.988197',idx='1',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:15:51.984200',recv_time='2021-10-12 16:15:51.985471',insert_time='2021-10-12 16:15:51.988197',idx='2',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>],\n", + " [<Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:15:56.984150',recv_time='2021-10-12 16:15:56.985423',insert_time='2021-10-12 16:15:56.988016',idx='0',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:15:56.984150',recv_time='2021-10-12 16:15:56.985423',insert_time='2021-10-12 16:15:56.988016',idx='1',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:15:56.984150',recv_time='2021-10-12 16:15:56.985423',insert_time='2021-10-12 16:15:56.988016',idx='2',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>],\n", + " [<Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:16:01.984230',recv_time='2021-10-12 16:16:01.985094',insert_time='2021-10-12 16:16:01.987267',idx='0',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:16:01.984230',recv_time='2021-10-12 16:16:01.985094',insert_time='2021-10-12 16:16:01.987267',idx='1',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:16:01.984230',recv_time='2021-10-12 16:16:01.985094',insert_time='2021-10-12 16:16:01.987267',idx='2',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>],\n", + " [<Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:16:06.983920',recv_time='2021-10-12 16:16:06.984817',insert_time='2021-10-12 16:16:06.986719',idx='0',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:16:06.983920',recv_time='2021-10-12 16:16:06.984817',insert_time='2021-10-12 16:16:06.986719',idx='1',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:16:06.983920',recv_time='2021-10-12 16:16:06.984817',insert_time='2021-10-12 16:16:06.986719',idx='2',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>],\n", + " [<Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:16:11.984220',recv_time='2021-10-12 16:16:11.985126',insert_time='2021-10-12 16:16:11.986983',idx='0',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:16:11.984220',recv_time='2021-10-12 16:16:11.985126',insert_time='2021-10-12 16:16:11.986983',idx='1',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:16:11.984220',recv_time='2021-10-12 16:16:11.985126',insert_time='2021-10-12 16:16:11.986983',idx='2',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>],\n", + " [<Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:16:16.983941',recv_time='2021-10-12 16:16:16.984744',insert_time='2021-10-12 16:16:16.986615',idx='0',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:16:16.983941',recv_time='2021-10-12 16:16:16.984744',insert_time='2021-10-12 16:16:16.986615',idx='1',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:16:16.983941',recv_time='2021-10-12 16:16:16.984744',insert_time='2021-10-12 16:16:16.986615',idx='2',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>],\n", + " [<Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:16:21.984522',recv_time='2021-10-12 16:16:21.985446',insert_time='2021-10-12 16:16:21.987553',idx='0',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:16:21.984522',recv_time='2021-10-12 16:16:21.985446',insert_time='2021-10-12 16:16:21.987553',idx='1',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:16:21.984522',recv_time='2021-10-12 16:16:21.985446',insert_time='2021-10-12 16:16:21.987553',idx='2',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>],\n", + " [<Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:16:26.984167',recv_time='2021-10-12 16:16:26.985007',insert_time='2021-10-12 16:16:26.986991',idx='0',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:16:26.984167',recv_time='2021-10-12 16:16:26.985007',insert_time='2021-10-12 16:16:26.986991',idx='1',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:16:26.984167',recv_time='2021-10-12 16:16:26.985007',insert_time='2021-10-12 16:16:26.986991',idx='2',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>],\n", + " [<Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:16:56.984488',recv_time='2021-10-12 16:16:56.985745',insert_time='2021-10-12 16:16:56.987969',idx='0',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:16:56.984488',recv_time='2021-10-12 16:16:56.985745',insert_time='2021-10-12 16:16:56.987969',idx='1',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:16:56.984488',recv_time='2021-10-12 16:16:56.985745',insert_time='2021-10-12 16:16:56.987969',idx='2',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>],\n", + " [<Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:17:01.984591',recv_time='2021-10-12 16:17:01.987665',insert_time='2021-10-12 16:17:01.995973',idx='0',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:17:01.984591',recv_time='2021-10-12 16:17:01.987665',insert_time='2021-10-12 16:17:01.995973',idx='1',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:17:01.984591',recv_time='2021-10-12 16:17:01.987665',insert_time='2021-10-12 16:17:01.995973',idx='2',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>],\n", + " [<Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:17:06.985081',recv_time='2021-10-12 16:17:06.988687',insert_time='2021-10-12 16:17:06.996786',idx='0',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:17:06.985081',recv_time='2021-10-12 16:17:06.988687',insert_time='2021-10-12 16:17:06.996786',idx='1',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:17:06.985081',recv_time='2021-10-12 16:17:06.988687',insert_time='2021-10-12 16:17:06.996786',idx='2',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>],\n", + " [<Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:17:11.984285',recv_time='2021-10-12 16:17:11.985949',insert_time='2021-10-12 16:17:11.989505',idx='0',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:17:11.984285',recv_time='2021-10-12 16:17:11.985949',insert_time='2021-10-12 16:17:11.989505',idx='1',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:17:11.984285',recv_time='2021-10-12 16:17:11.985949',insert_time='2021-10-12 16:17:11.989505',idx='2',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>],\n", + " [<Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:17:16.984731',recv_time='2021-10-12 16:17:16.985852',insert_time='2021-10-12 16:17:16.988141',idx='0',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:17:16.984731',recv_time='2021-10-12 16:17:16.985852',insert_time='2021-10-12 16:17:16.988141',idx='1',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:17:16.984731',recv_time='2021-10-12 16:17:16.985852',insert_time='2021-10-12 16:17:16.988141',idx='2',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>],\n", + " [<Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:17:21.983865',recv_time='2021-10-12 16:17:21.985019',insert_time='2021-10-12 16:17:21.987370',idx='0',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:17:21.983865',recv_time='2021-10-12 16:17:21.985019',insert_time='2021-10-12 16:17:21.987370',idx='1',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>,\n", + " <Array_Boolean_RW(att_conf_id='1',data_time='2021-10-12 16:17:21.983865',recv_time='2021-10-12 16:17:21.985019',insert_time='2021-10-12 16:17:21.987370',idx='2',dim_x_r='3',dim_y_r='32',value_r='1',dim_x_w='3',dim_y_w='32',value_w='1',quality='0',att_error_desc_id='None')>]]" + ] + }, + "execution_count": 21, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "data" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "id": "eb97ee97", + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Attribute lts/recv/1/rcu_temperature_r removed!\n", + "Attribute lts/recv/1/clk_enable_pwr_r removed!\n", + "Attribute lts/recv/1/clk_i2c_status_r removed!\n", + "Attribute lts/recv/1/clk_pll_error_r removed!\n", + "Attribute lts/recv/1/clk_pll_locked_r removed!\n", + "Attribute lts/recv/1/clk_translator_busy_r removed!\n", + "Attribute lts/recv/1/hba_element_beamformer_delays_r removed!\n", + "Attribute lts/recv/1/hba_element_led_r removed!\n", + "Attribute lts/recv/1/hba_element_lna_pwr_r removed!\n", + "Attribute lts/recv/1/hba_element_pwr_r removed!\n", + "Attribute lts/recv/1/rcu_adc_lock_r removed!\n", + "Attribute lts/recv/1/rcu_attenuator_r removed!\n", + "Attribute lts/recv/1/rcu_band_r removed!\n", + "Attribute lts/recv/1/rcu_i2c_status_r removed!\n", + "Attribute lts/recv/1/rcu_led0_r removed!\n", + "Attribute lts/recv/1/rcu_led1_r removed!\n", + "Attribute lts/recv/1/rcu_pwr_dig_r removed!\n", + "Attribute lts/recv/1/rcu_translator_busy_r removed!\n", + "Attribute lts/recv/1/rcu_version_r removed!\n", + "Attribute lts/recv/1/rcu_id_r removed!\n", + "Attribute lts/recv/1/status removed!\n", + "Attribute lts/sdp/1/fpga_scrap_r removed!\n", + "Attribute lts/sdp/1/fpga_scrap_rw removed!\n", + "Attribute lts/sdp/1/fpga_weights_r removed!\n", + "Attribute lts/sdp/1/fpga_weights_rw removed!\n" + ] + } + ], + "source": [ + "#archiver.remove_attribute_from_archiver('lts/recv/1/rcu_temperature_r')\n", + "archiver.remove_attributes_in_error()" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "id": "a554cff4", + "metadata": {}, + "outputs": [], + "source": [ + "d.off()\n", + "d2.off()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "71fabd37", + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "StationControl", + "language": "python", + "name": "stationcontrol" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.7.3" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/jupyter-notebooks/UNB2_notebook.ipynb b/jupyter-notebooks/UNB2_notebook.ipynb index e140631ffc4ea0cee80e2374ec6b5f1289dbba24..d95aebef21b589d381ac137874282eaf579b8776 100644 --- a/jupyter-notebooks/UNB2_notebook.ipynb +++ b/jupyter-notebooks/UNB2_notebook.ipynb @@ -1,479 +1,479 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 25, - "id": "waiting-chance", - "metadata": {}, - "outputs": [], - "source": [ - "import time" - ] - }, - { - "cell_type": "code", - "execution_count": 26, - "id": "moving-alexandria", - "metadata": {}, - "outputs": [], - "source": [ - "d=DeviceProxy(\"LTS/UNB2/1\")" - ] - }, - { - "cell_type": "code", - "execution_count": 28, - "id": "ranking-aluminum", - "metadata": { - "scrolled": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Device is now in on state\n" - ] - } - ], - "source": [ - "state = str(d.state())\n", - "\n", - "\n", - "if state == \"OFF\" or state == \"FAULT\":\n", - " d.initialise()\n", - " time.sleep(1)\n", - "state = str(d.state())\n", - "if state == \"STANDBY\":\n", - " d.on()\n", - "state = str(d.state())\n", - "if state == \"ON\":\n", - " print(\"Device is now in on state\")\n", - "else:\n", - " print(\"warning, expected device to be in on state, is: \", state)\n" - ] - }, - { - "cell_type": "code", - "execution_count": 29, - "id": "0caa8146", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "version_R *L2SS-268-LR1_2_Read_hardware_status_of_UB2c_from_SDPHW [b2db449162be8e52013dbbd1a44d6d90a12491b5]\n", - "UNB2_Power_ON_OFF_RW [False False]\n", - "UNB2_Front_Panel_LED_RW [0 0]\n", - "UNB2_Front_Panel_LED_R [0 0]\n", - "UNB2_mask_RW [False False]\n", - "UNB2_I2C_bus_STATUS_R [False False]\n", - "UNB2_EEPROM_Unique_ID_R [0 0]\n", - "UNB2_DC_DC_48V_12V_VIN_R [0. 0.]\n", - "UNB2_DC_DC_48V_12V_VOUT_R [0. 0.]\n", - "UNB2_DC_DC_48V_12V_IOUT_R [0. 0.]\n", - "UNB2_DC_DC_48V_12V_TEMP_R [0. 0.]\n", - "UNB2_POL_QSFP_N01_VOUT_R [0. 0.]\n", - "UNB2_POL_QSFP_N01_IOUT_R [0. 0.]\n", - "UNB2_POL_QSFP_N01_TEMP_R [0. 0.]\n", - "UNB2_POL_QSFP_N23_VOUT_R [0. 0.]\n", - "UNB2_POL_QSFP_N23_IOUT_R [0. 0.]\n", - "UNB2_POL_QSFP_N23_TEMP_R [0. 0.]\n", - "UNB2_POL_SWITCH_1V2_VOUT_R [0. 0.]\n", - "UNB2_POL_SWITCH_1V2_IOUT_R [0. 0.]\n", - "UNB2_POL_SWITCH_1V2_TEMP_R [0. 0.]\n", - "UNB2_POL_SWITCH_PHY_VOUT_R [0. 0.]\n", - "UNB2_POL_SWITCH_PHY_IOUT_R [0. 0.]\n", - "UNB2_POL_SWITCH_PHY_TEMP_R [0. 0.]\n", - "UNB2_POL_CLOCK_VOUT_R [0. 0.]\n", - "UNB2_POL_CLOCK_IOUT_R [0. 0.]\n", - "UNB2_POL_CLOCK_TEMP_R [0. 0.]\n", - "UNB2_FPGA_DDR4_SLOT_TEMP_R [[0. 0. 0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0. 0. 0.]]\n", - "UNB2_FPGA_POL_CORE_IOUT_R [[0. 0. 0. 0.]\n", - " [0. 0. 0. 0.]]\n", - "UNB2_FPGA_POL_CORE_TEMP_R [[0. 0. 0. 0.]\n", - " [0. 0. 0. 0.]]\n", - "UNB2_FPGA_POL_ERAM_VOUT_R [[0. 0. 0. 0.]\n", - " [0. 0. 0. 0.]]\n", - "UNB2_FPGA_POL_ERAM_IOUT_R [[0. 0. 0. 0.]\n", - " [0. 0. 0. 0.]]\n", - "UNB2_FPGA_POL_ERAM_TEMP_R [[0. 0. 0. 0.]\n", - " [0. 0. 0. 0.]]\n", - "UNB2_FPGA_POL_RXGXB_VOUT_R [[0. 0. 0. 0.]\n", - " [0. 0. 0. 0.]]\n", - "UNB2_FPGA_POL_RXGXB_IOUT_R [[0. 0. 0. 0.]\n", - " [0. 0. 0. 0.]]\n", - "UNB2_FPGA_POL_RXGXB_TEMP_R [[0. 0. 0. 0.]\n", - " [0. 0. 0. 0.]]\n", - "UNB2_FPGA_POL_TXGXB_VOUT_R [[0. 0. 0. 0.]\n", - " [0. 0. 0. 0.]]\n", - "UNB2_FPGA_POL_TXGXB_IOUT_R [[0. 0. 0. 0.]\n", - " [0. 0. 0. 0.]]\n", - "UNB2_FPGA_POL_HGXB_VOUT_R [[0. 0. 0. 0.]\n", - " [0. 0. 0. 0.]]\n", - "UNB2_FPGA_POL_HGXB_IOUT_R [[0. 0. 0. 0.]\n", - " [0. 0. 0. 0.]]\n", - "UNB2_FPGA_POL_HGXB_TEMP_R [[0. 0. 0. 0.]\n", - " [0. 0. 0. 0.]]\n", - "UNB2_FPGA_POL_PGM_VOUT_R [[0. 0. 0. 0.]\n", - " [0. 0. 0. 0.]]\n", - "UNB2_FPGA_POL_PGM_IOUT_R [[0. 0. 0. 0.]\n", - " [0. 0. 0. 0.]]\n", - "UNB2_FPGA_POL_PGM_TEMP_R [[0. 0. 0. 0.]\n", - " [0. 0. 0. 0.]]\n", - "State <function __get_command_func.<locals>.f at 0x7f4c210e1ea0>\n", - "Status <function __get_command_func.<locals>.f at 0x7f4c210e1ea0>\n" - ] - } - ], - "source": [ - "attr_names = d.get_attribute_list()\n", - "\n", - "\n", - "for i in attr_names:\n", - " exec(\"value = print(i, d.{})\".format(i))" - ] - }, - { - "cell_type": "code", - "execution_count": 30, - "id": "929965c2", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Old values:\n", - " [0 0]\n", - "Values to be set:\n", - " [1 3]\n", - "Values set in RW:\n", - " [1 3]\n", - "Values read back after setting:\n", - " [0 0]\n" - ] - } - ], - "source": [ - "#Test the LED CP\n", - "led = d.UNB2_Front_Panel_LED_R\n", - "print(\"Old values:\\n\", led)\n", - "led[0] = 1\n", - "led[1] = 3\n", - "print(\"Values to be set:\\n\", led)\n", - "d.UNB2_Front_Panel_LED_RW = led\n", - "print(\"Values set in RW:\\n\",d.UNB2_Front_Panel_LED_RW)\n", - "print(\"Values read back after setting:\\n\",d.UNB2_Front_Panel_LED_R)" - ] - }, - { - "cell_type": "code", - "execution_count": 22, - "id": "6813164e", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Old values:\n", - " [False False]\n", - "Values to be set:\n", - " [False False]\n", - "Values set in RW:\n", - " [False False]\n" - ] - } - ], - "source": [ - "#Test the ON OFF CP\n", - "onoff = d.UNB2_Power_ON_OFF_RW\n", - "print(\"Old values:\\n\", onoff)\n", - "onoff[0] = False\n", - "onoff[1] = False\n", - "print(\"Values to be set:\\n\", onoff)\n", - "d.UNB2_Power_ON_OFF_RW = onoff\n", - "print(\"Values set in RW:\\n\",d.UNB2_Power_ON_OFF_RW)" - ] - }, - { - "cell_type": "code", - "execution_count": 23, - "id": "e9b32ec7", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Old values:\n", - " [False False]\n", - "Values to be set:\n", - " [False False]\n", - "Values read back after setting:\n", - " [False False]\n" - ] - } - ], - "source": [ - "#Test the MASK CP\n", - "mask = d.UNB2_mask_RW\n", - "print(\"Old values:\\n\", mask)\n", - "mask[0] = False\n", - "mask[1] = False\n", - "print(\"Values to be set:\\n\", mask)\n", - "d.UNB2_mask_RW = mask\n", - "print(\"Values read back after setting:\\n\",d.UNB2_mask_RW)" - ] - }, - { - "cell_type": "code", - "execution_count": 24, - "id": "transsexual-battle", - "metadata": {}, - "outputs": [ - { - "ename": "AttributeError", - "evalue": "FPGA_mask_RW", - "output_type": "error", - "traceback": [ - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mAttributeError\u001b[0m Traceback (most recent call last)", - "\u001b[0;32m/tmp/ipykernel_22/2885399456.py\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[1;32m 1\u001b[0m values = [\n\u001b[0;32m----> 2\u001b[0;31m \u001b[0;34m[\u001b[0m\u001b[0md\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mFPGA_mask_RW\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m\"FPGA_mask_RW\"\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 3\u001b[0m \u001b[0;34m[\u001b[0m\u001b[0md\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mFPGA_scrap_R\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m\"FPGA_scrap_R\"\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 4\u001b[0m \u001b[0;34m[\u001b[0m\u001b[0md\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mFPGA_scrap_RW\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m\"FPGA_scrap_RW\"\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 5\u001b[0m \u001b[0;34m[\u001b[0m\u001b[0md\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mFPGA_status_R\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m\"FPGA_status_R\"\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;32m/usr/local/lib/python3.7/dist-packages/tango/device_proxy.py\u001b[0m in \u001b[0;36m__DeviceProxy__getattr\u001b[0;34m(self, name)\u001b[0m\n\u001b[1;32m 353\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mread_pipe\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mname\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 354\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 355\u001b[0;31m \u001b[0msix\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mraise_from\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mAttributeError\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mname\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcause\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 356\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 357\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;32m/usr/local/lib/python3.7/dist-packages/six.py\u001b[0m in \u001b[0;36mraise_from\u001b[0;34m(value, from_value)\u001b[0m\n", - "\u001b[0;31mAttributeError\u001b[0m: FPGA_mask_RW" - ] - } - ], - "source": [ - "values = [\n", - " [d.FPGA_mask_RW, \"FPGA_mask_RW\"],\n", - " [d.FPGA_scrap_R, \"FPGA_scrap_R\"],\n", - " [d.FPGA_scrap_RW, \"FPGA_scrap_RW\"],\n", - " [d.FPGA_status_R, \"FPGA_status_R\"],\n", - " [d.FPGA_temp_R, \"FPGA_temp_R\"],\n", - " [d.FPGA_version_R, \"FPGA_version_R\"],\n", - " [d.FPGA_weights_R, \"FPGA_weights_R\"],\n", - " [d.FPGA_weights_RW, \"FPGA_weights_RW\"],\n", - " [d.TR_busy_R, \"TR_busy_R\"],\n", - " [d.TR_reload_RW, \"TR_reload_RW\"],\n", - " # [d.TR_tod_R, \"TR_tod_R\"],\n", - " # [d.TR_uptime_R, \"TR_uptime_R\"]\n", - "]\n", - "\n", - "for i in values:\n", - " print(\"🟦🟦🟦\", i[1], \": \", i[0])" - ] - }, - { - "cell_type": "code", - "execution_count": 19, - "id": "b88868c5", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "array([[1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.],\n", - " [1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.],\n", - " [1., 1., 1., 1., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],\n", - " [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],\n", - " [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],\n", - " [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],\n", - " [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],\n", - " [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],\n", - " [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],\n", - " [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],\n", - " [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],\n", - " [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]],\n", - " dtype=float32)" - ] - }, - "execution_count": 19, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "wgswitches = d.FPGA_wg_enable_R\n", - "print(\"Old values:\\n\", wgswitches)\n", - "wgswitches[9][0] = True\n", - "wgswitches[10][0] = True\n", - "print(\"Values to be set:\\n\", wgswitches)\n", - "d.FPGA_wg_enable_RW =wgswitches\n", - "time.sleep(7)\n", - "print(\"Values read back after setting:\\n\",d.FPGA_wg_enable_R)" - ] - }, - { - "cell_type": "code", - "execution_count": 18, - "id": "8f3db8c7", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "array([[119.99817, 119.99817, 119.99817, 119.99817, 119.99817, 119.99817,\n", - " 119.99817, 119.99817, 119.99817, 119.99817, 119.99817, 119.99817,\n", - " 119.99817, 119.99817, 119.99817, 119.99817],\n", - " [119.99817, 119.99817, 119.99817, 119.99817, 119.99817, 119.99817,\n", - " 119.99817, 119.99817, 119.99817, 119.99817, 119.99817, 119.99817,\n", - " 119.99817, 119.99817, 119.99817, 119.99817],\n", - " [119.99817, 119.99817, 119.99817, 119.99817, 0. , 0. ,\n", - " 0. , 0. , 0. , 0. , 0. , 0. ,\n", - " 0. , 0. , 0. , 0. ],\n", - " [ 0. , 0. , 0. , 0. , 0. , 0. ,\n", - " 0. , 0. , 0. , 0. , 0. , 0. ,\n", - " 0. , 0. , 0. , 0. ],\n", - " [ 0. , 0. , 0. , 0. , 0. , 0. ,\n", - " 0. , 0. , 0. , 0. , 0. , 0. ,\n", - " 0. , 0. , 0. , 0. ],\n", - " [ 0. , 0. , 0. , 0. , 0. , 0. ,\n", - " 0. , 0. , 0. , 0. , 0. , 0. ,\n", - " 0. , 0. , 0. , 0. ],\n", - " [ 0. , 0. , 0. , 0. , 0. , 0. ,\n", - " 0. , 0. , 0. , 0. , 0. , 0. ,\n", - " 0. , 0. , 0. , 0. ],\n", - " [ 0. , 0. , 0. , 0. , 0. , 0. ,\n", - " 0. , 0. , 0. , 0. , 0. , 0. ,\n", - " 0. , 0. , 0. , 0. ],\n", - " [ 0. , 0. , 0. , 0. , 0. , 0. ,\n", - " 0. , 0. , 0. , 0. , 0. , 0. ,\n", - " 0. , 0. , 0. , 0. ],\n", - " [ 0. , 0. , 0. , 0. , 0. , 0. ,\n", - " 0. , 0. , 0. , 0. , 0. , 0. ,\n", - " 0. , 0. , 0. , 0. ],\n", - " [ 0. , 0. , 0. , 0. , 0. , 0. ,\n", - " 0. , 0. , 0. , 0. , 0. , 0. ,\n", - " 0. , 0. , 0. , 0. ],\n", - " [ 0. , 0. , 0. , 0. , 0. , 0. ,\n", - " 0. , 0. , 0. , 0. , 0. , 0. ,\n", - " 0. , 0. , 0. , 0. ]], dtype=float32)" - ] - }, - "execution_count": 18, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "phases = d.FPGA_wg_phase_R\n", - "print(\"Old values:\\n\", phases)\n", - "phases[9][0] = 1.0334\n", - "phases[9][1] = 20.15\n", - "phases[10][0] = 130\n", - "print(\"Values to be set:\\n\", phases)\n", - "d.FPGA_wg_phase_RW = phases\n", - "time.sleep(7)\n", - "print(\"Values read back after setting:\\n\", d.FPGA_wg_phase_R)" - ] - }, - { - "cell_type": "code", - "execution_count": 13, - "id": "e45b4874", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "array([[29921878., 29921878., 29921878., 29921878., 29921878., 29921878.,\n", - " 29921878., 29921878., 29921878., 29921878., 29921878., 29921878.,\n", - " 29921878., 29921878., 29921878., 29921878.],\n", - " [29921878., 29921878., 29921878., 29921878., 29921878., 29921878.,\n", - " 29921878., 29921878., 29921878., 29921878., 29921878., 29921878.,\n", - " 29921878., 29921878., 29921878., 29921878.],\n", - " [29921878., 29921878., 29921878., 29921878., 0., 0.,\n", - " 0., 0., 0., 0., 0., 0.,\n", - " 0., 0., 0., 0.],\n", - " [ 0., 0., 0., 0., 0., 0.,\n", - " 0., 0., 0., 0., 0., 0.,\n", - " 0., 0., 0., 0.],\n", - " [ 0., 0., 0., 0., 0., 0.,\n", - " 0., 0., 0., 0., 0., 0.,\n", - " 0., 0., 0., 0.],\n", - " [ 0., 0., 0., 0., 0., 0.,\n", - " 0., 0., 0., 0., 0., 0.,\n", - " 0., 0., 0., 0.],\n", - " [ 0., 0., 0., 0., 0., 0.,\n", - " 0., 0., 0., 0., 0., 0.,\n", - " 0., 0., 0., 0.],\n", - " [ 0., 0., 0., 0., 0., 0.,\n", - " 0., 0., 0., 0., 0., 0.,\n", - " 0., 0., 0., 0.],\n", - " [ 0., 0., 0., 0., 0., 0.,\n", - " 0., 0., 0., 0., 0., 0.,\n", - " 0., 0., 0., 0.],\n", - " [ 0., 0., 0., 0., 0., 0.,\n", - " 0., 0., 0., 0., 0., 0.,\n", - " 0., 0., 0., 0.],\n", - " [ 0., 0., 0., 0., 0., 0.,\n", - " 0., 0., 0., 0., 0., 0.,\n", - " 0., 0., 0., 0.],\n", - " [ 0., 0., 0., 0., 0., 0.,\n", - " 0., 0., 0., 0., 0., 0.,\n", - " 0., 0., 0., 0.]], dtype=float32)" - ] - }, - "execution_count": 13, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "amplitudes = d.FPGA_wg_amplitude_R\n", - "print(\"Old values:\\n\", amplitudes)\n", - "amplitudes[9][0] = 1.0\n", - "amplitudes[9][1] = 1.99\n", - "amplitudes[10][0] = 0.5\n", - "print(\"Values to be set:\\n\", amplitudes)\n", - "d.FPGA_wg_amplitude_RW = amplitudes\n", - "time.sleep(7)\n", - "print(\"Values read back after setting:\\n\", d.FPGA_wg_amplitude_R)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "9b1bbd3e", - "metadata": {}, - "outputs": [], - "source": [ - "frequencies = d.FPGA_wg_frequency_R\n", - "print(\"Old values:\\n\", frequencies)\n", - "frequencies[9][0] = 19000000\n", - "frequencies[9][1] = 20000000\n", - "frequencies[10][0] = 22000000\n", - "print(\"Values to be set:\\n\", frequencies)\n", - "d.FPGA_wg_frequency_RW = frequencies\n", - "print(\"Values read back after setting:\\n\", d.FPGA_wg_frequency_R)" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "StationControl", - "language": "python", - "name": "stationcontrol" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.7.3" - } - }, - "nbformat": 4, - "nbformat_minor": 5 -} +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 25, + "id": "waiting-chance", + "metadata": {}, + "outputs": [], + "source": [ + "import time" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "id": "moving-alexandria", + "metadata": {}, + "outputs": [], + "source": [ + "d=DeviceProxy(\"LTS/UNB2/1\")" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "id": "ranking-aluminum", + "metadata": { + "scrolled": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Device is now in on state\n" + ] + } + ], + "source": [ + "state = str(d.state())\n", + "\n", + "\n", + "if state == \"OFF\" or state == \"FAULT\":\n", + " d.initialise()\n", + " time.sleep(1)\n", + "state = str(d.state())\n", + "if state == \"STANDBY\":\n", + " d.on()\n", + "state = str(d.state())\n", + "if state == \"ON\":\n", + " print(\"Device is now in on state\")\n", + "else:\n", + " print(\"warning, expected device to be in on state, is: \", state)\n" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "id": "0caa8146", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "version_R *L2SS-268-LR1_2_Read_hardware_status_of_UB2c_from_SDPHW [b2db449162be8e52013dbbd1a44d6d90a12491b5]\n", + "UNB2_Power_ON_OFF_RW [False False]\n", + "UNB2_Front_Panel_LED_RW [0 0]\n", + "UNB2_Front_Panel_LED_R [0 0]\n", + "UNB2_mask_RW [False False]\n", + "UNB2_I2C_bus_STATUS_R [False False]\n", + "UNB2_EEPROM_Unique_ID_R [0 0]\n", + "UNB2_DC_DC_48V_12V_VIN_R [0. 0.]\n", + "UNB2_DC_DC_48V_12V_VOUT_R [0. 0.]\n", + "UNB2_DC_DC_48V_12V_IOUT_R [0. 0.]\n", + "UNB2_DC_DC_48V_12V_TEMP_R [0. 0.]\n", + "UNB2_POL_QSFP_N01_VOUT_R [0. 0.]\n", + "UNB2_POL_QSFP_N01_IOUT_R [0. 0.]\n", + "UNB2_POL_QSFP_N01_TEMP_R [0. 0.]\n", + "UNB2_POL_QSFP_N23_VOUT_R [0. 0.]\n", + "UNB2_POL_QSFP_N23_IOUT_R [0. 0.]\n", + "UNB2_POL_QSFP_N23_TEMP_R [0. 0.]\n", + "UNB2_POL_SWITCH_1V2_VOUT_R [0. 0.]\n", + "UNB2_POL_SWITCH_1V2_IOUT_R [0. 0.]\n", + "UNB2_POL_SWITCH_1V2_TEMP_R [0. 0.]\n", + "UNB2_POL_SWITCH_PHY_VOUT_R [0. 0.]\n", + "UNB2_POL_SWITCH_PHY_IOUT_R [0. 0.]\n", + "UNB2_POL_SWITCH_PHY_TEMP_R [0. 0.]\n", + "UNB2_POL_CLOCK_VOUT_R [0. 0.]\n", + "UNB2_POL_CLOCK_IOUT_R [0. 0.]\n", + "UNB2_POL_CLOCK_TEMP_R [0. 0.]\n", + "UNB2_FPGA_DDR4_SLOT_TEMP_R [[0. 0. 0. 0. 0. 0. 0. 0.]\n", + " [0. 0. 0. 0. 0. 0. 0. 0.]]\n", + "UNB2_FPGA_POL_CORE_IOUT_R [[0. 0. 0. 0.]\n", + " [0. 0. 0. 0.]]\n", + "UNB2_FPGA_POL_CORE_TEMP_R [[0. 0. 0. 0.]\n", + " [0. 0. 0. 0.]]\n", + "UNB2_FPGA_POL_ERAM_VOUT_R [[0. 0. 0. 0.]\n", + " [0. 0. 0. 0.]]\n", + "UNB2_FPGA_POL_ERAM_IOUT_R [[0. 0. 0. 0.]\n", + " [0. 0. 0. 0.]]\n", + "UNB2_FPGA_POL_ERAM_TEMP_R [[0. 0. 0. 0.]\n", + " [0. 0. 0. 0.]]\n", + "UNB2_FPGA_POL_RXGXB_VOUT_R [[0. 0. 0. 0.]\n", + " [0. 0. 0. 0.]]\n", + "UNB2_FPGA_POL_RXGXB_IOUT_R [[0. 0. 0. 0.]\n", + " [0. 0. 0. 0.]]\n", + "UNB2_FPGA_POL_RXGXB_TEMP_R [[0. 0. 0. 0.]\n", + " [0. 0. 0. 0.]]\n", + "UNB2_FPGA_POL_TXGXB_VOUT_R [[0. 0. 0. 0.]\n", + " [0. 0. 0. 0.]]\n", + "UNB2_FPGA_POL_TXGXB_IOUT_R [[0. 0. 0. 0.]\n", + " [0. 0. 0. 0.]]\n", + "UNB2_FPGA_POL_HGXB_VOUT_R [[0. 0. 0. 0.]\n", + " [0. 0. 0. 0.]]\n", + "UNB2_FPGA_POL_HGXB_IOUT_R [[0. 0. 0. 0.]\n", + " [0. 0. 0. 0.]]\n", + "UNB2_FPGA_POL_HGXB_TEMP_R [[0. 0. 0. 0.]\n", + " [0. 0. 0. 0.]]\n", + "UNB2_FPGA_POL_PGM_VOUT_R [[0. 0. 0. 0.]\n", + " [0. 0. 0. 0.]]\n", + "UNB2_FPGA_POL_PGM_IOUT_R [[0. 0. 0. 0.]\n", + " [0. 0. 0. 0.]]\n", + "UNB2_FPGA_POL_PGM_TEMP_R [[0. 0. 0. 0.]\n", + " [0. 0. 0. 0.]]\n", + "State <function __get_command_func.<locals>.f at 0x7f4c210e1ea0>\n", + "Status <function __get_command_func.<locals>.f at 0x7f4c210e1ea0>\n" + ] + } + ], + "source": [ + "attr_names = d.get_attribute_list()\n", + "\n", + "\n", + "for i in attr_names:\n", + " exec(\"value = print(i, d.{})\".format(i))" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "id": "929965c2", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Old values:\n", + " [0 0]\n", + "Values to be set:\n", + " [1 3]\n", + "Values set in RW:\n", + " [1 3]\n", + "Values read back after setting:\n", + " [0 0]\n" + ] + } + ], + "source": [ + "#Test the LED CP\n", + "led = d.UNB2_Front_Panel_LED_R\n", + "print(\"Old values:\\n\", led)\n", + "led[0] = 1\n", + "led[1] = 3\n", + "print(\"Values to be set:\\n\", led)\n", + "d.UNB2_Front_Panel_LED_RW = led\n", + "print(\"Values set in RW:\\n\",d.UNB2_Front_Panel_LED_RW)\n", + "print(\"Values read back after setting:\\n\",d.UNB2_Front_Panel_LED_R)" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "id": "6813164e", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Old values:\n", + " [False False]\n", + "Values to be set:\n", + " [False False]\n", + "Values set in RW:\n", + " [False False]\n" + ] + } + ], + "source": [ + "#Test the ON OFF CP\n", + "onoff = d.UNB2_Power_ON_OFF_RW\n", + "print(\"Old values:\\n\", onoff)\n", + "onoff[0] = False\n", + "onoff[1] = False\n", + "print(\"Values to be set:\\n\", onoff)\n", + "d.UNB2_Power_ON_OFF_RW = onoff\n", + "print(\"Values set in RW:\\n\",d.UNB2_Power_ON_OFF_RW)" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "id": "e9b32ec7", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Old values:\n", + " [False False]\n", + "Values to be set:\n", + " [False False]\n", + "Values read back after setting:\n", + " [False False]\n" + ] + } + ], + "source": [ + "#Test the MASK CP\n", + "mask = d.UNB2_mask_RW\n", + "print(\"Old values:\\n\", mask)\n", + "mask[0] = False\n", + "mask[1] = False\n", + "print(\"Values to be set:\\n\", mask)\n", + "d.UNB2_mask_RW = mask\n", + "print(\"Values read back after setting:\\n\",d.UNB2_mask_RW)" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "id": "transsexual-battle", + "metadata": {}, + "outputs": [ + { + "ename": "AttributeError", + "evalue": "FPGA_mask_RW", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mAttributeError\u001b[0m Traceback (most recent call last)", + "\u001b[0;32m/tmp/ipykernel_22/2885399456.py\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[1;32m 1\u001b[0m values = [\n\u001b[0;32m----> 2\u001b[0;31m \u001b[0;34m[\u001b[0m\u001b[0md\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mFPGA_mask_RW\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m\"FPGA_mask_RW\"\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 3\u001b[0m \u001b[0;34m[\u001b[0m\u001b[0md\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mFPGA_scrap_R\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m\"FPGA_scrap_R\"\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 4\u001b[0m \u001b[0;34m[\u001b[0m\u001b[0md\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mFPGA_scrap_RW\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m\"FPGA_scrap_RW\"\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 5\u001b[0m \u001b[0;34m[\u001b[0m\u001b[0md\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mFPGA_status_R\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m\"FPGA_status_R\"\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m/usr/local/lib/python3.7/dist-packages/tango/device_proxy.py\u001b[0m in \u001b[0;36m__DeviceProxy__getattr\u001b[0;34m(self, name)\u001b[0m\n\u001b[1;32m 353\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mread_pipe\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mname\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 354\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 355\u001b[0;31m \u001b[0msix\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mraise_from\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mAttributeError\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mname\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcause\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 356\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 357\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m/usr/local/lib/python3.7/dist-packages/six.py\u001b[0m in \u001b[0;36mraise_from\u001b[0;34m(value, from_value)\u001b[0m\n", + "\u001b[0;31mAttributeError\u001b[0m: FPGA_mask_RW" + ] + } + ], + "source": [ + "values = [\n", + " [d.FPGA_mask_RW, \"FPGA_mask_RW\"],\n", + " [d.FPGA_scrap_R, \"FPGA_scrap_R\"],\n", + " [d.FPGA_scrap_RW, \"FPGA_scrap_RW\"],\n", + " [d.FPGA_status_R, \"FPGA_status_R\"],\n", + " [d.FPGA_temp_R, \"FPGA_temp_R\"],\n", + " [d.FPGA_version_R, \"FPGA_version_R\"],\n", + " [d.FPGA_weights_R, \"FPGA_weights_R\"],\n", + " [d.FPGA_weights_RW, \"FPGA_weights_RW\"],\n", + " [d.TR_busy_R, \"TR_busy_R\"],\n", + " [d.TR_reload_RW, \"TR_reload_RW\"],\n", + " # [d.TR_tod_R, \"TR_tod_R\"],\n", + " # [d.TR_uptime_R, \"TR_uptime_R\"]\n", + "]\n", + "\n", + "for i in values:\n", + " print(\"🟦🟦🟦\", i[1], \": \", i[0])" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "id": "b88868c5", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "array([[1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.],\n", + " [1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.],\n", + " [1., 1., 1., 1., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],\n", + " [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],\n", + " [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],\n", + " [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],\n", + " [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],\n", + " [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],\n", + " [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],\n", + " [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],\n", + " [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],\n", + " [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]],\n", + " dtype=float32)" + ] + }, + "execution_count": 19, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "wgswitches = d.FPGA_wg_enable_R\n", + "print(\"Old values:\\n\", wgswitches)\n", + "wgswitches[9][0] = True\n", + "wgswitches[10][0] = True\n", + "print(\"Values to be set:\\n\", wgswitches)\n", + "d.FPGA_wg_enable_RW =wgswitches\n", + "time.sleep(7)\n", + "print(\"Values read back after setting:\\n\",d.FPGA_wg_enable_R)" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "id": "8f3db8c7", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "array([[119.99817, 119.99817, 119.99817, 119.99817, 119.99817, 119.99817,\n", + " 119.99817, 119.99817, 119.99817, 119.99817, 119.99817, 119.99817,\n", + " 119.99817, 119.99817, 119.99817, 119.99817],\n", + " [119.99817, 119.99817, 119.99817, 119.99817, 119.99817, 119.99817,\n", + " 119.99817, 119.99817, 119.99817, 119.99817, 119.99817, 119.99817,\n", + " 119.99817, 119.99817, 119.99817, 119.99817],\n", + " [119.99817, 119.99817, 119.99817, 119.99817, 0. , 0. ,\n", + " 0. , 0. , 0. , 0. , 0. , 0. ,\n", + " 0. , 0. , 0. , 0. ],\n", + " [ 0. , 0. , 0. , 0. , 0. , 0. ,\n", + " 0. , 0. , 0. , 0. , 0. , 0. ,\n", + " 0. , 0. , 0. , 0. ],\n", + " [ 0. , 0. , 0. , 0. , 0. , 0. ,\n", + " 0. , 0. , 0. , 0. , 0. , 0. ,\n", + " 0. , 0. , 0. , 0. ],\n", + " [ 0. , 0. , 0. , 0. , 0. , 0. ,\n", + " 0. , 0. , 0. , 0. , 0. , 0. ,\n", + " 0. , 0. , 0. , 0. ],\n", + " [ 0. , 0. , 0. , 0. , 0. , 0. ,\n", + " 0. , 0. , 0. , 0. , 0. , 0. ,\n", + " 0. , 0. , 0. , 0. ],\n", + " [ 0. , 0. , 0. , 0. , 0. , 0. ,\n", + " 0. , 0. , 0. , 0. , 0. , 0. ,\n", + " 0. , 0. , 0. , 0. ],\n", + " [ 0. , 0. , 0. , 0. , 0. , 0. ,\n", + " 0. , 0. , 0. , 0. , 0. , 0. ,\n", + " 0. , 0. , 0. , 0. ],\n", + " [ 0. , 0. , 0. , 0. , 0. , 0. ,\n", + " 0. , 0. , 0. , 0. , 0. , 0. ,\n", + " 0. , 0. , 0. , 0. ],\n", + " [ 0. , 0. , 0. , 0. , 0. , 0. ,\n", + " 0. , 0. , 0. , 0. , 0. , 0. ,\n", + " 0. , 0. , 0. , 0. ],\n", + " [ 0. , 0. , 0. , 0. , 0. , 0. ,\n", + " 0. , 0. , 0. , 0. , 0. , 0. ,\n", + " 0. , 0. , 0. , 0. ]], dtype=float32)" + ] + }, + "execution_count": 18, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "phases = d.FPGA_wg_phase_R\n", + "print(\"Old values:\\n\", phases)\n", + "phases[9][0] = 1.0334\n", + "phases[9][1] = 20.15\n", + "phases[10][0] = 130\n", + "print(\"Values to be set:\\n\", phases)\n", + "d.FPGA_wg_phase_RW = phases\n", + "time.sleep(7)\n", + "print(\"Values read back after setting:\\n\", d.FPGA_wg_phase_R)" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "id": "e45b4874", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "array([[29921878., 29921878., 29921878., 29921878., 29921878., 29921878.,\n", + " 29921878., 29921878., 29921878., 29921878., 29921878., 29921878.,\n", + " 29921878., 29921878., 29921878., 29921878.],\n", + " [29921878., 29921878., 29921878., 29921878., 29921878., 29921878.,\n", + " 29921878., 29921878., 29921878., 29921878., 29921878., 29921878.,\n", + " 29921878., 29921878., 29921878., 29921878.],\n", + " [29921878., 29921878., 29921878., 29921878., 0., 0.,\n", + " 0., 0., 0., 0., 0., 0.,\n", + " 0., 0., 0., 0.],\n", + " [ 0., 0., 0., 0., 0., 0.,\n", + " 0., 0., 0., 0., 0., 0.,\n", + " 0., 0., 0., 0.],\n", + " [ 0., 0., 0., 0., 0., 0.,\n", + " 0., 0., 0., 0., 0., 0.,\n", + " 0., 0., 0., 0.],\n", + " [ 0., 0., 0., 0., 0., 0.,\n", + " 0., 0., 0., 0., 0., 0.,\n", + " 0., 0., 0., 0.],\n", + " [ 0., 0., 0., 0., 0., 0.,\n", + " 0., 0., 0., 0., 0., 0.,\n", + " 0., 0., 0., 0.],\n", + " [ 0., 0., 0., 0., 0., 0.,\n", + " 0., 0., 0., 0., 0., 0.,\n", + " 0., 0., 0., 0.],\n", + " [ 0., 0., 0., 0., 0., 0.,\n", + " 0., 0., 0., 0., 0., 0.,\n", + " 0., 0., 0., 0.],\n", + " [ 0., 0., 0., 0., 0., 0.,\n", + " 0., 0., 0., 0., 0., 0.,\n", + " 0., 0., 0., 0.],\n", + " [ 0., 0., 0., 0., 0., 0.,\n", + " 0., 0., 0., 0., 0., 0.,\n", + " 0., 0., 0., 0.],\n", + " [ 0., 0., 0., 0., 0., 0.,\n", + " 0., 0., 0., 0., 0., 0.,\n", + " 0., 0., 0., 0.]], dtype=float32)" + ] + }, + "execution_count": 13, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "amplitudes = d.FPGA_wg_amplitude_R\n", + "print(\"Old values:\\n\", amplitudes)\n", + "amplitudes[9][0] = 1.0\n", + "amplitudes[9][1] = 1.99\n", + "amplitudes[10][0] = 0.5\n", + "print(\"Values to be set:\\n\", amplitudes)\n", + "d.FPGA_wg_amplitude_RW = amplitudes\n", + "time.sleep(7)\n", + "print(\"Values read back after setting:\\n\", d.FPGA_wg_amplitude_R)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "9b1bbd3e", + "metadata": {}, + "outputs": [], + "source": [ + "frequencies = d.FPGA_wg_frequency_R\n", + "print(\"Old values:\\n\", frequencies)\n", + "frequencies[9][0] = 19000000\n", + "frequencies[9][1] = 20000000\n", + "frequencies[10][0] = 22000000\n", + "print(\"Values to be set:\\n\", frequencies)\n", + "d.FPGA_wg_frequency_RW = frequencies\n", + "print(\"Values read back after setting:\\n\", d.FPGA_wg_frequency_R)" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "StationControl", + "language": "python", + "name": "stationcontrol" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.7.3" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/sbin/load_ConfigDb.sh b/sbin/load_ConfigDb.sh index 03ab449a026b5de41056f16de0d2e566a00adfbb..0fe57087a89dc08ebef51d4679a687ebbf6a144a 100755 --- a/sbin/load_ConfigDb.sh +++ b/sbin/load_ConfigDb.sh @@ -9,10 +9,10 @@ fi # copy file into container to read it from container, as the file's location # in the container won't be the same as on the host. -docker cp "${file}" dsconfig:/tmp/dsconfig-load-settings.json || exit 1 +docker cp "${file}" "${CONTAINER_NAME_PREFIX}"dsconfig:/tmp/dsconfig-update-settings.json || exit 1 -# write settings -docker exec -it dsconfig json2tango --write /tmp/dsconfig-load-settings.json +# update settings, Do not change -i into -it this will break integration tests in gitlab ci! +docker exec -i "${CONTAINER_NAME_PREFIX}"dsconfig json2tango --write /tmp/dsconfig-update-settings.json # somehow json2tango does not return 0 on success exit 0 diff --git a/sbin/run_integration_test.sh b/sbin/run_integration_test.sh index e0b87940b9ac9776a812b2e7cda5d9fa851e9200..785875f9fc68b7b27da1c619e81fb4931baaef45 100755 --- a/sbin/run_integration_test.sh +++ b/sbin/run_integration_test.sh @@ -11,29 +11,35 @@ fi # Start and stop sequence cd "$LOFAR20_DIR/docker-compose" || exit 1 -make stop device-sdp device-recv device-sst device-unb2 device-xst sdptr-sim recv-sim unb2-sim -make start databaseds dsconfig jupyter elk +make stop device-sdp device-recv device-sst device-unb2 device-xst sdptr-sim recv-sim unb2-sim apsct-sim apspu-sim +make start databaseds dsconfig elk # Give dsconfig and databaseds time to start -sleep 15 +sleep 60 # Update the dsconfig -"${LOFAR20_DIR}"/sbin/update_ConfigDb.sh "${LOFAR20_DIR}"/CDB/integration_ConfigDb.json +# Do not remove `bash`, otherwise statement ignored by gitlab ci shell! +bash "${LOFAR20_DIR}"/sbin/update_ConfigDb.sh "${LOFAR20_DIR}"/CDB/LOFAR_ConfigDb.json +bash "${LOFAR20_DIR}"/sbin/update_ConfigDb.sh "${LOFAR20_DIR}"/CDB/stations/simulators_ConfigDb.json cd "$LOFAR20_DIR/docker-compose" || exit 1 -make start sdptr-sim recv-sim unb2-sim +make start sdptr-sim recv-sim unb2-sim apsct-sim apspu-sim # Give the simulators time to start sleep 5 make start device-sdp device-recv device-sst device-unb2 device-xst -# Give the devices time to start -sleep 5 +# Give devices time to restart +# TODO(Corne Lukken): Use a nicer more reliable mechanism +sleep 60 # Start the integration test cd "$LOFAR20_DIR/docker-compose" || exit 1 make start integration-test +# Give devices time to restart +sleep 60 + # Run the integration test with the output displayed on stdout -docker start -a integration-test +docker start -a "${CONTAINER_NAME_PREFIX}"integration-test diff --git a/sbin/update_ConfigDb.sh b/sbin/update_ConfigDb.sh index 8d71c312fc94ba4dba45b17c05a966f62fa9ff34..1255f1ea141a75940f2cd858dfc2b40818bd6ec2 100755 --- a/sbin/update_ConfigDb.sh +++ b/sbin/update_ConfigDb.sh @@ -9,10 +9,10 @@ fi # copy file into container to read it from container, as the file's location # in the container won't be the same as on the host. -docker cp "${file}" dsconfig:/tmp/dsconfig-update-settings.json || exit 1 +docker cp "${file}" "${CONTAINER_NAME_PREFIX}"dsconfig:/tmp/dsconfig-update-settings.json || exit 1 -# update settings -docker exec -it dsconfig json2tango --write --update /tmp/dsconfig-update-settings.json +# update settings, Do not change -i into -it this will break integration tests in gitlab ci! +docker exec -i "${CONTAINER_NAME_PREFIX}"dsconfig json2tango --write --update /tmp/dsconfig-update-settings.json # somehow json2tango does not return 0 on success exit 0 diff --git a/tangostationcontrol/tangostationcontrol/clients/attribute_wrapper.py b/tangostationcontrol/tangostationcontrol/clients/attribute_wrapper.py index 007b9ff86455d41a752168ad06558a3b220b8d79..f9cc13b3bfa8738414fa265c5a2154c0c471a493 100644 --- a/tangostationcontrol/tangostationcontrol/clients/attribute_wrapper.py +++ b/tangostationcontrol/tangostationcontrol/clients/attribute_wrapper.py @@ -154,7 +154,7 @@ class attribute_wrapper(attribute): try: self.read_function, self.write_function = client.setup_attribute(self.comms_annotation, self) except Exception as e: - raise Exception("Exception while setting %s attribute with annotation: '%s'", client.__class__.__name__, self.comms_annotation) from e + raise Exception(f"Exception while setting {client.__class__.__name__} attribute with annotation: {self.comms_annotation}") from e async def async_set_comm_client(self, client): """ @@ -163,7 +163,7 @@ class attribute_wrapper(attribute): try: self.read_function, self.write_function = await client.setup_attribute(self.comms_annotation, self) except Exception as e: - raise Exception("Exception while setting %s attribute with annotation: '%s'", client.__class__.__name__, self.comms_annotation) from e + raise Exception(f"Exception while setting {client.__class__.__name__} attribute with annotation: {self.comms_annotation}") from e def set_pass_func(self): def pass_func(value=None): diff --git a/tangostationcontrol/tangostationcontrol/clients/comms_client.py b/tangostationcontrol/tangostationcontrol/clients/comms_client.py index ab5279562305c351d346105fc4e914abffa72f57..31dfc99ce4092d8f1025bfe3b10fc8a9c561ebe8 100644 --- a/tangostationcontrol/tangostationcontrol/clients/comms_client.py +++ b/tangostationcontrol/tangostationcontrol/clients/comms_client.py @@ -25,24 +25,14 @@ class AbstractCommClient(ABC): @abstractmethod def setup_attribute(self, annotation, attribute): """ - This function is responsible for providing the attribute_wrapper with a read/write function - How this is done is implementation specific. + This function returns a (read_function, write_function) tuple for the provided attribute with the provided annotation. + The setup-attribute has access to the comms_annotation provided to the attribute wrapper to pass along to the comms client as well as a reference to the attribute itself. - It should do this by first calling: _setup_annotation and setup_value_conversion to get all data necceacry to configure the read/write functions. - It should then return the read and write functions to the attribute. - - MANDATORY: - annotation_outputs = _setup_annotation(annotation) - attribute_outputs = _setup_annotation(attribute) - (note: outputs are up to the user) - - REQUIRED: provide read and write functions to return, there are no restrictions on how these should be provided, - except that the read function takes a single input value and the write function returns a single value - - MANDATORY: - return read_function, write_function + The read_function must return a single value, representing the current value of the attribute. + + The write_function must take a single value, write it, and return None. Examples: - File system: get_mapping returns functions that read/write a fixed @@ -52,13 +42,6 @@ class AbstractCommClient(ABC): convert values between Python and OPC-UA. """ - def _setup_annotation(self, annotation): - """ - This function is responsible for handling the annotation data provided by the attribute to configure the read/write function the client must provide. - This function should be called by setup_attribute - """ - pass - class CommClient(AbstractCommClient, Thread): """ Abstracts communication with a client, for instance, over the network, by handling connect(), disconnect(), and ping() @@ -80,9 +63,10 @@ class CommClient(AbstractCommClient, Thread): def connect(self): """ Function used to connect to the client. + + Throws an Exception if the connection cannot be established. """ self.connected = True - return True def disconnect(self): """ @@ -91,22 +75,15 @@ class CommClient(AbstractCommClient, Thread): self.connected = False def run(self): - - # Explicitly connect - if not self.connect(): - # hardware or infra is down -- needs fixing first - self.fault_func() - return - self.stopping = False while not self.stopping: - # keep trying to connect if not self.connected: - if self.connect(): - pass - else: - # we retry only once, to catch exotic network issues. if the infra or hardware is down, - # our device cannot help, and must be reinitialised after the infra or hardware is fixed. + # we (re)try only once, to catch exotic network issues. if the infra or hardware is down, + # our device cannot help, and must be reinitialised after the infra or hardware is fixed. + try: + self.connect() + except Exception as e: + self.streams.error_stream("Fault condition in communication detected.", e) self.fault_func() return @@ -148,7 +125,6 @@ class CommClient(AbstractCommClient, Thread): self.disconnect() - class AsyncCommClient(object): """ Abstracts communication with a client, for instance, over the network, by handling connect(), disconnect(), and ping() diff --git a/tangostationcontrol/tangostationcontrol/clients/docker_client.py b/tangostationcontrol/tangostationcontrol/clients/docker_client.py index 66a782f9c44833f1ee52d1822991936e5bcf1f47..a7b487b66656f727b9bd794fcadf9fbe9c50e7fb 100644 --- a/tangostationcontrol/tangostationcontrol/clients/docker_client.py +++ b/tangostationcontrol/tangostationcontrol/clients/docker_client.py @@ -26,6 +26,10 @@ class DockerClient(AsyncCommClient): self.client = None async def setup_attribute(self, annotation, attribute): + """ + MANDATORY function: is used by the attribute wrapper to get read/write functions. must return the read and write functions + """ + container_name = annotation["container"] def read_function(): diff --git a/tangostationcontrol/tangostationcontrol/clients/opcua_client.py b/tangostationcontrol/tangostationcontrol/clients/opcua_client.py index f06a9ca85d2f02fafd4ada9e576393ae18f783f9..145c0ebe68c3824d764dd4417a81afeae8ce0247 100644 --- a/tangostationcontrol/tangostationcontrol/clients/opcua_client.py +++ b/tangostationcontrol/tangostationcontrol/clients/opcua_client.py @@ -41,6 +41,9 @@ class OPCUAConnection(AsyncCommClient): self.client = Client(address, int(timeout)) self.namespace = namespace + # prefix path to all nodes with this. this allows the user to switch trees more easily. + self.node_path_prefix = [] + super().__init__(fault_func, event_loop) def _servername(self): @@ -55,7 +58,6 @@ class OPCUAConnection(AsyncCommClient): try: await self.client.connect() - self.connected = True except (socket.error, IOError, OSError) as e: raise IOError(f"Could not connect to OPC-UA server {self._servername()}") from e @@ -83,11 +85,17 @@ class OPCUAConnection(AsyncCommClient): ping the client to make sure the connection with the client is still functional. """ try: - await self.client.send_hello() + # do a cheap call. NOTE: send_hello is not allowed after establishing a connection, + # so cannot be used here. see https://reference.opcfoundation.org/v104/Core/docs/Part6/7.1.3/ + _ = await self.client.get_namespace_array() except Exception as e: raise IOError("Lost connection to server %s: %s", self._servername(), e) - async def _setup_annotation(self, annotation): + def get_node_path(self, annotation): + """ + Return the path of a node as it will be looked up on the server. + """ + if isinstance(annotation, dict): # check if required path inarg is present if annotation.get('path') is None: @@ -99,21 +107,26 @@ class OPCUAConnection(AsyncCommClient): else: raise Exception("OPC-ua mapping requires either a list of the path or dict with the path. Was given %s type containing: %s", type(annotation), annotation) + + # add path prefix + path = self.node_path_prefix + path + # prepend namespace index for each element if none is given path = [name if ':' in name else f'{self.name_space_index}:{name}' for name in path] + return path + + + async def setup_attribute(self, annotation, attribute): + # process the annotation + path = self.get_node_path(annotation) + try: node = await self.obj.get_child(path) except Exception as e: logger.exception("Could not get node: %s on server %s", path, self._servername()) raise Exception("Could not get node: %s on server %s", path, self._servername()) from e - return node - - async def setup_attribute(self, annotation, attribute): - # process the annotation - node = await self._setup_annotation(annotation) - # get all the necessary data to set up the read/write functions from the attribute_wrapper dim_x = attribute.dim_x dim_y = attribute.dim_y @@ -146,6 +159,8 @@ class OPCUAConnection(AsyncCommClient): def call_method(self, method_path, *args): + method_path = self.get_node_path(method_path) + raise NotImplementedError diff --git a/tangostationcontrol/tangostationcontrol/common/lofar_logging.py b/tangostationcontrol/tangostationcontrol/common/lofar_logging.py index 766b8cc0eb31256928331e1f20bea191ad571b03..46d417c67987b1cec37897552ad35446ac7fdae1 100644 --- a/tangostationcontrol/tangostationcontrol/common/lofar_logging.py +++ b/tangostationcontrol/tangostationcontrol/common/lofar_logging.py @@ -93,6 +93,9 @@ class LogAnnotator(logging.Formatter): # annotate record with currently executing Tango device, if any record.tango_device = self.get_current_tango_device() + # construct an identifier we can add for other devices as well + record.lofar_id = f"tango - {record.tango_device}" + # annotate record with the current software version record.software_version = get_version() diff --git a/tangostationcontrol/tangostationcontrol/devices/apsct.py b/tangostationcontrol/tangostationcontrol/devices/apsct.py new file mode 100644 index 0000000000000000000000000000000000000000..78a0626d8a12985d944c752e544aff93209373be --- /dev/null +++ b/tangostationcontrol/tangostationcontrol/devices/apsct.py @@ -0,0 +1,146 @@ +# -*- coding: utf-8 -*- +# +# This file is part of the RECV project +# +# +# +# Distributed under the terms of the APACHE license. +# See LICENSE.txt for more info. + +""" APSCT Device Server for LOFAR2.0 + +""" + +# TODO(Corne): Remove sys.path.append hack once packaging is in place! +import os, sys +currentdir = os.path.dirname(os.path.realpath(__file__)) +parentdir = os.path.dirname(currentdir) +sys.path.append(parentdir) + +# PyTango imports +from tango import DebugIt +from tango.server import run, command +from tango.server import device_property, attribute +from tango import AttrWriteType +import numpy +# Additional import + +from device_decorators import * + +from clients.attribute_wrapper import attribute_wrapper +from devices.opcua_device import opcua_device +from common.lofar_logging import device_logging_to_python, log_exceptions + +import logging +logger = logging.getLogger() + +__all__ = ["APSCT", "main"] + +@device_logging_to_python() +class APSCT(opcua_device): + # ----------------- + # Device Properties + # ----------------- + + # ---------- + # Attributes + # ---------- + + APSCTTR_I2C_error_R = attribute_wrapper(comms_annotation=["APSCTTR_I2C_error_R" ],datatype=numpy.int64 ) + APSCTTR_monitor_rate_RW = attribute_wrapper(comms_annotation=["APSCTTR_monitor_rate_RW" ],datatype=numpy.int64 , access=AttrWriteType.READ_WRITE) + APSCTTR_translator_busy_R = attribute_wrapper(comms_annotation=["APSCTTR_translator_busy_R" ],datatype=numpy.bool_ ) + APSCT_INPUT_10MHz_good_R = attribute_wrapper(comms_annotation=["APSCT_INPUT_10MHz_good_R" ],datatype=numpy.bool_ ) + APSCT_INPUT_PPS_good_R = attribute_wrapper(comms_annotation=["APSCT_INPUT_PPS_good_R" ],datatype=numpy.bool_ ) + APSCT_PCB_ID_R = attribute_wrapper(comms_annotation=["APSCT_PCB_ID_R" ],datatype=numpy.int64 ) + APSCT_PCB_number_R = attribute_wrapper(comms_annotation=["APSCT_PCB_number_R" ],datatype=numpy.str ) + APSCT_PCB_version_R = attribute_wrapper(comms_annotation=["APSCT_PCB_version_R" ],datatype=numpy.str ) + APSCT_PLL_160MHz_error_R = attribute_wrapper(comms_annotation=["APSCT_PLL_160MHz_error_R" ],datatype=numpy.bool_ ) + APSCT_PLL_160MHz_locked_R = attribute_wrapper(comms_annotation=["APSCT_PLL_160MHz_locked_R" ],datatype=numpy.bool_ ) + APSCT_PLL_200MHz_error_R = attribute_wrapper(comms_annotation=["APSCT_PLL_200MHz_error_R" ],datatype=numpy.bool_ ) + APSCT_PLL_200MHz_locked_R = attribute_wrapper(comms_annotation=["APSCT_PLL_200MHz_locked_R" ],datatype=numpy.bool_ ) + APSCT_PPS_ignore_R = attribute_wrapper(comms_annotation=["APSCT_PPS_ignore_R" ],datatype=numpy.bool_ ) + APSCT_PPS_ignore_RW = attribute_wrapper(comms_annotation=["APSCT_PPS_ignore_RW" ],datatype=numpy.bool_ , access=AttrWriteType.READ_WRITE) + APSCT_PWR_CLKDIST1_3V3_R = attribute_wrapper(comms_annotation=["APSCT_PWR_CLKDIST1_3V3_R" ],datatype=numpy.float64) + APSCT_PWR_CLKDIST2_3V3_R = attribute_wrapper(comms_annotation=["APSCT_PWR_CLKDIST2_3V3_R" ],datatype=numpy.float64) + APSCT_PWR_CTRL_3V3_R = attribute_wrapper(comms_annotation=["APSCT_PWR_CTRL_3V3_R" ],datatype=numpy.float64) + APSCT_PWR_INPUT_3V3_R = attribute_wrapper(comms_annotation=["APSCT_PWR_INPUT_3V3_R" ],datatype=numpy.float64) + APSCT_PWR_on_R = attribute_wrapper(comms_annotation=["APSCT_PWR_on_R" ],datatype=numpy.bool_ ) + APSCT_PWR_PLL_160MHz_3V3_R = attribute_wrapper(comms_annotation=["APSCT_PWR_PLL_160MHz_3V3_R"],datatype=numpy.float64) + APSCT_PWR_PLL_160MHz_on_R = attribute_wrapper(comms_annotation=["APSCT_PWR_PLL_160MHz_on_R" ],datatype=numpy.bool_ ) + APSCT_PWR_PLL_200MHz_3V3_R = attribute_wrapper(comms_annotation=["APSCT_PWR_PLL_200MHz_3V3_R"],datatype=numpy.float64) + APSCT_PWR_PLL_200MHz_on_R = attribute_wrapper(comms_annotation=["APSCT_PWR_PLL_200MHz_on_R" ],datatype=numpy.bool_ ) + APSCT_PWR_PPSDIST_3V3_R = attribute_wrapper(comms_annotation=["APSCT_PWR_PPSDIST_3V3_R" ],datatype=numpy.float64) + APSCT_TEMP_R = attribute_wrapper(comms_annotation=["APSCT_TEMP_R" ],datatype=numpy.float64) + + # -------- + # overloaded functions + # -------- + + def _initialise_hardware(self): + """ Initialise the APSCT hardware. """ + + # method calls don't work yet, so don't use them to allow the boot + # device to initialise us without errors + logger.error("OPC-UA methods not supported yet, not initialising APSCT hardware!") + return + + # Cycle clock + self.CLK_off() + self.wait_attribute("APSCTTR_translator_busy_R", False, 10) + self.CLK_on() + self.wait_attribute("APSCTTR_translator_busy_R", False, 10) + + if not self.APSCT_PLL_200MHz_locked_R: + if self.APSCT_I2C_error_R: + raise Exception("I2C is not working. Maybe power cycle subrack to restart CLK board and translator?") + else: + raise Exception("200MHz signal is not locked. The subrack probably do not receive clock input or the CLK PCB is broken?") + + # -------- + # Commands + # -------- + + @command() + @DebugIt() + @only_when_on() + def CLK_off(self): + """ + + :return:None + """ + self.opcua_connection.call_method(["CLK_off"]) + + @command() + @DebugIt() + @only_when_on() + def CLK_on(self): + """ + + :return:None + """ + self.opcua_connection.call_method(["CLK_on"]) + + @command() + @DebugIt() + @only_when_on() + def CLK_PLL_setup(self): + """ + + :return:None + """ + self.opcua_connection.call_method(["CLK_PLL_setup"]) + +# ---------- +# Run server +# ---------- +def main(args=None, **kwargs): + """Main function of the APSCT module.""" + + from common.lofar_logging import configure_logger + configure_logger() + + return run((APSCT,), args=args, **kwargs) + + +if __name__ == '__main__': + main() diff --git a/tangostationcontrol/tangostationcontrol/devices/apspu.py b/tangostationcontrol/tangostationcontrol/devices/apspu.py new file mode 100644 index 0000000000000000000000000000000000000000..3daab9c071a73b75a4d28def984d4794d4aa7aef --- /dev/null +++ b/tangostationcontrol/tangostationcontrol/devices/apspu.py @@ -0,0 +1,87 @@ +# -*- coding: utf-8 -*- +# +# This file is part of the RECV project +# +# +# +# Distributed under the terms of the APACHE license. +# See LICENSE.txt for more info. + +""" APSPU Device Server for LOFAR2.0 + +""" + +# TODO(Corne): Remove sys.path.append hack once packaging is in place! +import os, sys +currentdir = os.path.dirname(os.path.realpath(__file__)) +parentdir = os.path.dirname(currentdir) +sys.path.append(parentdir) + +# PyTango imports +from tango import DebugIt +from tango.server import run, command +from tango.server import device_property, attribute +from tango import AttrWriteType +import numpy +# Additional import + +from device_decorators import * + +from clients.attribute_wrapper import attribute_wrapper +from devices.opcua_device import opcua_device +from common.lofar_logging import device_logging_to_python, log_exceptions + +__all__ = ["APSPU", "main"] + +@device_logging_to_python() +class APSPU(opcua_device): + # ----------------- + # Device Properties + # ----------------- + + # ---------- + # Attributes + # ---------- + + APSPUTR_I2C_error_R = attribute_wrapper(comms_annotation=["APSPUTR_I2C_error_R" ],datatype=numpy.int64 ) + APSPUTR_monitor_rate_RW = attribute_wrapper(comms_annotation=["APSPUTR_monitor_rate_RW" ],datatype=numpy.int64 , access=AttrWriteType.READ_WRITE) + APSPUTR_translator_busy_R = attribute_wrapper(comms_annotation=["APSPUTR_translator_busy_R" ],datatype=numpy.bool_ ) + APSPU_FAN1_RPM_R = attribute_wrapper(comms_annotation=["APSPU_FAN1_RPM_R" ],datatype=numpy.float64) + APSPU_FAN2_RPM_R = attribute_wrapper(comms_annotation=["APSPU_FAN2_RPM_R" ],datatype=numpy.float64) + APSPU_FAN3_RPM_R = attribute_wrapper(comms_annotation=["APSPU_FAN3_RPM_R" ],datatype=numpy.float64) + APSPU_LBA_IOUT_R = attribute_wrapper(comms_annotation=["APSPU_LBA_IOUT_R" ],datatype=numpy.float64) + APSPU_LBA_TEMP_R = attribute_wrapper(comms_annotation=["APSPU_LBA_TEMP_R" ],datatype=numpy.float64) + APSPU_LBA_VOUT_R = attribute_wrapper(comms_annotation=["APSPU_LBA_VOUT_R" ],datatype=numpy.float64) + APSPU_PCB_ID_R = attribute_wrapper(comms_annotation=["APSPU_PCB_ID_R" ],datatype=numpy.int64 ) + APSPU_PCB_number_R = attribute_wrapper(comms_annotation=["APSPU_PCB_number_R" ],datatype=numpy.str ) + APSPU_PCB_version_R = attribute_wrapper(comms_annotation=["APSPU_PCB_version_R" ],datatype=numpy.str ) + APSPU_RCU2A_IOUT_R = attribute_wrapper(comms_annotation=["APSPU_RCU2A_IOUT_R" ],datatype=numpy.float64) + APSPU_RCU2A_TEMP_R = attribute_wrapper(comms_annotation=["APSPU_RCU2A_TEMP_R" ],datatype=numpy.float64) + APSPU_RCU2A_VOUT_R = attribute_wrapper(comms_annotation=["APSPU_RCU2A_VOUT_R" ],datatype=numpy.float64) + APSPU_RCU2D_IOUT_R = attribute_wrapper(comms_annotation=["APSPU_RCU2D_IOUT_R" ],datatype=numpy.float64) + APSPU_RCU2D_TEMP_R = attribute_wrapper(comms_annotation=["APSPU_RCU2D_TEMP_R" ],datatype=numpy.float64) + APSPU_RCU2D_VOUT_R = attribute_wrapper(comms_annotation=["APSPU_RCU2D_VOUT_R" ],datatype=numpy.float64) + + # -------- + # overloaded functions + # -------- + + + # -------- + # Commands + # -------- + +# ---------- +# Run server +# ---------- +def main(args=None, **kwargs): + """Main function of the APSPU module.""" + + from common.lofar_logging import configure_logger + configure_logger() + + return run((APSPU,), args=args, **kwargs) + + +if __name__ == '__main__': + main() diff --git a/tangostationcontrol/tangostationcontrol/devices/boot.py b/tangostationcontrol/tangostationcontrol/devices/boot.py index c4021d9d913b09ff8ea95b9deb5e724f45dbc208..40fb6f5f4fb6f8648adf8897340278fed2040f43 100644 --- a/tangostationcontrol/tangostationcontrol/devices/boot.py +++ b/tangostationcontrol/tangostationcontrol/devices/boot.py @@ -52,13 +52,8 @@ class DevicesInitialiser(Thread): def __init__(self, device_names, ignore_unavailable_devices=True, proxy_timeout=10.0): self.ignore_unavailable_devices = ignore_unavailable_devices - # Since Python3.7+, the insertion order equals the iteration order, which is what we depend on - # to process the devices in the same order as in device_names. - self.devices = {name: DeviceProxy(name) for name in device_names} - - # set the timeout for all proxies - for device in self.devices.values(): - device.set_timeout_millis(int(proxy_timeout * 1000)) + self.device_names = device_names + self.proxy_timeout = proxy_timeout # setup initial state self.progress = 0 @@ -70,6 +65,19 @@ class DevicesInitialiser(Thread): self.set_status("Starting initialisation") try: + # Since Python3.7+, the insertion order equals the iteration order, which is what we depend on + # to process the devices in the same order as in device_names. + self.devices = {} + for name in self.device_names: + self.set_status(f"Obtaining a DeviceProxy to {name}") + self.devices[name] = DeviceProxy(name) + + # set the timeout for all proxies + self.set_status("Configuring DeviceProxies") + for device in self.devices.values(): + device.set_timeout_millis(int(self.proxy_timeout * 1000)) + + self.set_status("Initialisation started") self.initialise_devices() self.set_status("Initialisation completed") @@ -77,7 +85,7 @@ class DevicesInitialiser(Thread): logger.exception("Failed to initialise station") # add the exception to the status - self.set_status(f"{self.status} [{e.__class__.__name__}: {str(e)}]") + self.set_status(f"ERROR: {self.status} [{e.__class__.__name__}: {str(e)}]") # we keep the status stuck at the last thing it tried @@ -192,6 +200,8 @@ class Boot(hardware_device): dtype='DevVarStringArray', mandatory=False, default_value=["LTS/Docker/1", # Docker controls the device containers, so it goes before anything else + "LTS/APSPU/1", # APS Power Units control other hardware we want to initialise + "LTS/APSCT/1", "LTS/RECV/1", # RCUs are input for SDP, so initialise them first "LTS/UNB2/1", # Uniboards host SDP, so initialise them first "LTS/SDP/1", # SDP controls the mask for SST/XST/BST, so initialise it first diff --git a/tangostationcontrol/tangostationcontrol/devices/docker_device.py b/tangostationcontrol/tangostationcontrol/devices/docker_device.py index 5f08204d8359a7e4c1f257bc1b2b9a03fb4f1fb3..d00ce507d85fcb6333ab913c5c9678da47736108 100644 --- a/tangostationcontrol/tangostationcontrol/devices/docker_device.py +++ b/tangostationcontrol/tangostationcontrol/devices/docker_device.py @@ -49,6 +49,10 @@ class Docker(hardware_device): archiver_maria_db_RW = attribute_wrapper(comms_annotation={"container": "archiver-maria-db"}, datatype=numpy.bool_, access=AttrWriteType.READ_WRITE) databaseds_R = attribute_wrapper(comms_annotation={"container": "databaseds"}, datatype=numpy.bool_) databaseds_RW = attribute_wrapper(comms_annotation={"container": "databaseds"}, datatype=numpy.bool_, access=AttrWriteType.READ_WRITE) + device_apsct_R = attribute_wrapper(comms_annotation={"container": "device-apsct"}, datatype=numpy.bool_) + device_apsct_RW = attribute_wrapper(comms_annotation={"container": "device-apsct"}, datatype=numpy.bool_, access=AttrWriteType.READ_WRITE) + device_apspu_R = attribute_wrapper(comms_annotation={"container": "device-apspu"}, datatype=numpy.bool_) + device_apspu_RW = attribute_wrapper(comms_annotation={"container": "device-apspu"}, datatype=numpy.bool_, access=AttrWriteType.READ_WRITE) device_recv_R = attribute_wrapper(comms_annotation={"container": "device-recv"}, datatype=numpy.bool_) device_recv_RW = attribute_wrapper(comms_annotation={"container": "device-recv"}, datatype=numpy.bool_, access=AttrWriteType.READ_WRITE) device_sdp_R = attribute_wrapper(comms_annotation={"container": "device-sdp"}, datatype=numpy.bool_) diff --git a/tangostationcontrol/tangostationcontrol/devices/hardware_device.py b/tangostationcontrol/tangostationcontrol/devices/hardware_device.py index 72832a06b24d75d5e92d193e102ae000e38ba42b..9ebff00d7554040425e3fdd6630e0a833d48fa4f 100644 --- a/tangostationcontrol/tangostationcontrol/devices/hardware_device.py +++ b/tangostationcontrol/tangostationcontrol/devices/hardware_device.py @@ -104,7 +104,7 @@ class hardware_device(Device, metaclass=AbstractDeviceMetas): # -------- @command() - @only_in_states([DevState.FAULT, DevState.OFF]) + @only_in_states([DevState.OFF]) @DebugIt() @fault_on_error() @log_exceptions() diff --git a/tangostationcontrol/tangostationcontrol/devices/observation.py b/tangostationcontrol/tangostationcontrol/devices/observation.py index c5b6d469380b4c8eab96eeb31af79405876716a4..0c38ed93c76f0e03aa71de0a0d880d8ede6d8251 100644 --- a/tangostationcontrol/tangostationcontrol/devices/observation.py +++ b/tangostationcontrol/tangostationcontrol/devices/observation.py @@ -56,7 +56,7 @@ class Observation(Device): # Lifecycle functions @command(dtype_in = DevString) - @only_in_states([DevState.FAULT, DevState.OFF]) + @only_in_states([DevState.OFF]) @log_exceptions() def Initialise(self, parameters: DevString = None): self.set_state(DevState.INIT) diff --git a/tangostationcontrol/tangostationcontrol/devices/observation_control.py b/tangostationcontrol/tangostationcontrol/devices/observation_control.py index 869db4e92831126db76534d5c7c3c7985dab2a34..0383b9ab7e0b69e54feddd40af2bdc6eb4da3bb0 100644 --- a/tangostationcontrol/tangostationcontrol/devices/observation_control.py +++ b/tangostationcontrol/tangostationcontrol/devices/observation_control.py @@ -116,7 +116,7 @@ class ObservationControl(Device): # Lifecycle functions @command() - @only_in_states([DevState.FAULT, DevState.OFF]) + @only_in_states([DevState.OFF]) @log_exceptions() @DebugIt() def Initialise(self): diff --git a/tangostationcontrol/tangostationcontrol/devices/opcua_device.py b/tangostationcontrol/tangostationcontrol/devices/opcua_device.py index a6c3bfa285df61923fb4aa6b7b95eb0597fae533..801c71c09a96fd631db23a57ca123f3ceaebd843 100644 --- a/tangostationcontrol/tangostationcontrol/devices/opcua_device.py +++ b/tangostationcontrol/tangostationcontrol/devices/opcua_device.py @@ -71,6 +71,13 @@ class opcua_device(hardware_device): default_value="http://lofar.eu" ) + # Add these elements to the OPC-UA node path. + OPC_Node_Path_Prefix = device_property( + dtype='DevVarStringArray', + mandatory=False, + default_value=[] + ) + # ---------- # Attributes # ---------- @@ -87,6 +94,8 @@ class opcua_device(hardware_device): # set up the OPC ua client self.opcua_connection = OPCUAConnection("opc.tcp://{}:{}/".format(self.OPC_Server_Name, self.OPC_Server_Port), self.OPC_namespace, self.OPC_Time_Out, self.Fault) + self.opcua_connection.node_path_prefix = self.OPC_Node_Path_Prefix + self.opcua_missing_attributes = [] # schedule the opc-ua initialisation, and wait for it to finish @@ -105,7 +114,7 @@ class opcua_device(hardware_device): except Exception as e: # use the pass function instead of setting read/write fails i.set_pass_func() - self.opcua_missing_attributes.append(",".join(i.comms_annotation)) + self.opcua_missing_attributes.append(",".join(self.opcua_connection.get_node_path(i.comms_annotation))) self.warn_stream("error while setting the attribute {} read/write function. {}".format(i, e)) diff --git a/tangostationcontrol/tangostationcontrol/devices/recv.py b/tangostationcontrol/tangostationcontrol/devices/recv.py index f4f94b2e78822a3e572c47846bd35752ffbe5874..a9eee4160f9b7a6f981119c58ad2e707df0cf717 100644 --- a/tangostationcontrol/tangostationcontrol/devices/recv.py +++ b/tangostationcontrol/tangostationcontrol/devices/recv.py @@ -25,6 +25,9 @@ from tangostationcontrol.clients.attribute_wrapper import attribute_wrapper from tangostationcontrol.devices.device_decorators import * from tangostationcontrol.devices.opcua_device import opcua_device +import logging +logger = logging.getLogger() + __all__ = ["RECV", "main"] @device_logging_to_python() @@ -33,7 +36,7 @@ class RECV(opcua_device): # Device Properties # ----------------- - Ant_mask_RW_default = device_property( + ANT_mask_RW_default = device_property( dtype='DevVarBooleanArray', mandatory=False, default_value=[[True] * 3] * 32 @@ -47,47 +50,56 @@ class RECV(opcua_device): first_default_settings = [ # set the masks first, as those filter any subsequent settings - 'Ant_mask_RW', + 'ANT_mask_RW', 'RCU_mask_RW' ] # ---------- # Attributes # ---------- - Ant_mask_RW = attribute_wrapper(comms_annotation=["2:PCC", "2:Ant_mask_RW"], datatype=numpy.bool_, dims=(3, 32), access=AttrWriteType.READ_WRITE) - Ant_status_R = attribute(dtype=str, max_dim_x=3, max_dim_y=32) - CLK_Enable_PWR_R = attribute_wrapper(comms_annotation=["2:PCC", "2:CLK_Enable_PWR_R"], datatype=numpy.bool_) - CLK_I2C_STATUS_R = attribute_wrapper(comms_annotation=["2:PCC", "2:CLK_I2C_STATUS_R"], datatype=numpy.int64) - CLK_PLL_error_R = attribute_wrapper(comms_annotation=["2:PCC", "2:CLK_PLL_error_R"], datatype=numpy.bool_) - CLK_PLL_locked_R = attribute_wrapper(comms_annotation=["2:PCC", "2:CLK_PLL_locked_R"], datatype=numpy.bool_) - CLK_monitor_rate_RW = attribute_wrapper(comms_annotation=["2:PCC", "2:CLK_monitor_rate_RW"], datatype=numpy.int64, access=AttrWriteType.READ_WRITE) - CLK_translator_busy_R = attribute_wrapper(comms_annotation=["2:PCC", "2:CLK_translator_busy_R"], datatype=numpy.bool_) - HBA_element_beamformer_delays_R = attribute_wrapper(comms_annotation=["2:PCC", "2:HBA_element_beamformer_delays_R"], datatype=numpy.int64, dims=(32, 96)) - HBA_element_beamformer_delays_RW = attribute_wrapper(comms_annotation=["2:PCC", "2:HBA_element_beamformer_delays_RW"], datatype=numpy.int64, dims=(32, 96), access=AttrWriteType.READ_WRITE) - HBA_element_led_R = attribute_wrapper(comms_annotation=["2:PCC", "2:HBA_element_led_R"], datatype=numpy.int64, dims=(32, 96)) - HBA_element_led_RW = attribute_wrapper(comms_annotation=["2:PCC", "2:HBA_element_led_RW"], datatype=numpy.int64, dims=(32, 96), access=AttrWriteType.READ_WRITE) - HBA_element_LNA_pwr_R = attribute_wrapper(comms_annotation=["2:PCC", "2:HBA_element_LNA_pwr_R"], datatype=numpy.int64, dims=(32, 96)) - HBA_element_LNA_pwr_RW = attribute_wrapper(comms_annotation=["2:PCC", "2:HBA_element_LNA_pwr_RW"], datatype=numpy.int64, dims=(32, 96), access=AttrWriteType.READ_WRITE) - HBA_element_pwr_R = attribute_wrapper(comms_annotation=["2:PCC", "2:HBA_element_pwr_R"], datatype=numpy.int64, dims=(32, 96)) - HBA_element_pwr_RW = attribute_wrapper(comms_annotation=["2:PCC", "2:HBA_element_pwr_RW"], datatype=numpy.int64, dims=(32, 96), access=AttrWriteType.READ_WRITE) - RCU_ADC_lock_R = attribute_wrapper(comms_annotation=["2:PCC", "2:RCU_ADC_lock_R"], datatype=numpy.int64, dims=(3, 32)) - RCU_attenuator_R = attribute_wrapper(comms_annotation=["2:PCC", "2:RCU_attenuator_R"], datatype=numpy.int64, dims=(3, 32)) - RCU_attenuator_RW = attribute_wrapper(comms_annotation=["2:PCC", "2:RCU_attenuator_RW"], datatype=numpy.int64, dims=(3, 32), access=AttrWriteType.READ_WRITE) - RCU_band_R = attribute_wrapper(comms_annotation=["2:PCC", "2:RCU_band_R"], datatype=numpy.int64, dims=(3, 32)) - RCU_band_RW = attribute_wrapper(comms_annotation=["2:PCC", "2:RCU_band_RW"], datatype=numpy.int64, dims=(3, 32), access=AttrWriteType.READ_WRITE) - RCU_I2C_STATUS_R = attribute_wrapper(comms_annotation=["2:PCC", "2:RCU_I2C_STATUS_R"], datatype=numpy.int64, dims=(32,)) - RCU_ID_R = attribute_wrapper(comms_annotation=["2:PCC", "2:RCU_ID_R"], datatype=numpy.int64, dims=(32,)) - RCU_LED0_R = attribute_wrapper(comms_annotation=["2:PCC", "2:RCU_LED0_R"], datatype=numpy.bool_, dims=(32,)) - RCU_LED0_RW = attribute_wrapper(comms_annotation=["2:PCC", "2:RCU_LED0_RW"], datatype=numpy.bool_, dims=(32,), access=AttrWriteType.READ_WRITE) - RCU_LED1_R = attribute_wrapper(comms_annotation=["2:PCC", "2:RCU_LED1_R"], datatype=numpy.bool_, dims=(32,)) - RCU_LED1_RW = attribute_wrapper(comms_annotation=["2:PCC", "2:RCU_LED1_RW"], datatype=numpy.bool_, dims=(32,), access=AttrWriteType.READ_WRITE) - RCU_mask_RW = attribute_wrapper(comms_annotation=["2:PCC", "2:RCU_mask_RW"], datatype=numpy.bool_, dims=(32,), access=AttrWriteType.READ_WRITE) - RCU_monitor_rate_RW = attribute_wrapper(comms_annotation=["2:PCC", "2:RCU_monitor_rate_RW"], datatype=numpy.int64, access=AttrWriteType.READ_WRITE) - RCU_Pwr_dig_R = attribute_wrapper(comms_annotation=["2:PCC", "2:RCU_Pwr_dig_R"], datatype=numpy.bool_, dims=(32,)) - Ant_status_R = attribute(dtype=str, max_dim_x=32) - RCU_temperature_R = attribute_wrapper(comms_annotation=["2:PCC", "2:RCU_temperature_R"], datatype=numpy.float64, dims=(32,)) - RCU_translator_busy_R = attribute_wrapper(comms_annotation=["2:PCC", "2:RCU_translator_busy_R"], datatype=numpy.bool_) - RCU_version_R = attribute_wrapper(comms_annotation=["2:PCC", "2:RCU_version_R"], datatype=numpy.str, dims=(32,)) + ANT_status_R = attribute(dtype=str, max_dim_x=3, max_dim_y=32) + RCU_LED_colour_R = attribute(dtype=numpy.uint32, max_dim_x=32, fget=lambda self: (2 * self.RCU_LED_green_on_R + 4 * self.RCU_LED_red_on_R).astype(numpy.uint32)) + + ANT_mask_RW = attribute_wrapper(comms_annotation=["ANT_mask_RW" ],datatype=numpy.bool_ , dims=(3,32), access=AttrWriteType.READ_WRITE) + HBAT_BF_delays_R = attribute_wrapper(comms_annotation=["HBAT_BF_delays_R" ],datatype=numpy.int64 , dims=(32,96)) + HBAT_BF_delays_RW = attribute_wrapper(comms_annotation=["HBAT_BF_delays_RW" ],datatype=numpy.int64 , dims=(32,96), access=AttrWriteType.READ_WRITE) + HBAT_LED_on_R = attribute_wrapper(comms_annotation=["HBAT_LED_on_R" ],datatype=numpy.bool_ , dims=(32,96)) + HBAT_LED_on_RW = attribute_wrapper(comms_annotation=["HBAT_LED_on_RW" ],datatype=numpy.bool_ , dims=(32,96), access=AttrWriteType.READ_WRITE) + HBAT_PWR_LNA_on_R = attribute_wrapper(comms_annotation=["HBAT_PWR_LNA_on_R" ],datatype=numpy.bool_ , dims=(32,96)) + HBAT_PWR_LNA_on_RW = attribute_wrapper(comms_annotation=["HBAT_PWR_LNA_on_RW" ],datatype=numpy.bool_ , dims=(32,96), access=AttrWriteType.READ_WRITE) + HBAT_PWR_on_R = attribute_wrapper(comms_annotation=["HBAT_PWR_on_R" ],datatype=numpy.bool_ , dims=(32,96)) + HBAT_PWR_on_RW = attribute_wrapper(comms_annotation=["HBAT_PWR_on_RW" ],datatype=numpy.bool_ , dims=(32,96), access=AttrWriteType.READ_WRITE) + RCU_ADC_locked_R = attribute_wrapper(comms_annotation=["RCU_ADC_locked_R" ],datatype=numpy.bool_ , dims=(3,32)) + RCU_attenuator_dB_R = attribute_wrapper(comms_annotation=["RCU_attenuator_dB_R" ],datatype=numpy.int64 , dims=(3,32)) + RCU_attenuator_dB_RW = attribute_wrapper(comms_annotation=["RCU_attenuator_dB_RW" ],datatype=numpy.int64 , dims=(3,32), access=AttrWriteType.READ_WRITE) + RCU_band_select_R = attribute_wrapper(comms_annotation=["RCU_band_select_R" ],datatype=numpy.int64 , dims=(3,32)) + RCU_band_select_RW = attribute_wrapper(comms_annotation=["RCU_band_select_RW" ],datatype=numpy.int64 , dims=(3,32), access=AttrWriteType.READ_WRITE) + RCU_DTH_freq_R = attribute_wrapper(comms_annotation=["RCU_DTH_freq_R" ],datatype=numpy.int64 , dims=(3,32)) + RCU_DTH_freq_RW = attribute_wrapper(comms_annotation=["RCU_DTH_freq_RW" ],datatype=numpy.int64 , dims=(3,32), access=AttrWriteType.READ_WRITE) + RCU_DTH_on_R = attribute_wrapper(comms_annotation=["RCU_DTH_on_R" ],datatype=numpy.bool_ , dims=(3,32)) + RCU_LED_green_on_R = attribute_wrapper(comms_annotation=["RCU_LED_green_on_R" ],datatype=numpy.bool_ , dims=(32,)) + RCU_LED_green_on_RW = attribute_wrapper(comms_annotation=["RCU_LED_green_on_RW" ],datatype=numpy.bool_ , dims=(32,), access=AttrWriteType.READ_WRITE) + RCU_LED_red_on_R = attribute_wrapper(comms_annotation=["RCU_LED_red_on_R" ],datatype=numpy.bool_ , dims=(32,)) + RCU_LED_red_on_RW = attribute_wrapper(comms_annotation=["RCU_LED_red_on_RW" ],datatype=numpy.bool_ , dims=(32,), access=AttrWriteType.READ_WRITE) + RCU_mask_RW = attribute_wrapper(comms_annotation=["RCU_mask_RW" ],datatype=numpy.bool_ , dims=(32,), access=AttrWriteType.READ_WRITE) + RCU_PCB_ID_R = attribute_wrapper(comms_annotation=["RCU_PCB_ID_R" ],datatype=numpy.int64 , dims=(32,)) + RCU_PCB_number_R = attribute_wrapper(comms_annotation=["RCU_PCB_number_R" ],datatype=numpy.str , dims=(32,)) + RCU_PCB_version_R = attribute_wrapper(comms_annotation=["RCU_PCB_version_R" ],datatype=numpy.str , dims=(32,)) + RCU_PWR_1V8_R = attribute_wrapper(comms_annotation=["RCU_PWR_1V8_R" ],datatype=numpy.float64, dims=(32,)) + RCU_PWR_2V5_R = attribute_wrapper(comms_annotation=["RCU_PWR_2V5_R" ],datatype=numpy.float64, dims=(32,)) + RCU_PWR_3V3_R = attribute_wrapper(comms_annotation=["RCU_PWR_3V3_R" ],datatype=numpy.float64, dims=(32,)) + RCU_PWR_ANALOG_on_R = attribute_wrapper(comms_annotation=["RCU_PWR_ANALOG_on_R" ],datatype=numpy.bool_ , dims=(32,)) + RCU_PWR_ANT_IOUT_R = attribute_wrapper(comms_annotation=["RCU_PWR_ANT_IOUT_R" ],datatype=numpy.float64, dims=(3,32)) + RCU_PWR_ANT_on_R = attribute_wrapper(comms_annotation=["RCU_PWR_ANT_on_R" ],datatype=numpy.bool_ , dims=(3,32)) + RCU_PWR_ANT_on_RW = attribute_wrapper(comms_annotation=["RCU_PWR_ANT_on_RW" ],datatype=numpy.bool_ , dims=(3,32), access=AttrWriteType.READ_WRITE) + RCU_PWR_ANT_VIN_R = attribute_wrapper(comms_annotation=["RCU_PWR_ANT_VIN_R" ],datatype=numpy.float64, dims=(3,32)) + RCU_PWR_ANT_VOUT_R = attribute_wrapper(comms_annotation=["RCU_PWR_ANT_VOUT_R" ],datatype=numpy.float64, dims=(3,32)) + RCU_PWR_DIGITAL_on_R = attribute_wrapper(comms_annotation=["RCU_PWR_DIGITAL_on_R" ],datatype=numpy.bool_ , dims=(32,)) + RCU_PWR_good_R = attribute_wrapper(comms_annotation=["RCU_PWR_good_R" ],datatype=numpy.bool_ , dims=(32,)) + RCU_TEMP_R = attribute_wrapper(comms_annotation=["RCU_TEMP_R" ],datatype=numpy.float64, dims=(32,)) + RECVTR_I2C_error_R = attribute_wrapper(comms_annotation=["RECVTR_I2C_error_R" ],datatype=numpy.int64 , dims=(32,)) + RECVTR_monitor_rate_RW = attribute_wrapper(comms_annotation=["RECVTR_monitor_rate_RW" ],datatype=numpy.int64 , access=AttrWriteType.READ_WRITE) + RECVTR_translator_busy_R = attribute_wrapper(comms_annotation=["RECVTR_translator_busy_R" ],datatype=numpy.bool_ ) # -------- # overloaded functions @@ -104,7 +116,7 @@ class RECV(opcua_device): :return:None """ - self.opcua_connection.call_method(["2:PCC","2:RCU_off"]) + self.opcua_connection.call_method(["RCU_off"]) @command() @DebugIt() @@ -114,7 +126,7 @@ class RECV(opcua_device): :return:None """ - self.opcua_connection.call_method(["2:PCC","2:RCU_on"]) + self.opcua_connection.call_method(["RCU_on"]) @command() @DebugIt() @@ -124,7 +136,7 @@ class RECV(opcua_device): :return:None """ - self.opcua_connection.call_method(["2:PCC","2:ADC_on"]) + self.opcua_connection.call_method(["ADC_on"]) @command() @DebugIt() @@ -134,37 +146,7 @@ class RECV(opcua_device): :return:None """ - self.opcua_connection.call_method(["2:PCC","2:RCU_update"]) - - @command() - @DebugIt() - @only_when_on() - def CLK_off(self): - """ - - :return:None - """ - self.opcua_connection.call_method(["2:PCC","2:CLK_off"]) - - @command() - @DebugIt() - @only_when_on() - def CLK_on(self): - """ - - :return:None - """ - self.opcua_connection.call_method(["2:PCC","2:CLK_on"]) - - @command() - @DebugIt() - @only_when_on() - def CLK_PLL_setup(self): - """ - - :return:None - """ - self.opcua_connection.call_method(["2:PCC","2:CLK_PLL_setup"]) + self.opcua_connection.call_method(["RCU_update"]) def _initialise_hardware(self): """ Initialise the RCU hardware. """ @@ -174,23 +156,11 @@ class RECV(opcua_device): logger.error("OPC-UA methods not supported yet, not initialising RCU hardware!") return - # Cycle clock - self.CLK_off() - self.wait_attribute("CLK_translator_busy_R", False, 10) - self.CLK_on() - self.wait_attribute("CLK_translator_busy_R", False, 10) - - if not self.CLK_PLL_locked_R: - if self.CLK_I2C_STATUS_R > 0: - raise Exception("CLK I2C is not working. Maybe power cycle subrack to restart CLK board and translator?") - else: - raise Exception("CLK signal is not locked. The subrack probably do not receive clock input or the CLK PCB is broken?") - # Cycle RCUs self.RCU_off() - self.wait_attribute("RCU_translator_busy_R", False, 5) + self.wait_attribute("RECVTR_translator_busy_R", False, 5) self.RCU_on() - self.wait_attribute("RCU_translator_busy_R", False, 5) + self.wait_attribute("RECVTR_translator_busy_R", False, 5) def read_RCU_status_R(self): """ Returns a set of strings denoting the status of each RCU. @@ -217,7 +187,7 @@ class RECV(opcua_device): return rcu_status - def read_Ant_status_R(self): + def read_ANT_status_R(self): """ Returns a set of strings denoting the status of each antenna. An empty string means no problems were detected. A non-empty @@ -225,9 +195,9 @@ class RECV(opcua_device): This function can be used as input to modify the Ant_mask_RW. """ - ant_mask = self.Ant_mask_RW + ant_mask = self.ANT_mask_RW rcu_mask = self.RCU_mask_RW - adc_lock = self.RCU_ADC_lock_R + adc_lock = self.RCU_ADC_locked_R i2c_errors = self.RCU_I2C_STATUS_R nr_rcus = len(ant_mask) diff --git a/tangostationcontrol/tangostationcontrol/devices/sdp/sdp.py b/tangostationcontrol/tangostationcontrol/devices/sdp/sdp.py index 8d51cbdb14b78cb501eaeff8e7db4ead6a22056a..4c4b03f8a75d026f2f322ea9b301b9d2b537a6ba 100644 --- a/tangostationcontrol/tangostationcontrol/devices/sdp/sdp.py +++ b/tangostationcontrol/tangostationcontrol/devices/sdp/sdp.py @@ -74,7 +74,8 @@ class SDP(opcua_device): FPGA_sdp_info_station_id_RW_default = device_property( dtype='DevVarULongArray', - mandatory=True + mandatory=False, + default_value=[0] * 16 ) FPGA_subband_weights_RW_default = device_property( @@ -92,75 +93,73 @@ class SDP(opcua_device): # Attributes # ---------- - FPGA_beamlet_output_enable_R = attribute_wrapper(comms_annotation=["2:FPGA_beamlet_output_enable_R"], datatype=numpy.bool_, dims=(16,)) - FPGA_beamlet_output_enable_RW = attribute_wrapper(comms_annotation=["2:FPGA_beamlet_output_enable_RW"], datatype=numpy.bool_, dims=(16,), access=AttrWriteType.READ_WRITE) - FPGA_beamlet_output_hdr_eth_destination_mac_R = attribute_wrapper(comms_annotation=["2:FPGA_beamlet_output_hdr_eth_destination_mac_R"], datatype=numpy.str, dims=(16,)) - FPGA_beamlet_output_hdr_eth_destination_mac_RW = attribute_wrapper(comms_annotation=["2:FPGA_beamlet_output_hdr_eth_destination_mac_RW"], datatype=numpy.str, dims=(16,), access=AttrWriteType.READ_WRITE) - FPGA_beamlet_output_hdr_ip_destination_address_R = attribute_wrapper(comms_annotation=["2:FPGA_beamlet_output_hdr_ip_destination_address_R"], datatype=numpy.str, dims=(16,)) - FPGA_beamlet_output_hdr_ip_destination_address_RW = attribute_wrapper(comms_annotation=["2:FPGA_beamlet_output_hdr_ip_destination_address_RW"], datatype=numpy.str, dims=(16,), access=AttrWriteType.READ_WRITE) - FPGA_beamlet_output_hdr_udp_destination_port_R = attribute_wrapper(comms_annotation=["2:FPGA_beamlet_output_hdr_udp_destination_port_R"], datatype=numpy.uint16, dims=(16,)) - FPGA_beamlet_output_hdr_udp_destination_port_RW = attribute_wrapper(comms_annotation=["2:FPGA_beamlet_output_hdr_udp_destination_port_RW"], datatype=numpy.uint16, dims=(16,), access=AttrWriteType.READ_WRITE) - FPGA_beamlet_output_scale_R = attribute_wrapper(comms_annotation=["2:FPGA_beamlet_output_scale_R"], datatype=numpy.uint32, dims=(16,)) - FPGA_beamlet_output_scale_RW = attribute_wrapper(comms_annotation=["2:FPGA_beamlet_output_scale_RW"], datatype=numpy.uint32, dims=(16,), access=AttrWriteType.READ_WRITE) - FPGA_firmware_version_R = attribute_wrapper(comms_annotation=["2:FPGA_firmware_version_R"], datatype=numpy.str, dims=(16,)) - FPGA_global_node_index_R = attribute_wrapper(comms_annotation=["2:FPGA_global_node_index_R"], datatype=numpy.uint32, dims=(16,)) - FPGA_hardware_version_R = attribute_wrapper(comms_annotation=["2:FPGA_hardware_version_R"], datatype=numpy.str, dims=(16,)) - FPGA_processing_enable_R = attribute_wrapper(comms_annotation=["2:FPGA_processing_enable_R"], datatype=numpy.bool_, dims=(16,)) - FPGA_processing_enable_RW = attribute_wrapper(comms_annotation=["2:FPGA_processing_enable_RW"], datatype=numpy.bool_, dims=(16,), access=AttrWriteType.READ_WRITE) - FPGA_scrap_R = attribute_wrapper(comms_annotation=["2:FPGA_scrap_R"], datatype=numpy.int32, dims=(8192,)) - FPGA_scrap_RW = attribute_wrapper(comms_annotation=["2:FPGA_scrap_RW"], datatype=numpy.int32, dims=(8192,), access=AttrWriteType.READ_WRITE) - FPGA_signal_input_mean_R = attribute_wrapper(comms_annotation=["2:FPGA_signal_input_mean_R"], datatype=numpy.double, dims=(12, 16)) - FPGA_signal_input_rms_R = attribute_wrapper(comms_annotation=["2:FPGA_signal_input_rms_R"], datatype=numpy.double, dims=(12, 16)) - FPGA_sdp_info_antenna_band_index_R = attribute_wrapper(comms_annotation=["2:FPGA_sdp_info_antenna_band_index_R"], datatype=numpy.uint32, dims=(16,)) - FPGA_sdp_info_block_period_R = attribute_wrapper(comms_annotation=["2:FPGA_sdp_info_block_period_R"], datatype=numpy.uint32, dims=(16,)) - FPGA_sdp_info_f_adc_R = attribute_wrapper(comms_annotation=["2:FPGA_sdp_info_f_adc_R"], datatype=numpy.uint32, dims=(16,)) - FPGA_sdp_info_fsub_type_R = attribute_wrapper(comms_annotation=["2:FPGA_sdp_info_fsub_type_R"], datatype=numpy.uint32, dims=(16,)) - FPGA_sdp_info_nyquist_sampling_zone_index_R = attribute_wrapper(comms_annotation=["2:FPGA_sdp_info_nyquist_sampling_zone_index_R"], datatype=numpy.uint32, dims=(16,)) - FPGA_sdp_info_nyquist_sampling_zone_index_RW = attribute_wrapper(comms_annotation=["2:FPGA_sdp_info_nyquist_sampling_zone_index_RW"], datatype=numpy.uint32, dims=(16,), access=AttrWriteType.READ_WRITE) - FPGA_sdp_info_observation_id_R = attribute_wrapper(comms_annotation=["2:FPGA_sdp_info_observation_id_R"], datatype=numpy.uint32, dims=(16,)) - FPGA_sdp_info_observation_id_RW = attribute_wrapper(comms_annotation=["2:FPGA_sdp_info_observation_id_RW"], datatype=numpy.uint32, dims=(16,), access=AttrWriteType.READ_WRITE) - FPGA_sdp_info_station_id_R = attribute_wrapper(comms_annotation=["2:FPGA_sdp_info_station_id_R"], datatype=numpy.uint32, dims=(16,)) - FPGA_sdp_info_station_id_RW = attribute_wrapper(comms_annotation=["2:FPGA_sdp_info_station_id_RW"], datatype=numpy.uint32, dims=(16,), access=AttrWriteType.READ_WRITE) - FPGA_subband_weights_R = attribute_wrapper(comms_annotation=["2:FPGA_subband_weights_R"], datatype=numpy.uint32, dims=(12 * 512, 16)) - FPGA_subband_weights_RW = attribute_wrapper(comms_annotation=["2:FPGA_subband_weights_RW"], datatype=numpy.uint32, dims=(12 * 512, 16), access=AttrWriteType.READ_WRITE) - FPGA_temp_R = attribute_wrapper(comms_annotation=["2:FPGA_temp_R"], datatype=numpy.float_, dims=(16,)) - FPGA_weights_R = attribute_wrapper(comms_annotation=["2:FPGA_weights_R"], datatype=numpy.int16, dims=(12 * 488 * 2, 16)) - FPGA_weights_RW = attribute_wrapper(comms_annotation=["2:FPGA_weights_RW"], datatype=numpy.int16, dims=(12 * 488 * 2, 16), access=AttrWriteType.READ_WRITE) - FPGA_wg_amplitude_R = attribute_wrapper(comms_annotation=["2:FPGA_wg_amplitude_R"], datatype=numpy.float_, dims=(12, 16)) - FPGA_wg_amplitude_RW = attribute_wrapper(comms_annotation=["2:FPGA_wg_amplitude_RW"], datatype=numpy.float_, dims=(12, 16), access=AttrWriteType.READ_WRITE) - FPGA_wg_enable_R = attribute_wrapper(comms_annotation=["2:FPGA_wg_enable_R"], datatype=numpy.bool_, dims=(12, 16)) - FPGA_wg_enable_RW = attribute_wrapper(comms_annotation=["2:FPGA_wg_enable_RW"], datatype=numpy.bool_, dims=(12, 16), access=AttrWriteType.READ_WRITE) - FPGA_wg_frequency_R = attribute_wrapper(comms_annotation=["2:FPGA_wg_frequency_R"], datatype=numpy.float_, dims=(12, 16)) - FPGA_wg_frequency_RW = attribute_wrapper(comms_annotation=["2:FPGA_wg_frequency_RW"], datatype=numpy.float_, dims=(12, 16), access=AttrWriteType.READ_WRITE) - FPGA_wg_phase_R = attribute_wrapper(comms_annotation=["2:FPGA_wg_phase_R"], datatype=numpy.float_, dims=(12, 16)) - FPGA_wg_phase_RW = attribute_wrapper(comms_annotation=["2:FPGA_wg_phase_RW"], datatype=numpy.float_, dims=(12, 16), access=AttrWriteType.READ_WRITE) - TR_fpga_mask_R = attribute_wrapper(comms_annotation=["2:TR_fpga_mask_R"], datatype=numpy.bool_, dims=(16,)) - TR_fpga_mask_RW = attribute_wrapper(comms_annotation=["2:TR_fpga_mask_RW"], datatype=numpy.bool_, dims=(16,), access=AttrWriteType.READ_WRITE) - TR_fpga_communication_error_R = attribute_wrapper(comms_annotation=["2:TR_fpga_communication_error_R"], datatype=numpy.bool_, dims=(16,)) - TR_sdp_config_first_fpga_nr_R = attribute_wrapper(comms_annotation=["2:TR_sdp_config_first_fpga_nr_R"], datatype=numpy.uint32) - TR_sdp_config_nof_beamsets_R = attribute_wrapper(comms_annotation=["2:TR_sdp_config_nof_beamsets_R"], datatype=numpy.uint32) - TR_sdp_config_nof_fpgas_R = attribute_wrapper(comms_annotation=["2:TR_sdp_config_nof_fpgas_R"], datatype=numpy.uint32) - TR_software_version_R = attribute_wrapper(comms_annotation=["2:TR_software_version_R"], datatype=numpy.str) - TR_start_time_R = attribute_wrapper(comms_annotation=["2:TR_start_time_R"], datatype=numpy.int64) - TR_tod_R = attribute_wrapper(comms_annotation=["2:TR_tod_R"], datatype=numpy.int64, dims=(2,)) - TR_tod_pps_delta_R = attribute_wrapper(comms_annotation=["2:TR_tod_pps_delta_R"], datatype=numpy.double) + FPGA_beamlet_output_enable_R = attribute_wrapper(comms_annotation=["FPGA_beamlet_output_enable_R"], datatype=numpy.bool_, dims=(16,)) + FPGA_beamlet_output_enable_RW = attribute_wrapper(comms_annotation=["FPGA_beamlet_output_enable_RW"], datatype=numpy.bool_, dims=(16,), access=AttrWriteType.READ_WRITE) + FPGA_beamlet_output_hdr_eth_destination_mac_R = attribute_wrapper(comms_annotation=["FPGA_beamlet_output_hdr_eth_destination_mac_R"], datatype=numpy.str, dims=(16,)) + FPGA_beamlet_output_hdr_eth_destination_mac_RW = attribute_wrapper(comms_annotation=["FPGA_beamlet_output_hdr_eth_destination_mac_RW"], datatype=numpy.str, dims=(16,), access=AttrWriteType.READ_WRITE) + FPGA_beamlet_output_hdr_ip_destination_address_R = attribute_wrapper(comms_annotation=["FPGA_beamlet_output_hdr_ip_destination_address_R"], datatype=numpy.str, dims=(16,)) + FPGA_beamlet_output_hdr_ip_destination_address_RW = attribute_wrapper(comms_annotation=["FPGA_beamlet_output_hdr_ip_destination_address_RW"], datatype=numpy.str, dims=(16,), access=AttrWriteType.READ_WRITE) + FPGA_beamlet_output_hdr_udp_destination_port_R = attribute_wrapper(comms_annotation=["FPGA_beamlet_output_hdr_udp_destination_port_R"], datatype=numpy.uint16, dims=(16,)) + FPGA_beamlet_output_hdr_udp_destination_port_RW = attribute_wrapper(comms_annotation=["FPGA_beamlet_output_hdr_udp_destination_port_RW"], datatype=numpy.uint16, dims=(16,), access=AttrWriteType.READ_WRITE) + FPGA_beamlet_output_scale_R = attribute_wrapper(comms_annotation=["FPGA_beamlet_output_scale_R"], datatype=numpy.uint32, dims=(16,)) + FPGA_beamlet_output_scale_RW = attribute_wrapper(comms_annotation=["FPGA_beamlet_output_scale_RW"], datatype=numpy.uint32, dims=(16,), access=AttrWriteType.READ_WRITE) + FPGA_firmware_version_R = attribute_wrapper(comms_annotation=["FPGA_firmware_version_R"], datatype=numpy.str, dims=(16,)) + FPGA_global_node_index_R = attribute_wrapper(comms_annotation=["FPGA_global_node_index_R"], datatype=numpy.uint32, dims=(16,)) + FPGA_hardware_version_R = attribute_wrapper(comms_annotation=["FPGA_hardware_version_R"], datatype=numpy.str, dims=(16,)) + FPGA_processing_enable_R = attribute_wrapper(comms_annotation=["FPGA_processing_enable_R"], datatype=numpy.bool_, dims=(16,)) + FPGA_processing_enable_RW = attribute_wrapper(comms_annotation=["FPGA_processing_enable_RW"], datatype=numpy.bool_, dims=(16,), access=AttrWriteType.READ_WRITE) + FPGA_scrap_R = attribute_wrapper(comms_annotation=["FPGA_scrap_R"], datatype=numpy.int32, dims=(8192,)) + FPGA_scrap_RW = attribute_wrapper(comms_annotation=["FPGA_scrap_RW"], datatype=numpy.int32, dims=(8192,), access=AttrWriteType.READ_WRITE) + FPGA_sdp_info_antenna_band_index_R = attribute_wrapper(comms_annotation=["FPGA_sdp_info_antenna_band_index_R"], datatype=numpy.uint32, dims=(16,)) + FPGA_sdp_info_block_period_R = attribute_wrapper(comms_annotation=["FPGA_sdp_info_block_period_R"], datatype=numpy.uint32, dims=(16,)) + FPGA_sdp_info_f_adc_R = attribute_wrapper(comms_annotation=["FPGA_sdp_info_f_adc_R"], datatype=numpy.uint32, dims=(16,)) + FPGA_sdp_info_fsub_type_R = attribute_wrapper(comms_annotation=["FPGA_sdp_info_fsub_type_R"], datatype=numpy.uint32, dims=(16,)) + FPGA_sdp_info_nyquist_sampling_zone_index_R = attribute_wrapper(comms_annotation=["FPGA_sdp_info_nyquist_sampling_zone_index_R"], datatype=numpy.uint32, dims=(16,)) + FPGA_sdp_info_nyquist_sampling_zone_index_RW = attribute_wrapper(comms_annotation=["FPGA_sdp_info_nyquist_sampling_zone_index_RW"], datatype=numpy.uint32, dims=(16,), access=AttrWriteType.READ_WRITE) + FPGA_sdp_info_observation_id_R = attribute_wrapper(comms_annotation=["FPGA_sdp_info_observation_id_R"], datatype=numpy.uint32, dims=(16,)) + FPGA_sdp_info_observation_id_RW = attribute_wrapper(comms_annotation=["FPGA_sdp_info_observation_id_RW"], datatype=numpy.uint32, dims=(16,), access=AttrWriteType.READ_WRITE) + FPGA_sdp_info_station_id_R = attribute_wrapper(comms_annotation=["FPGA_sdp_info_station_id_R"], datatype=numpy.uint32, dims=(16,)) + FPGA_sdp_info_station_id_RW = attribute_wrapper(comms_annotation=["FPGA_sdp_info_station_id_RW"], datatype=numpy.uint32, dims=(16,), access=AttrWriteType.READ_WRITE) + FPGA_subband_weights_R = attribute_wrapper(comms_annotation=["FPGA_subband_weights_R"], datatype=numpy.uint32, dims=(12 * 512, 16)) + FPGA_subband_weights_RW = attribute_wrapper(comms_annotation=["FPGA_subband_weights_RW"], datatype=numpy.uint32, dims=(12 * 512, 16), access=AttrWriteType.READ_WRITE) + FPGA_temp_R = attribute_wrapper(comms_annotation=["FPGA_temp_R"], datatype=numpy.float_, dims=(16,)) + FPGA_weights_R = attribute_wrapper(comms_annotation=["FPGA_weights_R"], datatype=numpy.int16, dims=(12 * 488 * 2, 16)) + FPGA_weights_RW = attribute_wrapper(comms_annotation=["FPGA_weights_RW"], datatype=numpy.int16, dims=(12 * 488 * 2, 16), access=AttrWriteType.READ_WRITE) + FPGA_wg_amplitude_R = attribute_wrapper(comms_annotation=["FPGA_wg_amplitude_R"], datatype=numpy.float_, dims=(12, 16)) + FPGA_wg_amplitude_RW = attribute_wrapper(comms_annotation=["FPGA_wg_amplitude_RW"], datatype=numpy.float_, dims=(12, 16), access=AttrWriteType.READ_WRITE) + FPGA_wg_enable_R = attribute_wrapper(comms_annotation=["FPGA_wg_enable_R"], datatype=numpy.bool_, dims=(12, 16)) + FPGA_wg_enable_RW = attribute_wrapper(comms_annotation=["FPGA_wg_enable_RW"], datatype=numpy.bool_, dims=(12, 16), access=AttrWriteType.READ_WRITE) + FPGA_wg_frequency_R = attribute_wrapper(comms_annotation=["FPGA_wg_frequency_R"], datatype=numpy.float_, dims=(12, 16)) + FPGA_wg_frequency_RW = attribute_wrapper(comms_annotation=["FPGA_wg_frequency_RW"], datatype=numpy.float_, dims=(12, 16), access=AttrWriteType.READ_WRITE) + FPGA_wg_phase_R = attribute_wrapper(comms_annotation=["FPGA_wg_phase_R"], datatype=numpy.float_, dims=(12, 16)) + FPGA_wg_phase_RW = attribute_wrapper(comms_annotation=["FPGA_wg_phase_RW"], datatype=numpy.float_, dims=(12, 16), access=AttrWriteType.READ_WRITE) + TR_fpga_mask_R = attribute_wrapper(comms_annotation=["TR_fpga_mask_R"], datatype=numpy.bool_, dims=(16,)) + TR_fpga_mask_RW = attribute_wrapper(comms_annotation=["TR_fpga_mask_RW"], datatype=numpy.bool_, dims=(16,), access=AttrWriteType.READ_WRITE) + TR_fpga_communication_error_R = attribute_wrapper(comms_annotation=["TR_fpga_communication_error_R"], datatype=numpy.bool_, dims=(16,)) + TR_sdp_config_first_fpga_nr_R = attribute_wrapper(comms_annotation=["TR_sdp_config_first_fpga_nr_R"], datatype=numpy.uint32) + TR_sdp_config_nof_beamsets_R = attribute_wrapper(comms_annotation=["TR_sdp_config_nof_beamsets_R"], datatype=numpy.uint32) + TR_sdp_config_nof_fpgas_R = attribute_wrapper(comms_annotation=["TR_sdp_config_nof_fpgas_R"], datatype=numpy.uint32) + TR_software_version_R = attribute_wrapper(comms_annotation=["TR_software_version_R"], datatype=numpy.str) + TR_start_time_R = attribute_wrapper(comms_annotation=["TR_start_time_R"], datatype=numpy.int64) + TR_tod_R = attribute_wrapper(comms_annotation=["TR_tod_R"], datatype=numpy.int64, dims=(2,)) + TR_tod_pps_delta_R = attribute_wrapper(comms_annotation=["TR_tod_pps_delta_R"], datatype=numpy.double) S_pn = 12 # Number of ADC signal inputs per Processing Node (PN) FPGA. N_pn = 16 # Number of FPGAs per antenna band that is controlled via the SC - SDP interface. # OPC-UA MP only points for AIT - FPGA_signal_input_mean_R = attribute_wrapper(comms_annotation=["2:FPGA_signal_input_mean_R"], datatype=numpy.double , dims=(S_pn, N_pn)) - FPGA_signal_input_rms_R = attribute_wrapper(comms_annotation=["2:FPGA_signal_input_rms_R"], datatype=numpy.double, dims=(S_pn, N_pn)) - - FPGA_jesd204b_csr_rbd_count_R = attribute_wrapper(comms_annotation=["2:FPGA_jesd204b_csr_rbd_count_R"], datatype=numpy.uint32, dims=(S_pn, N_pn)) - FPGA_jesd204b_csr_dev_syncn_R = attribute_wrapper(comms_annotation=["2:FPGA_jesd204b_csr_dev_syncn_R"], datatype=numpy.uint32, dims=(S_pn, N_pn)) - FPGA_jesd204b_rx_err0_R = attribute_wrapper(comms_annotation=["2:FPGA_jesd204b_rx_err0_R"], datatype=numpy.uint32, dims=(S_pn, N_pn)) - FPGA_jesd204b_rx_err1_R = attribute_wrapper(comms_annotation=["2:FPGA_jesd204b_rx_err1_R"], datatype=numpy.uint32, dims=(S_pn, N_pn)) - - FPGA_bsn_monitor_input_bsn_R = attribute_wrapper(comms_annotation=["2:FPGA_bsn_monitor_input_bsn_R"], datatype=numpy.int64, dims=(N_pn,)) - FPGA_bsn_monitor_input_nof_packets_R = attribute_wrapper(comms_annotation=["2:FPGA_bsn_monitor_input_nof_packets_R"], datatype=numpy.int32, dims=(N_pn,)) - FPGA_bsn_monitor_input_nof_valid_R = attribute_wrapper(comms_annotation=["2:FPGA_bsn_monitor_input_nof_valid_R"], datatype=numpy.int32, dims=(N_pn,)) - FPGA_bsn_monitor_input_nof_err_R = attribute_wrapper(comms_annotation=["2:FPGA_bsn_monitor_input_nof_err_R"], datatype=numpy.int32, dims=(N_pn,)) + FPGA_signal_input_mean_R = attribute_wrapper(comms_annotation=["FPGA_signal_input_mean_R"], datatype=numpy.double , dims=(S_pn, N_pn)) + FPGA_signal_input_rms_R = attribute_wrapper(comms_annotation=["FPGA_signal_input_rms_R"], datatype=numpy.double, dims=(S_pn, N_pn)) + + FPGA_jesd204b_csr_rbd_count_R = attribute_wrapper(comms_annotation=["FPGA_jesd204b_csr_rbd_count_R"], datatype=numpy.uint32, dims=(S_pn, N_pn)) + FPGA_jesd204b_csr_dev_syncn_R = attribute_wrapper(comms_annotation=["FPGA_jesd204b_csr_dev_syncn_R"], datatype=numpy.uint32, dims=(S_pn, N_pn)) + FPGA_jesd204b_rx_err0_R = attribute_wrapper(comms_annotation=["FPGA_jesd204b_rx_err0_R"], datatype=numpy.uint32, dims=(S_pn, N_pn)) + FPGA_jesd204b_rx_err1_R = attribute_wrapper(comms_annotation=["FPGA_jesd204b_rx_err1_R"], datatype=numpy.uint32, dims=(S_pn, N_pn)) + + FPGA_bsn_monitor_input_bsn_R = attribute_wrapper(comms_annotation=["FPGA_bsn_monitor_input_bsn_R"], datatype=numpy.int64, dims=(N_pn,)) + FPGA_bsn_monitor_input_nof_packets_R = attribute_wrapper(comms_annotation=["FPGA_bsn_monitor_input_nof_packets_R"], datatype=numpy.int32, dims=(N_pn,)) + FPGA_bsn_monitor_input_nof_valid_R = attribute_wrapper(comms_annotation=["FPGA_bsn_monitor_input_nof_valid_R"], datatype=numpy.int32, dims=(N_pn,)) + FPGA_bsn_monitor_input_nof_err_R = attribute_wrapper(comms_annotation=["FPGA_bsn_monitor_input_nof_err_R"], datatype=numpy.int32, dims=(N_pn,)) # -------- # overloaded functions diff --git a/tangostationcontrol/tangostationcontrol/devices/sdp/sst.py b/tangostationcontrol/tangostationcontrol/devices/sdp/sst.py index 08613015db3f50bf1b93ebe7d9b11ac7f98cde03..18f000697b5351487ce4c75c0796e2cc81c28740 100644 --- a/tangostationcontrol/tangostationcontrol/devices/sdp/sst.py +++ b/tangostationcontrol/tangostationcontrol/devices/sdp/sst.py @@ -80,16 +80,16 @@ class SST(Statistics): # ---------- # FPGA control points for SSTs - FPGA_sst_offload_enable_RW = attribute_wrapper(comms_id=OPCUAConnection, comms_annotation=["2:FPGA_sst_offload_enable_RW"], datatype=numpy.bool_, dims=(16,), access=AttrWriteType.READ_WRITE) - FPGA_sst_offload_enable_R = attribute_wrapper(comms_id=OPCUAConnection, comms_annotation=["2:FPGA_sst_offload_enable_R"], datatype=numpy.bool_, dims=(16,)) - FPGA_sst_offload_hdr_eth_destination_mac_RW = attribute_wrapper(comms_id=OPCUAConnection, comms_annotation=["2:FPGA_sst_offload_hdr_eth_destination_mac_RW"], datatype=numpy.str, dims=(16,), access=AttrWriteType.READ_WRITE) - FPGA_sst_offload_hdr_eth_destination_mac_R = attribute_wrapper(comms_id=OPCUAConnection, comms_annotation=["2:FPGA_sst_offload_hdr_eth_destination_mac_R"], datatype=numpy.str, dims=(16,)) - FPGA_sst_offload_hdr_ip_destination_address_RW = attribute_wrapper(comms_id=OPCUAConnection, comms_annotation=["2:FPGA_sst_offload_hdr_ip_destination_address_RW"], datatype=numpy.str, dims=(16,), access=AttrWriteType.READ_WRITE) - FPGA_sst_offload_hdr_ip_destination_address_R = attribute_wrapper(comms_id=OPCUAConnection, comms_annotation=["2:FPGA_sst_offload_hdr_ip_destination_address_R"], datatype=numpy.str, dims=(16,)) - FPGA_sst_offload_hdr_udp_destination_port_RW = attribute_wrapper(comms_id=OPCUAConnection, comms_annotation=["2:FPGA_sst_offload_hdr_udp_destination_port_RW"], datatype=numpy.uint16, dims=(16,), access=AttrWriteType.READ_WRITE) - FPGA_sst_offload_hdr_udp_destination_port_R = attribute_wrapper(comms_id=OPCUAConnection, comms_annotation=["2:FPGA_sst_offload_hdr_udp_destination_port_R"], datatype=numpy.uint16, dims=(16,)) - FPGA_sst_offload_weighted_subbands_RW = attribute_wrapper(comms_id=OPCUAConnection, comms_annotation=["2:FPGA_sst_offload_weighted_subbands_RW"], datatype=numpy.bool_, dims=(16,), access=AttrWriteType.READ_WRITE) - FPGA_sst_offload_weighted_subbands_R = attribute_wrapper(comms_id=OPCUAConnection, comms_annotation=["2:FPGA_sst_offload_weighted_subbands_R"], datatype=numpy.bool_, dims=(16,)) + FPGA_sst_offload_enable_RW = attribute_wrapper(comms_id=OPCUAConnection, comms_annotation=["FPGA_sst_offload_enable_RW"], datatype=numpy.bool_, dims=(16,), access=AttrWriteType.READ_WRITE) + FPGA_sst_offload_enable_R = attribute_wrapper(comms_id=OPCUAConnection, comms_annotation=["FPGA_sst_offload_enable_R"], datatype=numpy.bool_, dims=(16,)) + FPGA_sst_offload_hdr_eth_destination_mac_RW = attribute_wrapper(comms_id=OPCUAConnection, comms_annotation=["FPGA_sst_offload_hdr_eth_destination_mac_RW"], datatype=numpy.str, dims=(16,), access=AttrWriteType.READ_WRITE) + FPGA_sst_offload_hdr_eth_destination_mac_R = attribute_wrapper(comms_id=OPCUAConnection, comms_annotation=["FPGA_sst_offload_hdr_eth_destination_mac_R"], datatype=numpy.str, dims=(16,)) + FPGA_sst_offload_hdr_ip_destination_address_RW = attribute_wrapper(comms_id=OPCUAConnection, comms_annotation=["FPGA_sst_offload_hdr_ip_destination_address_RW"], datatype=numpy.str, dims=(16,), access=AttrWriteType.READ_WRITE) + FPGA_sst_offload_hdr_ip_destination_address_R = attribute_wrapper(comms_id=OPCUAConnection, comms_annotation=["FPGA_sst_offload_hdr_ip_destination_address_R"], datatype=numpy.str, dims=(16,)) + FPGA_sst_offload_hdr_udp_destination_port_RW = attribute_wrapper(comms_id=OPCUAConnection, comms_annotation=["FPGA_sst_offload_hdr_udp_destination_port_RW"], datatype=numpy.uint16, dims=(16,), access=AttrWriteType.READ_WRITE) + FPGA_sst_offload_hdr_udp_destination_port_R = attribute_wrapper(comms_id=OPCUAConnection, comms_annotation=["FPGA_sst_offload_hdr_udp_destination_port_R"], datatype=numpy.uint16, dims=(16,)) + FPGA_sst_offload_weighted_subbands_RW = attribute_wrapper(comms_id=OPCUAConnection, comms_annotation=["FPGA_sst_offload_weighted_subbands_RW"], datatype=numpy.bool_, dims=(16,), access=AttrWriteType.READ_WRITE) + FPGA_sst_offload_weighted_subbands_R = attribute_wrapper(comms_id=OPCUAConnection, comms_annotation=["FPGA_sst_offload_weighted_subbands_R"], datatype=numpy.bool_, dims=(16,)) # number of packets with valid payloads nof_valid_payloads_R = attribute_wrapper(comms_id=StatisticsClient, comms_annotation={"type": "statistics", "parameter": "nof_valid_payloads"}, dims=(SSTCollector.MAX_FPGAS,), datatype=numpy.uint64) diff --git a/tangostationcontrol/tangostationcontrol/devices/sdp/xst.py b/tangostationcontrol/tangostationcontrol/devices/sdp/xst.py index 4bbdee6a630ea299d5965443396a7662de59e149..dcbda73c6570f6db966eaf5518e2129ecea41187 100644 --- a/tangostationcontrol/tangostationcontrol/devices/sdp/xst.py +++ b/tangostationcontrol/tangostationcontrol/devices/sdp/xst.py @@ -93,20 +93,20 @@ class XST(Statistics): # ---------- # FPGA control points for XSTs - FPGA_xst_integration_interval_RW = attribute_wrapper(comms_id=OPCUAConnection, comms_annotation=["2:FPGA_xst_integration_interval_RW"], datatype=numpy.double, dims=(16,), access=AttrWriteType.READ_WRITE) - FPGA_xst_integration_interval_R = attribute_wrapper(comms_id=OPCUAConnection, comms_annotation=["2:FPGA_xst_integration_interval_R"], datatype=numpy.double, dims=(16,)) - FPGA_xst_offload_enable_RW = attribute_wrapper(comms_id=OPCUAConnection, comms_annotation=["2:FPGA_xst_offload_enable_RW"], datatype=numpy.bool_, dims=(16,), access=AttrWriteType.READ_WRITE) - FPGA_xst_offload_enable_R = attribute_wrapper(comms_id=OPCUAConnection, comms_annotation=["2:FPGA_xst_offload_enable_R"], datatype=numpy.bool_, dims=(16,)) - FPGA_xst_offload_hdr_eth_destination_mac_RW = attribute_wrapper(comms_id=OPCUAConnection, comms_annotation=["2:FPGA_xst_offload_hdr_eth_destination_mac_RW"], datatype=numpy.str, dims=(16,), access=AttrWriteType.READ_WRITE) - FPGA_xst_offload_hdr_eth_destination_mac_R = attribute_wrapper(comms_id=OPCUAConnection, comms_annotation=["2:FPGA_xst_offload_hdr_eth_destination_mac_R"], datatype=numpy.str, dims=(16,)) - FPGA_xst_offload_hdr_ip_destination_address_RW = attribute_wrapper(comms_id=OPCUAConnection, comms_annotation=["2:FPGA_xst_offload_hdr_ip_destination_address_RW"], datatype=numpy.str, dims=(16,), access=AttrWriteType.READ_WRITE) - FPGA_xst_offload_hdr_ip_destination_address_R = attribute_wrapper(comms_id=OPCUAConnection, comms_annotation=["2:FPGA_xst_offload_hdr_ip_destination_address_R"], datatype=numpy.str, dims=(16,)) - FPGA_xst_offload_hdr_udp_destination_port_RW = attribute_wrapper(comms_id=OPCUAConnection, comms_annotation=["2:FPGA_xst_offload_hdr_udp_destination_port_RW"], datatype=numpy.uint16, dims=(16,), access=AttrWriteType.READ_WRITE) - FPGA_xst_offload_hdr_udp_destination_port_R = attribute_wrapper(comms_id=OPCUAConnection, comms_annotation=["2:FPGA_xst_offload_hdr_udp_destination_port_R"], datatype=numpy.uint16, dims=(16,)) - FPGA_xst_processing_enable_RW = attribute_wrapper(comms_id=OPCUAConnection, comms_annotation=["2:FPGA_xst_processing_enable_RW"], datatype=numpy.bool_, dims=(16,), access=AttrWriteType.READ_WRITE) - FPGA_xst_processing_enable_R = attribute_wrapper(comms_id=OPCUAConnection, comms_annotation=["2:FPGA_xst_processing_enable_R"], datatype=numpy.bool_, dims=(16,)) - FPGA_xst_subband_select_RW = attribute_wrapper(comms_id=OPCUAConnection, comms_annotation=["2:FPGA_xst_subband_select_RW"], datatype=numpy.uint32, dims=(8,16), access=AttrWriteType.READ_WRITE) - FPGA_xst_subband_select_R = attribute_wrapper(comms_id=OPCUAConnection, comms_annotation=["2:FPGA_xst_subband_select_R"], datatype=numpy.uint32, dims=(8,16)) + FPGA_xst_integration_interval_RW = attribute_wrapper(comms_id=OPCUAConnection, comms_annotation=["FPGA_xst_integration_interval_RW"], datatype=numpy.double, dims=(16,), access=AttrWriteType.READ_WRITE) + FPGA_xst_integration_interval_R = attribute_wrapper(comms_id=OPCUAConnection, comms_annotation=["FPGA_xst_integration_interval_R"], datatype=numpy.double, dims=(16,)) + FPGA_xst_offload_enable_RW = attribute_wrapper(comms_id=OPCUAConnection, comms_annotation=["FPGA_xst_offload_enable_RW"], datatype=numpy.bool_, dims=(16,), access=AttrWriteType.READ_WRITE) + FPGA_xst_offload_enable_R = attribute_wrapper(comms_id=OPCUAConnection, comms_annotation=["FPGA_xst_offload_enable_R"], datatype=numpy.bool_, dims=(16,)) + FPGA_xst_offload_hdr_eth_destination_mac_RW = attribute_wrapper(comms_id=OPCUAConnection, comms_annotation=["FPGA_xst_offload_hdr_eth_destination_mac_RW"], datatype=numpy.str, dims=(16,), access=AttrWriteType.READ_WRITE) + FPGA_xst_offload_hdr_eth_destination_mac_R = attribute_wrapper(comms_id=OPCUAConnection, comms_annotation=["FPGA_xst_offload_hdr_eth_destination_mac_R"], datatype=numpy.str, dims=(16,)) + FPGA_xst_offload_hdr_ip_destination_address_RW = attribute_wrapper(comms_id=OPCUAConnection, comms_annotation=["FPGA_xst_offload_hdr_ip_destination_address_RW"], datatype=numpy.str, dims=(16,), access=AttrWriteType.READ_WRITE) + FPGA_xst_offload_hdr_ip_destination_address_R = attribute_wrapper(comms_id=OPCUAConnection, comms_annotation=["FPGA_xst_offload_hdr_ip_destination_address_R"], datatype=numpy.str, dims=(16,)) + FPGA_xst_offload_hdr_udp_destination_port_RW = attribute_wrapper(comms_id=OPCUAConnection, comms_annotation=["FPGA_xst_offload_hdr_udp_destination_port_RW"], datatype=numpy.uint16, dims=(16,), access=AttrWriteType.READ_WRITE) + FPGA_xst_offload_hdr_udp_destination_port_R = attribute_wrapper(comms_id=OPCUAConnection, comms_annotation=["FPGA_xst_offload_hdr_udp_destination_port_R"], datatype=numpy.uint16, dims=(16,)) + FPGA_xst_processing_enable_RW = attribute_wrapper(comms_id=OPCUAConnection, comms_annotation=["FPGA_xst_processing_enable_RW"], datatype=numpy.bool_, dims=(16,), access=AttrWriteType.READ_WRITE) + FPGA_xst_processing_enable_R = attribute_wrapper(comms_id=OPCUAConnection, comms_annotation=["FPGA_xst_processing_enable_R"], datatype=numpy.bool_, dims=(16,)) + FPGA_xst_subband_select_RW = attribute_wrapper(comms_id=OPCUAConnection, comms_annotation=["FPGA_xst_subband_select_RW"], datatype=numpy.uint32, dims=(8,16), access=AttrWriteType.READ_WRITE) + FPGA_xst_subband_select_R = attribute_wrapper(comms_id=OPCUAConnection, comms_annotation=["FPGA_xst_subband_select_R"], datatype=numpy.uint32, dims=(8,16)) # number of packets with valid payloads nof_valid_payloads_R = attribute_wrapper(comms_id=StatisticsClient, comms_annotation={"type": "statistics", "parameter": "nof_valid_payloads"}, dims=(XSTCollector.MAX_FPGAS,), datatype=numpy.uint64) diff --git a/tangostationcontrol/tangostationcontrol/devices/unb2.py b/tangostationcontrol/tangostationcontrol/devices/unb2.py index 4250e3c99d90c14cb9a3f0240352287f67f4ae4c..0076a37a25c0838f8324a409f08223fab79b92f1 100644 --- a/tangostationcontrol/tangostationcontrol/devices/unb2.py +++ b/tangostationcontrol/tangostationcontrol/devices/unb2.py @@ -47,92 +47,71 @@ class UNB2(opcua_device): N_ddr = 2 N_qsfp = 6 - ### All CP/MP are in order of appearance in the ICD - ### Central CP per Uniboard - - ### Some points are not working yet on the UNB2 or under discussion - #XXX means Not working yet, but they are working on it - ##XXX Means Under discussion - - # Special case for the on off switch: instead of UNB2_Power_ON_OFF_R we use UNB2_POL_FPGA_CORE_VOUT_R as the MP - UNB2_Power_ON_OFF_RW = attribute_wrapper(comms_annotation=["2:PCC", "2:UNB2_Power_ON_OFF_RW"], datatype=numpy.bool_, dims=(N_unb,), access=AttrWriteType.READ_WRITE) - UNB2_Front_Panel_LED_RW = attribute_wrapper(comms_annotation=["2:PCC", "2:UNB2_Front_Panel_LED_RW"], datatype=numpy.uint8, dims=(N_unb,), access=AttrWriteType.READ_WRITE) - UNB2_Front_Panel_LED_R = attribute_wrapper(comms_annotation=["2:PCC", "2:UNB2_Front_Panel_LED_R"], datatype=numpy.uint8, dims=(N_unb,)) - UNB2_mask_RW = attribute_wrapper(comms_annotation=["2:PCC", "2:UNB2_mask_RW"], datatype=numpy.bool_, dims=(N_unb,), access=AttrWriteType.READ_WRITE) - # Not yet deployed - #UNB2_mask_R = attribute_wrapper(comms_annotation=["2:PCC", "2:UNB2_mask_R"], datatype=numpy.bool_, dims=(N_unb,)) - - ### Central MP per Uniboard - # These three are only available in UNB2c - UNB2_I2C_bus_STATUS_R = attribute_wrapper(comms_annotation=["2:PCC", "2:UNB2_I2C_bus_STATUS_R"], datatype=numpy.bool_, dims=(N_unb,)) - ##UNB2_I2C_bus_STATUS_R will probably be renamed to UNB2_I2C_bus_OK_R - ##UNB2_I2C_bus_OK_R = attribute_wrapper(comms_annotation=["2:PCC", "2:UNB2_I2C_bus_OK_R"], datatype=numpy.bool_, dims=(N_unb,)) - #UNB2_EEPROM_Serial_Number_R = attribute_wrapper(comms_annotation=["2:PCC", "2:UNB2_EEPROM_Serial_Number_R"], datatype=numpy.str, dims=(N_unb,)) - UNB2_EEPROM_Unique_ID_R = attribute_wrapper(comms_annotation=["2:PCC", "2:UNB2_EEPROM_Unique_ID_R"], datatype=numpy.uint32, dims=(N_unb,)) - UNB2_DC_DC_48V_12V_VIN_R = attribute_wrapper(comms_annotation=["2:PCC", "2:UNB2_DC_DC_48V_12V_VIN_R"], datatype=numpy.double, dims=(N_unb,)) - UNB2_DC_DC_48V_12V_VOUT_R = attribute_wrapper(comms_annotation=["2:PCC", "2:UNB2_DC_DC_48V_12V_VOUT_R"], datatype=numpy.double, dims=(N_unb,)) - UNB2_DC_DC_48V_12V_IOUT_R = attribute_wrapper(comms_annotation=["2:PCC", "2:UNB2_DC_DC_48V_12V_IOUT_R"], datatype=numpy.double, dims=(N_unb,)) - UNB2_DC_DC_48V_12V_TEMP_R = attribute_wrapper(comms_annotation=["2:PCC", "2:UNB2_DC_DC_48V_12V_TEMP_R"], datatype=numpy.double, dims=(N_unb,)) - UNB2_POL_QSFP_N01_VOUT_R = attribute_wrapper(comms_annotation=["2:PCC", "2:UNB2_POL_QSFP_N01_VOUT_R"], datatype=numpy.double, dims=(N_unb,)) - UNB2_POL_QSFP_N01_IOUT_R = attribute_wrapper(comms_annotation=["2:PCC", "2:UNB2_POL_QSFP_N01_IOUT_R"], datatype=numpy.double, dims=(N_unb,)) - UNB2_POL_QSFP_N01_TEMP_R = attribute_wrapper(comms_annotation=["2:PCC", "2:UNB2_POL_QSFP_N01_TEMP_R"], datatype=numpy.double, dims=(N_unb,)) - UNB2_POL_QSFP_N23_VOUT_R = attribute_wrapper(comms_annotation=["2:PCC", "2:UNB2_POL_QSFP_N23_VOUT_R"], datatype=numpy.double, dims=(N_unb,)) - UNB2_POL_QSFP_N23_IOUT_R = attribute_wrapper(comms_annotation=["2:PCC", "2:UNB2_POL_QSFP_N23_IOUT_R"], datatype=numpy.double, dims=(N_unb,)) - UNB2_POL_QSFP_N23_TEMP_R = attribute_wrapper(comms_annotation=["2:PCC", "2:UNB2_POL_QSFP_N23_TEMP_R"], datatype=numpy.double, dims=(N_unb,)) - UNB2_POL_SWITCH_1V2_VOUT_R = attribute_wrapper(comms_annotation=["2:PCC", "2:UNB2_POL_SWITCH_1V2_VOUT_R"], datatype=numpy.double, dims=(N_unb,)) - UNB2_POL_SWITCH_1V2_IOUT_R = attribute_wrapper(comms_annotation=["2:PCC", "2:UNB2_POL_SWITCH_1V2_IOUT_R"], datatype=numpy.double, dims=(N_unb,)) - UNB2_POL_SWITCH_1V2_TEMP_R = attribute_wrapper(comms_annotation=["2:PCC", "2:UNB2_POL_SWITCH_1V2_TEMP_R"], datatype=numpy.double, dims=(N_unb,)) - UNB2_POL_SWITCH_PHY_VOUT_R = attribute_wrapper(comms_annotation=["2:PCC", "2:UNB2_POL_SWITCH_PHY_VOUT_R"], datatype=numpy.double, dims=(N_unb,)) - UNB2_POL_SWITCH_PHY_IOUT_R = attribute_wrapper(comms_annotation=["2:PCC", "2:UNB2_POL_SWITCH_PHY_IOUT_R"], datatype=numpy.double, dims=(N_unb,)) - UNB2_POL_SWITCH_PHY_TEMP_R = attribute_wrapper(comms_annotation=["2:PCC", "2:UNB2_POL_SWITCH_PHY_TEMP_R"], datatype=numpy.double, dims=(N_unb,)) - UNB2_POL_CLOCK_VOUT_R = attribute_wrapper(comms_annotation=["2:PCC", "2:UNB2_POL_CLOCK_VOUT_R"], datatype=numpy.double, dims=(N_unb,)) - UNB2_POL_CLOCK_IOUT_R = attribute_wrapper(comms_annotation=["2:PCC", "2:UNB2_POL_CLOCK_IOUT_R"], datatype=numpy.double, dims=(N_unb,)) - UNB2_POL_CLOCK_TEMP_R = attribute_wrapper(comms_annotation=["2:PCC", "2:UNB2_POL_CLOCK_TEMP_R"], datatype=numpy.double, dims=(N_unb,)) - - ### Local MP per FPGA - UNB2_FPGA_DDR4_SLOT_TEMP_R = attribute_wrapper(comms_annotation=["2:PCC", "2:UNB2_FPGA_DDR4_SLOT_TEMP_R"], datatype=numpy.double, dims=((N_fpga * N_ddr), N_unb)) - #UNB2_FPGA_DDR4_SLOT_PART_NUMBER_R = attribute_wrapper(comms_annotation=["2:PCC", "2:UNB2_FPGA_DDR4_SLOT_PART_NUMBER_R"], datatype=numpy.str, dims=(N_fpga * N_ddr), N_unb)) - #UNB2_FPGA_QSFP_CAGE_TEMP_R = attribute_wrapper(comms_annotation=["2:PCC", "2:UNB2_FPGA_QSFP_CAGE_0_TEMP_R"], datatype=numpy.double, dims=(N_fpga, N_unb)) - #UNB2_FPGA_QSFP_CAGE_1_TEMP_R = attribute_wrapper(comms_annotation=["2:PCC", "2:UNB2_FPGA_QSFP_CAGE_1_TEMP_R"], datatype=numpy.double, dims=(N_fpga, N_unb)) - #UNB2_FPGA_QSFP_CAGE_2_TEMP_R = attribute_wrapper(comms_annotation=["2:PCC", "2:UNB2_FPGA_QSFP_CAGE_2_TEMP_R"], datatype=numpy.double, dims=(N_fpga, N_unb)) - #UNB2_FPGA_QSFP_CAGE_3_TEMP_R = attribute_wrapper(comms_annotation=["2:PCC", "2:UNB2_FPGA_QSFP_CAGE_3_TEMP_R"], datatype=numpy.double, dims=(N_fpga, N_unb)) - #UNB2_FPGA_QSFP_CAGE_4_TEMP_R = attribute_wrapper(comms_annotation=["2:PCC", "2:UNB2_FPGA_QSFP_CAGE_4_TEMP_R"], datatype=numpy.double, dims=(N_fpga, N_unb)) - #UNB2_FPGA_QSFP_CAGE_5_TEMP_R = attribute_wrapper(comms_annotation=["2:PCC", "2:UNB2_FPGA_QSFP_CAGE_5_TEMP_R"], datatype=numpy.double, dims=(N_fpga, N_unb)) - #UNB2_FPGA_QSFP_CAGE_LOS_R = attribute_wrapper(comms_annotation=["2:PCC", "2:UNB2_FPGA_QSFP_CAGE_0_LOS_R"], datatype=numpy.uint8, dims=(N_fpga, N_unb)) - #UNB2_FPGA_QSFP_CAGE_1_LOS_R = attribute_wrapper(comms_annotation=["2:PCC", "2:UNB2_FPGA_QSFP_CAGE_1_LOS_R"], datatype=numpy.uint8, dims=(N_fpga, N_unb)) - #UNB2_FPGA_QSFP_CAGE_2_LOS_R = attribute_wrapper(comms_annotation=["2:PCC", "2:UNB2_FPGA_QSFP_CAGE_2_LOS_R"], datatype=numpy.uint8, dims=(N_fpga, N_unb)) - #UNB2_FPGA_QSFP_CAGE_3_LOS_R = attribute_wrapper(comms_annotation=["2:PCC", "2:UNB2_FPGA_QSFP_CAGE_3_LOS_R"], datatype=numpy.uint8, dims=(N_fpga, N_unb)) - #UNB2_FPGA_QSFP_CAGE_4_LOS_R = attribute_wrapper(comms_annotation=["2:PCC", "2:UNB2_FPGA_QSFP_CAGE_4_LOS_R"], datatype=numpy.uint8, dims=(N_fpga, N_unb)) - #UNB2_FPGA_QSFP_CAGE_5_LOS_R = attribute_wrapper(comms_annotation=["2:PCC", "2:UNB2_FPGA_QSFP_CAGE_5_LOS_R"], datatype=numpy.uint8, dims=(N_fpga, N_unb)) - #UNB2_FPGA_POL_CORE_VOUT_R = attribute_wrapper(comms_annotation=["2:PCC", "2:UNB2_POL_FPGA_CORE_VOUT_R"], datatype=numpy.double, dims=(N_fpga, N_unb)) - UNB2_FPGA_POL_CORE_IOUT_R = attribute_wrapper(comms_annotation=["2:PCC", "2:UNB2_FPGA_POL_CORE_IOUT_R"], datatype=numpy.double, dims=(N_fpga, N_unb)) - UNB2_FPGA_POL_CORE_TEMP_R = attribute_wrapper(comms_annotation=["2:PCC", "2:UNB2_FPGA_POL_CORE_TEMP_R"], datatype=numpy.double, dims=(N_fpga, N_unb)) - UNB2_FPGA_POL_ERAM_VOUT_R = attribute_wrapper(comms_annotation=["2:PCC", "2:UNB2_FPGA_POL_ERAM_VOUT_R"], datatype=numpy.double, dims=(N_fpga, N_unb)) - UNB2_FPGA_POL_ERAM_IOUT_R = attribute_wrapper(comms_annotation=["2:PCC", "2:UNB2_FPGA_POL_ERAM_IOUT_R"], datatype=numpy.double, dims=(N_fpga, N_unb)) - UNB2_FPGA_POL_ERAM_TEMP_R = attribute_wrapper(comms_annotation=["2:PCC", "2:UNB2_FPGA_POL_ERAM_TEMP_R"], datatype=numpy.double, dims=(N_fpga, N_unb)) - UNB2_FPGA_POL_RXGXB_VOUT_R = attribute_wrapper(comms_annotation=["2:PCC", "2:UNB2_FPGA_POL_RXGXB_VOUT_R"], datatype=numpy.double, dims=(N_fpga, N_unb)) - UNB2_FPGA_POL_RXGXB_IOUT_R = attribute_wrapper(comms_annotation=["2:PCC", "2:UNB2_FPGA_POL_RXGXB_IOUT_R"], datatype=numpy.double, dims=(N_fpga, N_unb)) - UNB2_FPGA_POL_RXGXB_TEMP_R = attribute_wrapper(comms_annotation=["2:PCC", "2:UNB2_FPGA_POL_RXGXB_TEMP_R"], datatype=numpy.double, dims=(N_fpga, N_unb)) - UNB2_FPGA_POL_TXGXB_VOUT_R = attribute_wrapper(comms_annotation=["2:PCC", "2:UNB2_FPGA_POL_TXGXB_VOUT_R"], datatype=numpy.double, dims=(N_fpga, N_unb)) - UNB2_FPGA_POL_TXGXB_IOUT_R = attribute_wrapper(comms_annotation=["2:PCC", "2:UNB2_FPGA_POL_TXGXB_IOUT_R"], datatype=numpy.double, dims=(N_fpga, N_unb)) - #UNB2_FPGA_POL_TXGXB_TEMP_R = attribute_wrapper(comms_annotation=["2:PCC", "2:UNB2_POL_FPGA_TXGXB_TEMP_R"], datatype=numpy.double, dims=(N_fpga, N_unb)) - UNB2_FPGA_POL_HGXB_VOUT_R = attribute_wrapper(comms_annotation=["2:PCC", "2:UNB2_FPGA_POL_HGXB_VOUT_R"], datatype=numpy.double, dims=(N_fpga, N_unb)) - UNB2_FPGA_POL_HGXB_IOUT_R = attribute_wrapper(comms_annotation=["2:PCC", "2:UNB2_FPGA_POL_HGXB_IOUT_R"], datatype=numpy.double, dims=(N_fpga, N_unb)) - UNB2_FPGA_POL_HGXB_TEMP_R = attribute_wrapper(comms_annotation=["2:PCC", "2:UNB2_FPGA_POL_HGXB_TEMP_R"], datatype=numpy.double, dims=(N_fpga, N_unb)) - UNB2_FPGA_POL_PGM_VOUT_R = attribute_wrapper(comms_annotation=["2:PCC", "2:UNB2_FPGA_POL_PGM_VOUT_R"], datatype=numpy.double, dims=(N_fpga, N_unb)) - UNB2_FPGA_POL_PGM_IOUT_R = attribute_wrapper(comms_annotation=["2:PCC", "2:UNB2_FPGA_POL_PGM_IOUT_R"], datatype=numpy.double, dims=(N_fpga, N_unb)) - UNB2_FPGA_POL_PGM_TEMP_R = attribute_wrapper(comms_annotation=["2:PCC", "2:UNB2_FPGA_POL_PGM_TEMP_R"], datatype=numpy.double, dims=(N_fpga, N_unb)) - - - ##UNB2_I2C_bus_QSFP_STATUS_R = attribute_wrapper(comms_annotation=["2:PCC", "2:UNB2_I2C_bus_QSFP_STATUS_R"], datatype=numpy.int64, dims=((N_unb * N_fpga), N_qsfp)) - ##UNB2_I2C_bus_DDR4_STATUS_R = attribute_wrapper(comms_annotation=["2:PCC", "2:UNB2_I2C_bus_DDR4_STATUS_R"], datatype=numpy.int64, dims=(N_ddr, N_fpga)) - ##UNB2_I2C_bus_FPGA_PS_STATUS_R = attribute_wrapper(comms_annotation=["2:PCC", "2:UNB2_I2C_bus_FPGA_PS_STATUS_R"], datatype=numpy.int64, dims=(N_unb * N_fpga,)) - ##UNB2_I2C_bus_PS_STATUS_R = attribute_wrapper(comms_annotation=["2:PCC", "2:UNB2_I2C_bus_PS_STATUS_R"], datatype=numpy.double, dims=(N_unb,)) - ##UNB2_translator_busy_R = attribute_wrapper(comms_annotation=["2:PCC", "2:UNB2_translator_busy_R"], datatype=numpy.bool_) - ##UNB2_monitor_rate_RW = attribute_wrapper(comms_annotation=["2:PCC", "2:UNB2_monitor_rate_RW"], datatype=numpy.double, dims=(N_unb,), access=AttrWriteType.READ_WRITE) - - # QualifiedName(2: UNB2_on) - # QualifiedName(2: UNB2_off) + UNB2_mask_RW_default = device_property( + dtype='DevVarBooleanArray', + mandatory=False, + default_value=[True] * 2 + ) + + first_default_settings = [ + # set the masks first, as those filter any subsequent settings + 'UNB2_mask_RW' + ] + + UNB2TR_I2C_bus_DDR4_error_R = attribute_wrapper(comms_annotation=["UNB2TR_I2C_bus_DDR4_error_R"],datatype=numpy.int64 , dims=(4,2)) + UNB2TR_I2C_bus_error_R = attribute_wrapper(comms_annotation=["UNB2TR_I2C_bus_error_R" ],datatype=numpy.int64 , dims=(2,)) + UNB2TR_I2C_bus_FPGA_PS_error_R = attribute_wrapper(comms_annotation=["UNB2TR_I2C_bus_FPGA_PS_error_R"],datatype=numpy.int64 , dims=(4,2)) + UNB2TR_I2C_bus_PS_error_R = attribute_wrapper(comms_annotation=["UNB2TR_I2C_bus_PS_error_R" ],datatype=numpy.int64 , dims=(2,)) + UNB2TR_I2C_bus_QSFP_error_R = attribute_wrapper(comms_annotation=["UNB2TR_I2C_bus_QSFP_error_R"],datatype=numpy.int64 , dims=(24,2)) + UNB2TR_monitor_rate_RW = attribute_wrapper(comms_annotation=["UNB2TR_monitor_rate_RW" ],datatype=numpy.int64 , access=AttrWriteType.READ_WRITE) + UNB2TR_translator_busy_R = attribute_wrapper(comms_annotation=["UNB2TR_translator_busy_R" ],datatype=numpy.bool_ ) + UNB2_DC_DC_48V_12V_IOUT_R = attribute_wrapper(comms_annotation=["UNB2_DC_DC_48V_12V_IOUT_R" ],datatype=numpy.float64, dims=(2,)) + UNB2_DC_DC_48V_12V_TEMP_R = attribute_wrapper(comms_annotation=["UNB2_DC_DC_48V_12V_TEMP_R" ],datatype=numpy.float64, dims=(2,)) + UNB2_DC_DC_48V_12V_VIN_R = attribute_wrapper(comms_annotation=["UNB2_DC_DC_48V_12V_VIN_R" ],datatype=numpy.float64, dims=(2,)) + UNB2_DC_DC_48V_12V_VOUT_R = attribute_wrapper(comms_annotation=["UNB2_DC_DC_48V_12V_VOUT_R" ],datatype=numpy.float64, dims=(2,)) + UNB2_FPGA_DDR4_SLOT_TEMP_R = attribute_wrapper(comms_annotation=["UNB2_FPGA_DDR4_SLOT_TEMP_R"],datatype=numpy.float64, dims=(8,2)) + UNB2_FPGA_POL_CORE_IOUT_R = attribute_wrapper(comms_annotation=["UNB2_FPGA_POL_CORE_IOUT_R" ],datatype=numpy.float64, dims=(4,2)) + UNB2_FPGA_POL_CORE_TEMP_R = attribute_wrapper(comms_annotation=["UNB2_FPGA_POL_CORE_TEMP_R" ],datatype=numpy.float64, dims=(4,2)) + UNB2_FPGA_POL_CORE_VOUT_R = attribute_wrapper(comms_annotation=["UNB2_FPGA_POL_CORE_VOUT_R" ],datatype=numpy.float64, dims=(4,2)) + UNB2_FPGA_POL_ERAM_IOUT_R = attribute_wrapper(comms_annotation=["UNB2_FPGA_POL_ERAM_IOUT_R" ],datatype=numpy.float64, dims=(4,2)) + UNB2_FPGA_POL_ERAM_TEMP_R = attribute_wrapper(comms_annotation=["UNB2_FPGA_POL_ERAM_TEMP_R" ],datatype=numpy.float64, dims=(4,2)) + UNB2_FPGA_POL_ERAM_VOUT_R = attribute_wrapper(comms_annotation=["UNB2_FPGA_POL_ERAM_VOUT_R" ],datatype=numpy.float64, dims=(4,2)) + UNB2_FPGA_POL_HGXB_IOUT_R = attribute_wrapper(comms_annotation=["UNB2_FPGA_POL_HGXB_IOUT_R" ],datatype=numpy.float64, dims=(4,2)) + UNB2_FPGA_POL_HGXB_TEMP_R = attribute_wrapper(comms_annotation=["UNB2_FPGA_POL_HGXB_TEMP_R" ],datatype=numpy.float64, dims=(4,2)) + UNB2_FPGA_POL_HGXB_VOUT_R = attribute_wrapper(comms_annotation=["UNB2_FPGA_POL_HGXB_VOUT_R" ],datatype=numpy.float64, dims=(4,2)) + UNB2_FPGA_POL_PGM_IOUT_R = attribute_wrapper(comms_annotation=["UNB2_FPGA_POL_PGM_IOUT_R" ],datatype=numpy.float64, dims=(4,2)) + UNB2_FPGA_POL_PGM_TEMP_R = attribute_wrapper(comms_annotation=["UNB2_FPGA_POL_PGM_TEMP_R" ],datatype=numpy.float64, dims=(4,2)) + UNB2_FPGA_POL_PGM_VOUT_R = attribute_wrapper(comms_annotation=["UNB2_FPGA_POL_PGM_VOUT_R" ],datatype=numpy.float64, dims=(4,2)) + UNB2_FPGA_POL_RXGXB_IOUT_R = attribute_wrapper(comms_annotation=["UNB2_FPGA_POL_RXGXB_IOUT_R"],datatype=numpy.float64, dims=(4,2)) + UNB2_FPGA_POL_RXGXB_TEMP_R = attribute_wrapper(comms_annotation=["UNB2_FPGA_POL_RXGXB_TEMP_R"],datatype=numpy.float64, dims=(4,2)) + UNB2_FPGA_POL_RXGXB_VOUT_R = attribute_wrapper(comms_annotation=["UNB2_FPGA_POL_RXGXB_VOUT_R"],datatype=numpy.float64, dims=(4,2)) + UNB2_FPGA_POL_TXGXB_IOUT_R = attribute_wrapper(comms_annotation=["UNB2_FPGA_POL_TXGXB_IOUT_R"],datatype=numpy.float64, dims=(4,2)) + UNB2_FPGA_POL_TXGXB_TEMP_R = attribute_wrapper(comms_annotation=["UNB2_FPGA_POL_TXGXB_TEMP_R"],datatype=numpy.float64, dims=(4,2)) + UNB2_FPGA_POL_TXGXB_VOUT_R = attribute_wrapper(comms_annotation=["UNB2_FPGA_POL_TXGXB_VOUT_R"],datatype=numpy.float64, dims=(4,2)) + UNB2_FPGA_QSFP_CAGE_LOS_R = attribute_wrapper(comms_annotation=["UNB2_FPGA_QSFP_CAGE_LOS_R" ],datatype=numpy.int64 , dims=(24,2)) + UNB2_FPGA_QSFP_CAGE_TEMP_R = attribute_wrapper(comms_annotation=["UNB2_FPGA_QSFP_CAGE_TEMP_R"],datatype=numpy.float64, dims=(24,2)) + UNB2_Front_Panel_LED_colour_R = attribute_wrapper(comms_annotation=["UNB2_Front_Panel_LED_colour_R"],datatype=numpy.int64 , dims=(2,)) + UNB2_Front_Panel_LED_colour_RW = attribute_wrapper(comms_annotation=["UNB2_Front_Panel_LED_colour_RW"],datatype=numpy.int64 , dims=(2,), access=AttrWriteType.READ_WRITE) + UNB2_mask_RW = attribute_wrapper(comms_annotation=["UNB2_mask_RW" ],datatype=numpy.bool_ , dims=(2,), access=AttrWriteType.READ_WRITE) + UNB2_PCB_ID_R = attribute_wrapper(comms_annotation=["UNB2_PCB_ID_R" ],datatype=numpy.int64 , dims=(2,)) + UNB2_PCB_number_R = attribute_wrapper(comms_annotation=["UNB2_PCB_number_R" ],datatype=numpy.str , dims=(2,)) + UNB2_PCB_version_R = attribute_wrapper(comms_annotation=["UNB2_PCB_version_R" ],datatype=numpy.str , dims=(2,)) + UNB2_POL_CLOCK_IOUT_R = attribute_wrapper(comms_annotation=["UNB2_POL_CLOCK_IOUT_R" ],datatype=numpy.float64, dims=(2,)) + UNB2_POL_CLOCK_TEMP_R = attribute_wrapper(comms_annotation=["UNB2_POL_CLOCK_TEMP_R" ],datatype=numpy.float64, dims=(2,)) + UNB2_POL_CLOCK_VOUT_R = attribute_wrapper(comms_annotation=["UNB2_POL_CLOCK_VOUT_R" ],datatype=numpy.float64, dims=(2,)) + UNB2_POL_QSFP_N01_IOUT_R = attribute_wrapper(comms_annotation=["UNB2_POL_QSFP_N01_IOUT_R" ],datatype=numpy.float64, dims=(2,)) + UNB2_POL_QSFP_N01_TEMP_R = attribute_wrapper(comms_annotation=["UNB2_POL_QSFP_N01_TEMP_R" ],datatype=numpy.float64, dims=(2,)) + UNB2_POL_QSFP_N01_VOUT_R = attribute_wrapper(comms_annotation=["UNB2_POL_QSFP_N01_VOUT_R" ],datatype=numpy.float64, dims=(2,)) + UNB2_POL_QSFP_N23_IOUT_R = attribute_wrapper(comms_annotation=["UNB2_POL_QSFP_N23_IOUT_R" ],datatype=numpy.float64, dims=(2,)) + UNB2_POL_QSFP_N23_TEMP_R = attribute_wrapper(comms_annotation=["UNB2_POL_QSFP_N23_TEMP_R" ],datatype=numpy.float64, dims=(2,)) + UNB2_POL_QSFP_N23_VOUT_R = attribute_wrapper(comms_annotation=["UNB2_POL_QSFP_N23_VOUT_R" ],datatype=numpy.float64, dims=(2,)) + UNB2_POL_SWITCH_1V2_IOUT_R = attribute_wrapper(comms_annotation=["UNB2_POL_SWITCH_1V2_IOUT_R"],datatype=numpy.float64, dims=(2,)) + UNB2_POL_SWITCH_1V2_TEMP_R = attribute_wrapper(comms_annotation=["UNB2_POL_SWITCH_1V2_TEMP_R"],datatype=numpy.float64, dims=(2,)) + UNB2_POL_SWITCH_1V2_VOUT_R = attribute_wrapper(comms_annotation=["UNB2_POL_SWITCH_1V2_VOUT_R"],datatype=numpy.float64, dims=(2,)) + UNB2_POL_SWITCH_PHY_IOUT_R = attribute_wrapper(comms_annotation=["UNB2_POL_SWITCH_PHY_IOUT_R"],datatype=numpy.float64, dims=(2,)) + UNB2_POL_SWITCH_PHY_TEMP_R = attribute_wrapper(comms_annotation=["UNB2_POL_SWITCH_PHY_TEMP_R"],datatype=numpy.float64, dims=(2,)) + UNB2_POL_SWITCH_PHY_VOUT_R = attribute_wrapper(comms_annotation=["UNB2_POL_SWITCH_PHY_VOUT_R"],datatype=numpy.float64, dims=(2,)) + UNB2_PWR_on_R = attribute_wrapper(comms_annotation=["UNB2_PWR_on_R" ],datatype=numpy.bool_ , dims=(2,)) # -------- # overloaded functions diff --git a/tangostationcontrol/tangostationcontrol/integration_test/client/test_unb2_sim.py b/tangostationcontrol/tangostationcontrol/integration_test/client/test_unb2_sim.py index 5d2e1016e4edfc1f7869b20dafbb5d0a01a46bf2..261441901c589a26256b586dc571f7b063c08408 100644 --- a/tangostationcontrol/tangostationcontrol/integration_test/client/test_unb2_sim.py +++ b/tangostationcontrol/tangostationcontrol/integration_test/client/test_unb2_sim.py @@ -20,7 +20,7 @@ class TestUNB2Sim(base.IntegrationAsyncTestCase): async def test_opcua_connection(self): """Check if we can connect to unb2-sim""" - client = Client("opc.tcp://unb2-sim:4844") + client = Client("opc.tcp://unb2-sim:4841") root_node = None await client.connect() diff --git a/tangostationcontrol/tangostationcontrol/integration_test/devices/test_device_recv.py b/tangostationcontrol/tangostationcontrol/integration_test/devices/test_device_recv.py index 285f02244d490f97d36be678c5628447e64d96c4..68ac9bce1e4fa1e925af1f4738dd3b958d01cda3 100644 --- a/tangostationcontrol/tangostationcontrol/integration_test/devices/test_device_recv.py +++ b/tangostationcontrol/tangostationcontrol/integration_test/devices/test_device_recv.py @@ -40,7 +40,7 @@ class TestDeviceRECV(base.IntegrationTestCase): d = DeviceProxy("LTS/RECV/1") - d.initialise() + d.Initialise() self.assertEqual(DevState.STANDBY, d.state()) @@ -49,7 +49,7 @@ class TestDeviceRECV(base.IntegrationTestCase): d = DeviceProxy("LTS/RECV/1") - d.initialise() + d.Initialise() d.on() diff --git a/tangostationcontrol/tangostationcontrol/integration_test/devices/test_device_sdp.py b/tangostationcontrol/tangostationcontrol/integration_test/devices/test_device_sdp.py index b4dbb02c0f6d25f4f37cddf687f2b6da47a3738c..333f4a830349cded5967c8440c76de091b75211a 100644 --- a/tangostationcontrol/tangostationcontrol/integration_test/devices/test_device_sdp.py +++ b/tangostationcontrol/tangostationcontrol/integration_test/devices/test_device_sdp.py @@ -36,12 +36,19 @@ class TestDeviceSDP(base.IntegrationTestCase): self.assertEqual(DevState.OFF, d.state()) + def test_device_sdp_ping(self): + """Test if we can successfully ping the device server""" + + d = DeviceProxy("LTS/SDP/1") + + self.assertGreater(d.ping(), 0) + def test_device_sdp_initialize(self): """Test if we can transition to standby""" d = DeviceProxy("LTS/SDP/1") - d.initialise() + d.Initialise() self.assertEqual(DevState.STANDBY, d.state()) @@ -50,7 +57,7 @@ class TestDeviceSDP(base.IntegrationTestCase): d = DeviceProxy("LTS/SDP/1") - d.initialise() + d.Initialise() d.on() diff --git a/tangostationcontrol/tangostationcontrol/integration_test/devices/test_device_unb2.py b/tangostationcontrol/tangostationcontrol/integration_test/devices/test_device_unb2.py index e0196230b38782ba5003dd0ff46d1fd51ede531b..a262aab7daa17a74253de7c8fb82d668496ded69 100644 --- a/tangostationcontrol/tangostationcontrol/integration_test/devices/test_device_unb2.py +++ b/tangostationcontrol/tangostationcontrol/integration_test/devices/test_device_unb2.py @@ -1,57 +1,57 @@ -# -*- coding: utf-8 -*- -# -# This file is part of the LOFAR 2.0 Station Software -# -# -# -# Distributed under the terms of the APACHE license. -# See LICENSE.txt for more info. - -from tango import DeviceProxy -from tango._tango import DevState - -from tangostationcontrol.integration_test import base - - -class TestDeviceUNB2(base.IntegrationTestCase): - - def setUp(self): - """Intentionally recreate the device object in each test""" - super(TestDeviceUNB2, self).setUp() - - def tearDown(self): - """Turn device Off in teardown to prevent blocking tests""" - d = DeviceProxy("LTS/UNB2/1") - - try: - d.Off() - except Exception as e: - """Failing to turn Off devices should not raise errors here""" - print(f"Failed to turn device off in teardown {e}") - - def test_device_proxy_unb2(self): - """Test if we can successfully create a DeviceProxy and fetch state""" - - d = DeviceProxy("LTS/UNB2/1") - - self.assertEqual(DevState.OFF, d.state()) - - def test_device_unb2_initialize(self): - """Test if we can transition to standby""" - - d = DeviceProxy("LTS/UNB2/1") - - d.initialise() - - self.assertEqual(DevState.STANDBY, d.state()) - - def test_device_unb2_on(self): - """Test if we can transition to on""" - - d = DeviceProxy("LTS/UNB2/1") - - d.initialise() - - d.on() - - self.assertEqual(DevState.ON, d.state()) +# -*- coding: utf-8 -*- +# +# This file is part of the LOFAR 2.0 Station Software +# +# +# +# Distributed under the terms of the APACHE license. +# See LICENSE.txt for more info. + +from tango import DeviceProxy +from tango._tango import DevState + +from tangostationcontrol.integration_test import base + + +class TestDeviceUNB2(base.IntegrationTestCase): + + def setUp(self): + """Intentionally recreate the device object in each test""" + super(TestDeviceUNB2, self).setUp() + + def tearDown(self): + """Turn device Off in teardown to prevent blocking tests""" + d = DeviceProxy("LTS/UNB2/1") + + try: + d.Off() + except Exception as e: + """Failing to turn Off devices should not raise errors here""" + print(f"Failed to turn device off in teardown {e}") + + def test_device_proxy_unb2(self): + """Test if we can successfully create a DeviceProxy and fetch state""" + + d = DeviceProxy("LTS/UNB2/1") + + self.assertEqual(DevState.OFF, d.state()) + + def test_device_unb2_initialize(self): + """Test if we can transition to standby""" + + d = DeviceProxy("LTS/UNB2/1") + + d.initialise() + + self.assertEqual(DevState.STANDBY, d.state()) + + def test_device_unb2_on(self): + """Test if we can transition to on""" + + d = DeviceProxy("LTS/UNB2/1") + + d.initialise() + + d.on() + + self.assertEqual(DevState.ON, d.state()) diff --git a/tangostationcontrol/tangostationcontrol/integration_test/devices/test_tango_database.py b/tangostationcontrol/tangostationcontrol/integration_test/devices/test_tango_database.py new file mode 100644 index 0000000000000000000000000000000000000000..0ae65d5c51a98898e4016bbb231baa18b025dba9 --- /dev/null +++ b/tangostationcontrol/tangostationcontrol/integration_test/devices/test_tango_database.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- +# +# This file is part of the LOFAR 2.0 Station Software +# +# +# +# Distributed under the terms of the APACHE license. +# See LICENSE.txt for more info. + +import time + +from tango import Database +from tango._tango import DevState + +from integration_test import base + + +class TestTangoDatabase(base.IntegrationTestCase): + + def setUp(self): + """Intentionally recreate the device object in each test""" + super(TestTangoDatabase, self).setUp() + + def test_database_servers(self): + """Connect to the database and find at least 3 servers + + One for SDP, RECV and the databaseds itself. + """ + + d = Database() + + # Ensure this value is close to actual amount of servers defined by + # integration_ConfigDb.json + self.assertGreater(len(d.get_server_list()), 16, msg=f"Servers: {d.get_server_list()}") diff --git a/tangostationcontrol/tangostationcontrol/statistics_writer/receiver.py b/tangostationcontrol/tangostationcontrol/statistics_writer/receiver.py index e719eef9ae4ec888a99a7a1dc5b831e5dba74915..cd6c0af4cd5d4a1f8cdc3c2e37d86f6bd655db53 100644 --- a/tangostationcontrol/tangostationcontrol/statistics_writer/receiver.py +++ b/tangostationcontrol/tangostationcontrol/statistics_writer/receiver.py @@ -54,6 +54,15 @@ class tcp_receiver(receiver): super().__init__(fd=self.sock.fileno()) + def reconnect(self): + self.fd = None + self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + self.sock.connect((self.host, self.port)) + self.fd = self.sock.fileno() + return True + + + class file_receiver(receiver): def __init__(self, filename): self.filename = filename diff --git a/tangostationcontrol/tangostationcontrol/statistics_writer/statistics_writer.py b/tangostationcontrol/tangostationcontrol/statistics_writer/statistics_writer.py index 2bc45604d07f7367d1f53312133b250f490634a5..1a1ecb671159e1b3ca143ecbf860000d6cdbe0c5 100644 --- a/tangostationcontrol/tangostationcontrol/statistics_writer/statistics_writer.py +++ b/tangostationcontrol/tangostationcontrol/statistics_writer/statistics_writer.py @@ -1,14 +1,14 @@ import argparse +import time import sys from tangostationcontrol.statistics_writer.receiver import tcp_receiver, file_receiver from tangostationcontrol.statistics_writer.hdf5_writer import hdf5_writer import logging -logging.basicConfig(level=logging.INFO) +logging.basicConfig(level=logging.INFO, format = '%(asctime)s:%(levelname)s: %(message)s') logger = logging.getLogger("statistics_writer") - def main(): parser = argparse.ArgumentParser( description='Converts a stream of statistics packets into HDF5 files.') @@ -39,6 +39,10 @@ def main(): '-d', '--decimation', type=int, default=1, help='Configure the writer to only store one every n samples. Saves ' 'storage space') + parser.add_argument( + '-r', '--reconnect', dest='reconnect', action='store_true', default=False, + help='Set the writer to keep trying to reconnect whenever connection ' + 'is lost. (default: %(default)s)') args = parser.parse_args() @@ -49,8 +53,9 @@ def main(): output_dir = args.output_dir interval = args.interval mode = args.mode - debug = args.debug decimation = args.decimation + debug = args.debug + reconnect = args.reconnect if decimation < 1: raise ValueError("Please use an integer --Decimation value 1 or higher to only store one every n statistics' ") @@ -78,13 +83,27 @@ def main(): # start looping try: while True: - packet = receiver.get_packet() - writer.next_packet(packet) + try: + packet = receiver.get_packet() + writer.next_packet(packet) + except EOFError: + if reconnect and not filename: + logger.warning("Connection lost, attempting to reconnect") + while True: + try: + receiver.reconnect() + except Exception as e: + logger.warning(f"Could not reconnect: {e.__class__.__name__}: {e}") + time.sleep(10) + else: + break + logger.warning("Reconnected! Resuming operations") + else: + logger.info("End of input.") + raise SystemExit + except KeyboardInterrupt: # user abort, don't complain logger.warning("Received keyboard interrupt. Stopping.") - except EOFError: - # done processing all input, don't complain - logger.info("End of input.") finally: writer.close_writer() diff --git a/tangostationcontrol/tangostationcontrol/statistics_writer/test/test_server.py b/tangostationcontrol/tangostationcontrol/statistics_writer/test/test_server.py index eec9ec3eed992b03ee809ca37de012bad43bd213..74101b93de2e83824c70e4630e8560ae24b28fa8 100644 --- a/tangostationcontrol/tangostationcontrol/statistics_writer/test/test_server.py +++ b/tangostationcontrol/tangostationcontrol/statistics_writer/test/test_server.py @@ -45,6 +45,9 @@ while True: time.sleep(INTERVAL) conn.sendall(data) + except KeyboardInterrupt: + logger.info("Received keyboard interrupt. Stopping.") + exit() except Exception as e: logger.warning(f"Exception occurred: {e}") diff --git a/tangostationcontrol/tangostationcontrol/test/base.py b/tangostationcontrol/tangostationcontrol/test/base.py index 174a478c725bda18d549e95247459411dd6b89c5..7cf3af7f8becb1f92cde139290394ea540f5d8d6 100644 --- a/tangostationcontrol/tangostationcontrol/test/base.py +++ b/tangostationcontrol/tangostationcontrol/test/base.py @@ -31,7 +31,7 @@ class TestCase(BaseTestCase): super().setUp() -class AsyncTestCase(BaseTestCase): +class AsyncTestCase(testscenarios.WithScenarios, asynctest.TestCase): """Test case base class for all asyncio unit tests.""" def setUp(self): diff --git a/tangostationcontrol/tangostationcontrol/test/clients/test_client.py b/tangostationcontrol/tangostationcontrol/test/clients/test_client.py index a17561d77b7c6d05a06683a8b7a1cf023a289dcf..ee3e0faf62b780dfb83a252dcf99897690090a35 100644 --- a/tangostationcontrol/tangostationcontrol/test/clients/test_client.py +++ b/tangostationcontrol/tangostationcontrol/test/clients/test_client.py @@ -22,10 +22,7 @@ class test_client(CommClient): super().__init__(fault_func, streams, try_interval) # Explicitly connect - if not self.connect(): - # hardware or infra is down -- needs fixing first - fault_func() - return + self.connect() def connect(self): """ @@ -34,7 +31,6 @@ class test_client(CommClient): self.streams.debug_stream("the example client doesn't actually connect to anything silly") self.connected = True # set connected to true - return True # if succesfull, return true. otherwise return false def disconnect(self): self.connected = False # always force a reconnect, regardless of a successful disconnect diff --git a/tangostationcontrol/tangostationcontrol/test/clients/test_opcua_client.py b/tangostationcontrol/tangostationcontrol/test/clients/test_opcua_client.py index 52398dca633d9a96dfb7962bf68d4fc970d8eec9..c1c29ee04279bab3c943ccc35d4e3a5071345607 100644 --- a/tangostationcontrol/tangostationcontrol/test/clients/test_opcua_client.py +++ b/tangostationcontrol/tangostationcontrol/test/clients/test_opcua_client.py @@ -69,7 +69,7 @@ class TestOPCua(base.AsyncTestCase): @asynctest.patch.object(OPCUAConnection, "ping") @asynctest.patch.object(opcua_client, "Client") - @mock.patch.object(opcua_client, 'ProtocolAttribute') + @asynctest.patch.object(opcua_client, 'ProtocolAttribute') async def test_opcua_attr_setup(self, m_protocol_attr, m_opc_client, m_ping): """ This tests covers the correct creation of read/write functions. @@ -237,9 +237,9 @@ class TestOPCua(base.AsyncTestCase): # create the protocolattribute if len(j) == 1: - test = opcua_client.ProtocolAttribute(m_node, j[0], 0, opcua_client.numpy_to_OPCua_dict[i.numpy_type], self.loop) + test = opcua_client.ProtocolAttribute(m_node, j[0], 0, opcua_client.numpy_to_OPCua_dict[i.numpy_type]) else: - test = opcua_client.ProtocolAttribute(m_node, j[1], j[0], opcua_client.numpy_to_OPCua_dict[i.numpy_type], self.loop) + test = opcua_client.ProtocolAttribute(m_node, j[1], j[0], opcua_client.numpy_to_OPCua_dict[i.numpy_type]) # comparison function that replaces `set_data_value` inside the attributes write function async def compare_values(val): diff --git a/tangostationcontrol/tangostationcontrol/test/common/test_lofar_logging.py b/tangostationcontrol/tangostationcontrol/test/common/test_lofar_logging.py index 30a4faa603b4e2550c8c26a13958119a225de8c3..5140d05e58ca370509a080211ca96f2df21fe399 100644 --- a/tangostationcontrol/tangostationcontrol/test/common/test_lofar_logging.py +++ b/tangostationcontrol/tangostationcontrol/test/common/test_lofar_logging.py @@ -12,6 +12,7 @@ import logging from tango.server import Device from tango import device_server +from tango.test_context import DeviceTestContext from tangostationcontrol.common import lofar_logging @@ -75,18 +76,22 @@ class TestLofarLogging(base.TestCase): # create a Tango Device that logs something class MyDevice(Device): - def __init__(self): + def init_device(self): self.log_deeper_in_stack() def log_deeper_in_stack(self): logger.info("test") with mock.patch.object(device_server.DeviceImpl, '__info_stream') as m_info_stream: - # logs in the constructor already - mydevice = MyDevice() + with DeviceTestContext(MyDevice) as mydevice: + self.assertEqual(1, m_info_stream.call_count, msg="configure_logger did not send logs to active Tango device") + + # Lookup our "test" logline among f.e. the debug messages output by Tango + test_record = [record for record in self.memory_handler.records if record.msg == "test"] - self.assertEqual(mydevice, self.memory_handler.records[0].tango_device, msg="configure_logging did not detect active Tango device") - self.assertEqual(1, m_info_stream.call_count, msg="configure_logger did not send logs to active Tango device") + # Tango uses slightly different class representations of MyDevice, so + # we can't compare them direclty. Just verify we're talking about the same thing. + self.assertEqual(str(mydevice), str(test_record[0].tango_device), msg="configure_logging did not detect active Tango device") def test_log_exceptions(self): diff --git a/tangostationcontrol/tangostationcontrol/toolkit/archiver.py b/tangostationcontrol/tangostationcontrol/toolkit/archiver.py index a21c48268eac7d76ea772c579b2c87697f5b7995..f4a0974f82a18b213746264be133911893ab54ee 100644 --- a/tangostationcontrol/tangostationcontrol/toolkit/archiver.py +++ b/tangostationcontrol/tangostationcontrol/toolkit/archiver.py @@ -18,6 +18,29 @@ from .archiver_base import * logger = logging.getLogger() +def parse_attribute_name(attribute_name:str): + """ + Parse the attribute names since most of the archiving operations require only + Tango full-qualified names. + """ + chunk_num = len(attribute_name.split('/')) + if (chunk_num!=4): + raise AttributeFormatException + +def reduce_attribute_name(attribute_name:str): + """ + For some operations Tango attribute must be transformed from the form 'tango://db:port/domain/family/name/attribute' + to canonical 'domain/family/name/attribute' + """ + chunk_num = len(attribute_name.split('/')) + if (chunk_num==7 and attribute_name.split('/')[0]=='tango:'): + return '/'.join(attribute_name.split('/')[3:]) + else: + if (chunk_num!=4): + raise AttributeFormatException + else: + return attribute_name + class Archiver(): """ The Archiver class implements the basic operations to perform attributes archiving @@ -52,8 +75,8 @@ class Archiver(): config_dict = self.selector.get_dict() # Set global development env variables var_dict = config_dict.get('global_variables') - self.dev_polling_time = int(var_dict.get('development_polling_time')) or 10000 - self.dev_archive_time = int(var_dict.get('development_archive_time')) or 60000 + self.dev_polling_time = int(var_dict.get('development_polling_time')) + self.dev_archive_time = int(var_dict.get('development_archive_time')) # Set devices archiving env_dict = config_dict.get('devices') for device in env_dict: @@ -93,8 +116,7 @@ class Archiver(): The ConfigurationManager and EventSubscriber devices must be already up and running. The archiving-DBMS must be already properly configured. """ - if (len(attribute_name.split('/'))!=4): - raise AttributeFormatException + parse_attribute_name(attribute_name) try: self.cm.write_attribute('SetAttributeName', attribute_name) self.cm.write_attribute('SetArchiver', self.es_name) @@ -139,8 +161,7 @@ class Archiver(): """ Stops the data archiving of the attribute passed as input, and remove it from the subscriber's list. """ - if (len(attribute_name.split('/'))!=4): - raise AttributeFormatException + parse_attribute_name(attribute_name) try: self.cm.AttributeStop(attribute_name) self.cm.AttributeRemove(attribute_name) @@ -166,14 +187,28 @@ class Archiver(): self.remove_attribute_from_archiver(attr_fullname) except Exception as e: raise Exception from e + + def remove_attributes_in_error(self,exclude:list=[],es_name:str=None): + """ + Remove from the subscriber's list all the attributes currently in error (not being archived) + """ + if es_name is not None: + es = DeviceProxy(es_name) + else: + es = self.es + attributes_nok = es.AttributeNokList or [] + exclude_list = [a.lower() for a in exclude] + attrs_list = [a.lower() for a in list(attributes_nok) if a.lower() not in exclude_list] + for a in attrs_list: + attr_fullname = reduce_attribute_name(a) + self.remove_attribute_from_archiver(attr_fullname) def start_archiving_attribute(self, attribute_name:str): """ Starts the archiving of the attribute passed as input. The attribute must be already present in the subscriber's list """ - if (len(attribute_name.split('/'))!=4): - raise AttributeFormatException + parse_attribute_name(attribute_name) try: self.cm.AttributeStart(attribute_name) except Exception as e: @@ -187,8 +222,7 @@ class Archiver(): Stops the archiving of the attribute passed as input. The attribute must be already present in the subscriber's list """ - if (len(attribute_name.split('/'))!=4): - raise AttributeFormatException + parse_attribute_name(attribute_name) try: self.cm.AttributeStop(attribute_name) except Exception as e: @@ -201,29 +235,29 @@ class Archiver(): """ Check if an attribute is in the archiving list """ - if (len(attribute_name.split('/'))!=4): - raise AttributeFormatException - try: - attributes = self.cm.AttributeSearch(attribute_name) - a = [a for a in attributes if a.lower().endswith(attribute_name.lower())] # handle cases differences - if len(attributes)>1: - raise Exception("MultipleAttributesMatched!") - if len(attributes)==1: + parse_attribute_name(attribute_name) + attributes = self.cm.AttributeSearch(attribute_name.lower()) + if len(attributes)>1: + # Handle case same attribute_name r/rw + if len(attributes)==2 and (attributes[0].endswith(attributes[1]+'w') or attributes[1].endswith(attributes[0]+'w')): return True else: - return False - except Exception as e: - raise Exception from e + raise Exception(f"Multiple Attributes Matched! {attributes}") + elif len(attributes)==1: + return True + else: + return False def update_archiving_attribute(self, attribute_name: str, polling_period: int, event_period: int, strategy: str = 'RUN'): """ Update the archiving properties of an attribute already in a subscriber list """ self.remove_attribute_from_archiver(attribute_name) - time.sleep(1) + time.sleep(3.) self.add_attribute_to_archiver(attribute_name,polling_period,event_period,strategy) - time.sleep(1) + time.sleep(3.) self.start_archiving_attribute(attribute_name) + logger.info(f"Attribute {attribute_name} successfully updated!") def get_subscriber_attributes(self,es_name:str = None): """ @@ -244,20 +278,15 @@ class Archiver(): es = DeviceProxy(es_name) else: es = self.es - try: - attrs = es.AttributeList or [] - errs = es.AttributeErrorList or [] - return dict((a,e) for a,e in zip(attrs,errs) if e) - except: - print('No attribute errors in the subscriber') - return {} + attrs = es.AttributeList or [] + errs = es.AttributeErrorList or [] + return dict((a,e) for a,e in zip(attrs,errs) if e) or {} def get_attribute_errors(self,attribute_name:str): """ Return the error related to the attribute """ - if (len(attribute_name.split('/'))!=4): - raise AttributeFormatException + parse_attribute_name(attribute_name) errs_dict = self.get_subscriber_errors() for e in errs_dict: if attribute_name in e: @@ -278,6 +307,32 @@ class Archiver(): else: return len(es.AttributeList or []) + def get_attribute_freq(self,attribute_name:str): + """ + Return the attribute archiving frequency in events/minute + """ + parse_attribute_name(attribute_name) + if self.is_attribute_archived(attribute_name): + freq_dict = dict((a,r) for a,r in zip(self.es.AttributeList,self.es.AttributeRecordFreqList)) + for f in freq_dict: + if attribute_name.lower() in f: + return freq_dict.get(f,0.) + else: + logger.warning(f"Attribute {attribute_name} not found!") + + def get_attribute_failures(self,attribute_name:str): + """ + Return the attribute failure archiving frequency in events/minute + """ + parse_attribute_name(attribute_name) + if self.is_attribute_archived(attribute_name): + fail_dict = dict((a,r) for a,r in zip(self.es.AttributeList,self.es.AttributeFailureFreqList)) + for f in fail_dict: + if attribute_name.lower() in f: + return fail_dict.get(f,0.) + else: + logger.warning(f"Attribute {attribute_name} not found!") + class AttributeFormatException(Exception): """ Exception that handles wrong attribute naming