- prepared vdmc for demo

This commit is contained in:
koennecke
2008-03-10 11:06:26 +00:00
parent f512f47b02
commit 7d2b0c5104
5 changed files with 23 additions and 7 deletions

View File

@ -1,3 +1,3 @@
225 227
NEVER, EVER modify or delete this file NEVER, EVER modify or delete this file
You'll risk eternal damnation and a reincarnation as a cockroach!|n You'll risk eternal damnation and a reincarnation as a cockroach!|n

View File

@ -76,6 +76,7 @@ proc treatcscan {scanpath command out} {
#---------------------------------------------------------------- #----------------------------------------------------------------
proc translateCommand {command out} { proc translateCommand {command out} {
set drivelist [list drive dr run] set drivelist [list drive dr run]
set textList [list for while source if]
# clientput "Translating: $command" # clientput "Translating: $command"
set command [string trim $command] set command [string trim $command]
if {[string length $command] < 2} { if {[string length $command] < 2} {
@ -85,16 +86,30 @@ proc translateCommand {command out} {
set obj [string trim [lindex $l 0]] set obj [string trim [lindex $l 0]]
#------- check for drive commands #------- check for drive commands
set idx [lsearch $drivelist $obj] set idx [lsearch $drivelist $obj]
if {$idx > 0} { if {$idx >= 0} {
set dev [lindex $l 1] set dev [lindex $l 1]
set path [searchPathForDrivable $dev] set path [searchPathForDrivable $dev]
if {[string compare $path NONE] != 0} { if {[string compare $path NONE] != 0} {
set realTxt [hgetprop $path sicsdev]
set realL [split $realTxt =]
set realDev [lindex $realL 1]
set mapList [list $dev $realDev]
set newCom [string map $mapList $command]
puts $out "\#NODE: $path" puts $out "\#NODE: $path"
puts $out "clientput BatchPos = 1" puts $out "clientput BatchPos = 1"
puts $out $command puts $out $newCom
return return
} }
} }
#------ check for well known broken commands
set idx [lsearch $textList $obj]
if {$idx >= 0} {
puts $out "\#NODE: /batch/commandtext"
puts $out "clientput BatchPos = 1"
set buffer [string map {\n @nl@} $command]
puts $out "hset /batch/commandtext $buffer"
return
}
#--------- check for simple commands #--------- check for simple commands
set path [searchForCommand $command] set path [searchForCommand $command]
if {[string compare $path NONE] != 0} { if {[string compare $path NONE] != 0} {

View File

@ -357,7 +357,7 @@ proc makeQuickPar {name path} {
} }
hmake /quickview spy none hmake /quickview spy none
makeQuickPar title /instrument/title makeQuickPar title /instrument/experiment/title
makeQuickPar sample /instrument/sample/name makeQuickPar sample /instrument/sample/name
makeQuickPar lambda /instrument/monochromator/wavelength makeQuickPar lambda /instrument/monochromator/wavelength
makeQuickPar two-theta /instrument/detector/two_theta makeQuickPar two-theta /instrument/detector/two_theta

View File

@ -22,6 +22,7 @@ if { [info exists vdmcinit] == 0 } {
Publish hdbprepare User Publish hdbprepare User
Publish hdbcollect User Publish hdbcollect User
Publish mgbatch Spy Publish mgbatch Spy
Publish loadmgbatch Spy
Publish listbatchfiles Spy Publish listbatchfiles Spy
} }
source $home/log.tcl source $home/log.tcl

View File

@ -1,4 +1,4 @@
exe batchpath ./ exe batchpath tmp
exe syspath ./ exe syspath ./
#--- BEGIN (commands producing errors on last restore) #--- BEGIN (commands producing errors on last restore)
@ -257,7 +257,7 @@ comment2 UNKNOWN
comment2 setAccess 2 comment2 setAccess 2
comment3 UNKNOWN comment3 UNKNOWN
comment3 setAccess 2 comment3 setAccess 2
starttime 2008-03-03 11:10:28 starttime 2008-03-07 15:24:52
starttime setAccess 2 starttime setAccess 2
adress 2223 Luketown, 33 Luke Drive adress 2223 Luketown, 33 Luke Drive
adress setAccess 2 adress setAccess 2
@ -269,7 +269,7 @@ email Luke@luke.ch
email setAccess 2 email setAccess 2
sample_mur 0.000000 sample_mur 0.000000
sample_mur setAccess 2 sample_mur setAccess 2
lastdatafile /afs/psi.ch/user/k/koennecke/src/workspace/sics/mcstas/dmc/000/vdmc2008n000225.xml lastdatafile /afs/psi.ch/user/k/koennecke/src/workspace/sics/mcstas/dmc/000/vdmc2008n000226.xml
lastdatafile setAccess 2 lastdatafile setAccess 2
lastscancommand unknown scan lastscancommand unknown scan
lastscancommand setAccess 2 lastscancommand setAccess 2