Files
sics/site_ansto/instrument/server_config.tcl
Ferdi Franceschini 01be487c52 pelican
Create pas/config/source/source.tcl
config/source/source_common.tcl
pelican_configuration.tcl

deploySICS.sh
Don't deploy script validator configs, they are obsolete

server_config.tcl
Source config has been moved to  config/source and is specialised for each instrument by calling the instrument specific initialiser ::source:isc_initalize

commands_common_1.tcl
The monitor mode and preset are recorded when running the count command

counter_common_1.tcl
Report and record the counts and time for the multicounter and each monitor.  Also record the mode and preset for the multicounter.

hmm_configuration_common_1.tcl
Cleanup, remove obsolete code.
Report and record the hmm total counts and time.
Allow monitor controlled acquisition from the histogram server

nxscripts_common_1.tcl
Add DataType to NXdata section, preserve case in text attributes.

scan_common_1.tcl
Provide sensible feedback for our bmonscan and hmscan objects.
Set run_mode when doing a scan.  Allow users to select the datatype for histmem scans and to force a scan

wombat_configuration.tcl
echidna_configuration.tcl
platypus_configuration.tcl
kowari_configuration.tcl
quokka_configuration.tcl
Load source config.

quokka_configuration.tcl
SICS-198 HACK, Add AttrotDeg and RotApDeg status feedback.

sans/commands/commands.tcl
Add status feedback for quokka "guide" command.

sans/parameters/parameters.tcl
Make sure data can be saved as xml (replace % with _percent)
SICS-198 HACK, add AttRotDeg and RotApDeg status feedback.

utility.tcl
Fix nasty "params array generator" bug.  SICS commands execute at runlevel 0 which means that the params anonymous array must be made at this level.
Provide the normalattlist command to enable creating attribute lists with the case preserved.

Added the runsics, runtestsics and sicsclient scripts to CVS.
Added source configurations for echidna, wombat, kowari, quokka, platypus, and pelican to CVS

r2644 | ffr | 2008-07-11 11:09:57 +1000 (Fri, 11 Jul 2008) | 53 lines
2012-11-15 13:40:07 +11:00

206 lines
5.9 KiB
Tcl

# SICS common configuration
# $Revision: 1.37 $
# $Date: 2008-07-11 01:09:56 $
# Author: Ferdi Franceschini (ffr@ansto.gov.au)
# Last revision by $Author: ffr $
#set sicsroot /usr/local/sics
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\
parameters $cfParent/parameters\
source $cfParent/source\
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
ServerOption statusfile $sicsroot/log/status.tcl
ServerOption RedirectFile $sicsroot/log/stdout
ServerOption LogFileDir $sicsroot/log
ServerOption QuieckPort [get_portnum $quieckport ]
ServerOption ServerPort [get_portnum $serverport ]
ServerOption InterruptPort [get_portnum $interruptport ]
ServerOption TelWord sicslogin
ServerOption TelnetPort [get_portnum $telnetport ]
ServerOption ReadUserPasswdTimeout 600000
ServerOption AcceptTimeOut 10
ServerOption ReadTimeOut 10
SicsUser manager ansto 1
SicsUser user sydney 2
SicsUser spy 007 3
MakeDataNumber SicsDataNumber $sicsroot/DataNumber
#Instrument specific configs must set the Instrument variable
::utility::mkVar SicsDataPrefix Text internal
SicsDataPrefix [SplitReply [Instrument]]
::utility::mkVar SicsDataPostFix Text manager
SicsDataPostFix nx.hdf
foreach {var val klass} {
program_name "SICS" entry
run_mode "normal" entry
} {
::utility::mkVar $var Text manager $var true $klass true true
$var $val
}
::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.37 $}]
sics_revision_num [lindex $tmpstr [expr [llength $tmpstr] - 1]]
sics_revision_num lock
::utility::mkVar SicsDataPath Text internal
SicsDataPath $sicsroot/data/
SicsDataPath lock
::utility::mkVar Title Text user title true experiment 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
::utility::mkVar starttime Text user start true experiment true true
MakeDrive
exe batchpath ../batch
exe syspath ../batch
::utility::mkVar dataFileName Text user file_name true experiment true true
proc server_set_sobj_attributes {} {
if [ catch {
motor_set_sobj_attributes
::utility::set_motor_attributes
::utility::set_histomem_attributes
::utility::set_sobj_attributes
::utility::set_envcontrol_attributes
::plc::set_sobj_attributes
::counter::set_sobj_attributes
::nexus::set_sobj_attributes
::histogram_memory::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
}
}
proc server_init {} {
if [ catch {
::source::isc_initialize
::counter::isc_initialize
::histogram_memory::isc_initialize
::scan::isc_initialize
MakeStateMon hmscan
sicslist setatt sics_suid privilege readonly
sicslist setatt sics_suid klass data
sicslist setatt sics_suid kind hobj
sicslist setatt sics_suid mutable true
sicslist setatt sics_suid data true
sicslist setatt sics_suid control true
sicslist setatt sics_suid nxsave true
sicslist setatt sics_suid long_name sics_suid
server_set_sobj_attributes
} message ] {
if {$::errorCode=="NONE"} {return $message}
return -code error $message
}
}