Regenerated drivers
This commit is contained in:
@@ -27,8 +27,8 @@ proc ::scobj::green_magnet_labview::sics_log {debug_level debug_string} {
|
||||
} catch_message ]
|
||||
}
|
||||
|
||||
proc ::scobj::green_magnet_labview::mkDriver { sct_controller name ip_address tcp_port } {
|
||||
::scobj::green_magnet_labview::sics_log 9 "::scobj::green_magnet_labview::mkDriver ${sct_controller} ${name} ${ip_address} ${tcp_port}"
|
||||
proc ::scobj::green_magnet_labview::mkDriver { sct_controller name device_class simulation_flag ip_address tcp_port } {
|
||||
::scobj::green_magnet_labview::sics_log 9 "::scobj::green_magnet_labview::mkDriver ${sct_controller} ${name} ${device_class} ${simulation_flag} ${ip_address} ${tcp_port}"
|
||||
set ns "[namespace current]"
|
||||
set catch_status [ catch {
|
||||
|
||||
@@ -46,21 +46,27 @@ proc ::scobj::green_magnet_labview::mkDriver { sct_controller name ip_address tc
|
||||
handle_exception ${catch_status} ${catch_message}
|
||||
}
|
||||
|
||||
proc ::scobj::green_magnet_labview::add_driver {name device_class simulation_flag ip_address tcp_port} {
|
||||
set catch_status [ catch {
|
||||
::scobj::green_magnet_labview::sics_log 9 "::scobj::green_magnet_labview::add_driver ${name} ${device_class} ${simulation_flag} ${ip_address} ${tcp_port}"
|
||||
::scobj::green_magnet_labview::sics_log 9 "No sctcontroller for green_magnet_labview"
|
||||
::scobj::green_magnet_labview::sics_log 1 "::scobj::green_magnet_labview::mkDriver sct_${name} ${name} ${device_class} ${simulation_flag} ${ip_address} ${tcp_port}"
|
||||
::scobj::green_magnet_labview::mkDriver sct_${name} ${name} ${device_class} ${simulation_flag} ${ip_address} ${tcp_port}
|
||||
} catch_message ]
|
||||
handle_exception ${catch_status} ${catch_message}
|
||||
}
|
||||
|
||||
namespace eval ::scobj::green_magnet_labview {
|
||||
namespace export debug_threshold
|
||||
namespace export debug_log
|
||||
namespace export sics_log
|
||||
namespace export mkDriver
|
||||
namespace export add_driver
|
||||
}
|
||||
|
||||
proc add_green_magnet_labview {name ip_address tcp_port} {
|
||||
set catch_status [ catch {
|
||||
::scobj::green_magnet_labview::sics_log 9 "add_green_magnet_labview ${name} ${ip_address} ${tcp_port}"
|
||||
::scobj::green_magnet_labview::sics_log 9 "No sctcontroller for green_magnet_labview"
|
||||
::scobj::green_magnet_labview::sics_log 1 "::scobj::green_magnet_labview::mkDriver sct_${name} ${name} ${ip_address} ${tcp_port}"
|
||||
::scobj::green_magnet_labview::mkDriver sct_${name} ${name} ${ip_address} ${tcp_port}
|
||||
} catch_message ]
|
||||
handle_exception ${catch_status} ${catch_message}
|
||||
set simulation_flag "[string tolower [SplitReply [environment_simulation]]]"
|
||||
::scobj::green_magnet_labview::add_driver ${name} "environment" "${simulation_flag}" ${ip_address} ${tcp_port}
|
||||
}
|
||||
|
||||
clientput "file evaluation of sct_green_magnet_labview.tcl"
|
||||
@@ -71,6 +77,8 @@ proc ::scobj::green_magnet_labview::read_config {} {
|
||||
set ns "::scobj::green_magnet_labview"
|
||||
dict for {k u} $::config_dict {
|
||||
if { [dict exists $u "implementation"] } {
|
||||
set simulation_flag "[string tolower [SplitReply [environment_simulation]]]"
|
||||
set device_class "environment"
|
||||
if { !([dict exists $u "name"] && [dict exists $u "enabled"]) } {
|
||||
continue
|
||||
}
|
||||
@@ -78,6 +86,12 @@ proc ::scobj::green_magnet_labview::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]) } {
|
||||
@@ -88,9 +102,9 @@ proc ::scobj::green_magnet_labview::read_config {} {
|
||||
continue
|
||||
}
|
||||
if { [string equal -nocase [dict get $v "driver"] "green_magnet_labview"] } {
|
||||
if { ![string equal -nocase [SplitReply [environment_simulation]] "false"] } {
|
||||
if { ![string equal -nocase "${simulation_flag}" "false"] } {
|
||||
set asyncqueue "null"
|
||||
${ns}::sics_log 9 "[environment_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"] } {
|
||||
@@ -117,9 +131,9 @@ proc ::scobj::green_magnet_labview::read_config {} {
|
||||
}
|
||||
}
|
||||
if { [string equal -nocase ${asyncqueue} "sct"] } {
|
||||
add_green_magnet_labview ${name} ${ip_address} ${tcp_port}
|
||||
${ns}::add_driver ${name} ${device_class} ${simulation_flag} ${ip_address} ${tcp_port}
|
||||
} else {
|
||||
add_green_magnet_labview ${name} "aqadapter" ${asyncqueue}
|
||||
${ns}::add_driver ${name} ${device_class} ${simulation_flag} "aqadapter" ${asyncqueue}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,18 +27,18 @@ proc ::scobj::oxford12tlv::sics_log {debug_level debug_string} {
|
||||
} catch_message ]
|
||||
}
|
||||
|
||||
proc ::scobj::oxford12tlv::mkDriver { sct_controller name ip_address tcp_port id datype interval } {
|
||||
::scobj::oxford12tlv::sics_log 9 "::scobj::oxford12tlv::mkDriver ${sct_controller} ${name} ${ip_address} ${tcp_port} ${id} ${datype} ${interval}"
|
||||
proc ::scobj::oxford12tlv::mkDriver { sct_controller name device_class simulation_flag ip_address tcp_port id datype interval } {
|
||||
::scobj::oxford12tlv::sics_log 9 "::scobj::oxford12tlv::mkDriver ${sct_controller} ${name} ${device_class} ${simulation_flag} ${ip_address} ${tcp_port} ${id} ${datype} ${interval}"
|
||||
set ns "[namespace current]"
|
||||
set catch_status [ catch {
|
||||
|
||||
MakeSICSObj ${name} SCT_OBJECT
|
||||
|
||||
sicslist setatt ${name} klass environment
|
||||
sicslist setatt ${name} klass ${device_class}
|
||||
sicslist setatt ${name} long_name ${name}
|
||||
|
||||
set scobj_hpath /sics/${name}
|
||||
hsetprop ${scobj_hpath} klass environment
|
||||
hsetprop ${scobj_hpath} klass ${device_class}
|
||||
hsetprop ${scobj_hpath} data true
|
||||
hsetprop ${scobj_hpath} debug_threshold 5
|
||||
# mkDriver hook code starts
|
||||
@@ -53,17 +53,10 @@ proc ::scobj::oxford12tlv::mkDriver { sct_controller name ip_address tcp_port id
|
||||
handle_exception ${catch_status} ${catch_message}
|
||||
}
|
||||
|
||||
namespace eval ::scobj::oxford12tlv {
|
||||
namespace export debug_threshold
|
||||
namespace export debug_log
|
||||
namespace export sics_log
|
||||
namespace export mkDriver
|
||||
}
|
||||
|
||||
proc add_oxford12tlv {name ip_address tcp_port id datype interval} {
|
||||
proc ::scobj::oxford12tlv::add_driver {name device_class simulation_flag ip_address tcp_port id datype interval} {
|
||||
set catch_status [ catch {
|
||||
::scobj::oxford12tlv::sics_log 9 "add_oxford12tlv ${name} ${ip_address} ${tcp_port} ${id} ${datype} ${interval}"
|
||||
if {[string equal -nocase [SplitReply [environment_simulation]] "false"]} {
|
||||
::scobj::oxford12tlv::sics_log 9 "::scobj::oxford12tlv::add_driver ${name} ${device_class} ${simulation_flag} ${ip_address} ${tcp_port} ${id} ${datype} ${interval}"
|
||||
if {[string equal -nocase "${simulation_flag}" "false"]} {
|
||||
if {[string equal -nocase "aqadapter" "${ip_address}"]} {
|
||||
::scobj::oxford12tlv::sics_log 9 "makesctcontroller sct_${name} aqadapter ${tcp_port}"
|
||||
makesctcontroller sct_${name} aqadapter ${tcp_port}
|
||||
@@ -72,14 +65,27 @@ proc add_oxford12tlv {name ip_address tcp_port id datype interval} {
|
||||
makesctcontroller sct_${name} std ${ip_address}:${tcp_port}
|
||||
}
|
||||
} else {
|
||||
::scobj::oxford12tlv::sics_log 9 "[environment_simulation] => No sctcontroller for oxford12tlv"
|
||||
::scobj::oxford12tlv::sics_log 9 "simulation_flag={simulation_flag} => No sctcontroller for oxford12tlv"
|
||||
}
|
||||
::scobj::oxford12tlv::sics_log 1 "::scobj::oxford12tlv::mkDriver sct_${name} ${name} ${ip_address} ${tcp_port} ${id} ${datype} ${interval}"
|
||||
::scobj::oxford12tlv::mkDriver sct_${name} ${name} ${ip_address} ${tcp_port} ${id} ${datype} ${interval}
|
||||
::scobj::oxford12tlv::sics_log 1 "::scobj::oxford12tlv::mkDriver sct_${name} ${name} ${device_class} ${simulation_flag} ${ip_address} ${tcp_port} ${id} ${datype} ${interval}"
|
||||
::scobj::oxford12tlv::mkDriver sct_${name} ${name} ${device_class} ${simulation_flag} ${ip_address} ${tcp_port} ${id} ${datype} ${interval}
|
||||
} catch_message ]
|
||||
handle_exception ${catch_status} ${catch_message}
|
||||
}
|
||||
|
||||
namespace eval ::scobj::oxford12tlv {
|
||||
namespace export debug_threshold
|
||||
namespace export debug_log
|
||||
namespace export sics_log
|
||||
namespace export mkDriver
|
||||
namespace export add_driver
|
||||
}
|
||||
|
||||
proc add_oxford12tlv {name ip_address tcp_port id datype interval} {
|
||||
set simulation_flag "[string tolower [SplitReply [environment_simulation]]]"
|
||||
::scobj::oxford12tlv::add_driver ${name} "environment" "${simulation_flag}" ${ip_address} ${tcp_port} "${id}" "${datype}" "${interval}"
|
||||
}
|
||||
|
||||
clientput "file evaluation of sct_oxford12tlv.tcl"
|
||||
::scobj::oxford12tlv::sics_log 9 "file evaluation of sct_oxford12tlv.tcl"
|
||||
|
||||
@@ -88,6 +94,8 @@ proc ::scobj::oxford12tlv::read_config {} {
|
||||
set ns "::scobj::oxford12tlv"
|
||||
dict for {k u} $::config_dict {
|
||||
if { [dict exists $u "implementation"] } {
|
||||
set simulation_flag "[string tolower [SplitReply [environment_simulation]]]"
|
||||
set device_class "environment"
|
||||
if { !([dict exists $u "name"] && [dict exists $u "enabled"]) } {
|
||||
continue
|
||||
}
|
||||
@@ -95,6 +103,12 @@ proc ::scobj::oxford12tlv::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]) } {
|
||||
@@ -105,9 +119,9 @@ proc ::scobj::oxford12tlv::read_config {} {
|
||||
continue
|
||||
}
|
||||
if { [string equal -nocase [dict get $v "driver"] "oxford12tlv"] } {
|
||||
if { ![string equal -nocase [SplitReply [environment_simulation]] "false"] } {
|
||||
if { ![string equal -nocase "${simulation_flag}" "false"] } {
|
||||
set asyncqueue "null"
|
||||
${ns}::sics_log 9 "[environment_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"] } {
|
||||
@@ -149,9 +163,9 @@ proc ::scobj::oxford12tlv::read_config {} {
|
||||
error "$name is missing configuration values $missing_list"
|
||||
}
|
||||
if { [string equal -nocase ${asyncqueue} "sct"] } {
|
||||
add_oxford12tlv ${name} ${ip_address} ${tcp_port} {*}$arg_list
|
||||
${ns}::add_driver ${name} ${device_class} ${simulation_flag} ${ip_address} ${tcp_port} {*}$arg_list
|
||||
} else {
|
||||
add_oxford12tlv ${name} "aqadapter" ${asyncqueue} {*}$arg_list
|
||||
${ns}::add_driver ${name} ${device_class} ${simulation_flag} "aqadapter" ${asyncqueue} {*}$arg_list
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -263,14 +263,14 @@ proc ::scobj::tsi_smc::setValue {tc_root nextState cmd_str} {
|
||||
handle_exception ${catch_status} ${catch_message}
|
||||
}
|
||||
|
||||
proc ::scobj::tsi_smc::mkDriver { sct_controller name ip_address tcp_port id } {
|
||||
::scobj::tsi_smc::sics_log 9 "::scobj::tsi_smc::mkDriver ${sct_controller} ${name} ${ip_address} ${tcp_port} ${id}"
|
||||
proc ::scobj::tsi_smc::mkDriver { sct_controller name device_class simulation_flag ip_address tcp_port id } {
|
||||
::scobj::tsi_smc::sics_log 9 "::scobj::tsi_smc::mkDriver ${sct_controller} ${name} ${device_class} ${simulation_flag} ${ip_address} ${tcp_port} ${id}"
|
||||
set ns "[namespace current]"
|
||||
set catch_status [ catch {
|
||||
|
||||
MakeSICSObj ${name} SCT_OBJECT
|
||||
|
||||
sicslist setatt ${name} klass environment
|
||||
sicslist setatt ${name} klass ${device_class}
|
||||
sicslist setatt ${name} long_name ${name}
|
||||
|
||||
set scobj_hpath /sics/${name}
|
||||
@@ -320,10 +320,10 @@ proc ::scobj::tsi_smc::mkDriver { sct_controller name ip_address tcp_port id } {
|
||||
hsetprop ${scobj_hpath} klass "@none"
|
||||
hsetprop ${scobj_hpath} type "part"
|
||||
|
||||
if {[string equal -nocase [SplitReply [environment_simulation]] "false"]} {
|
||||
if {[string equal -nocase "${simulation_flag}" "false"]} {
|
||||
${sct_controller} write ${scobj_hpath}/setpoint
|
||||
} else {
|
||||
::scobj::tsi_smc::sics_log 9 "[environment_simulation] => No poll/write for tsi_smc"
|
||||
::scobj::tsi_smc::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for tsi_smc"
|
||||
}
|
||||
|
||||
hfactory ${scobj_hpath}/a plain spy none
|
||||
@@ -404,7 +404,7 @@ proc ::scobj::tsi_smc::mkDriver { sct_controller name ip_address tcp_port id } {
|
||||
hsetprop ${scobj_hpath}/a/S type "part"
|
||||
hsetprop ${scobj_hpath}/a/S nxalias "${name}_a_S"
|
||||
|
||||
if {[string equal -nocase [SplitReply [environment_simulation]] "false"]} {
|
||||
if {[string equal -nocase "${simulation_flag}" "false"]} {
|
||||
${sct_controller} poll ${scobj_hpath}/a/G 1
|
||||
${sct_controller} poll ${scobj_hpath}/a/J 1
|
||||
${sct_controller} poll ${scobj_hpath}/a/K 1
|
||||
@@ -412,7 +412,7 @@ proc ::scobj::tsi_smc::mkDriver { sct_controller name ip_address tcp_port id } {
|
||||
${sct_controller} poll ${scobj_hpath}/a/O 1
|
||||
${sct_controller} poll ${scobj_hpath}/a/S 1
|
||||
} else {
|
||||
::scobj::tsi_smc::sics_log 9 "[environment_simulation] => No poll/write for tsi_smc"
|
||||
::scobj::tsi_smc::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for tsi_smc"
|
||||
}
|
||||
|
||||
hfactory ${scobj_hpath}/b plain spy none
|
||||
@@ -485,18 +485,18 @@ proc ::scobj::tsi_smc::mkDriver { sct_controller name ip_address tcp_port id } {
|
||||
hsetprop ${scobj_hpath}/b/Rate type "part"
|
||||
hsetprop ${scobj_hpath}/b/Rate nxalias "${name}_b_Rate"
|
||||
|
||||
if {[string equal -nocase [SplitReply [environment_simulation]] "false"]} {
|
||||
if {[string equal -nocase "${simulation_flag}" "false"]} {
|
||||
${sct_controller} write ${scobj_hpath}/b/Lower
|
||||
${sct_controller} write ${scobj_hpath}/b/Pause
|
||||
${sct_controller} write ${scobj_hpath}/b/Ramp
|
||||
${sct_controller} write ${scobj_hpath}/b/Rate
|
||||
} else {
|
||||
::scobj::tsi_smc::sics_log 9 "[environment_simulation] => No poll/write for tsi_smc"
|
||||
::scobj::tsi_smc::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for tsi_smc"
|
||||
}
|
||||
hsetprop ${scobj_hpath} klass environment
|
||||
hsetprop ${scobj_hpath} klass ${device_class}
|
||||
hsetprop ${scobj_hpath} data true
|
||||
hsetprop ${scobj_hpath} debug_threshold 5
|
||||
if {[string equal -nocase [SplitReply [environment_simulation]] "false"]} {
|
||||
if {[string equal -nocase "${simulation_flag}" "false"]} {
|
||||
ansto_makesctdrive ${name}_setpoint ${scobj_hpath}/setpoint ${scobj_hpath}/value ${sct_controller}
|
||||
}
|
||||
# mkDriver hook code goes here
|
||||
@@ -504,31 +504,37 @@ proc ::scobj::tsi_smc::mkDriver { sct_controller name ip_address tcp_port id } {
|
||||
handle_exception ${catch_status} ${catch_message}
|
||||
}
|
||||
|
||||
proc ::scobj::tsi_smc::add_driver {name device_class simulation_flag ip_address tcp_port {id 1}} {
|
||||
set catch_status [ catch {
|
||||
::scobj::tsi_smc::sics_log 9 "::scobj::tsi_smc::add_driver ${name} ${device_class} ${simulation_flag} ${ip_address} ${tcp_port} ${id}"
|
||||
if {[string equal -nocase "${simulation_flag}" "false"]} {
|
||||
if {[string equal -nocase "aqadapter" "${ip_address}"]} {
|
||||
::scobj::tsi_smc::sics_log 9 "makesctcontroller sct_${name} aqadapter ${tcp_port}"
|
||||
makesctcontroller sct_${name} aqadapter ${tcp_port}
|
||||
} else {
|
||||
::scobj::tsi_smc::sics_log 9 "makesctcontroller sct_${name} std ${ip_address}:${tcp_port}"
|
||||
makesctcontroller sct_${name} std ${ip_address}:${tcp_port}
|
||||
}
|
||||
} else {
|
||||
::scobj::tsi_smc::sics_log 9 "simulation_flag={simulation_flag} => No sctcontroller for tsi_smc"
|
||||
}
|
||||
::scobj::tsi_smc::sics_log 1 "::scobj::tsi_smc::mkDriver sct_${name} ${name} ${device_class} ${simulation_flag} ${ip_address} ${tcp_port} ${id}"
|
||||
::scobj::tsi_smc::mkDriver sct_${name} ${name} ${device_class} ${simulation_flag} ${ip_address} ${tcp_port} ${id}
|
||||
} catch_message ]
|
||||
handle_exception ${catch_status} ${catch_message}
|
||||
}
|
||||
|
||||
namespace eval ::scobj::tsi_smc {
|
||||
namespace export debug_threshold
|
||||
namespace export debug_log
|
||||
namespace export sics_log
|
||||
namespace export mkDriver
|
||||
namespace export add_driver
|
||||
}
|
||||
|
||||
proc add_tsi_smc {name ip_address tcp_port {id 1}} {
|
||||
set catch_status [ catch {
|
||||
::scobj::tsi_smc::sics_log 9 "add_tsi_smc ${name} ${ip_address} ${tcp_port} ${id}"
|
||||
if {[string equal -nocase [SplitReply [environment_simulation]] "false"]} {
|
||||
if {[string equal -nocase "aqadapter" "${ip_address}"]} {
|
||||
::scobj::tsi_smc::sics_log 9 "makesctcontroller sct_${name} aqadapter ${tcp_port}"
|
||||
makesctcontroller sct_${name} aqadapter ${tcp_port}
|
||||
} else {
|
||||
::scobj::tsi_smc::sics_log 9 "makesctcontroller sct_${name} std ${ip_address}:${tcp_port}"
|
||||
makesctcontroller sct_${name} std ${ip_address}:${tcp_port}
|
||||
}
|
||||
} else {
|
||||
::scobj::tsi_smc::sics_log 9 "[environment_simulation] => No sctcontroller for tsi_smc"
|
||||
}
|
||||
::scobj::tsi_smc::sics_log 1 "::scobj::tsi_smc::mkDriver sct_${name} ${name} ${ip_address} ${tcp_port} ${id}"
|
||||
::scobj::tsi_smc::mkDriver sct_${name} ${name} ${ip_address} ${tcp_port} ${id}
|
||||
} catch_message ]
|
||||
handle_exception ${catch_status} ${catch_message}
|
||||
set simulation_flag "[string tolower [SplitReply [environment_simulation]]]"
|
||||
::scobj::tsi_smc::add_driver ${name} "environment" "${simulation_flag}" ${ip_address} ${tcp_port} "${{id}" "${1}}"
|
||||
}
|
||||
|
||||
clientput "file evaluation of sct_tsi_smc.tcl"
|
||||
@@ -539,6 +545,8 @@ proc ::scobj::tsi_smc::read_config {} {
|
||||
set ns "::scobj::tsi_smc"
|
||||
dict for {k u} $::config_dict {
|
||||
if { [dict exists $u "implementation"] } {
|
||||
set simulation_flag "[string tolower [SplitReply [environment_simulation]]]"
|
||||
set device_class "environment"
|
||||
if { !([dict exists $u "name"] && [dict exists $u "enabled"]) } {
|
||||
continue
|
||||
}
|
||||
@@ -546,6 +554,12 @@ proc ::scobj::tsi_smc::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]) } {
|
||||
@@ -556,9 +570,9 @@ proc ::scobj::tsi_smc::read_config {} {
|
||||
continue
|
||||
}
|
||||
if { [string equal -nocase [dict get $v "driver"] "tsi_smc"] } {
|
||||
if { ![string equal -nocase [SplitReply [environment_simulation]] "false"] } {
|
||||
if { ![string equal -nocase "${simulation_flag}" "false"] } {
|
||||
set asyncqueue "null"
|
||||
${ns}::sics_log 9 "[environment_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"] } {
|
||||
@@ -600,9 +614,9 @@ proc ::scobj::tsi_smc::read_config {} {
|
||||
error "$name is missing configuration values $missing_list"
|
||||
}
|
||||
if { [string equal -nocase ${asyncqueue} "sct"] } {
|
||||
add_tsi_smc ${name} ${ip_address} ${tcp_port} {*}$arg_list
|
||||
${ns}::add_driver ${name} ${device_class} ${simulation_flag} ${ip_address} ${tcp_port} {*}$arg_list
|
||||
} else {
|
||||
add_tsi_smc ${name} "aqadapter" ${asyncqueue} {*}$arg_list
|
||||
${ns}::add_driver ${name} ${device_class} ${simulation_flag} "aqadapter" ${asyncqueue} {*}$arg_list
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user