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

@@ -164,7 +164,7 @@ proc ::scobj::lakeshore_218::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}
@@ -186,10 +186,10 @@ proc ::scobj::lakeshore_218::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}/krdg 1
} else {
::scobj::lakeshore_218::sics_log 9 "[environment_simulation] => No poll/write for lakeshore_218"
::scobj::lakeshore_218::sics_log 9 "[detector_simulation] => No poll/write for lakeshore_218"
}
hfactory ${scobj_hpath}/sensor plain spy none
@@ -301,7 +301,7 @@ proc ::scobj::lakeshore_218::mkDriver { sct_controller name ip_address tcp_port
hsetprop ${scobj_hpath}/sensor/ch8 type "part"
hsetprop ${scobj_hpath}/sensor/ch8 nxalias "${name}_sensor_ch8"
if {[string equal -nocase [SplitReply [environment_simulation]] "false"]} {
if {[string equal -nocase [SplitReply [detector_simulation]] "false"]} {
${sct_controller} poll ${scobj_hpath}/sensor/ch1 1
${sct_controller} poll ${scobj_hpath}/sensor/ch2 1
${sct_controller} poll ${scobj_hpath}/sensor/ch3 1
@@ -311,9 +311,9 @@ proc ::scobj::lakeshore_218::mkDriver { sct_controller name ip_address tcp_port
${sct_controller} poll ${scobj_hpath}/sensor/ch7 1
${sct_controller} poll ${scobj_hpath}/sensor/ch8 1
} else {
::scobj::lakeshore_218::sics_log 9 "[environment_simulation] => No poll/write for lakeshore_218"
::scobj::lakeshore_218::sics_log 9 "[detector_simulation] => No poll/write for lakeshore_218"
}
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
@@ -331,7 +331,7 @@ namespace eval ::scobj::lakeshore_218 {
proc add_lakeshore_218 {name ip_address tcp_port} {
set catch_status [ catch {
::scobj::lakeshore_218::sics_log 9 "add_lakeshore_218 ${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::lakeshore_218::sics_log 9 "makesctcontroller sct_${name} aqadapter ${tcp_port}"
makesctcontroller sct_${name} aqadapter ${tcp_port}
@@ -340,7 +340,7 @@ proc add_lakeshore_218 {name ip_address tcp_port} {
makesctcontroller sct_${name} std ${ip_address}:${tcp_port}
}
} else {
::scobj::lakeshore_218::sics_log 9 "[environment_simulation] => No sctcontroller for lakeshore_218"
::scobj::lakeshore_218::sics_log 9 "[detector_simulation] => No sctcontroller for lakeshore_218"
}
::scobj::lakeshore_218::sics_log 1 "::scobj::lakeshore_218::mkDriver sct_${name} ${name} ${ip_address} ${tcp_port}"
::scobj::lakeshore_218::mkDriver sct_${name} ${name} ${ip_address} ${tcp_port}
@@ -373,9 +373,9 @@ proc ::scobj::lakeshore_218::read_config {} {
continue
}
if { [string equal -nocase [dict get $v "driver"] "lakeshore_218"] } {
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"] } {

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"] } {