Skip to content
Snippets Groups Projects
Commit 7109f83d authored by Jan David Mol's avatar Jan David Mol
Browse files

L2SS-176: Add version monitoring point to our devices

parent 1a556d96
No related branches found
No related tags found
1 merge request!35Resolve L2SS-176 "Expose git version"
......@@ -13,7 +13,7 @@
# PyTango imports
from tango.server import run
from tango.server import device_property
from tango.server import device_property, attribute
from tango import AttrWriteType
# Additional import
......@@ -22,6 +22,7 @@ from util.attribute_wrapper import attribute_wrapper
from util.hardware_device import hardware_device
from util.lofar_logging import device_logging_to_python, log_exceptions
from util.lofar_git import get_version
import numpy
......@@ -64,6 +65,9 @@ class APSCTL(hardware_device):
# ----------
# Attributes
# ----------
version = attribute(dtype=str, access=AttrWriteType.READ, fget=lambda self: get_version())
N_unb = 2
N_fpga = 4
N_ddr = 2
......
......@@ -14,7 +14,7 @@
# PyTango imports
from tango import DebugIt
from tango.server import run, command
from tango.server import device_property
from tango.server import device_property, attribute
from tango import AttrWriteType
import numpy
# Additional import
......@@ -25,6 +25,7 @@ from clients.opcua_connection import OPCUAConnection
from util.attribute_wrapper import attribute_wrapper
from util.hardware_device import hardware_device
from util.lofar_logging import device_logging_to_python, log_exceptions
from util.lofar_git import get_version
__all__ = ["PCC", "main"]
......@@ -69,6 +70,9 @@ class PCC(hardware_device):
# ----------
# Attributes
# ----------
version = attribute(dtype=str, access=AttrWriteType.READ, fget=lambda self: get_version())
RCU_mask_RW = attribute_wrapper(comms_annotation=["2:PCC", "2:RCU_mask_RW"], datatype=numpy.bool_, dims=(32,), access=AttrWriteType.READ_WRITE)
Ant_mask_RW = attribute_wrapper(comms_annotation=["2:PCC", "2:Ant_mask_RW"], datatype=numpy.bool_, dims=(3, 32), access=AttrWriteType.READ_WRITE)
RCU_attenuator_R = attribute_wrapper(comms_annotation=["2:PCC", "2:RCU_attenuator_R"], datatype=numpy.int64, dims=(3, 32))
......
......@@ -13,7 +13,7 @@
# PyTango imports
from tango.server import run
from tango.server import device_property
from tango.server import device_property, attribute
from tango import AttrWriteType
# Additional import
......@@ -22,6 +22,7 @@ from util.attribute_wrapper import attribute_wrapper
from util.hardware_device import hardware_device
from util.lofar_logging import device_logging_to_python, log_exceptions
from util.lofar_git import get_version
import numpy
......@@ -64,6 +65,9 @@ class SDP(hardware_device):
# ----------
# Attributes
# ----------
version = attribute(dtype=str, access=AttrWriteType.READ, fget=lambda self: get_version())
# SDP will switch from fpga_mask_RW to tr_fpga_mask_RW, offer both for now as its a critical flag
tr_fpga_mask_RW = attribute_wrapper(comms_annotation=["2:tr_fpga_mask_RW"], datatype=numpy.bool_, dims=(16,), access=AttrWriteType.READ_WRITE)
fpga_mask_RW = attribute_wrapper(comms_annotation=["2:fpga_mask_RW"], datatype=numpy.bool_, dims=(16,), access=AttrWriteType.READ_WRITE)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment