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:
Ferdi Franceschini
2007-10-23 12:32:41 +10:00
committed by Douglas Clowes
parent 9c307402cc
commit 8e6d4e4da6
2 changed files with 36 additions and 20 deletions

View File

@@ -116,6 +116,7 @@ proc ::hdb::add_node {basePath args} {
}
if {[lsearch [hlist $basePath] $node_name] == -1} {
#TODO allow hdb nodes of type drivable countable environment
array set attribute [attlist $node_name]
switch $arg_array(kind) {
command {
# A command is a macro, node=macro name
@@ -156,7 +157,6 @@ proc ::hdb::add_node {basePath args} {
script {
# A r/w pair of scripts, node = a node path
set node_path $basePath/[getatt $node_name long_name]
array set attribute [attlist $node_name]
set data_type [getatt $node_name dtype]
set data_length [getatt $node_name dlen]
if {[getatt $node_name access] == "read_only"} {
@@ -171,12 +171,12 @@ proc ::hdb::add_node {basePath args} {
hsetprop $node_path klass [getatt $node_name klass]
hsetprop $node_path sdsinfo [getatt $node_name sdsinfo]
hsetprop $node_path savecmd [getatt $node_name savecmd]
if {[info exists attribute(units)]} {
hsetprop $node_path units $attribute(units)
}
#hmakescript $node_path $arg_array(rscript) $arg_array(wscript) $arg_array(dtype) $arg_array(dlen)
}
}
if {[info exists attribute(units)]} {
hsetprop $node_path units $attribute(units)
}
if {[info exists arg_array(prop_list)]} {
foreach {prop pval} $arg_array(prop_list) {
hsetprop $node_path $prop $pval