Skip to content
Snippets Groups Projects
Commit c7c72fd8 authored by al.schwinn's avatar al.schwinn
Browse files

Bug 1381 - Add control on naming of FESA generated RT/Server-Actions

parent afed9df7
No related branches found
No related tags found
No related merge requests found
...@@ -91,8 +91,10 @@ along with this program. If not, see http://www.gnu.org/licenses/.--> ...@@ -91,8 +91,10 @@ along with this program. If not, see http://www.gnu.org/licenses/.-->
</xs:annotation> </xs:annotation>
<xs:complexType> <xs:complexType>
<xs:sequence> <xs:sequence>
<xs:element name="Description" type="xs:string" minOccurs="0"/> <xs:element name="Setting-Block" type="Setting-BlockType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="Block" type="BlockType" maxOccurs="unbounded"/> <xs:element name="Acquisition-Block" type="Acquisition-BlockType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="Command-Block" type="Command-BlockType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="Description" type="xs:string" minOccurs="0"/>
</xs:sequence> </xs:sequence>
<xs:attribute name="name" type="SilecsClassNameType" use="required"/> <xs:attribute name="name" type="SilecsClassNameType" use="required"/>
<xs:attribute name="version" type="VersionType" use="required"/> <xs:attribute name="version" type="VersionType" use="required"/>
...@@ -132,19 +134,39 @@ along with this program. If not, see http://www.gnu.org/licenses/.--> ...@@ -132,19 +134,39 @@ along with this program. If not, see http://www.gnu.org/licenses/.-->
</xs:complexType> </xs:complexType>
</xs:element> </xs:element>
<xs:complexType name="FesaCodegenType-ServerOnly">
<xs:sequence>
</xs:sequence>
</xs:complexType>
<xs:complexType name="FesaBlockCodegenConfigType">
<xs:sequence>
<xs:element name="Server" minOccurs="0">
<xs:complexType>
<xs:attribute name="fesaPropertyName" type="BlockNameType" use="required">
<xs:annotation>
<xs:appinfo>Defines the name of the generated Fesa-Property.</xs:appinfo>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="RealTime" minOccurs="0">
<xs:complexType>
<xs:attribute name="fesaRTActionName" type="BlockNameType" use="required">
<xs:annotation>
<xs:appinfo>Defines the name of the generated Fesa-RT-Action.</xs:appinfo>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:complexType name="BlockType"> <xs:complexType name="BlockType">
<xs:sequence> <xs:sequence>
<xs:element name="Description" type="xs:string" minOccurs="0"/> <xs:element name="Description" type="xs:string" minOccurs="0"/>
<xs:element name="Register" type="RegisterType" maxOccurs="unbounded"> <xs:element name="Fesa-Codegen-Config" type="FesaBlockCodegenConfigType" minOccurs="0"/>
<xs:annotation>
<xs:appinfo>
<doc>
The Register is the elementary component of the SILECS data model.
&lt;br&gt;Each variable has a unique name in the scope of the class (including all blocks).
</doc>
</xs:appinfo>
</xs:annotation>
</xs:element>
</xs:sequence> </xs:sequence>
<xs:attribute name="name" type="BlockNameType" use="required"> <xs:attribute name="name" type="BlockNameType" use="required">
<xs:annotation> <xs:annotation>
...@@ -154,30 +176,68 @@ along with this program. If not, see http://www.gnu.org/licenses/.--> ...@@ -154,30 +176,68 @@ along with this program. If not, see http://www.gnu.org/licenses/.-->
</xs:appinfo> </xs:appinfo>
</xs:annotation> </xs:annotation>
</xs:attribute> </xs:attribute>
<xs:attribute name="mode" use="required"> </xs:complexType>
<xs:annotation>
<xs:documentation>Defines the access-mode of the block and finally of its related variables.</xs:documentation> <xs:complexType name="Setting-BlockType">
</xs:annotation> <xs:complexContent>
<xs:simpleType> <xs:extension base="BlockType">
<xs:restriction base="xs:string"> <xs:sequence>
<xs:enumeration value="READ-ONLY"/> <xs:element name="Setting-Register" type="Setting-RegisterType" minOccurs="0" maxOccurs="unbounded">
<xs:enumeration value="WRITE-ONLY"/> <xs:annotation>
<xs:enumeration value="READ-WRITE"/> <xs:appinfo>
</xs:restriction> <doc>PLC Register which can be setted and read back by Silecs. The PLC should not modify it's value.</doc>
</xs:simpleType> </xs:appinfo>
</xs:attribute> </xs:annotation>
<xs:attribute name="generateFesaProperty" type="xs:boolean" use="required"> </xs:element>
<xs:annotation> <xs:element name="Volatile-Register" type="Volatile-RegisterType" minOccurs="0" maxOccurs="unbounded">
<xs:appinfo> <xs:annotation>
Defines if the code-generation will generate a FESA-Property and the related Actions/Events/etc for this block <xs:appinfo>
</xs:appinfo> <doc>PLC Register which can be set by both, Silecs and the PLC</doc>
</xs:annotation> </xs:appinfo>
</xs:attribute> </xs:annotation>
<xs:attribute name="fesaPropertyName" type="BlockNameType" use="optional"> </xs:element>
<xs:annotation> </xs:sequence>
<xs:appinfo>Defines the name of the generated Fesa-Property. If not set, the Blockname will be used.</xs:appinfo> </xs:extension>
</xs:annotation> </xs:complexContent>
</xs:attribute> </xs:complexType>
<xs:complexType name="Acquisition-BlockType">
<xs:complexContent>
<xs:extension base="BlockType">
<xs:sequence>
<xs:element name="Acquisition-Register" type="Acquisition-RegisterType" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:appinfo>
<doc>PLC Register which is only read out by Silecs</doc>
</xs:appinfo>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="Command-BlockType">
<xs:complexContent>
<xs:extension base="BlockType">
<xs:sequence>
<xs:element name="Setting-Register" type="Setting-RegisterType" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:appinfo>
<doc>PLC Register which can be setted by Silecs. The PLC should not modify it's value.</doc>
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="Volatile-Register" type="Volatile-RegisterType" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:appinfo>
<doc>PLC Register which can be set by both, Silecs and the PLC</doc>
</xs:appinfo>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType> </xs:complexType>
<xs:complexType name="RegisterType"> <xs:complexType name="RegisterType">
...@@ -253,28 +313,6 @@ along with this program. If not, see http://www.gnu.org/licenses/.--> ...@@ -253,28 +313,6 @@ along with this program. If not, see http://www.gnu.org/licenses/.-->
</xs:appinfo> </xs:appinfo>
</xs:annotation> </xs:annotation>
</xs:attribute> </xs:attribute>
<xs:attribute name="synchro" use="required">
<xs:annotation>
<xs:appinfo>
<doc>
initial value or processing value of persistent data must be up-to-date each time a connection is established.
&lt;br/&gt;SILECS library supports automatic synchronization.
&lt;ul&gt;
&lt;li&gt;MASTER: PLC overwrites FEC register values. &lt;/li&gt;
&lt;li&gt;SLAVE: FEC overwrites PLC register values. &lt;/li&gt;
&lt;li&gt;NONE: no automatic synchronization performed. (volatile data) &lt;/li&gt;
&lt;/ul&gt;
</doc>
</xs:appinfo>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="MASTER"/>
<xs:enumeration value="SLAVE"/>
<xs:enumeration value="NONE"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="array-dim1" type="DimensionType" use="optional" default="1"> <xs:attribute name="array-dim1" type="DimensionType" use="optional" default="1">
<xs:annotation> <xs:annotation>
<xs:appinfo> <xs:appinfo>
...@@ -316,58 +354,77 @@ along with this program. If not, see http://www.gnu.org/licenses/.--> ...@@ -316,58 +354,77 @@ along with this program. If not, see http://www.gnu.org/licenses/.-->
</xs:attribute> </xs:attribute>
</xs:complexType> </xs:complexType>
<xs:complexType name="Acquisition-RegisterType">
<xs:complexContent>
<xs:extension base="RegisterType">
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="Setting-RegisterType">
<xs:complexContent>
<xs:extension base="RegisterType">
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="Volatile-RegisterType">
<xs:complexContent>
<xs:extension base="RegisterType">
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:simpleType name="BlockNameType"> <xs:simpleType name="BlockNameType">
<xs:restriction base="xs:string"> <xs:restriction base="xs:string">
<xs:minLength value="1"/> <xs:minLength value="1"/>
<xs:maxLength value="30"/> <xs:maxLength value="30"/>
<!-- Siemens Support bezüglich der maximalen Zeichenlänge für PLC- Tags : S7-300/1200/1500er bei 128 Zeichen --> <!-- Siemens Support bezüglich der maximalen Zeichenlänge für PLC- Tags : S7-300/1200/1500er bei 128 Zeichen -->
<!-- FESA PropertyNames have max. 30 characters. Since For each Block a prop is generated, we have to use this limit --> <!-- FESA PropertyNames have max. 30 characters. Since For each Block a prop is generated, we have to use this limit -->
<xs:pattern value="[_A-Za-z]+[_A-Za-z0-9]*"/> <xs:pattern value="[_A-Za-z]+[_A-Za-z0-9]*"/>
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
<xs:simpleType name="RegisterNameType"> <xs:simpleType name="RegisterNameType">
<xs:restriction base="xs:string"> <xs:restriction base="xs:string">
<xs:minLength value="1"/> <xs:minLength value="1"/>
<xs:maxLength value="60"/> <xs:maxLength value="60"/>
<!-- FESA Fields have max. 60 characters. Since For each Register a field is generated, we have to use this limit --> <!-- FESA Fields have max. 60 characters. Since For each Register a field is generated, we have to use this limit -->
<xs:pattern value="[_A-Za-z]+[_A-Za-z0-9]*"/> <xs:pattern value="[_A-Za-z]+[_A-Za-z0-9]*"/>
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
<xs:simpleType name="FormatType"> <xs:simpleType name="FormatType">
<xs:restriction base="xs:string"> <xs:restriction base="xs:string">
<xs:enumeration value="uint8"/> <xs:enumeration value="uint8"/>
<xs:enumeration value="int8"/> <xs:enumeration value="int8"/>
<xs:enumeration value="uint16"/> <xs:enumeration value="uint16"/>
<xs:enumeration value="int16"/> <xs:enumeration value="int16"/>
<xs:enumeration value="uint32"/> <xs:enumeration value="uint32"/>
<xs:enumeration value="int32"/> <xs:enumeration value="int32"/>
<xs:enumeration value="uint64"/> <xs:enumeration value="uint64"/>
<xs:enumeration value="int64"/> <xs:enumeration value="int64"/>
<xs:enumeration value="float32"/> <xs:enumeration value="float32"/>
<xs:enumeration value="float64"/> <xs:enumeration value="float64"/>
<xs:enumeration value="string"/> <xs:enumeration value="string"/>
<xs:enumeration value="date"/> <xs:enumeration value="date"/>
<xs:enumeration value="char"/> <xs:enumeration value="char"/>
<xs:enumeration value="byte"/> <xs:enumeration value="byte"/>
<xs:enumeration value="word"/> <xs:enumeration value="word"/>
<xs:enumeration value="dword"/> <xs:enumeration value="dword"/>
<xs:enumeration value="int"/> <xs:enumeration value="int"/>
<xs:enumeration value="dint"/> <xs:enumeration value="dint"/>
<xs:enumeration value="real"/> <xs:enumeration value="real"/>
<xs:enumeration value="dt"/> <xs:enumeration value="dt"/>
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
<xs:simpleType name="DimensionType">
<xs:restriction base="xs:unsignedInt">
<xs:minInclusive value="1"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="LengthType">
<xs:restriction base="xs:unsignedInt">
<xs:minInclusive value="2"/>
<xs:maxInclusive value="254"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="DimensionType">
<xs:restriction base="xs:unsignedInt">
<xs:minInclusive value="1"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="LengthType">
<xs:restriction base="xs:unsignedInt">
<xs:minInclusive value="2"/>
<xs:maxInclusive value="254"/>
</xs:restriction>
</xs:simpleType>
</xs:schema> </xs:schema>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment