Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
FofbTool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
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
DG
FOFB
FofbTool
Commits
ef3bfad3
Commit
ef3bfad3
authored
7 months ago
by
BRONES Romain
Browse files
Options
Downloads
Patches
Plain Diff
Add sync command
* For now it times out
parent
9350cb27
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
DG_PY_FOFBTool/DG_PY_FOFBTool.py
+34
-0
34 additions, 0 deletions
DG_PY_FOFBTool/DG_PY_FOFBTool.py
DG_PY_FOFBTool/DG_PY_FOFBTool.xmi
+17
-0
17 additions, 0 deletions
DG_PY_FOFBTool/DG_PY_FOFBTool.xmi
with
51 additions
and
0 deletions
DG_PY_FOFBTool/DG_PY_FOFBTool.py
+
34
−
0
View file @
ef3bfad3
...
...
@@ -22,6 +22,7 @@ from tango import AttrQuality, DispLevel, DevState
from
tango
import
AttrWriteType
,
PipeWriteType
# Additional import
#----- PROTECTED REGION ID(DG_PY_FOFBTool.additionnal_import) ENABLED START -----#
import
FofbTool
import
FofbTool.Operation
import
FofbTool.Configuration
import
logging
...
...
@@ -146,6 +147,10 @@ class DG_PY_FOFBTool(Device):
access
=
AttrWriteType
.
READ_WRITE
,
)
FofbToolVersion
=
attribute
(
dtype
=
'
DevString
'
,
)
# ---------------
# General methods
# ---------------
...
...
@@ -155,6 +160,8 @@ class DG_PY_FOFBTool(Device):
Device
.
init_device
(
self
)
#----- PROTECTED REGION ID(DG_PY_FOFBTool.init_device) ENABLED START -----#
self
.
info_stream
(
"
FofbTool {}
"
.
format
(
FofbTool
.
__version__
))
logger
=
logging
.
getLogger
(
"
FofbTool
"
)
try
:
fh
=
logging
.
FileHandler
(
self
.
logfilepath
)
...
...
@@ -200,6 +207,12 @@ class DG_PY_FOFBTool(Device):
pass
# PROTECTED REGION END # // DG_PY_FOFBTool.includeLBP_write
def
read_FofbToolVersion
(
self
):
# PROTECTED REGION ID(DG_PY_FOFBTool.FofbToolVersion_read) ENABLED START #
"""
Return the FofbToolVersion attribute.
"""
return
FofbTool
.
__version__
# PROTECTED REGION END # // DG_PY_FOFBTool.FofbToolVersion_read
# --------
# Commands
# --------
...
...
@@ -277,6 +290,27 @@ class DG_PY_FOFBTool(Device):
pass
# PROTECTED REGION END # // DG_PY_FOFBTool.start
@command
(
)
@DebugIt
()
def
sync
(
self
):
# PROTECTED REGION ID(DG_PY_FOFBTool.sync) ENABLED START #
"""
:return:None
"""
db
=
tango
.
Database
()
self
.
debug_stream
(
"
Building list form FREE PROPERTIES
"
)
bpmidlist
=
[(
int
(
n
.
split
(
'
:
'
)[
0
]),
n
.
split
(
'
:
'
)[
2
])
for
n
in
db
.
get_property
(
"
FOFB
"
,
"
bpmlist
"
)[
'
bpmlist
'
]
if
'
LIBERA
'
in
n
]
tlocal
=
[
n
.
split
(
'
:
'
)[
2
]
for
n
in
db
.
get_property
(
"
FOFB
"
,
'
TimingBoardList
'
)[
'
TimingBoardList
'
]
if
"
LOCAL
"
in
n
]
lbpevrx
=
db
.
get_property
(
"
FOFB
"
,
'
LBPEVRX
'
)[
'
LBPEVRX
'
]
# This will timeout
FofbTool
.
Operation
.
sync_bpm
(
bpmidlist
,
lbpevrx
,
tlocal
,
self
.
tangopath_centraltiming
)
# PROTECTED REGION END # // DG_PY_FOFBTool.sync
# ----------
# Run server
# ----------
...
...
This diff is collapsed.
Click to expand it.
DG_PY_FOFBTool/DG_PY_FOFBTool.xmi
+
17
−
0
View file @
ef3bfad3
...
...
@@ -90,6 +90,15 @@
</argout>
<status
abstract=
"false"
inherited=
"false"
concrete=
"true"
concreteHere=
"true"
/>
</commands>
<commands
name=
"sync"
description=
""
execMethod=
"sync"
displayLevel=
"OPERATOR"
polledPeriod=
"0"
isDynamic=
"false"
>
<argin
description=
""
>
<type
xsi:type=
"pogoDsl:VoidType"
/>
</argin>
<argout
description=
""
>
<type
xsi:type=
"pogoDsl:VoidType"
/>
</argout>
<status
abstract=
"false"
inherited=
"false"
concrete=
"true"
concreteHere=
"true"
/>
</commands>
<attributes
name=
"includeLBP"
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"
/>
...
...
@@ -98,6 +107,14 @@
<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=
"FofbToolVersion"
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>
<preferences
docHome=
"../doc/doc_html"
makefileHome=
"$(TANGO_HOME)"
/>
</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