Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Bliss
bliss
Commits
6ff236a2
Commit
6ff236a2
authored
Jul 15, 2021
by
Cyril Guilloud
Committed by
Cyril Guilloud
Jul 15, 2021
Browse files
improve __info__ for pepu object. (+ remove dead-code )
parent
af0c9a30
Changes
3
Hide whitespace changes
Inline
Side-by-side
bliss/comm/tcp.py
View file @
6ff236a2
...
...
@@ -476,7 +476,7 @@ class Command:
return
f
"
{
self
.
__class__
.
__name__
}
[
{
self
.
_host
}
:
{
self
.
_port
}
]"
def
__info__
(
self
):
info_str
=
"TCP COMMAND: host={self._host} port={self._port}
\n
"
info_str
=
f
"TCP COMMAND: host=
{
self
.
_host
}
port=
{
self
.
_port
}
\n
"
return
info_str
@
property
...
...
bliss/controllers/motors/icepap/comm.py
View file @
6ff236a2
...
...
@@ -82,10 +82,10 @@ def _command(cnx, cmd, data=None, pre_cmd=None, timeout=None):
if
ioex
.
errno
==
113
:
_msg
=
f
"IOError no
{
ioex
.
errno
}
:
{
errno
.
errorcode
[
ioex
.
errno
]
}
"
_msg
+=
f
"
\n
message=
{
os
.
strerror
(
ioex
.
errno
)
}
"
_msg
+=
f
"
\n
Please check that
icepap
controller '
{
cnx
.
_host
}
' is ON"
_msg
+=
f
"
\n
Please check that controller '
{
cnx
.
_host
}
' is ON"
else
:
_msg
=
f
"IOError no
{
ioex
.
errno
}
:
{
ioex
.
strerror
}
"
_msg
+=
f
"
\n
Cannot communicate with
icepap
controller: '
{
cnx
.
_host
}
'"
_msg
+=
f
"
\n
Cannot communicate with controller: '
{
cnx
.
_host
}
'"
raise
CommunicationError
(
_msg
)
from
ioex
...
...
bliss/controllers/pepu.py
View file @
6ff236a2
...
...
@@ -17,7 +17,6 @@ import numpy
from
bliss.comm.util
import
get_comm
,
TCP
from
bliss.controllers.motors.icepap
import
_command
,
_ackcommand
from
bliss.controllers.counter
import
CounterController
from
bliss.common.counter
import
Counter
...
...
@@ -317,14 +316,6 @@ class BaseChannel(object):
def
pepu
(
self
):
return
self
.
_pepu
()
# Counter shortcut
@
property
def
counters
(
self
):
from
bliss.scanning.acquisition.pepu
import
PepuCounter
return
PepuCounter
(
self
)
class
BaseChannelINOUT
(
BaseChannel
):
...
...
@@ -685,7 +676,10 @@ class PEPU(CounterController):
return
self
.
raw_write_read
(
cmd
)
def
__info__
(
self
):
return
"{0}(name={1!r})"
.
format
(
type
(
self
).
__name__
,
self
.
name
)
info_str
=
f
"
{
type
(
self
).
__name__
}
(name=
{
self
.
name
}
)
\n
"
info_str
+=
f
"
{
self
.
conn
.
__info__
()
}
\n
"
return
info_str
class
PepuCounter
(
Counter
):
...
...
Stuart Fisher
@sfisher
mentioned in merge request
!3829 (closed)
·
Jul 20, 2021
mentioned in merge request
!3829 (closed)
mentioned in merge request !3829
Toggle commit list
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