diff --git a/README.md b/README.md index 11247e661d213164f16cf5c1c4a14ea124f154a4..e45a78d937a16909a5539609b327206f3da5af81 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,8 @@ You can find further Information here: - [Backlog & Issues](SDT/schema2.0/docs/Backlog.md) - [LICENSE](LICENSE) +## Changes in 2.0.1 +- Added missing "uri" data type. ## Changes in 2.0 - Introduced RootDevice to support hierarchical embedded devices. diff --git a/SDT/schema2.0/docs/SDT_Components.md b/SDT/schema2.0/docs/SDT_Components.md index 379a09fe7481ebb395db2cb6e021c02e28f0806a..9f44bc121c6308f170f0c353a5798fc5c4e00664 100644 --- a/SDT/schema2.0/docs/SDT_Components.md +++ b/SDT/schema2.0/docs/SDT_Components.md @@ -32,7 +32,7 @@ The syntax used in the diagram to model an XML Schema Definition (XSD) as an UML ### Domain The *Domain* is the top-level component that defines all modules and devices of a domain. A *Domain* can import definitions of other domains. -A *Domain* can define [Domain](#Domain) or [RootDevices](#RootDevice) only, or may choose to provide both. +A *Domain* can define [Modules](#ModuleClass) or [RootDevices](#RootDevice) only, or may choose to provide both.  @@ -42,7 +42,7 @@ A *Domain* can define [Domain](#Domain) or [RootDevices](#RootDevice) only, or m #### Elements - **Imports** : XML import/include of other XML files. Optional. - **Modules** : A list of [Module](#ModuleClass) components that are global to the whole domain. Optional. -- **RootDevices** : a List [RootDevices](#RootDevice) components. Optional. +- **RootDevices** : a List of [RootDevices](#RootDevice) components. Optional. #### Example @@ -65,15 +65,15 @@ A *Domain* can define [Domain](#Domain) or [RootDevices](#RootDevice) only, or m <a name="RootDevice"/></a> ### RootDevice -A *RootDevice* is the description of a (physical) device that may contain optional embedded sub-devices. It represents the idea an appliance that is addressable on a Home Area Network where one or more sub-[Devices](#Devices) provide certain functionalities. +A *RootDevice* is the description of a (physical) device that may contain optional embedded sub-devices. It represents the idea an appliance that is addressable on a Home Area Network where one or more sub-[Devices](#Devices) provide certain (possibly independent) functionalities. -An example is a connected power-strip where each of the sockets can be switched on and off individually. The power-strip itself can provide functions such as "all sockets off" and "overall power consumption". +An example is a connected power-strip where each of the sockets can be switched on and off individually. The power-strip itself can provide own functions such as "all sockets off" and "overall power consumption". If the *RootDevice* includes sub-[Devices](#Device) then each sub-device may be of the same type or of different types. The functionality ([Actions](#Action)) of the *RootDevice* may be different from the functionality of its sub-[Devices](#Device). If the *RootDevice* does not include sub-devices then the *RootDevice* is the actual adressable device that provides all the functionality of the connected appliance. -*RootDevices* may define their own [ModuleClasses](#ModuleClass) or refer to predefined ModulesClasses of its or another *Domain*. +*RootDevices* may define their own [ModuleClasses](#ModuleClass) or refer to predefined ModulesClasses of the same or another *Domain*.  @@ -82,7 +82,7 @@ If the *RootDevice* does not include sub-devices then the *RootDevice* is the ac #### Elements -- **Doc** : Documentation for the *RootDevice*. Optional. +- **[Doc](#Documentation)** : Documentation for the *RootDevice*. Optional. - **Modules** : A list of [Module](#ModuleClass) components that are local to the *RootDevice*. Optional. - **[DeviceInfo](#DeviceInfo)** : Further meta-data about the *RootDevice*. Optional. - **Devices** : A list [Device](#Device) components. Optional. @@ -115,7 +115,7 @@ If the *RootDevice* does not include sub-devices then the *RootDevice* is the ac - **id** : The identifier for that *Device*. Required. #### Elements -- **Doc** : Documentation for the *Device*. Optional. +- **[Doc](#Documentation)** : Documentation for the *Device*. Optional. - **Modules** : A list of [Module](#ModuleClass) components that are local to the *Device*. Optional. - **[DeviceInfo](#DeviceInfo)** : Further meta-data about the *Device*. Optional. @@ -148,6 +148,8 @@ None. - **FirmwareVersion** : Current version number of the firmware or other version information. Optional. - **VendorURL** : A URL that points to further information for that device. This might be the product page on the web or an URL to the device manual. Optional. - **SerialNumber** : The serial number or serial string. Optional. +- **[Doc](#Documentation)** : Documentation for the *DeviceInfo*. Optional. + #### Example @@ -165,7 +167,7 @@ None. ### Module, ModuleClass The *Module* (or *ModuleClass*) represents the concept of a reusable module that defines the [Actions](#Action), [Data](#Data) and [Events](#Event) for a single functionality of a device. A connected device may contain or refer to single or multiple *ModuleClasses* to specify its inherent services it exposes for use by applications. -*ModuleClasses* can be defined by a domain (on the level of the [Domain](#Domain) component) or in [RootDevices](#RootDevice)/[Devices](#Device): The former are global to a [Domain](#Domain) and can be used (refered to) by all [RootDevices](#RootDevice)/[Devices](#Device) of a [Domain](#Domain); the later are local to the [RootDevices](#RootDevice)/[Devices](#Device) where it is defined in. *ModuleClasses* defined on the [Domain](#Domain) level can be imported and used by other domains. +*ModuleClasses* can be defined by a domain (on the level of the [Domain](#Domain) component) or in [RootDevices](#RootDevice)/[Devices](#Device): The former *ModuleClasses* are global to a [Domain](#Domain) and can be used (refered to) by all [RootDevices](#RootDevice)/[Devices](#Device) of a [Domain](#Domain); the later are local to the [RootDevices](#RootDevice)/[Devices](#Device) where they are defined in. All *ModuleClasses* defined on the [Domain](#Domain) level can be imported and used by other domains. New *ModuleClasses* can be defined by extending existing *ModuleClasses* to add new or overriding defined [Actions](#Action), [Data](#Data) and [Events](#Event). @@ -179,7 +181,7 @@ New *ModuleClasses* can be defined by extending existing *ModuleClasses* to add The element has the following attributes: - **domain** : Identifier / Reference of the [Domain](#Domain) of the extended *ModuleClass*. Required when *extends* is specified. - **class** : Name of the *ModuleClass* in the [Domain](#Domain) thet is extended. -- **Doc** : Documentation for the *ModuleClass*. Optional. +- **[Doc](#Documentation)** : Documentation for the *ModuleClass*. Optional. - **Actions** : A list of [Action](#Action) components, each defining a single action. Optional. - **Data** : A list of [Data](#Data) components. Optional. - **Events** : A list of [Event](#Event) components. Optional. @@ -203,7 +205,9 @@ The element has the following attributes: <a name="Action"/></a> ### Action -An *Action* is defines a single procedure call for a [ModuleClass](#ModuleClass). It is basically for calling a function on a physical device in order to set or request data, or to invoke an action at a [Device](#Device). +An *Action* defines a single procedure call for a [ModuleClass](#ModuleClass). It is basically used for calling a function on a physical device in order to set or request data, or to invoke an action at a [Device](#Device). # + +It is also possible that an *Action* results in calling multiple functions on the device. Examples for this are the assembly of single function calls into one *Action* in order to provide sanity checks on the arguments, or for managing and fullfil transactional function calls on the device.  @@ -212,11 +216,11 @@ An *Action* is defines a single procedure call for a [ModuleClass](#ModuleClass) - **type** : The return type of the *Action*. It must comply to one of the defined [DataTypes](#DataType). Optional. If no *type* is specified the *Action* does not return a value. #### Elements -- **Doc** : Documentation for the *Action*. Optional. +- **[Doc](#Documentation)** : Documentation for the *Action*. Optional. - **Arg** : Zero or more occurances of argument definitions for an *Action*. Optional. The *Arg* has the following attributes and elements: - **name** : The name of the *Arg*. Attribute. Required. - - **type** : The type of the *Arg*. It must comply to one of the defined *DataTypes*. Attribute. Required. + - **type** : The type of the *Arg*. It must comply to one of the defined [DataTypes](#DataType) Attribute. Required. - **Doc** : Documentation for the *Arg* element. Optional. #### Example @@ -241,7 +245,7 @@ The *Data* component represents a list of *DataPoints*.  -Though *DataPoints* only refer to single data points of a physical device it is possible to describe hierarchies by model the path to the data point in the hierarchy by a path-like structure like to the pathname of a UNIX file system. Here, the root node of the hierarchy is a slash (/ 0x2F) and the segments or nodes along the path are also separated by slashes. The actual datapoint is the last leaf at the path. +Though *DataPoints* only refer to single data points of a physical device it is possible to describe hierarchies by model the path to the data point in the hierarchy by a path-like structure like to the pathname of a UNIX file system. Here, the root node of the hierarchy is a slash (/ 0x2F) and the segments or nodes along the path are also separated by slashes. The actual data point is the last leaf at the path. In EBNF: @@ -263,7 +267,7 @@ A *DataPoint* has the following attributes and elements: - **writable** : Boolean value that indicates whether this *DataPoint* is writable by an application. Attribute. Optional. Default: false. - **readable** : Boolean value that indicates whether this *DataPoint* is readable by an application. Attribute. Optional. Default: false. - **eventable** : Boolean value that indicates whether an internal or external change of this *DataPoint* raises an event. Attribute. Optional. Default: false. - - **Doc** : Documentation for the *DataPoint* element. Optional. + - **[Doc](#Documentation)** : Documentation for the *DataPoint* element. Optional. #### Example @@ -280,17 +284,17 @@ A *DataPoint* has the following attributes and elements: ### DataType The following *DataTypes* can be used in the SDT's [Action](#Action), *Arg* and [DataPoint](#Data) elements and attributes. If not stated otherwise datatypes should comply to the equivalent datatypes defined in [XML Schema Part 2: Datatypes Second Edition](http://www.w3.org/TR/xmlschema-2/#boolean): -- **boolean** : A boolean value as defined by [http://www.w3.org/TR/xmlschema-2/#boolean](http://www.w3.org/TR/xmlschema-2/#boolean) . -- **byte** : An integer datatype with the range of [0 - 255] as defined by [http://www.w3.org/TR/xmlschema-2/#unsignedByte](http://www.w3.org/TR/xmlschema-2/#unsignedByte) . -- **integer** : An integer value as defined by [http://www.w3.org/TR/xmlschema-2/#integer](http://www.w3.org/TR/xmlschema-2/#integer) . -- **float** : An IEEE single-precision 32-bit floating point type as defined by [http://www.w3.org/TR/xmlschema-2/#float](http://www.w3.org/TR/xmlschema-2/#float) . -- **string** : The string datatype represents character strings as defined by [http://www.w3.org/TR/xmlschema-2/#string](http://www.w3.org/TR/xmlschema-2/#string) . +- **boolean** : A boolean value as defined in [http://www.w3.org/TR/xmlschema-2/#boolean](http://www.w3.org/TR/xmlschema-2/#boolean) . +- **byte** : An integer datatype with the range of [0 - 255] as defined in [http://www.w3.org/TR/xmlschema-2/#unsignedByte](http://www.w3.org/TR/xmlschema-2/#unsignedByte) . +- **integer** : An integer value as defined in [http://www.w3.org/TR/xmlschema-2/#integer](http://www.w3.org/TR/xmlschema-2/#integer) . +- **float** : An IEEE single-precision 32-bit floating point type as defined in [http://www.w3.org/TR/xmlschema-2/#float](http://www.w3.org/TR/xmlschema-2/#float) . +- **string** : The string datatype represents character strings as defined in [http://www.w3.org/TR/xmlschema-2/#string](http://www.w3.org/TR/xmlschema-2/#string) . - **enum** : A complete and orderd list of items in a collection. Items in an enumeration are separated by commas (, 0x2c) and must be of one of the datatypes defined here. Commas (, 0x2c) and backslashes (\ 0x5c) in enumaration items must be escaped by backslash. -- **date** : A date value as defined by [http://www.w3.org/TR/xmlschema-2/#date](http://www.w3.org/TR/xmlschema-2/#date) . -- **time** : A time value as defined by [http://www.w3.org/TR/xmlschema-2/#time](http://www.w3.org/TR/xmlschema-2/#time) . -- **datetime** : A time value as defined by [http://www.w3.org/TR/xmlschema-2/#dateTime](http://www.w3.org/TR/xmlschema-2/#dateTime) . +- **date** : A date value as defined in [http://www.w3.org/TR/xmlschema-2/#date](http://www.w3.org/TR/xmlschema-2/#date) . +- **time** : A time value as defined in [http://www.w3.org/TR/xmlschema-2/#time](http://www.w3.org/TR/xmlschema-2/#time) . +- **datetime** : A time value as defined in [http://www.w3.org/TR/xmlschema-2/#dateTime](http://www.w3.org/TR/xmlschema-2/#dateTime) . - **blob** : A blob value represents a binary object. The internal encoding is transparent and not defined here. The binary object must be encoded conforming to [http://www.w3.org/TR/xmlschema-2/#base64Binary](http://www.w3.org/TR/xmlschema-2/#base64Binary) . -- **uri** : A URI that represents a Uniform Resource Identifier Reference (URI) as defined by as defined by [RFC 2396](http://www.ietf.org/rfc/rfc2396.txt) and amended by [RFC 2732](http://www.ietf.org/rfc/rfc2732.txt) . +- **uri** : A URI that represents a Uniform Resource Identifier Reference (URI) as defined by as defined in [RFC 2396](http://www.ietf.org/rfc/rfc2396.txt) and amended in [RFC 2732](http://www.ietf.org/rfc/rfc2732.txt) . --- @@ -305,7 +309,7 @@ An *Event* is a component that defines properties for events that are raised as #### Elements - **Data** : A list of [Data](#Data) components for an event's payload. Optional. -- **Doc** : Documentation for the *Event* Element. Optional. +- **[Doc](#Documentation)** : Documentation for the *Event* Element. Optional. #### Example @@ -321,7 +325,7 @@ An *Event* is a component that defines properties for events that are raised as <a name="Documentation"/></a> # Documentation -The *Doc* documentation element is optionally available in most components of the SDT. Its purpose is to provide a short documentation of the respective element. +The *Doc* documentation element is optionally available in most components of the SDT. Its purpose is to provide a short explanation of the respective element. The text inside the *Doc* element can be structure using a very limited subset of HTML elements. The possible structuring is defined in EBNF as follows: diff --git a/SDT/schema2.0/docs/SDT_UML.uxf b/SDT/schema2.0/docs/SDT_UML.uxf index 9f8bad6c2efd69796402a99ea53b77247b3fab30..2f1eb5e42ba83dd5c9b7c9fb25929ad53c1a2988 100644 --- a/SDT/schema2.0/docs/SDT_UML.uxf +++ b/SDT/schema2.0/docs/SDT_UML.uxf @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> -<diagram program="umlet" version="13.1"> +<diagram program="umlet" version="13.2"> <zoom_level>9</zoom_level> <element> <id>UMLClass</id> @@ -46,7 +46,7 @@ fg=blue</panel_attributes> <w>117</w> <h>81</h> </coordinates> - <panel_attributes>lt=<- + <panel_attributes>lt=<. m1=0,1 </panel_attributes> <additional_attributes>110.0;10.0;40.0;10.0;40.0;70.0;10.0;70.0</additional_attributes> @@ -75,7 +75,7 @@ fg=blue</panel_attributes> <w>99</w> <h>36</h> </coordinates> - <panel_attributes>lt=<- + <panel_attributes>lt=<. m1=0..*</panel_attributes> <additional_attributes>90.0;10.0;10.0;10.0</additional_attributes> </element> @@ -104,7 +104,7 @@ fg=blue</panel_attributes> <w>90</w> <h>180</h> </coordinates> - <panel_attributes>lt=<- + <panel_attributes>lt=<. m1= 0..*</panel_attributes> <additional_attributes>80.0;10.0;30.0;10.0;30.0;180.0;10.0;180.0</additional_attributes> </element> @@ -133,7 +133,7 @@ fg=blue</panel_attributes> <w>45</w> <h>180</h> </coordinates> - <panel_attributes>lt=<- + <panel_attributes>lt=<. m1=0..* </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> @@ -165,7 +165,7 @@ fg=blue</panel_attributes> <w>90</w> <h>81</h> </coordinates> - <panel_attributes>lt=<- + <panel_attributes>lt=<. m1= 0,1</panel_attributes> <additional_attributes>80.0;10.0;40.0;10.0;40.0;70.0;10.0;70.0</additional_attributes> </element> @@ -231,7 +231,7 @@ Extends <w>117</w> <h>45</h> </coordinates> - <panel_attributes>lt=<- + <panel_attributes>lt=<. m1=0..* </panel_attributes> <additional_attributes>110.0;20.0;10.0;20.0</additional_attributes> @@ -244,7 +244,7 @@ m1=0..* <w>99</w> <h>198</h> </coordinates> - <panel_attributes>lt=<- + <panel_attributes>lt=<<- m1=0,1 </panel_attributes> <additional_attributes>90.0;10.0;40.0;10.0;40.0;200.0;10.0;200.0</additional_attributes> @@ -257,7 +257,7 @@ m1=0,1 <w>81</w> <h>45</h> </coordinates> - <panel_attributes>lt=<.. + <panel_attributes>lt=<. m1=0..* </panel_attributes> <additional_attributes>70.0;20.0;10.0;20.0</additional_attributes> @@ -270,7 +270,7 @@ m1=0..* <w>45</w> <h>198</h> </coordinates> - <panel_attributes>lt=<- + <panel_attributes>lt=<<- m1= 1 </panel_attributes> <additional_attributes>10.0;10.0;30.0;10.0;30.0;200.0;10.0;200.0</additional_attributes> @@ -297,8 +297,8 @@ fg=blue</panel_attributes> <w>117</w> <h>153</h> </coordinates> - <panel_attributes>lt=<- -m1=0..* + <panel_attributes>lt=<. +m1=0,1 </panel_attributes> <additional_attributes>110.0;140.0;50.0;140.0;50.0;10.0;10.0;10.0</additional_attributes> </element> @@ -310,7 +310,7 @@ m1=0..* <w>72</w> <h>45</h> </coordinates> - <panel_attributes>lt=<- + <panel_attributes>lt=<. m1=0..* </panel_attributes> <additional_attributes>60.0;20.0;10.0;20.0</additional_attributes> @@ -346,8 +346,8 @@ fg=blue <panel_attributes>Event -- *@ name : text* -/- data : Data/ -- Doc : Doc +- data : Data +/- Doc : Doc/ fg=blue</panel_attributes> <additional_attributes/> </element> @@ -359,7 +359,7 @@ fg=blue</panel_attributes> <w>126</w> <h>261</h> </coordinates> - <panel_attributes>lt=<- + <panel_attributes>lt=<. m1=0..* </panel_attributes> <additional_attributes>120.0;260.0;30.0;260.0;30.0;10.0;10.0;10.0</additional_attributes> @@ -384,7 +384,7 @@ fg=blue</panel_attributes> <w>72</w> <h>117</h> </coordinates> - <panel_attributes>lt=<- + <panel_attributes>lt=<. m1=0..* </panel_attributes> <additional_attributes>10.0;10.0;60.0;10.0;60.0;110.0;50.0;110.0</additional_attributes> @@ -394,11 +394,11 @@ m1=0..* <coordinates> <x>306</x> <y>207</y> - <w>90</w> + <w>27</w> <h>252</h> </coordinates> - <panel_attributes>lt=<<<. -<<extends>></panel_attributes> + <panel_attributes>lt=<<- +</panel_attributes> <additional_attributes>10.0;10.0;10.0;260.0</additional_attributes> </element> <element> @@ -409,8 +409,8 @@ m1=0..* <w>126</w> <h>144</h> </coordinates> - <panel_attributes>lt=<- -m1=0..* + <panel_attributes>lt=<. +m1=1 </panel_attributes> <additional_attributes>10.0;10.0;10.0;70.0;120.0;70.0;120.0;140.0;100.0;140.0</additional_attributes> </element> @@ -422,7 +422,7 @@ m1=0..* <w>63</w> <h>351</h> </coordinates> - <panel_attributes>lt=<- + <panel_attributes>lt=<<- m1=1 </panel_attributes> <additional_attributes>10.0;10.0;50.0;10.0;50.0;370.0;10.0;370.0</additional_attributes> @@ -453,7 +453,7 @@ fg=blue</panel_attributes> <w>90</w> <h>45</h> </coordinates> - <panel_attributes>lt=<- + <panel_attributes>lt=<. m1=0..* </panel_attributes> <additional_attributes>80.0;20.0;10.0;20.0</additional_attributes> @@ -475,7 +475,7 @@ fontsize=10 /- optionalElement (0/1)/ /* optionalElement (0/n)/ -"Contains" Relation +"Depends" Relation Subclassing</panel_attributes> <additional_attributes/> @@ -488,7 +488,7 @@ Subclassing</panel_attributes> <w>90</w> <h>36</h> </coordinates> - <panel_attributes>lt=<- + <panel_attributes>lt=<. fontsize=10 m1=0..* </panel_attributes> @@ -498,14 +498,13 @@ m1=0..* <id>Relation</id> <coordinates> <x>108</x> - <y>108</y> + <y>117</y> <w>99</w> - <h>36</h> + <h>27</h> </coordinates> - <panel_attributes>lt=<<<. -<<extends>> + <panel_attributes>lt=<<- fontsize=10</panel_attributes> - <additional_attributes>90.0;20.0;10.0;20.0</additional_attributes> + <additional_attributes>90.0;10.0;10.0;10.0</additional_attributes> </element> <element> <id>Relation</id> @@ -515,7 +514,7 @@ fontsize=10</panel_attributes> <w>90</w> <h>54</h> </coordinates> - <panel_attributes>lt=<- + <panel_attributes>lt=<. m1=0..* </panel_attributes> <additional_attributes>80.0;10.0;30.0;10.0;30.0;40.0;10.0;40.0</additional_attributes> @@ -528,7 +527,7 @@ m1=0..* <w>324</w> <h>117</h> </coordinates> - <panel_attributes>lt=<- + <panel_attributes>lt=<. </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> </element> diff --git a/SDT/schema2.0/docs/images/SDT2.0_UML.png b/SDT/schema2.0/docs/images/SDT2.0_UML.png index aa37af600f61ef22bef185c803cd987e48d72457..c487167f0f1f30644d1ac4b813d5b9a92f14acf9 100644 Binary files a/SDT/schema2.0/docs/images/SDT2.0_UML.png and b/SDT/schema2.0/docs/images/SDT2.0_UML.png differ diff --git a/SDT/schema2.0/etc/domain.rnc b/SDT/schema2.0/etc/domain.rnc index 01cb268a45c9b9ddf1412b9ebdb9dee465a768c0..d07da849b6d19dc29491c9662b7785bc88125639 100644 --- a/SDT/schema2.0/etc/domain.rnc +++ b/SDT/schema2.0/etc/domain.rnc @@ -54,6 +54,7 @@ DataType = | "time" | "datetime" | "blob" + | "uri" DocText = (text | element em { text } diff --git a/SDT/schema2.0/src/domain.rng b/SDT/schema2.0/src/domain.rng index 14ce218a69b88c360393e599dc47208da712594c..7af4a426ea65e94ddb3b1ad113b1ac804f5db311 100644 --- a/SDT/schema2.0/src/domain.rng +++ b/SDT/schema2.0/src/domain.rng @@ -130,6 +130,7 @@ <value>time</value> <value>datetime</value> <value>blob</value> + <value>uri</value> </choice> </define> diff --git a/SDT/schema2.0/src/domain.xsd b/SDT/schema2.0/src/domain.xsd index f22e199f0d00df437e885b502cc6f77f1fb57cc9..19114a80cf46fd6c170780a46de9e89a0835fa95 100644 --- a/SDT/schema2.0/src/domain.xsd +++ b/SDT/schema2.0/src/domain.xsd @@ -98,6 +98,7 @@ <xs:enumeration value="time"/> <xs:enumeration value="datetime"/> <xs:enumeration value="blob"/> + <xs:enumeration value="uri"/> </xs:restriction> </xs:simpleType> <xs:group name="DocText">