From 9c0b187135290c57f38836ec485576d16a6fcd18 Mon Sep 17 00:00:00 2001
From: aschwinn <al.schwinn@gsi.de>
Date: Wed, 26 Jul 2017 14:50:44 +0200
Subject: [PATCH] Bug 1471 - Add missing models to deploy schema

---
 silecs-model/src/xml/DeploySchema.xsd | 285 +++++++++++++-------------
 1 file changed, 140 insertions(+), 145 deletions(-)

diff --git a/silecs-model/src/xml/DeploySchema.xsd b/silecs-model/src/xml/DeploySchema.xsd
index 107325b..cf53afb 100644
--- a/silecs-model/src/xml/DeploySchema.xsd
+++ b/silecs-model/src/xml/DeploySchema.xsd
@@ -178,95 +178,7 @@
         <xs:attribute name="base-address" type="xs:unsignedInt" use="required" />
     </xs:complexType>
 
-    <xs:simpleType name="HostNameType">
-        <xs:restriction base="xs:string">
-            <xs:minLength value="1" />
-            <xs:pattern value="[_A-Za-z0-9]*" />
-        </xs:restriction>
-    </xs:simpleType>
-    <xs:simpleType name="DeployNameType">
-        <xs:restriction base="xs:string">
-            <xs:minLength value="1" />
-            <xs:maxLength value="20" />
-            <xs:pattern value="[_A-Za-z]+[_A-Za-z0-9]*" />
-        </xs:restriction>
-    </xs:simpleType>
 
-    <xs:simpleType name="DeviceNameType">
-        <xs:restriction base="xs:string">
-            <xs:minLength value="1" />
-            <xs:maxLength value="30" />
-            <!-- In FESA the deviceName is restricted to max. 30 characters -->
-            <xs:pattern value="[_A-Za-z][_A-Za-z0-9]*" />
-        </xs:restriction>
-    </xs:simpleType>
-
-    <xs:simpleType name="SiemensSystemType">
-        <xs:restriction base="xs:string">
-            <xs:enumeration value="STEP-7" />
-            <xs:enumeration value="TIA-PORTAL" />
-        </xs:restriction>
-    </xs:simpleType>
-    <xs:simpleType name="SchneiderSystemType">
-        <xs:restriction base="xs:string">
-            <xs:enumeration value="UNITY Pro" />
-        </xs:restriction>
-    </xs:simpleType>
-    <xs:simpleType name="BeckhoffSystemType">
-        <xs:restriction base="xs:string">
-            <xs:enumeration value="TWINCat" />
-        </xs:restriction>
-    </xs:simpleType>
-    <xs:simpleType name="RabbitSystemType">
-        <xs:restriction base="xs:string">
-            <xs:enumeration value="Standard-C" />
-        </xs:restriction>
-    </xs:simpleType>
-    <xs:simpleType name="PCSystemType">
-        <xs:restriction base="xs:string">
-            <xs:enumeration value="S7 virtual controller" />
-        </xs:restriction>
-    </xs:simpleType>
-    <xs:simpleType name="NISystemType">
-        <xs:restriction base="xs:string">
-            <xs:enumeration value="Labview" />
-        </xs:restriction>
-    </xs:simpleType>
-    <xs:simpleType name="BothProtocolType">
-        <xs:restriction base="xs:string">
-            <xs:enumeration value="DEVICE_MODE" />
-            <xs:enumeration value="BLOCK_MODE" />
-        </xs:restriction>
-    </xs:simpleType>
-    <xs:simpleType name="DeviceProtocolType">
-        <xs:restriction base="xs:string">
-            <xs:enumeration value="DEVICE_MODE" />
-        </xs:restriction>
-    </xs:simpleType>
-    <xs:simpleType name="BlockProtocolType">
-        <xs:restriction base="xs:string">
-            <xs:enumeration value="BLOCK_MODE" />
-        </xs:restriction>
-    </xs:simpleType>
-
-    <xs:simpleType name="DomainType">
-        <xs:restriction base="xs:string">
-            <xs:enumeration value="ALL" />
-            <xs:enumeration value="ADE" />
-            <xs:enumeration value="CPS" />
-            <xs:enumeration value="CTF" />
-            <xs:enumeration value="ISO" />
-            <xs:enumeration value="LEI" />
-            <xs:enumeration value="LHC" />
-            <xs:enumeration value="LIN" />
-            <xs:enumeration value="LN3" />
-            <xs:enumeration value="LN4" />
-            <xs:enumeration value="PSB" />
-            <xs:enumeration value="REX" />
-            <xs:enumeration value="SPS" />
-            <xs:enumeration value="TST" />
-        </xs:restriction>
-    </xs:simpleType>
 
     <xs:complexType name="SimpleControllerType">
         <xs:sequence>
