Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tango
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira issues
Open Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LOFAR2.0
tango
Commits
949d8962
Commit
949d8962
authored
2 years ago
by
Stefano Di Frischia
Browse files
Options
Downloads
Patches
Plain Diff
L2SS-1030
: create skeleton for configuration device
parent
9bda21ff
No related branches found
No related tags found
1 merge request
!468
Resolve L2SS-1030 "Create configuration device"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tangostationcontrol/tangostationcontrol/devices/configuration_device.py
+52
-0
52 additions, 0 deletions
...ntrol/tangostationcontrol/devices/configuration_device.py
with
52 additions
and
0 deletions
tangostationcontrol/tangostationcontrol/devices/configuration_device.py
0 → 100644
+
52
−
0
View file @
949d8962
# -*- 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
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment