Regenerate template drivers
This commit is contained in:
@@ -230,8 +230,8 @@ proc ::scobj::astrium_chopper::setValue {tc_root nextState cmd_str} {
|
||||
handle_exception ${catch_status} ${catch_message}
|
||||
}
|
||||
|
||||
proc ::scobj::astrium_chopper::mkDriver { sct_controller name } {
|
||||
::scobj::astrium_chopper::sics_log 9 "::scobj::astrium_chopper::mkDriver for ${name}"
|
||||
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}"
|
||||
set ns "[namespace current]"
|
||||
set catch_status [ catch {
|
||||
|
||||
@@ -577,22 +577,24 @@ namespace eval ::scobj::astrium_chopper {
|
||||
namespace export mkDriver
|
||||
}
|
||||
|
||||
proc add_astrium_chopper {name IP port} {
|
||||
proc add_astrium_chopper {name ip_address tcp_port} {
|
||||
set catch_status [ catch {
|
||||
::scobj::astrium_chopper::sics_log 9 "add_astrium_chopper ${name} ${IP} ${port}"
|
||||
::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}"]} {
|
||||
::scobj::astrium_chopper::sics_log 9 "makesctcontroller sct_${name} aqadapter ${port}"
|
||||
makesctcontroller sct_${name} aqadapter ${port}
|
||||
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}:${port}"
|
||||
makesctcontroller sct_${name} std ${IP}:${port}
|
||||
::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 9 "[chopper_simulation] => Null sctcontroller for astrium_chopper"
|
||||
::scobj::astrium_chopper::sics_log 9 "makesctcontroller sct_${name} aqadapter NULL"
|
||||
makesctcontroller sct_${name} aqadapter NULL
|
||||
}
|
||||
::scobj::astrium_chopper::sics_log 1 "::scobj::astrium_chopper::mkDriver sct_${name} ${name}"
|
||||
::scobj::astrium_chopper::mkDriver sct_${name} ${name}
|
||||
::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}
|
||||
}
|
||||
@@ -628,8 +630,8 @@ proc ::scobj::astrium_chopper::read_config {} {
|
||||
} elseif { [dict exists $v "asyncqueue"] } {
|
||||
set asyncqueue [dict get $v "asyncqueue"]
|
||||
if { [string equal -nocase ${asyncqueue} "sct"] } {
|
||||
set IP [dict get $v ip]
|
||||
set PORT [dict get $v port]
|
||||
set ip_address [dict get $v ip]
|
||||
set tcp_port [dict get $v port]
|
||||
}
|
||||
} else {
|
||||
if { [dict exists $v "asyncprotocol"] } {
|
||||
@@ -643,15 +645,15 @@ proc ::scobj::astrium_chopper::read_config {} {
|
||||
}
|
||||
}
|
||||
set asyncqueue ${name}_queue
|
||||
set IP [dict get $v ip]
|
||||
set PORT [dict get $v port]
|
||||
MakeAsyncQueue ${asyncqueue} ${asyncprotocol} ${IP} ${PORT}
|
||||
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"]"
|
||||
}
|
||||
}
|
||||
if { [string equal -nocase ${asyncqueue} "sct"] } {
|
||||
add_astrium_chopper ${name} ${IP} ${PORT}
|
||||
add_astrium_chopper ${name} ${ip_address} ${tcp_port}
|
||||
} else {
|
||||
add_astrium_chopper ${name} "aqadapter" ${asyncqueue}
|
||||
}
|
||||
|
||||
@@ -294,7 +294,9 @@ proc add_shutters {name 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 9 "[motor_simulation] => Null sctcontroller for shutters"
|
||||
::scobj::shutters::sics_log 9 "makesctcontroller sct_${name} aqadapter NULL"
|
||||
makesctcontroller sct_${name} aqadapter NULL
|
||||
}
|
||||
::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}
|
||||
|
||||
@@ -342,7 +342,9 @@ 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 "[motor_simulation] => Null sctcontroller for tank"
|
||||
::scobj::tank::sics_log 9 "makesctcontroller sct_${name} aqadapter NULL"
|
||||
makesctcontroller sct_${name} aqadapter NULL
|
||||
}
|
||||
::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}
|
||||
|
||||
Reference in New Issue
Block a user