Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions XML_schema/NDAttributes.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,10 @@
</xs:simpleType>

<xs:simpleType name="type_source">
<xs:union memberTypes="type_EPICS_PV_source type_PARAM_source"/>
</xs:simpleType>

<xs:simpleType name="type_EPICS_PV_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:
Expand All @@ -189,13 +193,11 @@
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: []<>

To support macro expansion, support 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 base="xs:string">
<xs:pattern value="[\w_\-:.;\$\(\)]+([.][A-Z0-9]+)?"/>
</xs:restriction>
</xs:simpleType>

Expand Down
15 changes: 15 additions & 0 deletions XML_schema/example_attributes.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" standalone="no" ?>
<!-- Attributes -->
<Attributes
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://github.com/areaDetector/ADCore/blob/master/iocBoot/NDAttributes.xsd"
>
<Attribute name="AcquireTime" type="EPICS_PV" source="13SIM1:cam1:AcquireTime" dbrtype="DBR_NATIVE" description="Camera acquire time"/>
<Attribute name="ImageCounter" type="PARAM" source="ARRAY_COUNTER" datatype="INT" description="Image counter"/>
<Attribute name="calc1_val" type="EPICS_PV" source="$(P)userCalc1.VAL" dbrtype="DBR_NATIVE" description="some calculation result"/>
<Attribute name="calc2_val" type="EPICS_PV" source="$(P)userCalc2.VAL" dbrtype="DBR_NATIVE" description="another calculation result"/>
<Attribute name="MaxSizeX" type="PARAM" source="MAX_SIZE_X" datatype="INT" description="Detector X size"/>
<Attribute name="MaxSizeY" type="PARAM" source="MAX_SIZE_Y" datatype="INT" description="Detector Y size"/>
<Attribute name="CameraModel" type="PARAM" source="MODEL" datatype="STRING" description="Camera model"/>
<Attribute name="CameraManufacturer" type="PARAM" source="MANUFACTURER" datatype="STRING" description="Camera manufacturer"/>
</Attributes>
Loading