@@ -366,17 +278,7 @@
                         </xs:appinfo>
                     </xs:annotation>
                 </xs:attribute>
-                <xs:attribute name="model" use="required">
-                    <xs:simpleType>
-                        <xs:restriction base="xs:string">
-                            <xs:enumeration value="SIMATIC_S7-300" />
-                            <xs:enumeration value="SIMATIC_S7-400" />
-                            <xs:enumeration value="SIMATIC_S7-1200" />
-                            <xs:enumeration value="SIMATIC_S7-1500" />
-                            <xs:enumeration value="SIMATIC_ET-200S" />
-                        </xs:restriction>
-                    </xs:simpleType>
-                </xs:attribute>
+                <xs:attribute name="model" use="required" type="SiemensModelType"/>
                 <xs:attribute name="protocol" type="BothProtocolType" use="required">
                     <xs:annotation>
                         <xs:documentation>Data access mode is defined at PLC level for all
@@ -434,15 +336,7 @@
                         </xs:appinfo>
                     </xs:annotation>
                 </xs:attribute>
-                <xs:attribute name="model" use="required">
-                    <xs:simpleType>
-                        <xs:restriction base="xs:string">
-                            <xs:enumeration value="Premium" />
-                            <xs:enumeration value="Quantum" />
-                            <xs:enumeration value="M340" />
-                        </xs:restriction>
-                    </xs:simpleType>
-                </xs:attribute>
+                <xs:attribute name="model" use="required" type="SchneiderModelType"/>
                 <xs:attribute name="protocol" type="BlockProtocolType" use="required">
                     <xs:annotation>
                         <xs:documentation>Data access mode is defined at PLC level for all
@@ -500,17 +394,7 @@
                         </xs:appinfo>
                     </xs:annotation>
                 </xs:attribute>
-                <xs:attribute name="model" use="required">
-                    <xs:simpleType>
-                        <xs:restriction base="xs:string">
-                            <xs:enumeration value="BC9xxx" />
-                            <xs:enumeration value="CX9xxx" />
-                            <xs:enumeration value="BK9xxx" />
-                            <xs:enumeration value="BC9020" />
-                            <xs:enumeration value="CX9020" />
-                        </xs:restriction>
-                    </xs:simpleType>
-                </xs:attribute>
+                <xs:attribute name="model" use="required" type="BeckhoffModelType"/>
                 <xs:attribute name="protocol" type="BlockProtocolType" use="required">
                     <xs:annotation>
                         <xs:documentation>Data access mode is defined at PLC level for all
@@ -568,14 +452,7 @@
                         </xs:appinfo>
                     </xs:annotation>
                 </xs:attribute>
-                <xs:attribute name="model" use="required">
-                    <xs:simpleType>
-                        <xs:restriction base="xs:string">
-                            <xs:enumeration value="Rabbit_RCM_4010" />
-                            <xs:enumeration value="Rabbit_RCM_2000" />
-                        </xs:restriction>
-                    </xs:simpleType>
-                </xs:attribute>
+                <xs:attribute name="model" use="required" type="RabbitModelType"/>
                 <xs:attribute name="protocol" type="BothProtocolType" use="required">
                     <xs:annotation>
                         <xs:documentation>Data access mode is defined at PLC level for all
@@ -625,13 +502,7 @@
                         </xs:appinfo>
                     </xs:annotation>
                 </xs:attribute>
-                <xs:attribute name="model" use="required">
-                    <xs:simpleType>
-                        <xs:restriction base="xs:string">
-                            <xs:enumeration value="SIMATIC_S7-VIRTUAL" />
-                        </xs:restriction>
-                    </xs:simpleType>
-                </xs:attribute>
+                <xs:attribute name="model" use="required" type="VirtualModelType"/>
                 <xs:attribute name="protocol" type="BothProtocolType" use="required">
                     <xs:annotation>
                         <xs:documentation>Data access mode is defined at PLC level for all the classes</xs:documentation>
