Regenerate all the SCT drivers with new generator
This commit is contained in:
@@ -60,7 +60,7 @@ namespace eval ::scobj::epson_pandp {
|
||||
|
||||
proc add_epson_pandp {name ip_address tcp_port robot_name} {
|
||||
set simulation_flag "[string tolower [SplitReply [environment_simulation]]]"
|
||||
::scobj::epson_pandp::add_driver ${name} "environment" "${simulation_flag}" ${ip_address} ${tcp_port} "${robot_name}"
|
||||
::scobj::epson_pandp::add_driver ${name} "environment" ${simulation_flag} ${ip_address} ${tcp_port} ${robot_name}
|
||||
}
|
||||
|
||||
clientput "file evaluation of sct_epson_pandp.tcl"
|
||||
@@ -96,34 +96,7 @@ proc ::scobj::epson_pandp::read_config {} {
|
||||
continue
|
||||
}
|
||||
if { [string equal -nocase [dict get $v "driver"] "epson_pandp"] } {
|
||||
if { ![string equal -nocase "${simulation_flag}" "false"] } {
|
||||
set asyncqueue "null"
|
||||
${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"] } {
|
||||
set ip_address [dict get $v ip]
|
||||
set tcp_port [dict get $v port]
|
||||
}
|
||||
} 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_address [dict get $v ip]
|
||||
set tcp_port [dict get $v port]
|
||||
MakeAsyncQueue ${asyncqueue} ${asyncprotocol} ${ip_address} ${tcp_port}
|
||||
if { [dict exists $v "timeout"] } {
|
||||
${asyncqueue} timeout "[dict get $v "timeout"]"
|
||||
}
|
||||
}
|
||||
::scobj::epson_pandp::sics_log 9 "No sctcontroller for epson_pandp"
|
||||
set arg_list [list]
|
||||
set missing_list [list]
|
||||
foreach arg {robot_name} {
|
||||
@@ -139,11 +112,7 @@ proc ::scobj::epson_pandp::read_config {} {
|
||||
if { [llength $missing_list] > 0 } {
|
||||
error "$name is missing configuration values $missing_list"
|
||||
}
|
||||
if { [string equal -nocase ${asyncqueue} "sct"] } {
|
||||
${ns}::add_driver ${name} ${device_class} ${simulation_flag} ${ip_address} ${tcp_port} {*}$arg_list
|
||||
} else {
|
||||
${ns}::add_driver ${name} ${device_class} ${simulation_flag} "aqadapter" ${asyncqueue} {*}$arg_list
|
||||
}
|
||||
${ns}::mkDriver sct_${name} ${name} ${device_class} ${simulation_flag} ${ip_address} ${tcp_port} {*}$arg_list
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user