Regenerate the ls218, nhq200 and sr630 drivers

This commit is contained in:
Douglas Clowes
2014-09-10 14:27:11 +10:00
parent c6d2245941
commit a9a20b4855
3 changed files with 31 additions and 31 deletions

View File

@@ -198,7 +198,7 @@ proc ::scobj::srs_sr630::mkDriver { sct_controller name ip_address tcp_port } {
MakeSICSObj ${name} SCT_OBJECT
sicslist setatt ${name} klass environment
sicslist setatt ${name} klass NXdetector
sicslist setatt ${name} long_name ${name}
set scobj_hpath /sics/${name}
@@ -325,7 +325,7 @@ proc ::scobj::srs_sr630::mkDriver { sct_controller name ip_address tcp_port } {
hsetprop ${scobj_hpath} klass "@none"
hsetprop ${scobj_hpath} type "part"
if {[string equal -nocase [SplitReply [environment_simulation]] "false"]} {
if {[string equal -nocase [SplitReply [detector_simulation]] "false"]} {
${sct_controller} poll ${scobj_hpath}/id 600
${sct_controller} poll ${scobj_hpath}/sensor_01 60
${sct_controller} poll ${scobj_hpath}/sensor_02 600
@@ -336,9 +336,9 @@ proc ::scobj::srs_sr630::mkDriver { sct_controller name ip_address tcp_port } {
${sct_controller} poll ${scobj_hpath}/sensor_07 600
${sct_controller} poll ${scobj_hpath}/sensor_08 600
} else {
::scobj::srs_sr630::sics_log 9 "[environment_simulation] => No poll/write for srs_sr630"
::scobj::srs_sr630::sics_log 9 "[detector_simulation] => No poll/write for srs_sr630"
}
hsetprop ${scobj_hpath} klass environment
hsetprop ${scobj_hpath} klass NXdetector
hsetprop ${scobj_hpath} data true
hsetprop ${scobj_hpath} debug_threshold 5
# mkDriver hook code goes here
@@ -356,7 +356,7 @@ namespace eval ::scobj::srs_sr630 {
proc add_srs_sr630 {name ip_address tcp_port} {
set catch_status [ catch {
::scobj::srs_sr630::sics_log 9 "add_srs_sr630 ${name} ${ip_address} ${tcp_port}"
if {[string equal -nocase [SplitReply [environment_simulation]] "false"]} {
if {[string equal -nocase [SplitReply [detector_simulation]] "false"]} {
if {[string equal -nocase "aqadapter" "${ip_address}"]} {
::scobj::srs_sr630::sics_log 9 "makesctcontroller sct_${name} aqadapter ${tcp_port}"
makesctcontroller sct_${name} aqadapter ${tcp_port}
@@ -365,7 +365,7 @@ proc add_srs_sr630 {name ip_address tcp_port} {
makesctcontroller sct_${name} std ${ip_address}:${tcp_port}
}
} else {
::scobj::srs_sr630::sics_log 9 "[environment_simulation] => No sctcontroller for srs_sr630"
::scobj::srs_sr630::sics_log 9 "[detector_simulation] => No sctcontroller for srs_sr630"
}
::scobj::srs_sr630::sics_log 1 "::scobj::srs_sr630::mkDriver sct_${name} ${name} ${ip_address} ${tcp_port}"
::scobj::srs_sr630::mkDriver sct_${name} ${name} ${ip_address} ${tcp_port}
@@ -398,9 +398,9 @@ proc ::scobj::srs_sr630::read_config {} {
continue
}
if { [string equal -nocase [dict get $v "driver"] "srs_sr630"] } {
if { ![string equal -nocase [SplitReply [environment_simulation]] "false"] } {
if { ![string equal -nocase [SplitReply [detector_simulation]] "false"] } {
set asyncqueue "null"
${ns}::sics_log 9 "[environment_simulation] => using null asyncqueue"
${ns}::sics_log 9 "[detector_simulation] => using null asyncqueue"
} elseif { [dict exists $v "asyncqueue"] } {
set asyncqueue [dict get $v "asyncqueue"]
if { [string equal -nocase ${asyncqueue} "sct"] } {