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

Added and updated more documentation to 3.0

parent 0533e668
No related branches found
No related tags found
No related merge requests found
...@@ -2,27 +2,47 @@ ...@@ -2,27 +2,47 @@
Repository for the Smart Device Template (SDT). Repository for the Smart Device Template (SDT).
**Version 3.0**
Note that this project runs under Apache 2.0 license. Read the [LICENSE](LICENSE) in this repository, or refer to [http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0) Note that this project runs under Apache 2.0 license. Read the [LICENSE](LICENSE) in this repository, or refer to [http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0)
Any contributions made to this project must comply with the forementioned license. Any contributions made to this project must comply with the aforementioned license.
## Quick Links ## Quick Links
- ['domain.xsd' Version 2.0](SDT/schema2.0/src/domain.xsd) - ['domain.xsd' Version 3.0](SDT/schema3.0/src/domain.xsd)
- [UML Diagram of the SDT 2.0](SDT/schema2.0/docs/images/SDT2.0_UML.png) ([source](SDT/schema2.0/docs/SDT_UML.uxf)) - [UML Diagram of the SDT 3.0](SDT/schema3.0/docs/UML%20Diagram.md) ([source](SDT/schema3.0/docs/SDT_UML.uxf))
## Content ## Content
You can find further Information here: You can find further Information here:
- [SDT Components](SDT/schema2.0/docs/SDT_Components.md) - [SDT Components](SDT/schema3.0/docs/SDT_Components.md)
- [SDT Build System](SDT/schema2.0/docs/SDT%20Build%20System.md) - [SDT Build System](SDT/schema3.0/docs/SDT%20Build%20System.md)
- [Examples](SDT/schema2.0/docs/Examples.md) - [Examples](SDT/schema3.0/docs/Examples.md)
- [FAQ](SDT/schema2.0/docs/FAQ.md) - [FAQ](SDT/schema3.0/docs/FAQ.md)
- [Links & References](SDT/schema2.0/docs/Links.md) - [Links & References](SDT/schema3.0/docs/Links.md)
- [Backlog & Issues](SDT/schema2.0/docs/Backlog.md)
- [LICENSE](LICENSE) - [LICENSE](LICENSE)
## Changes in 3.0
- Renamed ``<RootDevice>``to ``<Device>`` and ``<Device>`` to ``<SubDevice>``,
- Added complex data types: *Struct* and *Arrays*.
- Simplified the UML diagram. Split the UML diagram into two parts, one for the base elements and one for the data types.
- In the UML diagram: Moved ``<extends>`` into the UML ``<ModuleClass>`` element (easier to read).
- Added support to specify *Units of Measurement* to data types,
- Added ``<Doc>`` to ``<Domain>`` and other elements.
- ``<Doc>`` is now always the first part of an element.
- Changed ``<DeviceInfo>`` element to a list of ``<Characteristic>``.
- Added ``<Characteristic>`` list to ``<Modules>`` and ``<ModuleClasses>``.
- The ``<data>`` element in ``<Event>`` is now optional to support events without attached or associated data.
- In Actions: Added ``<Args>`` as a surrounding list around a list of ``<Arg>``.
- Added *Constraints* to ``<DataType>``.
- Added optional *name* attribute to ``<DataType>``. This mandatory for elements of a *struct*.
- Restructured the [RNG](SDT/schema3.0/src/domain.rng) file for better readability and maintainability.
- In the [RNG](SDT/schema3.0/src/domain.rng)/[XSD](SDT/schema3.0/src/domain.xsd): Changed cardinality of the occurrence of elements that are part of a list of elements (e.g. ``<SubDevices><SubDevice>…</SubDevice></SubDevices>`` from „zero or more“ to „one or more“ when the surrounding list element itself is optional (to avoid empty lists).
## Changes in 2.0.1 ## Changes in 2.0.1
- Added missing "uri" data type. - Added missing "uri" data type.
...@@ -30,7 +50,7 @@ You can find further Information here: ...@@ -30,7 +50,7 @@ You can find further Information here:
- Introduced RootDevice to support hierarchical embedded devices. - Introduced RootDevice to support hierarchical embedded devices.
- Added new data types (byte, float, array, enum, date, time, datetime, blob, uri) - Added new data types (byte, float, array, enum, date, time, datetime, blob, uri)
- Added ``readable`` and ``eventable`` to data points. - Added ``readable`` and ``eventable`` to data points.
- Added otional ``<SerialNumber>``, ``<VendorURL>`` and ``<FirmwareVersion>`` elements to DeviceInfo - Added optional ``<SerialNumber>``, ``<VendorURL>`` and ``<FirmwareVersion>`` elements to DeviceInfo
- Added optional ``<Doc>`` element to Event - Added optional ``<Doc>`` element to Event
- Changed the optionality of the ``<DataPoint>``'s ``type`` attribute to "required". - Changed the optionality of the ``<DataPoint>``'s ``type`` attribute to "required".
- Added [UML diagram](SDT/schema2.0/docs/SDT_Components.md) - Added [UML diagram](SDT/schema2.0/docs/SDT_Components.md)
......
# Backlog
To Be Discussed
[Versions](#Versions)
[Namespace](#Namespace)
[Roles](#Roles)
[Optionals](#Optionals)
<a name="Versions"></a>
## Versions
### Rational
A device vendor is free to add new functionality to a device and to change or to remove existing functionality from a device by a firmware update or changes in the configuration. These changes may mean that the device functionality and a description in SDT become "out of sync" because currently an application developer has only little means to associate a specific firmware version or device configuration to a version of a SDT description.
Even then the developer needs to manage different versions of the same SDT device description because there might be devices of the same type but with different firmware versions/configurations on a network.
The version information must be available to applications at runtime.
### Proposal
To solve this problem SDT components that can be influenced by firmware updates or configuration changes must be distinguishable by some kind of version scheme. Since different versions in the structure, attributes and elements of the SDT description as well as data types are already indicated by the "version number" of the SDT (e.g."http://hgi.org/xml/dal/3.0") only the components that are instantiated for the devices etc need to indicate their current version.
The proposal is to add a *version* attribute to the following SDT components:
- RootDevice
- Device
- ModuleClass
*Event*, *Action* etc don't need an version number because a change in one of those components must be indicated by a different version in the ModuleClass.
The *version* attribute is just a string value without a defined format.
### Further Discussion
Does HGI define the version format? Or is this up to the vendors to provide their own?
At least the governing entity that managed all the different needs to define this format since it must be in agreement between the device vendors, driver provider, DAL provider and application developer.
Format suggestion: define the format of the version string as "major.minor.revision" with the following semantics for each number:
- **revision**: minimal change, internal bugfix, no change to data, formats or API.
- **minor**: Change to the API that could be incompatible to the previous version. Added or removed interfaces or modules, changes in data formats.
- **major**: Redesign of the overall structure and architecture.
The "numbers" could be just integer number, but may also contain letters, e.g. "1.0.1a".
---
<a name="Namespace"></a>
## Domain / Namespace
### Issue
The SDL now uses the namespace "homegatewayinitiative.org" as a namespace to identify the schema (also used for includes). The namespace is **not** a URL, but uniquely identifies the namespace and *should* be registered by HGI.
That said, most validating parsers expect **that the namesapce IS a valid URL** or that at least there is a server on the other end rejecting the request. A timeout / no connection / no answer / ... leads to an error.
Therefore, we cannot use the namespace "homegateway.org" because parsers don't get an answer from this address.
---
<a name="Roles"></a>
## Roles
### Proposal
The proposal is to add a *role* to *RootDevice* / *Device*. DECT ULE defines roles such as client and server for direct communication of appliances without a local hub. Depending on the assigned role a device might support different functions.
Example:
<RootDevice name id=”xyz” role=”something”>
...
</RootDevice>
---
<a name="Optionals"></a>
## Optionals
### Rational
Introduce optional *Actions* in *ModuleClasses* to reduce the number of possible combinations. Some technologies offers flexibility in defining requireed and optional *Actions*, *DataPoints* and *Events*´. The alternative is to define similar *ModuleClasses* that offers the variants of required and optional elements.
DECT ULE, for example, has optional actions.
### Proposal
Add an attribute to *Actions* to mark them as optional in a ModuleClass. Perhaps *DataPoints* and *Events* as well.
Example:
...
<Action name=”abc” optional=”true”>
...
</Action>
The default without the optional attribute would be ``optional="false"``, meaning required).
...@@ -5,7 +5,7 @@ The following libraries are used in the build system for the SDT. ...@@ -5,7 +5,7 @@ The following libraries are used in the build system for the SDT.
[http://www.thaiopensource.com/relaxng/trang-manual.html](http://www.thaiopensource.com/relaxng/trang-manual.html) [http://www.thaiopensource.com/relaxng/trang-manual.html](http://www.thaiopensource.com/relaxng/trang-manual.html)
Trang takes as input a schema written in any of the following formats: *Trang* takes as input a schema written in any of the following formats:
- RELAX NG (XML syntax) - RELAX NG (XML syntax)
- RELAX NG (compact syntax) - RELAX NG (compact syntax)
...@@ -18,7 +18,7 @@ and produces as output a schema written in any of the following formats: ...@@ -18,7 +18,7 @@ and produces as output a schema written in any of the following formats:
- XML 1.0 DTD - XML 1.0 DTD
- W3C XML Schema - W3C XML Schema
Trang can also infer a schema from one or more example XML documents. *Trang* can also infer a schema from one or more example XML documents.
### License ### License
...@@ -49,7 +49,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ...@@ -49,7 +49,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
[http://ant-contrib.sourceforge.net](http://ant-contrib.sourceforge.net) [http://ant-contrib.sourceforge.net](http://ant-contrib.sourceforge.net)
The Ant-Contrib project is a collection of tasks (and at one point maybe types and other tools) for Apache Ant. The *Ant-Contrib* project is a collection of tasks (and at one point maybe types and other tools) for Apache Ant.
### License ### License
......
...@@ -8,7 +8,7 @@ The files referenced in this document point to version **3.0** of the SDT. ...@@ -8,7 +8,7 @@ The files referenced in this document point to version **3.0** of the SDT.
- [SDT/schema3.0/src/](../src/) : Source files of the SDT. - [SDT/schema3.0/src/](../src/) : Source files of the SDT.
- [domain.rng](../src/domain.rng) : RELAX NG file with the SDT schema definition. This is the source file that is converted to the actual schema definition *domain.xsd* during the build. See also [http://en.wikipedia.org/wiki/RELAX_NG](http://en.wikipedia.org/wiki/RELAX_NG). - [domain.rng](../src/domain.rng) : RELAX NG file with the SDT schema definition. This is the source file that is converted to the actual schema definition *domain.xsd* during the build. See also [http://en.wikipedia.org/wiki/RELAX_NG](http://en.wikipedia.org/wiki/RELAX_NG).
**Only edit this file when one wants to make changes to the SDT!** **Only edit this file when one wants to make changes to the SDT!**
- [domain.xsd](../src/domain.xsd) : The SDT schema defintion that is generated from *domain.rng*. - [domain.xsd](../src/domain.xsd) : The SDT schema definition that is generated from *domain.rng*.
- [xml.xsd](../src/xml.xsd) : General schema definitions for the SDT - [xml.xsd](../src/xml.xsd) : General schema definitions for the SDT
- [SDT/schema3.0/test/](../test/) : This directory contains all XML files with SDT definitions that should be validated whether they conform to the SDT schema. This could be example definitions or contributions. - [SDT/schema3.0/test/](../test/) : This directory contains all XML files with SDT definitions that should be validated whether they conform to the SDT schema. This could be example definitions or contributions.
- [SDT/schema3.0/build.xml](../build.xml) : This is the definition file for the ant build system. - [SDT/schema3.0/build.xml](../build.xml) : This is the definition file for the ant build system.
...@@ -26,10 +26,10 @@ The files referenced in this document point to version **3.0** of the SDT. ...@@ -26,10 +26,10 @@ The files referenced in this document point to version **3.0** of the SDT.
- Download and install Apache ant from [http://ant.apache.org](http://ant.apache.org) - Download and install Apache ant from [http://ant.apache.org](http://ant.apache.org)
- Clone the SDT repository from GitHub: - Clone the SDT repository from GitHub:
$ git clone https://github.com/Homegateway/RWD050.git $ git clone https://github.com/Homegateway/SmartDeviceTemplate.git
## How to Use the Build System ## How to Use the Build System
After cloning the repository go to the directoy *SDT/schema* and run commands depending on what you want to achieve. After cloning the repository go to the directory *SDT/schema* and run commands depending on what you want to achieve.
### Build the Schema ### Build the Schema
Running *ant* without any parameter builds the schema definition from the rng-definition [SDT/schema3.0/src/domain.rng](../src/domain.rng) and writes it to [SDT/schema3.0/src/domain.xsd](../src/domain.xsd) Running *ant* without any parameter builds the schema definition from the rng-definition [SDT/schema3.0/src/domain.rng](../src/domain.rng) and writes it to [SDT/schema3.0/src/domain.xsd](../src/domain.xsd)
...@@ -49,9 +49,9 @@ The output after a successful validation should look like this: ...@@ -49,9 +49,9 @@ The output after a successful validation should look like this:
>BUILD SUCCESSFUL >BUILD SUCCESSFUL
>Total time: 1 second >Total time: 1 second
Otherwise you most likely receive a stacktrace or some other error messages. Search the output for the line *BUILD FAILED*. Above this line you will find some helpful hints for the filename and line number on which the error occured (here: file *mseeb.xml* on line 66) and a reason: Otherwise you most likely receive a stack trace or some other error messages. Search the output for the line *BUILD FAILED*. Above this line you will find some helpful hints for the filename and line number on which the error occurred (here: file *mseeb.xml* on line 66) and a reason:
>[schemavalidate] /Users/someone/Sources/git/RWD050/SDT/schema/test/mseeb.xml:66:18: cvc-elt.1: Cannot find the declaration of element 'Domain'. >[schemavalidate] /Users/someone/Sources/git/SmartDeviceTemplate/SDT/schema/test/mseeb.xml:66:18: cvc-elt.1: Cannot find the declaration of element 'Domain'.
>BUILD FAILED >BUILD FAILED
--- ---
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<diagram program="umlet" version="13.2"> <diagram program="umlet" version="13.3">
<zoom_level>9</zoom_level> <help_text/>
<zoom_level>7</zoom_level>
<element> <element>
<id>UMLClass</id> <id>UMLNote</id>
<coordinates> <coordinates>
<x>261</x> <x>70</x>
<y>99</y> <y>420</y>
<w>135</w> <w>217</w>
<h>117</h> <h>182</h>
</coordinates> </coordinates>
<panel_attributes>ModuleClass <panel_attributes>bg=#FAF8C8
-- fontsize=12
*@ name : text* /@ optional elementAttribute/
/- extends: Extends/ /@ optional elementAttribute = default value/
/- Doc : Doc/ *@ mandatoryElementAttribute*
/- Actions : Actions/ - mandatory element : Subclass (exact one)
/- Data : Data/ /- optionalElement : SubClass (zero or one)/
/- Events : Events/ /* optionalElement : SubClass (zero or many)/
fg=blue
"Depends" Relation
and Cardinality
Subclassing
Cardinalities:
0,1 : zero or one
1 : exact one
0..* : zero or many
1..* : at least one or many
</panel_attributes> </panel_attributes>
<additional_attributes/> <additional_attributes/>
</element> </element>
<element>
<id>Relation</id>
<coordinates>
<x>154</x>
<y>490</y>
<w>77</w>
<h>28</h>
</coordinates>
<panel_attributes>lt=&lt;.
fontsize=10
m1=0..*
</panel_attributes>
<additional_attributes>90.0;20.0;10.0;20.0</additional_attributes>
</element>
<element>
<id>Relation</id>
<coordinates>
<x>154</x>
<y>518</y>
<w>77</w>
<h>21</h>
</coordinates>
<panel_attributes>lt=&lt;&lt;-
fontsize=10</panel_attributes>
<additional_attributes>90.0;10.0;10.0;10.0</additional_attributes>
</element>
<element> <element>
<id>UMLClass</id> <id>UMLClass</id>
<coordinates> <coordinates>
<x>486</x> <x>700</x>
<y>162</y> <y>763</y>
<w>126</w> <w>105</w>
<h>90</h> <h>154</h>
</coordinates> </coordinates>
<panel_attributes>Action <panel_attributes>&lt;&lt;enumeration&gt;&gt;
BasicType
-- --
*@ name : text* boolean
/@ type : DataType/ byte
/- Doc : Doc/ integer
/* Arg : Arg/ float
fg=blue</panel_attributes> string
enum
date
time
datetime
blob
uri</panel_attributes>
<additional_attributes/> <additional_attributes/>
</element> </element>
<element> <element>
<id>Relation</id> <id>Relation</id>
<coordinates> <coordinates>
<x>387</x> <x>406</x>
<y>81</y> <y>826</y>
<w>117</w> <w>98</w>
<h>81</h> <h>56</h>
</coordinates> </coordinates>
<panel_attributes>lt=&lt;. <panel_attributes>lt=&lt;&lt;.
m1=0,1 m1= 0,1
</panel_attributes>
<additional_attributes>120.0;50.0;60.0;50.0;60.0;10.0;10.0;10.0</additional_attributes>
</element>
<element>
<id>Relation</id>
<coordinates>
<x>406</x>
<y>770</y>
<w>98</w>
<h>56</h>
</coordinates>
<panel_attributes>lt=&lt;&lt;.
m1= 0,1
</panel_attributes> </panel_attributes>
<additional_attributes>110.0;10.0;40.0;10.0;40.0;70.0;10.0;70.0</additional_attributes> <additional_attributes>120.0;10.0;40.0;10.0;40.0;60.0;10.0;60.0</additional_attributes>
</element> </element>
<element> <element>
<id>UMLClass</id> <id>UMLClass</id>
<coordinates> <coordinates>
<x>684</x> <x>70</x>
<y>225</y> <y>770</y>
<w>144</w> <w>133</w>
<h>72</h> <h>84</h>
</coordinates> </coordinates>
<panel_attributes>Arg <panel_attributes>DataType
-- --
*@ name ; text* /@ name : text/
*@ type : DataType* /@ unitOfMeasure : text/
/- Doc : Doc/ /- Doc : Doc/
- TypeChoice
/* Constraints : Constraint/
fg=blue</panel_attributes> fg=blue</panel_attributes>
<additional_attributes/> <additional_attributes/>
</element> </element>
<element> <element>
<id>Relation</id> <id>Relation</id>
<coordinates> <coordinates>
<x>603</x> <x>175</x>
<y>225</y> <y>728</y>
<w>99</w> <w>490</w>
<h>36</h> <h>91</h>
</coordinates> </coordinates>
<panel_attributes>lt=&lt;. <panel_attributes>lt=&lt;&lt;.
m1=0..*</panel_attributes> m2=1..*
<additional_attributes>90.0;10.0;10.0;10.0</additional_attributes> </panel_attributes>
<additional_attributes>10.0;60.0;10.0;20.0;680.0;20.0;680.0;100.0;640.0;100.0</additional_attributes>
</element>
<element>
<id>Relation</id>
<coordinates>
<x>175</x>
<y>728</y>
<w>490</w>
<h>133</h>
</coordinates>
<panel_attributes>lt=&lt;&lt;.
m2=1
</panel_attributes>
<additional_attributes>10.0;60.0;10.0;20.0;680.0;20.0;680.0;160.0;640.0;160.0</additional_attributes>
</element> </element>
<element> <element>
<id>UMLClass</id> <id>UMLClass</id>
<coordinates> <coordinates>
<x>18</x> <x>490</x>
<y>198</y> <y>854</y>
<w>180</w> <w>133</w>
<h>90</h> <h>35</h>
</coordinates> </coordinates>
<panel_attributes>Domain <panel_attributes>SimpleType
-- --
*@ id : ID* *@ type : BasicType*
/- imports/
/- Modules : ModuleClass/
/- RootDevices : RootDevice/
fg=blue</panel_attributes> fg=blue</panel_attributes>
<additional_attributes/> <additional_attributes/>
</element> </element>
<element> <element>
<id>Relation</id> <id>Relation</id>
<coordinates> <coordinates>
<x>189</x> <x>616</x>
<y>99</y> <y>868</y>
<w>90</w> <w>98</w>
<h>180</h> <h>35</h>
</coordinates> </coordinates>
<panel_attributes>lt=&lt;. <panel_attributes>lt=&lt;&lt;-
m1= 0..*</panel_attributes> m1= 1
<additional_attributes>80.0;10.0;30.0;10.0;30.0;180.0;10.0;180.0</additional_attributes> </panel_attributes>
<additional_attributes>120.0;20.0;10.0;20.0</additional_attributes>
</element> </element>
<element> <element>
<id>UMLClass</id> <id>UMLClass</id>
<coordinates> <coordinates>
<x>261</x> <x>490</x>
<y>486</y> <y>910</y>
<w>171</w> <w>133</w>
<h>90</h> <h>70</h>
</coordinates> </coordinates>
<panel_attributes>Device <panel_attributes>Constraint
-- --
*@ id : Name* *@ name : text*
/@ type : BasicType/
/@ value : text/
/- Doc : Doc/ /- Doc : Doc/
/- Modules : Module/
/- DeviceInfo : DeviceInfo/
fg=blue</panel_attributes> fg=blue</panel_attributes>
<additional_attributes/> <additional_attributes/>
</element> </element>
<element> <element>
<id>Relation</id> <id>Relation</id>
<coordinates> <coordinates>
<x>180</x> <x>196</x>
<y>261</y> <y>840</y>
<w>45</w> <w>308</w>
<h>180</h> <h>98</h>
</coordinates> </coordinates>
<panel_attributes>lt=&lt;. <panel_attributes>lt=&lt;.
m1=0..* m1=0..*
</panel_attributes> </panel_attributes>
<additional_attributes>10.0;180.0;10.0;140.0;30.0;140.0;30.0;10.0;20.0;10.0</additional_attributes> <additional_attributes>420.0;110.0;340.0;110.0;340.0;10.0;10.0;10.0</additional_attributes>
</element>
<element>
<id>Relation</id>
<coordinates>
<x>616</x>
<y>910</y>
<w>147</w>
<h>56</h>
</coordinates>
<panel_attributes>lt=&lt;&lt;-
m1=1
</panel_attributes>
<additional_attributes>190.0;10.0;190.0;60.0;10.0;60.0</additional_attributes>
</element> </element>
<element> <element>
<id>UMLClass</id> <id>UMLClass</id>
<coordinates> <coordinates>
<x>495</x> <x>490</x>
<y>495</y> <y>770</y>
<w>162</w> <w>133</w>
<h>117</h> <h>35</h>
</coordinates> </coordinates>
<panel_attributes>DeviceInfo <panel_attributes>StructType
-- --
*- name : text* - DataType : DataType
*- vendor : text* fg=blue</panel_attributes>
/- serialNumber : text/ <additional_attributes/>
/- vendorURL : URL/ </element>
/- firmwareVersion : text/ <element>
/- Doc : Doc/ <id>UMLClass</id>
<coordinates>
<x>490</x>
<y>812</y>
<w>133</w>
<h>35</h>
</coordinates>
<panel_attributes>ArrayType
--
- DataType : DataType
fg=blue</panel_attributes> fg=blue</panel_attributes>
<additional_attributes/> <additional_attributes/>
</element> </element>
<element> <element>
<id>Relation</id> <id>Relation</id>
<coordinates> <coordinates>
<x>423</x> <x>406</x>
<y>495</y> <y>805</y>
<w>90</w> <w>98</w>
<h>81</h> <h>35</h>
</coordinates> </coordinates>
<panel_attributes>lt=&lt;. <panel_attributes>lt=&lt;&lt;.
m1= 0,1</panel_attributes> m1= 0,1
<additional_attributes>80.0;10.0;40.0;10.0;40.0;70.0;10.0;70.0</additional_attributes>
</panel_attributes>
<additional_attributes>120.0;20.0;10.0;20.0</additional_attributes>
</element> </element>
<element> <element>
<id>UMLClass</id> <id>UMLClass</id>
<coordinates> <coordinates>
<x>684</x> <x>70</x>
<y>18</y> <y>665</y>
<w>144</w> <w>735</w>
<h>198</h> <h>28</h>
</coordinates> </coordinates>
<panel_attributes>&lt;&lt;Enumeration&gt;&gt; <panel_attributes>halign=center
DataType SDT 3.0 - DataType
fontsize=24
bg=gray
lw=0.1</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>70</x>
<y>0</y>
<w>840</w>
<h>28</h>
</coordinates>
<panel_attributes>SDT 3.0 - Basic Elements
halign=center
fontsize=24
bg=gray
lw=0.1</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>308</x>
<y>119</y>
<w>154</w>
<h>133</h>
</coordinates>
<panel_attributes>ModuleClass
-- --
boolean *@ name : text*
byte /@ optional : boolean = false/
integer /- Doc : Doc/
float /- extends/
string / @domain : IDRF/
enum / @class : text /
date /* Property : Properties/
time /* Actions : Action/
datetime /* Data : DataPoint/
blob /* Events : Event/
uri</panel_attributes> fg=blue
</panel_attributes>
<additional_attributes/> <additional_attributes/>
</element> </element>
<element> <element>
<id>UMLClass</id> <id>UMLClass</id>
<coordinates> <coordinates>
<x>729</x> <x>546</x>
<y>531</y> <y>119</y>
<w>99</w> <w>154</w>
<h>45</h> <h>77</h>
</coordinates> </coordinates>
<panel_attributes>Doc <panel_attributes>Action
-- --
- ... *@ name : text*
/@ optional : boolean = false/
/- Doc : Doc/
/- DataType : DataType/
/* Args : Arg/
fg=blue</panel_attributes> fg=blue</panel_attributes>
<additional_attributes/> <additional_attributes/>
</element> </element>
<element> <element>
<id>UMLClass</id> <id>UMLClass</id>
<coordinates> <coordinates>
<x>486</x> <x>791</x>
<y>72</y> <y>182</y>
<w>117</w> <w>119</w>
<h>72</h> <h>56</h>
</coordinates> </coordinates>
<panel_attributes>&lt;&lt;Attributes&gt;&gt; <panel_attributes>Arg
Extends
-- --
@domain : IDRF *@ name ; text*
@class : text /- Doc : Doc/
</panel_attributes> - DataType : DataType
fg=blue</panel_attributes>
<additional_attributes/> <additional_attributes/>
</element> </element>
<element> <element>
<id>Relation</id> <id>Relation</id>
<coordinates> <coordinates>
<x>387</x> <x>693</x>
<y>153</y> <y>182</y>
<w>117</w> <w>112</w>
<h>45</h> <h>28</h>
</coordinates> </coordinates>
<panel_attributes>lt=&lt;. <panel_attributes>lt=&lt;.
m1=0..* m1= 0..*</panel_attributes>
</panel_attributes> <additional_attributes>140.0;10.0;10.0;10.0</additional_attributes>
<additional_attributes>110.0;20.0;10.0;20.0</additional_attributes> </element>
<element>
<id>UMLClass</id>
<coordinates>
<x>70</x>
<y>119</y>
<w>154</w>
<h>77</h>
</coordinates>
<panel_attributes>Domain
--
*@ id : ID*
/- Doc : Doc/
/* imports/
/* Modules : ModuleClass/
/* Devices : Device/
fg=blue</panel_attributes>
<additional_attributes/>
</element> </element>
<element> <element>
<id>Relation</id> <id>Relation</id>
<coordinates> <coordinates>
<x>603</x> <x>217</x>
<y>27</y> <y>119</y>
<w>99</w> <w>105</w>
<h>198</h> <h>63</h>
</coordinates> </coordinates>
<panel_attributes>lt=&lt;&lt;- <panel_attributes>lt=&lt;.
m1=0,1 m1= 0..*</panel_attributes>
</panel_attributes> <additional_attributes>130.0;10.0;50.0;10.0;50.0;70.0;10.0;70.0</additional_attributes>
<additional_attributes>90.0;10.0;40.0;10.0;40.0;200.0;10.0;200.0</additional_attributes> </element>
<element>
<id>UMLClass</id>
<coordinates>
<x>70</x>
<y>301</y>
<w>154</w>
<h>70</h>
</coordinates>
<panel_attributes>SubDevice
--
*@ id : Name*
/- Doc : Doc/
/* Property : Properties/
/* Modules : Module/
fg=blue</panel_attributes>
<additional_attributes/>
</element> </element>
<element> <element>
<id>Relation</id> <id>Relation</id>
<coordinates> <coordinates>
<x>666</x> <x>217</x>
<y>522</y> <y>175</y>
<w>81</w> <w>49</w>
<h>45</h> <h>63</h>
</coordinates> </coordinates>
<panel_attributes>lt=&lt;. <panel_attributes>lt=&lt;.
m1=0..* m1=0..*
</panel_attributes> </panel_attributes>
<additional_attributes>70.0;20.0;10.0;20.0</additional_attributes> <additional_attributes>10.0;60.0;50.0;60.0;50.0;10.0;10.0;10.0</additional_attributes>
</element> </element>
<element> <element>
<id>Relation</id> <id>Relation</id>
<coordinates> <coordinates>
<x>819</x> <x>217</x>
<y>90</y> <y>308</y>
<w>45</w> <w>105</w>
<h>198</h> <h>49</h>
</coordinates> </coordinates>
<panel_attributes>lt=&lt;&lt;- <panel_attributes>lt=&lt;.
m1= 1 m1= 0..*</panel_attributes>
</panel_attributes> <additional_attributes>130.0;10.0;60.0;10.0;60.0;50.0;10.0;50.0</additional_attributes>
<additional_attributes>10.0;10.0;30.0;10.0;30.0;200.0;10.0;200.0</additional_attributes>
</element> </element>
<element> <element>
<id>UMLClass</id> <id>UMLClass</id>
<coordinates> <coordinates>
<x>486</x> <x>791</x>
<y>297</y> <y>350</y>
<w>153</w> <w>119</w>
<h>45</h> <h>35</h>
</coordinates> </coordinates>
<panel_attributes>Data <panel_attributes>Doc
-- --
/- dataPoint : DataPoint/
fg=blue</panel_attributes> fg=blue</panel_attributes>
<additional_attributes/> <additional_attributes/>
</element> </element>
<element> <element>
<id>Relation</id> <id>Relation</id>
<coordinates> <coordinates>
<x>387</x> <x>455</x>
<y>180</y> <y>119</y>
<w>117</w> <w>105</w>
<h>153</h> <h>42</h>
</coordinates>
<panel_attributes>lt=&lt;.
m1= 0..*
</panel_attributes>
<additional_attributes>130.0;10.0;50.0;10.0;50.0;40.0;10.0;40.0</additional_attributes>
</element>
<element>
<id>Relation</id>
<coordinates>
<x>735</x>
<y>343</y>
<w>70</w>
<h>35</h>
</coordinates> </coordinates>
<panel_attributes>lt=&lt;. <panel_attributes>lt=&lt;.
m1=0,1 m1=0,1
</panel_attributes> </panel_attributes>
<additional_attributes>110.0;140.0;50.0;140.0;50.0;10.0;10.0;10.0</additional_attributes> <additional_attributes>80.0;20.0;10.0;20.0</additional_attributes>
</element> </element>
<element> <element>
<id>Relation</id> <id>Relation</id>
<coordinates> <coordinates>
<x>630</x> <x>455</x>
<y>306</y> <y>154</y>
<w>72</w> <w>105</w>
<h>45</h> <h>84</h>
</coordinates> </coordinates>
<panel_attributes>lt=&lt;. <panel_attributes>lt=&lt;.
m1=0..* m1= 0..*
</panel_attributes> </panel_attributes>
<additional_attributes>60.0;20.0;10.0;20.0</additional_attributes> <additional_attributes>130.0;90.0;50.0;90.0;50.0;10.0;10.0;10.0</additional_attributes>
</element> </element>
<element> <element>
<id>UMLClass</id> <id>UMLClass</id>
<coordinates> <coordinates>
<x>684</x> <x>546</x>
<y>315</y> <y>210</y>
<w>144</w> <w>154</w>
<h>117</h> <h>98</h>
</coordinates> </coordinates>
<panel_attributes>DataPoint <panel_attributes>DataPoint
-- --
*@ name : text* *@ name : text*
@ type : DataType /@ optional : boolean = false/
/@ writable : boolean/ /@ writable : boolean = true/
/@ readable : boolean/ /@ readable : boolean = true/
/@ eventable : boolean/ /@ eventable : boolean = false/
/- Doc : Doc/ /- Doc : Doc/
- DataType : DataType
fg=blue fg=blue
</panel_attributes> </panel_attributes>
<additional_attributes/> <additional_attributes/>
...@@ -338,39 +513,41 @@ fg=blue ...@@ -338,39 +513,41 @@ fg=blue
<element> <element>
<id>UMLClass</id> <id>UMLClass</id>
<coordinates> <coordinates>
<x>495</x> <x>546</x>
<y>414</y> <y>322</y>
<w>144</w> <w>154</w>
<h>72</h> <h>63</h>
</coordinates> </coordinates>
<panel_attributes>Event <panel_attributes>Event
-- --
*@ name : text* *@ name : text*
- data : Data /@ optional : boolean = false/
/- Doc : Doc/ /- Doc : Doc/
/* Data : DataPoint/
fg=blue</panel_attributes> fg=blue</panel_attributes>
<additional_attributes/> <additional_attributes/>
</element> </element>
<element> <element>
<id>Relation</id> <id>Relation</id>
<coordinates> <coordinates>
<x>387</x> <x>455</x>
<y>189</y> <y>224</y>
<w>126</w> <w>105</w>
<h>261</h> <h>126</h>
</coordinates> </coordinates>
<panel_attributes>lt=&lt;. <panel_attributes>lt=&lt;.
m1=0..* m1= 0..*
</panel_attributes> </panel_attributes>
<additional_attributes>120.0;260.0;30.0;260.0;30.0;10.0;10.0;10.0</additional_attributes> <additional_attributes>130.0;150.0;80.0;150.0;80.0;10.0;10.0;10.0</additional_attributes>
</element> </element>
<element> <element>
<id>UMLClass</id> <id>UMLClass</id>
<coordinates> <coordinates>
<x>261</x> <x>308</x>
<y>441</y> <y>273</y>
<w>135</w> <w>154</w>
<h>27</h> <h>21</h>
</coordinates> </coordinates>
<panel_attributes>Module <panel_attributes>Module
fg=blue</panel_attributes> fg=blue</panel_attributes>
...@@ -379,156 +556,156 @@ fg=blue</panel_attributes> ...@@ -379,156 +556,156 @@ fg=blue</panel_attributes>
<element> <element>
<id>Relation</id> <id>Relation</id>
<coordinates> <coordinates>
<x>387</x> <x>217</x>
<y>441</y> <y>273</y>
<w>72</w> <w>105</w>
<h>117</h> <h>98</h>
</coordinates> </coordinates>
<panel_attributes>lt=&lt;. <panel_attributes>lt=&lt;.
m1=0..*
</panel_attributes> </panel_attributes>
<additional_attributes>10.0;10.0;60.0;10.0;60.0;110.0;50.0;110.0</additional_attributes> <additional_attributes>130.0;10.0;80.0;10.0;80.0;120.0;10.0;120.0</additional_attributes>
</element> </element>
<element> <element>
<id>Relation</id> <id>Relation</id>
<coordinates> <coordinates>
<x>306</x> <x>371</x>
<y>207</y> <y>245</y>
<w>27</w> <w>21</w>
<h>252</h> <h>42</h>
</coordinates> </coordinates>
<panel_attributes>lt=&lt;&lt;- <panel_attributes>lt=&lt;&lt;-
</panel_attributes> </panel_attributes>
<additional_attributes>10.0;10.0;10.0;260.0</additional_attributes> <additional_attributes>10.0;10.0;10.0;40.0</additional_attributes>
</element> </element>
<element> <element>
<id>Relation</id> <id>UMLClass</id>
<coordinates> <coordinates>
<x>549</x> <x>70</x>
<y>333</y> <y>210</y>
<w>126</w> <w>154</w>
<h>144</h> <h>77</h>
</coordinates> </coordinates>
<panel_attributes>lt=&lt;. <panel_attributes>Device
m1=1 --
</panel_attributes> *@ id : Name*
<additional_attributes>10.0;10.0;10.0;70.0;120.0;70.0;120.0;140.0;100.0;140.0</additional_attributes> /- Doc : Doc/
/* Property : Properties/
/* Modules : Module/
/* SubDevices : SubDevice/
fg=blue</panel_attributes>
<additional_attributes/>
</element> </element>
<element> <element>
<id>Relation</id> <id>Relation</id>
<coordinates> <coordinates>
<x>819</x> <x>217</x>
<y>27</y> <y>273</y>
<w>63</w> <w>49</w>
<h>351</h> <h>56</h>
</coordinates> </coordinates>
<panel_attributes>lt=&lt;&lt;- <panel_attributes>lt=&lt;.
m1=1 m1=0..*
</panel_attributes> </panel_attributes>
<additional_attributes>10.0;10.0;50.0;10.0;50.0;370.0;10.0;370.0</additional_attributes> <additional_attributes>10.0;50.0;40.0;50.0;40.0;10.0;10.0;10.0</additional_attributes>
</element> </element>
<element> <element>
<id>UMLClass</id> <id>Relation</id>
<coordinates> <coordinates>
<x>27</x> <x>217</x>
<y>423</y> <y>245</y>
<w>171</w> <w>105</w>
<h>99</h> <h>56</h>
</coordinates> </coordinates>
<panel_attributes>RootDevice <panel_attributes>lt=&lt;.
-- m1= 0..*
*@ id : Name* </panel_attributes>
/- Doc : Doc/ <additional_attributes>130.0;50.0;80.0;50.0;80.0;10.0;10.0;10.0</additional_attributes>
/- Modules : Module/
/- Devices : Device/
/- DeviceInfo : DeviceInfo/
fg=blue</panel_attributes>
<additional_attributes/>
</element> </element>
<element> <element>
<id>Relation</id> <id>Relation</id>
<coordinates> <coordinates>
<x>189</x> <x>217</x>
<y>477</y> <y>259</y>
<w>90</w> <w>105</w>
<h>45</h> <h>70</h>
</coordinates> </coordinates>
<panel_attributes>lt=&lt;. <panel_attributes>lt=&lt;.</panel_attributes>
m1=0..* <additional_attributes>130.0;80.0;60.0;80.0;60.0;10.0;10.0;10.0</additional_attributes>
</panel_attributes>
<additional_attributes>80.0;20.0;10.0;20.0</additional_attributes>
</element> </element>
<element> <element>
<id>UMLNote</id> <id>UMLClass</id>
<coordinates> <coordinates>
<x>18</x> <x>308</x>
<y>18</y> <y>308</y>
<w>180</w> <w>154</w>
<h>126</h> <h>77</h>
</coordinates> </coordinates>
<panel_attributes>bg=#FAF8C8 <panel_attributes>Property
fontsize=10 --
@elementAttribute *@ name : text*
*@mandatoryElementAttribute* /@ optional : boolean = false/
- element /@ value : text/
- element : Subclass /- Doc : Doc/
/- optionalElement (0/1)/ - DataType : SimpleType
/* optionalElement (0/n)/ fg=blue
transparency=80</panel_attributes>
"Depends" Relation
Subclassing</panel_attributes>
<additional_attributes/> <additional_attributes/>
</element> </element>
<element> <element>
<id>Relation</id> <id>Relation</id>
<coordinates> <coordinates>
<x>108</x> <x>693</x>
<y>81</y> <y>210</y>
<w>90</w> <w>56</w>
<h>36</h> <h>147</h>
</coordinates> </coordinates>
<panel_attributes>lt=&lt;. <panel_attributes>lt=&lt;.
fontsize=10
m1=0..* m1=0..*
</panel_attributes> </panel_attributes>
<additional_attributes>80.0;20.0;10.0;20.0</additional_attributes> <additional_attributes>10.0;10.0;60.0;10.0;60.0;190.0;10.0;190.0</additional_attributes>
</element> </element>
<element> <element>
<id>Relation</id> <id>Relation</id>
<coordinates> <coordinates>
<x>108</x> <x>455</x>
<y>117</y> <y>238</y>
<w>99</w> <w>49</w>
<h>27</h> <h>98</h>
</coordinates> </coordinates>
<panel_attributes>lt=&lt;&lt;- <panel_attributes>lt=&lt;.
fontsize=10</panel_attributes> m1=0..*</panel_attributes>
<additional_attributes>90.0;10.0;10.0;10.0</additional_attributes> <additional_attributes>10.0;110.0;50.0;110.0;50.0;10.0;10.0;10.0</additional_attributes>
</element> </element>
<element> <element>
<id>Relation</id> <id>UMLClass</id>
<coordinates> <coordinates>
<x>189</x> <x>280</x>
<y>441</y> <y>770</y>
<w>90</w> <w>133</w>
<h>54</h> <h>70</h>
</coordinates> </coordinates>
<panel_attributes>lt=&lt;. <panel_attributes>&lt;&lt;enumeration&gt;&gt;
m1=0..* TypeChoice
--
SimpleType : SimpleType
Struct : StructType
Array : ArrayType
</panel_attributes> </panel_attributes>
<additional_attributes>80.0;10.0;30.0;10.0;30.0;40.0;10.0;40.0</additional_attributes> <additional_attributes/>
</element> </element>
<element> <element>
<id>Relation</id> <id>Relation</id>
<coordinates> <coordinates>
<x>189</x> <x>196</x>
<y>495</y> <y>777</y>
<w>324</w> <w>98</w>
<h>117</h> <h>63</h>
</coordinates> </coordinates>
<panel_attributes>lt=&lt;. <panel_attributes>lt=&lt;&lt;-
m1= 1
</panel_attributes> </panel_attributes>
<additional_attributes>340.0;10.0;300.0;10.0;300.0;110.0;30.0;110.0;30.0;20.0;10.0;20.0</additional_attributes> <additional_attributes>120.0;10.0;80.0;10.0;80.0;70.0;10.0;70.0</additional_attributes>
</element> </element>
</diagram> </diagram>
# UML Diagram of the SDT 3.0
The source for the diagrams below is [here](SDT_UML.uxf).
## Basic Elements
![](images/SDT_UML_Basic_Elements.png)
## Data Types
![](images/SDT_UML_DataType.png)
## Key
![](images/SDT_UML_Key.png)
##
\ No newline at end of file
SDT/schema3.0/docs/images/SDT_UML_Basic_Elements.png

57 KiB

SDT/schema3.0/docs/images/SDT_UML_DataType.png

34.4 KiB

SDT/schema3.0/docs/images/SDT_UML_Key.png

24.9 KiB

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