Skip to content
Snippets Groups Projects
Commit eb028b1c authored by ankraft's avatar ankraft
Browse files

Aligned order of Extend in ProductClass. Renamed ProductClass->DeviceClass to...

Aligned order of Extend in ProductClass. Renamed ProductClass->DeviceClass to ExtendDevice. Fixed cardinality in Extend definitions.
parent ff65d14c
Branches RDM-2019-0003-SDT_4_0_–_Proposed_Changes_to_XSD
No related tags found
No related merge requests found
...@@ -396,12 +396,13 @@ A *ProductClass* can be defined by implementing the functionalities of an existi ...@@ -396,12 +396,13 @@ A *ProductClass* can be defined by implementing the functionalities of an existi
All elements of [DeviceClass](#DeviceClass) can be reused in *ProductClass*, but the *optional* attribute of those elements is not applicable (ignored if present). All elements of [DeviceClass](#DeviceClass) can be reused in *ProductClass*, but the *optional* attribute of those elements is not applicable (ignored if present).
- **[Doc](#Documentation)** : Documentation for the *ProductClass*. Optional. - **[Doc](#Documentation)** : Documentation for the *ProductClass*. Optional.
- **[Extend](#Extending)** : Extension of a parent *ProductClass* from which this *ProductClass* is extended. Optional.
- **[Properties](#Property)** : Further meta-data (or properties) about the *ProductClass*. Optional. - **[Properties](#Property)** : Further meta-data (or properties) about the *ProductClass*. Optional.
- **[ModuleClasses](#ModuleClass)** : A list of *ModuleClass* components that are local to the *ProductClass*. Optional. - **[ModuleClasses](#ModuleClass)** : A list of *ModuleClass* components that are local to the *ProductClass*. Optional.
- **[SubDevices](#SubDevice)** : A list of *SubDevice* components. Optional. - **[SubDevices](#SubDevice)** : A list of *SubDevice* components. Optional.
- **[DeviceClass](#DeviceClass)** : Reference to a *DeviceClass* which is implemented by this *ProductClass*. Optional. - **ExtendDevice** : Extension of a [DeviceClass](#DeviceClass) which is implemented by this *ProductClass*. Optional.
- **Extends** : Reference to a parent *ProductClass* from which this *ProductClass* is extended. Optional.
**Note**: New extended *Properties* and *ModuleClasses* **shall** have different names from those in the implemented *DeviceClass* if they're defined in the same *Domain*. Also, when extending a *ProductClass* that has a [DeviceClass](#DeviceClass) defined (or in any other parent in the inheritance hierarchy) then the child *ProductClass* **must not** define another [DeviceClass](#DeviceClass). **Note**: New extended *Properties* and *ModuleClasses* **shall** have different names from those in the extended *DeviceClass* if they're defined in the same *Domain*. Also, when extending a *ProductClass* that has a [DeviceClass](#DeviceClass) extended (or in any other parent in the inheritance hierarchy) then the child *ProductClass* **must not** extend another [DeviceClass](#DeviceClass).
#### Example #### Example
```xml ```xml
...@@ -426,9 +427,9 @@ All elements of [DeviceClass](#DeviceClass) can be reused in *ProductClass*, but ...@@ -426,9 +427,9 @@ All elements of [DeviceClass](#DeviceClass) can be reused in *ProductClass*, but
<!-- List of Actions, Events and DataPoints goes here--> <!-- List of Actions, Events and DataPoints goes here-->
</ModuleClass> </ModuleClass>
</ModuleClasses> </ModuleClasses>
<DeviceClass> <ExtendDevice>
<Extend domain="adomain" entity="aDeviceClass" /> <Extend domain="adomain" entity="aDeviceClass" />
</DeviceClass> </ExtendDevice>
</ProductClass> </ProductClass>
``` ```
......
...@@ -993,11 +993,12 @@ fontsize=12 ...@@ -993,11 +993,12 @@ fontsize=12
*@ id : Name* *@ id : Name*
/@ semanticURI : uri/ /@ semanticURI : uri/
/- Doc : Doc/ /- Doc : Doc/
/- Extend : Extend/
/* Properties : Property/ /* Properties : Property/
/* ModuleClasses : ModuleClass/ /* ModuleClasses : ModuleClass/
/* SubDevices : SubDevice/ /* SubDevices : SubDevice/
/- DeviceClass : Extend/ /- ExtendDevice : Extend/
/- Extend : Extend/
fg=blue</panel_attributes> fg=blue</panel_attributes>
<additional_attributes/> <additional_attributes/>
</element> </element>
......
SDT/schema4.0/docs/images/Product.png

7.78 KiB | W: | H:

SDT/schema4.0/docs/images/Product.png

8.07 KiB | W: | H:

SDT/schema4.0/docs/images/Product.png
SDT/schema4.0/docs/images/Product.png
SDT/schema4.0/docs/images/Product.png
SDT/schema4.0/docs/images/Product.png
  • 2-up
  • Swipe
  • Onion skin
SDT/schema4.0/docs/images/SDT_UML_Basic_Elements.png

84.2 KiB | W: | H:

SDT/schema4.0/docs/images/SDT_UML_Basic_Elements.png

83.6 KiB | W: | H:

SDT/schema4.0/docs/images/SDT_UML_Basic_Elements.png
SDT/schema4.0/docs/images/SDT_UML_Basic_Elements.png
SDT/schema4.0/docs/images/SDT_UML_Basic_Elements.png
SDT/schema4.0/docs/images/SDT_UML_Basic_Elements.png
  • 2-up
  • Swipe
  • Onion skin
SDT/schema4.0/docs/images/SDT_simplified.png

79.6 KiB | W: | H:

SDT/schema4.0/docs/images/SDT_simplified.png

79 KiB | W: | H:

SDT/schema4.0/docs/images/SDT_simplified.png
SDT/schema4.0/docs/images/SDT_simplified.png
SDT/schema4.0/docs/images/SDT_simplified.png
SDT/schema4.0/docs/images/SDT_simplified.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -138,7 +138,7 @@ ProductClassesDef = ...@@ -138,7 +138,7 @@ ProductClassesDef =
PropertiesDef?, PropertiesDef?,
ModuleClassesDef?, ModuleClassesDef?,
SubDevicesRef?, SubDevicesRef?,
element DeviceClass { ExtendDef }? element ExtendDevice { ExtendDef }?
}+ }+
} }
Actions = Actions =
...@@ -187,19 +187,18 @@ Events = ...@@ -187,19 +187,18 @@ Events =
Data? Data?
}+ }+
} }
ExtendDef = ExtendDef = element Extend { ExtendBodyDef }
element Extend { ExtendBodyDef =
attribute domain { xsd:Name }, attribute domain { xsd:Name },
attribute entity { xsd:Name }, attribute entity { xsd:Name },
(element Exclude { (element Exclude {
attribute name { xsd:Name },
attribute type { ExtendType }
}+
| element Include {
attribute name { xsd:Name }, attribute name { xsd:Name },
attribute type { ExtendType } attribute type { ExtendType }
} }+)?
| element Include {
attribute name { xsd:Name },
attribute type { ExtendType }
})?
}
ExtendType = ExtendType =
"action" "action"
| "datapoint" | "datapoint"
......
...@@ -392,7 +392,7 @@ ...@@ -392,7 +392,7 @@
<ref name="SubDevicesRef" /> <ref name="SubDevicesRef" />
</optional> </optional>
<optional> <optional>
<element name="DeviceClass"> <element name="ExtendDevice">
<ref name="ExtendDef" /> <ref name="ExtendDef" />
</element> </element>
</optional> </optional>
...@@ -535,34 +535,43 @@ ...@@ -535,34 +535,43 @@
<define name="ExtendDef"> <define name="ExtendDef">
<element name="Extend"> <element name="Extend">
<attribute name="domain"> <ref name="ExtendBodyDef" />
<data type="Name"/> </element>
</attribute> </define>
<attribute name="entity">
<data type="Name"/>
</attribute> <define name="ExtendBodyDef">
<optional> <attribute name="domain">
<choice> <data type="Name"/>
<element name="Exclude"> </attribute>
<attribute name="name"> <attribute name="entity">
<data type="Name"/> <data type="Name"/>
</attribute> </attribute>
<attribute name="type"> <optional>
<ref name="ExtendType" /> <choice>
</attribute> <oneOrMore>
</element> <element name="Exclude">
<element name="Include"> <attribute name="name">
<attribute name="name"> <data type="Name"/>
<data type="Name"/> </attribute>
</attribute> <attribute name="type">
<attribute name="type"> <ref name="ExtendType" />
<ref name="ExtendType" /> </attribute>
</attribute> </element>
</element> </oneOrMore>
</choice> <oneOrMore>
</optional> <element name="Include">
</element> <attribute name="name">
<data type="Name"/>
</attribute>
<attribute name="type">
<ref name="ExtendType" />
</attribute>
</element>
</oneOrMore>
</choice>
</optional>
</define> </define>
......
...@@ -211,24 +211,25 @@ ...@@ -211,24 +211,25 @@
<xs:element name="DeviceClasses"> <xs:element name="DeviceClasses">
<xs:complexType> <xs:complexType>
<xs:sequence> <xs:sequence>
<xs:element maxOccurs="unbounded" name="DeviceClass"> <xs:element maxOccurs="unbounded" ref="DeviceClass"/>
<xs:complexType>
<xs:complexContent>
<xs:extension base="DocDef">
<xs:sequence>
<xs:element minOccurs="0" ref="Properties"/>
<xs:element minOccurs="0" ref="ModuleClasses"/>
<xs:element minOccurs="0" ref="SubDevices"/>
</xs:sequence>
<xs:attribute name="id" use="required" type="xs:Name"/>
<xs:attribute name="semanticURI" type="xs:anyURI"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
</xs:sequence> </xs:sequence>
</xs:complexType> </xs:complexType>
</xs:element> </xs:element>
<xs:element name="DeviceClass">
<xs:complexType>
<xs:complexContent>
<xs:extension base="DocDef">
<xs:sequence>
<xs:element minOccurs="0" ref="Properties"/>
<xs:element minOccurs="0" ref="ModuleClasses"/>
<xs:element minOccurs="0" ref="SubDevices"/>
</xs:sequence>
<xs:attribute name="id" use="required" type="xs:Name"/>
<xs:attribute name="semanticURI" type="xs:anyURI"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:element name="SubDevices"> <xs:element name="SubDevices">
<xs:complexType> <xs:complexType>
<xs:sequence> <xs:sequence>
...@@ -291,13 +292,7 @@ ...@@ -291,13 +292,7 @@
<xs:element minOccurs="0" ref="Properties"/> <xs:element minOccurs="0" ref="Properties"/>
<xs:element minOccurs="0" ref="ModuleClasses"/> <xs:element minOccurs="0" ref="ModuleClasses"/>
<xs:element minOccurs="0" ref="SubDevices"/> <xs:element minOccurs="0" ref="SubDevices"/>
<xs:element minOccurs="0" name="DeviceClass"> <xs:element minOccurs="0" ref="ExtendDevice"/>
<xs:complexType>
<xs:sequence>
<xs:element ref="Extend"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence> </xs:sequence>
<xs:attribute name="id" use="required" type="xs:Name"/> <xs:attribute name="id" use="required" type="xs:Name"/>
<xs:attribute name="semanticURI" type="xs:anyURI"/> <xs:attribute name="semanticURI" type="xs:anyURI"/>
...@@ -305,6 +300,13 @@ ...@@ -305,6 +300,13 @@
</xs:complexContent> </xs:complexContent>
</xs:complexType> </xs:complexType>
</xs:element> </xs:element>
<xs:element name="ExtendDevice">
<xs:complexType>
<xs:sequence>
<xs:element ref="Extend"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Actions"> <xs:element name="Actions">
<xs:complexType> <xs:complexType>
<xs:sequence> <xs:sequence>
...@@ -395,16 +397,15 @@ ...@@ -395,16 +397,15 @@
</xs:complexContent> </xs:complexContent>
</xs:complexType> </xs:complexType>
</xs:element> </xs:element>
<xs:element name="Extend"> <xs:element name="Extend" type="ExtendBodyDef"/>
<xs:complexType> <xs:complexType name="ExtendBodyDef">
<xs:choice minOccurs="0"> <xs:choice minOccurs="0">
<xs:element ref="Exclude"/> <xs:element maxOccurs="unbounded" ref="Exclude"/>
<xs:element ref="Include"/> <xs:element maxOccurs="unbounded" ref="Include"/>
</xs:choice> </xs:choice>
<xs:attribute name="domain" use="required" type="xs:Name"/> <xs:attribute name="domain" use="required" type="xs:Name"/>
<xs:attribute name="entity" use="required" type="xs:Name"/> <xs:attribute name="entity" use="required" type="xs:Name"/>
</xs:complexType> </xs:complexType>
</xs:element>
<xs:element name="Exclude"> <xs:element name="Exclude">
<xs:complexType> <xs:complexType>
<xs:attribute name="name" use="required" type="xs:Name"/> <xs:attribute name="name" use="required" type="xs:Name"/>
......
<?xml version="1.0" encoding="iso-8859-1"?>
<Domain xmlns="http://www.onem2m.org/xml/sdt/4.0" xmlns:xi="http://www.w3.org/2001/XInclude" id="modbus" >
<ModuleClasses>
<ModuleClass name="temperature">
<Doc>This ModuleClass provides capabilities to represent the current temperature and target temperature of devices such as an air conditioner, refrigerator, oven, etc.</Doc>
<Data>
<DataPoint name="currentTemperature" readable="true" writable="false" eventable="true" optional="false">
<Doc>The current temperature.</Doc>
<DataType>
<SimpleType type="float" />
</DataType>
</DataPoint>
<DataPoint name="targetTemperature" readable="true" writable="true" eventable="true" optional="true">
<Doc>The desired temperature to reach.</Doc>
<DataType>
<SimpleType type="float" />
</DataType>
</DataPoint>
<DataPoint name="unit" readable="true" writable="false" eventable="true" optional="true">
<Doc>The unit of measure for the temperature values. The default is Celsius (C).</Doc>
<DataType>
<SimpleType type="string" />
</DataType>
</DataPoint>
<DataPoint name="minValue" readable="true" writable="false" eventable="true" optional="true">
<Doc>Minimum value of "targetTemperature".</Doc>
<DataType>
<SimpleType type="float" />
</DataType>
</DataPoint>
<DataPoint name="maxValue" readable="true" writable="false" eventable="true" optional="true">
<Doc>Maximum value of "targetTemperature".</Doc>
<DataType>
<SimpleType type="float" />
</DataType>
</DataPoint>
<DataPoint name="stepValue" readable="true" writable="false" eventable="true" optional="true">
<Doc>Step value allowed for "targetTemperature".</Doc>
<DataType>
<SimpleType type="float" />
</DataType>
</DataPoint>
</Data>
</ModuleClass>
</ModuleClasses>
<DeviceClasses>
<DeviceClass id="deviceModbusTemperature">
<Doc>This is a test device.</Doc>
<Properties>
<Property name="address">
<SimpleType type="string" />
</Property>
<Property name="functionCode">
<SimpleType type="string" />
</Property>
<Property name="registers">
<SimpleType type="string" />
</Property>
<Property name="slaveID">
<SimpleType type="string" />
</Property>
</Properties>
<ModuleClasses>
<!-- If a device has more than one functionality some or all properties can be moved to the ModuleClass. -->
<ModuleClass name="temperature">
<Extend domain="modbus" entity="temperature" />
</ModuleClass>
</ModuleClasses>
</DeviceClass>
</DeviceClasses>
</Domain>
\ No newline at end of file
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
<ModuleClass name="TestExtendsChild"> <ModuleClass name="TestExtendsChild">
<Extend domain="extend-test" entity="TestExtendsParent"> <Extend domain="extend-test" entity="TestExtendsParent">
<Exclude name="TestExtendsDataPoint2" type="datapoint" /> <Exclude name="TestExtendsDataPoint2" type="datapoint" />
<Exclude name="TestExtendsDataPoint1" type="datapoint" />
</Extend> </Extend>
<Data> <Data>
<DataPoint name="TestExtendsDataPoint3" writable="true"> <DataPoint name="TestExtendsDataPoint3" writable="true">
...@@ -30,4 +31,4 @@ ...@@ -30,4 +31,4 @@
</Data> </Data>
</ModuleClass> </ModuleClass>
</ModuleClasses> </ModuleClasses>
</Domain> </Domain>
\ No newline at end of file
...@@ -22,9 +22,9 @@ ...@@ -22,9 +22,9 @@
</ModuleClasses> </ModuleClasses>
</SubDevice> </SubDevice>
</SubDevices> </SubDevices>
<DeviceClass> <ExtendDevice>
<Extend domain="deviceClass.test" entity="Test" /> <Extend domain="deviceClass.test" entity="Test" />
</DeviceClass> </ExtendDevice>
</ProductClass> </ProductClass>
<!-- Derived ProductClass --> <!-- Derived ProductClass -->
......
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