Regenerate templated drivers to get changes to logging and simulation tests
This commit is contained in:
@@ -13,7 +13,7 @@ proc ::scobj::pfeiffer_hg::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/pfeiffer_hg_[basename ${tc_root}].log" "a"]
|
||||
set fd [open "../log/pfeiffer_hg_[basename ${tc_root}].log" "a"]
|
||||
set line "[clock format [clock seconds] -format "%T"] ${debug_string}"
|
||||
puts ${fd} "${line}"
|
||||
close ${fd}
|
||||
@@ -443,10 +443,12 @@ proc ::scobj::pfeiffer_hg::mkDriver { sct_controller name } {
|
||||
hsetprop ${scobj_hpath}/pressure/setpoint type "drivable"
|
||||
hsetprop ${scobj_hpath}/pressure/setpoint nxalias "${name}_pressure_setpoint"
|
||||
|
||||
if {[SplitReply [environment_simulation]]=="false"} {
|
||||
if {[string equal -nocase [SplitReply [environment_simulation]] "false"]} {
|
||||
${sct_controller} poll ${scobj_hpath}/pressure/sensor 1
|
||||
${sct_controller} write ${scobj_hpath}/pressure/setpoint
|
||||
ansto_makesctdrive ${name}_pressure_setpoint ${scobj_hpath}/pressure/setpoint ${scobj_hpath}/pressure/sensor ${sct_controller}
|
||||
} else {
|
||||
::scobj::pfeiffer_hg::sics_log 9 "[environment_simulation] => No poll/write for pfeiffer_hg"
|
||||
}
|
||||
hsetprop ${scobj_hpath} klass environment
|
||||
hsetprop ${scobj_hpath} debug_threshold 5
|
||||
@@ -468,7 +470,7 @@ namespace eval ::scobj::pfeiffer_hg {
|
||||
proc add_pfeiffer_hg {name IP port} {
|
||||
set catch_status [ catch {
|
||||
::scobj::pfeiffer_hg::sics_log 9 "add_pfeiffer_hg ${name} ${IP} ${port}"
|
||||
if {[SplitReply [environment_simulation]]=="false"} {
|
||||
if {[string equal -nocase [SplitReply [environment_simulation]] "false"]} {
|
||||
if {[string equal -nocase "aqadapter" "${IP}"]} {
|
||||
::scobj::pfeiffer_hg::sics_log 9 "makesctcontroller sct_${name} aqadapter ${port}"
|
||||
makesctcontroller sct_${name} aqadapter ${port}
|
||||
@@ -476,6 +478,8 @@ proc add_pfeiffer_hg {name IP port} {
|
||||
::scobj::pfeiffer_hg::sics_log 9 "makesctcontroller sct_${name} std ${IP}:${port}"
|
||||
makesctcontroller sct_${name} std ${IP}:${port}
|
||||
}
|
||||
} else {
|
||||
::scobj::pfeiffer_hg::sics_log 9 "[environment_simulation] => No sctcontroller for pfeiffer_hg"
|
||||
}
|
||||
::scobj::pfeiffer_hg::sics_log 1 "::scobj::pfeiffer_hg::mkDriver sct_${name} ${name}"
|
||||
::scobj::pfeiffer_hg::mkDriver sct_${name} ${name}
|
||||
@@ -494,7 +498,10 @@ proc ::scobj::pfeiffer_hg::read_config {} {
|
||||
if { [dict get $v "driver"] == "pfeiffer_hg" } {
|
||||
if { [dict get $v enabled] } {
|
||||
set name [dict get $v name]
|
||||
if { [dict exists $v "asyncqueue"] } {
|
||||
if { ![string equal -nocase [SplitReply [environment_simulation]] "false"] } {
|
||||
set asyncqueue "null"
|
||||
${ns}::sics_log 9 "[environment_simulation] => using null asyncqueue"
|
||||
} elseif { [dict exists $v "asyncqueue"] } {
|
||||
set asyncqueue [dict get $v "asyncqueue"]
|
||||
} else {
|
||||
if { [dict exists $v "asyncprotocol"] } {
|
||||
|
||||
Reference in New Issue
Block a user