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
2e0a49d9
Commit
2e0a49d9
authored
3 years ago
by
Thomas Juerges
Browse files
Options
Downloads
Patches
Plain Diff
Add some new lines, remove some for better readability
parent
091660d5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!12
Adjustments and fixes for attribute_wrapper merge
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
devices/PCC.py
+21
-17
21 additions, 17 deletions
devices/PCC.py
with
21 additions
and
17 deletions
devices/PCC.py
+
21
−
17
View file @
2e0a49d9
...
@@ -15,8 +15,8 @@
...
@@ -15,8 +15,8 @@
from
tango
import
DebugIt
from
tango
import
DebugIt
from
tango.server
import
run
,
command
from
tango.server
import
run
,
command
from
tango.server
import
device_property
from
tango.server
import
device_property
# Additional import
# Additional import
from
clients.opcua_connection
import
OPCUAConnection
from
clients.opcua_connection
import
OPCUAConnection
from
src.attribute_wrapper
import
*
from
src.attribute_wrapper
import
*
from
src.hardware_device
import
*
from
src.hardware_device
import
*
...
@@ -25,23 +25,9 @@ from src.hardware_device import *
...
@@ -25,23 +25,9 @@ from src.hardware_device import *
__all__
=
[
"
PCC
"
,
"
main
"
]
__all__
=
[
"
PCC
"
,
"
main
"
]
class
PCC
(
hardware_device
):
class
PCC
(
hardware_device
):
"""
**Properties:**
- Device Property
OPC_Server_Name
- Type:
'
DevString
'
OPC_Server_Port
- Type:
'
DevULong
'
OPC_Time_Out
- Type:
'
DevDouble
'
"""
# -----------------
# -----------------
# Device Properties
# Device Properties
# -----------------
# -----------------
OPC_Server_Name
=
device_property
(
OPC_Server_Name
=
device_property
(
dtype
=
'
DevString
'
,
dtype
=
'
DevString
'
,
mandatory
=
True
mandatory
=
True
...
@@ -56,7 +42,8 @@ class PCC(hardware_device):
...
@@ -56,7 +42,8 @@ class PCC(hardware_device):
dtype
=
'
DevDouble
'
,
dtype
=
'
DevDouble
'
,
mandatory
=
True
mandatory
=
True
)
)
OPC_namespace
=
device_property
(
OPC_Namespace
=
device_property
(
dtype
=
'
DevString
'
,
dtype
=
'
DevString
'
,
mandatory
=
False
mandatory
=
False
)
)
...
@@ -65,22 +52,39 @@ class PCC(hardware_device):
...
@@ -65,22 +52,39 @@ class PCC(hardware_device):
# Attributes
# Attributes
# ----------
# ----------
RCU_mask_RW
=
attribute_wrapper
(
comms_annotation
=
[
"
2:PCC
"
,
"
2:RCU_mask_RW
"
],
datatype
=
numpy
.
bool_
,
dims
=
(
32
,),
access
=
AttrWriteType
.
READ_WRITE
)
RCU_mask_RW
=
attribute_wrapper
(
comms_annotation
=
[
"
2:PCC
"
,
"
2:RCU_mask_RW
"
],
datatype
=
numpy
.
bool_
,
dims
=
(
32
,),
access
=
AttrWriteType
.
READ_WRITE
)
Ant_mask_RW
=
attribute_wrapper
(
comms_annotation
=
[
"
2:PCC
"
,
"
2:Ant_mask_RW
"
],
datatype
=
numpy
.
bool_
,
dims
=
(
3
,
32
),
access
=
AttrWriteType
.
READ_WRITE
)
Ant_mask_RW
=
attribute_wrapper
(
comms_annotation
=
[
"
2:PCC
"
,
"
2:Ant_mask_RW
"
],
datatype
=
numpy
.
bool_
,
dims
=
(
3
,
32
),
access
=
AttrWriteType
.
READ_WRITE
)
RCU_attenuator_R
=
attribute_wrapper
(
comms_annotation
=
[
"
2:PCC
"
,
"
2:RCU_attenuator_R
"
],
datatype
=
numpy
.
int64
,
dims
=
(
3
,
32
))
RCU_attenuator_R
=
attribute_wrapper
(
comms_annotation
=
[
"
2:PCC
"
,
"
2:RCU_attenuator_R
"
],
datatype
=
numpy
.
int64
,
dims
=
(
3
,
32
))
RCU_attenuator_RW
=
attribute_wrapper
(
comms_annotation
=
[
"
2:PCC
"
,
"
2:RCU_attenuator_RW
"
],
datatype
=
numpy
.
int64
,
dims
=
(
3
,
32
),
access
=
AttrWriteType
.
READ_WRITE
)
RCU_attenuator_RW
=
attribute_wrapper
(
comms_annotation
=
[
"
2:PCC
"
,
"
2:RCU_attenuator_RW
"
],
datatype
=
numpy
.
int64
,
dims
=
(
3
,
32
),
access
=
AttrWriteType
.
READ_WRITE
)
RCU_band_R
=
attribute_wrapper
(
comms_annotation
=
[
"
2:PCC
"
,
"
2:RCU_band_R
"
],
datatype
=
numpy
.
int64
,
dims
=
(
3
,
32
))
RCU_band_R
=
attribute_wrapper
(
comms_annotation
=
[
"
2:PCC
"
,
"
2:RCU_band_R
"
],
datatype
=
numpy
.
int64
,
dims
=
(
3
,
32
))
RCU_band_RW
=
attribute_wrapper
(
comms_annotation
=
[
"
2:PCC
"
,
"
2:RCU_band_RW
"
],
datatype
=
numpy
.
int64
,
dims
=
(
3
,
32
),
access
=
AttrWriteType
.
READ_WRITE
)
RCU_band_RW
=
attribute_wrapper
(
comms_annotation
=
[
"
2:PCC
"
,
"
2:RCU_band_RW
"
],
datatype
=
numpy
.
int64
,
dims
=
(
3
,
32
),
access
=
AttrWriteType
.
READ_WRITE
)
RCU_temperature_R
=
attribute_wrapper
(
comms_annotation
=
[
"
2:PCC
"
,
"
2:RCU_temperature_R
"
],
datatype
=
numpy
.
float64
,
dims
=
(
32
,))
RCU_temperature_R
=
attribute_wrapper
(
comms_annotation
=
[
"
2:PCC
"
,
"
2:RCU_temperature_R
"
],
datatype
=
numpy
.
float64
,
dims
=
(
32
,))
RCU_Pwr_dig_R
=
attribute_wrapper
(
comms_annotation
=
[
"
2:PCC
"
,
"
2:RCU_Pwr_dig_R
"
],
datatype
=
numpy
.
int64
,
dims
=
(
32
,))
RCU_Pwr_dig_R
=
attribute_wrapper
(
comms_annotation
=
[
"
2:PCC
"
,
"
2:RCU_Pwr_dig_R
"
],
datatype
=
numpy
.
int64
,
dims
=
(
32
,))
RCU_LED0_R
=
attribute_wrapper
(
comms_annotation
=
[
"
2:PCC
"
,
"
2:RCU_LED0_R
"
],
datatype
=
numpy
.
int64
,
dims
=
(
32
,))
RCU_LED0_R
=
attribute_wrapper
(
comms_annotation
=
[
"
2:PCC
"
,
"
2:RCU_LED0_R
"
],
datatype
=
numpy
.
int64
,
dims
=
(
32
,))
RCU_LED0_RW
=
attribute_wrapper
(
comms_annotation
=
[
"
2:PCC
"
,
"
2:RCU_LED0_RW
"
],
datatype
=
numpy
.
int64
,
dims
=
(
32
,),
access
=
AttrWriteType
.
READ_WRITE
)
RCU_LED0_RW
=
attribute_wrapper
(
comms_annotation
=
[
"
2:PCC
"
,
"
2:RCU_LED0_RW
"
],
datatype
=
numpy
.
int64
,
dims
=
(
32
,),
access
=
AttrWriteType
.
READ_WRITE
)
RCU_ADC_lock_R
=
attribute_wrapper
(
comms_annotation
=
[
"
2:PCC
"
,
"
2:RCU_ADC_lock_R
"
],
datatype
=
numpy
.
int64
,
dims
=
(
3
,
32
))
RCU_ADC_lock_R
=
attribute_wrapper
(
comms_annotation
=
[
"
2:PCC
"
,
"
2:RCU_ADC_lock_R
"
],
datatype
=
numpy
.
int64
,
dims
=
(
3
,
32
))
RCU_ADC_SYNC_R
=
attribute_wrapper
(
comms_annotation
=
[
"
2:PCC
"
,
"
2:RCU_ADC_SYNC_R
"
],
datatype
=
numpy
.
int64
,
dims
=
(
3
,
32
))
RCU_ADC_SYNC_R
=
attribute_wrapper
(
comms_annotation
=
[
"
2:PCC
"
,
"
2:RCU_ADC_SYNC_R
"
],
datatype
=
numpy
.
int64
,
dims
=
(
3
,
32
))
RCU_ADC_JESD_R
=
attribute_wrapper
(
comms_annotation
=
[
"
2:PCC
"
,
"
2:RCU_ADC_JESD_R
"
],
datatype
=
numpy
.
int64
,
dims
=
(
3
,
32
))
RCU_ADC_JESD_R
=
attribute_wrapper
(
comms_annotation
=
[
"
2:PCC
"
,
"
2:RCU_ADC_JESD_R
"
],
datatype
=
numpy
.
int64
,
dims
=
(
3
,
32
))
RCU_ADC_CML_R
=
attribute_wrapper
(
comms_annotation
=
[
"
2:PCC
"
,
"
2:RCU_ADC_CML_R
"
],
datatype
=
numpy
.
int64
,
dims
=
(
3
,
32
))
RCU_ADC_CML_R
=
attribute_wrapper
(
comms_annotation
=
[
"
2:PCC
"
,
"
2:RCU_ADC_CML_R
"
],
datatype
=
numpy
.
int64
,
dims
=
(
3
,
32
))
RCU_OUT1_R
=
attribute_wrapper
(
comms_annotation
=
[
"
2:PCC
"
,
"
2:RCU_OUT1_R
"
],
datatype
=
numpy
.
int64
,
dims
=
(
3
,
32
))
RCU_OUT1_R
=
attribute_wrapper
(
comms_annotation
=
[
"
2:PCC
"
,
"
2:RCU_OUT1_R
"
],
datatype
=
numpy
.
int64
,
dims
=
(
3
,
32
))
RCU_OUT2_R
=
attribute_wrapper
(
comms_annotation
=
[
"
2:PCC
"
,
"
2:RCU_OUT2_R
"
],
datatype
=
numpy
.
int64
,
dims
=
(
3
,
32
))
RCU_OUT2_R
=
attribute_wrapper
(
comms_annotation
=
[
"
2:PCC
"
,
"
2:RCU_OUT2_R
"
],
datatype
=
numpy
.
int64
,
dims
=
(
3
,
32
))
RCU_ID_R
=
attribute_wrapper
(
comms_annotation
=
[
"
2:PCC
"
,
"
2:RCU_ID_R
"
],
datatype
=
numpy
.
int64
,
dims
=
(
32
,))
RCU_ID_R
=
attribute_wrapper
(
comms_annotation
=
[
"
2:PCC
"
,
"
2:RCU_ID_R
"
],
datatype
=
numpy
.
int64
,
dims
=
(
32
,))
RCU_version_R
=
attribute_wrapper
(
comms_annotation
=
[
"
2:PCC
"
,
"
2:RCU_version_R
"
],
datatype
=
numpy
.
str_
,
dims
=
(
32
,))
RCU_version_R
=
attribute_wrapper
(
comms_annotation
=
[
"
2:PCC
"
,
"
2:RCU_version_R
"
],
datatype
=
numpy
.
str_
,
dims
=
(
32
,))
HBA_element_beamformer_delays_R
=
attribute_wrapper
(
comms_annotation
=
[
"
2:PCC
"
,
"
2:HBA_element_beamformer_delays_R
"
],
datatype
=
numpy
.
int64
,
dims
=
(
32
,
96
))
HBA_element_beamformer_delays_R
=
attribute_wrapper
(
comms_annotation
=
[
"
2:PCC
"
,
"
2:HBA_element_beamformer_delays_R
"
],
datatype
=
numpy
.
int64
,
dims
=
(
32
,
96
))
...
@@ -90,6 +94,7 @@ class PCC(hardware_device):
...
@@ -90,6 +94,7 @@ class PCC(hardware_device):
RCU_monitor_rate_RW
=
attribute_wrapper
(
comms_annotation
=
[
"
2:PCC
"
,
"
2:RCU_monitor_rate_RW
"
],
datatype
=
numpy
.
float64
,
access
=
AttrWriteType
.
READ_WRITE
)
RCU_monitor_rate_RW
=
attribute_wrapper
(
comms_annotation
=
[
"
2:PCC
"
,
"
2:RCU_monitor_rate_RW
"
],
datatype
=
numpy
.
float64
,
access
=
AttrWriteType
.
READ_WRITE
)
def
delete_device
(
self
):
def
delete_device
(
self
):
"""
Hook to delete resources allocated in init_device.
"""
Hook to delete resources allocated in init_device.
...
@@ -98,7 +103,6 @@ class PCC(hardware_device):
...
@@ -98,7 +103,6 @@ class PCC(hardware_device):
destructor and by the device Init command (a Tango built-in).
destructor and by the device Init command (a Tango built-in).
"""
"""
self
.
debug_stream
(
"
Shutting down...
"
)
self
.
debug_stream
(
"
Shutting down...
"
)
self
.
Off
()
self
.
Off
()
self
.
debug_stream
(
"
Shut down. Good bye.
"
)
self
.
debug_stream
(
"
Shut down. Good bye.
"
)
...
...
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