hipadaba_configuration_common.tcl
Check all kinds of hdb nodes for units. nxscripts_common_1.tcl Make units optional when saving data. Catch histogram memory savecmd errors. r2188 | ffr | 2007-10-23 12:32:41 +1000 (Tue, 23 Oct 2007) | 7 lines
This commit is contained in:
committed by
Douglas Clowes
parent
9c307402cc
commit
8e6d4e4da6
@@ -333,7 +333,7 @@ proc newfile {type {namestyle data}} {
|
||||
#
|
||||
# NOTE: If a link has already been recorded then it does nothing. This allows you to
|
||||
# override default links set by a command. eg A "count" command may link axis_1 to
|
||||
# the run number but a "scan" command which uses the count command can link axis_1 to
|
||||
# the run number but a "scan" command, which uses the count command, can link axis_1 to
|
||||
# a scan variable.
|
||||
#
|
||||
# Usage:
|
||||
@@ -644,6 +644,7 @@ proc ::nexus::hdb2nx_type {dtype} {
|
||||
#
|
||||
# @see set_sobj_attributes
|
||||
proc ::nexus::histmem::save {hm nxalias data_type args} {
|
||||
if [catch {
|
||||
set rank [SplitReply [$hm configure rank]]
|
||||
|
||||
set datalen 1
|
||||
@@ -659,6 +660,9 @@ proc ::nexus::histmem::save {hm nxalias data_type args} {
|
||||
set data_start 0
|
||||
set bank 0
|
||||
nxscript putslab $nxalias $indStartList $indLenList $hm $data_start $datalen $bank
|
||||
}] {
|
||||
return -code error $::errorInfo
|
||||
}
|
||||
}
|
||||
|
||||
# TODO Get rank from /data
|
||||
@@ -695,13 +699,19 @@ proc ::nexus::motor::save {motor nxalias data_type args} {
|
||||
}
|
||||
proc ::nexus::motor::sdsinfo {motor data_type args} {
|
||||
array set param $args
|
||||
array set mot_prop [attlist $motor]
|
||||
set dtype [::nexus::hdb2nx_type $data_type]
|
||||
if {$param(mutable) == true} {
|
||||
return " -type $dtype -rank 1 -dim {-1} -attr {units,$mot_prop(units)} -attr {long_name,$mot_prop(long_name)}"
|
||||
} else {
|
||||
return " -type $dtype -attr {units,$mot_prop(units)} -attr {long_name,$mot_prop(long_name)}"
|
||||
}
|
||||
array set attribute [attlist $motor]
|
||||
set dtype [::nexus::hdb2nx_type $data_type]
|
||||
if {[info exists attribute(units)]} {
|
||||
set units_att " -attr {units,$attribute(units)} "
|
||||
} else {
|
||||
set units_att " "
|
||||
}
|
||||
set name_att " -attr {long_name,$attribute(long_name)} "
|
||||
if {$param(mutable) == true} {
|
||||
return " -type $dtype -rank 1 -dim {-1} $units_att $name_att"
|
||||
} else {
|
||||
return " -type $dtype $units_att $name_att"
|
||||
}
|
||||
}
|
||||
|
||||
proc ::nexus::environment_controller::save {evc nxalias data_type args} {
|
||||
@@ -716,13 +726,19 @@ proc ::nexus::environment_controller::save {evc nxalias data_type args} {
|
||||
}
|
||||
proc ::nexus::environment_controller::sdsinfo {evc data_type args} {
|
||||
array set param $args
|
||||
array set evc_prop [attlist $evc]
|
||||
set dtype [::nexus::hdb2nx_type $data_type]
|
||||
if {$param(mutable) == true} {
|
||||
return " -type $dtype -rank 1 -dim {-1} -attr {units,$evc_prop(units)} -attr {long_name,$evc_prop(long_name)}"
|
||||
} else {
|
||||
return " -type $dtype -attr {units,$evc_prop(units)} -attr {long_name,$evc_prop(long_name)}"
|
||||
}
|
||||
array set attribute [attlist $evc]
|
||||
set dtype [::nexus::hdb2nx_type $data_type]
|
||||
if {[info exists attribute(units)]} {
|
||||
set units_att " -attr {units,$attribute(units)} "
|
||||
} else {
|
||||
set units_att " "
|
||||
}
|
||||
set name_att " -attr {long_name,$attribute(long_name)} "
|
||||
if {$param(mutable) == true} {
|
||||
return " -type $dtype -rank 1 -dim {-1} $units_att $name_att"
|
||||
} else {
|
||||
return " -type $dtype $units_att $name_att"
|
||||
}
|
||||
}
|
||||
|
||||
namespace eval ::nexus {
|
||||
@@ -807,7 +823,7 @@ proc ::nexus::script::sdsinfo {script data_type args} {
|
||||
|
||||
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.31 $}]
|
||||
set tmpstr [string map {"$" ""} {$Revision: 1.32 $}]
|
||||
set nx_content_revision_num [lindex $tmpstr [expr [llength $tmpstr] - 1]]
|
||||
|
||||
namespace eval data {
|
||||
|
||||
Reference in New Issue
Block a user