Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
bliss
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
523
Issues
523
List
Boards
Labels
Service Desk
Milestones
Jira
Jira
Merge Requests
123
Merge Requests
123
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Bliss
bliss
Commits
b6f354bf
Commit
b6f354bf
authored
Feb 10, 2020
by
Wout De Nolf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[writer] improve Nexus exceptions on the BLISS side
parent
60ac920a
Pipeline
#21186
failed with stages
in 39 minutes and 7 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
26 deletions
+10
-26
bliss/scanning/writer/nexus.py
bliss/scanning/writer/nexus.py
+9
-9
nexus_writer_service/tango/servers/NexusWriter.py
nexus_writer_service/tango/servers/NexusWriter.py
+1
-9
nexus_writer_service/tango/servers/NexusWriter.xmi
nexus_writer_service/tango/servers/NexusWriter.xmi
+0
-8
No files found.
bliss/scanning/writer/nexus.py
View file @
b6f354bf
...
...
@@ -255,7 +255,7 @@ class Writer(FileWriter):
@
property
def
session_state_reason
(
self
):
proxy
=
self
.
writer_proxy
return
proxy
.
stat
e_reason
return
proxy
.
stat
us
@
property
def
scan_state
(
self
):
...
...
@@ -279,7 +279,7 @@ class Writer(FileWriter):
# @skip_when_fault
@
mark_fault_on_exception
@
retry_session_method
(
err_msg
=
"Nexus writer
service
is not ON or RUNNING"
)
@
retry_session_method
(
err_msg
=
"Nexus writer is not ON or RUNNING"
)
def
session_writer_on
(
self
):
"""
:returns bool: state is valid and expected
...
...
@@ -300,7 +300,7 @@ class Writer(FileWriter):
@
skip_when_fault
@
mark_fault_on_exception
@
retry_scan_method
(
err_msg
=
"
Data
writer has not finished"
)
@
retry_scan_method
(
err_msg
=
"
Nexus
writer has not finished"
)
def
scan_writer_finished
(
self
):
"""
:returns bool: state is valid and expected
...
...
@@ -312,14 +312,14 @@ class Writer(FileWriter):
elif
state
==
DevState
.
FAULT
:
reason
=
self
.
scan_state_reason
raise
RuntimeError
(
"
Data
writer is in FAULT state due to {}"
.
format
(
repr
(
reason
))
"
Nexus
writer is in FAULT state due to {}"
.
format
(
repr
(
reason
))
)
else
:
return
False
# @skip_when_fault
@
mark_fault_on_exception
@
retry_scan_method
(
err_msg
=
"
Data
writer is not in valid state"
)
@
retry_scan_method
(
err_msg
=
"
Nexus
writer is not in valid state"
)
def
valid_scan_writer
(
self
):
"""
:returns bool: state is valid and expected
...
...
@@ -329,26 +329,26 @@ class Writer(FileWriter):
if
state
==
DevState
.
FAULT
:
reason
=
self
.
scan_state_reason
raise
RuntimeError
(
"
Data
writer is in FAULT state due to {}"
.
format
(
repr
(
reason
))
"
Nexus
writer is in FAULT state due to {}"
.
format
(
repr
(
reason
))
)
else
:
return
True
# @skip_when_fault
@
mark_fault_on_exception
@
retry_scan_method
(
err_msg
=
"
Data
writer does not have write permissions"
)
@
retry_scan_method
(
err_msg
=
"
Nexus
writer does not have write permissions"
)
def
scan_permitted
(
self
):
"""
:returns bool: writer can write
:raises RuntimeError: invalid state
"""
if
not
self
.
_scan_permitted
:
raise
RuntimeError
(
"
Data
writer does not have write permissions"
)
raise
RuntimeError
(
"
Nexus
writer does not have write permissions"
)
return
True
# @skip_when_fault
@
mark_fault_on_exception
@
retry_scan_method
(
err_msg
=
"
Data writer is created
"
)
@
retry_scan_method
(
err_msg
=
"
Nexus writer did not receive the start-scan event
"
)
def
scan_exists
(
self
):
"""
:returns bool: writer exists
...
...
nexus_writer_service/tango/servers/NexusWriter.py
View file @
b6f354bf
...
...
@@ -181,8 +181,6 @@ class NexusWriter(Device):
# Attributes
# ----------
state_reason
=
attribute
(
dtype
=
"DevString"
)
resource_profiling
=
attribute
(
dtype
=
"DevBoolean"
,
access
=
AttrWriteType
.
READ_WRITE
)
scan_states
=
attribute
(
dtype
=
(
"DevState"
,),
max_dim_x
=
10000
)
...
...
@@ -244,12 +242,6 @@ class NexusWriter(Device):
# Attributes methods
# ------------------
def
read_state_reason
(
self
):
# PROTECTED REGION ID(NexusWriter.state_reason_read) ENABLED START #
"""Return the state_reason attribute."""
return
self
.
session_writer
.
state_reason
# PROTECTED REGION END # // NexusWriter.state_reason_read
def
read_resource_profiling
(
self
):
# PROTECTED REGION ID(NexusWriter.resource_profiling_read) ENABLED START #
"""Return the resource_profiling attribute."""
...
...
@@ -366,7 +358,7 @@ class NexusWriter(Device):
:return:'ConstDevString'
Device status
"""
return
self
.
dev_state
().
name
return
self
.
session_writer
.
state_reason
# PROTECTED REGION END # // NexusWriter.Status
@
command
(
dtype_in
=
"DevString"
,
doc_in
=
"scan"
,
dtype_out
=
"DevState"
)
...
...
nexus_writer_service/tango/servers/NexusWriter.xmi
View file @
b6f354bf
...
...
@@ -161,14 +161,6 @@
</argout>
<status
abstract=
"false"
inherited=
"false"
concrete=
"true"
concreteHere=
"true"
/>
</commands>
<attributes
name=
"state_reason"
attType=
"Scalar"
rwType=
"READ"
displayLevel=
"OPERATOR"
polledPeriod=
"0"
maxX=
""
maxY=
""
allocReadMember=
"true"
isDynamic=
"false"
>
<dataType
xsi:type=
"pogoDsl:StringType"
/>
<changeEvent
fire=
"false"
libCheckCriteria=
"false"
/>
<archiveEvent
fire=
"false"
libCheckCriteria=
"false"
/>
<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=
""
/>
</attributes>
<attributes
name=
"resource_profiling"
attType=
"Scalar"
rwType=
"READ_WRITE"
displayLevel=
"OPERATOR"
polledPeriod=
"0"
maxX=
""
maxY=
""
allocReadMember=
"true"
isDynamic=
"false"
>
<dataType
xsi:type=
"pogoDsl:BooleanType"
/>
<changeEvent
fire=
"false"
libCheckCriteria=
"false"
/>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment