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

@@ -276,7 +276,7 @@ proc ::scobj::nhq_200::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}
@@ -311,11 +311,11 @@ proc ::scobj::nhq_200::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}/break 10
${sct_controller} poll ${scobj_hpath}/id 10
} else {
::scobj::nhq_200::sics_log 9 "[environment_simulation] => No poll/write for nhq_200"
::scobj::nhq_200::sics_log 9 "[detector_simulation] => No poll/write for nhq_200"
}
hfactory ${scobj_hpath}/ch1 plain spy none
@@ -488,7 +488,7 @@ proc ::scobj::nhq_200::mkDriver { sct_controller name ip_address tcp_port } {
hsetprop ${scobj_hpath}/ch1/voltage type "part"
hsetprop ${scobj_hpath}/ch1/voltage nxalias "${name}_ch1_voltage"
if {[string equal -nocase [SplitReply [environment_simulation]] "false"]} {
if {[string equal -nocase [SplitReply [detector_simulation]] "false"]} {
${sct_controller} poll ${scobj_hpath}/ch1/auto_start 5
${sct_controller} poll ${scobj_hpath}/ch1/current 5
${sct_controller} poll ${scobj_hpath}/ch1/i_lim 5
@@ -505,7 +505,7 @@ proc ::scobj::nhq_200::mkDriver { sct_controller name ip_address tcp_port } {
${sct_controller} write ${scobj_hpath}/ch1/v_ramp
${sct_controller} write ${scobj_hpath}/ch1/v_sp
} else {
::scobj::nhq_200::sics_log 9 "[environment_simulation] => No poll/write for nhq_200"
::scobj::nhq_200::sics_log 9 "[detector_simulation] => No poll/write for nhq_200"
}
hfactory ${scobj_hpath}/ch2 plain spy none
@@ -678,7 +678,7 @@ proc ::scobj::nhq_200::mkDriver { sct_controller name ip_address tcp_port } {
hsetprop ${scobj_hpath}/ch2/voltage type "part"
hsetprop ${scobj_hpath}/ch2/voltage nxalias "${name}_ch2_voltage"
if {[string equal -nocase [SplitReply [environment_simulation]] "false"]} {
if {[string equal -nocase [SplitReply [detector_simulation]] "false"]} {
${sct_controller} poll ${scobj_hpath}/ch2/auto_start 5
${sct_controller} poll ${scobj_hpath}/ch2/current 5
${sct_controller} poll ${scobj_hpath}/ch2/i_lim 5
@@ -695,12 +695,12 @@ proc ::scobj::nhq_200::mkDriver { sct_controller name ip_address tcp_port } {
${sct_controller} write ${scobj_hpath}/ch2/v_ramp
${sct_controller} write ${scobj_hpath}/ch2/v_sp
} else {
::scobj::nhq_200::sics_log 9 "[environment_simulation] => No poll/write for nhq_200"
::scobj::nhq_200::sics_log 9 "[detector_simulation] => No poll/write for nhq_200"
}
hsetprop ${scobj_hpath} klass environment
hsetprop ${scobj_hpath} klass NXdetector
hsetprop ${scobj_hpath} data true
hsetprop ${scobj_hpath} debug_threshold 5
if {[string equal -nocase [SplitReply [environment_simulation]] "false"]} {
if {[string equal -nocase [SplitReply [detector_simulation]] "false"]} {
ansto_makesctdrive ${name}_ch1_v_sp ${scobj_hpath}/ch1/v_sp ${scobj_hpath}/ch1/voltage ${sct_controller}
ansto_makesctdrive ${name}_ch2_v_sp ${scobj_hpath}/ch2/v_sp ${scobj_hpath}/ch2/voltage ${sct_controller}
}
@@ -719,7 +719,7 @@ namespace eval ::scobj::nhq_200 {
proc add_nhq_200 {name ip_address tcp_port} {
set catch_status [ catch {
::scobj::nhq_200::sics_log 9 "add_nhq_200 ${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::nhq_200::sics_log 9 "makesctcontroller sct_${name} aqadapter ${tcp_port}"
makesctcontroller sct_${name} aqadapter ${tcp_port}
@@ -728,7 +728,7 @@ proc add_nhq_200 {name ip_address tcp_port} {
makesctcontroller sct_${name} std ${ip_address}:${tcp_port}
}
} else {
::scobj::nhq_200::sics_log 9 "[environment_simulation] => No sctcontroller for nhq_200"
::scobj::nhq_200::sics_log 9 "[detector_simulation] => No sctcontroller for nhq_200"
}
::scobj::nhq_200::sics_log 1 "::scobj::nhq_200::mkDriver sct_${name} ${name} ${ip_address} ${tcp_port}"
::scobj::nhq_200::mkDriver sct_${name} ${name} ${ip_address} ${tcp_port}
@@ -761,9 +761,9 @@ proc ::scobj::nhq_200::read_config {} {
continue
}
if { [string equal -nocase [dict get $v "driver"] "nhq_200"] } {
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"] } {