Regenerate templated drivers to get changes to logging and simulation tests
This commit is contained in:
@@ -10,7 +10,7 @@ proc ::scobj::astrium_chopper::debug_log {tc_root debug_level debug_string} {
|
||||
set catch_status [ catch {
|
||||
set debug_threshold [hgetpropval ${tc_root} debug_threshold]
|
||||
if {${debug_level} >= ${debug_threshold}} {
|
||||
set fd [open "/tmp/astrium_chopper_[basename ${tc_root}].log" "a"]
|
||||
set fd [open "../log/astrium_chopper_[basename ${tc_root}].log" "a"]
|
||||
set line "[clock format [clock seconds] -format "%T"] ${debug_string}"
|
||||
puts ${fd} "${line}"
|
||||
close ${fd}
|
||||
|
||||
@@ -10,7 +10,7 @@ proc ::scobj::shutters::debug_log {tc_root debug_level debug_string} {
|
||||
set catch_status [ catch {
|
||||
set debug_threshold [hgetpropval ${tc_root} debug_threshold]
|
||||
if {${debug_level} >= ${debug_threshold}} {
|
||||
set fd [open "/tmp/shutters_[basename ${tc_root}].log" "a"]
|
||||
set fd [open "../log/shutters_[basename ${tc_root}].log" "a"]
|
||||
set line "[clock format [clock seconds] -format "%T"] ${debug_string}"
|
||||
puts ${fd} "${line}"
|
||||
close ${fd}
|
||||
@@ -255,12 +255,14 @@ proc ::scobj::shutters::mkDriver { sct_controller name } {
|
||||
hsetprop ${scobj_hpath} data "true"
|
||||
hsetprop ${scobj_hpath} nxsave "true"
|
||||
|
||||
if {[SplitReply [motor_simulation]]=="false"} {
|
||||
if {[string equal -nocase [SplitReply [motor_simulation]] "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"
|
||||
}
|
||||
hsetprop ${scobj_hpath} klass instrument
|
||||
hsetprop ${scobj_hpath} debug_threshold 5
|
||||
@@ -280,7 +282,7 @@ namespace eval ::scobj::shutters {
|
||||
proc add_shutters {name IP port} {
|
||||
set catch_status [ catch {
|
||||
::scobj::shutters::sics_log 9 "add_shutters ${name} ${IP} ${port}"
|
||||
if {[SplitReply [motor_simulation]]=="false"} {
|
||||
if {[string equal -nocase [SplitReply [motor_simulation]] "false"]} {
|
||||
if {[string equal -nocase "aqadapter" "${IP}"]} {
|
||||
::scobj::shutters::sics_log 9 "makesctcontroller sct_${name} aqadapter ${port}"
|
||||
makesctcontroller sct_${name} aqadapter ${port}
|
||||
@@ -288,6 +290,8 @@ proc add_shutters {name IP port} {
|
||||
::scobj::shutters::sics_log 9 "makesctcontroller sct_${name} dmc2280 ${IP}:${port}"
|
||||
makesctcontroller sct_${name} dmc2280 ${IP}:${port}
|
||||
}
|
||||
} else {
|
||||
::scobj::shutters::sics_log 9 "[motor_simulation] => No sctcontroller for shutters"
|
||||
}
|
||||
::scobj::shutters::sics_log 1 "::scobj::shutters::mkDriver sct_${name} ${name}"
|
||||
::scobj::shutters::mkDriver sct_${name} ${name}
|
||||
@@ -306,7 +310,10 @@ proc ::scobj::shutters::read_config {} {
|
||||
if { [dict get $v "driver"] == "shutters" } {
|
||||
if { [dict get $v enabled] } {
|
||||
set name [dict get $v name]
|
||||
if { [dict exists $v "asyncqueue"] } {
|
||||
if { ![string equal -nocase [SplitReply [motor_simulation]] "false"] } {
|
||||
set asyncqueue "null"
|
||||
${ns}::sics_log 9 "[motor_simulation] => using null asyncqueue"
|
||||
} elseif { [dict exists $v "asyncqueue"] } {
|
||||
set asyncqueue [dict get $v "asyncqueue"]
|
||||
} else {
|
||||
if { [dict exists $v "asyncprotocol"] } {
|
||||
|
||||
@@ -10,7 +10,7 @@ proc ::scobj::tank::debug_log {tc_root debug_level debug_string} {
|
||||
set catch_status [ catch {
|
||||
set debug_threshold [hgetpropval ${tc_root} debug_threshold]
|
||||
if {${debug_level} >= ${debug_threshold}} {
|
||||
set fd [open "/tmp/tank_[basename ${tc_root}].log" "a"]
|
||||
set fd [open "../log/tank_[basename ${tc_root}].log" "a"]
|
||||
set line "[clock format [clock seconds] -format "%T"] ${debug_string}"
|
||||
puts ${fd} "${line}"
|
||||
close ${fd}
|
||||
|
||||
Reference in New Issue
Block a user