Driver generated in RELEASE-3_2 with --sct=before

This commit is contained in:
Douglas Clowes
2014-11-06 15:42:00 +11:00
parent 58ca10883f
commit 741d12d57a

View File

@ -221,11 +221,10 @@ proc ::scobj::he3_polanal::mkDriver { sct_controller name device_class simulatio
set scobj_hpath /sics/${name}
# Start of named group: analyser
hfactory ${scobj_hpath}/analyser plain spy none
hsetprop ${scobj_hpath}/analyser data "true"
hsetprop ${scobj_hpath}/analyser klass "@none"
hsetprop ${scobj_hpath}/analyser type "part"
# Start of var: Amplitude
hfactory ${scobj_hpath}/analyser/Amplitude plain user text
hsetprop ${scobj_hpath}/analyser/Amplitude control true
hsetprop ${scobj_hpath}/analyser/Amplitude data true
@ -237,6 +236,7 @@ proc ::scobj::he3_polanal::mkDriver { sct_controller name device_class simulatio
hsetprop ${scobj_hpath}/analyser/Amplitude type "part"
hsetprop ${scobj_hpath}/analyser/Amplitude nxalias "${name}_analyser_Amplitude"
# Start of var: Field
hfactory ${scobj_hpath}/analyser/Field plain user text
hsetprop ${scobj_hpath}/analyser/Field control true
hsetprop ${scobj_hpath}/analyser/Field data true
@ -249,6 +249,7 @@ proc ::scobj::he3_polanal::mkDriver { sct_controller name device_class simulatio
hsetprop ${scobj_hpath}/analyser/Field type "part"
hsetprop ${scobj_hpath}/analyser/Field nxalias "${name}_analyser_Field"
# Start of var: Freq
hfactory ${scobj_hpath}/analyser/Freq plain user text
hsetprop ${scobj_hpath}/analyser/Freq control true
hsetprop ${scobj_hpath}/analyser/Freq data true
@ -261,6 +262,7 @@ proc ::scobj::he3_polanal::mkDriver { sct_controller name device_class simulatio
hsetprop ${scobj_hpath}/analyser/Freq type "part"
hsetprop ${scobj_hpath}/analyser/Freq nxalias "${name}_analyser_Freq"
# Start of var: Phase
hfactory ${scobj_hpath}/analyser/Phase plain user text
hsetprop ${scobj_hpath}/analyser/Phase control true
hsetprop ${scobj_hpath}/analyser/Phase data true
@ -273,6 +275,7 @@ proc ::scobj::he3_polanal::mkDriver { sct_controller name device_class simulatio
hsetprop ${scobj_hpath}/analyser/Phase type "part"
hsetprop ${scobj_hpath}/analyser/Phase nxalias "${name}_analyser_Phase"
# Start of var: Time2
hfactory ${scobj_hpath}/analyser/Time2 plain user text
hsetprop ${scobj_hpath}/analyser/Time2 control true
hsetprop ${scobj_hpath}/analyser/Time2 data true
@ -285,6 +288,7 @@ proc ::scobj::he3_polanal::mkDriver { sct_controller name device_class simulatio
hsetprop ${scobj_hpath}/analyser/Time2 type "part"
hsetprop ${scobj_hpath}/analyser/Time2 nxalias "${name}_analyser_Time2"
# Start of var: spin
hfactory ${scobj_hpath}/analyser/spin plain user text
hsetprop ${scobj_hpath}/analyser/spin read ${ns}::getValue ${scobj_hpath} rdValue {analyser}
hsetprop ${scobj_hpath}/analyser/spin rdValue ${ns}::rdValue ${scobj_hpath}
@ -305,15 +309,20 @@ proc ::scobj::he3_polanal::mkDriver { sct_controller name device_class simulatio
if {[string equal -nocase "${simulation_flag}" "false"]} {
${sct_controller} poll ${scobj_hpath}/analyser/spin 900
${sct_controller} write ${scobj_hpath}/analyser/spin
hsetprop ${scobj_hpath}/analyser/spin simulated false
} else {
::scobj::he3_polanal::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for he3_polanal"
hsetprop ${scobj_hpath}/analyser/spin simulated true
}
hsetprop ${scobj_hpath}/analyser data "true"
hsetprop ${scobj_hpath}/analyser klass "@none"
hsetprop ${scobj_hpath}/analyser type "part"
# End of named group: analyser
# Start of named group: polariser
hfactory ${scobj_hpath}/polariser plain spy none
hsetprop ${scobj_hpath}/polariser data "true"
hsetprop ${scobj_hpath}/polariser klass "@none"
hsetprop ${scobj_hpath}/polariser type "part"
# Start of var: Amplitude
hfactory ${scobj_hpath}/polariser/Amplitude plain user text
hsetprop ${scobj_hpath}/polariser/Amplitude control true
hsetprop ${scobj_hpath}/polariser/Amplitude data true
@ -325,6 +334,7 @@ proc ::scobj::he3_polanal::mkDriver { sct_controller name device_class simulatio
hsetprop ${scobj_hpath}/polariser/Amplitude type "part"
hsetprop ${scobj_hpath}/polariser/Amplitude nxalias "${name}_polariser_Amplitude"
# Start of var: Field
hfactory ${scobj_hpath}/polariser/Field plain user text
hsetprop ${scobj_hpath}/polariser/Field control true
hsetprop ${scobj_hpath}/polariser/Field data true
@ -337,6 +347,7 @@ proc ::scobj::he3_polanal::mkDriver { sct_controller name device_class simulatio
hsetprop ${scobj_hpath}/polariser/Field type "part"
hsetprop ${scobj_hpath}/polariser/Field nxalias "${name}_polariser_Field"
# Start of var: Freq
hfactory ${scobj_hpath}/polariser/Freq plain user text
hsetprop ${scobj_hpath}/polariser/Freq control true
hsetprop ${scobj_hpath}/polariser/Freq data true
@ -349,6 +360,7 @@ proc ::scobj::he3_polanal::mkDriver { sct_controller name device_class simulatio
hsetprop ${scobj_hpath}/polariser/Freq type "part"
hsetprop ${scobj_hpath}/polariser/Freq nxalias "${name}_polariser_Freq"
# Start of var: Phase
hfactory ${scobj_hpath}/polariser/Phase plain user text
hsetprop ${scobj_hpath}/polariser/Phase control true
hsetprop ${scobj_hpath}/polariser/Phase data true
@ -361,6 +373,7 @@ proc ::scobj::he3_polanal::mkDriver { sct_controller name device_class simulatio
hsetprop ${scobj_hpath}/polariser/Phase type "part"
hsetprop ${scobj_hpath}/polariser/Phase nxalias "${name}_polariser_Phase"
# Start of var: Time2
hfactory ${scobj_hpath}/polariser/Time2 plain user text
hsetprop ${scobj_hpath}/polariser/Time2 control true
hsetprop ${scobj_hpath}/polariser/Time2 data true
@ -373,6 +386,7 @@ proc ::scobj::he3_polanal::mkDriver { sct_controller name device_class simulatio
hsetprop ${scobj_hpath}/polariser/Time2 type "part"
hsetprop ${scobj_hpath}/polariser/Time2 nxalias "${name}_polariser_Time2"
# Start of var: spin
hfactory ${scobj_hpath}/polariser/spin plain user text
hsetprop ${scobj_hpath}/polariser/spin read ${ns}::getValue ${scobj_hpath} rdValue {polariser}
hsetprop ${scobj_hpath}/polariser/spin rdValue ${ns}::rdValue ${scobj_hpath}
@ -393,9 +407,15 @@ proc ::scobj::he3_polanal::mkDriver { sct_controller name device_class simulatio
if {[string equal -nocase "${simulation_flag}" "false"]} {
${sct_controller} poll ${scobj_hpath}/polariser/spin 900
${sct_controller} write ${scobj_hpath}/polariser/spin
hsetprop ${scobj_hpath}/polariser/spin simulated false
} else {
::scobj::he3_polanal::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for he3_polanal"
hsetprop ${scobj_hpath}/polariser/spin simulated true
}
hsetprop ${scobj_hpath}/polariser data "true"
hsetprop ${scobj_hpath}/polariser klass "@none"
hsetprop ${scobj_hpath}/polariser type "part"
# End of named group: polariser
hsetprop ${scobj_hpath} klass ${device_class}
hsetprop ${scobj_hpath} data true
hsetprop ${scobj_hpath} debug_threshold 0
@ -416,7 +436,9 @@ proc ::scobj::he3_polanal::add_driver {name device_class simulation_flag ip_addr
makesctcontroller sct_${name} std ${ip_address}:${tcp_port}
}
} else {
::scobj::he3_polanal::sics_log 9 "simulation_flag={simulation_flag} => No sctcontroller for he3_polanal"
::scobj::he3_polanal::sics_log 9 "simulation_flag=${simulation_flag} => Null sctcontroller for he3_polanal"
::scobj::he3_polanal::sics_log 9 "makesctcontroller sct_${name} aqadapter NULL"
makesctcontroller sct_${name} aqadapter NULL
}
::scobj::he3_polanal::sics_log 1 "::scobj::he3_polanal::mkDriver sct_${name} ${name} ${device_class} ${simulation_flag} ${ip_address} ${tcp_port}"
::scobj::he3_polanal::mkDriver sct_${name} ${name} ${device_class} ${simulation_flag} ${ip_address} ${tcp_port}
@ -434,7 +456,7 @@ namespace eval ::scobj::he3_polanal {
proc add_he3_polanal {name ip_address tcp_port} {
set simulation_flag "[string tolower [SplitReply [rfgen_simulation]]]"
::scobj::he3_polanal::add_driver ${name} "instrument" "${simulation_flag}" ${ip_address} ${tcp_port}
::scobj::he3_polanal::add_driver ${name} "instrument" ${simulation_flag} ${ip_address} ${tcp_port}
}
clientput "file evaluation of sct_he3_polanal.tcl"
@ -473,20 +495,31 @@ proc ::scobj::he3_polanal::read_config {} {
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} std ${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 "terminator"] } {
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"]"
}
}
@ -497,12 +530,9 @@ proc ::scobj::he3_polanal::read_config {} {
if { [dict exists $v "timeout"] } {
${asyncqueue} timeout "[dict get $v "timeout"]"
}
makesctcontroller sct_${name} aqadapter ${asyncqueue}
}
if { [string equal -nocase ${asyncqueue} "sct"] } {
${ns}::add_driver ${name} ${device_class} ${simulation_flag} ${ip_address} ${tcp_port}
} else {
${ns}::add_driver ${name} ${device_class} ${simulation_flag} "aqadapter" ${asyncqueue}
}
${ns}::mkDriver sct_${name} ${device_class} ${simulation_flag} ${ip_address} ${tcp_port}
}
}
}