Skip to content
GitLab
Explore
Sign in
Register
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
0893a6f7
Commit
0893a6f7
authored
3 years ago
by
Thomas Juerges
Browse files
Options
Downloads
Patches
Plain Diff
Re-add missing attributes that the xlator still exposes
parent
5779e4a1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
PCC/PCC/PCC.py
+33
-0
33 additions, 0 deletions
PCC/PCC/PCC.py
with
33 additions
and
0 deletions
PCC/PCC/PCC.py
+
33
−
0
View file @
0893a6f7
...
...
@@ -87,6 +87,10 @@ class PCC(Device):
# Attributes
# ----------
RCU_state_R
=
attribute
(
dtype
=
(
numpy
.
str
),
)
RCU_mask_RW
=
attribute
(
dtype
=
(
numpy
.
bool_
,),
max_dim_x
=
32
,
...
...
@@ -204,6 +208,11 @@ class PCC(Device):
access
=
AttrWriteType
.
READ_WRITE
,
)
uC_ID_R
=
attribute
(
dtype
=
(
numpy
.
int64
,),
max_dim_x
=
32
,
)
RCU_monitor_rate_RW
=
attribute
(
dtype
=
numpy
.
float_
,
access
=
AttrWriteType
.
READ_WRITE
,
...
...
@@ -233,6 +242,8 @@ class PCC(Device):
self
.
debug_stream
(
"
Mapping OPC-UA MP/CP to attributes...
"
)
self
.
attribute_mapping
[
"
RCU_state_R
"
]
=
self
.
get_pcc_node
(
"
RCU_state_R
"
)
self
.
attribute_mapping
[
"
RCU_mask_RW
"
]
=
self
.
get_pcc_node
(
"
RCU_mask_RW
"
)
self
.
attribute_mapping
[
"
Ant_mask_RW
"
]
=
self
.
get_pcc_node
(
"
Ant_mask_RW
"
)
...
...
@@ -277,6 +288,8 @@ class PCC(Device):
self
.
attribute_mapping
[
"
HBA_element_pwr_RW
"
]
=
self
.
get_pcc_node
(
"
HBA_element_pwr_RW
"
)
self
.
attribute_mapping
[
"
uC_ID_R
"
]
=
self
.
get_pcc_node
(
"
uC_ID _R
"
)
self
.
attribute_mapping
[
"
RCU_monitor_rate_RW
"
]
=
self
.
get_pcc_node
(
"
RCU_monitor_rate_RW
"
)
self
.
function_mapping
[
"
RCU_off
"
]
=
self
.
get_pcc_node
(
"
RCU_off
"
)
...
...
@@ -314,6 +327,9 @@ class PCC(Device):
# Set default values in the RW/R attributes and add them to
# the mapping.
self
.
_RCU_state_R
=
""
self
.
attribute_mapping
[
"
RCU_state_R
"
]
=
{}
self
.
_RCU_mask_RW
=
numpy
.
full
(
32
,
False
)
self
.
attribute_mapping
[
"
RCU_mask_RW
"
]
=
{}
...
...
@@ -380,6 +396,9 @@ class PCC(Device):
self
.
_HBA_element_pwr_RW
=
numpy
.
full
((
96
,
32
),
0
)
self
.
attribute_mapping
[
"
HBA_element_pwr_RW
"
]
=
{}
self
.
_uC_ID_R
=
numpy
.
full
(
32
,
0
)
self
.
attribute_mapping
[
"
uC_ID_R
"
]
=
{}
self
.
_RCU_monitor_rate_RW
=
30.0
self
.
attribute_mapping
[
"
RCU_monitor_rate_RW
"
]
=
{}
...
...
@@ -450,6 +469,13 @@ class PCC(Device):
# ------------------
# Attributes methods
# ------------------
@only_when_on
@fault_on_error
def
read_RCU_state_R
(
self
):
"""
Return the RCU_state_R attribute.
"""
self
.
_RCU_state_R
=
self
.
attribute_mapping
[
"
RCU_state_R
"
].
get_value
()
return
self
.
_RCU_state_R
@only_when_on
@fault_on_error
def
read_RCU_mask_R
(
self
):
...
...
@@ -675,6 +701,13 @@ class PCC(Device):
self
.
attribute_mapping
[
"
HBA_element_pwr_RW
"
].
set_value
(
value
.
flatten
().
tolist
())
self
.
_HBA_element_pwr_RW
=
value
@only_when_on
@fault_on_error
def
read_uC_ID_R
(
self
):
"""
Return the uC_ID_R attribute.
"""
self
.
_uC_ID_R
=
numpy
.
array
(
self
.
attribute_mapping
[
"
uC_ID_R
"
].
get_value
())
return
self
.
_uC_ID_R
@only_when_on
@fault_on_error
def
read_RCU_monitor_rate_RW
(
self
):
...
...
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