Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision

Target

Select target project
  • MAS/SDT
1 result
Select Git revision
Show changes
Commits on Source (3)
......@@ -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).
- **[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.
- **[ModuleClasses](#ModuleClass)** : A list of *ModuleClass* components that are local to the *ProductClass*. Optional.
- **[SubDevices](#SubDevice)** : A list of *SubDevice* components. Optional.
- **[DeviceClass](#DeviceClass)** : Reference to a *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).
- **ExtendDevice** : Extension of a [DeviceClass](#DeviceClass) which is implemented by this *ProductClass*. Optional.
**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
```xml
......@@ -426,9 +427,9 @@ All elements of [DeviceClass](#DeviceClass) can be reused in *ProductClass*, but
<!-- List of Actions, Events and DataPoints goes here-->
</ModuleClass>
</ModuleClasses>
<DeviceClass>
<ExtendDevice>
<Extend domain="adomain" entity="aDeviceClass" />
</DeviceClass>
</ExtendDevice>
</ProductClass>
```
......
......@@ -993,11 +993,12 @@ fontsize=12
*@ id : Name*
/@ semanticURI : uri/
/- Doc : Doc/
/- Extend : Extend/
/* Properties : Property/
/* ModuleClasses : ModuleClass/
/* SubDevices : SubDevice/
/- DeviceClass : Extend/
/- Extend : Extend/
/- ExtendDevice : Extend/
fg=blue</panel_attributes>
<additional_attributes/>
</element>
......
SDT/schema4.0/docs/images/Product.png

7.78 KiB | W: 0px | H: 0px

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

8.07 KiB | W: 0px | H: 0px

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: 0px | H: 0px

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

83.6 KiB | W: 0px | H: 0px

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: 0px | H: 0px

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

79 KiB | W: 0px | H: 0px

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 =
PropertiesDef?,
ModuleClassesDef?,
SubDevicesRef?,
element DeviceClass { ExtendDef }?
element ExtendDevice { ExtendDef }?
}+
}
Actions =
......@@ -187,19 +187,18 @@ Events =
Data?
}+
}
ExtendDef =
element Extend {
ExtendDef = element Extend { ExtendBodyDef }
ExtendBodyDef =
attribute domain { xsd:Name },
attribute entity { xsd:Name },
(element Exclude {
attribute name { xsd:Name },
attribute type { ExtendType }
}
}+
| element Include {
attribute name { xsd:Name },
attribute type { ExtendType }
})?
}
}+)?
ExtendType =
"action"
| "datapoint"
......
......@@ -392,7 +392,7 @@
<ref name="SubDevicesRef" />
</optional>
<optional>
<element name="DeviceClass">
<element name="ExtendDevice">
<ref name="ExtendDef" />
</element>
</optional>
......@@ -536,6 +536,12 @@
<define name="ExtendDef">
<element name="Extend">
<ref name="ExtendBodyDef" />
</element>
</define>
<define name="ExtendBodyDef">
<attribute name="domain">
<data type="Name"/>
</attribute>
......@@ -544,6 +550,7 @@
</attribute>
<optional>
<choice>
<oneOrMore>
<element name="Exclude">
<attribute name="name">
<data type="Name"/>
......@@ -552,6 +559,8 @@
<ref name="ExtendType" />
</attribute>
</element>
</oneOrMore>
<oneOrMore>
<element name="Include">
<attribute name="name">
<data type="Name"/>
......@@ -560,9 +569,9 @@
<ref name="ExtendType" />
</attribute>
</element>
</oneOrMore>
</choice>
</optional>
</element>
</define>
......
......@@ -211,7 +211,11 @@
<xs:element name="DeviceClasses">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" name="DeviceClass">
<xs:element maxOccurs="unbounded" ref="DeviceClass"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="DeviceClass">
<xs:complexType>
<xs:complexContent>
<xs:extension base="DocDef">
......@@ -226,9 +230,6 @@
</xs:complexContent>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="SubDevices">
<xs:complexType>
<xs:sequence>
......@@ -291,13 +292,7 @@
<xs:element minOccurs="0" ref="Properties"/>
<xs:element minOccurs="0" ref="ModuleClasses"/>
<xs:element minOccurs="0" ref="SubDevices"/>
<xs:element minOccurs="0" name="DeviceClass">
<xs:complexType>
<xs:sequence>
<xs:element ref="Extend"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element minOccurs="0" ref="ExtendDevice"/>
</xs:sequence>
<xs:attribute name="id" use="required" type="xs:Name"/>
<xs:attribute name="semanticURI" type="xs:anyURI"/>
......@@ -305,6 +300,13 @@
</xs:complexContent>
</xs:complexType>
</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:complexType>
<xs:sequence>
......@@ -395,16 +397,15 @@
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:element name="Extend">
<xs:complexType>
<xs:element name="Extend" type="ExtendBodyDef"/>
<xs:complexType name="ExtendBodyDef">
<xs:choice minOccurs="0">
<xs:element ref="Exclude"/>
<xs:element ref="Include"/>
<xs:element maxOccurs="unbounded" ref="Exclude"/>
<xs:element maxOccurs="unbounded" ref="Include"/>
</xs:choice>
<xs:attribute name="domain" use="required" type="xs:Name"/>
<xs:attribute name="entity" use="required" type="xs:Name"/>
</xs:complexType>
</xs:element>
<xs:element name="Exclude">
<xs:complexType>
<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 @@
<ModuleClass name="TestExtendsChild">
<Extend domain="extend-test" entity="TestExtendsParent">
<Exclude name="TestExtendsDataPoint2" type="datapoint" />
<Exclude name="TestExtendsDataPoint1" type="datapoint" />
</Extend>
<Data>
<DataPoint name="TestExtendsDataPoint3" writable="true">
......
......@@ -22,9 +22,9 @@
</ModuleClasses>
</SubDevice>
</SubDevices>
<DeviceClass>
<ExtendDevice>
<Extend domain="deviceClass.test" entity="Test" />
</DeviceClass>
</ExtendDevice>
</ProductClass>
<!-- Derived ProductClass -->
......