This commit is contained in:
Mark Rivers
2014-02-20 12:31:23 -06:00
parent b7983203ef
commit 65cb6525c7
7 changed files with 0 additions and 806 deletions
-6
View File
@@ -1,6 +0,0 @@
TOP = ..
include $(TOP)/configure/CONFIG
DIRS += $(wildcard *ioc*)
DIRS += $(wildcard as*)
include $(EPICS_BASE)/configure/RULES_DIRS
-269
View File
@@ -1,269 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
########### SVN repository information ###################
# $Date$
# $Author$
# $Revision$
# $HeadURL$
# $Id$
########### SVN repository information ###################
-->
<!--
Use of this XML Schema file is deprecated.
Instead, use the Schematron file: template.sch
Schematron:
allows arbitrary element names
allows arbitrary UserGroup names
enforces one signal="1" attribute per NXdata group
cannot apply a regexp match for the allowed names
-->
<!-- usage:
xmllint - -noout - -schema /path1/NeXus_templates.xsd /path2/NX_template_file.xml
(put the two minus signs together for the actual command,
XML can't have them together in an XML file, even in a comment!
Note: This XML Schema validates the example files as-written in areaDetector
but is not sufficient for general use. It may be removed in future areaDetector releases.
-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<xs:element name="NXroot" >
<xs:complexType>
<xs:sequence>
<xs:element ref="Facility" minOccurs="0">
<xs:annotation>
<xs:documentation>
Facility is a legacy group from APS's CCDImageServer.
It is not a NeXus group and is used only by some custom at APS.
Not recommended for new projects.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element ref="NXentry" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="name" type="type_NeXus_name" />
</xs:complexType>
</xs:element>
<xs:element name="Facility">
<!-- legacy group from CCDImageServer, not a NeXus group and ignored -->
<xs:complexType>
<xs:sequence>
<xs:element name="facility_name" type="commonElement"/>
<xs:element name="facility_sector" type="commonElement"/>
<xs:element name="facility_beamline" type="commonElement"/>
<xs:element name="facility_station" type="commonElement"/>
<xs:element name="facility_float" type="commonElement"/>
<xs:element name="facility_int" type="commonElement"/>
</xs:sequence>
<xs:attribute name="type" use="required" fixed="UserGroup"/>
</xs:complexType>
</xs:element>
<xs:element name="NXentry">
<xs:complexType>
<xs:sequence>
<xs:element name="title" type="commonElement"/>
<xs:element name="experiment_identifier" type="commonElement"/>
<xs:element name="experiment_description" type="commonElement"/>
<xs:element name="experiment_documentation" type="commonElement"/>
<xs:element name="collection_identifier" type="commonElement"/>
<xs:element name="collection_description" type="commonElement"/>
<xs:element name="entry_identifier" type="commonElement"/>
<xs:element name="definition" type="commonElement"/>
<xs:element name="start_time" type="commonElement"/>
<xs:element name="end_time" type="commonElement"/>
<xs:element name="duration" type="commonElement"/>
<xs:element name="collection_time" type="commonElement"/>
<xs:element name="run_cycle" type="commonElement"/>
<xs:element name="program_name" type="commonElement"/>
<xs:element name="revision" type="commonElement"/>
<xs:element name="notes" type="commonElement"/>
<xs:element ref="NXuser" minOccurs="0"/>
<xs:element ref="NXdata" minOccurs="1" maxOccurs="unbounded"/>
<xs:element ref="NXinstrument" minOccurs="0"/>
<xs:element ref="NXcollection" minOccurs="0"/>
</xs:sequence>
<xs:attribute name="name" type="type_NeXus_name" />
</xs:complexType>
</xs:element>
<xs:element name="NXuser">
<xs:complexType>
<xs:sequence>
<xs:element name="name" type="commonElement"/>
<xs:element name="role" type="commonElement"/>
<xs:element name="affiliation" type="commonElement"/>
<xs:element name="address" type="commonElement"/>
<xs:element name="telephone_number" type="commonElement"/>
<xs:element name="fax_number" type="commonElement"/>
<xs:element name="email" type="commonElement"/>
<xs:element name="facility_user_id" type="commonElement"/>
</xs:sequence>
<xs:attribute name="name" type="type_NeXus_name" />
</xs:complexType>
</xs:element>
<xs:element name="NXdata">
<xs:complexType>
<xs:sequence>
<xs:element name="maxSizeX" type="commonElement"/>
<xs:element name="maxSizeY" type="commonElement"/>
<xs:element name="make" type="commonElement"/>
<xs:element name="model" type="commonElement"/>
<xs:element name="ImageCounter" type="commonElement" minOccurs="0" />
<!-- TODO: special attention needed here
This sets the name of the data to "data" which is not required by NeXus.
Also, it is necessary to require a signal="1" attribute definition
for only one dataset in the NXdata group:
<Attr name="signal" type="CONST" outtype="NX_CHAR">1</Attr>
Perhaps we need to switch from XML Schema to Schematron to validate template.xml files?
-->
<xs:element name="data" type="dataElement"/>
</xs:sequence>
<xs:attribute name="name" type="type_NeXus_name" />
</xs:complexType>
</xs:element>
<xs:element name="NXinstrument">
<xs:complexType>
<xs:sequence minOccurs="0">
<xs:element ref="NXinsertion_device"/>
<xs:element ref="NXsource"/>
</xs:sequence>
<xs:attribute name="name" type="type_NeXus_name" />
</xs:complexType>
</xs:element>
<xs:element name="NXinsertion_device">
<xs:complexType>
<xs:sequence>
<xs:element name="type" type="commonElement"/>
<xs:element name="energy" type="commonElement"/>
</xs:sequence>
<xs:attribute name="name" type="type_NeXus_name" />
</xs:complexType>
</xs:element>
<xs:element name="NXsource">
<xs:complexType>
<xs:sequence>
<xs:element name="name" type="commonElement"/>
<xs:element name="type" type="commonElement"/>
<xs:element name="probe" type="commonElement"/>
<xs:element name="current" type="commonElement"/>
<xs:element name="top_up" type="commonElement"/>
</xs:sequence>
<xs:attribute name="name" type="type_NeXus_name" />
</xs:complexType>
</xs:element>
<xs:element name="NXcollection">
<xs:complexType>
<xs:sequence>
<xs:element name="beamline" type="commonElement"/>
</xs:sequence>
<xs:attribute name="name" type="type_NeXus_name" />
</xs:complexType>
</xs:element>
<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
<xs:complexType name="commonElement" mixed="true">
<xs:group ref="Attr_group"/>
<xs:attributeGroup ref="common_attributes"/>
</xs:complexType>
<xs:complexType name="dataElement" mixed="true">
<xs:group ref="Attr_group"/>
<xs:attributeGroup ref="data_attributes"/>
</xs:complexType>
<xs:attributeGroup name="common_attributes">
<xs:attribute name="name" type="type_NeXus_name"/>
<xs:attribute name="outtype" type="type_outtype"/>
<xs:attribute name="source" type="type_source"/>
<xs:attribute name="type" type="type_basic_values"/>
</xs:attributeGroup>
<xs:attributeGroup name="data_attributes">
<xs:attribute name="name" type="type_NeXus_name"/>
<xs:attribute name="outtype" type="type_outtype"/>
<xs:attribute name="source" type="type_source"/>
<xs:attribute name="type" type="type_basic_values_and_pArray"/>
</xs:attributeGroup>
<xs:group name="Attr_group">
<xs:sequence>
<xs:element name="Attr" minOccurs="0" maxOccurs="unbounded">
<xs:complexType mixed="true">
<xs:attributeGroup ref="common_attributes"/>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:group>
<!-- There are only two kinds values allowed for the "type" attribute -->
<xs:simpleType name="type_basic_values_and_pArray">
<xs:union memberTypes="type_pArray type_ATTR type_CONST type_ND_ATTR"/>
</xs:simpleType>
<xs:simpleType name="type_basic_values">
<xs:union memberTypes="type_ATTR type_CONST type_ND_ATTR"/>
</xs:simpleType>
<!-- These definitions look simplistic, here's why:
Define each term here with the text appearing only once,
then every instance using the definition can be validated
for correct spelling.
-->
<xs:simpleType name="type_pArray">
<xs:restriction base="xs:string">
<xs:enumeration value="pArray"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="type_ATTR">
<xs:restriction base="xs:string">
<xs:enumeration value="ATTR"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="type_CONST">
<xs:restriction base="xs:string">
<xs:enumeration value="CONST"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="type_ND_ATTR">
<xs:restriction base="xs:string">
<xs:enumeration value="ND_ATTR"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="type_source">
<!-- must match rule for "name" attribute in attributes.xsd -->
<xs:restriction base="xs:token">
<xs:pattern value="[A-Za-z_][\w_]*" />
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="type_outtype">
<xs:list itemType="xs:string"/>
</xs:simpleType>
<xs:simpleType name="type_NeXus_name">
<xs:restriction base="xs:token">
<xs:pattern value="[A-Za-z_][\w_]*" /> <!-- NeXus restrictions to HDF5 naming rule -->
<xs:maxLength value="63" /> <!-- HDF5 rule -->
</xs:restriction>
</xs:simpleType>
</xs:schema>
-213
View File
@@ -1,213 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
########### SVN repository information ###################
# $Date$
# $Author$
# $Revision$
# $HeadURL$
# $Id$
########### SVN repository information ###################
-->
<!-- usage:
xmllint - -noout - -schema /path1/attributes.xsd /path2/attributes.xml
(put the two minus signs together for the actual command,
XML can't have them together in an XML file, even in a comment!
see ADApp/ADSrc/asynNDArrayDriver.cpp for the rules implemented here
-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<xs:element name="Attributes">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="Attribute"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Attribute">
<xs:annotation>
<xs:documentation>
Each NDAttribute (currently either PVAttribute or paramAttribute, other types may be added in the future)
is defined with an <b>Attribute</b> tag.
(N.B.: Unfortunately there are 2 meanings of attribute here: the NDAttribute and the XML attribute)
For each Attribute declaration, there are a number of XML attributes.
XML attributes have the syntax name="value".
<!-- This next is a choice for our XML files, not a general rule for all XML files. -->
The XML attribute names are case-sensitive and must be lower case, i.e. name="xxx", not NAME="xxx".
The XML attribute values are specified by the XML Schema and are always
uppercase for datatype and dbrtype attributes.
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:attributeGroup ref="common_attributes"/>
<!-- only two types here: PARAM or EPICS_PV, each requires a different attribute -->
<xs:attribute name="type" use="required">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="PARAM"/>
<xs:enumeration value="EPICS_PV"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<!-- see ADApp/ADSrc/asynNDArrayDriver.cpp for the rules -->
<xs:attribute name="datatype" type="allowed_datatypes" default="INT">
<!-- only for type="PARAM" -->
<xs:annotation>
<xs:documentation>
Declares the parameter data type for type="PARAM".
It must match the actual data type in the driver
or plugin parameter library.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="addr" type="xs:string" default="0">
<!-- only for type="PARAM" -->
<xs:annotation>
<xs:documentation>
Declares the asyn addr (address) for type="PARAM".
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="dbrtype" type="allowed_dbrtypes" default="DBR_NATIVE">
<!-- only for type="EPICS_PV" -->
<xs:annotation>
<xs:documentation>
Declares the data type that will be used to read an
EPICS Process Variable value with Channel Access.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:attributeGroup name="common_attributes">
<xs:attribute name="description" default="">
<xs:annotation>
<xs:documentation>
words to explain this information
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="name" use="required">
<!-- must match rule for "source" attribute in NeXus_templates.xsd -->
<xs:annotation>
<xs:documentation>
One-word mnemonic reference that determines the name of the NDAttribute.
It is required, must be unique, is case-insensitive, and must start with a letter.
It can include only letters, numbers and underscore. (No whitespace or other punctuation.)
</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:pattern value="[A-Za-z_][\w_]*" />
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="source" use="required" type="type_source">
<xs:annotation>
<xs:documentation>
Declares the source of the NDAttribute. It is required.
If type="EPICS_PV" then this is the name of the EPICS PV,
which is case-sensitive.
If type="PARAM" then this is the drvInfo string that is
used in EPICS database files (e.g. ADBase.template)
to identify this parameter. This must be identical with
the declaration in the source code.
Use uppercase letters or numbers or underline.
Must start with an uppercase letter.
<!--
This could be restricted to an enumeration of allowed PARAM parameters (too many .h files to search)
xs:pattern value="[A-Z][A-Z0-9_]*"
or a regular expression for EPICS PV names (if that is possible).
xs:pattern value="+++ what is the pattern? +++"
Either way, it _should_ be restricted to not allow whitespace.
-->
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:attributeGroup>
<xs:simpleType name="allowed_datatypes">
<xs:annotation>
<xs:documentation>
Data type that will be used to read an EPICS_PV value with channel access
Data types allowed in the driver or plugin parameter library,
and must be "INT", "DOUBLE", or "STRING" (uppercase only).
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:token">
<xs:enumeration value="DOUBLE" />
<xs:enumeration value="STRING" />
<xs:enumeration value="INT">
<xs:annotation>
<xs:documentation>
(default) use integer data type
</xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="allowed_dbrtypes">
<xs:annotation>
<xs:documentation>
Data type that will be used to read an EPICS_PV value with channel access.
The allowed values are all uppercase only.
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:token">
<xs:enumeration value="DBR_CHAR" />
<xs:enumeration value="DBR_DOUBLE" />
<xs:enumeration value="DBR_ENUM" />
<xs:enumeration value="DBR_FLOAT" />
<xs:enumeration value="DBR_INT" />
<xs:enumeration value="DBR_LONG" />
<xs:enumeration value="DBR_SHORT" />
<xs:enumeration value="DBR_STRING" />
<xs:enumeration value="DBR_NATIVE">
<xs:annotation>
<xs:documentation>
(default) use native Channel Access data type
</xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="type_source">
<!-- EPICS PV name rules
see: http://www.aps.anl.gov/epics/wiki/index.php/RRM_3-14_Concepts#Database_Addresses
The record name can be a mix of the following:
a-z A-Z 0-9 _ - : . [ ] < > ;
The field name is always upper case.
full regular expression: [\w_\-:.[\]<>;]+([.][A-Z0-9]+)?
BUT, cannot express "<" in XML, must use &lt; but that won't parse!
So, use use a reduced (but very likely) subset of rules.
Do not allow these symbols: []<>
-->
<xs:union memberTypes="type_EPICS_PV_source type_PARAM_source"/>
</xs:simpleType>
<xs:simpleType name="type_EPICS_PV_source">
<xs:restriction base="xs:NMTOKEN">
<xs:pattern value="[\w_\-:.;]+([.][A-Z0-9]+)?"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="type_PARAM_source">
<!-- All the ND parameters listed in the various .h files in the source code
appear to follow the pattern of all uppercase plus numbers and the underline.
This may not be a rule but it seems to be common practice. Here, we make it a rule.
-->
<xs:restriction base="xs:NMTOKEN">
<xs:pattern value="[A-Z0-9_]+"/>
</xs:restriction>
</xs:simpleType>
</xs:schema>
-113
View File
@@ -1,113 +0,0 @@
# Create a netCDF file saving plugin.
NDFileNetCDFConfigure("FileNetCDF1", $(QSIZE), 0, "$(PORT)", 0)
dbLoadRecords("$(AREA_DETECTOR)/ADApp/Db/NDPluginBase.template","P=$(PREFIX),R=netCDF1:,PORT=FileNetCDF1,ADDR=0,TIMEOUT=1,NDARRAY_PORT=$(PORT),NDARRAY_ADDR=0")
dbLoadRecords("$(AREA_DETECTOR)/ADApp/Db/NDFile.template", "P=$(PREFIX),R=netCDF1:,PORT=FileNetCDF1,ADDR=0,TIMEOUT=1")
dbLoadRecords("$(AREA_DETECTOR)/ADApp/Db/NDFileNetCDF.template","P=$(PREFIX),R=netCDF1:,PORT=FileNetCDF1,ADDR=0,TIMEOUT=1")
# Create a TIFF file saving plugin
NDFileTIFFConfigure("FileTIFF1", $(QSIZE), 0, "$(PORT)", 0)
dbLoadRecords("$(AREA_DETECTOR)/ADApp/Db/NDPluginBase.template","P=$(PREFIX),R=TIFF1:,PORT=FileTIFF1,ADDR=0,TIMEOUT=1,NDARRAY_PORT=$(PORT),NDARRAY_ADDR=0")
dbLoadRecords("$(AREA_DETECTOR)/ADApp/Db/NDFile.template", "P=$(PREFIX),R=TIFF1:,PORT=FileTIFF1,ADDR=0,TIMEOUT=1")
dbLoadRecords("$(AREA_DETECTOR)/ADApp/Db/NDFileTIFF.template", "P=$(PREFIX),R=TIFF1:,PORT=FileTIFF1,ADDR=0,TIMEOUT=1")
# Create a JPEG file saving plugin
NDFileJPEGConfigure("FileJPEG1", $(QSIZE), 0, "$(PORT)", 0)
dbLoadRecords("$(AREA_DETECTOR)/ADApp/Db/NDPluginBase.template","P=$(PREFIX),R=JPEG1:,PORT=FileJPEG1,ADDR=0,TIMEOUT=1,NDARRAY_PORT=$(PORT),NDARRAY_ADDR=0")
dbLoadRecords("$(AREA_DETECTOR)/ADApp/Db/NDFile.template", "P=$(PREFIX),R=JPEG1:,PORT=FileJPEG1,ADDR=0,TIMEOUT=1")
dbLoadRecords("$(AREA_DETECTOR)/ADApp/Db/NDFileJPEG.template", "P=$(PREFIX),R=JPEG1:,PORT=FileJPEG1,ADDR=0,TIMEOUT=1")
# Create a NeXus file saving plugin
NDFileNexusConfigure("FileNexus1", $(QSIZE), 0, "$(PORT)", 0)
dbLoadRecords("$(AREA_DETECTOR)/ADApp/Db/NDPluginBase.template","P=$(PREFIX),R=Nexus1:,PORT=FileNexus1,ADDR=0,TIMEOUT=1,NDARRAY_PORT=$(PORT),NDARRAY_ADDR=0")
dbLoadRecords("$(AREA_DETECTOR)/ADApp/Db/NDFile.template", "P=$(PREFIX),R=Nexus1:,PORT=FileNexus1,ADDR=0,TIMEOUT=1")
dbLoadRecords("$(AREA_DETECTOR)/ADApp/Db/NDFileNexus.template", "P=$(PREFIX),R=Nexus1:,PORT=FileNexus1,ADDR=0,TIMEOUT=1")
# Create an HDF5 file saving plugin
NDFileHDF5Configure("FileHDF1", $(QSIZE), 0, "$(PORT)", 0)
dbLoadRecords("$(AREA_DETECTOR)/ADApp/Db/NDPluginBase.template","P=$(PREFIX),R=HDF1:,PORT=FileHDF1,ADDR=0,TIMEOUT=1,NDARRAY_PORT=$(PORT),NDARRAY_ADDR=0")
dbLoadRecords("$(AREA_DETECTOR)/ADApp/Db/NDFile.template", "P=$(PREFIX),R=HDF1:,PORT=FileHDF1,ADDR=0,TIMEOUT=1")
dbLoadRecords("$(AREA_DETECTOR)/ADApp/Db/NDFileHDF5.template", "P=$(PREFIX),R=HDF1:,PORT=FileHDF1,ADDR=0,TIMEOUT=1")
# Create a Magick file saving plugin
NDFileMagickConfigure("FileMagick1", $(QSIZE), 0, "$(PORT)", 0)
dbLoadRecords("$(AREA_DETECTOR)/ADApp/Db/NDPluginBase.template","P=$(PREFIX),R=Magick1:,PORT=FileMagick1,ADDR=0,TIMEOUT=1,NDARRAY_PORT=$(PORT),NDARRAY_ADDR=0")
dbLoadRecords("$(AREA_DETECTOR)/ADApp/Db/NDFile.template", "P=$(PREFIX),R=Magick1:,PORT=FileMagick1,ADDR=0,TIMEOUT=1")
dbLoadRecords("$(AREA_DETECTOR)/ADApp/Db/NDFileMagick.template","P=$(PREFIX),R=Magick1:,PORT=FileMagick1,ADDR=0,TIMEOUT=1")
# Create 4 ROI plugins
NDROIConfigure("ROI1", $(QSIZE), 0, "$(PORT)", 0, 0, 0)
dbLoadRecords("$(AREA_DETECTOR)/ADApp/Db/NDPluginBase.template","P=$(PREFIX),R=ROI1:, PORT=ROI1,ADDR=0,TIMEOUT=1,NDARRAY_PORT=$(PORT),NDARRAY_ADDR=0")
dbLoadRecords("$(AREA_DETECTOR)/ADApp/Db/NDROI.template", "P=$(PREFIX),R=ROI1:, PORT=ROI1,ADDR=0,TIMEOUT=1")
NDROIConfigure("ROI2", $(QSIZE), 0, "$(PORT)", 0, 0, 0)
dbLoadRecords("$(AREA_DETECTOR)/ADApp/Db/NDPluginBase.template","P=$(PREFIX),R=ROI2:, PORT=ROI2,ADDR=0,TIMEOUT=1,NDARRAY_PORT=$(PORT),NDARRAY_ADDR=0")
dbLoadRecords("$(AREA_DETECTOR)/ADApp/Db/NDROI.template", "P=$(PREFIX),R=ROI2:, PORT=ROI2,ADDR=0,TIMEOUT=1")
NDROIConfigure("ROI3", $(QSIZE), 0, "$(PORT)", 0, 0, 0)
dbLoadRecords("$(AREA_DETECTOR)/ADApp/Db/NDPluginBase.template","P=$(PREFIX),R=ROI3:, PORT=ROI3,ADDR=0,TIMEOUT=1,NDARRAY_PORT=$(PORT),NDARRAY_ADDR=0")
dbLoadRecords("$(AREA_DETECTOR)/ADApp/Db/NDROI.template", "P=$(PREFIX),R=ROI3:, PORT=ROI3,ADDR=0,TIMEOUT=1")
NDROIConfigure("ROI4", $(QSIZE), 0, "$(PORT)", 0, 0, 0)
dbLoadRecords("$(AREA_DETECTOR)/ADApp/Db/NDPluginBase.template","P=$(PREFIX),R=ROI4:, PORT=ROI4,ADDR=0,TIMEOUT=1,NDARRAY_PORT=$(PORT),NDARRAY_ADDR=0")
dbLoadRecords("$(AREA_DETECTOR)/ADApp/Db/NDROI.template", "P=$(PREFIX),R=ROI4:, PORT=ROI4,ADDR=0,TIMEOUT=1")
# Create a processing plugin
NDProcessConfigure("PROC1", $(QSIZE), 0, "$(PORT)", 0, 0, 0)
dbLoadRecords("$(AREA_DETECTOR)/ADApp/Db/NDPluginBase.template","P=$(PREFIX),R=Proc1:, PORT=PROC1,ADDR=0,TIMEOUT=1,NDARRAY_PORT=$(PORT),NDARRAY_ADDR=0")
dbLoadRecords("$(AREA_DETECTOR)/ADApp/Db/NDProcess.template", "P=$(PREFIX),R=Proc1:, PORT=PROC1,ADDR=0,TIMEOUT=1")
# Create 5 statistics plugins
NDStatsConfigure("STATS1", $(QSIZE), 0, "$(PORT)", 0, 0, 0)
dbLoadRecords("$(AREA_DETECTOR)/ADApp/Db/NDPluginBase.template","P=$(PREFIX),R=Stats1:, PORT=STATS1,ADDR=0,TIMEOUT=1,NDARRAY_PORT=ROI1,NDARRAY_ADDR=0")
dbLoadRecords("$(AREA_DETECTOR)/ADApp/Db/NDStats.template", "P=$(PREFIX),R=Stats1:, PORT=STATS1,ADDR=0,TIMEOUT=1,HIST_SIZE=256,XSIZE=$(XSIZE),YSIZE=$(YSIZE),NCHANS=$(NCHANS)")
NDStatsConfigure("STATS2", $(QSIZE), 0, "ROI1", 0, 0, 0)
dbLoadRecords("$(AREA_DETECTOR)/ADApp/Db/NDPluginBase.template","P=$(PREFIX),R=Stats2:, PORT=STATS2,ADDR=0,TIMEOUT=1,NDARRAY_PORT=ROI2,NDARRAY_ADDR=0")
dbLoadRecords("$(AREA_DETECTOR)/ADApp/Db/NDStats.template", "P=$(PREFIX),R=Stats2:, PORT=STATS2,ADDR=0,TIMEOUT=1,HIST_SIZE=256,XSIZE=$(XSIZE),YSIZE=$(YSIZE),NCHANS=$(NCHANS)")
NDStatsConfigure("STATS3", $(QSIZE), 0, "ROI2", 0, 0, 0)
dbLoadRecords("$(AREA_DETECTOR)/ADApp/Db/NDPluginBase.template","P=$(PREFIX),R=Stats3:, PORT=STATS3,ADDR=0,TIMEOUT=1,NDARRAY_PORT=ROI3,NDARRAY_ADDR=0")
dbLoadRecords("$(AREA_DETECTOR)/ADApp/Db/NDStats.template", "P=$(PREFIX),R=Stats3:, PORT=STATS3,ADDR=0,TIMEOUT=1,HIST_SIZE=256,XSIZE=$(XSIZE),YSIZE=$(YSIZE),NCHANS=$(NCHANS)")
NDStatsConfigure("STATS4", $(QSIZE), 0, "ROI3", 0, 0, 0)
dbLoadRecords("$(AREA_DETECTOR)/ADApp/Db/NDPluginBase.template","P=$(PREFIX),R=Stats4:, PORT=STATS4,ADDR=0,TIMEOUT=1,NDARRAY_PORT=ROI4,NDARRAY_ADDR=0")
dbLoadRecords("$(AREA_DETECTOR)/ADApp/Db/NDStats.template", "P=$(PREFIX),R=Stats4:, PORT=STATS4,ADDR=0,TIMEOUT=1,HIST_SIZE=256,XSIZE=$(XSIZE),YSIZE=$(YSIZE),NCHANS=$(NCHANS)")
NDStatsConfigure("STATS5", $(QSIZE), 0, "ROI4", 0, 0, 0)
dbLoadRecords("$(AREA_DETECTOR)/ADApp/Db/NDPluginBase.template","P=$(PREFIX),R=Stats5:, PORT=STATS5,ADDR=0,TIMEOUT=1,NDARRAY_PORT=$(PORT),NDARRAY_ADDR=0")
dbLoadRecords("$(AREA_DETECTOR)/ADApp/Db/NDStats.template", "P=$(PREFIX),R=Stats5:, PORT=STATS5,ADDR=0,TIMEOUT=1,HIST_SIZE=256,XSIZE=$(XSIZE),YSIZE=$(YSIZE),NCHANS=$(NCHANS)")
# Create a transform plugin
NDTransformConfigure("TRANS1", $(QSIZE), 0, "$(PORT)", 0, 0, 0)
dbLoadRecords("$(AREA_DETECTOR)/ADApp/Db/NDPluginBase.template","P=$(PREFIX),R=Trans1:, PORT=TRANS1,ADDR=0,TIMEOUT=1,NDARRAY_PORT=$(PORT),NDARRAY_ADDR=0")
dbLoadRecords("$(AREA_DETECTOR)/ADApp/Db/NDTransform.template", "P=$(PREFIX),R=Trans1:, PORT=TRANS1,ADDR=0,TIMEOUT=1")
# Create an overlay plugin with 8 overlays
NDOverlayConfigure("OVER1", $(QSIZE), 0, "$(PORT)", 0, 8, 0, 0)
dbLoadRecords("$(AREA_DETECTOR)/ADApp/Db/NDPluginBase.template","P=$(PREFIX),R=Over1:, PORT=OVER1,ADDR=0,TIMEOUT=1,NDARRAY_PORT=$(PORT),NDARRAY_ADDR=0")
dbLoadRecords("$(AREA_DETECTOR)/ADApp/Db/NDOverlay.template", "P=$(PREFIX),R=Over1:, PORT=OVER1,ADDR=0,TIMEOUT=1")
dbLoadRecords("$(AREA_DETECTOR)/ADApp/Db/NDOverlayN.template","P=$(PREFIX),R=Over1:1:,NAME=ROI1, SHAPE=1,O=Over1:,XPOS=$(PREFIX)ROI1:MinX_RBV,YPOS=$(PREFIX)ROI1:MinY_RBV,XSIZE=$(PREFIX)ROI1:SizeX_RBV,YSIZE=$(PREFIX)ROI1:SizeY_RBV,PORT=OVER1,ADDR=0,TIMEOUT=1")
dbLoadRecords("$(AREA_DETECTOR)/ADApp/Db/NDOverlayN.template","P=$(PREFIX),R=Over1:2:,NAME=ROI2, SHAPE=1,O=Over1:,XPOS=$(PREFIX)ROI2:MinX_RBV,YPOS=$(PREFIX)ROI2:MinY_RBV,XSIZE=$(PREFIX)ROI2:SizeX_RBV,YSIZE=$(PREFIX)ROI2:SizeY_RBV,PORT=OVER1,ADDR=1,TIMEOUT=1")
dbLoadRecords("$(AREA_DETECTOR)/ADApp/Db/NDOverlayN.template","P=$(PREFIX),R=Over1:3:,NAME=ROI3, SHAPE=1,O=Over1:,XPOS=$(PREFIX)ROI3:MinX_RBV,YPOS=$(PREFIX)ROI3:MinY_RBV,XSIZE=$(PREFIX)ROI3:SizeX_RBV,YSIZE=$(PREFIX)ROI3:SizeY_RBV,PORT=OVER1,ADDR=2,TIMEOUT=1")
dbLoadRecords("$(AREA_DETECTOR)/ADApp/Db/NDOverlayN.template","P=$(PREFIX),R=Over1:4:,NAME=ROI4, SHAPE=1,O=Over1:,XPOS=$(PREFIX)ROI4:MinX_RBV,YPOS=$(PREFIX)ROI4:MinY_RBV,XSIZE=$(PREFIX)ROI4:SizeX_RBV,YSIZE=$(PREFIX)ROI4:SizeY_RBV,PORT=OVER1,ADDR=3,TIMEOUT=1")
dbLoadRecords("$(AREA_DETECTOR)/ADApp/Db/NDOverlayN.template","P=$(PREFIX),R=Over1:5:,NAME=Cursor1,SHAPE=1,O=Over1:,XPOS=junk, YPOS=junk, XSIZE=junk, YSIZE=junk, PORT=OVER1,ADDR=4,TIMEOUT=1")
dbLoadRecords("$(AREA_DETECTOR)/ADApp/Db/NDOverlayN.template","P=$(PREFIX),R=Over1:6:,NAME=Cursor2,SHAPE=1,O=Over1:,XPOS=junk, YPOS=junk, XSIZE=junk, YSIZE=junk, PORT=OVER1,ADDR=5,TIMEOUT=1")
dbLoadRecords("$(AREA_DETECTOR)/ADApp/Db/NDOverlayN.template","P=$(PREFIX),R=Over1:7:,NAME=Box1, SHAPE=1,O=Over1:,XPOS=junk, YPOS=junk, XSIZE=junk, YSIZE=junk, PORT=OVER1,ADDR=6,TIMEOUT=1")
dbLoadRecords("$(AREA_DETECTOR)/ADApp/Db/NDOverlayN.template","P=$(PREFIX),R=Over1:8:,NAME=Box2, SHAPE=1,O=Over1:,XPOS=junk, YPOS=junk, XSIZE=junk, YSIZE=junk, PORT=OVER1,ADDR=7,TIMEOUT=1")
# Create 2 color conversion plugins
NDColorConvertConfigure("CC1", $(QSIZE), 0, "$(PORT)", 0, 0, 0)
dbLoadRecords("$(AREA_DETECTOR)/ADApp/Db/NDPluginBase.template", "P=$(PREFIX),R=CC1:, PORT=CC1,ADDR=0,TIMEOUT=1,NDARRAY_PORT=$(PORT),NDARRAY_ADDR=0")
dbLoadRecords("$(AREA_DETECTOR)/ADApp/Db/NDColorConvert.template", "P=$(PREFIX),R=CC1:, PORT=CC1,ADDR=0,TIMEOUT=1")
NDColorConvertConfigure("CC2", $(QSIZE), 0, "$(PORT)", 0, 0, 0)
dbLoadRecords("$(AREA_DETECTOR)/ADApp/Db/NDPluginBase.template", "P=$(PREFIX),R=CC2:, PORT=CC2,ADDR=0,TIMEOUT=1,NDARRAY_PORT=$(PORT),NDARRAY_ADDR=0")
dbLoadRecords("$(AREA_DETECTOR)/ADApp/Db/NDColorConvert.template", "P=$(PREFIX),R=CC2:, PORT=CC2,ADDR=0,TIMEOUT=1")
# Load scan records
dbLoadRecords("$(SSCAN)/sscanApp/Db/scan.db", "P=$(PREFIX),MAXPTS1=2000,MAXPTS2=200,MAXPTS3=20,MAXPTS4=10,MAXPTSH=10")
# Load sseq record for acquisition sequence
dbLoadRecords("$(CALC)/calcApp/Db/yySseq.db", "P=$(PREFIX), S=AcquireSequence")
set_requestfile_path("./")
set_requestfile_path("$(AREA_DETECTOR)/ADApp/Db")
set_requestfile_path("$(CALC)/calcApp/Db")
set_requestfile_path("$(SSCAN)/sscanApp/Db")
set_savefile_path("./autosave")
set_pass0_restoreFile("auto_settings.sav")
set_pass1_restoreFile("auto_settings.sav")
save_restoreSet_status_prefix("$(PREFIX)")
dbLoadRecords("$(AUTOSAVE)/asApp/Db/save_restoreStatus.db", "P=$(PREFIX)")
-155
View File
@@ -1,155 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
########### SVN repository information ###################
# $Date$
# $Author$
# $Revision$
# $HeadURL$
# $Id$
########### SVN repository information ###################
-->
<!-- usage:
xmllint - -schematron /path1/template.sch /path2/NX_template_file.xml
(put the two minus signs together for the actual command,
XML can't have them together in an XML file, even in a comment!
TODO: under development
-->
<schema xmlns="http://purl.oclc.org/dsdl/schematron">
<title>validate EPICS areaDetector NeXus template file</title>
<!--
RULES
================
+ rule is implemented below
~ rule is approximated below
! rule is implied but not restricted
!Element names can be chosen by user (any)
~group elements contain groups and datasets and have a name attribute or type="UserGroup" attribute
group names are either NeXus names or non-NeXus names
~datasets contain optional Attr elements and optional constant text
datasets
+source (required if type="ND_ATTR")
type
outtype
+NeXus template files have "NXroot" as the root element
+"NXentry" is the child element of "NXroot"
+Non-NeXus groups (does not start with "NX") must have a type="UserGroup" attribute
!Non-NeXus groups can be anywhere.
+Each NeXus group must have a "name" attribute
Each NXentry must have a unique name.
+Each NXentry must have a "NXdata" group.
+Each NXdata must have one and only one dataset with attribute signal="1"
For "name" attributes:
+must be less than 64 characters
~each must match the NeXus regexp: [A-Za-z_][\w_]*
each must be unique within the same HDF level
some NeXus group names are not yet known to areaDetector, so use type="UserGroup" attribute for them
-->
<pattern id="name_regexp">
<!-- Validate the name rules -->
<rule context="*/@name">
<assert test="string-length(.)&lt;64">name attribute must be less than 64 characters</assert>
<report test="starts-with(.,'NX')">Do not start names with "NX" (reserved by NeXus)</report>
<!-- TODO: test regexp [A-Za-z_][\w_]* --> <!-- but cannot do in Schematron -->
<report test="starts-with(.,'0')">names must start with a letter or "_"</report>
<report test="starts-with(.,'1')">names must start with a letter or "_"</report>
<report test="starts-with(.,'2')">names must start with a letter or "_"</report>
<report test="starts-with(.,'3')">names must start with a letter or "_"</report>
<report test="starts-with(.,'4')">names must start with a letter or "_"</report>
<report test="starts-with(.,'5')">names must start with a letter or "_"</report>
<report test="starts-with(.,'6')">names must start with a letter or "_"</report>
<report test="starts-with(.,'7')">names must start with a letter or "_"</report>
<report test="starts-with(.,'8')">names must start with a letter or "_"</report>
<report test="starts-with(.,'9')">names must start with a letter or "_"</report>
<report test="starts-with(.,' ')">names must NOT start with whitespace</report>
<report test="contains(normalize-space(.),' ')">names must not contain a space</report>
<report test="contains(.,'&amp;')">names must not contain a "&amp;"</report>
<report test="contains(.,'&gt;')">names must not contain a "&gt;"</report>
<report test="contains(.,'&lt;')">names must not contain a "&lt;"</report>
<report test="contains(.,'!')">names must not contain a "!"</report>
<report test="contains(.,'#')">names must not contain a "#"</report>
<report test="contains(.,'%')">names must not contain a "%"</report>
<report test="contains(.,'(')">names must not contain a "("</report>
<report test="contains(.,')')">names must not contain a ")"</report>
<report test="contains(.,'*')">names must not contain a "*"</report>
<report test="contains(.,'+')">names must not contain a "+"</report>
<report test="contains(.,',')">names must not contain a ","</report>
<report test="contains(.,'-')">names must not contain a "-"</report>
<report test="contains(.,'.')">names must not contain a "."</report>
<report test="contains(.,'/')">names must not contain a "/"</report>
<report test="contains(.,':')">names must not contain a ":"</report>
<report test="contains(.,';')">names must not contain a ";"</report>
<report test="contains(.,'?')">names must not contain a "?"</report>
<report test="contains(.,'@')">names must not contain a "@"</report>
<report test="contains(.,'[')">names must not contain a "["</report>
<report test="contains(.,'\')">names must not contain a "\"</report>
<report test="contains(.,']')">names must not contain a "]"</report>
<report test="contains(.,'^')">names must not contain a "^"</report>
<report test="contains(.,'{')">names must not contain a "{"</report>
<report test="contains(.,'|')">names must not contain a "|"</report>
<report test="contains(.,'}')">names must not contain a "}"</report>
<report test="contains(.,'~')">names must not contain a "~"</report>
</rule>
</pattern>
<pattern id="NeXus_root_element">
<!-- Ensure the document starts with /NXroot and has /NXroot/NXentry -->
<rule context="/NXroot">
<assert test="NXentry">/NXroot must contain at least one NXentry group</assert>
</rule>
</pattern>
<pattern id="NXentry_NXdata_requirements">
<!-- Ensure the document has /NXroot/NXentry/NXdata -->
<rule context="NXentry">
<assert test="NXdata">NXentry must contain at least one NXdata group</assert>
</rule>
</pattern>
<pattern id="NXdata_requirements">
<!-- Ensure the NeXus default plottable data requirements -->
<rule context="NXdata">
<assert test="count(*[@type='pArray'])=1">
NXdata must contain one dataset with type="pArray" (image data)
</assert>
<assert test="*/Attr[@name='signal']=1">
NXdata must contain a dataset with attribute "signal"
</assert>
<!-- TODO: check that _only_ one dataset in NXdata has signal="1" attribute declared
Suggest to use Muenchian technique, but key attribute not supported here.
-->
</rule>
</pattern>
<pattern id="Attr_element">
<!-- EPICS areaDetector declares user attributes with an Attr element -->
<rule context="Attr">
<report test="@type='ND_ATTR' and count(@source)=0">
must provide a "source" attribute for ND_ATTR
</report>
<report test="@source and @type!='ND_ATTR'">
must use type="ND_ATTR" when specifying a source
</report>
<!-- TODO: just report the first (or last) occurence -->
<report test="not(starts-with(name(../..),'NX')) and string(../../@type)!='UserGroup'">
Group <value-of select="name(../..)"/> needs a type="UserGroup" attribute
</report>
<!-- TODO: just report the first (or last) occurence -->
<report test="starts-with(name(../..),'NX') and count(../../@name)=0">
NeXus group <value-of select="name(../..)"/> must have a "name" attribute
</report>
</rule>
</pattern>
</schema>
-22
View File
@@ -1,22 +0,0 @@
caput $1:cam1:ArrayCounter_RBV.TSE $2
caput $1:image1:ArrayCounter_RBV.TSE $2
caput $1:image1:UniqueId_RBV.TSE $2
caput $1:image1:ArrayData.TSE $2
caput $1:image1:EpicsTSSec_RBV.TSE $2
caput $1:image1:EpicsTSNsec_RBV.TSE $2
caput $1:ROI1:ArrayCounter_RBV.TSE $2
caput $1:ROI1:UniqueId_RBV.TSE $2
caput $1:Stats1:ArrayCounter_RBV.TSE $2
caput $1:Stats1:UniqueId_RBV.TSE $2
caput $1:Stats1:MeanValue_RBV.TSE $2
camonitor -#1 $1:cam1:ArrayCounter_RBV \
$1:image1:ArrayCounter_RBV \
$1:image1:UniqueId_RBV \
$1:image1:ArrayData \
$1:image1:EpicsTSSec_RBV \
$1:image1:EpicsTSNsec_RBV \
$1:ROI1:ArrayCounter_RBV \
$1:ROI1:UniqueId_RBV \
$1:Stats1:ArrayCounter_RBV \
$1:Stats1:UniqueId_RBV \
$1:Stats1:MeanValue_RBV \
-28
View File
@@ -1,28 +0,0 @@
#!/bin/sh
########### SVN repository information ###################
# $Date$
# $Author$
# $Revision$
# $HeadURL$
# $Id$
########### SVN repository information ###################
# Validate the XML Attribute and Template files
ATTRIBUTE_SCHEMA="--noout --schema ./attributes.xsd"
#TEMPLATE_SCHEMA="--noout --schema ./NeXus_templates.xsd"
TEMPLATE_SCHEMA="--noout --schematron ./template.sch"
# NDArray Attribute declaration files
xmllint ${ATTRIBUTE_SCHEMA} iocPerkinElmer/nexus_templates/PerkinElmerParams.xml
xmllint ${ATTRIBUTE_SCHEMA} iocPilatus/pilatusAttributes.xml
xmllint ${ATTRIBUTE_SCHEMA} iocProsilica/prosilicaAttributes.xml
xmllint ${ATTRIBUTE_SCHEMA} iocSimDetector/ROIAttributes.xml
xmllint ${ATTRIBUTE_SCHEMA} iocSimDetector/netCDFAttributes.xml
xmllint ${ATTRIBUTE_SCHEMA} iocSimDetector/simDetectorAttributes.xml
# NeXus file writer plugin template files
#
xmllint ${TEMPLATE_SCHEMA} iocPerkinElmer/nexus_templates/example.xml
xmllint ${TEMPLATE_SCHEMA} iocSimDetector/NexusTemplate.xml