Commit b212539abd04ca1e3f5e5dbc3684854f41529592

Authored by ankraft
1 parent 0533e668

Added and updated more documentation to 3.0

... ... @@ -2,27 +2,47 @@
2 2  
3 3 Repository for the Smart Device Template (SDT).
4 4  
  5 +**Version 3.0**
  6 +
5 7 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)
6 8  
7   -Any contributions made to this project must comply with the forementioned license.
  9 +Any contributions made to this project must comply with the aforementioned license.
8 10  
9 11 ## Quick Links
10   -- ['domain.xsd' Version 2.0](SDT/schema2.0/src/domain.xsd)
11   -- [UML Diagram of the SDT 2.0](SDT/schema2.0/docs/images/SDT2.0_UML.png) ([source](SDT/schema2.0/docs/SDT_UML.uxf))
  12 +- ['domain.xsd' Version 3.0](SDT/schema3.0/src/domain.xsd)
  13 +- [UML Diagram of the SDT 3.0](SDT/schema3.0/docs/UML%20Diagram.md) ([source](SDT/schema3.0/docs/SDT_UML.uxf))
12 14  
13 15  
14 16 ## Content
15 17  
16 18 You can find further Information here:
17 19  
18   -- [SDT Components](SDT/schema2.0/docs/SDT_Components.md)
19   -- [SDT Build System](SDT/schema2.0/docs/SDT%20Build%20System.md)
20   -- [Examples](SDT/schema2.0/docs/Examples.md)
21   -- [FAQ](SDT/schema2.0/docs/FAQ.md)
22   -- [Links & References](SDT/schema2.0/docs/Links.md)
23   -- [Backlog & Issues](SDT/schema2.0/docs/Backlog.md)
  20 +- [SDT Components](SDT/schema3.0/docs/SDT_Components.md)
  21 +- [SDT Build System](SDT/schema3.0/docs/SDT%20Build%20System.md)
  22 +- [Examples](SDT/schema3.0/docs/Examples.md)
  23 +- [FAQ](SDT/schema3.0/docs/FAQ.md)
  24 +- [Links & References](SDT/schema3.0/docs/Links.md)
24 25 - [LICENSE](LICENSE)
25 26  
  27 +## Changes in 3.0
  28 +- Renamed ``<RootDevice>``to ``<Device>`` and ``<Device>`` to ``<SubDevice>``,
  29 +- Added complex data types: *Struct* and *Arrays*.
  30 +- Simplified the UML diagram. Split the UML diagram into two parts, one for the base elements and one for the data types.
  31 +- In the UML diagram: Moved ``<extends>`` into the UML ``<ModuleClass>`` element (easier to read).
  32 +- Added support to specify *Units of Measurement* to data types,
  33 +- Added ``<Doc>`` to ``<Domain>`` and other elements.
  34 +- ``<Doc>`` is now always the first part of an element.
  35 +- Changed ``<DeviceInfo>`` element to a list of ``<Characteristic>``.
  36 +- Added ``<Characteristic>`` list to ``<Modules>`` and ``<ModuleClasses>``.
  37 +- The ``<data>`` element in ``<Event>`` is now optional to support events without attached or associated data.
  38 +- In Actions: Added ``<Args>`` as a surrounding list around a list of ``<Arg>``.
  39 +- Added *Constraints* to ``<DataType>``.
  40 +- Added optional *name* attribute to ``<DataType>``. This mandatory for elements of a *struct*.
  41 +- Restructured the [RNG](SDT/schema3.0/src/domain.rng) file for better readability and maintainability.
  42 +- 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).
  43 +
  44 +
  45 +
26 46 ## Changes in 2.0.1
27 47 - Added missing "uri" data type.
28 48  
... ... @@ -30,7 +50,7 @@ You can find further Information here:
30 50 - Introduced RootDevice to support hierarchical embedded devices.
31 51 - Added new data types (byte, float, array, enum, date, time, datetime, blob, uri)
32 52 - Added ``readable`` and ``eventable`` to data points.
33   -- Added otional ``<SerialNumber>``, ``<VendorURL>`` and ``<FirmwareVersion>`` elements to DeviceInfo
  53 +- Added optional ``<SerialNumber>``, ``<VendorURL>`` and ``<FirmwareVersion>`` elements to DeviceInfo
