Files
sics/site_ansto/instrument/config/hipadaba/common_hipadaba_configuration.tcl
Ferdi Franceschini 075cdabfa2 Use commands_hpath_setup and graphics_hpath_setup to generate scancommand hpaths.
r1638 | ffr | 2007-03-13 09:11:39 +1100 (Tue, 13 Mar 2007) | 2 lines
2012-11-15 13:06:16 +11:00

53 lines
1.5 KiB
Tcl

# Defines hashes which map SICS device object names to hipadaba paths
InstallHdb
hmake /commands spy none
hsetprop /commands type commandset
#TODO change this to hparts.tcl
source $cfPath(hipadaba)/hpaths.tcl
set instrument [string tolower [SplitReply [Instrument]] ]
hmake /$instrument spy none
hsetprop /$instrument type instrument
# Generate hipadaba nodes for the paths in the hpaths file
foreach hp $hpaths {
hmake /$instrument/$hp spy none;
hsetprop /$instrument/$hp type part;
}
#--- admin
hmake /experiment user none
hattach /experiment title title
hattach /experiment sample description
hmake /experiment/user spy none
hsetprop /experiment/user type part
hattach /experiment/user user name
hattach /experiment/user email email
hattach /experiment/user phone phone
hattach /experiment dataFileName datafile
#--- Motors
foreach {obj name part} $motor_hpath {
hattach /$instrument/$part $obj $name
#TODO Only ignore node deletion errors for simulated motors
if [ catch {hdel /$instrument/$part/$name/axis} ] {}
if [ catch {hdel /$instrument/$part/$name/units} ] {}
}
#--- Configurable Virtual Motors
foreach {obj name part master_obj} $cvirtmotor_hpath {
set path /$instrument/$part
# hattach /$instrument/$part $obj $name
hattach $path $obj $name
hchain $path/$name $path/$master_obj
}
#------------- scan command
hsetprop /commands type part
#--- Graphics
hmake /graphics spy none
::scancommand::commands_hpath_setup /commands
::scancommand::graphics_hpath_setup /graphics
::scancommand::init