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

L2SS-1030: create skeleton for configuration device

parent 9bda21ff
No related branches found
No related tags found
1 merge request!468Resolve L2SS-1030 "Create configuration device"
# -*- 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.
""" Configuration Device Server for LOFAR2.0
Handles and exposes the station configuration
"""
# PyTango imports
from tango import AttrWriteType
from tango.server import attribute
# Additional import
from tangostationcontrol.common.entrypoint import entry
from tangostationcontrol.devices.lofar_device import lofar_device
from tangostationcontrol.common.lofar_logging import device_logging_to_python
import logging
logger = logging.getLogger()
__all__ = ["Configuration", "main"]
@device_logging_to_python()
class Configuration(lofar_device):
# -----------------
# Device Properties
# -----------------
# ----------
# Attributes
# ----------
tangodb_properties_RW = attribute(dtype=str, access=AttrWriteType.READ_WRITE, doc='The whole station configuration, as a JSON string.')
def read_tangodb_properties_RW(self):
return self._dump_configdb()
def _dump_configdb(self):
""" Returns the TangoDB station configuration as a JSON string """
return 'Configuration'
# ----------
# Run server
# ----------
def main(**kwargs):
"""Main function of the Boot module."""
return entry(Configuration, **kwargs)
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