in the "motor part" field. r1785 | ffr | 2007-04-02 18:19:17 +1000 (Mon, 02 Apr 2007) | 3 lines
74 lines
2.1 KiB
Tcl
74 lines
2.1 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 {type path} $motor_hpath {
|
|
if {[info exists pathlist(/$instrument/$path)] == 0} {
|
|
hmake /$instrument/$path spy none;
|
|
hsetprop /$instrument/$path type part;
|
|
set pathlist(/$instrument/$path) 1;
|
|
}
|
|
}
|
|
|
|
array set mot_Pdic $motor_hpath;
|
|
foreach motor [sicslist type motor] {
|
|
if {$motor == "motor"} {continue}
|
|
set mpart [SplitReply [$motor part]];
|
|
foreach {type group} [split $mpart .] {};
|
|
set path $mot_Pdic($type);
|
|
if {$group != ""} {
|
|
if {[info exists pathlist(/$instrument/$path/$group)] == 0} {
|
|
hmake /$instrument/$path/$group spy none;
|
|
hsetprop /$instrument/$path/$group type part;
|
|
set pathlist(/$instrument/$path/$group) 1;
|
|
}
|
|
hattach /$instrument/$path/$group $motor [SplitReply [$motor long_name]];
|
|
} else {
|
|
hattach /$instrument/$path $motor [SplitReply [$motor long_name]];
|
|
}
|
|
}
|
|
|
|
#--- Configurable Virtual Motors
|
|
foreach {obj name part master_obj} $cvirtmotor_hpath {
|
|
set path /$instrument/$part
|
|
hattach $path $obj $name
|
|
hchain $path/$name $path/$master_obj
|
|
}
|
|
|
|
#------------- scan command
|
|
hsetprop /commands type part
|
|
|
|
#--- Graphics
|
|
hmake /graphics spy none
|
|
hsetprop /graphics type graphset
|
|
::scancommand::commands_hpath_setup /commands
|
|
::scancommand::graphics_hpath_setup /graphics
|
|
::scancommand::init
|
|
|
|
unset pathlist;
|