From ac15812e8b5658c9ca09960a0ec2a0d1091e2955 Mon Sep 17 00:00:00 2001 From: Andreas Kraft <akr@mheg.org> Date: Wed, 6 May 2015 23:19:36 +0200 Subject: [PATCH] Added Event. Small correction to build system doc --- SDT/schema2.0/docs/SDT Build System.md | 4 +- SDT/schema2.0/docs/SDT_Components.md | 122 ++++++++++++++++++------- SDT/schema2.0/docs/images/Event.png | Bin 0 -> 2993 bytes 3 files changed, 93 insertions(+), 33 deletions(-) create mode 100644 SDT/schema2.0/docs/images/Event.png diff --git a/SDT/schema2.0/docs/SDT Build System.md b/SDT/schema2.0/docs/SDT Build System.md index 4a483fd..817ec3e 100644 --- a/SDT/schema2.0/docs/SDT Build System.md +++ b/SDT/schema2.0/docs/SDT Build System.md @@ -36,13 +36,13 @@ You can use the build system to validate new SDT definitions or changes made to $ cd SDT/schema $ ant validate -The last lines of the many screens full of output you receive should look something like this: +The output after a successful validation should look like this: >[schemavalidate] 2 file(s) have been successfully validated. >BUILD SUCCESSFUL >Total time: 1 second -Otherwise you most likely receive a stacktrace. 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 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: >[schemavalidate] /Users/someone/Sources/git/RWD050/SDT/schema/test/mseeb.xml:66:18: cvc-elt.1: Cannot find the declaration of element 'Domain'. >BUILD FAILED diff --git a/SDT/schema2.0/docs/SDT_Components.md b/SDT/schema2.0/docs/SDT_Components.md index 3ca05b4..f6e3f97 100644 --- a/SDT/schema2.0/docs/SDT_Components.md +++ b/SDT/schema2.0/docs/SDT_Components.md @@ -1,6 +1,6 @@ # SDT Components -In this document an overview about the SDT 2.0 ødefinitions and component hierarchy is given. +In this document an overview about the SDT 2.0 definitions and component hierarchy is given. ## Contents @@ -10,7 +10,6 @@ In this document an overview about the SDT 2.0 ødefinitions and component hiera [ModuleClass](#ModuleClass) [Action](#Action) [Data](#Data) - [DataPoint](#DataPoint) [DataType](#DataType) [Event](#Event) @@ -219,8 +218,6 @@ The *Arg* has the following attributes and elements: - **type** : The type of the *Arg*. It must comply to one of the defined *DataTypes*. Attribute. Required. - **Doc** : Documentation for the *Arg*. Element. Optional. - - #### Example The following are two examples for actions implementing a getter and a setter for boolean values. @@ -237,61 +234,80 @@ The following are two examples for actions implementing a getter and a setter fo --- +<a name="Data"/></a> ### Data -The 'Data' component represents a list of 'DataPoints' +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 (/ TODO hex value) and the nodes along the path are also separated by slashes. The actual datapoint is the last leaf at the path. + +In BNF: + + name := leaf | '/' path . + path : = node '/' path | leaf. + node := String . + leaf := String . + String := [character string excluding the character '/'] . + + #### Attributes None. #### Elements -- **DataPoint** : Zero or more occurances of **DataPoints**. Optional. +- **DataPoint** : Zero or more occurances of *DataPoints. Optional. +A *DataPoint* has the following attributes and elements: + - **name** : The name (and possible path in a hierarchical data model) of the *DataPoint*. Attribute. Required. + - **type** : The type of the *DataPoint*. It must comply to one of the defined *DataTypes*. Attribute. Required. + - **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. + #### Example <Data> - <!-- List of DataPoints goes here --> + <DataPoint name="attributeName" type="string" writable="false"> + <Doc>Some documentation for the DataPoint</Doc> + </DataPoint> </Data> --- -#### DataPoint - - - -#### Attributes -#### Elements -#### Example - ---- <a name="DataType"/></a> ### DataType -The currently allowed *DataTypes* for SDT *Actions*, *Args* and *DataTypes* are: - -- **boolean** : -- **byte** : -- **integer** : -- **float** : -- **string** : -- **enum** : -- **date** : -- **time** : -- **datetime** : -- **blob** : +The following *DataTypes* can be used in the SDT's *Actions*, *Args* and *DataTypes* 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) . +- **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) . +- **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) . --- - +<a name="Event"/></a> ### Event +An *Event* is a component that defines properties for events that are raised as reactions to changes in *DataPoints* of a *device's* data model. These state changes can happen either through a device-internal change or by external means, e.g. a user operates a switch or the temperature in a room rises beyond a certain threshold. - + #### Attributes +- **name** : The name of the *Event*. Required. + #### Elements -#### Example +- **Data** : A list of *Data* components. Optional. +#### Example +TODO continue @@ -301,6 +317,50 @@ The currently allowed *DataTypes* for SDT *Actions*, *Args* and *DataTypes* are: # DOC TBD Explain. Describe content elements + DocText := [ text | emphasizedText | boldText | monotypeText ] * . + + + <define name="DocText"> + <zeroOrMore> + <choice> + <text/> + <element name="em"> + <text/> + </element> + <element name="b"> + <text/> + </element> + <element name="tt"> + <text/> + </element> + </choice> + </zeroOrMore> + </define> + + + <define name="Doc"> + <optional> + <element name="Doc"> + <choice> + <ref name="DocText"/> + <zeroOrMore> + <choice> + <element name="p"> + <ref name="DocText"/> + </element> + <element name="img"> + <attribute name="src"/> + <element name="caption"> + <text/> + </element> + </element> + </choice> + </zeroOrMore> + </choice> + </element> + </optional> + </define> + diff --git a/SDT/schema2.0/docs/images/Event.png b/SDT/schema2.0/docs/images/Event.png new file mode 100644 index 0000000000000000000000000000000000000000..d8cebcfac88916349d0ab0cf3d5de0590b30d4e8 GIT binary patch literal 2993 zcma)8XIK+F+htEtHpm`skfDG~L8j~trA%cAg(7>;A|QJSNCg2A5GYuIwg_cZ9~o9Q zv`}Qpwk+9{;ah#a@4DWf?~f$+b)6)4a&nTK6f+Y&7A8I>3JMAq{fF8X<hGYw!WgK? zwc_?IGzA57n7;M{t1!Yw39}iOHE&P<1&%j(w}eX(8g_O?RYhJ3xtUrw3075;SQ*+^ zjmdjv;<8vFD7Sf0mHas1ew8Qe#aC!qO;xh4U5;|jQUxcwgxSLrQtWH+AyuSwA$A5! z{9P)z{Czrb5OuhjwH39p9(sUeOJzzRY)h0eaO=QtKy=J$(!>Cqm^b8*O)}NRoE-i|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