New sicsconfig.ini file configuration editor.
Updated wombat sics_config.ini and gen_sct.py Generated new tcl files from sct templates and modified some old sct_*.tcl drivers. TODO sct_keithley_2700.tcl magneticField/sct_oxford_labview.tcl magneticField/sct_bruker_BEC1.tcl temperature/sct_watlow_st4.tcl temperature/sct_oxford_mercury.tcl temperature/sct_mercury_pres.tcl temperature/sct_julabo_lh45.tcl temperature/sct_lakeshore_340.tcl temperature/sct_julabo_lh45_gen.tcl temperature/sct_watlow_rm.tcl temperature/sct_eurotherm_2000.tcl temperature/sct_lakeshore_336.tcl temperature/sct_watlow_pm.tcl temperature/sct_oxford_itc.tcl temperature/sct_lakeshore_370.tcl temperature/west400.tcl
This commit is contained in:
@@ -495,7 +495,7 @@ publish OxfordSetHTemp user
|
||||
publish OxfordSetDTemp user
|
||||
publish OxfordSetHS user
|
||||
|
||||
proc add_oxmag { name IP PORT {interval 5} } {
|
||||
proc add_oxford_labview { name IP PORT {interval 5} } {
|
||||
::scobj::magnetic::mkMagnetic [subst {
|
||||
name $name
|
||||
IP $IP
|
||||
@@ -504,11 +504,83 @@ proc add_oxmag { name IP PORT {interval 5} } {
|
||||
interval $interval
|
||||
}]
|
||||
}
|
||||
|
||||
if { [ info exists ::config_dict ] && [ dict get $::config_dict 12tmagnet enabled ] } {
|
||||
set IP [dict get $::config_dict 12tmagnet ip]
|
||||
set PORT [dict get $::config_dict 12tmagnet port]
|
||||
set NAME [dict get $::config_dict 12tmagnet name]
|
||||
puts "MAGNET: add_oxmag $NAME $IP $PORT"
|
||||
add_oxmag $NAME $IP $PORT
|
||||
# NEW START
|
||||
namespace eval ::scobj::oxford_labview {
|
||||
set debug_threshold 5
|
||||
}
|
||||
proc ::scobj::oxford_labview::sics_log {debug_level debug_string} {
|
||||
set catch_status [ catch {
|
||||
set debug_threshold ${::scobj::oxford_labview::debug_threshold}
|
||||
if {${debug_level} >= ${debug_threshold}} {
|
||||
sicslog "::scobj::oxford_labview::${debug_string}"
|
||||
}
|
||||
} catch_message ]
|
||||
}
|
||||
proc ::scobj::oxford_labview::read_config {} {
|
||||
set catch_status [ catch {
|
||||
set ns "::scobj::oxford_labview"
|
||||
dict for {k v} $::config_dict {
|
||||
if { [dict exists $v "implementation"] } {
|
||||
set name [dict get $v name]
|
||||
set enabled [string tolower [dict get $v "enabled"]]
|
||||
set implementation [dict get $v "implementation"]
|
||||
set v [dict get $::config_dict $implementation]
|
||||
if { [dict get $v "driver"] == "oxford_labview" } {
|
||||
if { $enabled == "true" || $enabled == "always" } {
|
||||
if { ![string equal -nocase [SplitReply [environment_simulation]] "false"] } {
|
||||
set asyncqueue "null"
|
||||
${ns}::sics_log 9 "[environment_simulation] => using null asyncqueue"
|
||||
} elseif { [dict exists $v "asyncqueue"] } {
|
||||
set asyncqueue [dict get $v "asyncqueue"]
|
||||
} else {
|
||||
if { [dict exists $v "asyncprotocol"] } {
|
||||
set asyncprotocol [dict get $v "asyncprotocol"]
|
||||
} else {
|
||||
set asyncprotocol ${name}_protocol
|
||||
MakeAsyncProtocol ${asyncprotocol}
|
||||
if { [dict exists $v "terminator"] } {
|
||||
${asyncprotocol} sendterminator "[dict get $v "terminator"]"
|
||||
${asyncprotocol} replyterminator "[dict get $v "terminator"]"
|
||||
}
|
||||
}
|
||||
set asyncqueue ${name}_queue
|
||||
set IP [dict get $v ip]
|
||||
set PORT [dict get $v port]
|
||||
MakeAsyncQueue ${asyncqueue} ${asyncprotocol} ${IP} ${PORT}
|
||||
if { [dict exists $v "timeout"] } {
|
||||
${asyncqueue} timeout "[dict get $v "timeout"]"
|
||||
}
|
||||
}
|
||||
set arg_list [list]
|
||||
foreach arg {interval} {
|
||||
if {[dict exists $v $arg]} {
|
||||
lappend arg_list "[dict get $v $arg]"
|
||||
} else {
|
||||
${ns}::sics_log 9 "Missing configuration value $arg"
|
||||
error "Missing configuration value $arg"
|
||||
}
|
||||
}
|
||||
add_oxford_labview ${name} "aqadapter" ${asyncqueue} {*}$arg_list
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch_message ]
|
||||
handle_exception ${catch_status} ${catch_message}
|
||||
}
|
||||
|
||||
if { [info exists ::config_dict] } {
|
||||
::scobj::oxford_labview::read_config
|
||||
} else {
|
||||
::scobj::oxford_labview::sics_log 5 "No config dict"
|
||||
}
|
||||
# NEW END
|
||||
#OLD START
|
||||
# if { [ info exists ::config_dict ] && [ dict get $::config_dict 12tmagnet enabled ] } {
|
||||
# set IP [dict get $::config_dict 12tmagnet ip]
|
||||
# set PORT [dict get $::config_dict 12tmagnet port]
|
||||
# set NAME [dict get $::config_dict 12tmagnet name]
|
||||
# puts "MAGNET: add_oxmag $NAME $IP $PORT"
|
||||
# add_oxmag $NAME $IP $PORT
|
||||
# }
|
||||
#OLD END
|
||||
|
||||
@@ -1155,10 +1155,13 @@ proc ::scobj::hiden_xcs::read_config {} {
|
||||
set catch_status [ catch {
|
||||
set ns "::scobj::hiden_xcs"
|
||||
dict for {k v} $::config_dict {
|
||||
if { [dict exists $v "driver"] } {
|
||||
if { [dict exists $v "implementation"] } {
|
||||
set name [dict get $v name]
|
||||
set enabled [string tolower [dict get $v "enabled"]]
|
||||
set implementation [dict get $v "implementation"]
|
||||
set v [dict get $::config_dict $implementation]
|
||||
if { [dict get $v "driver"] == "hiden_xcs" } {
|
||||
if { [dict get $v enabled] } {
|
||||
set name [dict get $v name]
|
||||
if { ![string equal -nocase [SplitReply [environment_simulation]] "false"] } {
|
||||
set asyncqueue "null"
|
||||
${ns}::sics_log 9 "[environment_simulation] => using null asyncqueue"
|
||||
|
||||
@@ -459,10 +459,13 @@ proc ::scobj::huber_pilot::read_config {} {
|
||||
set catch_status [ catch {
|
||||
set ns "::scobj::huber_pilot"
|
||||
dict for {k v} $::config_dict {
|
||||
if { [dict exists $v "driver"] } {
|
||||
if { [dict exists $v "implementation"] } {
|
||||
set name [dict get $v name]
|
||||
set enabled [string tolower [dict get $v "enabled"]]
|
||||
set implementation [dict get $v "implementation"]
|
||||
set v [dict get $::config_dict $implementation]
|
||||
if { [dict get $v "driver"] == "huber_pilot" } {
|
||||
if { [dict get $v enabled] } {
|
||||
set name [dict get $v name]
|
||||
if { ![string equal -nocase [SplitReply [environment_simulation]] "false"] } {
|
||||
set asyncqueue "null"
|
||||
${ns}::sics_log 9 "[environment_simulation] => using null asyncqueue"
|
||||
|
||||
@@ -346,10 +346,13 @@ proc ::scobj::isotech_ps::read_config {} {
|
||||
set catch_status [ catch {
|
||||
set ns "::scobj::isotech_ps"
|
||||
dict for {k v} $::config_dict {
|
||||
if { [dict exists $v "driver"] } {
|
||||
if { [dict exists $v "implementation"] } {
|
||||
set name [dict get $v name]
|
||||
set enabled [string tolower [dict get $v "enabled"]]
|
||||
set implementation [dict get $v "implementation"]
|
||||
set v [dict get $::config_dict $implementation]
|
||||
if { [dict get $v "driver"] == "isotech_ps" } {
|
||||
if { [dict get $v enabled] } {
|
||||
set name [dict get $v name]
|
||||
if { ![string equal -nocase [SplitReply [environment_simulation]] "false"] } {
|
||||
set asyncqueue "null"
|
||||
${ns}::sics_log 9 "[environment_simulation] => using null asyncqueue"
|
||||
|
||||
@@ -706,10 +706,13 @@ proc ::scobj::nhq_200::read_config {} {
|
||||
set catch_status [ catch {
|
||||
set ns "::scobj::nhq_200"
|
||||
dict for {k v} $::config_dict {
|
||||
if { [dict exists $v "driver"] } {
|
||||
if { [dict exists $v "implementation"] } {
|
||||
set name [dict get $v name]
|
||||
set enabled [string tolower [dict get $v "enabled"]]
|
||||
set implementation [dict get $v "implementation"]
|
||||
set v [dict get $::config_dict $implementation]
|
||||
if { [dict get $v "driver"] == "nhq_200" } {
|
||||
if { [dict get $v enabled] } {
|
||||
set name [dict get $v name]
|
||||
if { ![string equal -nocase [SplitReply [environment_simulation]] "false"] } {
|
||||
set asyncqueue "null"
|
||||
${ns}::sics_log 9 "[environment_simulation] => using null asyncqueue"
|
||||
|
||||
@@ -273,10 +273,13 @@ proc ::scobj::omron_hldc::read_config {} {
|
||||
set catch_status [ catch {
|
||||
set ns "::scobj::omron_hldc"
|
||||
dict for {k v} $::config_dict {
|
||||
if { [dict exists $v "driver"] } {
|
||||
if { [dict exists $v "implementation"] } {
|
||||
set name [dict get $v name]
|
||||
set enabled [string tolower [dict get $v "enabled"]]
|
||||
set implementation [dict get $v "implementation"]
|
||||
set v [dict get $::config_dict $implementation]
|
||||
if { [dict get $v "driver"] == "omron_hldc" } {
|
||||
if { [dict get $v enabled] } {
|
||||
set name [dict get $v name]
|
||||
if { ![string equal -nocase [SplitReply [environment_simulation]] "false"] } {
|
||||
set asyncqueue "null"
|
||||
${ns}::sics_log 9 "[environment_simulation] => using null asyncqueue"
|
||||
|
||||
@@ -339,10 +339,13 @@ proc ::scobj::lakeshore_218::read_config {} {
|
||||
set catch_status [ catch {
|
||||
set ns "::scobj::lakeshore_218"
|
||||
dict for {k v} $::config_dict {
|
||||
if { [dict exists $v "driver"] } {
|
||||
if { [dict exists $v "implementation"] } {
|
||||
set name [dict get $v name]
|
||||
set enabled [string tolower [dict get $v "enabled"]]
|
||||
set implementation [dict get $v "implementation"]
|
||||
set v [dict get $::config_dict $implementation]
|
||||
if { [dict get $v "driver"] == "lakeshore_218" } {
|
||||
if { [dict get $v enabled] } {
|
||||
set name [dict get $v name]
|
||||
if { ![string equal -nocase [SplitReply [environment_simulation]] "false"] } {
|
||||
set asyncqueue "null"
|
||||
${ns}::sics_log 9 "[environment_simulation] => using null asyncqueue"
|
||||
|
||||
@@ -1886,7 +1886,7 @@ proc createNode {scobj_hpath sct_controller cmdGroup varName readable writable p
|
||||
# @param port port number on the moxabox (typ. 4001, 4002, 4003, or 4004)
|
||||
# @param tol temperature tolerance in Kelvin (typ. 1)
|
||||
# @return nothing (well, the sct object)
|
||||
proc add_sct_ls336 {name IP port terminator {_tol1 1.0} {_tol2 1.0} {CID 1} {CTYPE T} {_verbose 0} } {
|
||||
proc add_lakeshore_336 {name IP port {terminator \r\n} {_tol1 1.0} {_tol2 1.0} {CID 1} {CTYPE T} {_verbose 0} } {
|
||||
# ffr 2009-11-09, Don't create a temperature controller for the script validator, this causes the
|
||||
# lakeshore to lock up.
|
||||
# NOTE: I put this outside the catch block because "return" raises an exception
|
||||
@@ -1896,10 +1896,10 @@ proc add_sct_ls336 {name IP port terminator {_tol1 1.0} {_tol2 1.0} {CID 1} {CTY
|
||||
if {[ catch {
|
||||
if {[string equal -nocase "aqadapter" "${IP}"]} {
|
||||
# dcl 2013-05-27: in this case the port is the name of the AsyncQueue
|
||||
puts "\nadd_ls336: makesctcontroller sct_ls336_$name aqadapter ${port} for Lakeshore model 336"
|
||||
puts "\add_lakeshore_336: makesctcontroller sct_ls336_$name aqadapter ${port} for Lakeshore model 336"
|
||||
makesctcontroller sct_ls336_$name aqadapter ${port}
|
||||
} else {
|
||||
puts "\nadd_ls336: makesctcontroller sct_ls336_$name std ${IP}:$port $terminator for Lakeshore model 336"
|
||||
puts "\add_lakeshore_336: makesctcontroller sct_ls336_$name std ${IP}:$port $terminator for Lakeshore model 336"
|
||||
makesctcontroller sct_ls336_$name std ${IP}:$port $terminator
|
||||
}
|
||||
::scobj::ls336::mk_sct_lakeshore_336 sct_ls336_$name environment $name $CID $CTYPE $_tol1 $_tol2 $_verbose
|
||||
@@ -1911,26 +1911,77 @@ proc add_sct_ls336 {name IP port terminator {_tol1 1.0} {_tol2 1.0} {CID 1} {CTY
|
||||
}
|
||||
}
|
||||
|
||||
if {[ catch {
|
||||
if { [ info exists ::config_dict ] } {
|
||||
dict for {secname secinfo} $::config_dict {
|
||||
if { [dict exists $secinfo "driver"] && ([dict get $secinfo "driver"] == "ls336") } {
|
||||
if { [ dict get $::secinfo enabled ] } {
|
||||
set IP [dict get $::secinfo ip]
|
||||
set PORT [dict get $::secinfo port]
|
||||
set name [dict get $::secinfo name]
|
||||
set ctype [dict get $::secinfo type]
|
||||
set cid [dict get $::secinfo id]
|
||||
set term [dict get $::secinfo terminator]
|
||||
set tol1 [dict get $::secinfo tol1]
|
||||
set tol2 [dict get $::secinfo tol2]
|
||||
|
||||
add_sct_ls336 $name $IP $PORT $term $tol1 $tol2 $cid $ctype
|
||||
namespace eval ::scobj::lakeshore_336 {
|
||||
set debug_threshold 5
|
||||
}
|
||||
proc ::scobj::lakeshore_336::sics_log {debug_level debug_string} {
|
||||
set catch_status [ catch {
|
||||
set debug_threshold ${::scobj::lakeshore_336::debug_threshold}
|
||||
if {${debug_level} >= ${debug_threshold}} {
|
||||
sicslog "::scobj::lakeshore_336::${debug_string}"
|
||||
}
|
||||
} catch_message ]
|
||||
}
|
||||
proc ::scobj::lakeshore_336::read_config {} {
|
||||
set catch_status [ catch {
|
||||
set ns "::scobj::lakeshore_336"
|
||||
dict for {k v} $::config_dict {
|
||||
if { [dict exists $v "implementation"] } {
|
||||
set name [dict get $v name]
|
||||
set enabled [string tolower [dict get $v "enabled"]]
|
||||
set implementation [dict get $v "implementation"]
|
||||
set v [dict get $::config_dict $implementation]
|
||||
if { [dict get $v "driver"] == "lakeshore_336" } {
|
||||
if { $enabled == "true" || $enabled == "always" } {
|
||||
if { ![string equal -nocase [SplitReply [environment_simulation]] "false"] } {
|
||||
set asyncqueue "null"
|
||||
${ns}::sics_log 9 "[environment_simulation] => using null asyncqueue"
|
||||
} elseif { [dict exists $v "asyncqueue"] } {
|
||||
set asyncqueue [dict get $v "asyncqueue"]
|
||||
} else {
|
||||
if { [dict exists $v "asyncprotocol"] } {
|
||||
set asyncprotocol [dict get $v "asyncprotocol"]
|
||||
} else {
|
||||
set asyncprotocol ${name}_protocol
|
||||
MakeAsyncProtocol ${asyncprotocol}
|
||||
if { [dict exists $v "terminator"] } {
|
||||
${asyncprotocol} sendterminator "[dict get $v "terminator"]"
|
||||
${asyncprotocol} replyterminator "[dict get $v "terminator"]"
|
||||
}
|
||||
}
|
||||
set asyncqueue ${name}_queue
|
||||
set IP [dict get $v ip]
|
||||
set PORT [dict get $v port]
|
||||
MakeAsyncQueue ${asyncqueue} ${asyncprotocol} ${IP} ${PORT}
|
||||
if { [dict exists $v "timeout"] } {
|
||||
${asyncqueue} timeout "[dict get $v "timeout"]"
|
||||
}
|
||||
}
|
||||
set arg_list [list]
|
||||
foreach arg {tol1 tol2 id} {
|
||||
if {[dict exists $v $arg]} {
|
||||
lappend arg_list "[dict get $v $arg]"
|
||||
} else {
|
||||
${ns}::sics_log 9 "Missing configuration value $arg"
|
||||
error "Missing configuration value $arg"
|
||||
}
|
||||
}
|
||||
add_lakeshore_336 ${name} "aqadapter" ${asyncqueue} {*}$arg_list
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} message ]} {
|
||||
puts "ERROR: $message"
|
||||
} catch_message ]
|
||||
handle_exception ${catch_status} ${catch_message}
|
||||
}
|
||||
|
||||
if { [info exists ::config_dict] } {
|
||||
::scobj::lakeshore_336::read_config
|
||||
} else {
|
||||
::scobj::lakeshore_336::sics_log 5 "No config dict"
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
namespace import ::scobj::ls336::*
|
||||
|
||||
@@ -2083,14 +2083,14 @@ proc createNode {scobj_hpath sct_controller cmdGroup varName readable writable p
|
||||
# end of namespace mk_sct_lakeshore_340
|
||||
|
||||
##
|
||||
# @brief add_ls340() adds a scriptcontext object for a Lakeshore 336 o 340 temperature controller
|
||||
# @brief add_lakeshore_340() adds a scriptcontext object for a Lakeshore 336 o 340 temperature controller
|
||||
# and makes it available to SICServer
|
||||
# @param name short name for the temperature controller scriptcontext object (typ. tc1 or tc2)
|
||||
# @param IP IP address of the device (e.g. IP of moxabox that hooks up to the Lakeshore 340)
|
||||
# @param port port number on the moxabox (typ. 4001, 4002, 4003, or 4004)
|
||||
# @param tol temperature tolerance in Kelvin (typ. 1)
|
||||
# @return nothing (well, the sct object)
|
||||
proc add_sct_ls340 {name IP port terminator {_tol1 1.0} {_tol2 1.0} {CID 1} {CTYPE T} {_verbose 0} } {
|
||||
proc add_lakeshore_340 {name IP port {terminator \r\n} {_tol1 1.0} {_tol2 1.0} {CID 1} {CTYPE T} {_verbose 0} } {
|
||||
# ffr 2009-11-09, Don't create a temperature controller for the script validator, this causes the
|
||||
# lakeshore to lock up.
|
||||
# NOTE: I put this outside the catch block because "return" raises an exception
|
||||
@@ -2100,10 +2100,10 @@ proc add_sct_ls340 {name IP port terminator {_tol1 1.0} {_tol2 1.0} {CID 1} {CTY
|
||||
if {[ catch {
|
||||
set _ls340_LSmodel 340
|
||||
if {[string equal -nocase "aqadapter" "${IP}"]} {
|
||||
puts "\nadd_ls340: makesctcontroller sct_ls340_$name aqadapter ${port} for Lakeshore model 340"
|
||||
puts "\add_lakeshore_340: makesctcontroller sct_ls340_$name aqadapter ${port} for Lakeshore model 340"
|
||||
makesctcontroller sct_ls340_$name aqadapter ${port}
|
||||
} else {
|
||||
puts "\nadd_ls340: makesctcontroller sct_ls340_$name std ${IP}:$port $terminator for Lakeshore model 340"
|
||||
puts "\add_lakeshore_340: makesctcontroller sct_ls340_$name std ${IP}:$port $terminator for Lakeshore model 340"
|
||||
makesctcontroller sct_ls340_$name std ${IP}:$port $terminator
|
||||
}
|
||||
::scobj::ls340::mk_sct_lakeshore_340 sct_ls340_$name environment $name $CID $CTYPE $_ls340_LSmodel $_tol1 $_tol2 $_verbose
|
||||
@@ -2111,30 +2111,77 @@ proc add_sct_ls340 {name IP port terminator {_tol1 1.0} {_tol2 1.0} {CID 1} {CTY
|
||||
# set m2 "_2"
|
||||
# makesctemon $name$m2 /sics/$name/emon/monMode_Lp2 /sics/$name/emon/isInTolerance_Lp2 /sics/$name/emon/errhandler
|
||||
} message ]} {
|
||||
return -code error "in add_ls340: $message"
|
||||
return -code error "in add_lakeshore_340: $message"
|
||||
}
|
||||
}
|
||||
|
||||
if {[ catch {
|
||||
if { [ info exists ::config_dict ] } {
|
||||
dict for {secname secinfo} $::config_dict {
|
||||
if { [dict exists $secinfo "driver"] && ([dict get $secinfo "driver"] == "ls340") } {
|
||||
if { [ dict get $::secinfo enabled ] } {
|
||||
set IP [dict get $::secinfo ip]
|
||||
set PORT [dict get $::secinfo port]
|
||||
set name [dict get $::secinfo name]
|
||||
set ctype [dict get $::secinfo type]
|
||||
set cid [dict get $::secinfo id]
|
||||
set term [dict get $::secinfo terminator]
|
||||
set tol1 [dict get $::secinfo tol1]
|
||||
set tol2 [dict get $::secinfo tol2]
|
||||
|
||||
add_sct_ls340 $name $IP $PORT $term $tol1 $tol2 $cid $ctype
|
||||
namespace eval ::scobj::lakeshore_340 {
|
||||
set debug_threshold 5
|
||||
}
|
||||
proc ::scobj::lakeshore_340::sics_log {debug_level debug_string} {
|
||||
set catch_status [ catch {
|
||||
set debug_threshold ${::scobj::lakeshore_340::debug_threshold}
|
||||
if {${debug_level} >= ${debug_threshold}} {
|
||||
sicslog "::scobj::lakeshore_340::${debug_string}"
|
||||
}
|
||||
} catch_message ]
|
||||
}
|
||||
proc ::scobj::lakeshore_340::read_config {} {
|
||||
set catch_status [ catch {
|
||||
set ns "::scobj::lakeshore_340"
|
||||
dict for {k v} $::config_dict {
|
||||
if { [dict exists $v "implementation"] } {
|
||||
set name [dict get $v name]
|
||||
set enabled [string tolower [dict get $v "enabled"]]
|
||||
set implementation [dict get $v "implementation"]
|
||||
set v [dict get $::config_dict $implementation]
|
||||
if { [dict get $v "driver"] == "lakeshore_340" } {
|
||||
if { $enabled == "true" || $enabled == "always" } {
|
||||
if { ![string equal -nocase [SplitReply [environment_simulation]] "false"] } {
|
||||
set asyncqueue "null"
|
||||
${ns}::sics_log 9 "[environment_simulation] => using null asyncqueue"
|
||||
} elseif { [dict exists $v "asyncqueue"] } {
|
||||
set asyncqueue [dict get $v "asyncqueue"]
|
||||
} else {
|
||||
if { [dict exists $v "asyncprotocol"] } {
|
||||
set asyncprotocol [dict get $v "asyncprotocol"]
|
||||
} else {
|
||||
set asyncprotocol ${name}_protocol
|
||||
MakeAsyncProtocol ${asyncprotocol}
|
||||
if { [dict exists $v "terminator"] } {
|
||||
${asyncprotocol} sendterminator "[dict get $v "terminator"]"
|
||||
${asyncprotocol} replyterminator "[dict get $v "terminator"]"
|
||||
}
|
||||
}
|
||||
set asyncqueue ${name}_queue
|
||||
set IP [dict get $v ip]
|
||||
set PORT [dict get $v port]
|
||||
MakeAsyncQueue ${asyncqueue} ${asyncprotocol} ${IP} ${PORT}
|
||||
if { [dict exists $v "timeout"] } {
|
||||
${asyncqueue} timeout "[dict get $v "timeout"]"
|
||||
}
|
||||
}
|
||||
set arg_list [list]
|
||||
foreach arg {tol1 tol2 id} {
|
||||
if {[dict exists $v $arg]} {
|
||||
lappend arg_list "[dict get $v $arg]"
|
||||
} else {
|
||||
${ns}::sics_log 9 "Missing configuration value $arg"
|
||||
error "Missing configuration value $arg"
|
||||
}
|
||||
}
|
||||
add_lakeshore_340 ${name} "aqadapter" ${asyncqueue} {*}$arg_list
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch_message ]
|
||||
handle_exception ${catch_status} ${catch_message}
|
||||
}
|
||||
} message ]} {
|
||||
puts "ERROR: $message"
|
||||
|
||||
if { [info exists ::config_dict] } {
|
||||
::scobj::lakeshore_340::read_config
|
||||
} else {
|
||||
::scobj::lakeshore_340::sics_log 5 "No config dict"
|
||||
}
|
||||
namespace import ::scobj::ls340::*
|
||||
|
||||
@@ -549,10 +549,13 @@ proc ::scobj::mercury_base::read_config {} {
|
||||
set catch_status [ catch {
|
||||
set ns "::scobj::mercury_base"
|
||||
dict for {k v} $::config_dict {
|
||||
if { [dict exists $v "driver"] } {
|
||||
if { [dict exists $v "implementation"] } {
|
||||
set name [dict get $v name]
|
||||
set enabled [string tolower [dict get $v "enabled"]]
|
||||
set implementation [dict get $v "implementation"]
|
||||
set v [dict get $::config_dict $implementation]
|
||||
if { [dict get $v "driver"] == "mercury_base" } {
|
||||
if { [dict get $v enabled] } {
|
||||
set name [dict get $v name]
|
||||
if { ![string equal -nocase [SplitReply [environment_simulation]] "false"] } {
|
||||
set asyncqueue "null"
|
||||
${ns}::sics_log 9 "[environment_simulation] => using null asyncqueue"
|
||||
|
||||
@@ -226,10 +226,13 @@ proc ::scobj::mercury_level::read_config {} {
|
||||
set catch_status [ catch {
|
||||
set ns "::scobj::mercury_level"
|
||||
dict for {k v} $::config_dict {
|
||||
if { [dict exists $v "driver"] } {
|
||||
if { [dict exists $v "implementation"] } {
|
||||
set name [dict get $v name]
|
||||
set enabled [string tolower [dict get $v "enabled"]]
|
||||
set implementation [dict get $v "implementation"]
|
||||
set v [dict get $::config_dict $implementation]
|
||||
if { [dict get $v "driver"] == "mercury_level" } {
|
||||
if { [dict get $v enabled] } {
|
||||
set name [dict get $v name]
|
||||
if { ![string equal -nocase [SplitReply [environment_simulation]] "false"] } {
|
||||
set asyncqueue "null"
|
||||
${ns}::sics_log 9 "[environment_simulation] => using null asyncqueue"
|
||||
|
||||
@@ -390,10 +390,13 @@ proc ::scobj::mercury_pres::read_config {} {
|
||||
set catch_status [ catch {
|
||||
set ns "::scobj::mercury_pres"
|
||||
dict for {k v} $::config_dict {
|
||||
if { [dict exists $v "driver"] } {
|
||||
if { [dict exists $v "implementation"] } {
|
||||
set name [dict get $v name]
|
||||
set enabled [string tolower [dict get $v "enabled"]]
|
||||
set implementation [dict get $v "implementation"]
|
||||
set v [dict get $::config_dict $implementation]
|
||||
if { [dict get $v "driver"] == "mercury_pres" } {
|
||||
if { [dict get $v enabled] } {
|
||||
set name [dict get $v name]
|
||||
if { ![string equal -nocase [SplitReply [environment_simulation]] "false"] } {
|
||||
set asyncqueue "null"
|
||||
${ns}::sics_log 9 "[environment_simulation] => using null asyncqueue"
|
||||
|
||||
@@ -745,10 +745,13 @@ proc ::scobj::mercury_scpi::read_config {} {
|
||||
set catch_status [ catch {
|
||||
set ns "::scobj::mercury_scpi"
|
||||
dict for {k v} $::config_dict {
|
||||
if { [dict exists $v "driver"] } {
|
||||
if { [dict exists $v "implementation"] } {
|
||||
set name [dict get $v name]
|
||||
set enabled [string tolower [dict get $v "enabled"]]
|
||||
set implementation [dict get $v "implementation"]
|
||||
set v [dict get $::config_dict $implementation]
|
||||
if { [dict get $v "driver"] == "mercury_scpi" } {
|
||||
if { [dict get $v enabled] } {
|
||||
set name [dict get $v name]
|
||||
if { ![string equal -nocase [SplitReply [environment_simulation]] "false"] } {
|
||||
set asyncqueue "null"
|
||||
${ns}::sics_log 9 "[environment_simulation] => using null asyncqueue"
|
||||
|
||||
@@ -395,10 +395,13 @@ proc ::scobj::mercury_temp::read_config {} {
|
||||
set catch_status [ catch {
|
||||
set ns "::scobj::mercury_temp"
|
||||
dict for {k v} $::config_dict {
|
||||
if { [dict exists $v "driver"] } {
|
||||
if { [dict exists $v "implementation"] } {
|
||||
set name [dict get $v name]
|
||||
set enabled [string tolower [dict get $v "enabled"]]
|
||||
set implementation [dict get $v "implementation"]
|
||||
set v [dict get $::config_dict $implementation]
|
||||
if { [dict get $v "driver"] == "mercury_temp" } {
|
||||
if { [dict get $v enabled] } {
|
||||
set name [dict get $v name]
|
||||
if { ![string equal -nocase [SplitReply [environment_simulation]] "false"] } {
|
||||
set asyncqueue "null"
|
||||
${ns}::sics_log 9 "[environment_simulation] => using null asyncqueue"
|
||||
|
||||
@@ -344,10 +344,13 @@ proc ::scobj::mercury_valve::read_config {} {
|
||||
set catch_status [ catch {
|
||||
set ns "::scobj::mercury_valve"
|
||||
dict for {k v} $::config_dict {
|
||||
if { [dict exists $v "driver"] } {
|
||||
if { [dict exists $v "implementation"] } {
|
||||
set name [dict get $v name]
|
||||
set enabled [string tolower [dict get $v "enabled"]]
|
||||
set implementation [dict get $v "implementation"]
|
||||
set v [dict get $::config_dict $implementation]
|
||||
if { [dict get $v "driver"] == "mercury_valve" } {
|
||||
if { [dict get $v enabled] } {
|
||||
set name [dict get $v name]
|
||||
if { ![string equal -nocase [SplitReply [environment_simulation]] "false"] } {
|
||||
set asyncqueue "null"
|
||||
${ns}::sics_log 9 "[environment_simulation] => using null asyncqueue"
|
||||
|
||||
@@ -494,10 +494,13 @@ proc ::scobj::pfeiffer_hg::read_config {} {
|
||||
set catch_status [ catch {
|
||||
set ns "::scobj::pfeiffer_hg"
|
||||
dict for {k v} $::config_dict {
|
||||
if { [dict exists $v "driver"] } {
|
||||
if { [dict exists $v "implementation"] } {
|
||||
set name [dict get $v name]
|
||||
set enabled [string tolower [dict get $v "enabled"]]
|
||||
set implementation [dict get $v "implementation"]
|
||||
set v [dict get $::config_dict $implementation]
|
||||
if { [dict get $v "driver"] == "pfeiffer_hg" } {
|
||||
if { [dict get $v enabled] } {
|
||||
set name [dict get $v name]
|
||||
if { ![string equal -nocase [SplitReply [environment_simulation]] "false"] } {
|
||||
set asyncqueue "null"
|
||||
${ns}::sics_log 9 "[environment_simulation] => using null asyncqueue"
|
||||
|
||||
@@ -345,10 +345,13 @@ proc ::scobj::reactor_status::read_config {} {
|
||||
set catch_status [ catch {
|
||||
set ns "::scobj::reactor_status"
|
||||
dict for {k v} $::config_dict {
|
||||
if { [dict exists $v "driver"] } {
|
||||
if { [dict exists $v "implementation"] } {
|
||||
set name [dict get $v name]
|
||||
set enabled [string tolower [dict get $v "enabled"]]
|
||||
set implementation [dict get $v "implementation"]
|
||||
set v [dict get $::config_dict $implementation]
|
||||
if { [dict get $v "driver"] == "reactor_status" } {
|
||||
if { [dict get $v enabled] } {
|
||||
set name [dict get $v name]
|
||||
if { ![string equal -nocase [SplitReply [opal_simulation]] "false"] } {
|
||||
set asyncqueue "null"
|
||||
${ns}::sics_log 9 "[opal_simulation] => using null asyncqueue"
|
||||
|
||||
Reference in New Issue
Block a user