34 54 - Added optional ``<Doc>`` element to Event
35 55 - Changed the optionality of the ``<DataPoint>``'s ``type`` attribute to "required".
36 56 - Added [UML diagram](SDT/schema2.0/docs/SDT_Components.md)
... ...
1   -# Backlog
2   -To Be Discussed
3   -
4   -[Versions](#Versions)
5   -[Namespace](#Namespace)
6   -[Roles](#Roles)
7   -[Optionals](#Optionals)
8   -
9   -
10   -<a name="Versions"></a>
11   -## Versions
12   -### Rational
13   -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.
14   -
15   -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.
16   -
17   -The version information must be available to applications at runtime.
18   -
19   -### Proposal
20   -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.
21   -
22   -The proposal is to add a *version* attribute to the following SDT components:
23   -
24   -- RootDevice
25   -- Device
26   -- ModuleClass
27   -
28   -*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.
29   -
30   -The *version* attribute is just a string value without a defined format.
31   -
32   -### Further Discussion
33   -Does HGI define the version format? Or is this up to the vendors to provide their own?
34   -
35   -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.
36   -
37   -Format suggestion: define the format of the version string as "major.minor.revision" with the following semantics for each number:
38   -
39   -- **revision**: minimal change, internal bugfix, no change to data, formats or API.
40   -- **minor**: Change to the API that could be incompatible to the previous version. Added or removed interfaces or modules, changes in data formats.
41   -- **major**: Redesign of the overall structure and architecture.
42   -
43   -The "numbers" could be just integer number, but may also contain letters, e.g. "1.0.1a".
44   -
45   ----
46   -
47   -<a name="Namespace"></a>
48   -## Domain / Namespace
49   -### Issue
50   -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.
51   -
52   -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.
53   -
54   -Therefore, we cannot use the namespace "homegateway.org" because parsers don't get an answer from this address.
55   -
56   ----
57   -
58   -<a name="Roles"></a>
59   -## Roles
60   -### Proposal
61   -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.
62   -
63   -Example:
64   -
65   - <RootDevice name id=”xyz” role=”something”>’
66   - ...
67   - </RootDevice>
68   -
69   ----
70   -
71   -<a name="Optionals"></a>
72   -## Optionals
73   -### Rational
74   -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.
75   -
76   -DECT ULE, for example, has optional actions.
77   -
78   -### Proposal
79   -Add an attribute to *Actions* to mark them as optional in a ModuleClass. Perhaps *DataPoints* and *Events* as well.
80   -
81   -Example:
82   -
83   - ...
84   - <Action name=”abc” optional=”true”>
85   - ...
86   - </Action>
87   -
88   -The default without the optional attribute would be ``optional="false"``, meaning required).
89   -
90   -
91   -
92   -
... ... @@ -5,7 +5,7 @@ The following libraries are used in the build system for the SDT.
5 5  
6 6 [http://www.thaiopensource.com/relaxng/trang-manual.html](http://www.thaiopensource.com/relaxng/trang-manual.html)
7 7  
8   -Trang takes as input a schema written in any of the following formats:
  8 +*Trang* takes as input a schema written in any of the following formats:
9 9  
10 10 - RELAX NG (XML syntax)
11 11 - RELAX NG (compact syntax)
... ... @@ -18,7 +18,7 @@ and produces as output a schema written in any of the following formats:
18 18 - XML 1.0 DTD
19 19 - W3C XML Schema
20 20  
21   -Trang can also infer a schema from one or more example XML documents.
  21 +*Trang* can also infer a schema from one or more example XML documents.
22 22  
23 23  
24 24 ### License
... ... @@ -49,7 +49,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
49 49  
50 50 [http://ant-contrib.sourceforge.net](http://ant-contrib.sourceforge.net)
51 51  
52   -The Ant-Contrib project is a collection of tasks (and at one point maybe types and other tools) for Apache Ant.
  52 +The *Ant-Contrib* project is a collection of tasks (and at one point maybe types and other tools) for Apache Ant.
53 53  
54 54 ### License
55 55  
... ...
... ... @@ -8,7 +8,7 @@ The files referenced in this document point to version **3.0** of the SDT.
8 8 - [SDT/schema3.0/src/](../src/) : Source files of the SDT.
9 9 - [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).
10 10 **Only edit this file when one wants to make changes to the SDT!**
11   - - [domain.xsd](../src/domain.xsd) : The SDT schema defintion that is generated from *domain.rng*.
  11 + - [domain.xsd](../src/domain.xsd) : The SDT schema definition that is generated from *domain.rng*.
12 12 - [xml.xsd](../src/xml.xsd) : General schema definitions for the SDT
13 13 - [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.
14 14 - [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 26 - Download and install Apache ant from [http://ant.apache.org](http://ant.apache.org)
27 27 - Clone the SDT repository from GitHub:
28 28  
29   - $ git clone https://github.com/Homegateway/RWD050.git
  29 + $ git clone https://github.com/Homegateway/SmartDeviceTemplate.git
30 30  
31 31 ## How to Use the Build System
32   -After cloning the repository go to the directoy *SDT/schema* and run commands depending on what you want to achieve.
  32 +After cloning the repository go to the directory *SDT/schema* and run commands depending on what you want to achieve.
33 33  
34 34 ### Build the Schema
35 35 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 49 >BUILD SUCCESSFUL
50 50 >Total time: 1 second
51 51  
52   -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:
  52 +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:
53 53  
54   ->[schemavalidate] /Users/someone/Sources/git/RWD050/SDT/schema/test/mseeb.xml:66:18: cvc-elt.1: Cannot find the declaration of element 'Domain'.
  54 +>[schemavalidate] /Users/someone/Sources/git/SmartDeviceTemplate/SDT/schema/test/mseeb.xml:66:18: cvc-elt.1: Cannot find the declaration of element 'Domain'.
55 55 >BUILD FAILED
56 56  
57 57 ---
... ...
1 1 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2   -<diagram program="umlet" version="13.2">
3   - <zoom_level>9</zoom_level>
  2 +<diagram program="umlet" version="13.3">
  3 + <help_text/>
  4 + <zoom_level>7</zoom_level>
4 5 <element>
5   - <id>UMLClass</id>
  6 + <id>UMLNote</id>
6 7 <coordinates>
7   - <x>261</x>
8   - <y>99</y>
9   - <w>135</w>
10   - <h>117</h>
  8 + <x>70</x>
  9 + <y>420</y>
  10 + <w>217</w>
  11 + <h>182</h>
11 12 </coordinates>
12   - <panel_attributes>ModuleClass
13   ---
14   -*@ name : text*
15   -/- extends: Extends/
16   -/- Doc : Doc/
17   -/- Actions : Actions/
18   -/- Data : Data/
19   -/- Events : Events/
20   -fg=blue
  13 + <panel_attributes>bg=#FAF8C8
  14 +fontsize=12
  15 +/@ optional elementAttribute/
  16 +/@ optional elementAttribute = default value/
  17 +*@ mandatoryElementAttribute*
  18 +- mandatory element : Subclass (exact one)
  19 +/- optionalElement : SubClass (zero or one)/
  20 +/* optionalElement : SubClass (zero or many)/
  21 +
  22 +"Depends" Relation
  23 +and Cardinality
  24 +
  25 +Subclassing
  26 +
  27 +Cardinalities:
  28 +0,1 : zero or one
  29 +1 : exact one
  30 +0..* : zero or many
  31 +1..* : at least one or many
21 32 </panel_attributes>
22 33 <additional_attributes/>
23 34 </element>
24 35 <element>
  36 + <id>Relation</id>
  37 + <coordinates>
  38 + <x>154</x>
  39 + <y>490</y>
  40 + <w>77</w>
  41 + <h>28</h>
  42 + </coordinates>
  43 + <panel_attributes>lt=&lt;.
  44 +fontsize=10
  45 +m1=0..*
  46 +</panel_attributes>
  47 + <additional_attributes>90.0;20.0;10.0;20.0</additional_attributes>
  48 + </element>
  49 + <element>
  50 + <id>Relation</id>
  51 + <coordinates>
  52 + <x>154</x>
  53 + <y>518</y>
  54 + <w>77</w>
  55 + <h>21</h>
  56 + </coordinates>
  57 + <panel_attributes>lt=&lt;&lt;-
  58 +fontsize=10</panel_attributes>
  59 + <additional_attributes>90.0;10.0;10.0;10.0</additional_attributes>
  60 + </element>
  61 + <element>
25 62 <id>UMLClass</id>
26 63 <coordinates>
27   - <x>486</x>
28   - <y>162</y>
29   - <w>126</w>
30   - <h>90</h>
  64 + <x>700</x>
  65 + <y>763</y>
  66 + <w>105</w>
  67 + <h>154</h>
31 68 </coordinates>
32   - <panel_attributes>Action
  69 + <panel_attributes>&lt;&lt;enumeration&gt;&gt;
  70 +BasicType
33 71 --
34   -*@ name : text*
35   -/@ type : DataType/
36   -/- Doc : Doc/
37   -/* Arg : Arg/
38   -fg=blue</panel_attributes>
  72 +boolean
  73 +byte
  74 +integer
  75 +float
  76 +string
  77 +enum
  78 +date
  79 +time
  80 +datetime
  81 +blob
  82 +uri</panel_attributes>
39 83 <additional_attributes/>
40 84 </element>
41 85 <element>
42 86 <id>Relation</id>
43 87 <coordinates>
44   - <x>387</x>
45   - <y>81</y>
46   - <w>117</w>
47   - <h>81</h>
  88 + <x>406</x>
  89 + <y>826</y>
  90 + <w>98</w>
  91 + <h>56</h>
48 92 </coordinates>
49   - <panel_attributes>lt=&lt;.
50   -m1=0,1
  93 + <panel_attributes>lt=&lt;&lt;.
  94 +m1= 0,1
  95 +</panel_attributes>
  96 + <additional_attributes>120.0;50.0;60.0;50.0;60.0;10.0;10.0;10.0</additional_attributes>
  97 + </element>
  98 + <element>
  99 + <id>Relation</id>
  100 + <coordinates>
  101 + <x>406</x>
  102 + <y>770</y>
  103 + <w>98</w>
  104 + <h>56</h>
  105 + </coordinates>
  106 + <panel_attributes>lt=&lt;&lt;.
  107 +m1= 0,1
51 108 </panel_attributes>
52   - <additional_attributes>110.0;10.0;40.0;10.0;40.0;70.0;10.0;70.0</additional_attributes>
  109 + <additional_attributes>120.0;10.0;40.0;10.0;40.0;60.0;10.0;60.0</additional_attributes>
53 110 </element>
54 111 <element>
55 112 <id>UMLClass</id>
56 113 <coordinates>
57   - <x>684</x>
58   - <y>225</y>
59   - <w>144</w>
60   - <h>72</h>
  114 + <x>70</x>
  115 + <y>770</y>
  116 + <w>133</w>
  117 + <h>84</h>
61 118 </coordinates>
62   - <panel_attributes>Arg
  119 + <panel_attributes>DataType
63 120 --
64   -*@ name ; text*
65   -*@ type : DataType*
  121 +/@ name : text/
  122 +/@ unitOfMeasure : text/
66 123 /- Doc : Doc/
  124 +- TypeChoice
  125 +/* Constraints : Constraint/
67 126 fg=blue</panel_attributes>
68 127 <additional_attributes/>
69 128 </element>
70 129 <element>
71 130 <id>Relation</id>
72 131 <coordinates>
73   - <x>603</x>
74   - <y>225</y>
75   - <w>99</w>
76   - <h>36</h>
  132 + <x>175</x>
  133 + <y>728</y>
  134 + <w>490</w>
  135 + <h>91</h>
77 136 </coordinates>
78   - <panel_attributes>lt=&lt;.
79   -m1=0..*</panel_attributes>
80   - <additional_attributes>90.0;10.0;10.0;10.0</additional_attributes>
  137 + <panel_attributes>lt=&lt;&lt;.
  138 +m2=1..*
  139 +</panel_attributes>
  140 + <additional_attributes>10.0;60.0;10.0;20.0;680.0;20.0;680.0;100.0;640.0;100.0</additional_attributes>
  141 + </element>
  142 + <element>
  143 + <id>Relation</id>
  144 + <coordinates>
  145 + <x>175</x>
  146 + <y>728</y>
  147 + <w>490</w>
  148 + <h>133</h>
  149 + </coordinates>
  150 + <panel_attributes>lt=&lt;&lt;.
  151 +m2=1
  152 +</panel_attributes>
  153 + <additional_attributes>10.0;60.0;10.0;20.0;680.0;20.0;680.0;160.0;640.0;160.0</additional_attributes>
81 154 </element>
82 155 <element>
83 156 <id>UMLClass</id>
84 157 <coordinates>
85   - <x>18</x>
86   - <y>198</y>
87   - <w>180</w>
88   - <h>90</h>
  158 + <x>490</x>
  159 + <y>854</y>
  160 + <w>133</w>
  161 + <h>35</h>
89 162 </coordinates>
90   - <panel_attributes>Domain
  163 + <panel_attributes>SimpleType
91 164 --
92   -*@ id : ID*
93   -/- imports/
94   -/- Modules : ModuleClass/
95   -/- RootDevices : RootDevice/
  165 +*@ type : BasicType*
96 166 fg=blue</panel_attributes>
97 167 <additional_attributes/>
98 168 </element>
99 169 <element>
100 170 <id>Relation</id>
101 171 <coordinates>
102   - <x>189</x>
103   - <y>99</y>
104   - <w>90</w>
105   - <h>180</h>
  172 + <x>616</x>
  173 + <y>868</y>
  174 + <w>98</w>
  175 + <h>35</h>
106 176 </coordinates>
107   - <panel_attributes>lt=&lt;.
108   -m1= 0..*</panel_attributes>
109   - <additional_attributes>80.0;10.0;30.0;10.0;30.0;180.0;10.0;180.0</additional_attributes>
  177 + <panel_attributes>lt=&lt;&lt;-
  178 +m1= 1
  179 +</panel_attributes>
  180 + <additional_attributes>120.0;20.0;10.0;20.0</additional_attributes>
110 181 </element>
111 182 <element>
112 183 <id>UMLClass</id>
113 184 <coordinates>
114   - <x>261</x>
115   - <y>486</y>
116   - <w>171</w>
117   - <h>90</h>
  185 + <x>490</x>
  186 + <y>910</y>
  187 + <w>133</w>
  188 + <h>70</h>
118 189 </coordinates>
119   - <panel_attributes>Device
  190 + <panel_attributes>Constraint
120 191 --
121   -*@ id : Name*
  192 +*@ name : text*
  193 +/@ type : BasicType/
  194 +/@ value : text/
122 195 /- Doc : Doc/
123   -/- Modules : Module/
124   -/- DeviceInfo : DeviceInfo/
125 196 fg=blue</panel_attributes>
126 197 <additional_attributes/>
127 198 </element>
128 199 <element>
129 200 <id>Relation</id>
130 201 <coordinates>
131   - <x>180</x>
132   - <y>261</y>
133   - <w>45</w>
134   - <h>180</h>
  202 + <x>196</x>
  203 + <y>840</y>
  204 + <w>308</w>
  205 + <h>98</h>
135 206 </coordinates>
136 207 <panel_attributes>lt=&lt;.
137 208 m1=0..*
138 209 </panel_attributes>
139   - <additional_attributes>10.0;180.0;10.0;140.0;30.0;140.0;30.0;10.0;20.0;10.0</additional_attributes>
  210 + <additional_attributes>420.0;110.0;340.0;110.0;340.0;10.0;10.0;10.0</additional_attributes>
  211 + </element>
  212 + <element>
  213 + <id>Relation</id>
  214 + <coordinates>
  215 + <x>616</x>
  216 + <y>910</y>
  217 + <w>147</w>
  218 + <h>56</h>
  219 + </coordinates>
  220 + <panel_attributes>lt=&lt;&lt;-
  221 +m1=1
  222 +</panel_attributes>
  223 + <additional_attributes>190.0;10.0;190.0;60.0;10.0;60.0</additional_attributes>
140 224 </element>
141 225 <element>
142 226 <id>UMLClass</id>
143 227 <coordinates>
144   - <x>495</x>
145   - <y>495</y>
146   - <w>162</w>
147   - <h>117</h>
  228 + <x>490</x>
  229 + <y>770</y>
  230 + <w>133</w>
  231 + <h>35</h>
148 232 </coordinates>
149   - <panel_attributes>DeviceInfo
  233 + <panel_attributes>StructType
150 234 --
151   -*- name : text*
152   -*- vendor : text*
153   -/- serialNumber : text/
154   -/- vendorURL : URL/
155   -/- firmwareVersion : text/
156   -/- Doc : Doc/
  235 +- DataType : DataType
  236 +fg=blue</panel_attributes>
  237 + <additional_attributes/>
  238 + </element>
  239 + <element>
  240 + <id>UMLClass</id>
  241 + <coordinates>
  242 + <x>490</x>
  243 + <y>812</y>
  244 + <w>133</w>
  245 + <h>35</h>
  246 + </coordinates>
  247 + <panel_attributes>ArrayType
  248 +--
  249 +- DataType : DataType
157 250 fg=blue</panel_attributes>
158 251 <additional_attributes/>
159 252 </element>
160 253 <element>
161 254 <id>Relation</id>
162 255 <coordinates>
163   - <x>423</x>
164   - <y>495</y>
165   - <w>90</w>
166   - <h>81</h>
  256 + <x>406</x>
  257 + <y>805</y>
  258 + <w>98</w>
  259 + <h>35</h>
167 260 </coordinates>
168   - <panel_attributes>lt=&lt;.
169   -m1= 0,1</panel_attributes>
170   - <additional_attributes>80.0;10.0;40.0;10.0;40.0;70.0;10.0;70.0</additional_attributes>
  261 + <panel_attributes>lt=&lt;&lt;.
  262 +m1= 0,1
  263 +
  264 +</panel_attributes>
  265 + <additional_attributes>120.0;20.0;10.0;20.0</additional_attributes>
171 266 </element>
172 267 <element>
173 268 <id>UMLClass</id>
174 269 <coordinates>
175   - <x>684</x>
176   - <y>18</y>
177   - <w>144</w>
178   - <h>198</h>
  270 + <x>70</x>
  271 + <y>665</y>
  272 + <w>735</w>
  273 + <h>28</h>
179 274 </coordinates>
180   - <panel_attributes>&lt;&lt;Enumeration&gt;&gt;
181   -DataType
  275 + <panel_attributes>halign=center
  276 +SDT 3.0 - DataType
  277 +fontsize=24
  278 +bg=gray
  279 +lw=0.1</panel_attributes>
  280 + <additional_attributes/>
  281 + </element>
  282 + <element>
  283 + <id>UMLClass</id>
  284 + <coordinates>
  285 + <x>70</x>
  286 + <y>0</y>
  287 + <w>840</w>
  288 + <h>28</h>
  289 + </coordinates>
  290 + <panel_attributes>SDT 3.0 - Basic Elements
  291 +halign=center
  292 +fontsize=24
  293 +bg=gray
  294 +lw=0.1</panel_attributes>
  295 + <additional_attributes/>
  296 + </element>
  297 + <element>
  298 + <id>UMLClass</id>
  299 + <coordinates>
  300 + <x>308</x>
  301 + <y>119</y>
  302 + <w>154</w>
  303 + <h>133</h>
  304 + </coordinates>
  305 + <panel_attributes>ModuleClass
182 306 --
183   -boolean
184   -byte
185   -integer
186   -float
187   -string
188   -enum
189   -date
190   -time
191   -datetime
192   -blob
193   -uri</panel_attributes>
  307 +*@ name : text*
  308 +/@ optional : boolean = false/
  309 +/- Doc : Doc/
  310 +/- extends/
  311 +/ @domain : IDRF/
  312 +/ @class : text /
  313 +/* Property : Properties/
  314 +/* Actions : Action/
  315 +/* Data : DataPoint/
  316 +/* Events : Event/
  317 +fg=blue
  318 +</panel_attributes>
194 319 <additional_attributes/>
195 320 </element>
196 321 <element>
197 322 <id>UMLClass</id>
198 323 <coordinates>
199   - <x>729</x>
200   - <y>531</y>
201   - <w>99</w>
202   - <h>45</h>
  324 + <x>546</x>
  325 + <y>119</y>
  326 + <w>154</w>
  327 + <h>77</h>
203 328 </coordinates>
204   - <panel_attributes>Doc
  329 + <panel_attributes>Action
205 330 --
206   -- ...
  331 +*@ name : text*
  332 +/@ optional : boolean = false/
  333 +/- Doc : Doc/
  334 +/- DataType : DataType/
  335 +/* Args : Arg/
207 336 fg=blue</panel_attributes>
208 337 <additional_attributes/>
209 338 </element>
210 339 <element>
211 340 <id>UMLClass</id>
212 341 <coordinates>
213   - <x>486</x>
214   - <y>72</y>
215   - <w>117</w>
216   - <h>72</h>
  342 + <x>791</x>
  343 + <y>182</y>
  344 + <w>119</w>
  345 + <h>56</h>
217 346 </coordinates>
218   - <panel_attributes>&lt;&lt;Attributes&gt;&gt;
219   -Extends
  347 + <panel_attributes>Arg
220 348 --
221   -@domain : IDRF
222   -@class : text
223   -</panel_attributes>
  349 +*@ name ; text*
  350 +/- Doc : Doc/
  351 +- DataType : DataType
  352 +fg=blue</panel_attributes>
224 353 <additional_attributes/>
225 354 </element>
226 355 <element>
227 356 <id>Relation</id>
228 357 <coordinates>
229   - <x>387</x>
230   - <y>153</y>
231   - <w>117</w>
232   - <h>45</h>
  358 + <x>693</x>
  359 + <y>182</y>
  360 + <w>112</w>
  361 + <h>28</h>
233 362 </coordinates>
234 363 <panel_attributes>lt=&lt;.
235   -m1=0..*
236   -</panel_attributes>
237   - <additional_attributes>110.0;20.0;10.0;20.0</additional_attributes>
  364 +m1= 0..*</panel_attributes>
  365 + <additional_attributes>140.0;10.0;10.0;10.0</additional_attributes>
  366 + </element>
  367 + <element>
  368 + <id>UMLClass</id>
  369 + <coordinates>
  370 + <x>70</x>
  371 + <y>119</y>
  372 + <w>154</w>
  373 + <h>77</h>
  374 + </coordinates>
  375 + <panel_attributes>Domain
  376 +--
  377 +*@ id : ID*
  378 +/- Doc : Doc/
  379 +/* imports/
  380 +/* Modules : ModuleClass/
  381 +/* Devices : Device/
  382 +fg=blue</panel_attributes>
  383 + <additional_attributes/>
238 384 </element>
239 385 <element>
240 386 <id>Relation</id>
241 387 <coordinates>
242   - <x>603</x>
243   - <y>27</y>
244   - <w>99</w>
245   - <h>198</h>
  388 + <x>217</x>
  389 + <y>119</y>
  390 + <w>105</w>
  391 + <h>63</h>
246 392 </coordinates>
247   - <panel_attributes>lt=&lt;&lt;-
248   -m1=0,1
249   -</panel_attributes>
250   - <additional_attributes>90.0;10.0;40.0;10.0;40.0;200.0;10.0;200.0</additional_attributes>
  393 + <panel_attributes>lt=&lt;.
  394 +m1= 0..*</panel_attributes>
  395 + <additional_attributes>130.0;10.0;50.0;10.0;50.0;70.0;10.0;70.0</additional_attributes>
  396 + </element>
  397 + <element>
  398 + <id>UMLClass</id>
  399 + <coordinates>
  400 + <x>70</x>
  401 + <y>301</y>
  402 + <w>154</w>
  403 + <h>70</h>
  404 + </coordinates>
  405 + <panel_attributes>SubDevice
  406 +--
  407 +*@ id : Name*
  408 +/- Doc : Doc/
  409 +/* Property : Properties/
  410 +/* Modules : Module/
  411 +fg=blue</panel_attributes>
  412 + <additional_attributes/>
251 413 </element>
252 414 <element>
253 415 <id>Relation</id>
254 416 <coordinates>
255   - <x>666</x>
256   - <y>522</y>
257   - <w>81</w>
258   - <h>45</h>
  417 + <x>217</x>
  418 + <y>175</y>
  419 + <w>49</w>
  420 + <h>63</h>
259 421 </coordinates>
260 422 <panel_attributes>lt=&lt;.
261 423 m1=0..*
262 424 </panel_attributes>
263   - <additional_attributes>70.0;20.0;10.0;20.0</additional_attributes>
  425 + <additional_attributes>10.0;60.0;50.0;60.0;50.0;10.0;10.0;10.0</additional_attributes>
264 426 </element>
265 427 <element>
266 428 <id>Relation</id>
267 429 <coordinates>
268   - <x>819</x>
269   - <y>90</y>
270   - <w>45</w>
271   - <h>198</h>
  430 + <x>217</x>
  431 + <y>308</y>
  432 + <w>105</w>
  433 + <h>49</h>
272 434 </coordinates>
273   - <panel_attributes>lt=&lt;&lt;-
274   -m1= 1
275   -</panel_attributes>
276   - <additional_attributes>10.0;10.0;30.0;10.0;30.0;200.0;10.0;200.0</additional_attributes>
  435 + <panel_attributes>lt=&lt;.
  436 +m1= 0..*</panel_attributes>
  437 + <additional_attributes>130.0;10.0;60.0;10.0;60.0;50.0;10.0;50.0</additional_attributes>
277 438 </element>
278 439 <element>
279 440 <id>UMLClass</id>
280 441 <coordinates>
281   - <x>486</x>
282   - <y>297</y>
283   - <w>153</w>
284   - <h>45</h>
  442 + <x>791</x>
  443 + <y>350</y>
  444 + <w>119</w>
  445 + <h>35</h>
285 446 </coordinates>
286   - <panel_attributes>Data
  447 + <panel_attributes>Doc
287 448 --
288   -/- dataPoint : DataPoint/
289 449 fg=blue</panel_attributes>
290 450 <additional_attributes/>
291 451 </element>
292 452 <element>
293 453 <id>Relation</id>
294 454 <coordinates>
295   - <x>387</x>
296   - <y>180</y>
297   - <w>117</w>
298   - <h>153</h>
  455 + <x>455</x>
  456 + <y>119</y>
  457 + <w>105</w>
  458 + <h>42</h>
  459 + </coordinates>
  460 + <panel_attributes>lt=&lt;.
  461 +m1= 0..*
  462 +</panel_attributes>
  463 + <additional_attributes>130.0;10.0;50.0;10.0;50.0;40.0;10.0;40.0</additional_attributes>
  464 + </element>
  465 + <element>
  466 + <id>Relation</id>
  467 + <coordinates>
  468 + <x>735</x>
  469 + <y>343</y>
  470 + <w>70</w>
  471 + <h>35</h>
299 472 </coordinates>
300 473 <panel_attributes>lt=&lt;.
301 474 m1=0,1
302 475 </panel_attributes>
303   - <additional_attributes>110.0;140.0;50.0;140.0;50.0;10.0;10.0;10.0</additional_attributes>
  476 + <additional_attributes>80.0;20.0;10.0;20.0</additional_attributes>
304 477 </element>
305 478 <element>
306 479 <id>Relation</id>
307 480 <coordinates>
308   - <x>630</x>
309   - <y>306</y>
310   - <w>72</w>
311   - <h>45</h>
  481 + <x>455</x>
  482 + <y>154</y>
  483 + <w>105</w>
  484 + <h>84</h>
312 485 </coordinates>
313 486 <panel_attributes>lt=&lt;.
314   -m1=0..*
  487 +m1= 0..*
315 488 </panel_attributes>
316   - <additional_attributes>60.0;20.0;10.0;20.0</additional_attributes>
  489 + <additional_attributes>130.0;90.0;50.0;90.0;50.0;10.0;10.0;10.0</additional_attributes>
317 490 </element>
318 491 <element>
319 492 <id>UMLClass</id>
320 493 <coordinates>
321   - <x>684</x>
322   - <y>315</y>
323   - <w>144</w>
324   - <h>117</h>
  494 + <x>546</x>
  495 + <y>210</y>
  496 + <w>154</w>
  497 + <h>98</h>
325 498 </coordinates>
326 499 <panel_attributes>DataPoint
327 500 --
328 501 *@ name : text*
329   -@ type : DataType
330   -/@ writable : boolean/
331   -/@ readable : boolean/
332   -/@ eventable : boolean/
  502 +/@ optional : boolean = false/
  503 +/@ writable : boolean = true/
  504 +/@ readable : boolean = true/
  505 +/@ eventable : boolean = false/
333 506 /- Doc : Doc/
  507 +- DataType : DataType
  508 +
334 509 fg=blue
335 510 </panel_attributes>
336 511 <additional_attributes/>
... ... @@ -338,39 +513,41 @@ fg=blue
338 513 <element>
339 514 <id>UMLClass</id>
340 515 <coordinates>
341   - <x>495</x>
342   - <y>414</y>
343   - <w>144</w>
344   - <h>72</h>
  516 + <x>546</x>
  517 + <y>322</y>
  518 + <w>154</w>
  519 + <h>63</h>
345 520 </coordinates>
346 521 <panel_attributes>Event
347 522 --
348 523 *@ name : text*
349   -- data : Data
  524 +/@ optional : boolean = false/
350 525 /- Doc : Doc/
  526 +/* Data : DataPoint/
  527 +
351 528 fg=blue</panel_attributes>
352 529 <additional_attributes/>
353 530 </element>
354 531 <element>
355 532 <id>Relation</id>
356 533 <coordinates>
357   - <x>387</x>
358   - <y>189</y>
359   - <w>126</w>
360   - <h>261</h>
  534 + <x>455</x>
  535 + <y>224</y>
  536 + <w>105</w>
  537 + <h>126</h>
361 538 </coordinates>
362 539 <panel_attributes>lt=&lt;.
363   -m1=0..*
  540 +m1= 0..*
364 541 </panel_attributes>
365   - <additional_attributes>120.0;260.0;30.0;260.0;30.0;10.0;10.0;10.0</additional_attributes>
  542 + <additional_attributes>130.0;150.0;80.0;150.0;80.0;10.0;10.0;10.0</additional_attributes>
366 543 </element>
367 544 <element>
368 545 <id>UMLClass</id>
369 546 <coordinates>
370   - <x>261</x>
371   - <y>441</y>
372   - <w>135</w>
373   - <h>27</h>
  547 + <x>308</x>
  548 + <y>273</y>
  549 + <w>154</w>
  550 + <h>21</h>
374 551 </coordinates>
375 552 <panel_attributes>Module
376 553 fg=blue</panel_attributes>
... ... @@ -379,156 +556,156 @@ fg=blue&lt;/panel_attributes&gt;
379 556 <element>
380 557 <id>Relation</id>
381 558 <coordinates>
382   - <x>387</x>
383   - <y>441</y>
384   - <w>72</w>
385   - <h>117</h>
  559 + <x>217</x>
  560 + <y>273</y>
  561 + <w>105</w>
  562 + <h>98</h>
386 563 </coordinates>
387 564 <panel_attributes>lt=&lt;.
388   -m1=0..*
  565 +
389 566 </panel_attributes>
390   - <additional_attributes>10.0;10.0;60.0;10.0;60.0;110.0;50.0;110.0</additional_attributes>
  567 + <additional_attributes>130.0;10.0;80.0;10.0;80.0;120.0;10.0;120.0</additional_attributes>
391 568 </element>
392 569 <element>
393 570 <id>Relation</id>
394 571 <coordinates>
395   - <x>306</x>
396   - <y>207</y>
397   - <w>27</w>
398   - <h>252</h>
  572 + <x>371</x>
  573 + <y>245</y>
  574 + <w>21</w>
  575 + <h>42</h>
399 576 </coordinates>
400 577 <panel_attributes>lt=&lt;&lt;-
401 578 </panel_attributes>
402   - <additional_attributes>10.0;10.0;10.0;260.0</additional_attributes>
  579 + <additional_attributes>10.0;10.0;10.0;40.0</additional_attributes>
403 580 </element>
404 581 <element>
405   - <id>Relation</id>
  582 + <id>UMLClass</id>
406 583 <coordinates>
407   - <x>549</x>
408   - <y>333</y>
409   - <w>126</w>
410   - <h>144</h>
  584 + <x>70</x>
  585 + <y>210</y>
  586 + <w>154</w>
  587 + <h>77</h>
411 588 </coordinates>
412   - <panel_attributes>lt=&lt;.
413   -m1=1
414   -</panel_attributes>
415   - <additional_attributes>10.0;10.0;10.0;70.0;120.0;70.0;120.0;140.0;100.0;140.0</additional_attributes>
  589 + <panel_attributes>Device
  590 +--
  591 +*@ id : Name*
  592 +/- Doc : Doc/
  593 +/* Property : Properties/
  594 +/* Modules : Module/
  595 +/* SubDevices : SubDevice/
  596 +fg=blue</panel_attributes>
  597 + <additional_attributes/>
416 598 </element>
417 599 <element>
418 600 <id>Relation</id>
419 601 <coordinates>
420   - <x>819</x>
421   - <y>27</y>
422   - <w>63</w>
423   - <h>351</h>
  602 + <x>217</x>
  603 + <y>273</y>
  604 + <w>49</w>
  605 + <h>56</h>
424 606 </coordinates>
425   - <panel_attributes>lt=&lt;&lt;-
426   -m1=1
  607 + <panel_attributes>lt=&lt;.
  608 +m1=0..*
427 609 </panel_attributes>
428   - <additional_attributes>10.0;10.0;50.0;10.0;50.0;370.0;10.0;370.0</additional_attributes>
  610 + <additional_attributes>10.0;50.0;40.0;50.0;40.0;10.0;10.0;10.0</additional_attributes>
429 611 </element>
430 612 <element>
431   - <id>UMLClass</id>
  613 + <id>Relation</id>
432 614 <coordinates>
433   - <x>27</x>
434   - <y>423</y>
435   - <w>171</w>
436   - <h>99</h>
  615 + <x>217</x>
  616 + <y>245</y>
  617 + <w>105</w>
  618 + <h>56</h>
437 619 </coordinates>
438   - <panel_attributes>RootDevice
439   ---
440   -*@ id : Name*
441   -/- Doc : Doc/
442   -/- Modules : Module/
443   -/- Devices : Device/
444   -/- DeviceInfo : DeviceInfo/
445   -fg=blue</panel_attributes>
446   - <additional_attributes/>
  620 + <panel_attributes>lt=&lt;.
  621 +m1= 0..*
  622 +</panel_attributes>
  623 + <additional_attributes>130.0;50.0;80.0;50.0;80.0;10.0;10.0;10.0</additional_attributes>
447 624 </element>
448 625 <element>
449 626 <id>Relation</id>
450 627 <coordinates>
451   - <x>189</x>
452   - <y>477</y>
453   - <w>90</w>
454   - <h>45</h>
  628 + <x>217</x>
  629 + <y>259</y>
  630 + <w>105</w>
  631 + <h>70</h>
455 632 </coordinates>
456   - <panel_attributes>lt=&lt;.
457   -m1=0..*
458   -</panel_attributes>
459   - <additional_attributes>80.0;20.0;10.0;20.0</additional_attributes>
  633 + <panel_attributes>lt=&lt;.</panel_attributes>
  634 + <additional_attributes>130.0;80.0;60.0;80.0;60.0;10.0;10.0;10.0</additional_attributes>
460 635 </element>
461 636 <element>
462   - <id>UMLNote</id>
  637 + <id>UMLClass</id>
463 638 <coordinates>
464   - <x>18</x>
465   - <y>18</y>
466   - <w>180</w>
467   - <h>126</h>
  639 + <x>308</x>
  640 + <y>308</y>
  641 + <w>154</w>
  642 + <h>77</h>
468 643 </coordinates>
469   - <panel_attributes>bg=#FAF8C8
470   -fontsize=10
471   -@elementAttribute
472   -*@mandatoryElementAttribute*
473   -- element
474   -- element : Subclass
475   -/- optionalElement (0/1)/
476   -/* optionalElement (0/n)/
477   -
478   -"Depends" Relation
479   -
480   -Subclassing</panel_attributes>
  644 + <panel_attributes>Property
  645 +--
  646 +*@ name : text*
  647 +/@ optional : boolean = false/
  648 +/@ value : text/
  649 +/- Doc : Doc/
  650 +- DataType : SimpleType
  651 +fg=blue
  652 +transparency=80</panel_attributes>
481 653 <additional_attributes/>
482 654 </element>
483 655 <element>
484 656 <id>Relation</id>
485 657 <coordinates>
486   - <x>108</x>
487   - <y>81</y>
488   - <w>90</w>
489   - <h>36</h>
  658 + <x>693</x>
  659 + <y>210</y>
  660 + <w>56</w>
  661 + <h>147</h>
490 662 </coordinates>
491 663 <panel_attributes>lt=&lt;.
492   -fontsize=10
493 664 m1=0..*
494 665 </panel_attributes>
495   - <additional_attributes>80.0;20.0;10.0;20.0</additional_attributes>
  666 + <additional_attributes>10.0;10.0;60.0;10.0;60.0;190.0;10.0;190.0</additional_attributes>
496 667 </element>
497 668 <element>
498 669 <id>Relation</id>
499 670 <coordinates>
500   - <x>108</x>
501   - <y>117</y>
502   - <w>99</w>
503   - <h>27</h>
  671 + <x>455</x>
  672 + <y>238</y>
  673 + <w>49</w>
  674 + <h>98</h>
504 675 </coordinates>
505   - <panel_attributes>lt=&lt;&lt;-
506   -fontsize=10</panel_attributes>
507   - <additional_attributes>90.0;10.0;10.0;10.0</additional_attributes>
  676 + <panel_attributes>lt=&lt;.
  677 +m1=0..*</panel_attributes>
  678 + <additional_attributes>10.0;110.0;50.0;110.0;50.0;10.0;10.0;10.0</additional_attributes>
508 679 </element>
509 680 <element>
510   - <id>Relation</id>
  681 + <id>UMLClass</id>
511 682 <coordinates>
512   - <x>189</x>
513   - <y>441</y>
514   - <w>90</w>
515   - <h>54</h>
  683 + <x>280</x>
  684 + <y>770</y>
  685 + <w>133</w>
  686 + <h>70</h>
516 687 </coordinates>
517   - <panel_attributes>lt=&lt;.
518   -m1=0..*
  688 + <panel_attributes>&lt;&lt;enumeration&gt;&gt;
  689 +TypeChoice
  690 +--
  691 +SimpleType : SimpleType
  692 +Struct : StructType
  693 +Array : ArrayType
  694 +
519 695 </panel_attributes>
520   - <additional_attributes>80.0;10.0;30.0;10.0;30.0;40.0;10.0;40.0</additional_attributes>
  696 + <additional_attributes/>
521 697 </element>
522 698 <element>
523 699 <id>Relation</id>
524 700 <coordinates>
525   - <x>189</x>
526   - <y>495</y>
527   - <w>324</w>
528   - <h>117</h>
  701 + <x>196</x>
  702 + <y>777</y>
  703 + <w>98</w>
  704 + <h>63</h>
529 705 </coordinates>
530   - <panel_attributes>lt=&lt;.
  706 + <panel_attributes>lt=&lt;&lt;-
  707 +m1= 1
531 708 </panel_attributes>
532   - <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>
  709 + <additional_attributes>120.0;10.0;80.0;10.0;80.0;70.0;10.0;70.0</additional_attributes>
533 710 </element>
534 711 </diagram>
... ...
  1 +# UML Diagram of the SDT 3.0
  2 +
  3 +The source for the diagrams below is [here](SDT_UML.uxf).
  4 +## Basic Elements
  5 +
  6 +![](images/SDT_UML_Basic_Elements.png)
  7 +
  8 +## Data Types
  9 +
  10 +![](images/SDT_UML_DataType.png)
  11 +
  12 +## Key
  13 +
  14 +![](images/SDT_UML_Key.png)
  15 +
  16 +##
0 17 \ No newline at end of file
... ...