Skip to content
Snippets Groups Projects
Commit 3e16ce72 authored by Stefano Di Frischia's avatar Stefano Di Frischia
Browse files

L2SS-235: remove archiving code from device

parent bc9ebec7
No related branches found
No related tags found
1 merge request!108Resolve L2SS-235 "Archive pcc attribute"
...@@ -32,8 +32,6 @@ from clients.attribute_wrapper import attribute_wrapper ...@@ -32,8 +32,6 @@ from clients.attribute_wrapper import attribute_wrapper
from devices.hardware_device import hardware_device from devices.hardware_device import hardware_device
from common.lofar_logging import device_logging_to_python, log_exceptions from common.lofar_logging import device_logging_to_python, log_exceptions
from common.lofar_git import get_version from common.lofar_git import get_version
from common.lofar_environment import isProduction
from toolkit.archiver import Archiver
__all__ = ["PCC", "main"] __all__ = ["PCC", "main"]
...@@ -112,8 +110,6 @@ class PCC(hardware_device): ...@@ -112,8 +110,6 @@ class PCC(hardware_device):
RCU_translator_busy_R = attribute_wrapper(comms_annotation=["2:PCC", "2:RCU_translator_busy_R"], datatype=numpy.bool_) 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,)) RCU_version_R = attribute_wrapper(comms_annotation=["2:PCC", "2:RCU_version_R"], datatype=numpy.str_, dims=(32,))
test_att = RCU_temperature_R
@log_exceptions() @log_exceptions()
def delete_device(self): def delete_device(self):
"""Hook to delete resources allocated in init_device. """Hook to delete resources allocated in init_device.
...@@ -164,21 +160,6 @@ class PCC(hardware_device): ...@@ -164,21 +160,6 @@ class PCC(hardware_device):
self.OPCua_client.start() self.OPCua_client.start()
# TODO(Stefano): check if all attributes are ready to be archived
# add an attribute for testing purpose
self.archiver = Archiver() # define a standard archiver
attr_name = str(self.get_name()+'/'+self.test_att.get_name()).lower()
if isProduction():
# Add attribute to subscriber list if not already present
try:
result = self.archiver.check_attribute_in_archiving_list(attr_name)
self.debug_stream("ARCHIVING: %s added to archiving list" % result)
except Exception as e:
self.warn_stream("error while adding attributes to archiving list. {}".format(e))
else:
# Remove attribute from subscriber list to prevent automatic archiving
self.archiver.remove_attribute_from_archiver(attr_name)
# -------- # --------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment