histmem.c

sicvar.c
SICS-93 Save histogram data and instrument state during an acquisition

hipadaba_configuration_common.tcl
SICS-185 Preserve case on hdb node names

hmm_configuration_common_1.tcl
nxscripts_common_1.tcl
sicvar.c
SICS-174 Allow saving of histmem data and instrument status during a count operation.

wombat_configuration.tcl
echidna_configuration.tcl
platypus_configuration.tcl
kowari_configuration.tcl
quokka_configuration.tcl
SICS-153 Move setup of statemon to new server_init function for the new sics_uid state variable

server_config.tcl
SICS-153 set attributes on the sics_suid var which is now created by MakeStateMon
SICS-187 Add cold source info (TODO move to platypus,quokka and pelican configs)

utility.tcl
SICS-185 Added normalgetatt to preserve case on hdb node names etc.

sans/config/optics/aperture_configuration.tcl
New file, Provides lookup tables for attenuation and entrance apertures. (SICS-157)

sans/config/optics/optics.tcl
Load the new aperture_configuration.tcl

sans/config/parameters/parameters.tcl
SICS-157 Add instrument parameters section with derived parameters and their dependencies

statemon.c
SICS-153 Create sics_suid sicsvariable when loading statemon and increment it on each status change.

r2635 | ffr | 2008-06-23 12:41:12 +1000 (Mon, 23 Jun 2008) | 38 lines
This commit is contained in:
Ferdi Franceschini
2008-06-23 12:41:12 +10:00
committed by Douglas Clowes
parent eea4d4d9eb
commit ef7c2a6f87
15 changed files with 476 additions and 217 deletions

View File

@@ -372,7 +372,7 @@ proc ::hdb::add_subtree {hpath subtree {object @none} {type @none} {makenode @no
set target [::utility::tabget subtree target]
set nxalias [::utility::tabget subtree nxalias]
foreach l $nxalias t $target {
set refname [getatt $t long_name]
set refname [normalgetatt $t long_name]
::hdb::add_hpath $hpath $refname
hsetprop $hpath/$refname data "true"
hsetprop $hpath/$refname nxsave "false"
@@ -517,8 +517,9 @@ proc ::hdb::add_node {basePath args} {
}
}
hobj {
hattach $basePath $node_name $arg_array(long_name)
set node_path $basePath/$arg_array(long_name)
set hobj_long_name [normalgetatt $node_name long_name]
hattach $basePath $node_name $hobj_long_name
set node_path $basePath/$hobj_long_name
hsetprop $node_path data [getatt $node_name data]
hsetprop $node_path control [getatt $node_name control]
hsetprop $node_path nxsave [getatt $node_name nxsave]
@@ -538,7 +539,7 @@ proc ::hdb::add_node {basePath args} {
}
script - getset {
# A r/w pair of scripts, node = a node path
set node_path $basePath/[getatt $node_name long_name]
set node_path $basePath/[normalgetatt $node_name long_name]
set data_type [getatt $node_name dtype]
set data_length [getatt $node_name dlen]
if {[getatt $node_name access] == "read_only"} {
@@ -557,13 +558,18 @@ proc ::hdb::add_node {basePath args} {
}
}
if {[info exists attribute(units)]} {
hsetprop $node_path units $attribute(units)
hsetprop $node_path units [normalgetatt $node_name units]
}
if {[info exists arg_array(prop_list)]} {
foreach {prop pval} $arg_array(prop_list) {
hsetprop $node_path $prop $pval
}
}
if {[info exists attribute(depends)]} {
foreach dep [split [normalgetatt $node_name depends] , ] {
::hdb::sobjadd $node_path $dep
}
}
sicslist setatt $node_name hdb_path $node_path
return $node_path
}
@@ -587,8 +593,9 @@ proc ::hdb::add_command {basePath command} {
hsetprop $basePath type part
}
}
hcommand $basePath/$cmd_atts(long_name) $command
set cmd_path $basePath/$cmd_atts(long_name)
set hcom_long_name [normalgetatt $command long_name]
hcommand $basePath/$hcom_long_name $command
set cmd_path $basePath/$hcom_long_name
hsetprop $cmd_path privilege $cmd_atts(privilege)
hsetprop $cmd_path type $cmd_atts(kind)
hsetprop $cmd_path data $cmd_atts(data)
@@ -674,7 +681,7 @@ proc ::hdb::sobjadd {hpath sobj args} {
if {[catch {hsetprop $hpath type part} err]} {clientput $err error}
}
if {[lsearch [hlist $hpath] $sobjatt(long_name)] == -1} {
set node_path [add_node $hpath node $sobj long_name $sobjatt(long_name) kind $sobjatt(kind)]
set node_path [add_node $hpath node $sobj long_name [normalgetatt $sobj long_name] kind $sobjatt(kind)]
if {[catch {hsetprop $node_path savecmd $sobjatt(savecmd)} err]} {clientput $err error}
if {[catch {hsetprop $node_path sdsinfo $sobjatt(sdsinfo)} err]} {clientput $err error}
if {[catch {hsetprop $node_path nxalias $sobjatt(nxalias)} err]} {clientput $err error}
@@ -706,7 +713,7 @@ proc ::hdb::sobjadd {hpath sobj args} {
if {[catch {hsetprop $hpath type part} err]} {clientput $err error}
}
if {[lsearch [hlist $hpath] $sobjatt(long_name)] == -1} {
set node_path [add_node $hpath node $sobj long_name $sobjatt(long_name) kind $sobjatt(kind)]
set node_path [add_node $hpath node $sobj long_name [normalgetatt $sobj long_name] kind $sobjatt(kind)]
if {[catch {hsetprop $node_path sicsdev $sobj} err]} {clientput $err error}
if {[catch {hsetprop $node_path nxalias $sobj} err]} {clientput $err error}
if {[catch {hsetprop $node_path savecmd $sobjatt(savecmd)} err]} {clientput $err error}
@@ -729,7 +736,7 @@ proc ::hdb::sobjadd {hpath sobj args} {
if {[catch {hsetprop $hpath type part} err]} {clientput $err error}
}
if {[lsearch [hlist $hpath] $sobjatt(long_name)] == -1} {
set node_path [add_node $hpath node $sobj long_name $sobjatt(long_name) kind $sobjatt(kind)]
set node_path [add_node $hpath node $sobj long_name [normalgetatt $sobj long_name] kind $sobjatt(kind)]
if {[catch {hsetprop $node_path savecmd $sobjatt(savecmd)} err]} {clientput $err error}
if {[catch {hsetprop $node_path sdsinfo $sobjatt(sdsinfo)} err]} {clientput $err error}
if {[catch {hsetprop $node_path nxalias $sobjatt(nxalias)} err]} {clientput $err error}

View File

@@ -1,5 +1,5 @@
# $Revision: 1.31 $
# $Date: 2008-06-10 04:40:30 $
# $Revision: 1.32 $
# $Date: 2008-06-23 02:41:12 $
# Author: Ferdi Franceschini
# Based on the examples in the hs_test.tcl sample configuration by Mark Lesha.
# http://gumtree.ansto.gov.au:9080/nbicms/bragg-systems/histogram-server/hs_test.tcl/view
@@ -1347,36 +1347,36 @@ proc ::histogram_memory::configure_dims {} {
if {[instname] == "wombat"} {
array set dim_map {
hmm {{hmm_dim0 oat_ntc_eff} {hmm_dim1 stitch_nyc} {hmm_dim2 stitch_nxc}}
hmm,fat_read_data_type HISTOPERIOD_XYT
hmm,read_data_type HISTOPERIOD_XYT
hmm_xy {{hmm_dim0 stitch_nyc} {hmm_dim1 stitch_nxc}}
hmm_xy,fat_read_data_type TOTAL_HISTOGRAM_XY
hmm_xy,read_data_type TOTAL_HISTOGRAM_XY
hmm_xt {{hmm_dim0 oat_ntc_eff} {hmm_dim1 stitch_nxc}}
hmm_xt,fat_read_data_type TOTAL_HISTOGRAM_XT
hmm_xt,read_data_type TOTAL_HISTOGRAM_XT
hmm_yt {{hmm_dim0 oat_ntc_eff} {hmm_dim1 stitch_nyc}}
hmm_yt,fat_read_data_type TOTAL_HISTOGRAM_YT
hmm_yt,read_data_type TOTAL_HISTOGRAM_YT
hmm_x {{hmm_dim0 stitch_nxc}}
hmm_x,fat_read_data_type TOTAL_HISTOGRAM_X
hmm_x,read_data_type TOTAL_HISTOGRAM_X
hmm_y {{hmm_dim0 stitch_nyc}}
hmm_y,fat_read_data_type TOTAL_HISTOGRAM_Y
hmm_y,read_data_type TOTAL_HISTOGRAM_Y
hmm_t {{hmm_dim0 oat_ntc_eff}}
hmm_t,fat_read_data_type TOTAL_HISTOGRAM_T
hmm_t,read_data_type TOTAL_HISTOGRAM_T
}
} else {
array set dim_map {
hmm {{hmm_dim0 oat_ntc_eff} {hmm_dim1 oat_nyc_eff} {hmm_dim2 oat_nxc_eff}}
hmm,fat_read_data_type HISTOPERIOD_XYT
hmm,read_data_type HISTOPERIOD_XYT
hmm_xy {{hmm_dim0 oat_nyc_eff} {hmm_dim1 oat_nxc_eff}}
hmm_xy,fat_read_data_type TOTAL_HISTOGRAM_XY
hmm_xy,read_data_type TOTAL_HISTOGRAM_XY
hmm_xt {{hmm_dim0 oat_ntc_eff} {hmm_dim1 oat_nxc_eff}}
hmm_xt,fat_read_data_type TOTAL_HISTOGRAM_XT
hmm_xt,read_data_type TOTAL_HISTOGRAM_XT
hmm_yt {{hmm_dim0 oat_ntc_eff} {hmm_dim1 oat_nyc_eff}}
hmm_yt,fat_read_data_type TOTAL_HISTOGRAM_YT
hmm_yt,read_data_type TOTAL_HISTOGRAM_YT
hmm_x {{hmm_dim0 oat_nxc_eff}}
hmm_x,fat_read_data_type TOTAL_HISTOGRAM_X
hmm_x,read_data_type TOTAL_HISTOGRAM_X
hmm_y {{hmm_dim0 oat_nyc_eff}}
hmm_y,fat_read_data_type TOTAL_HISTOGRAM_Y
hmm_y,read_data_type TOTAL_HISTOGRAM_Y
hmm_t {{hmm_dim0 oat_ntc_eff}}
hmm_t,fat_read_data_type TOTAL_HISTOGRAM_T
hmm_t,read_data_type TOTAL_HISTOGRAM_T
}
}
@@ -1386,7 +1386,7 @@ proc ::histogram_memory::configure_dims {} {
foreach elmt $dim_map($hm_obj) {
set [lindex $elmt 0] [hmmdictitemval hmm [lindex $elmt 1]]
}
$hm_obj configure FAT_READ_DATA_TYPE $dim_map($hm_obj,fat_read_data_type)
$hm_obj configure READ_DATA_TYPE $dim_map($hm_obj,read_data_type)
$hm_obj stop
$hm_obj configure init 0
$hm_obj init

View File

@@ -588,7 +588,7 @@ proc ::nexus::newfile {type {namestyle data}} {
array unset p_arr
array set p_arr [::utility::hlistplainprop /$hpath/$child]
if {[info exists p_arr(type)] && $p_arr(type) == "nxvgroup"} {
return
continue
}
set data_type [lindex [split [hinfo /$hpath/$child] , ] 0]
if {$p_arr(data) == true && $p_arr(nxsave) == true } {
@@ -790,8 +790,7 @@ proc ::nexus::histmem::save {hm nxalias data_type args} {
nxscript updatedictvar padim$i [set dim$i]
}
set data_start 0
set bank 0
$hm init
set bank 1
nxscript putslab $nxalias $indStartList $indLenList $hm $data_start $datalen $bank
}] {
return -code error $::errorInfo
@@ -1035,7 +1034,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.37 $}]
set tmpstr [string map {"$" ""} {$Revision: 1.38 $}]
set nx_content_revision_num [lindex $tmpstr [expr [llength $tmpstr] - 1]]
#namespace eval data {