Regenerated drivers

This commit is contained in:
Douglas Clowes
2014-09-11 13:29:52 +10:00
parent 65b50f3fcc
commit 0cb3f4f91c
36 changed files with 1387 additions and 883 deletions

View File

@@ -230,14 +230,14 @@ proc ::scobj::astrium_chopper::setValue {tc_root nextState cmd_str} {
handle_exception ${catch_status} ${catch_message}
}
proc ::scobj::astrium_chopper::mkDriver { sct_controller name ip_address tcp_port } {
::scobj::astrium_chopper::sics_log 9 "::scobj::astrium_chopper::mkDriver ${sct_controller} ${name} ${ip_address} ${tcp_port}"
proc ::scobj::astrium_chopper::mkDriver { sct_controller name device_class simulation_flag ip_address tcp_port } {
::scobj::astrium_chopper::sics_log 9 "::scobj::astrium_chopper::mkDriver ${sct_controller} ${name} ${device_class} ${simulation_flag} ${ip_address} ${tcp_port}"
set ns "[namespace current]"
set catch_status [ catch {
MakeSICSObj ${name} SCT_OBJECT
sicslist setatt ${name} klass NXdisk_chopper
sicslist setatt ${name} klass ${device_class}
sicslist setatt ${name} long_name ${name}
set scobj_hpath /sics/${name}
@@ -316,10 +316,10 @@ proc ::scobj::astrium_chopper::mkDriver { sct_controller name ip_address tcp_por
hsetprop ${scobj_hpath}/blade_1/state type "part"
hsetprop ${scobj_hpath}/blade_1/state nxalias "${name}_blade_1_state"
if {[string equal -nocase [SplitReply [chopper_simulation]] "false"]} {
if {[string equal -nocase "${simulation_flag}" "false"]} {
${sct_controller} poll ${scobj_hpath}/blade_1/state 1
} else {
::scobj::astrium_chopper::sics_log 9 "[chopper_simulation] => No poll/write for astrium_chopper"
::scobj::astrium_chopper::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for astrium_chopper"
}
hfactory ${scobj_hpath}/blade_2 plain spy none
@@ -396,10 +396,10 @@ proc ::scobj::astrium_chopper::mkDriver { sct_controller name ip_address tcp_por
hsetprop ${scobj_hpath}/blade_2/state type "part"
hsetprop ${scobj_hpath}/blade_2/state nxalias "${name}_blade_2_state"
if {[string equal -nocase [SplitReply [chopper_simulation]] "false"]} {
if {[string equal -nocase "${simulation_flag}" "false"]} {
${sct_controller} poll ${scobj_hpath}/blade_2/state 1
} else {
::scobj::astrium_chopper::sics_log 9 "[chopper_simulation] => No poll/write for astrium_chopper"
::scobj::astrium_chopper::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for astrium_chopper"
}
hfactory ${scobj_hpath}/blade_3 plain spy none
@@ -476,10 +476,10 @@ proc ::scobj::astrium_chopper::mkDriver { sct_controller name ip_address tcp_por
hsetprop ${scobj_hpath}/blade_3/state type "part"
hsetprop ${scobj_hpath}/blade_3/state nxalias "${name}_blade_3_state"
if {[string equal -nocase [SplitReply [chopper_simulation]] "false"]} {
if {[string equal -nocase "${simulation_flag}" "false"]} {
${sct_controller} poll ${scobj_hpath}/blade_3/state 1
} else {
::scobj::astrium_chopper::sics_log 9 "[chopper_simulation] => No poll/write for astrium_chopper"
::scobj::astrium_chopper::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for astrium_chopper"
}
hfactory ${scobj_hpath}/blade_4 plain spy none
@@ -556,12 +556,12 @@ proc ::scobj::astrium_chopper::mkDriver { sct_controller name ip_address tcp_por
hsetprop ${scobj_hpath}/blade_4/state type "part"
hsetprop ${scobj_hpath}/blade_4/state nxalias "${name}_blade_4_state"
if {[string equal -nocase [SplitReply [chopper_simulation]] "false"]} {
if {[string equal -nocase "${simulation_flag}" "false"]} {
${sct_controller} poll ${scobj_hpath}/blade_4/state 1
} else {
::scobj::astrium_chopper::sics_log 9 "[chopper_simulation] => No poll/write for astrium_chopper"
::scobj::astrium_chopper::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for astrium_chopper"
}
hsetprop ${scobj_hpath} klass NXdisk_chopper
hsetprop ${scobj_hpath} klass ${device_class}
hsetprop ${scobj_hpath} data true
hsetprop ${scobj_hpath} debug_threshold 5
# mkDriver hook code starts
@@ -570,31 +570,37 @@ proc ::scobj::astrium_chopper::mkDriver { sct_controller name ip_address tcp_por
handle_exception ${catch_status} ${catch_message}
}
proc ::scobj::astrium_chopper::add_driver {name device_class simulation_flag ip_address tcp_port} {
set catch_status [ catch {
::scobj::astrium_chopper::sics_log 9 "::scobj::astrium_chopper::add_driver ${name} ${device_class} ${simulation_flag} ${ip_address} ${tcp_port}"
if {[string equal -nocase "${simulation_flag}" "false"]} {
if {[string equal -nocase "aqadapter" "${ip_address}"]} {
::scobj::astrium_chopper::sics_log 9 "makesctcontroller sct_${name} aqadapter ${tcp_port}"
makesctcontroller sct_${name} aqadapter ${tcp_port}
} else {
::scobj::astrium_chopper::sics_log 9 "makesctcontroller sct_${name} std ${ip_address}:${tcp_port}"
makesctcontroller sct_${name} std ${ip_address}:${tcp_port}
}
} else {
::scobj::astrium_chopper::sics_log 9 "simulation_flag={simulation_flag} => No sctcontroller for astrium_chopper"
}
::scobj::astrium_chopper::sics_log 1 "::scobj::astrium_chopper::mkDriver sct_${name} ${name} ${device_class} ${simulation_flag} ${ip_address} ${tcp_port}"
::scobj::astrium_chopper::mkDriver sct_${name} ${name} ${device_class} ${simulation_flag} ${ip_address} ${tcp_port}
} catch_message ]
handle_exception ${catch_status} ${catch_message}
}
namespace eval ::scobj::astrium_chopper {
namespace export debug_threshold
namespace export debug_log
namespace export sics_log
namespace export mkDriver
namespace export add_driver
}
proc add_astrium_chopper {name ip_address tcp_port} {
set catch_status [ catch {
::scobj::astrium_chopper::sics_log 9 "add_astrium_chopper ${name} ${ip_address} ${tcp_port}"
if {[string equal -nocase [SplitReply [chopper_simulation]] "false"]} {
if {[string equal -nocase "aqadapter" "${ip_address}"]} {
::scobj::astrium_chopper::sics_log 9 "makesctcontroller sct_${name} aqadapter ${tcp_port}"
makesctcontroller sct_${name} aqadapter ${tcp_port}
} else {
::scobj::astrium_chopper::sics_log 9 "makesctcontroller sct_${name} std ${ip_address}:${tcp_port}"
makesctcontroller sct_${name} std ${ip_address}:${tcp_port}
}
} else {
::scobj::astrium_chopper::sics_log 9 "[chopper_simulation] => No sctcontroller for astrium_chopper"
}
::scobj::astrium_chopper::sics_log 1 "::scobj::astrium_chopper::mkDriver sct_${name} ${name} ${ip_address} ${tcp_port}"
::scobj::astrium_chopper::mkDriver sct_${name} ${name} ${ip_address} ${tcp_port}
} catch_message ]
handle_exception ${catch_status} ${catch_message}
set simulation_flag "[string tolower [SplitReply [chopper_simulation]]]"
::scobj::astrium_chopper::add_driver ${name} "NXdisk_chopper" "${simulation_flag}" ${ip_address} ${tcp_port}
}
clientput "file evaluation of sct_astrium_chopper.tcl"
@@ -605,6 +611,8 @@ proc ::scobj::astrium_chopper::read_config {} {
set ns "::scobj::astrium_chopper"
dict for {k u} $::config_dict {
if { [dict exists $u "implementation"] } {
set simulation_flag "[string tolower [SplitReply [chopper_simulation]]]"
set device_class "NXdisk_chopper"
if { !([dict exists $u "name"] && [dict exists $u "enabled"]) } {
continue
}
@@ -612,6 +620,12 @@ proc ::scobj::astrium_chopper::read_config {} {
if { ! ([string equal -nocase $enabled "true" ] || [string equal -nocase $enabled "always"]) } {
continue
}
if { [dict exists $u "simulation_group"] } {
set simulation_flag [SplitReply [[string tolower [dict get $u "simulation_group"]]]]
}
if { [dict exists $u "device_class"] } {
set device_class "[dict get $u "device_class"]"
}
set name [dict get $u name]
set implementation [dict get $u "implementation"]
if { !([dict exists $::config_dict $implementation]) } {
@@ -622,9 +636,9 @@ proc ::scobj::astrium_chopper::read_config {} {
continue
}
if { [string equal -nocase [dict get $v "driver"] "astrium_chopper"] } {
if { ![string equal -nocase [SplitReply [chopper_simulation]] "false"] } {
if { ![string equal -nocase "${simulation_flag}" "false"] } {
set asyncqueue "null"
${ns}::sics_log 9 "[chopper_simulation] => using null asyncqueue"
${ns}::sics_log 9 "simulation_flag=${simulation_flag} => using null asyncqueue"
} elseif { [dict exists $v "asyncqueue"] } {
set asyncqueue [dict get $v "asyncqueue"]
if { [string equal -nocase ${asyncqueue} "sct"] } {
@@ -651,9 +665,9 @@ proc ::scobj::astrium_chopper::read_config {} {
}
}
if { [string equal -nocase ${asyncqueue} "sct"] } {
add_astrium_chopper ${name} ${ip_address} ${tcp_port}
${ns}::add_driver ${name} ${device_class} ${simulation_flag} ${ip_address} ${tcp_port}
} else {
add_astrium_chopper ${name} "aqadapter" ${asyncqueue}
${ns}::add_driver ${name} ${device_class} ${simulation_flag} "aqadapter" ${asyncqueue}
}
}
}

View File

@@ -193,14 +193,14 @@ proc ::scobj::shutters::write_switch {tc_root nextState cmd_str} {
handle_exception ${catch_status} ${catch_message}
}
proc ::scobj::shutters::mkDriver { sct_controller name ip_address tcp_port } {
::scobj::shutters::sics_log 9 "::scobj::shutters::mkDriver ${sct_controller} ${name} ${ip_address} ${tcp_port}"
proc ::scobj::shutters::mkDriver { sct_controller name device_class simulation_flag ip_address tcp_port } {
::scobj::shutters::sics_log 9 "::scobj::shutters::mkDriver ${sct_controller} ${name} ${device_class} ${simulation_flag} ${ip_address} ${tcp_port}"
set ns "[namespace current]"
set catch_status [ catch {
MakeSICSObj ${name} SCT_OBJECT
sicslist setatt ${name} klass instrument
sicslist setatt ${name} klass ${device_class}
sicslist setatt ${name} long_name ${name}
set scobj_hpath /sics/${name}
@@ -257,16 +257,16 @@ proc ::scobj::shutters::mkDriver { sct_controller name ip_address tcp_port } {
hsetprop ${scobj_hpath} nxsave "true"
hsetprop ${scobj_hpath} type "part"
if {[string equal -nocase [SplitReply [motor_simulation]] "false"]} {
if {[string equal -nocase "${simulation_flag}" "false"]} {
${sct_controller} poll ${scobj_hpath}/fast_shutter 1
${sct_controller} poll ${scobj_hpath}/rough_100 1
${sct_controller} poll ${scobj_hpath}/rough_40 1
${sct_controller} write ${scobj_hpath}/rough_100
${sct_controller} write ${scobj_hpath}/rough_40
} else {
::scobj::shutters::sics_log 9 "[motor_simulation] => No poll/write for shutters"
::scobj::shutters::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for shutters"
}
hsetprop ${scobj_hpath} klass instrument
hsetprop ${scobj_hpath} klass ${device_class}
hsetprop ${scobj_hpath} data true
hsetprop ${scobj_hpath} debug_threshold 5
# mkDriver hook code starts
@@ -275,31 +275,37 @@ proc ::scobj::shutters::mkDriver { sct_controller name ip_address tcp_port } {
handle_exception ${catch_status} ${catch_message}
}
proc ::scobj::shutters::add_driver {name device_class simulation_flag ip_address tcp_port} {
set catch_status [ catch {
::scobj::shutters::sics_log 9 "::scobj::shutters::add_driver ${name} ${device_class} ${simulation_flag} ${ip_address} ${tcp_port}"
if {[string equal -nocase "${simulation_flag}" "false"]} {
if {[string equal -nocase "aqadapter" "${ip_address}"]} {
::scobj::shutters::sics_log 9 "makesctcontroller sct_${name} aqadapter ${tcp_port}"
makesctcontroller sct_${name} aqadapter ${tcp_port}
} else {
::scobj::shutters::sics_log 9 "makesctcontroller sct_${name} dmc2280 ${ip_address}:${tcp_port}"
makesctcontroller sct_${name} dmc2280 ${ip_address}:${tcp_port}
}
} else {
::scobj::shutters::sics_log 9 "simulation_flag={simulation_flag} => No sctcontroller for shutters"
}
::scobj::shutters::sics_log 1 "::scobj::shutters::mkDriver sct_${name} ${name} ${device_class} ${simulation_flag} ${ip_address} ${tcp_port}"
::scobj::shutters::mkDriver sct_${name} ${name} ${device_class} ${simulation_flag} ${ip_address} ${tcp_port}
} catch_message ]
handle_exception ${catch_status} ${catch_message}
}
namespace eval ::scobj::shutters {
namespace export debug_threshold
namespace export debug_log
namespace export sics_log
namespace export mkDriver
namespace export add_driver
}
proc add_shutters {name ip_address tcp_port} {
set catch_status [ catch {
::scobj::shutters::sics_log 9 "add_shutters ${name} ${ip_address} ${tcp_port}"
if {[string equal -nocase [SplitReply [motor_simulation]] "false"]} {
if {[string equal -nocase "aqadapter" "${ip_address}"]} {
::scobj::shutters::sics_log 9 "makesctcontroller sct_${name} aqadapter ${tcp_port}"
makesctcontroller sct_${name} aqadapter ${tcp_port}
} else {
::scobj::shutters::sics_log 9 "makesctcontroller sct_${name} dmc2280 ${ip_address}:${tcp_port}"
makesctcontroller sct_${name} dmc2280 ${ip_address}:${tcp_port}
}
} else {
::scobj::shutters::sics_log 9 "[motor_simulation] => No sctcontroller for shutters"
}
::scobj::shutters::sics_log 1 "::scobj::shutters::mkDriver sct_${name} ${name} ${ip_address} ${tcp_port}"
::scobj::shutters::mkDriver sct_${name} ${name} ${ip_address} ${tcp_port}
} catch_message ]
handle_exception ${catch_status} ${catch_message}
set simulation_flag "[string tolower [SplitReply [motor_simulation]]]"
::scobj::shutters::add_driver ${name} "instrument" "${simulation_flag}" ${ip_address} ${tcp_port}
}
clientput "file evaluation of sct_shutters.tcl"
@@ -310,6 +316,8 @@ proc ::scobj::shutters::read_config {} {
set ns "::scobj::shutters"
dict for {k u} $::config_dict {
if { [dict exists $u "implementation"] } {
set simulation_flag "[string tolower [SplitReply [motor_simulation]]]"
set device_class "instrument"
if { !([dict exists $u "name"] && [dict exists $u "enabled"]) } {
continue
}
@@ -317,6 +325,12 @@ proc ::scobj::shutters::read_config {} {
if { ! ([string equal -nocase $enabled "true" ] || [string equal -nocase $enabled "always"]) } {
continue
}
if { [dict exists $u "simulation_group"] } {
set simulation_flag [SplitReply [[string tolower [dict get $u "simulation_group"]]]]
}
if { [dict exists $u "device_class"] } {
set device_class "[dict get $u "device_class"]"
}
set name [dict get $u name]
set implementation [dict get $u "implementation"]
if { !([dict exists $::config_dict $implementation]) } {
@@ -327,9 +341,9 @@ proc ::scobj::shutters::read_config {} {
continue
}
if { [string equal -nocase [dict get $v "driver"] "shutters"] } {
if { ![string equal -nocase [SplitReply [motor_simulation]] "false"] } {
if { ![string equal -nocase "${simulation_flag}" "false"] } {
set asyncqueue "null"
${ns}::sics_log 9 "[motor_simulation] => using null asyncqueue"
${ns}::sics_log 9 "simulation_flag=${simulation_flag} => using null asyncqueue"
} elseif { [dict exists $v "asyncqueue"] } {
set asyncqueue [dict get $v "asyncqueue"]
if { [string equal -nocase ${asyncqueue} "sct"] } {
@@ -356,9 +370,9 @@ proc ::scobj::shutters::read_config {} {
}
}
if { [string equal -nocase ${asyncqueue} "sct"] } {
add_shutters ${name} ${ip_address} ${tcp_port}
${ns}::add_driver ${name} ${device_class} ${simulation_flag} ${ip_address} ${tcp_port}
} else {
add_shutters ${name} "aqadapter" ${asyncqueue}
${ns}::add_driver ${name} ${device_class} ${simulation_flag} "aqadapter" ${asyncqueue}
}
}
}

View File

@@ -201,14 +201,14 @@ proc ::scobj::tank::setValue {tc_root nextState cmd_str} {
handle_exception ${catch_status} ${catch_message}
}
proc ::scobj::tank::mkDriver { sct_controller name ip_address tcp_port } {
::scobj::tank::sics_log 9 "::scobj::tank::mkDriver ${sct_controller} ${name} ${ip_address} ${tcp_port}"
proc ::scobj::tank::mkDriver { sct_controller name device_class simulation_flag ip_address tcp_port } {
::scobj::tank::sics_log 9 "::scobj::tank::mkDriver ${sct_controller} ${name} ${device_class} ${simulation_flag} ${ip_address} ${tcp_port}"
set ns "[namespace current]"
set catch_status [ catch {
MakeSICSObj ${name} SCT_OBJECT
sicslist setatt ${name} klass instrument
sicslist setatt ${name} klass ${device_class}
sicslist setatt ${name} long_name ${name}
set scobj_hpath /sics/${name}
@@ -230,10 +230,10 @@ proc ::scobj::tank::mkDriver { sct_controller name ip_address tcp_port } {
hsetprop ${scobj_hpath} klass "@none"
hsetprop ${scobj_hpath} type "part"
if {[string equal -nocase [SplitReply [motor_simulation]] "false"]} {
if {[string equal -nocase "${simulation_flag}" "false"]} {
${sct_controller} poll ${scobj_hpath}/pos 1
} else {
::scobj::tank::sics_log 9 "[motor_simulation] => No poll/write for tank"
::scobj::tank::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for tank"
}
hfactory ${scobj_hpath}/limits plain spy none
@@ -267,11 +267,11 @@ proc ::scobj::tank::mkDriver { sct_controller name ip_address tcp_port } {
hsetprop ${scobj_hpath}/limits/reverse type "part"
hsetprop ${scobj_hpath}/limits/reverse nxalias "${name}_limits_reverse"
if {[string equal -nocase [SplitReply [motor_simulation]] "false"]} {
if {[string equal -nocase "${simulation_flag}" "false"]} {
${sct_controller} poll ${scobj_hpath}/limits/forward 1
${sct_controller} poll ${scobj_hpath}/limits/reverse 1
} else {
::scobj::tank::sics_log 9 "[motor_simulation] => No poll/write for tank"
::scobj::tank::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for tank"
}
hfactory ${scobj_hpath}/switches plain spy none
@@ -305,13 +305,13 @@ proc ::scobj::tank::mkDriver { sct_controller name ip_address tcp_port } {
hsetprop ${scobj_hpath}/switches/reverse type "part"
hsetprop ${scobj_hpath}/switches/reverse nxalias "${name}_switches_reverse"
if {[string equal -nocase [SplitReply [motor_simulation]] "false"]} {
if {[string equal -nocase "${simulation_flag}" "false"]} {
${sct_controller} poll ${scobj_hpath}/switches/forward 1
${sct_controller} poll ${scobj_hpath}/switches/reverse 1
} else {
::scobj::tank::sics_log 9 "[motor_simulation] => No poll/write for tank"
::scobj::tank::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for tank"
}
hsetprop ${scobj_hpath} klass instrument
hsetprop ${scobj_hpath} klass ${device_class}
hsetprop ${scobj_hpath} data true
hsetprop ${scobj_hpath} debug_threshold 5
# mkDriver hook code starts
@@ -323,17 +323,10 @@ proc ::scobj::tank::mkDriver { sct_controller name ip_address tcp_port } {
handle_exception ${catch_status} ${catch_message}
}
namespace eval ::scobj::tank {
namespace export debug_threshold
namespace export debug_log
namespace export sics_log
namespace export mkDriver
}
proc add_tank {name ip_address tcp_port} {
proc ::scobj::tank::add_driver {name device_class simulation_flag ip_address tcp_port} {
set catch_status [ catch {
::scobj::tank::sics_log 9 "add_tank ${name} ${ip_address} ${tcp_port}"
if {[string equal -nocase [SplitReply [motor_simulation]] "false"]} {
::scobj::tank::sics_log 9 "::scobj::tank::add_driver ${name} ${device_class} ${simulation_flag} ${ip_address} ${tcp_port}"
if {[string equal -nocase "${simulation_flag}" "false"]} {
if {[string equal -nocase "aqadapter" "${ip_address}"]} {
::scobj::tank::sics_log 9 "makesctcontroller sct_${name} aqadapter ${tcp_port}"
makesctcontroller sct_${name} aqadapter ${tcp_port}
@@ -342,14 +335,27 @@ proc add_tank {name ip_address tcp_port} {
makesctcontroller sct_${name} dmc2280 ${ip_address}:${tcp_port}
}
} else {
::scobj::tank::sics_log 9 "[motor_simulation] => No sctcontroller for tank"
::scobj::tank::sics_log 9 "simulation_flag={simulation_flag} => No sctcontroller for tank"
}
::scobj::tank::sics_log 1 "::scobj::tank::mkDriver sct_${name} ${name} ${ip_address} ${tcp_port}"
::scobj::tank::mkDriver sct_${name} ${name} ${ip_address} ${tcp_port}
::scobj::tank::sics_log 1 "::scobj::tank::mkDriver sct_${name} ${name} ${device_class} ${simulation_flag} ${ip_address} ${tcp_port}"
::scobj::tank::mkDriver sct_${name} ${name} ${device_class} ${simulation_flag} ${ip_address} ${tcp_port}
} catch_message ]
handle_exception ${catch_status} ${catch_message}
}
namespace eval ::scobj::tank {
namespace export debug_threshold
namespace export debug_log
namespace export sics_log
namespace export mkDriver
namespace export add_driver
}
proc add_tank {name ip_address tcp_port} {
set simulation_flag "[string tolower [SplitReply [motor_simulation]]]"
::scobj::tank::add_driver ${name} "instrument" "${simulation_flag}" ${ip_address} ${tcp_port}
}
clientput "file evaluation of sct_tank.tcl"
::scobj::tank::sics_log 9 "file evaluation of sct_tank.tcl"
@@ -358,6 +364,8 @@ proc ::scobj::tank::read_config {} {
set ns "::scobj::tank"
dict for {k u} $::config_dict {
if { [dict exists $u "implementation"] } {
set simulation_flag "[string tolower [SplitReply [motor_simulation]]]"
set device_class "instrument"
if { !([dict exists $u "name"] && [dict exists $u "enabled"]) } {
continue
}
@@ -365,6 +373,12 @@ proc ::scobj::tank::read_config {} {
if { ! ([string equal -nocase $enabled "true" ] || [string equal -nocase $enabled "always"]) } {
continue
}
if { [dict exists $u "simulation_group"] } {
set simulation_flag [SplitReply [[string tolower [dict get $u "simulation_group"]]]]
}
if { [dict exists $u "device_class"] } {
set device_class "[dict get $u "device_class"]"
}
set name [dict get $u name]
set implementation [dict get $u "implementation"]
if { !([dict exists $::config_dict $implementation]) } {
@@ -375,9 +389,9 @@ proc ::scobj::tank::read_config {} {
continue
}
if { [string equal -nocase [dict get $v "driver"] "tank"] } {
if { ![string equal -nocase [SplitReply [motor_simulation]] "false"] } {
if { ![string equal -nocase "${simulation_flag}" "false"] } {
set asyncqueue "null"
${ns}::sics_log 9 "[motor_simulation] => using null asyncqueue"
${ns}::sics_log 9 "simulation_flag=${simulation_flag} => using null asyncqueue"
} elseif { [dict exists $v "asyncqueue"] } {
set asyncqueue [dict get $v "asyncqueue"]
if { [string equal -nocase ${asyncqueue} "sct"] } {
@@ -404,9 +418,9 @@ proc ::scobj::tank::read_config {} {
}
}
if { [string equal -nocase ${asyncqueue} "sct"] } {
add_tank ${name} ${ip_address} ${tcp_port}
${ns}::add_driver ${name} ${device_class} ${simulation_flag} ${ip_address} ${tcp_port}
} else {
add_tank ${name} "aqadapter" ${asyncqueue}
${ns}::add_driver ${name} ${device_class} ${simulation_flag} "aqadapter" ${asyncqueue}
}
}
}