Commit 242cac83 authored by ankraft's avatar ankraft

Add extend to data type. Updated test case.

parent bb46481f
This diff is collapsed.
......@@ -18,7 +18,7 @@ Domain =
ModuleClasses?,
element DeviceClasses {
element DeviceClass {
attribute id { xsd:NCName },
attribute id { xsd:Name },
DocDef,
PropertiesDef?,
ModuleClasses?,
......@@ -48,7 +48,7 @@ DataTypeDef =
attribute name { text }?,
attribute unitOfMeasure { text }?,
DocDef,
(StructType | ArrayType | SimpleType | EnumType),
(ExtendsDef | (StructType | ArrayType | SimpleType | EnumType)),
ConstraintsDef?
}
StructType = element Struct { DataTypeDef+ }
......@@ -107,8 +107,9 @@ ModuleClasses =
element ModuleClass {
attribute name { text },
attribute optional { xsd:boolean }?,
ExtendsDef?,
DocDef,
ExtendsDef,
# TODO: singular
PropertiesDef?,
Actions?,
Data?,
......@@ -155,8 +156,9 @@ Events =
}+
}
ExtendsDef =
# TODO: singular
element extends {
# TODO: Uppercase
# TODO: Uppercase , singular
attribute domain { xsd:IDREF },
attribute class { text },
element excludes {
......@@ -170,4 +172,4 @@ ExtendsDef =
}
}+
}?
}
}?
......@@ -125,10 +125,13 @@
</optional>
<ref name="DocDef"/>
<choice>
<ref name="StructType" />
<ref name="ArrayType" />
<ref name="SimpleType" />
<ref name="EnumType" />
<ref name="ExtendsDef" />
<choice>
<ref name="StructType" />
<ref name="ArrayType" />
<ref name="SimpleType" />
<ref name="EnumType" />
</choice>
</choice>
<optional>
<ref name="ConstraintsDef"/>
......@@ -285,10 +288,8 @@
<data type="boolean"/>
</attribute>
</optional>
<optional>
<ref name="ExtendsDef" />
</optional>
<ref name="DocDef"/>
<ref name="ExtendsDef" /> <!-- TODO: singular -->
<optional>
<ref name="PropertiesDef"/>
</optional>
......@@ -402,27 +403,29 @@
</define>
<define name="ExtendsDef">
<element name="extends"> <!-- TODO: Uppercase -->
<attribute name="domain">
<data type="IDREF"/>
</attribute>
<attribute name="class"/>
<optional>
<element name="excludes"> <!-- TODO: Uppercase + "...s" -> Excludes-->
<oneOrMore>
<element name="exclude">
<attribute name="name">
<text/>
</attribute>
<attribute name="type">
<text/> <!-- TODO: add ExcludeTypes -->
</attribute>
</element>
</oneOrMore>
</element>
</optional>
</element>
<define name="ExtendsDef"> <!-- TODO: singular -->
<optional>
<element name="extends"> <!-- TODO: Uppercase , singular-->
<attribute name="domain">
<data type="IDREF"/>
</attribute>
<attribute name="class"/>
<optional>
<element name="excludes"> <!-- TODO: Uppercase + "...s" -> Excludes-->
<oneOrMore>
<element name="exclude">
<attribute name="name">
<text/>
</attribute>
<attribute name="type">
<text/> <!-- TODO: add ExcludeTypes -->
</attribute>
</element>
</oneOrMore>
</element>
</optional>
</element>
</optional>
</define>
</grammar>
......
This diff is collapsed.
......@@ -14,4 +14,18 @@
</EnumType>
</DataType>
</DataTypes>
<ModuleClasses>
<ModuleClass name="TestDataTypes">
<Data>
<DataPoint name="TestDataPoint" writable="true">
<DataType>
<extends domain="datatypes-test" class="temperatureType" />
</DataType>
</DataPoint>
</Data>
</ModuleClass>
</ModuleClasses>
</Domain>
\ No newline at end of file
......@@ -155,11 +155,11 @@
<ModuleClasses>
<ModuleClass name="rootPowerOnOff" optional="true">
<extends domain="hgi.dal.core" class="BooleanState"/>
<Doc>
The proprietry interface for turning all switches of the extension block on and off.
The action "BooleanState:get" returns "true" when any of the sub-devices is in the state "on", otherwise it returns "false".
</Doc>
<extends domain="hgi.dal.core" class="BooleanState"/>
<Properties>
<Property name="version" value="1.0.0">
<Doc>Version for this ModuleClass</Doc>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment