Merge branch 'RELEASE-3_1' into RELEASE-3_2

Conflicts:
	sics/site_ansto/instrument/hipd/wombat_configuration.tcl
	sics/site_ansto/instrument/hrpd/echidna_configuration.tcl
	sics/site_ansto/instrument/kookaburra/kookaburra_configuration.tcl
	sics/site_ansto/instrument/reflectometer/platypus_configuration.tcl
	sics/site_ansto/instrument/sans/config/environment/sct_antonparr_MCR500.tcl
	sics/site_ansto/instrument/tas/taipan_configuration.tcl
This commit is contained in:
Douglas Clowes
2015-03-05 13:53:47 +11:00
41 changed files with 1967 additions and 310 deletions

View File

@@ -22,7 +22,7 @@ driver julabo_lh45_gen = {
permlink = 'T.SP01';
writeable = 1; write_function = setPoint; write_command = 'out_sp_00';
driveable = sensor/'value';
lowerlimit = 10; upperlimit = 90; tolerance = '${tol}';
lowerlimit = -20; upperlimit = 90; tolerance = '${tol}';
}
var overtemp_warnlimit = {
read_command = 'in_sp_03';

View File

@@ -485,7 +485,7 @@ proc ::scobj::julabo_lh45_gen::mkDriver { sct_controller name device_class simul
hsetprop ${scobj_hpath}/setpoint data true
hsetprop ${scobj_hpath}/setpoint mutable true
hsetprop ${scobj_hpath}/setpoint nxsave true
hsetprop ${scobj_hpath}/setpoint lowerlimit 10
hsetprop ${scobj_hpath}/setpoint lowerlimit -20
hsetprop ${scobj_hpath}/setpoint upperlimit 90
hsetprop ${scobj_hpath}/setpoint tolerance ${tol}
hsetprop ${scobj_hpath}/setpoint permlink data_set "T[format "%02d" ${id}]SP01"

View File

@@ -439,3 +439,88 @@ proc add_julabo_lh45 { name IP port {sensor "bath"} {_tol 5.0} {CID 1} {CTYPE T}
}
makesctemon $name /sics/$name/emon/monmode /sics/$name/emon/isintol /sics/$name/emon/errhandler
}
namespace eval ::scobj::julabo_lh45 {
set debug_threshold 5
}
proc ::scobj::julabo_lh45::sics_log {debug_level debug_string} {
set catch_status [ catch {
set debug_threshold ${::scobj::julabo_lh45::debug_threshold}
if {${debug_level} >= ${debug_threshold}} {
sicslog "::scobj::julabo_lh45::${debug_string}"
}
} catch_message ]
}
clientput "file evaluation of sct_julabo_lh45.tcl"
::scobj::julabo_lh45::sics_log 9 "file evaluation of sct_julabo_lh45.tcl"
proc ::scobj::julabo_lh45::read_config {} {
set catch_status [ catch {
set ns "::scobj::julabo_lh45"
dict for {k v} $::config_dict {
if { [dict exists $v "implementation"] } {
if { !([dict exists $v "name"] && [dict exists $v "enabled"]) } {
continue
}
set name [dict get $v name]
set enabled [string tolower [dict get $v "enabled"]]
set implementation [dict get $v "implementation"]
if { !([dict exists $::config_dict $implementation]) } {
continue
}
set v [dict get $::config_dict $implementation]
if { !([dict exists $v "driver"]) } {
continue
}
if { [string equal -nocase [dict get $v "driver"] "julabo_lh45"] } {
if { [string equal -nocase $enabled "true" ] || [string equal -nocase $enabled "always"] } {
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"] } {
set asyncprotocol [dict get $v "asyncprotocol"]
} else {
set asyncprotocol ${name}_protocol
MakeAsyncProtocol ${asyncprotocol}
if { [dict exists $v "terminator"] } {
${asyncprotocol} sendterminator "[dict get $v "terminator"]"
${asyncprotocol} replyterminator "[dict get $v "terminator"]"
}
}
set asyncqueue ${name}_queue
set IP [dict get $v ip]
set PORT [dict get $v port]
MakeAsyncQueue ${asyncqueue} ${asyncprotocol} ${IP} ${PORT}
if { [dict exists $v "timeout"] } {
${asyncqueue} timeout "[dict get $v "timeout"]"
}
}
set arg_list [list]
foreach arg {ctrl_sensor tol id type} {
if {[dict exists $v $arg]} {
lappend arg_list "[dict get $v $arg]"
} else {
${ns}::sics_log 9 "Missing configuration value $arg"
error "Missing configuration value $arg"
}
}
add_julabo_lh45 ${name} "aqadapter" ${asyncqueue} {*}$arg_list
}
}
}
}
} catch_message ]
handle_exception ${catch_status} ${catch_message}
}
if { [info exists ::config_dict] } {
::scobj::julabo_lh45::read_config
} else {
::scobj::julabo_lh45::sics_log 5 "No config dict"
}

View File

@@ -50,7 +50,7 @@ namespace eval ::scobj::[set vendor]_[set device] {
proc debug_log {debug_level arg_string} {
# write a timestamped string message to a log file for debugging
set debug_threshold 0
set debug_threshold 5
if {$debug_level >= $debug_threshold} {
set fd [open "[set [namespace current]::log_file]" "a"]
set line "[clock format [clock seconds] -format "%T"] $arg_string"