Regenerate all the SCT drivers with new generator
This commit is contained in:
@@ -243,9 +243,6 @@ proc ::scobj::astrium_chopper::mkDriver { sct_controller name device_class simul
|
||||
set scobj_hpath /sics/${name}
|
||||
|
||||
hfactory ${scobj_hpath}/blade_1 plain spy none
|
||||
hsetprop ${scobj_hpath}/blade_1 data "true"
|
||||
hsetprop ${scobj_hpath}/blade_1 klass "@none"
|
||||
hsetprop ${scobj_hpath}/blade_1 type "part"
|
||||
|
||||
hfactory ${scobj_hpath}/blade_1/aphase plain user float
|
||||
hsetprop ${scobj_hpath}/blade_1/aphase control true
|
||||
@@ -318,14 +315,16 @@ proc ::scobj::astrium_chopper::mkDriver { sct_controller name device_class simul
|
||||
|
||||
if {[string equal -nocase "${simulation_flag}" "false"]} {
|
||||
${sct_controller} poll ${scobj_hpath}/blade_1/state 1
|
||||
hsetprop ${scobj_hpath}/blade_1/state simulated false
|
||||
} else {
|
||||
::scobj::astrium_chopper::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for astrium_chopper"
|
||||
hsetprop ${scobj_hpath}/blade_1/state simulated true
|
||||
}
|
||||
hsetprop ${scobj_hpath}/blade_1 data "true"
|
||||
hsetprop ${scobj_hpath}/blade_1 klass "@none"
|
||||
hsetprop ${scobj_hpath}/blade_1 type "part"
|
||||
|
||||
hfactory ${scobj_hpath}/blade_2 plain spy none
|
||||
hsetprop ${scobj_hpath}/blade_2 data "true"
|
||||
hsetprop ${scobj_hpath}/blade_2 klass "@none"
|
||||
hsetprop ${scobj_hpath}/blade_2 type "part"
|
||||
|
||||
hfactory ${scobj_hpath}/blade_2/aphase plain user float
|
||||
hsetprop ${scobj_hpath}/blade_2/aphase control true
|
||||
@@ -398,14 +397,16 @@ proc ::scobj::astrium_chopper::mkDriver { sct_controller name device_class simul
|
||||
|
||||
if {[string equal -nocase "${simulation_flag}" "false"]} {
|
||||
${sct_controller} poll ${scobj_hpath}/blade_2/state 1
|
||||
hsetprop ${scobj_hpath}/blade_2/state simulated false
|
||||
} else {
|
||||
::scobj::astrium_chopper::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for astrium_chopper"
|
||||
hsetprop ${scobj_hpath}/blade_2/state simulated true
|
||||
}
|
||||
hsetprop ${scobj_hpath}/blade_2 data "true"
|
||||
hsetprop ${scobj_hpath}/blade_2 klass "@none"
|
||||
hsetprop ${scobj_hpath}/blade_2 type "part"
|
||||
|
||||
hfactory ${scobj_hpath}/blade_3 plain spy none
|
||||
hsetprop ${scobj_hpath}/blade_3 data "true"
|
||||
hsetprop ${scobj_hpath}/blade_3 klass "@none"
|
||||
hsetprop ${scobj_hpath}/blade_3 type "part"
|
||||
|
||||
hfactory ${scobj_hpath}/blade_3/aphase plain user float
|
||||
hsetprop ${scobj_hpath}/blade_3/aphase control true
|
||||
@@ -478,14 +479,16 @@ proc ::scobj::astrium_chopper::mkDriver { sct_controller name device_class simul
|
||||
|
||||
if {[string equal -nocase "${simulation_flag}" "false"]} {
|
||||
${sct_controller} poll ${scobj_hpath}/blade_3/state 1
|
||||
hsetprop ${scobj_hpath}/blade_3/state simulated false
|
||||
} else {
|
||||
::scobj::astrium_chopper::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for astrium_chopper"
|
||||
hsetprop ${scobj_hpath}/blade_3/state simulated true
|
||||
}
|
||||
hsetprop ${scobj_hpath}/blade_3 data "true"
|
||||
hsetprop ${scobj_hpath}/blade_3 klass "@none"
|
||||
hsetprop ${scobj_hpath}/blade_3 type "part"
|
||||
|
||||
hfactory ${scobj_hpath}/blade_4 plain spy none
|
||||
hsetprop ${scobj_hpath}/blade_4 data "true"
|
||||
hsetprop ${scobj_hpath}/blade_4 klass "@none"
|
||||
hsetprop ${scobj_hpath}/blade_4 type "part"
|
||||
|
||||
hfactory ${scobj_hpath}/blade_4/aphase plain user float
|
||||
hsetprop ${scobj_hpath}/blade_4/aphase control true
|
||||
@@ -558,9 +561,14 @@ proc ::scobj::astrium_chopper::mkDriver { sct_controller name device_class simul
|
||||
|
||||
if {[string equal -nocase "${simulation_flag}" "false"]} {
|
||||
${sct_controller} poll ${scobj_hpath}/blade_4/state 1
|
||||
hsetprop ${scobj_hpath}/blade_4/state simulated false
|
||||
} else {
|
||||
::scobj::astrium_chopper::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for astrium_chopper"
|
||||
hsetprop ${scobj_hpath}/blade_4/state simulated true
|
||||
}
|
||||
hsetprop ${scobj_hpath}/blade_4 data "true"
|
||||
hsetprop ${scobj_hpath}/blade_4 klass "@none"
|
||||
hsetprop ${scobj_hpath}/blade_4 type "part"
|
||||
hsetprop ${scobj_hpath} klass ${device_class}
|
||||
hsetprop ${scobj_hpath} data true
|
||||
hsetprop ${scobj_hpath} debug_threshold 5
|
||||
@@ -582,7 +590,9 @@ proc ::scobj::astrium_chopper::add_driver {name device_class simulation_flag ip_
|
||||
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 9 "simulation_flag=${simulation_flag} => 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} ${device_class} ${simulation_flag} ${ip_address} ${tcp_port}"
|
||||
::scobj::astrium_chopper::mkDriver sct_${name} ${name} ${device_class} ${simulation_flag} ${ip_address} ${tcp_port}
|
||||
@@ -600,7 +610,7 @@ namespace eval ::scobj::astrium_chopper {
|
||||
|
||||
proc add_astrium_chopper {name ip_address tcp_port} {
|
||||
set simulation_flag "[string tolower [SplitReply [chopper_simulation]]]"
|
||||
::scobj::astrium_chopper::add_driver ${name} "NXdisk_chopper" "${simulation_flag}" ${ip_address} ${tcp_port}
|
||||
::scobj::astrium_chopper::add_driver ${name} "NXdisk_chopper" ${simulation_flag} ${ip_address} ${tcp_port}
|
||||
}
|
||||
|
||||
clientput "file evaluation of sct_astrium_chopper.tcl"
|
||||
@@ -639,20 +649,31 @@ proc ::scobj::astrium_chopper::read_config {} {
|
||||
if { ![string equal -nocase "${simulation_flag}" "false"] } {
|
||||
set asyncqueue "null"
|
||||
${ns}::sics_log 9 "simulation_flag=${simulation_flag} => using null asyncqueue"
|
||||
${ns}::sics_log 9 "makesctcontroller sct_${name} aqadapter NULL"
|
||||
makesctcontroller sct_${name} aqadapter NULL
|
||||
} 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]
|
||||
}
|
||||
makesctcontroller sct_${name} std ${ip_address}:${tcp_port}
|
||||
} else {
|
||||
makesctcontroller sct_${name} aqadapter ${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"] } {
|
||||
if { [dict exists $v "sendterminator"] } {
|
||||
${asyncprotocol} sendterminator "[dict get $v "sendterminator"]"
|
||||
} elseif { [dict exists $v "terminator"] } {
|
||||
${asyncprotocol} sendterminator "[dict get $v "terminator"]"
|
||||
}
|
||||
if { [dict exists $v "replyterminator"] } {
|
||||
${asyncprotocol} replyterminator "[dict get $v "replyterminator"]"
|
||||
} elseif { [dict exists $v "terminator"] } {
|
||||
${asyncprotocol} replyterminator "[dict get $v "terminator"]"
|
||||
}
|
||||
}
|
||||
@@ -663,12 +684,9 @@ proc ::scobj::astrium_chopper::read_config {} {
|
||||
if { [dict exists $v "timeout"] } {
|
||||
${asyncqueue} timeout "[dict get $v "timeout"]"
|
||||
}
|
||||
makesctcontroller sct_${name} aqadapter ${asyncqueue}
|
||||
}
|
||||
if { [string equal -nocase ${asyncqueue} "sct"] } {
|
||||
${ns}::add_driver ${name} ${device_class} ${simulation_flag} ${ip_address} ${tcp_port}
|
||||
} else {
|
||||
${ns}::add_driver ${name} ${device_class} ${simulation_flag} "aqadapter" ${asyncqueue}
|
||||
}
|
||||
${ns}::mkDriver sct_${name} ${name} ${device_class} ${simulation_flag} ${ip_address} ${tcp_port}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user