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
2801567b
Commit
2801567b
authored
4 years ago
by
Thomas Juerges
Browse files
Options
Downloads
Patches
Plain Diff
Update with new MPs/CPs
- tr_busy_R - tr_reload_RW - tr_tod_R - tr_uptime_R
parent
b264cfa2
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
SDP/SDP/SDP.py
+44
-36
44 additions, 36 deletions
SDP/SDP/SDP.py
with
44 additions
and
36 deletions
SDP/SDP/SDP.py
+
44
−
36
View file @
2801567b
...
@@ -131,20 +131,21 @@ class SDP(Device):
...
@@ -131,20 +131,21 @@ class SDP(Device):
access
=
AttrWriteType
.
READ_WRITE
,
access
=
AttrWriteType
.
READ_WRITE
,
)
)
sdp_info
_R
=
attribute
(
tr_busy
_R
=
attribute
(
dtype
=
(
numpy
.
str
,
),
dtype
=
(
numpy
.
bool_
),
)
)
sdp_tod_R
=
attribute
(
tr_reload_RW
=
attribute
(
dtype
=
(
numpy
.
str
,),
dtype
=
(
numpy
.
bool_
),
access
=
AttrWriteType
.
READ_WRITE
,
)
)
tr
anslator_network
_R
=
attribute
(
tr
_tod
_R
=
attribute
(
dtype
=
(
numpy
.
str
,
),
dtype
=
(
numpy
.
uint64
),
)
)
tr
anslator_timing
_R
=
attribute
(
tr
_uptime
_R
=
attribute
(
dtype
=
(
numpy
.
str
,),
dtype
=
(
numpy
.
uint64
,),
)
)
...
@@ -184,10 +185,10 @@ class SDP(Device):
...
@@ -184,10 +185,10 @@ class SDP(Device):
self
.
attribute_mapping
[
"
fpga_version_R
"
]
=
self
.
get_node
(
"
fpga_version_R
"
)
self
.
attribute_mapping
[
"
fpga_version_R
"
]
=
self
.
get_node
(
"
fpga_version_R
"
)
self
.
attribute_mapping
[
"
fpga_weights_R
"
]
=
self
.
get_node
(
"
fpga_weights_R
"
)
self
.
attribute_mapping
[
"
fpga_weights_R
"
]
=
self
.
get_node
(
"
fpga_weights_R
"
)
self
.
attribute_mapping
[
"
fpga_weights_RW
"
]
=
self
.
get_node
(
"
fpga_weights_RW
"
)
self
.
attribute_mapping
[
"
fpga_weights_RW
"
]
=
self
.
get_node
(
"
fpga_weights_RW
"
)
self
.
attribute_mapping
[
"
sdp_info
_R
"
]
=
self
.
get_node
(
"
sdp_info
"
)
self
.
attribute_mapping
[
"
tr_busy
_R
"
]
=
self
.
get_node
(
"
tr_busy_R
"
)
self
.
attribute_mapping
[
"
sdp_to
d_R
"
]
=
self
.
get_node
(
"
t
od
"
)
self
.
attribute_mapping
[
"
tr_reloa
d_R
W
"
]
=
self
.
get_node
(
"
t
r_reload_W
"
)
self
.
attribute_mapping
[
"
tr
anslator_network
_R
"
]
=
self
.
get_node
(
"
tr
anslator_network
"
)
self
.
attribute_mapping
[
"
tr
_tod
_R
"
]
=
self
.
get_node
(
"
tr
_tod_R
"
)
self
.
attribute_mapping
[
"
tr
anslator_timing
_R
"
]
=
self
.
get_node
(
"
tr
anslator_timing
"
)
self
.
attribute_mapping
[
"
tr
_uptime
_R
"
]
=
self
.
get_node
(
"
tr
_uptime_R
"
)
self
.
info_stream
(
"
Mapping OPC-UA MP/CP to attributes done.
"
)
self
.
info_stream
(
"
Mapping OPC-UA MP/CP to attributes done.
"
)
...
@@ -225,14 +226,14 @@ class SDP(Device):
...
@@ -225,14 +226,14 @@ class SDP(Device):
self
.
attribute_mapping
[
"
fpga_weights_R
"
]
=
{}
self
.
attribute_mapping
[
"
fpga_weights_R
"
]
=
{}
self
.
_fpga_weights_RW
=
numpy
.
full
((
16
,
2
*
488
*
12
),
0
)
self
.
_fpga_weights_RW
=
numpy
.
full
((
16
,
2
*
488
*
12
),
0
)
self
.
attribute_mapping
[
"
fpga_weights_RW
"
]
=
{}
self
.
attribute_mapping
[
"
fpga_weights_RW
"
]
=
{}
self
.
_
sdp_info_R
=
"
NOT_INITIALISED
"
self
.
_
tr_busy_R
=
False
self
.
attribute_mapping
[
"
sdp_info
_R
"
]
=
{}
self
.
attribute_mapping
[
"
tr_busy
_R
"
]
=
{}
self
.
_t
o
d_R
=
"
NOT_INITIALISED
"
self
.
_t
r_reloa
d_R
W
=
False
self
.
attribute_mapping
[
"
sdp_to
d_R
"
]
=
{}
self
.
attribute_mapping
[
"
tr_reloa
d_R
W
"
]
=
{}
self
.
_tr
anslator_network_R
=
"
NOT_INITIALISED
"
self
.
_tr
_tod_R
=
0
self
.
attribute_mapping
[
"
tr
anslator_network
_R
"
]
=
{}
self
.
attribute_mapping
[
"
tr
_tod
_R
"
]
=
{}
self
.
_tr
anslator_timing_R
=
"
NOT_INITIALISED
"
self
.
_tr
_uptime_R
=
0
self
.
attribute_mapping
[
"
tr
anslator_timing
_R
"
]
=
{}
self
.
attribute_mapping
[
"
tr
_uptime
_R
"
]
=
{}
# Init the dict that contains function to OPC-UA function mappings.
# Init the dict that contains function to OPC-UA function mappings.
self
.
function_mapping
=
{}
self
.
function_mapping
=
{}
...
@@ -370,31 +371,38 @@ class SDP(Device):
...
@@ -370,31 +371,38 @@ class SDP(Device):
@only_when_on
@only_when_on
@fault_on_error
@fault_on_error
def
read_sdp_info_R
(
self
):
def
read_tr_busy_R
(
self
):
"""
Return the sdp_info_R attribute.
"""
"""
Return the tr_busy_R attribute.
"""
self
.
_sdp_info_R
=
self
.
attribute_mapping
[
"
sdp_info_R
"
].
get_value
()
self
.
_tr_busy_R
=
self
.
attribute_mapping
[
"
tr_busy_R
"
].
get_value
()
return
self
.
_sdp_info_R
return
self
.
_tr_busy_R
@only_when_on
@fault_on_error
def
read_tr_reload_RW
(
self
):
"""
Return the tr_reload_RW attribute.
"""
self
.
_tr_reload_RW
=
self
.
attribute_mapping
[
"
tr_reload_RW
"
].
get_value
()
return
self
.
_tr_reload_RW
@only_when_on
@only_when_on
@fault_on_error
@fault_on_error
def
read_sdp_to
d_R
(
self
):
def
write_tr_reloa
d_R
W
(
self
,
value
):
"""
Return the
sdp_to
d_R attribute.
"""
"""
Return the
tr_reloa
d_R
W
attribute.
"""
self
.
_sdp_tod_R
=
self
.
attribute_mapping
[
"
sdp_to
d_R
"
].
g
et_value
()
self
.
attribute_mapping
[
"
tr_reloa
d_R
W
"
].
s
et_value
(
value
)
return
self
.
_sdp_tod_R
self
.
_tr_reload_RW
=
value
@only_when_on
@only_when_on
@fault_on_error
@fault_on_error
def
read_tr
anslator_network
_R
(
self
):
def
read_tr
_tod
_R
(
self
):
"""
Return the _tr
anslator_network
_R attribute.
"""
"""
Return the _tr
_tod
_R attribute.
"""
self
.
_tr
anslator_network
_R
=
self
.
attribute_mapping
[
"
tr
anslator_network
_R
"
].
get_value
()
self
.
_tr
_tod
_R
=
self
.
attribute_mapping
[
"
tr
_tod
_R
"
].
get_value
()
return
self
.
_tr
anslator_network
_R
return
self
.
_tr
_tod
_R
@only_when_on
@only_when_on
@fault_on_error
@fault_on_error
def
read_tr
anslator_timing
_R
(
self
):
def
read_tr
_uptime
_R
(
self
):
"""
Return the _tr
anslator_timing
_R attribute.
"""
"""
Return the _tr
_uptime
_R attribute.
"""
self
.
_tr
anslator_timing
_R
=
self
.
attribute_mapping
[
"
tr
anslator_timing
_R
"
].
get_value
()
self
.
_tr
_uptime
_R
=
self
.
attribute_mapping
[
"
tr
_uptime
_R
"
].
get_value
()
return
self
.
_tr
anslator_timing
_R
return
self
.
_tr
_uptime
_R
# --------
# --------
...
...
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