Commit 939226c4 authored by Andreas Kraft's avatar Andreas Kraft

Adapted documentation according to merge

parent 81d24142
......@@ -38,7 +38,7 @@ The following code section shows the fully integrated template. The source code
<DataPoint name="status" readable="true" writable="true">
<Doc>This property indicates the ON/OFF status.</Doc>
<DataType>
<SimpleType type="boolean" />
<Simple type="boolean" />
</DataType>
</DataPoint>
</Data>
......@@ -81,7 +81,7 @@ Based on the simplified example above, the two appliances will need the [ModuleC
<DataPoint name="operationStatus" writable="true">
<Doc>This property sets/reads the ON/OFF status.</Doc>
<DataType>
<SimpleType type="boolean"/>
<Simple type="boolean"/>
</DataType>
</DataPoint>
</Data>
......@@ -97,7 +97,7 @@ Based on the simplified example above, the two appliances will need the [ModuleC
<DataPoint name="measuredCumulativePowerConsumption" writable="false">
<Doc>This indicates cumulative power consumption of the device in increments of 0.001kWh.</Doc>
<DataType>
<SimpleType type="integer"/>
<Simple type="integer"/>
</DataType>
</DataPoint>
</Data>
......@@ -108,7 +108,7 @@ Based on the simplified example above, the two appliances will need the [ModuleC
<DataPoint name="installationLocation" writable="true">
<Doc>This property indicates the installation location</Doc>
<DataType>
<SimpleType type="string"/>
<Simple type="string"/>
</DataType>
</DataPoint>
</Data>
......@@ -122,7 +122,7 @@ Based on the simplified example above, the two appliances will need the [ModuleC
<DataPoint name="measuredTemperatureValue" readable="true" writable="false">
<Doc>This property indicates the measured temperature value in units of 0.1C.</Doc>
<DataType unitOfMeasure="celsius">
<SimpleType type="integer" />
<Simple type="integer" />
</DataType>
</DataPoint>
</Data>
......@@ -145,10 +145,10 @@ At the beginning of the definition some device Properties are defined.
<Properties>
<Property name="Name" value="washing machine">
<SimpleType type="string" />
<Simple type="string" />
</Property>
<Property name="Vendor" value="ACME">
<SimpleType type="string" />
<Simple type="string" />
</Property>
</Properties>
......@@ -191,25 +191,25 @@ At the beginning of the definition some device Properties are defined.
<DataPoint name="door_CoverOpen_CloseStatus" readable="true" writable="false">
<Doc>This property indicates whether the door/cover is open or closed.</Doc>
<DataType>
<SimpleType type="boolean" />
<Simple type="boolean" />
</DataType>
</DataPoint>
<DataPoint name="washingMachineSetting" readable="true" writable="true">
<Doc>Washing machine setting</Doc>
<DataType>
<SimpleType type="string" />
<Simple type="string" />
</DataType>
</DataPoint>
<DataPoint name="currentStageOfWashingCycle" readable="true" writable="false">
<Doc>This property indicates the current stage of the washing cycle.</Doc>
<DataType>
<SimpleType type="string" />
<Simple type="string" />
</DataType>
</DataPoint>
<DataPoint name="timeRemainingToCompleteWashingCycle" readable="true" writable="false">
<Doc>This property indicates the time remaining to complete the current washing cycle in the HH:MM:SS format.</Doc>
<DataType>
<SimpleType type="time" />
<Simple type="time" />
</DataType>
</DataPoint>
......@@ -221,19 +221,19 @@ At the beginning of the definition some device Properties are defined.
<DataPoint name="onTimerReservationSetting" readable="true" writable="true">
<Doc>Reservation ON/OFF</Doc>
<DataType>
<SimpleType type="boolean" />
<Simple type="boolean" />
</DataType>
</DataPoint>
<DataPoint name="onTimerSetting" readable="true" writable="true">
<Doc>Timer value (HH:MM)</Doc>
<DataType>
<SimpleType type="time" />
<Simple type="time" />
</DataType>
</DataPoint>
<DataPoint name="relativeTimeBasedOnTimerSetting" readable="true" writable="true">
<Doc>Timer value (HH:MM)</Doc>
<DataType>
<SimpleType type="time" />
<Simple type="time" />
</DataType>
</DataPoint>
</Data>
......@@ -275,7 +275,7 @@ The following code section shows the fully integrated template.
<DataPoint name="operationStatus" readable="true" writable="true">
<Doc>This property indicates the ON/OFF status.</Doc>
<DataType>
<SimpleType type="boolean" />
<Simple type="boolean" />
</DataType>
</DataPoint>
</Data>
......@@ -288,7 +288,7 @@ The following code section shows the fully integrated template.
<DataPoint name="installationLocation" readable="true" writable="true">
<Doc>This property indicates the installation location</Doc>
<DataType>
<SimpleType type="string" />
<Simple type="string" />
</DataType>
</DataPoint>
</Data>
......@@ -306,7 +306,7 @@ The following code section shows the fully integrated template.
<DataPoint name="measuredInstantaneousPowerConsumption" readable="true" writable="false">
<Doc>This property indicates the instantaneous power consumption of the device in watts.</Doc>
<DataType unitOfMeasure="watts">
<SimpleType type="integer" />
<Simple type="integer" />
</DataType>
</DataPoint>
</Data>
......@@ -317,7 +317,7 @@ The following code section shows the fully integrated template.
<DataPoint name="measuredTemperatureValue" readable="true" writable="false">
<Doc>This property indicates the measured temperature value in units of 0.1C.</Doc>
<DataType unitOfMeasure="celsius">
<SimpleType type="integer" />
<Simple type="integer" />
</DataType>
</DataPoint>
</Data>
......@@ -334,10 +334,10 @@ The following code section shows the fully integrated template.
<Properties>
<Property name="Name" value="washing machine">
<SimpleType type="string" />
<Simple type="string" />
</Property>
<Property name="Vendor" value="ACME">
<SimpleType type="string" />
<Simple type="string" />
</Property>
</Properties>
......@@ -382,25 +382,25 @@ The following code section shows the fully integrated template.
<DataPoint name="door_CoverOpen_CloseStatus" readable="true" writable="false">
<Doc>This property indicates whether the door/cover is open or closed.</Doc>
<DataType>
<SimpleType type="boolean" />
<Simple type="boolean" />
</DataType>
</DataPoint>
<DataPoint name="washingMachineSetting" readable="true" writable="true">
<Doc>Washing machine setting</Doc>
<DataType>
<SimpleType type="string" />
<Simple type="string" />
</DataType>
</DataPoint>
<DataPoint name="currentStageOfWashingCycle" readable="true" writable="false">
<Doc>This property indicates the current stage of the washing cycle.</Doc>
<DataType>
<SimpleType type="string" />
<Simple type="string" />
</DataType>
</DataPoint>
<DataPoint name="timeRemainingToCompleteWashingCycle" readable="true" writable="false">
<Doc>This property indicates the time remaining to complete the current washing cycle in the HH:MM:SS format.</Doc>
<DataType>
<SimpleType type="time" />
<Simple type="time" />
</DataType>
</DataPoint>
......@@ -412,19 +412,19 @@ The following code section shows the fully integrated template.
<DataPoint name="onTimerReservationSetting" readable="true" writable="true">
<Doc>Reservation ON/OFF</Doc>
<DataType>
<SimpleType type="boolean" />
<Simple type="boolean" />
</DataType>
</DataPoint>
<DataPoint name="onTimerSetting" readable="true" writable="true">
<Doc>Timer value (HH:MM)</Doc>
<DataType>
<SimpleType type="time" />
<Simple type="time" />
</DataType>
</DataPoint>
<DataPoint name="relativeTimeBasedOnTimerSetting" readable="true" writable="true">
<Doc>Timer value (HH:MM)</Doc>
<DataType>
<SimpleType type="time" />
<Simple type="time" />
</DataType>
</DataPoint>
</Data>
......
......@@ -17,10 +17,10 @@
1. [DataType](#DataType)
1. [Constraint](#Constraint)
2. [TypeChoice](#TypeChoice)
2. [SimpleType](#SimpleType)
3. [StructType](#StructType)
4. [ArrayType](#ArrayType)
5. [EnumType](#EnumType)
2. [Simple](#Simple)
3. [Struct](#Struct)
4. [Array](#Array)
5. [Enum](#Enum)
1. [ExtendExclude](#ExtendExclude)
3. [Extending (Inheriting)](#Extending)
1. [Extend](#Extend)
......@@ -194,7 +194,7 @@ string = (* character string excluding the character "/" *) ;
<DataPoint name="attributeName" writable="false">
<Doc>Some documentation for the DataPoint</Doc>
<DataType>
<SimpleType type="string" />
<Simple type="string" />
</DataType
</DataPoint>
</Data>
......@@ -237,7 +237,7 @@ The following are two examples for actions implementing a getter and a setter fo
<Arg name="value">
<Doc>The desired value of the associated state.</Doc>
<DataType>
<SimpleType type="boolean" />
<Simple type="boolean" />
</DataType>
</Arg>
</Args>
......@@ -295,7 +295,7 @@ Element of [ModuleClass](#ModuleClass).
<Data>
<DataPoint name="state">
<DataType>
<SimpleType type="boolean" />
<Simple type="boolean" />
</DataType>
</DataPoint>
</Data>
......@@ -422,13 +422,13 @@ All elements of [DeviceClass](#DeviceClass) can be reused in *ProductClass*, but
<Doc>This is a new product</Doc>
<Properties>
<Property name="name" value="product-abc">
<SimpleType type="string"></SimpleType>
<Simple type="string"></Simple>
</Property>
<Property name="vendor" value="xyz"/>
<SimpleType type="string"></SimpleType>
<Simple type="string"></Simple>
</Property>
<Property name="SerialNumber"/>
<SimpleType type="string"></SimpleType>
<Simple type="string"></Simple>
</Property>
</Properties>
<ModuleClasses>
......@@ -467,12 +467,12 @@ Since the *Properties* are highly varied, depending on industry segment, no atte
#### Elements
- **[Doc](#Documentation)** : Documentation for the *Property*. Optional.
- **DataType** : The data type of the property. This must be a [SimpleType](#SimpleType).
- **DataType** : The data type of the property. This must be a [Simple](#Simple) type.
#### Example
```xml
<Property name="ManufacturedDate" value="2015.10.30 10:06">
<SimpleType type="datetime" />
<Simple type="datetime" />
</Property>
```
......@@ -494,24 +494,24 @@ The various elements of *DataType* are described in the following sections.
<a name="DataType"/></a>
### DataType
Element of a [Domain](#Domain), [Property](#Property), [Action](#Action), [Arg](#Arg), [DataPoint](#DataPoint), [Event](#Event), [StructType](#StructType), and [ArrayType](#ArrayType).
Element of a [Domain](#Domain), [Property](#Property), [Action](#Action), [Arg](#Arg), [DataPoint](#DataPoint), [Event](#Event), [Struct](#Struct), and [Array](#Array).
![](images/DataType.png)
The *DataType* element is a "container" for the various aspects of a type.
#### Attributes
- **name** : The name of the *DataType*. Optional, with the exception that the name must be set for fields in a [Struct](#Struct) to distinguish individual fields in that structure.
- **name** : The name of the *DataType*. Optional, with the exception that the name must be set for fields in a [Struct](#Struct) to distinguish individual fields in that structure.
- **unitOfMeasure** : Before considering the type of data in detail, there is the option to label the data with the units of measurement. A "Temperature" measurement is meaningless until the units Kelvin, Celcius, Fahrenheit etc are known. Because of the extreme variety of units, a string field is the default annotation method, although of course a SDO could decide to reference a standardized list of units. Optional.
- **semanticURI** : An attribute that contains a URI to a semantic description of the element. Optional.
#### Elements
- **[Doc](#Documentation)** : Documentation for the *DataType* Element. Optional.
- **TypeChoice** : This element is actual an element from the following list of data types:
- **[SimpleType](#SimpleType)**
- **[Struct](#StructType)**
- **[Array](#ArrayType)**
- **[EnumType](#EnumType)**
- **[Simple](#Simple)**
- **[Struct](#Struct)**
- **[Array](#Array)**
- **[Enum](#Enum)**
- **[Constraint](#Constraint)** : A list of *Constraint* elements. Optional.
---
......@@ -544,13 +544,13 @@ The *TypeChoice* construct is required for syntactic reasons in the UML diagram
---
<a name="SimpleType"/></a>
### SimpleType
<a name="Simple"/></a>
### Simple
Element of [DataType](#DataType).
![](images/SimpleType.png)
The *SimpleType* element is required in order for software to understand the format of the associated data, e.g. are the bytes an integer or real value? The selection choosen by HGI is based on practical experience to include some specific types which are slightly more complex:
The *Simple* element is required in order for software to understand the format of the associated data, e.g. are the bytes an integer or real value? The selection choosen by HGI is based on practical experience to include some specific types which are slightly more complex:
1. the (technically redundant) options of *date* and *time* - to avoid problems which can arise interpreting a *datetime* value;
2. *url* because it is expected to become extremely common to provide links to other data sources;
......@@ -577,19 +577,19 @@ If not stated otherwise datatypes should comply to the equivalent datatypes defi
```xml
<DataPoint name="simpleDataPoint">
<DataType>
<SimpleType type="string" />
<Simple type="string" />
</DataType>
</DataPoint>
```
---
<a name="StructType"/></a>
### StructType
<a name="Struct"/></a>
### Struct
Element of [DataType](#DataType).
![](images/Struct.png)
The *StructType* element can be used to represent an ordered list of diverse DataTypes, which are represented by the *name* attribute of each [DataType](#DataType), and can be used recursively.
The *Struct* element can be used to represent an ordered list of diverse DataTypes, which are represented by the *name* attribute of each [DataType](#DataType), and can be used recursively.
#### Elements
- **[DataType](#DataType)** : A list of *DataTypes* elements representing the elements of a structure.
......@@ -600,10 +600,10 @@ The *StructType* element can be used to represent an ordered list of diverse Dat
<DataType name="structured">
<Struct>
<DataType name="aString">
<SimpleType type="string" />
<Simple type="string" />
</DataType>
<DataType name="anInteger">
<SimpleType type="integer" />
<Simple type="integer" />
</DataType>
</Struct>
</DataType>
......@@ -612,13 +612,13 @@ The *StructType* element can be used to represent an ordered list of diverse Dat
---
<a name="ArrayType"/></a>
### ArrayType
<a name="Array"/></a>
### Array
Element of [DataType](#DataType).
![](images/Array.png)
The *ArrayType* element is provided for defining lists of data; the definition is recursive so that multi-dimensional arrays can be described. Note that a Constraint can be used to provide limits on Array size.
The *Array* element is provided for defining lists of data; the definition is recursive so that multi-dimensional arrays can be described. Note that a Constraint can be used to provide limits on Array size.
#### Elements
- **[DataType](#DataType)** : A single *DataType* element that specifies the data type for the elements of the array.
......@@ -630,7 +630,7 @@ The *ArrayType* element is provided for defining lists of data; the definition i
<DataType name="arrayOfInteger">
<Array>
<DataType>
<SimpleType type="integer" />
<Simple type="integer" />
</DataType>
</Array>
</DataType>
......@@ -638,18 +638,18 @@ The *ArrayType* element is provided for defining lists of data; the definition i
```
---
<a name="EnumType"/></a>
### EnumType
<a name="Enum"/></a>
### Enum
Element of [DataType](#DataType).
![](images/Enum.png)
The *EnumType* element is provided for defining an enumeration data type; it defines a (possibly mixed) typed set of [EnumValues](#EnumValue).
The *Enum* element is provided for defining an enumeration data type; it defines a (possibly mixed) typed set of [EnumValues](#EnumValue).
#### Elements
- **[EnumValue](#EnumValue)** : A list of *EnumValue" element that specifies the data type for the elements of the array.
<a name="EnumTypeExample"/></a>
<a name="EnumExample"/></a>
#### Example
```xml
<DataPoint name="enumDataPoint">
......@@ -667,23 +667,23 @@ The *EnumType* element is provided for defining an enumeration data type; it def
<a name="EnumValue"/></a>
### EnumValue
Element of [EnumType](#EnumType).
Element of [Enum](#Enum).
![](images/EnumValue.png)
The *EnumType* element is provided for defining an enumeration data type; it defines a (possibly mixed) typed set of [EnumValues](#EnumValue).
The *Enum* element is provided for defining an enumeration data type; it defines a (possibly mixed) typed set of [EnumValues](#EnumValue).
#### Attributes
- **name** : The name that identifies the *EnumValue*. Required.
- **value** : An assigned value for the *EnumValue*. Required.
- **type** : The *BasicType* of the *EnumValue*. An [EnumType](#EnumType) may have *EnumValues* of mixed type. Optional, the default is *integer*.
- **type** : The *BasicType* of the *EnumValue*. An [Enum](#Enum) may have *EnumValues* of mixed type. Optional, the default is *integer*.
- **semanticURI** : An attribute that contains a URI to a semantic description of the element. Optional.
#### Elements
- **[Doc](#Documentation)** : Documentation for the *EnumValue* Element. Optional.
#### Example
See [example in *EnumType*](#EnumTypeExample).
See [example in *Enum*](#EnumExample).
---
......
......@@ -10,9 +10,9 @@
3. [Imports](#imports)
4. [Data Types](#dataTypes)
1. [SimpleType](#SimpleType)
2. [ArrayType](#ArrayType)
3. [StructType](#StructType)
4. [EnumType](#EnumType)
2. [Array](#Array)
3. [Struct](#Struct)
4. [Enum](#Enum)
5. [Extending DataTypes](#extendingDatatypes)
......@@ -263,10 +263,10 @@ A simple data type with additional attributes:
}
```
<a name="ArrayType"/></a>
### ArrayType
<a name="Array"/></a>
### Array
An [ArrayType](SDT_Components.md#ArrayType) definition is mapped to an *Array* JSON structure. The content of the structure is only one element that defines the type of the array. This could be any [SimpleType](#SimpleType), [ArrayType](#ArrayType), [StructType](#StructType), or [EnumType](#EnumType).
An [Array](SDT_Components.md#Array) definition is mapped to an *Array* JSON structure. The content of the structure is only one element that defines the type of the array. This could be any [SimpleType](#SimpleType), [Array](#Array), [Struct](#Struct), or [Enum](#Enum).
#### Example
......@@ -292,12 +292,12 @@ A simple data type with additional attributes:
}
```
<a name="StructType"/></a>
### StructType
<a name="Struct"/></a>
### Struct
A [StructType](SDT_Components.md#StructType) definition is mapped to a *Struct* JSON array. The content of the array are the individual data types for the structure. These could be any [SimpleType](#SimpleType), [ArrayType](#ArrayType), [StructType](#StructType), or [EnumType](#EnumType).
A [Struct](SDT_Components.md#Struct) definition is mapped to a *Struct* JSON array. The content of the array are the individual data types for the structure. These could be any [SimpleType](#SimpleType), [Array](#Array), [Struct](#Struct), or [Enum](#Enum).
A *StructType* definition must contain a *name* attribute.
A *Struct* definition must contain a *name* attribute.
#### Example
......@@ -374,12 +374,12 @@ A more complex structured data type (a structure that contains an indentifier va
]
```
<a name="EnumType"/></a>
### EnumType
<a name="Enum"/></a>
### Enum
A [EnumType](SDT_Components.md#EnumType) definition is mapped to an *Enum* JSON structure. The content of the structure are the individual enum values of the enum.
A [Enum](SDT_Components.md#Enum) definition is mapped to an *Enum* JSON structure. The content of the structure are the individual enum values of the enum.
A *EnumType* definition must contain a *name* attribute.
A *Enum* definition must contain a *name* attribute.
#### Example
......@@ -414,7 +414,7 @@ Extending [DataTypes](SDT_Components.md#DataTypes) are mapped the same way as ex
#### Example
An [Enum](SDT_Components.md#EnumType) that defines three *EnumValues*. The first definition explicitly specifies the type of the *EnumValue*.
An [Enum](SDT_Components.md#Enum) that defines three *EnumValues*. The first definition explicitly specifies the type of the *EnumValue*.
**XML**:
......
This diff is collapsed.
SDT/schema4.0/docs/images/Property.png

6.78 KB | W: | H:

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

6.73 KB | W: | H:

SDT/schema4.0/docs/images/Property.png
SDT/schema4.0/docs/images/Property.png
SDT/schema4.0/docs/images/Property.png
SDT/schema4.0/docs/images/Property.png
  • 2-up
  • Swipe
  • Onion skin
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Test the EnumType -->
<!-- Test the DataPoint -->
<Domain id="datapoint-test" xmlns="http://www.onem2m.org/xml/sdt/4.0" xmlns:xi="http://www.w3.org/2001/XInclude">
<ModuleClasses>
......
......@@ -6,7 +6,7 @@
<DataType name="temperatureType" unitOfMeasure="C">
<Simple type="float"/>
</DataType>
<DataType name="anEnumType">
<DataType name="anEnum">
<Enum>
<EnumValue name="red" type="integer" value="1"/>
<EnumValue name="green" value="2"/>
......
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Test the EnumType -->
<!-- Test the Enum type -->
<Domain id="enumtype-test" xmlns="http://www.onem2m.org/xml/sdt/4.0" xmlns:xi="http://www.w3.org/2001/XInclude">
<Domain id="enum-test" xmlns="http://www.onem2m.org/xml/sdt/4.0" xmlns:xi="http://www.w3.org/2001/XInclude">
<ModuleClasses>
<ModuleClass name="TestEnumType">
<ModuleClass name="TestEnumm">
<Data>
<DataPoint name="TestEnumTypeDataPoint" writable="true">
<DataPoint name="TestEnumDataPoint" writable="true">
<DataType>
<Enum>
<EnumValue name="red" value="1" type="integer" />
......
......@@ -6,11 +6,11 @@
<DataType name="temperatureType" unitOfMeasure="C" semanticURI="http://example.com/temperatureType.rdf">
<Simple type="float"/>
</DataType>
<DataType name="anEnumType" semanticURI="http://example.com/anEnumType.rdf">
<DataType name="anEnum" semanticURI="http://example.com/anEnum.rdf">
<Enum>
<EnumValue name="red" type="integer" value="1" semanticURI="http://example.com/anEnumType-red.rdf"/>
<EnumValue name="green" value="2" semanticURI="http://example.com/anEnumType-green.rdf"/>
<EnumValue name="blue" value="3" semanticURI="http://example.com/anEnumType-blue.rdf"/>
<EnumValue name="red" type="integer" value="1" semanticURI="http://example.com/anEnum-red.rdf"/>
<EnumValue name="green" value="2" semanticURI="http://example.com/anEnum-green.rdf"/>
<EnumValue name="blue" value="3" semanticURI="http://example.com/anEnum-blue.rdf"/>
</Enum>
</DataType>
</DataTypes>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment