Files
sics/site_ansto/instrument/config/hipadaba/instdict_specification.tcl
Ferdi Franceschini 343f874b70 sans/config/parameters/parameters.tcl
SICS-365 Refactored quokka nexus structure, the parameters group has been greatly simplified.

sans/config/commands/commands.tcl
If "selbs" is called by "selbsn" or "selbsxy" it now reports "startt selbsn/selbsxy" and "stop selbsn/selsxy" as well as start and stop for selbs.
The rotary attenuator and entrance aperture commands now drive the "att" and "srce" motors directly.

quokka_configuration.tcl
Removed obsolete code.

SICS-365  nxscripts_common_1.tcl, instdict_specification.tcl, common_instrument_dictionary.tcl
Don't create unnofficial nexus classes.

r2856 | ffr | 2010-01-11 16:12:40 +1100 (Mon, 11 Jan 2010) | 13 lines
2012-11-15 16:58:57 +11:00

144 lines
4.5 KiB
Tcl

# The attributes and values for sics objects and instrument dictionaries must comply
# with the following lists.
set boolean {true false}
# INSTRUMENT DICTIONARIES MUST PROVIDE THE FOLLOWING INFORMATION
#set dict_property_list {
# data [subst {{$boolean}}]
# control [subst {{$boolean}}]
# nxsave [subst {{$boolean}}]
# nxtype [subst {{$nexus_classes}}]
#}
# SICS OBJECTS MUST PROVIDE THE FOLLOWING INFORMATION
set sobj_klass_list {@none aperture attenuator collimator command crystal data detector disk_chopper entry environment experiment graphics instrument slits monitor monochromator parameter plc sample scan sensor source user}
set sobj_sicstype_list {chopperadapter environment_controller sicsvariable macro motor configurablevirtualmotor singlecounter histmem nxscript sicsdata scanobject sct_object}
# Different kinds of things are added to the hdb in different ways.
# command: This is something a client can run with hset /a/b/c start, it may have parameters and feedback.
# Parameters and feedback should be made available in 'ilists' named after the command.
# script: Supplies an rscript and a wscript to attach to a node for hgets and hsets.
# hobj: Something that can be hattached to a node. {motor sicsvariable histmem}.
# hdb_subtree: Is a macro which returns a keyed list that describes a hdb subtree.
set sobj_kind_list {command hobj script getset hdb_subtree scobj}
set sobj_interfacelist [subst {drivable {$boolean} countable {$boolean} callback {$boolean} environment {$boolean} }]
set privilege_list {spy user manager readonly internal}
set sobj_privilege [subst {privilege {$privilege_list}}]
# This is a subset of the list of attributes which the
# [sicslist <sobj>] command must return for the hdbbuilder
# The 'data' and 'control' attributes need to be part of the metadata for
# a sics object because you know how it could/should be used when you
# create it.
set sobj_attlist [subst {
$sobj_interfacelist
type [subst {{$sobj_sicstype_list}}]
klass [subst {{$sobj_klass_list}}]
long_name {text}
data [subst {{$boolean}}]
control [subst {{$boolean}}]
kind [subst {{$sobj_kind_list}}]
nxsave [subst {{$boolean}}]
$sobj_privilege
}]
# OBJECT SPECIFIC ATTRIBUTES
set chopperadapter_attlist [subst {
$sobj_attlist
savecmd {print}
sdsinfo {print}
nxalias {text}
mutable [subst {{$boolean}}]
}]
set environment_controller_attlist [subst {
$sobj_attlist
mutable [subst {{$boolean}}]
}]
set histmem_attlist [subst {
$sobj_attlist
mutable [subst {{$boolean}}]
}]
# A macro can be attached to an hdb node as a command or a script
set macro_attlist [subst {
$sobj_attlist
}]
set motor_attlist [subst {
$sobj_attlist
units alpha
savecmd {print}
nxalias {text}
mutable [subst {{$boolean}}]
}]
set configurablevirtualmotor_attlist [subst {
$motor_attlist
}]
set nxscript_attlist [subst {
$sobj_attlist
}]
set scanobject_attlist [subst {
$sobj_attlist
}]
set sct_object_attlist [subst {
$sobj_attlist
}]
set sicsdata_attlist [subst {
$sobj_attlist
mutable [subst {{$boolean}}]
}]
set sicsvariable_attlist [subst {
$sobj_attlist
mutable [subst {{$boolean}}]
}]
set singlecounter_attlist [subst {
$sobj_attlist
mutable [subst {{$boolean}}]
}]
# INSTRUMENT DICTIONARIES MUST PROVIDE THE FOLLOWING INFORMATION
if 1 {
set nexus_classes { NXaperture NXattenuator NXbeam_stop NXbeam NXbending_magnet NXcharacterizations NXcollimator NXcrystal NXdata NXdetector NXdisk_chopper NXentry NXenvironment NXevent_data NXfermi_chopper NXfilter NXflipper NXgeometry NXguide NXinsertion_device NXinstrument NXlog NXmirror NXmoderator NXmonitor NXnote NXorientation NXpositioner NXprocess NXroot NXsample NXsensor NXshape NXsource NXtranslation NXuser NXvelocity_selector}
set dict_privilege_list {
}
# datatype can include rank and dimensions
# @none is included to allow subtree nodes and leaves to be handled
# uniformly.
set dict_datatype_list { @none NX_CHAR NX_FLOAT32 NX_INT32 }
# link = name of an nxalias
set dict_property_list [subst {
{data control nxsave} {$boolean}
klass {@none $nexus_classes}
type {commandset graphset instrument part nxvgroup}
nxalias text
link {@none text}
savecmd text
}]
# hpath looks like /a/b/c/
set regex_hpath {^(/)$|^([_a-z0-9]+)(/[_a-z0-9]+)*$}
set instrument_dictionary_spec [subst {
regex_hpath {
optional {
sobj {{@any $sobj_sicstype_list} {$sobj_klass_list}}
}
required {
privilege {$privilege_list}
datatype [subst {{$dict_datatype_list}}]
property [subst {{$dict_property_list}}]
}
}
}]
}