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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LOFAR2.0
tango
Commits
78bc4b7b
Commit
78bc4b7b
authored
4 years ago
by
Thomas Juerges
Browse files
Options
Downloads
Patches
Plain Diff
Add new PCC MPs/CPs
parent
d6199904
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
PCC/PCC/PCC.py
+114
-0
114 additions, 0 deletions
PCC/PCC/PCC.py
with
114 additions
and
0 deletions
PCC/PCC/PCC.py
+
114
−
0
View file @
78bc4b7b
...
@@ -182,6 +182,33 @@ class PCC(Device):
...
@@ -182,6 +182,33 @@ class PCC(Device):
max_dim_x
=
32
,
max_dim_x
=
32
,
)
)
HBA_element_beamformer_delays_R
=
attribute
(
dtype
=
((
numpy
.
int32
,),),
max_dim_x
=
3
,
max_dim_y
=
1024
,
)
HBA_element_beamformer_delays_RW
=
attribute
(
dtype
=
((
numpy
.
int32
,),),
max_dim_x
=
3
,
max_dim_y
=
1024
,
access
=
AttrWriteType
.
READ_WRITE
,
)
HBA_element_led_R
=
attribute
(
dtype
=
((
numpy
.
int32
,),),
max_dim_x
=
3
,
max_dim_y
=
1024
,
)
HBA_element_led_RW
=
attribute
(
dtype
=
((
numpy
.
int32
,),),
max_dim_x
=
3
,
max_dim_y
=
1024
,
access
=
AttrWriteType
.
READ_WRITE
,
)
uC_ID_R
=
attribute
(
dtype
=
(
numpy
.
int64
,),
max_dim_x
=
32
,
)
RCU_monitor_rate_RW
=
attribute
(
RCU_monitor_rate_RW
=
attribute
(
dtype
=
numpy
.
float_
,
dtype
=
numpy
.
float_
,
)
)
...
@@ -247,6 +274,16 @@ class PCC(Device):
...
@@ -247,6 +274,16 @@ class PCC(Device):
self
.
attribute_mapping
[
"
RCU_version_R
"
]
=
self
.
get_pcc_node
(
"
RCU_version_R
"
)
self
.
attribute_mapping
[
"
RCU_version_R
"
]
=
self
.
get_pcc_node
(
"
RCU_version_R
"
)
self
.
attribute_mapping
[
"
HBA_element_beamformer_delays_R
"
]
=
self
.
get_pcc_node
(
"
HBA_element_beamformer_delays_R
"
)
self
.
attribute_mapping
[
"
HBA_element_beamformer_delays_RW
"
]
=
self
.
get_pcc_node
(
"
HBA_element_beamformer_delays_RW
"
)
self
.
attribute_mapping
[
"
HBA_element_led_R
"
]
=
self
.
get_pcc_node
(
"
HBA_element_led_R
"
)
self
.
attribute_mapping
[
"
HBA_element_led_RW
"
]
=
self
.
get_pcc_node
(
"
HBA_element_led_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
.
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
"
)
self
.
function_mapping
[
"
RCU_off
"
]
=
self
.
get_pcc_node
(
"
RCU_off
"
)
...
@@ -332,6 +369,21 @@ class PCC(Device):
...
@@ -332,6 +369,21 @@ class PCC(Device):
self
.
_RCU_version_R
=
numpy
.
full
(
32
,
"
1234567890
"
)
self
.
_RCU_version_R
=
numpy
.
full
(
32
,
"
1234567890
"
)
self
.
attribute_mapping
[
"
RCU_version_R
"
]
=
{}
self
.
attribute_mapping
[
"
RCU_version_R
"
]
=
{}
self
.
_HBA_element_beamformer_delays_R
=
numpy
.
full
((
1024
,
3
),
0
)
self
.
attribute_mapping
[
"
HBA_element_beamformer_delays_R
"
]
=
{}
self
.
_HBA_element_beamformer_delays_RW
=
numpy
.
full
((
1024
,
3
),
0
)
self
.
attribute_mapping
[
"
HBA_element_beamformer_delays_RW
"
]
=
{}
self
.
_HBA_element_led_R
=
numpy
.
full
((
1024
,
3
),
0
)
self
.
attribute_mapping
[
"
HBA_element_led_R
"
]
=
{}
self
.
_HBA_element_led_RW
=
numpy
.
full
((
1024
,
3
),
0
)
self
.
attribute_mapping
[
"
HBA_element_led_RW
"
]
=
{}
self
.
_uC_ID_R
=
numpy
.
full
(
32
,
0
)
self
.
attribute_mapping
[
"
uC_ID_R
"
]
=
{}
self
.
_RCU_monitor_rate_RW
=
60.0
self
.
_RCU_monitor_rate_RW
=
60.0
self
.
attribute_mapping
[
"
RCU_monitor_rate_RW
"
]
=
{}
self
.
attribute_mapping
[
"
RCU_monitor_rate_RW
"
]
=
{}
...
@@ -583,6 +635,68 @@ class PCC(Device):
...
@@ -583,6 +635,68 @@ class PCC(Device):
self
.
_RCU_version_R
=
numpy
.
array
(
value
)
self
.
_RCU_version_R
=
numpy
.
array
(
value
)
return
self
.
_RCU_version_R
return
self
.
_RCU_version_R
@only_when_on
@fault_on_error
def
read_HBA_element_beamformer_delays_R
(
self
):
"""
Return the HBA_element_beamformer_delays_R attribute.
"""
value
=
numpy
.
array
(
self
.
attribute_mapping
[
"
HBA_element_beamformer_delays_R
"
].
get_value
())
self
.
_HBA_element_beamformer_delays_R
=
numpy
.
array
(
numpy
.
split
(
value
,
indices_or_sections
=
32
))
return
self
.
_HBA_element_beamformer_delays_R
@only_when_on
@fault_on_error
def
read_HBA_element_beamformer_delays_RW
(
self
):
"""
Return the HBA_element_beamformer_delays_RW attribute.
"""
return
self
.
_HBA_element_beamformer_delays_RW
@only_when_on
@fault_on_error
def
write_HBA_element_beamformer_delays_RW
(
self
,
value
):
"""
Set the HBA_element_beamformer_delays_RW attribute.
"""
self
.
attribute_mapping
[
"
HBA_element_beamformer_delays_RW
"
].
set_value
(
value
.
flatten
().
tolist
())
self
.
_HBA_element_beamformer_delays_RW
=
value
@only_when_on
@fault_on_error
def
read_HBA_element_led_R
(
self
):
"""
Return the HBA_element_led_R attribute.
"""
value
=
numpy
.
array
(
self
.
attribute_mapping
[
"
HBA_element_led_R
"
].
get_value
())
self
.
_HBA_element_beamformer_delays_R
=
numpy
.
array
(
numpy
.
split
(
value
,
indices_or_sections
=
32
))
return
self
.
_HBA_element_led_R
@only_when_on
@fault_on_error
def
read_HBA_element_led_RW
(
self
):
"""
Return the HBA_element_led_RW attribute.
"""
return
self
.
_HBA_element_led_RW
@only_when_on
@fault_on_error
def
write_HBA_element_led_RW
(
self
,
value
):
"""
Set the HBA_element_led_RW attribute.
"""
self
.
attribute_mapping
[
"
HBA_element_led_RW
"
].
set_value
(
value
.
flatten
().
tolist
())
self
.
_HBA_element_led_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_uC_ID_RW
(
self
):
"""
Return the uC_ID_RW attribute.
"""
return
self
.
_uC_ID_RW
@only_when_on
@fault_on_error
def
write_uC_ID_RW
(
self
,
value
):
"""
Set the uC_ID_RW attribute.
"""
self
.
attribute_mapping
[
"
uC_ID_RW
"
].
set_value
(
value
.
tolist
())
self
.
_uC_ID_RW
=
value
@only_when_on
@only_when_on
@fault_on_error
@fault_on_error
def
read_RCU_monitor_rate_RW
(
self
):
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