##################################

SICS-226

util/utility.tcl
Added set_chopper_attributes to set hdb metadata on chopperadapters

server_config.tcl
Set hdb metadata on chopperadapters

hipadaba_configuration_common.tcl
:hdb::sobjadd can now add chopperadapters to the hdb tree
::hdb::cmd_par now preserves case when adding command parameters.

instdict_specification.tcl
Added chopperadapter sicstype and disk_chopper class

nxscripts_common_1.tcl
Added chopperadapter save and sdsinfo commands.

reflectometer/config/chopper/chopper.tcl
Set units on chopperadapters.

 ##################################

hipd,hrpd,rsd, /config/commands.tcl
Add instrument specific initialisation procedure for commands

reflectometer/config/commands.tcl
Created omega_2theta and set_mode commands from Andrew Nelson's procs in extraconfig.tcl

reflectometer/.../motor_configuration.tcl
Added ds and rs prefix to the two_theta drive and read scripts to prevent name collision with the two_theta procs in commans.tcl

SICS-108 reflectometer/../parameters.tcl
Added parameters for guide, slit and chopper distances and elements.

SICS-108 common_instrument_dictionary.tcl
Make parameters saveable

r2678 | ffr | 2008-08-18 13:01:29 +1000 (Mon, 18 Aug 2008) | 40 lines
This commit is contained in:
Ferdi Franceschini
2008-08-18 13:01:29 +10:00
committed by Douglas Clowes
parent 348bd3aed1
commit 8090104407
13 changed files with 429 additions and 24 deletions

View File

@@ -744,6 +744,10 @@ proc ::nexus::gen_nxdict {nexusdic} {
sicslist setatt $sobj savecmd ::nexus::environment_controller::save
sicslist setatt $sobj sdsinfo ::nexus::environment_controller::sdsinfo
}
foreach sobj [sicslist type chopperadapter] {
sicslist setatt $sobj savecmd ::nexus::chopperadapter::save
sicslist setatt $sobj sdsinfo ::nexus::chopperadapter::sdsinfo
}
foreach sobj [sicslist kind script] {
sicslist setatt $sobj savecmd ::nexus::script::save
sicslist setatt $sobj sdsinfo ::nexus::script::sdsinfo
@@ -975,6 +979,41 @@ proc ::nexus::sicsvariable::sdsinfo {svar data_type args} {
}
}
namespace eval ::nexus::chopperadapter { }
proc ::nexus::chopperadapter::save {sobj nxalias data_type args} {
array set attribute [attlist $sobj]
set val [SplitReply [$sobj]]
if {[lindex $args 0] == "point"} {
set index [lindex $args 1]
nxscript_data clear
switch $data_type {
int {nxscript_data putint 0 $val}
float {nxscript_data putfloat 0 $val}
default {error "ERROR: [info level -1]->::nexus::chopperadapter::save, unknown type $data_type"}
}
nxscript putslab $nxalias [list $index] [list 1] nxscript_data
} else {
switch $data_type {
int {nxscript putint $nxalias $val}
float {nxscript putfloat $nxalias $val}
text {nxscript puttext $nxalias $val}
default {error "ERROR: [info level -1]->::nexus::chopperadapter::save, unknown type $data_type"}
}
}
if {[info exists attribute(units)]} {
nxscript putattribute $nxalias units $attribute(units)
}
}
proc ::nexus::chopperadapter::sdsinfo {sobj data_type args} {
array set param $args
set dtype [::nexus::hdb2nx_type $data_type]
if {$param(mutable) == true} {
return " -type $dtype -rank 1 -dim {-1}"
} else {
return " -type $dtype"
}
}
proc ::nexus::singlecounter::save {counter nxalias data_type args} {
todo_msg "Save counter: $counter"
}
@@ -1060,7 +1099,7 @@ foreach expt $::nexus::exports {
set tmpstr [string map {"$" ""} {$Name: not supported by cvs2svn $}]
set nx_content_release_tag [lindex $tmpstr [expr [llength $tmpstr] - 1]]
set tmpstr [string map {"$" ""} {$Revision: 1.41 $}]
set tmpstr [string map {"$" ""} {$Revision: 1.42 $}]
set nx_content_revision_num [lindex $tmpstr [expr [llength $tmpstr] - 1]]
#namespace eval data {