fix bug in cummunication with seaman

do not use quotes around args in "seaman / arg1 arg2"
This commit is contained in:
l_samenv
2023-05-26 11:12:25 +02:00
parent 82db8ffbd0
commit 78aa990f71
5 changed files with 29 additions and 14 deletions

View File

@ -177,7 +177,7 @@ proc hepump::read {} {
sct health_cnt [expr [sct health_cnt] + 1] sct health_cnt [expr [sct health_cnt] + 1]
if {[sct health_cnt] == 10} { if {[sct health_cnt] == 10} {
if {$health > 100} {set health 100} if {$health > 100} {set health 100}
catch {prep0 / "pump_health_update [result instrument] [format %.0f $health]"} msg catch {prep0 / pump_health_update [result instrument] [format %.0f $health]} msg
} }
} }
} else { } else {

View File

@ -10,7 +10,7 @@ makenv tt -driver [lsdriver] {
} }
tt set/limit 310 tt set/limit 310
makeCCU4 ori7 nv n2 he makeCCU4 ori7 nv n2 he
hupdate /nv/set 1.6 hupdate /nv/set 0.6
nv ctrl/prop_o 0.05 nv ctrl/prop_o 0.05
nv ctrl/prop_c 0.03 nv ctrl/prop_c 0.03

View File

@ -292,7 +292,7 @@ proc book_this {caller args} {
} }
} }
foreach instr [array names ilist] { foreach instr [array names ilist] {
$instr / "disconnect_from $caller $ilist($instr)" $instr / disconnect_from $caller $ilist($instr)
} }
} }
@ -306,7 +306,7 @@ proc book_confirm {caller args} {
busy_list_add $item $caller busy_list_add $item $caller
lappend rlist [list $item $caller [silent "" result device_list $caller]] lappend rlist [list $item $caller [silent "" result device_list $caller]]
} }
$caller / "reconnect_or_set_busy $rlist" $caller / reconnect_or_set_busy $rlist
} }
proc show_item {item} { proc show_item {item} {
@ -343,7 +343,7 @@ proc show {{key ""}} {
} }
lappend table($ins) $item lappend table($ins) $item
} }
set result "Instrument Device Connections Requests\n" set result "Instrument Device Connections Requests\n"
append result "----------------------------------------------------------------------\n" append result "----------------------------------------------------------------------\n"
foreach instr [lsort [array names table]] { foreach instr [lsort [array names table]] {
@ -394,6 +394,8 @@ namespace eval inst_select {
clientput "REORDER web_ports" clientput "REORDER web_ports"
set home /home/l_samenv
foreach itm [web_ports items] { foreach itm [web_ports items] {
web_ports deleteitem $itm web_ports deleteitem $itm
} }
@ -462,6 +464,17 @@ proc mainGroup {} {
Group ports "ports" Group ports "ports"
} }
proc refresh {} {
foreach instr [instr_list items] {
clientlog "$instr"
catch {
$instr / save_samenv
} msg
clientput $msg
}
}
publish book_this User publish book_this User
publish book_request User publish book_request User
publish book_confirm User publish book_confirm User
@ -479,3 +492,4 @@ publish rack_not_available_for Spy
publish free_instruments Spy publish free_instruments Spy
publish move_rack_to Spy publish move_rack_to Spy
publish refresh Spy

View File

@ -26,9 +26,9 @@ proc helium_update {p instrument label value} {
# Usage example: _lev updatescript /lev "helium_update prep0v dmc dmc_vessel" # Usage example: _lev updatescript /lev "helium_update prep0v dmc dmc_vessel"
catch { catch {
if {[silent "" sct geterror] eq ""} { if {[silent "" sct geterror] eq ""} {
$p / "helium_instr_update $instrument $label $value" $p / helium_instr_update $instrument $label $value
} else { } else {
$p / "helium_instr_update $instrument $label none" $p / helium_instr_update $instrument $label none
} }
} }
} }

View File

@ -116,7 +116,7 @@ proc disconnect_from {caller args} {
} }
if {[llength $confirm] != 0} { if {[llength $confirm] != 0} {
if {$caller ne "0"} { if {$caller ne "0"} {
seaman / "book_confirm $caller $confirm" seaman / book_confirm $caller $confirm
} }
} }
if {$answer eq ""} { if {$answer eq ""} {
@ -133,7 +133,8 @@ proc save_samenv {{dev ""}} {
if {$dev eq ""} { if {$dev eq ""} {
set dev [samenv name] set dev [samenv name]
} }
seaman / "samenv_list makeitem [result instrument] $dev" seaman / samenv_list makeitem [result instrument] $dev
seaman / rack_list makeitem [rack] [result instrument]
} }
publishLazy save_samenv publishLazy save_samenv
@ -169,7 +170,7 @@ proc request_items {device} {
lappend items $hostport lappend items $hostport
} }
} }
seaman / "book_request [result instrument] [info hostname]:$serverport $device $items" seaman / book_request [result instrument] [info hostname]:$serverport $device $items
set ts_status "Checking serial connections ..." set ts_status "Checking serial connections ..."
} }
@ -199,7 +200,7 @@ proc reconnect_object {obj {value 0}} {
} }
} }
if {[is_mobile_port $hostport]} { if {[is_mobile_port $hostport]} {
seaman / "book_request [result instrument] [info hostname]:$serverport PARTIAL $hostport" seaman / book_request [result instrument] [info hostname]:$serverport PARTIAL $hostport
set ts_status "Checking serial connection ..." set ts_status "Checking serial connection ..."
} }
} }
@ -249,14 +250,14 @@ proc remote_disconnect {args} {
foreach {item instr} $args { foreach {item instr} $args {
set disconnect_time($item) [DoubleTime] set disconnect_time($item) [DoubleTime]
} }
seaman / "book_this [result instrument] $args" seaman / book_this [result instrument] $args
} }
proc forced_disconnect {item {value 0}} { proc forced_disconnect {item {value 0}} {
global disconnect_time global disconnect_time
if {$value} { if {$value} {
catch {unset disconnect_time($item)} catch {unset disconnect_time($item)}
seaman / "book_confirm [result instrument] $item" seaman / book_confirm [result instrument] $item
} else { } else {
return 0 return 0
} }
@ -264,7 +265,7 @@ proc forced_disconnect {item {value 0}} {
proc remote_device_none {instrument {value 0}} { proc remote_device_none {instrument {value 0}} {
global disconnect_time global disconnect_time
seaman / "device_none_on $instrument" seaman / device_none_on $instrument
set disconnect_time(0) [DoubleTime] set disconnect_time(0) [DoubleTime]
} }