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
17f77170
Commit
17f77170
authored
4 years ago
by
Thomas Juerges
Browse files
Options
Downloads
Patches
Plain Diff
Weed out the numpy issues that I introduced myself
parent
6a921406
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
RCUSCC/RCUSCC/RCUSCC.py
+15
-14
15 additions, 14 deletions
RCUSCC/RCUSCC/RCUSCC.py
with
15 additions
and
14 deletions
RCUSCC/RCUSCC/RCUSCC.py
+
15
−
14
View file @
17f77170
...
@@ -25,6 +25,7 @@ from tango import AttrWriteType, PipeWriteType
...
@@ -25,6 +25,7 @@ from tango import AttrWriteType, PipeWriteType
import
sys
import
sys
import
opcua
import
opcua
import
traceback
import
traceback
import
numpy
# PROTECTED REGION END # // RCUSCC.additionnal_import
# PROTECTED REGION END # // RCUSCC.additionnal_import
__all__
=
[
"
RCUSCC
"
,
"
main
"
]
__all__
=
[
"
RCUSCC
"
,
"
main
"
]
...
@@ -73,23 +74,23 @@ class RCUSCC(Device):
...
@@ -73,23 +74,23 @@ class RCUSCC(Device):
# ----------
# ----------
Attenuator_R
=
attribute
(
Attenuator_R
=
attribute
(
dtype
=
(
'
DevLong64
'
,),
dtype
=
(
(
'
DevLong64
'
,),
),
max_dim_x
=
32
,
max_dim_y
=
3
,
max_dim_x
=
32
,
max_dim_y
=
3
,
)
)
Attenuator_RW
=
attribute
(
Attenuator_RW
=
attribute
(
dtype
=
(
'
DevLong64
'
,),
dtype
=
(
(
'
DevLong64
'
,),
),
max_dim_x
=
32
,
max_dim_y
=
3
,
max_dim_x
=
32
,
max_dim_y
=
3
,
access
=
AttrWriteType
.
READ_WRITE
,
access
=
AttrWriteType
.
READ_WRITE
,
)
)
Band_R
=
attribute
(
Band_R
=
attribute
(
dtype
=
(
'
DevLong64
'
,),
dtype
=
(
(
'
DevLong64
'
,),
),
max_dim_x
=
32
,
max_dim_y
=
3
,
max_dim_x
=
32
,
max_dim_y
=
3
,
)
)
Band_RW
=
attribute
(
Band_RW
=
attribute
(
dtype
=
(
'
DevLong64
'
,),
dtype
=
(
(
'
DevLong64
'
,),
),
max_dim_x
=
32
,
max_dim_y
=
3
,
max_dim_x
=
32
,
max_dim_y
=
3
,
access
=
AttrWriteType
.
READ_WRITE
,
access
=
AttrWriteType
.
READ_WRITE
,
)
)
...
@@ -99,23 +100,23 @@ class RCUSCC(Device):
...
@@ -99,23 +100,23 @@ class RCUSCC(Device):
)
)
# Dither_Frequency_R = attribute(
# Dither_Frequency_R = attribute(
# dtype=('DevDouble',),
# dtype=(
(
'DevDouble',),
),
# max_dim_x=32, max_dim_y=2,
# max_dim_x=32, max_dim_y=2,
# )
# )
#
#
# Dither_Frequency_RW = attribute(
# Dither_Frequency_RW = attribute(
# dtype=('DevDouble',),
# dtype=(
(
'DevDouble',),
),
# max_dim_x=32, max_dim_y=2,
# max_dim_x=32, max_dim_y=2,
# access=AttrWriteType.READ_WRITE,
# access=AttrWriteType.READ_WRITE,
# )
# )
LED_R
=
attribute
(
LED_R
=
attribute
(
dtype
=
(
'
DevLong64
'
,),
dtype
=
(
(
'
DevLong64
'
,),
),
max_dim_x
=
32
,
max_dim_y
=
3
,
max_dim_x
=
32
,
max_dim_y
=
3
,
)
)
LED_RW
=
attribute
(
LED_RW
=
attribute
(
dtype
=
(
'
DevLong64
'
,),
dtype
=
(
(
'
DevLong64
'
,),
),
max_dim_x
=
32
,
max_dim_y
=
3
,
max_dim_x
=
32
,
max_dim_y
=
3
,
access
=
AttrWriteType
.
READ_WRITE
,
access
=
AttrWriteType
.
READ_WRITE
,
)
)
...
@@ -274,14 +275,14 @@ class RCUSCC(Device):
...
@@ -274,14 +275,14 @@ class RCUSCC(Device):
def
read_Attenuator_R
(
self
):
def
read_Attenuator_R
(
self
):
# PROTECTED REGION ID(RCUSCC.Attenuator_R_read) ENABLED START #
# PROTECTED REGION ID(RCUSCC.Attenuator_R_read) ENABLED START #
"""
Return the Attenuator_R attribute.
"""
"""
Return the Attenuator_R attribute.
"""
self
.
_Attenuator_R
=
(
self
.
attribute_mapping
[
"
Attenuator_R
"
][
0
].
get_value
(),
self
.
attribute_mapping
[
"
Attenuator_R
"
][
1
].
get_value
(),
self
.
attribute_mapping
[
"
Attenuator_R
"
][
2
].
get_value
())
self
.
_Attenuator_R
=
numpy
.
array
([
self
.
attribute_mapping
[
"
Attenuator_R
"
][
0
].
get_value
(),
self
.
attribute_mapping
[
"
Attenuator_R
"
][
1
].
get_value
(),
self
.
attribute_mapping
[
"
Attenuator_R
"
][
2
].
get_value
()
]
)
return
self
.
_Attenuator_R
return
self
.
_Attenuator_R
# PROTECTED REGION END # // RCUSCC.Attenuator_R_read
# PROTECTED REGION END # // RCUSCC.Attenuator_R_read
def
read_Attenuator_RW
(
self
):
def
read_Attenuator_RW
(
self
):
# PROTECTED REGION ID(RCUSCC.Attenuator_RW_read) ENABLED START #
# PROTECTED REGION ID(RCUSCC.Attenuator_RW_read) ENABLED START #
"""
Return the Attenuator_R attribute.
"""
"""
Return the Attenuator_R attribute.
"""
self
.
_Attenuator_RW
=
(
self
.
attribute_mapping
[
"
Attenuator_RW
"
][
0
].
get_value
(),
self
.
attribute_mapping
[
"
Attenuator_RW
"
][
1
].
get_value
(),
self
.
attribute_mapping
[
"
Attenuator_RW
"
][
2
].
get_value
())
self
.
_Attenuator_RW
=
numpy
.
array
([
self
.
attribute_mapping
[
"
Attenuator_RW
"
][
0
].
get_value
(),
self
.
attribute_mapping
[
"
Attenuator_RW
"
][
1
].
get_value
(),
self
.
attribute_mapping
[
"
Attenuator_RW
"
][
2
].
get_value
()
]
)
return
self
.
_Attenuator_RW
return
self
.
_Attenuator_RW
# PROTECTED REGION END # // RCUSCC.Attenuator_RW_read
# PROTECTED REGION END # // RCUSCC.Attenuator_RW_read
...
@@ -297,14 +298,14 @@ class RCUSCC(Device):
...
@@ -297,14 +298,14 @@ class RCUSCC(Device):
def
read_Band_R
(
self
):
def
read_Band_R
(
self
):
# PROTECTED REGION ID(RCUSCC.Band_R_read) ENABLED START #
# PROTECTED REGION ID(RCUSCC.Band_R_read) ENABLED START #
"""
Return the Band_R attribute.
"""
"""
Return the Band_R attribute.
"""
self
.
_Band_R
=
(
self
.
attribute_mapping
[
"
Band_R
"
][
0
].
get_value
(),
self
.
attribute_mapping
[
"
Band_R
"
][
1
].
get_value
(),
self
.
attribute_mapping
[
"
Band_R
"
][
2
].
get_value
())
self
.
_Band_R
=
numpy
.
array
([
self
.
attribute_mapping
[
"
Band_R
"
][
0
].
get_value
(),
self
.
attribute_mapping
[
"
Band_R
"
][
1
].
get_value
(),
self
.
attribute_mapping
[
"
Band_R
"
][
2
].
get_value
()
]
)
return
self
.
_Band_R
return
self
.
_Band_R
# PROTECTED REGION END # // RCUSCC.Band_R_read
# PROTECTED REGION END # // RCUSCC.Band_R_read
def
read_Band_RW
(
self
):
def
read_Band_RW
(
self
):
# PROTECTED REGION ID(RCUSCC.Band_RW_read) ENABLED START #
# PROTECTED REGION ID(RCUSCC.Band_RW_read) ENABLED START #
"""
Return the Band_R attribute.
"""
"""
Return the Band_R attribute.
"""
self
.
_Band_RW
=
(
self
.
attribute_mapping
[
"
Band_RW
"
][
0
].
get_value
(),
self
.
attribute_mapping
[
"
Band_RW
"
][
1
].
get_value
(),
self
.
attribute_mapping
[
"
Band_RW
"
][
2
].
get_value
())
self
.
_Band_RW
=
numpy
.
array
([
self
.
attribute_mapping
[
"
Band_RW
"
][
0
].
get_value
(),
self
.
attribute_mapping
[
"
Band_RW
"
][
1
].
get_value
(),
self
.
attribute_mapping
[
"
Band_RW
"
][
2
].
get_value
()
]
)
return
self
.
_Band_RW
return
self
.
_Band_RW
# PROTECTED REGION END # // RCUSCC.Band_RW_read
# PROTECTED REGION END # // RCUSCC.Band_RW_read
...
@@ -320,14 +321,14 @@ class RCUSCC(Device):
...
@@ -320,14 +321,14 @@ class RCUSCC(Device):
def
read_Dither_Frequency_R
(
self
):
def
read_Dither_Frequency_R
(
self
):
# PROTECTED REGION ID(RCUSCC.Dither_Frequency_R_read) ENABLED START #
# PROTECTED REGION ID(RCUSCC.Dither_Frequency_R_read) ENABLED START #
"""
Return the Dither_Frequency_R attribute.
"""
"""
Return the Dither_Frequency_R attribute.
"""
self
.
_Dither_Frequency_R
=
(
self
.
attribute_mapping
[
"
Dither_Frequency_R
"
][
0
].
get_value
(),
self
.
attribute_mapping
[
"
Dither_Frequency_R
"
][
1
].
get_value
())
self
.
_Dither_Frequency_R
=
numpy
.
array
([
self
.
attribute_mapping
[
"
Dither_Frequency_R
"
][
0
].
get_value
(),
self
.
attribute_mapping
[
"
Dither_Frequency_R
"
][
1
].
get_value
()
]
)
return
self
.
_Dither_Frequency_R
return
self
.
_Dither_Frequency_R
# PROTECTED REGION END # // RCUSCC.Dither_Frequency_R_read
# PROTECTED REGION END # // RCUSCC.Dither_Frequency_R_read
def
read_Dither_Frequency_RW
(
self
):
def
read_Dither_Frequency_RW
(
self
):
# PROTECTED REGION ID(RCUSCC.Dither_Frequency_RW_read) ENABLED START #
# PROTECTED REGION ID(RCUSCC.Dither_Frequency_RW_read) ENABLED START #
"""
Return the Dither_Frequency_R attribute.
"""
"""
Return the Dither_Frequency_R attribute.
"""
self
.
_Dither_Frequency_RW
=
(
self
.
attribute_mapping
[
"
Dither_Frequency_RW
"
][
0
].
get_value
(),
self
.
attribute_mapping
[
"
Dither_Frequency_RW
"
][
1
].
get_value
())
self
.
_Dither_Frequency_RW
=
numpy
.
array
([
self
.
attribute_mapping
[
"
Dither_Frequency_RW
"
][
0
].
get_value
(),
self
.
attribute_mapping
[
"
Dither_Frequency_RW
"
][
1
].
get_value
()
]
)
return
self
.
_Dither_Frequency_RW
return
self
.
_Dither_Frequency_RW
# PROTECTED REGION END # // RCUSCC.Dither_Frequency_RW_read
# PROTECTED REGION END # // RCUSCC.Dither_Frequency_RW_read
...
...
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