Merging release 2.0 branch with CVS trunk
r2601 | ffr | 2008-05-30 10:26:57 +1000 (Fri, 30 May 2008) | 2 lines
This commit is contained in:
committed by
Douglas Clowes
parent
4a937e1608
commit
0749b0effa
@@ -1,30 +1,104 @@
|
||||
# SICS common configuration
|
||||
|
||||
# $Revision: 1.32 $
|
||||
# $Date: 2007-11-05 02:09:06 $
|
||||
# $Revision: 1.33 $
|
||||
# $Date: 2008-05-30 00:26:54 $
|
||||
# Author: Ferdi Franceschini (ffr@ansto.gov.au)
|
||||
# Last revision by $Author: ffr $
|
||||
|
||||
#set sicsroot /usr/local/sics
|
||||
set sicsroot ../
|
||||
VarMake opal_simulation Text internal
|
||||
opal_simulation false
|
||||
|
||||
VarMake detector_simulation Text internal
|
||||
detector_simulation false
|
||||
|
||||
VarMake hmm_simulation Text internal
|
||||
hmm_simulation false
|
||||
|
||||
VarMake environment_simulation Text internal
|
||||
environment_simulation false
|
||||
|
||||
VarMake counter_simulation Text internal
|
||||
counter_simulation false
|
||||
|
||||
VarMake motor_simulation Text internal
|
||||
motor_simulation false
|
||||
|
||||
VarMake chopper_simulation Text internal
|
||||
chopper_simulation false
|
||||
|
||||
VarMake plc_simulation Text internal
|
||||
plc_simulation false
|
||||
|
||||
VarMake sics_fullsimulation Text internal
|
||||
|
||||
source util/utility.tcl
|
||||
proc syncbackup {file} {
|
||||
backup motorSave
|
||||
backup $file
|
||||
backup motorSave
|
||||
}
|
||||
publish syncbackup Spy
|
||||
if {[info exists env(SICS_SIMULATION)] != 1} {
|
||||
set sicsroot ../
|
||||
source sics_ports.tcl
|
||||
sics_fullsimulation false
|
||||
} else {
|
||||
switch $env(SICS_SIMULATION) {
|
||||
"full" {
|
||||
set sicsroot ../
|
||||
source sics_ports.tcl
|
||||
sics_fullsimulation true
|
||||
}
|
||||
"script_validator" {
|
||||
VarMake sics_script_validator Text internal
|
||||
sics_script_validator true
|
||||
set sicsroot ../script_validator/
|
||||
source script_validator_ports.tcl
|
||||
sics_fullsimulation true
|
||||
MakeSync localhost [expr [get_portnum $serverport ]-10] spy 007 ../log/syncfile.tcl
|
||||
}
|
||||
default {
|
||||
error "ERROR: SICS_SIMULATION must be full or script_validator, not $env(SICS_SIMULATION)"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if {[string trim [lindex [split [sics_fullsimulation] =] 1]] == "true"} {
|
||||
opal_simulation true
|
||||
detector_simulation true
|
||||
hmm_simulation true
|
||||
counter_simulation true
|
||||
environment_simulation true
|
||||
motor_simulation true
|
||||
chopper_simulation true
|
||||
plc_simulation true
|
||||
}
|
||||
|
||||
set cfParent config
|
||||
|
||||
#WARNING Make sure there are no spaces after the back-slashes
|
||||
array set cfPath [list\
|
||||
motors $cfParent/motors\
|
||||
optics $cfParent/optics\
|
||||
counter $cfParent/counter\
|
||||
chopper $cfParent/chopper\
|
||||
hmm $cfParent/hmm\
|
||||
scan $cfParent/scan\
|
||||
velsel $cfParent/velsel\
|
||||
nexus $cfParent/nexus\
|
||||
hipadaba $cfParent/hipadaba\
|
||||
plc $cfParent/plc]
|
||||
parameters $cfParent/parameters\
|
||||
anticollider $cfParent/anticollider\
|
||||
motors $cfParent/motors\
|
||||
optics $cfParent/optics\
|
||||
counter $cfParent/counter\
|
||||
chopper $cfParent/chopper\
|
||||
environment $cfParent/environment\
|
||||
hmm $cfParent/hmm\
|
||||
scan $cfParent/scan\
|
||||
velsel $cfParent/velsel\
|
||||
nexus $cfParent/nexus\
|
||||
hipadaba $cfParent/hipadaba\
|
||||
plc $cfParent/plc\
|
||||
commands $cfParent/commands\
|
||||
]
|
||||
|
||||
ServerOption LogFileBaseName $sicsroot/log/serverlog
|
||||
|
||||
installprotocolhandler
|
||||
|
||||
source util/utility.tcl
|
||||
|
||||
ServerOption statusfile $sicsroot/log/status.tcl
|
||||
ServerOption RedirectFile $sicsroot/log/stdout
|
||||
@@ -41,7 +115,7 @@ SicsUser manager ansto 1
|
||||
SicsUser user sydney 2
|
||||
SicsUser spy 007 3
|
||||
|
||||
MakeDataNumber SicsDataNumber $sicsroot/data/DataNumber
|
||||
MakeDataNumber SicsDataNumber $sicsroot/DataNumber
|
||||
|
||||
#Instrument specific configs must set the Instrument variable
|
||||
::utility::mkVar SicsDataPrefix Text internal
|
||||
@@ -51,13 +125,13 @@ SicsDataPrefix [SplitReply [Instrument]]
|
||||
SicsDataPostFix nx.hdf
|
||||
|
||||
|
||||
::utility::mkVar sics_release Text internal
|
||||
::utility::mkVar sics_release Text manager sics_release true entry true true
|
||||
set tmpstr [string map {"$" ""} {$Name: not supported by cvs2svn $}]
|
||||
sics_release [lindex $tmpstr [expr [llength $tmpstr] - 1]]
|
||||
sics_release lock
|
||||
|
||||
::utility::mkVar sics_revision_num Text internal
|
||||
set tmpstr [string map {"$" ""} {$Revision: 1.32 $}]
|
||||
set tmpstr [string map {"$" ""} {$Revision: 1.33 $}]
|
||||
sics_revision_num [lindex $tmpstr [expr [llength $tmpstr] - 1]]
|
||||
sics_revision_num lock
|
||||
|
||||
@@ -65,7 +139,9 @@ sics_revision_num lock
|
||||
SicsDataPath $sicsroot/data/
|
||||
SicsDataPath lock
|
||||
::utility::mkVar Title Text user title true experiment true true
|
||||
::utility::mkVar Sample Text user description true sample true true
|
||||
::utility::mkVar SampleDescription Text user description true sample true true
|
||||
::utility::mkVar SampleName Text user name true sample true true
|
||||
::utility::mkVar SampleTitle Text user short_title true sample true true
|
||||
::utility::mkVar User Text user name true user true true
|
||||
::utility::mkVar Email Text user email true user true true
|
||||
::utility::mkVar Phone Text user phone true user true true
|
||||
@@ -75,38 +151,11 @@ MakeDrive
|
||||
exe batchpath ../batch
|
||||
exe syspath ../batch
|
||||
|
||||
::utility::mkVar detector_type Text internal
|
||||
::utility::mkVar detector_description Text internal
|
||||
|
||||
::utility::mkVar dataFileName Text user file_name true experiment true true
|
||||
|
||||
::utility::mkVar hmm_simulation Text internal
|
||||
hmm_simulation false
|
||||
|
||||
::utility::mkVar counter_simulation Text internal
|
||||
counter_simulation false
|
||||
|
||||
::utility::mkVar motor_simulation Text internal
|
||||
motor_simulation false
|
||||
|
||||
::utility::mkVar chopper_simulation Text internal
|
||||
chopper_simulation false
|
||||
|
||||
::utility::mkVar plc_simulation Text internal
|
||||
plc_simulation false
|
||||
|
||||
::utility::mkVar sics_fullsimulation Text internal
|
||||
sics_fullsimulation false
|
||||
|
||||
if {[SplitReply [sics_fullsimulation]] == "true"} {
|
||||
hmm_simulation true
|
||||
counter_simulation true
|
||||
motor_simulation true
|
||||
chopper_simulation true
|
||||
plc_simulation true
|
||||
}
|
||||
|
||||
proc server_set_sobj_attributes {} {
|
||||
if [ catch {
|
||||
motor_set_sobj_attributes
|
||||
::utility::set_motor_attributes
|
||||
::utility::set_histomem_attributes
|
||||
@@ -119,4 +168,20 @@ proc server_set_sobj_attributes {} {
|
||||
## TODO move the following to the new ansto gumxml.tcl
|
||||
sicslist setatt getgumtreexml privilege internal
|
||||
clientput "serverport [get_portnum $::serverport]"
|
||||
} message ] {
|
||||
if {$::errorCode=="NONE"} {return $message}
|
||||
return -code error $message
|
||||
}
|
||||
}
|
||||
|
||||
# Make the opal status info object
|
||||
set sim_mode [SplitReply [opal_simulation]]
|
||||
if {$sim_mode == "true"} {
|
||||
proc opal {args} {
|
||||
clientput "REACTOR POWER = 20 (woohoooooo!!!)"
|
||||
}
|
||||
publish opal user
|
||||
} else {
|
||||
MakeAsyncQueue lss_chan LSS 137.157.204.67 31250
|
||||
MakeLSSMonitor opal lss_chan 0
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user