Merge branch 'RELEASE-3_1' into RELEASE-3_2
Conflicts: sics/site_ansto/instrument/config/beamline/sct_he3_polanal.tcl sics/site_ansto/instrument/hipd/wombat_configuration.tcl sics/site_ansto/instrument/hrpd/echidna_configuration.tcl sics/site_ansto/instrument/pelican/pelican_configuration.tcl
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
# vim: ts=8 sts=2 sw=2 expandtab autoindent smartindent nocindent
|
||||
driver bruker = {
|
||||
wrapper_property nosctcontroller = True
|
||||
protocol = astvelsel
|
||||
class = environment
|
||||
simulation_group = environment_simulation
|
||||
add_args = 'id datype {tol 0.1}'
|
||||
make_args = 'id datype tol'
|
||||
code mkWrapper = {%%
|
||||
add_bruker_BEC1 $name $ip_address $tcp_port $tol
|
||||
add_bruker_bec1 $name $ip_address $tcp_port $tol $id $datype
|
||||
%%}
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ proc ::scobj::bruker::mkDriver { sct_controller name device_class simulation_fla
|
||||
set catch_status [ catch {
|
||||
|
||||
# mkWrapper hook code starts
|
||||
add_bruker_BEC1 $name $ip_address $tcp_port $tol
|
||||
add_bruker_bec1 $name $ip_address $tcp_port $tol $id $datype
|
||||
# mkWrapper hook code ends
|
||||
} catch_message ]
|
||||
handle_exception ${catch_status} ${catch_message}
|
||||
@@ -45,19 +45,7 @@ proc ::scobj::bruker::mkDriver { sct_controller name device_class simulation_fla
|
||||
proc ::scobj::bruker::add_driver {name device_class simulation_flag ip_address tcp_port id datype {tol 0.1}} {
|
||||
set catch_status [ catch {
|
||||
::scobj::bruker::sics_log 9 "::scobj::bruker::add_driver ${name} ${device_class} ${simulation_flag} ${ip_address} ${tcp_port} ${id} ${datype} ${tol}"
|
||||
if {[string equal -nocase "${simulation_flag}" "false"]} {
|
||||
if {[string equal -nocase "aqadapter" "${ip_address}"]} {
|
||||
::scobj::bruker::sics_log 9 "makesctcontroller sct_${name} aqadapter ${tcp_port}"
|
||||
makesctcontroller sct_${name} aqadapter ${tcp_port}
|
||||
} else {
|
||||
::scobj::bruker::sics_log 9 "makesctcontroller sct_${name} astvelsel ${ip_address}:${tcp_port}"
|
||||
makesctcontroller sct_${name} astvelsel ${ip_address}:${tcp_port}
|
||||
}
|
||||
} else {
|
||||
::scobj::bruker::sics_log 9 "simulation_flag=${simulation_flag} => Null sctcontroller for bruker"
|
||||
::scobj::bruker::sics_log 9 "makesctcontroller sct_${name} aqadapter NULL"
|
||||
makesctcontroller sct_${name} aqadapter NULL
|
||||
}
|
||||
::scobj::bruker::sics_log 9 "No sctcontroller for bruker"
|
||||
::scobj::bruker::sics_log 1 "::scobj::bruker::mkDriver sct_${name} ${name} ${device_class} ${simulation_flag} ${ip_address} ${tcp_port} ${id} ${datype} ${tol}"
|
||||
::scobj::bruker::mkDriver sct_${name} ${name} ${device_class} ${simulation_flag} ${ip_address} ${tcp_port} ${id} ${datype} ${tol}
|
||||
} catch_message ]
|
||||
@@ -110,46 +98,9 @@ proc ::scobj::bruker::read_config {} {
|
||||
continue
|
||||
}
|
||||
if { [string equal -nocase [dict get $v "driver"] "bruker"] } {
|
||||
if { ![string equal -nocase "${simulation_flag}" "false"] } {
|
||||
set asyncqueue "null"
|
||||
${ns}::sics_log 9 "simulation_flag=${simulation_flag} => using null asyncqueue"
|
||||
${ns}::sics_log 9 "makesctcontroller sct_${name} aqadapter NULL"
|
||||
makesctcontroller sct_${name} aqadapter NULL
|
||||
} elseif { [dict exists $v "asyncqueue"] } {
|
||||
set asyncqueue [dict get $v "asyncqueue"]
|
||||
if { [string equal -nocase ${asyncqueue} "sct"] } {
|
||||
set ip_address [dict get $v ip]
|
||||
set tcp_port [dict get $v port]
|
||||
makesctcontroller sct_${name} astvelsel ${ip_address}:${tcp_port}
|
||||
} else {
|
||||
makesctcontroller sct_${name} aqadapter ${asyncqueue}
|
||||
}
|
||||
} else {
|
||||
if { [dict exists $v "asyncprotocol"] } {
|
||||
set asyncprotocol [dict get $v "asyncprotocol"]
|
||||
} else {
|
||||
set asyncprotocol ${name}_protocol
|
||||
MakeAsyncProtocol ${asyncprotocol}
|
||||
if { [dict exists $v "sendterminator"] } {
|
||||
${asyncprotocol} sendterminator "[dict get $v "sendterminator"]"
|
||||
} elseif { [dict exists $v "terminator"] } {
|
||||
${asyncprotocol} sendterminator "[dict get $v "terminator"]"
|
||||
}
|
||||
if { [dict exists $v "replyterminator"] } {
|
||||
${asyncprotocol} replyterminator "[dict get $v "replyterminator"]"
|
||||
} elseif { [dict exists $v "terminator"] } {
|
||||
${asyncprotocol} replyterminator "[dict get $v "terminator"]"
|
||||
}
|
||||
}
|
||||
set asyncqueue ${name}_queue
|
||||
set ip_address [dict get $v ip]
|
||||
set tcp_port [dict get $v port]
|
||||
MakeAsyncQueue ${asyncqueue} ${asyncprotocol} ${ip_address} ${tcp_port}
|
||||
if { [dict exists $v "timeout"] } {
|
||||
${asyncqueue} timeout "[dict get $v "timeout"]"
|
||||
}
|
||||
makesctcontroller sct_${name} aqadapter ${asyncqueue}
|
||||
}
|
||||
::scobj::bruker::sics_log 9 "No sctcontroller for bruker"
|
||||
set ip_address [dict get $v ip]
|
||||
set tcp_port [dict get $v port]
|
||||
set arg_list [list]
|
||||
set missing_list [list]
|
||||
foreach arg {id datype tol} {
|
||||
|
||||
@@ -106,6 +106,8 @@ proc ::scobj::green_magnet_labview::read_config {} {
|
||||
}
|
||||
if { [string equal -nocase [dict get $v "driver"] "green_magnet_labview"] } {
|
||||
::scobj::green_magnet_labview::sics_log 9 "No sctcontroller for green_magnet_labview"
|
||||
set ip_address [dict get $v ip]
|
||||
set tcp_port [dict get $v port]
|
||||
${ns}::mkDriver sct_${name} ${name} ${device_class} ${simulation_flag} ${ip_address} ${tcp_port}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,10 +37,12 @@ proc ::scobj::oxford12tlv::mkDriver { sct_controller name device_class simulatio
|
||||
|
||||
MakeSICSObj ${name} SCT_OBJECT
|
||||
|
||||
sicslist setatt ${name} driver oxford12tlv
|
||||
sicslist setatt ${name} klass ${device_class}
|
||||
sicslist setatt ${name} long_name ${name}
|
||||
|
||||
set scobj_hpath /sics/${name}
|
||||
hsetprop ${scobj_hpath} driver oxford12tlv
|
||||
hsetprop ${scobj_hpath} klass ${device_class}
|
||||
hsetprop ${scobj_hpath} data true
|
||||
hsetprop ${scobj_hpath} debug_threshold 5
|
||||
|
||||
@@ -36,7 +36,7 @@ proc ::scobj::bruker::mkDriver { sct_controller name device_class simulation_fla
|
||||
set catch_status [ catch {
|
||||
|
||||
# mkWrapper hook code starts
|
||||
add_bruker_BEC1 $name $ip_address $tcp_port $tol
|
||||
add_bruker_bec1 $name $ip_address $tcp_port $tol $id $datype
|
||||
# mkWrapper hook code ends
|
||||
} catch_message ]
|
||||
handle_exception ${catch_status} ${catch_message}
|
||||
@@ -45,19 +45,7 @@ proc ::scobj::bruker::mkDriver { sct_controller name device_class simulation_fla
|
||||
proc ::scobj::bruker::add_driver {name device_class simulation_flag ip_address tcp_port id datype {tol 0.1}} {
|
||||
set catch_status [ catch {
|
||||
::scobj::bruker::sics_log 9 "::scobj::bruker::add_driver ${name} ${device_class} ${simulation_flag} ${ip_address} ${tcp_port} ${id} ${datype} ${tol}"
|
||||
if {[string equal -nocase "${simulation_flag}" "false"]} {
|
||||
if {[string equal -nocase "aqadapter" "${ip_address}"]} {
|
||||
::scobj::bruker::sics_log 9 "makesctcontroller sct_${name} aqadapter ${tcp_port}"
|
||||
makesctcontroller sct_${name} aqadapter ${tcp_port}
|
||||
} else {
|
||||
::scobj::bruker::sics_log 9 "makesctcontroller sct_${name} astvelsel ${ip_address}:${tcp_port}"
|
||||
makesctcontroller sct_${name} astvelsel ${ip_address}:${tcp_port}
|
||||
}
|
||||
} else {
|
||||
::scobj::bruker::sics_log 9 "simulation_flag=${simulation_flag} => Null sctcontroller for bruker"
|
||||
::scobj::bruker::sics_log 9 "makesctcontroller sct_${name} aqadapter NULL"
|
||||
makesctcontroller sct_${name} aqadapter NULL
|
||||
}
|
||||
::scobj::bruker::sics_log 9 "No sctcontroller for bruker"
|
||||
::scobj::bruker::sics_log 1 "::scobj::bruker::mkDriver sct_${name} ${name} ${device_class} ${simulation_flag} ${ip_address} ${tcp_port} ${id} ${datype} ${tol}"
|
||||
::scobj::bruker::mkDriver sct_${name} ${name} ${device_class} ${simulation_flag} ${ip_address} ${tcp_port} ${id} ${datype} ${tol}
|
||||
} catch_message ]
|
||||
@@ -110,46 +98,9 @@ proc ::scobj::bruker::read_config {} {
|
||||
continue
|
||||
}
|
||||
if { [string equal -nocase [dict get $v "driver"] "bruker"] } {
|
||||
if { ![string equal -nocase "${simulation_flag}" "false"] } {
|
||||
set asyncqueue "null"
|
||||
${ns}::sics_log 9 "simulation_flag=${simulation_flag} => using null asyncqueue"
|
||||
${ns}::sics_log 9 "makesctcontroller sct_${name} aqadapter NULL"
|
||||
makesctcontroller sct_${name} aqadapter NULL
|
||||
} elseif { [dict exists $v "asyncqueue"] } {
|
||||
set asyncqueue [dict get $v "asyncqueue"]
|
||||
if { [string equal -nocase ${asyncqueue} "sct"] } {
|
||||
set ip_address [dict get $v ip]
|
||||
set tcp_port [dict get $v port]
|
||||
makesctcontroller sct_${name} astvelsel ${ip_address}:${tcp_port}
|
||||
} else {
|
||||
makesctcontroller sct_${name} aqadapter ${asyncqueue}
|
||||
}
|
||||
} else {
|
||||
if { [dict exists $v "asyncprotocol"] } {
|
||||
set asyncprotocol [dict get $v "asyncprotocol"]
|
||||
} else {
|
||||
set asyncprotocol ${name}_protocol
|
||||
MakeAsyncProtocol ${asyncprotocol}
|
||||
if { [dict exists $v "sendterminator"] } {
|
||||
${asyncprotocol} sendterminator "[dict get $v "sendterminator"]"
|
||||
} elseif { [dict exists $v "terminator"] } {
|
||||
${asyncprotocol} sendterminator "[dict get $v "terminator"]"
|
||||
}
|
||||
if { [dict exists $v "replyterminator"] } {
|
||||
${asyncprotocol} replyterminator "[dict get $v "replyterminator"]"
|
||||
} elseif { [dict exists $v "terminator"] } {
|
||||
${asyncprotocol} replyterminator "[dict get $v "terminator"]"
|
||||
}
|
||||
}
|
||||
set asyncqueue ${name}_queue
|
||||
set ip_address [dict get $v ip]
|
||||
set tcp_port [dict get $v port]
|
||||
MakeAsyncQueue ${asyncqueue} ${asyncprotocol} ${ip_address} ${tcp_port}
|
||||
if { [dict exists $v "timeout"] } {
|
||||
${asyncqueue} timeout "[dict get $v "timeout"]"
|
||||
}
|
||||
makesctcontroller sct_${name} aqadapter ${asyncqueue}
|
||||
}
|
||||
::scobj::bruker::sics_log 9 "No sctcontroller for bruker"
|
||||
set ip_address [dict get $v ip]
|
||||
set tcp_port [dict get $v port]
|
||||
set arg_list [list]
|
||||
set missing_list [list]
|
||||
foreach arg {id datype tol} {
|
||||
|
||||
@@ -375,7 +375,7 @@ proc inTolerance {expectedLength} {
|
||||
set nodename $tc_root/sensor/nominal_outp_current
|
||||
set setpt [hval $nodename]
|
||||
set nodename $tc_root/sensor/desired_current
|
||||
set nominal_outp_current [hval $nodename]
|
||||
set NominalOutpCurrent [hval $nodename]
|
||||
# clientput "inTolerance(): comparing sensor/setpoint=$setpt with actual sensorValue=$temp"
|
||||
set diff [expr {abs($setpt - $NominalOutpCurrent)}]
|
||||
if {$diff > $::scobj::bruker_BEC1::bruker_BEC1_driveTolerance} {
|
||||
@@ -851,7 +851,7 @@ proc checktol {tc_root} {
|
||||
set catch_status [ catch {
|
||||
set retVal 0
|
||||
set sensorValue $tc_root/sensor/desired_current
|
||||
set nominal_outp_current [hval $sensorValue]
|
||||
set NominalOutpCurrent [hval $sensorValue]
|
||||
set isetp $tc_root/sensor/nominal_outp_current
|
||||
set setpt [hval $isetp]
|
||||
set tol [hval $tc_root/emon/tolerance]
|
||||
|
||||
@@ -278,6 +278,7 @@ proc ::scobj::tsi_smc::mkDriver { sct_controller name device_class simulation_fl
|
||||
|
||||
MakeSICSObj ${name} SCT_OBJECT
|
||||
|
||||
sicslist setatt ${name} driver tsi_smc
|
||||
sicslist setatt ${name} klass ${device_class}
|
||||
sicslist setatt ${name} long_name ${name}
|
||||
|
||||
@@ -564,6 +565,7 @@ proc ::scobj::tsi_smc::mkDriver { sct_controller name device_class simulation_fl
|
||||
hsetprop ${scobj_hpath}/b data "true"
|
||||
hsetprop ${scobj_hpath}/b klass "@none"
|
||||
hsetprop ${scobj_hpath}/b type "part"
|
||||
hsetprop ${scobj_hpath} driver tsi_smc
|
||||
hsetprop ${scobj_hpath} klass ${device_class}
|
||||
hsetprop ${scobj_hpath} data true
|
||||
hsetprop ${scobj_hpath} debug_threshold 5
|
||||
|
||||
Reference in New Issue
Block a user