@@ -660,17 +531,7 @@
     <xs:complexType name="NIControllerType">
         <xs:complexContent>
             <xs:extension base="SimpleControllerType">
-                <xs:attribute name="model" use="required">
-                    <xs:simpleType>
-                        <xs:restriction base="xs:string">
-                            <xs:enumeration value="Compact_RIO" />
-                            <xs:enumeration value="PXI_RT" />
-                            <xs:enumeration value="PXI_Windows" />
-                            <xs:enumeration value="PC_Windows" />
-                            <xs:enumeration value="Other_Support_CNV" />
-                        </xs:restriction>
-                    </xs:simpleType>
-                </xs:attribute>
+                <xs:attribute name="model" use="required" type="NIModelType"/>
                 <xs:attribute name="system" type="NISystemType" use="required">
                     <xs:annotation>
                         <xs:documentation>System infrastructure used to develop and/or
@@ -702,4 +563,138 @@
             </xs:extension>
         </xs:complexContent>
     </xs:complexType>
+    
+        <xs:simpleType name="HostNameType">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1" />
+            <xs:pattern value="[_A-Za-z0-9]*" />
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="DeployNameType">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1" />
+            <xs:maxLength value="20" />
+            <xs:pattern value="[_A-Za-z]+[_A-Za-z0-9]*" />
+        </xs:restriction>
+    </xs:simpleType>
+
+    <xs:simpleType name="DeviceNameType">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1" />
+            <xs:maxLength value="30" />
+            <!-- In FESA the deviceName is restricted to max. 30 characters -->
+            <xs:pattern value="[_A-Za-z][_A-Za-z0-9]*" />
+        </xs:restriction>
+    </xs:simpleType>
+
+    <xs:simpleType name="SiemensSystemType">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="STEP-7" />
+            <xs:enumeration value="TIA-PORTAL" />
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="SchneiderSystemType">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="UNITY Pro" />
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="BeckhoffSystemType">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="TWINCat" />
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="RabbitSystemType">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="Standard-C" />
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="PCSystemType">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="S7 virtual controller" />
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="NISystemType">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="Labview" />
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="BothProtocolType">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="DEVICE_MODE" />
+            <xs:enumeration value="BLOCK_MODE" />
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="DeviceProtocolType">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="DEVICE_MODE" />
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="BlockProtocolType">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="BLOCK_MODE" />
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="DomainType">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="ALL" />
+            <xs:enumeration value="ADE" />
+            <xs:enumeration value="CPS" />
+            <xs:enumeration value="CTF" />
+            <xs:enumeration value="ISO" />
+            <xs:enumeration value="LEI" />
+            <xs:enumeration value="LHC" />
+            <xs:enumeration value="LIN" />
+            <xs:enumeration value="LN3" />
+            <xs:enumeration value="LN4" />
+            <xs:enumeration value="PSB" />
+            <xs:enumeration value="REX" />
+            <xs:enumeration value="SPS" />
+            <xs:enumeration value="TST" />
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="SiemensModelType">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="SIMATIC_S7-300" />
+            <xs:enumeration value="SIMATIC_S7-400" />
+            <xs:enumeration value="SIMATIC_S7-1200" />
+            <xs:enumeration value="SIMATIC_S7-1500" />
+            <xs:enumeration value="SIMATIC_ET-200S" />
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="SchneiderModelType">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="Premium" />
+            <xs:enumeration value="Quantum" />
+            <xs:enumeration value="M340" />
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="BeckhoffModelType">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="BC9020" />
+            <xs:enumeration value="CX9020" />
+            <xs:enumeration value="BK9000" />
+            <xs:enumeration value="BK9050" />
+            <xs:enumeration value="BK9100" />
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="RabbitModelType">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="Rabbit_RCM_4010" />
+            <xs:enumeration value="Rabbit_RCM_2000" />
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="VirtualModelType">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="SIMATIC_S7-VIRTUAL" />
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="NIModelType">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="Compact_RIO" />
+            <xs:enumeration value="PXI_RT" />
+            <xs:enumeration value="PXI_Windows" />
+            <xs:enumeration value="PC_Windows" />
+            <xs:enumeration value="Other_Support_CNV" />
+        </xs:restriction>
+    </xs:simpleType>
 </xs:schema>
-- 
GitLab