diff --git a/devices/toolkit/archiver.py b/devices/toolkit/archiver.py index e11578dc68d8829cc1e261cd884392cba7f6be88..9eb33ed3b22ed7f5056e2fa8c4570b7ece99fb29 100644 --- a/devices/toolkit/archiver.py +++ b/devices/toolkit/archiver.py @@ -287,6 +287,20 @@ class Archiver(): 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 + """ + if (len(attribute_name.split('/'))!=4): + raise AttributeFormatException + 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 diff --git a/jupyter-notebooks/Archiving_load_test.ipynb b/jupyter-notebooks/Archiving_load_test.ipynb new file mode 100644 index 0000000000000000000000000000000000000000..691ceb70049f6edf6e9e11d5b39271092d846219 --- /dev/null +++ b/jupyter-notebooks/Archiving_load_test.ipynb @@ -0,0 +1,574 @@ +{ + "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 will not be archived because polling is set to FALSE!\n", + "Attribute lts/recv/1/clk_enable_pwr_r not found in archiving list!\n", + "Attribute lts/recv/1/clk_i2c_status_r not found in archiving list!\n", + "Attribute lts/recv/1/clk_pll_error_r not found in archiving list!\n", + "Attribute lts/recv/1/clk_pll_locked_r not found in archiving list!\n", + "Attribute lts/recv/1/clk_translator_busy_r not found in archiving list!\n", + "Device LTS/SDP/1 offline\n", + "Device LTS/SST/1 offline\n", + "Device LTS/XST/1 not defined in TangoDB\n", + "Attribute lts/unb2/1/version_r not found in archiving list!\n", + "Attribute lts/unb2/1/unb2_power_on_off_rw not found in archiving list!\n", + "Attribute lts/unb2/1/unb2_front_panel_led_rw not found in archiving list!\n", + "Attribute lts/unb2/1/unb2_front_panel_led_r not found in archiving list!\n", + "Attribute lts/unb2/1/unb2_mask_rw not found in archiving list!\n", + "Attribute lts/unb2/1/unb2_i2c_bus_status_r not found in archiving list!\n", + "Attribute lts/unb2/1/unb2_eeprom_unique_id_r not found in archiving list!\n", + "Attribute lts/unb2/1/unb2_dc_dc_48v_12v_vin_r not found in archiving list!\n", + "Attribute lts/unb2/1/unb2_dc_dc_48v_12v_vout_r not found in archiving list!\n", + "Attribute lts/unb2/1/unb2_dc_dc_48v_12v_iout_r not found in archiving list!\n", + "Attribute lts/unb2/1/unb2_dc_dc_48v_12v_temp_r not found in archiving list!\n", + "Attribute lts/unb2/1/unb2_pol_qsfp_n01_vout_r not found in archiving list!\n", + "Attribute lts/unb2/1/unb2_pol_qsfp_n01_iout_r not found in archiving list!\n", + "Attribute lts/unb2/1/unb2_pol_qsfp_n01_temp_r not found in archiving list!\n", + "Attribute lts/unb2/1/unb2_pol_qsfp_n23_vout_r not found in archiving list!\n", + "Attribute lts/unb2/1/unb2_pol_qsfp_n23_iout_r not found in archiving list!\n", + "Attribute lts/unb2/1/unb2_pol_qsfp_n23_temp_r not found in archiving list!\n", + "Attribute lts/unb2/1/unb2_pol_switch_1v2_vout_r not found in archiving list!\n", + "Attribute lts/unb2/1/unb2_pol_switch_1v2_iout_r not found in archiving list!\n", + "Attribute lts/unb2/1/unb2_pol_switch_1v2_temp_r not found in archiving list!\n", + "Attribute lts/unb2/1/unb2_pol_switch_phy_vout_r not found in archiving list!\n", + "Attribute lts/unb2/1/unb2_pol_switch_phy_iout_r not found in archiving list!\n", + "Attribute lts/unb2/1/unb2_pol_switch_phy_temp_r not found in archiving list!\n", + "Attribute lts/unb2/1/unb2_pol_clock_vout_r not found in archiving list!\n", + "Attribute lts/unb2/1/unb2_pol_clock_iout_r not found in archiving list!\n", + "Attribute lts/unb2/1/unb2_pol_clock_temp_r not found in archiving list!\n", + "Attribute lts/unb2/1/unb2_fpga_ddr4_slot_temp_r not found in archiving list!\n", + "Attribute lts/unb2/1/unb2_fpga_pol_core_iout_r not found in archiving list!\n", + "Attribute lts/unb2/1/unb2_fpga_pol_core_temp_r not found in archiving list!\n", + "Attribute lts/unb2/1/unb2_fpga_pol_eram_vout_r not found in archiving list!\n", + "Attribute lts/unb2/1/unb2_fpga_pol_eram_iout_r not found in archiving list!\n", + "Attribute lts/unb2/1/unb2_fpga_pol_eram_temp_r not found in archiving list!\n", + "Attribute lts/unb2/1/unb2_fpga_pol_rxgxb_vout_r not found in archiving list!\n", + "Attribute lts/unb2/1/unb2_fpga_pol_rxgxb_iout_r not found in archiving list!\n", + "Attribute lts/unb2/1/unb2_fpga_pol_rxgxb_temp_r not found in archiving list!\n", + "Attribute lts/unb2/1/unb2_fpga_pol_txgxb_vout_r not found in archiving list!\n", + "Attribute lts/unb2/1/unb2_fpga_pol_txgxb_iout_r not found in archiving list!\n", + "Attribute lts/unb2/1/unb2_fpga_pol_hgxb_vout_r not found in archiving list!\n", + "Attribute lts/unb2/1/unb2_fpga_pol_hgxb_iout_r not found in archiving list!\n", + "Attribute lts/unb2/1/unb2_fpga_pol_hgxb_temp_r not found in archiving list!\n", + "Attribute lts/unb2/1/unb2_fpga_pol_pgm_vout_r not found in archiving list!\n", + "Attribute lts/unb2/1/unb2_fpga_pol_pgm_iout_r not found in archiving list!\n", + "Attribute lts/unb2/1/unb2_fpga_pol_pgm_temp_r not found in archiving list!\n", + "Attribute lts/unb2/1/state not found in archiving list!\n", + "Attribute lts/unb2/1/status not found in archiving list!\n" + ] + } + ], + "source": [ + "# Apply the chosen JSON configuration file in directory toolkit/archiver_config/\n", + "# For this test -> RECV is set on PRODUCTION mode\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': 'production',\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": [ + "ON\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": "ba3a25ac", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'tango://databaseds:10000/lts/recv/1/rcu_version_r': 'Storing Error: mysql_stmt_bind_param() failed, err=Buffer type is not supported'}" + ] + }, + "execution_count": 5, + "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": 6, + "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", + " print(\"Device is now in ON state\")" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "id": "5d40b87c", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "('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/state',\n", + " 'tango://databaseds:10000/lts/recv/1/rcu_version_r',\n", + " 'tango://databaseds:10000/lts/recv/1/ant_mask_rw',\n", + " 'tango://databaseds:10000/lts/recv/1/clk_monitor_rate_rw',\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_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_temperature_r',\n", + " 'tango://databaseds:10000/lts/sdp/1/fpga_scrap_r',\n", + " 'tango://databaseds:10000/lts/sdp/1/fpga_scrap_rw',\n", + " 'tango://databaseds:10000/lts/sdp/1/fpga_temp_r',\n", + " 'tango://databaseds:10000/lts/sdp/1/fpga_weights_r',\n", + " 'tango://databaseds:10000/lts/sdp/1/fpga_weights_rw',\n", + " 'tango://databaseds:10000/lts/sdp/1/tr_tod_r')" + ] + }, + "execution_count": 23, + "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": 24, + "id": "678879e3", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'tango://databaseds:10000/lts/recv/1/rcu_version_r': 'Storing Error: mysql_stmt_bind_param() failed, err=Buffer type is not supported',\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": 24, + "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": 25, + "id": "d3904658", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Attribute Poll Period Archive Period \n", + "----------\n", + "LTS/RECV/1/rcu_attenuator_rw 1000 10000 \n", + "LTS/RECV/1/rcu_band_r 1000 10000 \n", + "LTS/RECV/1/rcu_band_rw 1000 10000 \n", + "LTS/RECV/1/rcu_i2c_status_r 1000 10000 \n", + "LTS/RECV/1/rcu_id_r 1000 10000 \n", + "LTS/RECV/1/rcu_led0_r 1000 10000 \n", + "LTS/RECV/1/rcu_led0_rw 1000 10000 \n", + "LTS/RECV/1/rcu_led1_r 1000 10000 \n", + "LTS/RECV/1/rcu_led1_rw 1000 10000 \n", + "LTS/RECV/1/rcu_mask_rw 1000 10000 \n", + "LTS/RECV/1/rcu_monitor_rate_rw 1000 10000 \n", + "LTS/RECV/1/rcu_pwr_dig_r 1000 10000 \n", + "LTS/RECV/1/rcu_translator_busy_r 1000 10000 \n", + "LTS/RECV/1/state 1000 10000 \n", + "LTS/RECV/1/rcu_version_r 1000 10000 \n", + "LTS/RECV/1/ant_mask_rw 1000 3000 \n", + "LTS/RECV/1/clk_monitor_rate_rw 1000 3000 \n", + "LTS/RECV/1/hba_element_beamformer_delays_r 1000 3000 \n", + "LTS/RECV/1/hba_element_beamformer_delays_rw 1000 3000 \n", + "LTS/RECV/1/hba_element_led_r 1000 3000 \n", + "LTS/RECV/1/hba_element_led_rw 1000 3000 \n", + "LTS/RECV/1/hba_element_lna_pwr_rw 1000 3000 \n", + "LTS/RECV/1/hba_element_pwr_r 1000 3000 \n", + "LTS/RECV/1/hba_element_pwr_rw 1000 3000 \n", + "LTS/RECV/1/rcu_adc_lock_r 1000 3000 \n", + "LTS/RECV/1/rcu_attenuator_r 1000 3000 \n", + "LTS/RECV/1/rcu_temperature_r 1000 1000 \n", + "LTS/SDP/1/fpga_scrap_r 1000 600000 \n", + "LTS/SDP/1/fpga_scrap_rw 1000 600000 \n", + "LTS/SDP/1/fpga_temp_r 1000 600000 \n", + "LTS/SDP/1/fpga_weights_r 1000 600000 \n", + "LTS/SDP/1/fpga_weights_rw 1000 600000 \n", + "LTS/SDP/1/tr_tod_r 1000 600000 \n" + ] + } + ], + "source": [ + "# Print the attribute periods\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'))" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "id": "b20aabd2", + "metadata": {}, + "outputs": [], + "source": [ + "#archiver.remove_attribute_from_archiver('lts/recv/1/status')\n", + "#archiver.remove_attribute_from_archiver('lts/recv/1/rcu_version_r')" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "id": "27ef5564", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "'311.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 since the device initialization to be reliable\n", + "archiver.get_subscriber_load()" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "id": "241b5282", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Attribute Record Freq Failure Freq \n", + "----------\n", + "LTS/RECV/1/rcu_attenuator_rw 6.0 0.0 \n", + "LTS/RECV/1/rcu_band_r 6.0 0.0 \n", + "LTS/RECV/1/rcu_band_rw 6.0 0.0 \n", + "LTS/RECV/1/rcu_i2c_status_r 6.0 0.0 \n", + "LTS/RECV/1/rcu_id_r 6.0 0.0 \n", + "LTS/RECV/1/rcu_led0_r 6.0 0.0 \n", + "LTS/RECV/1/rcu_led0_rw 6.0 0.0 \n", + "LTS/RECV/1/rcu_led1_r 6.0 0.0 \n", + "LTS/RECV/1/rcu_led1_rw 6.0 0.0 \n", + "LTS/RECV/1/rcu_mask_rw 6.0 0.0 \n", + "LTS/RECV/1/rcu_monitor_rate_rw 6.0 0.0 \n", + "LTS/RECV/1/rcu_pwr_dig_r 6.0 0.0 \n", + "LTS/RECV/1/rcu_translator_busy_r 6.0 0.0 \n", + "LTS/RECV/1/state 6.0 0.0 \n", + "LTS/RECV/1/rcu_version_r 0.0 6.0 \n", + "LTS/RECV/1/ant_mask_rw 20.0 0.0 \n", + "LTS/RECV/1/clk_monitor_rate_rw 20.0 0.0 \n", + "LTS/RECV/1/hba_element_beamformer_delays_r 20.0 0.0 \n", + "LTS/RECV/1/hba_element_beamformer_delays_rw 20.0 0.0 \n", + "LTS/RECV/1/hba_element_led_r 20.0 0.0 \n", + "LTS/RECV/1/hba_element_led_rw 20.0 0.0 \n", + "LTS/RECV/1/hba_element_lna_pwr_rw 20.0 0.0 \n", + "LTS/RECV/1/hba_element_pwr_r 20.0 0.0 \n", + "LTS/RECV/1/hba_element_pwr_rw 20.0 0.0 \n", + "LTS/RECV/1/rcu_adc_lock_r 20.0 0.0 \n", + "LTS/RECV/1/rcu_attenuator_r 6.0 0.0 \n", + "LTS/RECV/1/rcu_temperature_r 59.0 4.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", + "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)))" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "id": "25446390", + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Attribute LTS/RECV/1/rcu_temperature_r not found in archiving list!\n", + "Attribute LTS/RECV/1/rcu_temperature_r not found!\n", + "Attribute LTS/RECV/1/rcu_temperature_r successfully updated!\n" + ] + } + ], + "source": [ + "# Update the archive time of an attribute\n", + "archiver.update_archiving_attribute('LTS/RECV/1/rcu_temperature_r',polling_period=1000,event_period=1000)" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "id": "c3415c09", + "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/clk_enable_pwr_r not found in archiving list!\n", + "Attribute lts/recv/1/clk_i2c_status_r not found in archiving list!\n", + "Attribute lts/recv/1/clk_pll_error_r not found in archiving list!\n", + "Attribute lts/recv/1/clk_pll_locked_r not found in archiving list!\n", + "Attribute lts/recv/1/clk_translator_busy_r not found in archiving list!\n", + "Attribute lts/sdp/1/version_r 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", + "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_amplitude_rw 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_frequency_rw 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/fpga_wg_phase_rw 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", + "Device LTS/SST/1 offline\n", + "Device LTS/XST/1 not defined in TangoDB\n", + "Device LTS/UNB2/1 offline\n" + ] + }, + { + "data": { + "text/plain": [ + "{'LTS/RECV/1': {'environment': 'production',\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': 'production', '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": 21, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# Set the SDP environment as PRODUCTION in config file and apply the update\n", + "# Reload the previous cells to check new load values\n", + "archiver.apply_selector()" + ] + } + ], + "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 +}