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
75d91f88
Commit
75d91f88
authored
4 years ago
by
Thomas Juerges
Browse files
Options
Downloads
Patches
Plain Diff
Add states
parent
5795395b
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
StatsCrosslet-DS/StatsCrosslet.py
+46
-3
46 additions, 3 deletions
StatsCrosslet-DS/StatsCrosslet.py
StatsCrosslet-DS/StatsCrosslet.xmi
+39
-0
39 additions, 0 deletions
StatsCrosslet-DS/StatsCrosslet.xmi
with
85 additions
and
3 deletions
StatsCrosslet-DS/StatsCrosslet.py
+
46
−
3
View file @
75d91f88
...
...
@@ -229,18 +229,36 @@ class StatsCrosslet(Device):
self
.
_subband
=
value
# PROTECTED REGION END # // StatsCrosslet.subband_write
def
is_subband_allowed
(
self
,
attr
):
# PROTECTED REGION ID(StatsCrosslet.is_subband_allowed) ENABLED START #
if
attr
==
attr
.
READ_REQ
:
return
self
.
get_state
()
not
in
[
DevState
.
STANDBY
]
else
:
return
self
.
get_state
()
not
in
[
DevState
.
STANDBY
]
# PROTECTED REGION END # // StatsCrosslet.is_subband_allowed
def
read_integration_time
(
self
):
# PROTECTED REGION ID(StatsCrosslet.integration_time_read) ENABLED START #
"""
Return the integration_time attribute.
"""
return
self
.
_integration_time
# PROTECTED REGION END # // StatsCrosslet.integration_time_read
def
is_integration_time_allowed
(
self
,
attr
):
# PROTECTED REGION ID(StatsCrosslet.is_integration_time_allowed) ENABLED START #
return
self
.
get_state
()
not
in
[
DevState
.
ON
,
DevState
.
OFF
,
DevState
.
INIT
]
# PROTECTED REGION END # // StatsCrosslet.is_integration_time_allowed
def
read_time_stamp
(
self
):
# PROTECTED REGION ID(StatsCrosslet.time_stamp_read) ENABLED START #
"""
Return the time_stamp attribute.
"""
return
self
.
_time_stamp
# PROTECTED REGION END # // StatsCrosslet.time_stamp_read
def
is_time_stamp_allowed
(
self
,
attr
):
# PROTECTED REGION ID(StatsCrosslet.is_time_stamp_allowed) ENABLED START #
return
self
.
get_state
()
not
in
[
DevState
.
ON
,
DevState
.
OFF
,
DevState
.
INIT
]
# PROTECTED REGION END # // StatsCrosslet.is_time_stamp_allowed
def
read_pause_time
(
self
):
# PROTECTED REGION ID(StatsCrosslet.pause_time_read) ENABLED START #
"""
Return the pause_time attribute.
"""
...
...
@@ -259,18 +277,33 @@ class StatsCrosslet(Device):
return
self
.
_rcu_modes
# PROTECTED REGION END # // StatsCrosslet.rcu_modes_read
def
is_rcu_modes_allowed
(
self
,
attr
):
# PROTECTED REGION ID(StatsCrosslet.is_rcu_modes_allowed) ENABLED START #
return
self
.
get_state
()
not
in
[
DevState
.
ON
,
DevState
.
OFF
,
DevState
.
INIT
]
# PROTECTED REGION END # // StatsCrosslet.is_rcu_modes_allowed
def
read_visibilities_imag
(
self
):
# PROTECTED REGION ID(StatsCrosslet.visibilities_imag_read) ENABLED START #
"""
Return the visibilities_imag attribute.
"""
return
self
.
_visibilities_imag
# PROTECTED REGION END # // StatsCrosslet.visibilities_imag_read
def
is_visibilities_imag_allowed
(
self
,
attr
):
# PROTECTED REGION ID(StatsCrosslet.is_visibilities_imag_allowed) ENABLED START #
return
self
.
get_state
()
not
in
[
DevState
.
ON
,
DevState
.
OFF
,
DevState
.
INIT
]
# PROTECTED REGION END # // StatsCrosslet.is_visibilities_imag_allowed
def
read_visibilities_real
(
self
):
# PROTECTED REGION ID(StatsCrosslet.visibilities_real_read) ENABLED START #
"""
Return the visibilities_real attribute.
"""
return
self
.
_visibilities_real
# PROTECTED REGION END # // StatsCrosslet.visibilities_real_read
def
is_visibilities_real_allowed
(
self
,
attr
):
# PROTECTED REGION ID(StatsCrosslet.is_visibilities_real_allowed) ENABLED START #
return
self
.
get_state
()
not
in
[
DevState
.
ON
,
DevState
.
OFF
,
DevState
.
INIT
]
# PROTECTED REGION END # // StatsCrosslet.is_visibilities_real_allowed
# --------
# Commands
# --------
...
...
@@ -287,10 +320,15 @@ class StatsCrosslet(Device):
:return:None
"""
#
self.data
_acquisition_
is_active.set()
self
.
data_acquisition_is_active
=
True
if
is_start
_acquisition_
allowed
()
is
True
:
self
.
data_acquisition_is_active
=
True
# PROTECTED REGION END # // StatsCrosslet.start_acquisition
def
is_start_acquisition_allowed
(
self
):
# PROTECTED REGION ID(StatsCrosslet.is_start_acquisition_allowed) ENABLED START #
return
self
.
get_state
()
not
in
[
DevState
.
ON
,
DevState
.
OFF
,
DevState
.
STANDBY
,
DevState
.
RUNNING
]
# PROTECTED REGION END # // StatsCrosslet.is_start_acquisition_allowed
@command
(
)
@DebugIt
()
...
...
@@ -301,10 +339,15 @@ class StatsCrosslet(Device):
:return:None
"""
#
self.data
_acquisition_
is_active.clear()
if
is_stop
_acquisition_
allowed
()
is
True
:
self
.
data_acquisition_is_active
=
False
# PROTECTED REGION END # // StatsCrosslet.stop_acquisition
def
is_stop_acquisition_allowed
(
self
):
# PROTECTED REGION ID(StatsCrosslet.is_stop_acquisition_allowed) ENABLED START #
return
self
.
get_state
()
not
in
[
DevState
.
ON
,
DevState
.
INIT
,
DevState
.
RUNNING
]
# PROTECTED REGION END # // StatsCrosslet.is_stop_acquisition_allowed
# ----------
# Run server
# ----------
...
...
This diff is collapsed.
Click to expand it.
StatsCrosslet-DS/StatsCrosslet.xmi
+
39
−
0
View file @
75d91f88
...
...
@@ -61,6 +61,10 @@
<type
xsi:type=
"pogoDsl:VoidType"
/>
</argout>
<status
abstract=
"false"
inherited=
"false"
concrete=
"true"
concreteHere=
"true"
/>
<excludedStates>
ON
</excludedStates>
<excludedStates>
OFF
</excludedStates>
<excludedStates>
STANDBY
</excludedStates>
<excludedStates>
RUNNING
</excludedStates>
</commands>
<commands
name=
"stop_acquisition"
description=
"Stop the data acquisition."
execMethod=
"stop_acquisition"
displayLevel=
"OPERATOR"
polledPeriod=
"0"
isDynamic=
"false"
>
<argin
description=
""
>
...
...
@@ -70,6 +74,9 @@
<type
xsi:type=
"pogoDsl:VoidType"
/>
</argout>
<status
abstract=
"false"
inherited=
"false"
concrete=
"true"
concreteHere=
"true"
/>
<excludedStates>
ON
</excludedStates>
<excludedStates>
INIT
</excludedStates>
<excludedStates>
RUNNING
</excludedStates>
</commands>
<attributes
name=
"subband"
attType=
"Scalar"
rwType=
"READ_WRITE"
displayLevel=
"OPERATOR"
polledPeriod=
"0"
maxX=
""
maxY=
""
allocReadMember=
"true"
isDynamic=
"false"
>
<dataType
xsi:type=
"pogoDsl:UShortType"
/>
...
...
@@ -78,6 +85,8 @@
<dataReadyEvent
fire=
"false"
libCheckCriteria=
"true"
/>
<status
abstract=
"false"
inherited=
"false"
concrete=
"true"
concreteHere=
"true"
/>
<properties
description=
""
label=
""
unit=
""
standardUnit=
""
displayUnit=
""
format=
""
maxValue=
""
minValue=
""
maxAlarm=
""
minAlarm=
""
maxWarning=
""
minWarning=
""
deltaTime=
""
deltaValue=
""
/>
<readExcludedStates>
STANDBY
</readExcludedStates>
<writeExcludedStates>
STANDBY
</writeExcludedStates>
</attributes>
<attributes
name=
"integration_time"
attType=
"Scalar"
rwType=
"READ"
displayLevel=
"OPERATOR"
polledPeriod=
"0"
maxX=
""
maxY=
""
allocReadMember=
"true"
isDynamic=
"false"
>
<dataType
xsi:type=
"pogoDsl:DoubleType"
/>
...
...
@@ -86,6 +95,9 @@
<dataReadyEvent
fire=
"false"
libCheckCriteria=
"true"
/>
<status
abstract=
"false"
inherited=
"false"
concrete=
"true"
concreteHere=
"true"
/>
<properties
description=
""
label=
""
unit=
""
standardUnit=
""
displayUnit=
""
format=
""
maxValue=
""
minValue=
""
maxAlarm=
""
minAlarm=
""
maxWarning=
""
minWarning=
""
deltaTime=
""
deltaValue=
""
/>
<readExcludedStates>
ON
</readExcludedStates>
<readExcludedStates>
OFF
</readExcludedStates>
<readExcludedStates>
INIT
</readExcludedStates>
</attributes>
<attributes
name=
"time_stamp"
attType=
"Scalar"
rwType=
"READ"
displayLevel=
"OPERATOR"
polledPeriod=
"0"
maxX=
""
maxY=
""
allocReadMember=
"true"
isDynamic=
"false"
>
<dataType
xsi:type=
"pogoDsl:StringType"
/>
...
...
@@ -94,6 +106,9 @@
<dataReadyEvent
fire=
"false"
libCheckCriteria=
"true"
/>
<status
abstract=
"false"
inherited=
"false"
concrete=
"true"
concreteHere=
"true"
/>
<properties
description=
""
label=
""
unit=
""
standardUnit=
""
displayUnit=
""
format=
""
maxValue=
""
minValue=
""
maxAlarm=
""
minAlarm=
""
maxWarning=
""
minWarning=
""
deltaTime=
""
deltaValue=
""
/>
<readExcludedStates>
ON
</readExcludedStates>
<readExcludedStates>
OFF
</readExcludedStates>
<readExcludedStates>
INIT
</readExcludedStates>
</attributes>
<attributes
name=
"pause_time"
attType=
"Scalar"
rwType=
"READ_WRITE"
displayLevel=
"OPERATOR"
polledPeriod=
"0"
maxX=
""
maxY=
""
allocReadMember=
"true"
isDynamic=
"false"
>
<dataType
xsi:type=
"pogoDsl:DoubleType"
/>
...
...
@@ -110,6 +125,9 @@
<dataReadyEvent
fire=
"false"
libCheckCriteria=
"true"
/>
<status
abstract=
"false"
inherited=
"false"
concrete=
"true"
concreteHere=
"true"
/>
<properties
description=
""
label=
""
unit=
""
standardUnit=
""
displayUnit=
""
format=
""
maxValue=
""
minValue=
""
maxAlarm=
""
minAlarm=
""
maxWarning=
""
minWarning=
""
deltaTime=
""
deltaValue=
""
/>
<readExcludedStates>
ON
</readExcludedStates>
<readExcludedStates>
OFF
</readExcludedStates>
<readExcludedStates>
INIT
</readExcludedStates>
</attributes>
<attributes
name=
"visibilities_imag"
attType=
"Image"
rwType=
"READ"
displayLevel=
"OPERATOR"
polledPeriod=
"0"
maxX=
"96"
maxY=
"96"
allocReadMember=
"true"
isDynamic=
"false"
>
<dataType
xsi:type=
"pogoDsl:DoubleType"
/>
...
...
@@ -118,6 +136,9 @@
<dataReadyEvent
fire=
"false"
libCheckCriteria=
"true"
/>
<status
abstract=
"false"
inherited=
"false"
concrete=
"true"
concreteHere=
"true"
/>
<properties
description=
""
label=
""
unit=
""
standardUnit=
""
displayUnit=
""
format=
""
maxValue=
""
minValue=
""
maxAlarm=
""
minAlarm=
""
maxWarning=
""
minWarning=
""
deltaTime=
""
deltaValue=
""
/>
<readExcludedStates>
ON
</readExcludedStates>
<readExcludedStates>
OFF
</readExcludedStates>
<readExcludedStates>
INIT
</readExcludedStates>
</attributes>
<attributes
name=
"visibilities_real"
attType=
"Image"
rwType=
"READ"
displayLevel=
"OPERATOR"
polledPeriod=
"0"
maxX=
"96"
maxY=
"96"
allocReadMember=
"true"
isDynamic=
"false"
>
<dataType
xsi:type=
"pogoDsl:DoubleType"
/>
...
...
@@ -126,7 +147,25 @@
<dataReadyEvent
fire=
"false"
libCheckCriteria=
"true"
/>
<status
abstract=
"false"
inherited=
"false"
concrete=
"true"
concreteHere=
"true"
/>
<properties
description=
""
label=
""
unit=
""
standardUnit=
""
displayUnit=
""
format=
""
maxValue=
""
minValue=
""
maxAlarm=
""
minAlarm=
""
maxWarning=
""
minWarning=
""
deltaTime=
""
deltaValue=
""
/>
<readExcludedStates>
ON
</readExcludedStates>
<readExcludedStates>
OFF
</readExcludedStates>
<readExcludedStates>
INIT
</readExcludedStates>
</attributes>
<states
name=
"ON"
description=
""
>
<status
abstract=
"false"
inherited=
"false"
concrete=
"true"
concreteHere=
"true"
/>
</states>
<states
name=
"OFF"
description=
""
>
<status
abstract=
"false"
inherited=
"false"
concrete=
"true"
concreteHere=
"true"
/>
</states>
<states
name=
"STANDBY"
description=
""
>
<status
abstract=
"false"
inherited=
"false"
concrete=
"true"
concreteHere=
"true"
/>
</states>
<states
name=
"INIT"
description=
""
>
<status
abstract=
"false"
inherited=
"false"
concrete=
"true"
concreteHere=
"true"
/>
</states>
<states
name=
"RUNNING"
description=
""
>
<status
abstract=
"false"
inherited=
"false"
concrete=
"true"
concreteHere=
"true"
/>
</states>
<preferences
docHome=
"./doc_html"
makefileHome=
"/usr/local/share/pogo/preferences"
/>
</classes>
</pogoDsl:PogoSystem>
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