Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
smaract-mcs2
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cs
ds
smaract-mcs2
Commits
11277d66
Commit
11277d66
authored
4 years ago
by
Milan Prica
Browse files
Options
Downloads
Patches
Plain Diff
Modificiations to read/write permissions of a few attributes.
parent
b2a72c06
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/Smaract_mcs2.py
+7
-7
7 additions, 7 deletions
src/Smaract_mcs2.py
with
7 additions
and
7 deletions
src/Smaract_mcs2.py
+
7
−
7
View file @
11277d66
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
## along with Tango. If not, see <http://www.gnu.org/licenses/>.
## along with Tango. If not, see <http://www.gnu.org/licenses/>.
##
##
##
##
## $Author :
sci.comp@
elettra.eu
## $Author :
SPE - www.
elettra.eu
##
##
## $Revision : $
## $Revision : $
##
##
...
@@ -546,7 +546,7 @@ class Smaract_mcs2 (PyTango.Device_4Impl):
...
@@ -546,7 +546,7 @@ class Smaract_mcs2 (PyTango.Device_4Impl):
self
.
move_steps
(
data
-
self
.
attr_Position_read
)
self
.
move_steps
(
data
-
self
.
attr_Position_read
)
def
is_Position_allowed
(
self
,
req_type
):
def
is_Position_allowed
(
self
,
req_type
):
return
self
.
get_state
()
in
(
PyTango
.
DevState
.
ON
,
PyTango
.
DevState
.
MOVING
,)
return
self
.
get_state
()
in
(
PyTango
.
DevState
.
ON
,
PyTango
.
DevState
.
MOVING
,)
def
read_Acceleration
(
self
,
attr
):
def
read_Acceleration
(
self
,
attr
):
...
@@ -574,7 +574,7 @@ class Smaract_mcs2 (PyTango.Device_4Impl):
...
@@ -574,7 +574,7 @@ class Smaract_mcs2 (PyTango.Device_4Impl):
self
.
socket_write
(
cmd_str
)
self
.
socket_write
(
cmd_str
)
def
is_Acceleration_allowed
(
self
,
req_type
):
def
is_Acceleration_allowed
(
self
,
req_type
):
return
req_type
is
PyTango
.
AttReqType
.
READ_REQ
or
(
self
.
get_state
()
in
(
PyTango
.
DevState
.
ON
,
)
and
self
.
sensor_present
)
return
req_type
is
PyTango
.
AttReqType
.
READ_REQ
or
(
self
.
get_state
()
not
in
(
PyTango
.
DevState
.
MOVING
,
)
and
self
.
sensor_present
)
def
read_Velocity
(
self
,
attr
):
def
read_Velocity
(
self
,
attr
):
# self.debug_stream("In read_Velocity()")
# self.debug_stream("In read_Velocity()")
...
@@ -600,7 +600,7 @@ class Smaract_mcs2 (PyTango.Device_4Impl):
...
@@ -600,7 +600,7 @@ class Smaract_mcs2 (PyTango.Device_4Impl):
self
.
socket_write
(
cmd_str
)
self
.
socket_write
(
cmd_str
)
def
is_Velocity_allowed
(
self
,
req_type
):
def
is_Velocity_allowed
(
self
,
req_type
):
return
req_type
is
PyTango
.
AttReqType
.
READ_REQ
or
(
self
.
get_state
()
in
(
PyTango
.
DevState
.
ON
,
)
and
self
.
sensor_present
)
return
req_type
is
PyTango
.
AttReqType
.
READ_REQ
or
(
self
.
get_state
()
not
in
(
PyTango
.
DevState
.
MOVING
,
)
and
self
.
sensor_present
)
def
read_HoldTime
(
self
,
attr
):
def
read_HoldTime
(
self
,
attr
):
# self.debug_stream("In read_HoldTime()")
# self.debug_stream("In read_HoldTime()")
...
@@ -678,7 +678,7 @@ class Smaract_mcs2 (PyTango.Device_4Impl):
...
@@ -678,7 +678,7 @@ class Smaract_mcs2 (PyTango.Device_4Impl):
self
.
socket_write
(
cmd_str
)
self
.
socket_write
(
cmd_str
)
def
is_LSOffset_allowed
(
self
,
req_type
):
def
is_LSOffset_allowed
(
self
,
req_type
):
return
req_type
is
PyTango
.
AttReqType
.
READ_REQ
or
(
self
.
get_state
()
in
(
PyTango
.
DevState
.
ON
,
)
and
self
.
sensor_present
)
return
req_type
is
PyTango
.
AttReqType
.
READ_REQ
or
(
self
.
get_state
()
not
in
(
PyTango
.
DevState
.
MOVING
,
)
and
self
.
sensor_present
)
def
read_HighLimitPosition
(
self
,
attr
):
def
read_HighLimitPosition
(
self
,
attr
):
# self.debug_stream("In read_HighLimitPosition()")
# self.debug_stream("In read_HighLimitPosition()")
...
@@ -702,7 +702,7 @@ class Smaract_mcs2 (PyTango.Device_4Impl):
...
@@ -702,7 +702,7 @@ class Smaract_mcs2 (PyTango.Device_4Impl):
self
.
socket_write
(
cmd_str
)
self
.
socket_write
(
cmd_str
)
def
is_HighLimitPosition_allowed
(
self
,
req_type
):
def
is_HighLimitPosition_allowed
(
self
,
req_type
):
return
req_type
is
PyTango
.
AttReqType
.
READ_REQ
or
(
self
.
get_state
()
in
(
PyTango
.
DevState
.
ON
,
PyTango
.
DevState
.
ALARM
,
)
and
self
.
sensor_present
)
return
req_type
is
PyTango
.
AttReqType
.
READ_REQ
or
(
self
.
get_state
()
not
in
(
PyTango
.
DevState
.
MOVING
,
)
and
self
.
sensor_present
)
def
read_LowLimitPosition
(
self
,
attr
):
def
read_LowLimitPosition
(
self
,
attr
):
# self.debug_stream("In read_LowLimitPosition()")
# self.debug_stream("In read_LowLimitPosition()")
...
@@ -726,7 +726,7 @@ class Smaract_mcs2 (PyTango.Device_4Impl):
...
@@ -726,7 +726,7 @@ class Smaract_mcs2 (PyTango.Device_4Impl):
self
.
socket_write
(
cmd_str
)
self
.
socket_write
(
cmd_str
)
def
is_LowLimitPosition_allowed
(
self
,
req_type
):
def
is_LowLimitPosition_allowed
(
self
,
req_type
):
return
req_type
is
PyTango
.
AttReqType
.
READ_REQ
or
(
self
.
get_state
()
in
(
PyTango
.
DevState
.
ON
,
PyTango
.
DevState
.
ALARM
,
)
and
self
.
sensor_present
)
return
req_type
is
PyTango
.
AttReqType
.
READ_REQ
or
(
self
.
get_state
()
not
in
(
PyTango
.
DevState
.
MOVING
,
)
and
self
.
sensor_present
)
def
read_Amplitude
(
self
,
attr
):
def
read_Amplitude
(
self
,
attr
):
# self.debug_stream("In read_Amplitude()")
# self.debug_stream("In read_Amplitude()")
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
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