...
 
Commits (29)
......@@ -92,7 +92,7 @@
<schemavalidate warn="true">
<fileset dir="${basedir}/test" includes="*.xml"/>
<attribute name="http://apache.org/xml/features/xinclude" value="true"/>
<schema namespace="http://homegatewayinitiative.org/xml/dal/3.0"
<schema namespace="http://www.onem2m.org/xml/sdt/4.0"
file="${path.src}/domain.xsd" />
<schema namespace="http://www.w3.org/2001/XInclude"
file="${basedir}/etc/XInclude.xsd" />
......
namespace local = ""
default namespace xsl = "http://homegatewayinitiative.org/xml/dal/3.0"
default namespace xsl = "http://www.onem2m.org/xml/sdt/4.0"
namespace xi = "http://www.w3.org/2001/XInclude"
version = "1.0"
......
......@@ -11,45 +11,33 @@ start = Domain
Domain =
element Domain {
attribute xml:base { xsd:anyURI }?,
attribute id { xsd:ID },
attribute id { xsd:Name },
attribute semanticURI { xsd:anyURI }?,
DocDef,
element Imports { Domain+ }?,
element Modules {
element ModuleClass { ModuleDef }+
}?,
element Devices {
element Device {
attribute id { xsd:Name },
DocDef,
PropertiesDef?,
Modules?,
element SubDevices {
element SubDevice {
attribute id { xsd:Name },
DocDef,
PropertiesDef?,
Modules?
}+
}?
}+
}?
element DataTypes { DataTypeDef+ }?,
ModuleClassesDef?,
DeviceClassesDef?,
ProductClassesDef?
}
PropertiesDef =
element Properties {
element Property {
attribute name { text },
attribute name { xsd:Name },
attribute optional { xsd:boolean }?,
attribute value { text }?,
attribute semanticURI { xsd:anyURI }?,
DocDef,
SimpleType
}+
}
DataTypeDef =
element DataType {
attribute name { text }?,
attribute name { xsd:Name }?,
attribute unitOfMeasure { text }?,
attribute semanticURI { xsd:anyURI }?,
DocDef,
(StructType | ArrayType | SimpleType),
(ExtendDef? | (StructType | ArrayType | SimpleType | EnumType)),
ConstraintsDef?
}
StructType = element Struct { DataTypeDef+ }
......@@ -58,6 +46,7 @@ SimpleType =
element SimpleType {
attribute type { BasicType }
}
EnumType = element Enum { EnumValueDef+ }
BasicType =
"integer"
| "boolean"
......@@ -65,18 +54,27 @@ BasicType =
| "byte"
| "float"
| "array"
| "enum"
| "date"
| "time"
| "datetime"
| "blob"
| "uri"
| "void"
EnumValueDef =
element EnumValue {
attribute name { xsd:Name },
attribute value { text },
attribute type { BasicType }?,
attribute semanticURI { xsd:anyURI }?,
DocDef
}
ConstraintsDef =
element Constraints {
element Constraint {
attribute name { text },
attribute name { xsd:Name },
attribute type { BasicType }?,
attribute value { text }?,
attribute semanticURI { xsd:anyURI }?,
DocDef
}+
}
......@@ -95,27 +93,60 @@ DocDef =
element caption { text }
})*
}?
ModuleDef =
attribute name { text },
attribute optional { xsd:boolean }?,
element extends {
attribute domain { xsd:IDREF },
attribute class { text }
}?,
DocDef,
PropertiesDef?,
Actions?,
Data?,
Events?
Modules =
element Modules {
element Module { ModuleDef }+
DeviceClassesDef =
element DeviceClasses {
element DeviceClass {
attribute id { xsd:Name },
attribute semanticURI { xsd:anyURI }?,
DocDef,
PropertiesDef?,
ModuleClassesDef?,
SubDevicesRef?
}+
}
SubDevicesRef =
element SubDevices {
element SubDevice {
attribute id { xsd:Name },
attribute semanticURI { xsd:anyURI }?,
DocDef,
PropertiesDef?,
ModuleClassesDef?
}+
}
ModuleClassesDef =
element ModuleClasses {
element ModuleClass {
attribute name { xsd:Name },
attribute optional { xsd:boolean }?,
attribute semanticURI { xsd:anyURI }?,
DocDef,
ExtendDef?,
PropertiesDef?,
Actions?,
Data?,
Events?
}+
}
ProductClassesDef =
element ProductClasses {
element ProductClass {
attribute id { xsd:Name },
attribute semanticURI { xsd:anyURI }?,
DocDef,
ExtendDef?,
PropertiesDef?,
ModuleClassesDef?,
SubDevicesRef?,
element DeviceClass { ExtendDef }?
}+
}
Actions =
element Actions {
element Action {
attribute name { text },
attribute name { xsd:Name },
attribute optional { xsd:boolean }?,
attribute semanticURI { xsd:anyURI }?,
DocDef,
DataTypeDef?,
ArgDef?
......@@ -124,7 +155,10 @@ Actions =
ArgDef =
element Args {
element Arg {
attribute name { text },
attribute name { xsd:Name },
attribute optional { xsd:boolean }?,
attribute default { text }?,
attribute semanticURI { xsd:anyURI }?,
DocDef,
DataTypeDef
}+
......@@ -132,11 +166,13 @@ ArgDef =
Data =
element Data {
element DataPoint {
attribute name { text },
attribute name { xsd:Name },
attribute optional { xsd:boolean }?,
attribute writable { xsd:boolean }?,
attribute readable { xsd:boolean }?,
attribute eventable { xsd:boolean }?,
attribute default { text }?,
attribute semanticURI { xsd:anyURI }?,
DocDef,
DataTypeDef
}+
......@@ -144,9 +180,31 @@ Data =
Events =
element Events {
element Event {
attribute name { text },
attribute name { xsd:Name },
attribute optional { xsd:boolean }?,
attribute semanticURI { xsd:anyURI }?,
DocDef,
Data?
}+
}
ExtendDef =
element Extend {
attribute domain { xsd:Name },
attribute entity { xsd:Name },
(element Exclude {
attribute name { xsd:Name },
attribute type { ExtendType }
}
| element Include {
attribute name { xsd:Name },
attribute type { ExtendType }
})?
}
ExtendType =
"action"
| "datapoint"
| "event"
| "moduleclass"
| "property"
| "device"
| "subdevice"
targetNamespace="http://homegatewayinitiative.org/xml/dal/3.0"
xmlns="http://homegatewayinitiative.org/xml/dal/3.0"
targetNamespace="http://www.onem2m.org/xml/sdt/4.0"
xmlns="http://www.onem2m.org/xml/sdt/4.0"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
<locatingRules xmlns="http://thaiopensource.com/ns/locating-rules/1.0">
<namespace ns="http://homegatewayinitiative.org/xml/dal/2.0" typeId="DAL"/>
<namespace ns="http://www.onem2m.org/xml/sdt/4.0" typeId="DAL"/>
<namespace ns="http://www.w3.org/2001/XInclude" typeId="XINC"/>
<typeId id="DAL" uri="dal.rnc"/>
......
......@@ -112,18 +112,21 @@
This property indicates whether the door/cover is open or closed.
Washing machine setting
This property indicates the current stage of the washing cycle.
......@@ -139,6 +142,7 @@
Reservation ON/OFF
......
<?xml version="1.0" encoding="ISO-8859-1"?>
BooleanState is the preferred module for modelling a
functionality corresponding to an underlying binary state. This
module should be used to abstract away from the actual datatype
and values in question. Note that the module does not define whether
the execution mode is blocking or non-blocking.
Obtain the current associated state.
BooleanState is the preferred module for modelling a
functionality corresponding to an underlying binary state. This
module should be used to abstract away from the actual datatype
and values in question. Note that the module does not define whether
the execution mode is blocking or non-blocking.
Obtain the current associated state.
Set the associated state to the specified value.
The desired value of the associated state.
Set the associated state to the specified value.
The desired value of the associated state.
<?xml version="1.0" encoding="ISO-8859-1"?>
PowerSwitch
Telekom Innovation Laboratories
This device is intended as a demonstration of how to use the
abstract modules defined in the HGI Core domain. The
vendor has provided a proprietry module with two operations
on and off. This is clearly a candidate for the
module class BooleanState.
The proprietry interface for turning the switch on and off.
Actions for setting the state to on or off
and for querying the state.
Turn the switch on.
Turn the switch off.
Query the state of the switch. Returns the string "on"
or "off".
An event that indicates the new state of the switch.
This device is intended as a demonstration of how to use the abstract modules defined in the HGI Core domain. The vendor has provided a proprietry module with two operations on and off. This is clearly a candidate for the module class BooleanState.
Original value: PowerSwitch
Original value: Telekom Innovation Laboratories
The proprietry interface for turning the switch on and off. Actions for setting the state to on or offand for querying the state.
Turn the switch on.
Turn the switch off.
Query the state of the switch. Returns the string "on" or "off".
An event that indicates the new state of the switch.
......@@ -16,6 +16,9 @@
Obtain the current associated state.
......@@ -23,7 +26,12 @@
The desired value of the associated state.
The desired value of the associated state.
......@@ -32,6 +40,9 @@
......@@ -47,14 +58,29 @@
Multi Socket Electrical-Extension-Block
HGI
1.0
http://www.homegatewayinitative.org
1234.5
This device is intended as a demonstration of how to define a Root Device with multiple sub-devices.
This device is intended as a demonstration of how to define a Root Device with multiple sub-devices.
Original value: Multi Socket Electrical-Extension-Block
Original value: HGI
Original value: 1.0
Original value: http://www.homegatewayinitative.org
Original value: 1234.5
......@@ -62,23 +88,84 @@
The proprietry interface for turning all switches of the extension block on and off.
The action "BooleanState:get" returns "true" when any of the sub-devices is in the state "on", otherwise it returns "false".
Version for this ModuleClass
Get the power consumption.
This is an example simple data type with a minimum-value constraint.
The value must be equal or greater 0.0
Steps are 0.1
This datapoint represents the firmware version of the extension block.
This datapoint is an array of strings with the names of the contained devices.
......@@ -93,11 +180,15 @@
PowerSwitch 1
HGI
This sub device is intended as a demonstration of how to use the abstract modules defined in the HGI Core domain.
This sub device is intended as a demonstration of how to use the abstract modules defined in the HGI Core domain.
......@@ -110,11 +201,21 @@
PowerSwitch 2
HGI
This sub device is intended as a demonstration of how to use the abstract modules defined in the HGI Core domain.
This sub device is intended as a demonstration of how to use the abstract modules defined in the HGI Core domain.
......
This diff is collapsed.
This diff is collapsed.
......@@ -8,7 +8,7 @@
document ... -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:dal="http://homegatewayinitiative.org/xml/dal/2.0"
xmlns:dal="http://www.onem2m.org/xml/sdt/4.0"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:redirect="http://xml.apache.org/xalan/redirect"
......
......@@ -3,13 +3,13 @@
<!-- Example SDT definition taken from EchonetLite https://github.com/ECHONET-Consortium -->
<Domain xmlns="http://homegatewayinitiative.org/xml/dal/3.0"
<Domain xmlns="http://www.onem2m.org/xml/sdt/4.0"
xmlns:xi="http://www.w3.org/2001/XInclude"
id="example.based.on.echonetLite">
<!-- Various examples for module classes -->
<Modules>
<ModuleClasses>
<ModuleClass name="operationStatus">
<Data>
<DataPoint name="operationStatus" readable="true" writable="true">
......@@ -62,13 +62,13 @@
</DataPoint>
</Data>
</ModuleClass>
</Modules>
</ModuleClasses>
<!-- Very simple example for a washing machine definition -->
<Devices>
<Device id="SimpleWaschingMachine">
<DeviceClasses>
<DeviceClass id="SimpleWaschingMachine">
<Properties>
<Property name="Name" value="washing machine">
<SimpleType type="string" />
......@@ -78,28 +78,28 @@
</Property>
</Properties>
<Modules>
<ModuleClasses>
<!-- Inheriting ModuleClasses from the global generic ModuleClasses -->
<Module name="installationLocation">
<extends domain="example.based.on.echonetLite" class="installationLocation"/>
</Module>
<ModuleClass name="installationLocation">
<Extend domain="example.based.on.echonetLite" entity="installationLocation"/>
</ModuleClass>
<Module name="measuredInstantaneousPowerConsumption">
<extends domain="example.based.on.echonetLite" class="measuredInstantaneousPowerConsumption"/>
</Module>
<ModuleClass name="measuredInstantaneousPowerConsumption">
<Extend domain="example.based.on.echonetLite" entity="measuredInstantaneousPowerConsumption"/>
</ModuleClass>
<Module name="temperatureSensorDataPoints">
<extends domain="example.based.on.echonetLite" class="temperatureSensorDataPoints"/>
</Module>
<ModuleClass name="temperatureSensorDataPoints">
<Extend domain="example.based.on.echonetLite" entity="temperatureSensorDataPoints"/>
</ModuleClass>
<!-- The following Module inherits and extends a global generic ModuleClass with an event. Therefore, it is renamed to express
the change of name. -->
<Module name="washingMachineOperationStatus">
<extends domain="example.based.on.echonetLite" class="operationStatus"/>
<ModuleClass name="washingMachineOperationStatus">
<Extend domain="example.based.on.echonetLite" entity="operationStatus"/>
<!-- This Module extends the global one with an event. -->
......@@ -109,29 +109,32 @@
</Event>
</Events>
</Module>
</ModuleClass>
<!-- Data points local to the washing machine device -->
<Module name="washingMachineDataPoints">
<ModuleClass name="washingMachineDataPoints">
<Data>
<DataPoint name="door/CoverOpen/CloseStatus" readable="true" writable="false">
<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="enum" />
<!-- <SimpleType type="enum" /> -->
<SimpleType type="string" />
</DataType>
</DataPoint>
<DataPoint name="washingMachineSetting" readable="true" writable="true">
<Doc>Washing machine setting</Doc>
<DataType>
<SimpleType type="enum" />
<!-- <SimpleType type="enum" /> -->
<SimpleType 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="enum" />
<!-- <SimpleType type="enum" /> -->
<SimpleType type="string" />
</DataType>
</DataPoint>
<DataPoint name="timeRemainingToCompleteWashingCycle" readable="true" writable="false">
......@@ -149,7 +152,8 @@
<DataPoint name="onTimerReservationSetting" readable="true" writable="true">
<Doc>Reservation ON/OFF</Doc>
<DataType>
<SimpleType type="enum" />
<!-- <SimpleType type="enum" /> -->
<SimpleType type="boolean" />
</DataType>
</DataPoint>
<DataPoint name="onTimerSetting" readable="true" writable="true">
......@@ -166,8 +170,8 @@
</DataPoint>
</Data>
</Module>
</Modules>
</Device>
</Devices>
</ModuleClass>
</ModuleClasses>
</DeviceClass>
</DeviceClasses>
</Domain>
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Test the data types references -->
<Domain id="action-test" xmlns="http://www.onem2m.org/xml/sdt/4.0" xmlns:xi="http://www.w3.org/2001/XInclude">
<ModuleClasses>
<ModuleClass name="TestActions">
<Actions>
<Action name="testActionOptional" optional="true">
</Action>
</Actions>
</ModuleClass>
</ModuleClasses>
</Domain>
\ No newline at end of file
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Test the data types references -->
<Domain id="arg-test" xmlns="http://www.onem2m.org/xml/sdt/4.0" xmlns:xi="http://www.w3.org/2001/XInclude">
<ModuleClasses>
<ModuleClass name="TestArg">
<Actions>
<Action name="testActionOptional">
<Args>
<Arg name="argMandatory">
<DataType>
<SimpleType type="boolean" />
</DataType>
</Arg>
<Arg name="argOptional" optional="true">
<DataType>
<SimpleType type="boolean" />
</DataType>
</Arg>
</Args>
</Action>
<Action name="testActionDefault">
<Args>
<Arg name="arg1" default="true">
<DataType>
<SimpleType type="boolean" />
</DataType>
</Arg>
<Arg name="arg2" default="foo">
<DataType>
<SimpleType type="string" />
</DataType>
</Arg>
</Args>
</Action>
</Actions>
</ModuleClass>
</ModuleClasses>
</Domain>
\ No newline at end of file
<?xml version="1.0" encoding="iso-8859-1"?>
<Domain xmlns="http://homegatewayinitiative.org/xml/dal/3.0"
id="hgi.dal.core">
<Domain xmlns="http://www.onem2m.org/xml/sdt/4.0"
id="dal.core">
<Modules>
<ModuleClasses>
<ModuleClass name="BooleanState">
<Doc>
<tt>BooleanState</tt> is the preferred module for modelling a
......@@ -32,6 +32,6 @@
</Action>
</Actions>
</ModuleClass>
</Modules>
</ModuleClasses>
</Domain>
<?xml version="1.0" encoding="iso-8859-1"?>
<Domain xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns="http://homegatewayinitiative.org/xml/dal/3.0"
id="com.telekom">
<Imports>
<xi:include href="./dal-core.xml" parse="xml" />
</Imports>
<Devices>
<Device id="switch.power">
<Doc>
This device is intended as a demonstration of how to use the
abstract modules defined in the <em>HGI Core</em> domain. The
vendor has provided a proprietry module with two operations
<tt>on</tt> and <tt>off</tt>. This is clearly a candidate for the
module class <tt>BooleanState</tt>.
</Doc>
<Properties>
<Property name="Name">
<Doc>Original value: PowerSwitch</Doc>
<SimpleType type="string" />
</Property>
<!-- The Vendor field should probably be part of the domain -->
<Property name="Vendor">
<Doc>Original value: Telekom Innovation Laboratories</Doc>
<SimpleType type="string" />
</Property>
</Properties>
<Modules>
<Module name="proprietaryPower">
<Doc>
The proprietry interface for turning the switch on and off.
Actions for setting the state to <tt>on</tt> or <tt>off</tt>
and for querying the state.
</Doc>
<Actions>
<Action name="on">
<Doc>
Turn the switch on.
</Doc>
</Action>
<Action name="off">
<Doc>
Turn the switch off.
</Doc>
</Action>
<Action name="state">
<Doc>Query the state of the switch. Returns the string "<tt>on</tt>" or "<tt>off</tt>".</Doc>
<DataType>
<SimpleType type="string" />
</DataType>
</Action>
</Actions>
<Events>
<Event name="switchEvent">
<Doc>An event that indicates the new state of the switch.
</Doc>
<Data>
<DataPoint name="state" writable="false">
<DataType>
<SimpleType type="boolean" />
</DataType>
</DataPoint>
</Data>
</Event>
</Events>
</Module>
<Module name="power">
<extends domain="hgi.dal.core" class="BooleanState"/>
</Module>
</Modules>
</Device>
</Devices>
</Domain>
<Domain id="com.telekom" xmlns="http://www.onem2m.org/xml/sdt/4.0" xmlns:xi="http://www.w3.org/2001/XInclude">
<Imports>
<xi:include href="./dal-core.xml" parse="xml"/>
</Imports>
<DeviceClasses>
<DeviceClass id="switch.power">
<Doc>This device is intended as a demonstration of how to use the abstract modules defined in the <em>HGI Core</em> domain. The vendor has provided a proprietry module with two operations <tt>on</tt> and <tt>off</tt>. This is clearly a candidate for the module class <tt>BooleanState</tt>.</Doc>
<Properties>
<Property name="Name">
<Doc>Original value: PowerSwitch</Doc>
<SimpleType type="string"/>
</Property>
<!-- The Vendor field should probably be part of the domain -->
<Property name="Vendor">
<Doc>Original value: Telekom Innovation Laboratories</Doc>
<SimpleType type="string"/>
</Property>
</Properties>
<ModuleClasses>
<ModuleClass name="proprietaryPower">
<Doc>The proprietry interface for turning the switch on and off. Actions for setting the state to <tt>on</tt> or <tt>off</tt>and for querying the state.</Doc>
<Actions>
<Action name="on">
<Doc>Turn the switch on.</Doc>
</Action>
<Action name="off">
<Doc>Turn the switch off.</Doc>
</Action>
<Action name="state">
<Doc>Query the state of the switch. Returns the string &quot;<tt>on</tt>&quot; or &quot;<tt>off</tt>&quot;.</Doc>
<DataType>
<SimpleType type="string"/>
</DataType>
</Action>
</Actions>
<Events>
<Event name="switchEvent">
<Doc>An event that indicates the new state of the switch.</Doc>
<Data>
<DataPoint name="state" writable="false">
<DataType>
<SimpleType type="boolean"/>
</DataType>
</DataPoint>
</Data>
</Event>
</Events>
</ModuleClass>
<ModuleClass name="power">
<Extend entity="BooleanState" domain="hgi.dal.core"/>
</ModuleClass>
</ModuleClasses>
</DeviceClass>
</DeviceClasses>
</Domain>
\ No newline at end of file
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Test the EnumType -->
<Domain id="datapoint-test" xmlns="http://www.onem2m.org/xml/sdt/4.0" xmlns:xi="http://www.w3.org/2001/XInclude">
<ModuleClasses>
<ModuleClass name="TestDataPoint">
<Data>
<DataPoint name="TestDataPoint" optional="true" default="foo">
<DataType>
<SimpleType type="string" />
</DataType>
</DataPoint>
</Data>
</ModuleClass>
</ModuleClasses>
</Domain>
\ No newline at end of file
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Test the data types references -->
<Domain id="datatypes-test" xmlns="http://www.onem2m.org/xml/sdt/4.0" xmlns:xi="http://www.w3.org/2001/XInclude">
<DataTypes>
<DataType name="temperatureType" unitOfMeasure="C">
<SimpleType type="float"/>
</DataType>
<DataType name="anEnumType">
<Enum>
<EnumValue name="red" type="integer" value="1"/>
<EnumValue name="green" value="2"/>
<EnumValue name="blue" value="3"/>
</Enum>
</DataType>
</DataTypes>
<ModuleClasses>
<ModuleClass name="TestDataTypes">
<Data>
<DataPoint name="TestDataPoint" writable="true">
<DataType>
<Extend domain="datatypes-test" entity="temperatureType" />
</DataType>
</DataPoint>
</Data>
</ModuleClass>
</ModuleClasses>
</Domain>
\ No newline at end of file
<?xml version="1.0" encoding="iso-8859-1"?>
<Domain xmlns="http://www.onem2m.org/xml/sdt/4.0" xmlns:xi="http://www.w3.org/2001/XInclude" id="deviceClass.test" >
<Imports>
<xi:include href="./dal-core.xml" parse="xml"/>
</Imports>
<DeviceClasses>
<DeviceClass id="Test">
<Doc>This is a test device.</Doc>
<Properties>
<Property name="aProperty">
<SimpleType type="string"></SimpleType>
</Property>
</Properties>
<ModuleClasses>
<ModuleClass name="aModuleClass">
<Extend domain="hgi.dal.core" entity="BooleanState" />
</ModuleClass>
</ModuleClasses>
</DeviceClass>
</DeviceClasses>
</Domain>
\ No newline at end of file
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Test the EnumType -->
<Domain id="enumtype-test" xmlns="http://www.onem2m.org/xml/sdt/4.0" xmlns:xi="http://www.w3.org/2001/XInclude">
<ModuleClasses>
<ModuleClass name="TestEnumType">
<Data>
<DataPoint name="TestEnumTypeDataPoint" writable="true">
<DataType>
<Enum>
<EnumValue name="red" value="1" type="integer" />
<EnumValue name="green" value="2" />
<EnumValue name="blue" value="3" />
</Enum>
</DataType>
</DataPoint>
</Data>
</ModuleClass>
</ModuleClasses>
</Domain>
\ No newline at end of file
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Example1 SDT inspired by some Echonet Lite examples -->
<Domain xmlns="http://homegatewayinitiative.org/xml/dal/3.0"
<Domain xmlns="http://www.onem2m.org/xml/sdt/4.0"
xmlns:xi="http://www.w3.org/2001/XInclude"
id="example1.SDT">
<Modules>
<ModuleClasses>
<!-- Various examples for module classes -->
<ModuleClass name="operationStatus">
......@@ -70,6 +70,6 @@
</Data>
</ModuleClass>
</Modules>
</ModuleClasses>
</Domain>
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Example1 SDT inspired by some Echonet Lite examples -->
<Domain xmlns="http://homegatewayinitiative.org/xml/dal/3.0"
<Domain xmlns="http://www.onem2m.org/xml/sdt/4.0"
xmlns:xi="http://www.w3.org/2001/XInclude"
id="example2.SDT">
......@@ -8,25 +8,25 @@
<xi:include href="./example1.SDT.xml" parse="xml" />
</Imports>
<Devices>
<Device id="airConditioner">
<Modules>
<Module name="operationStatus">
<extends domain="example1.SDT" class="operationStatus"/>
</Module>
<Module name="installationLocation">
<extends domain="example1.SDT" class="installationLocation"/>
</Module>
<Module name="measuredCumulativePowerConsumption">
<extends domain="example1.SDT" class="measuredCumulativePowerConsumption"/>
</Module>
<Module name="measuredCumulativePowerConsumption">
<extends domain="example1.SDT" class="measuredCumulativePowerConsumption"/>
</Module>
<Module name="onTimerSetting">
<extends domain="example1.SDT" class="onTimerSetting"/>
</Module>
</Modules>
</Device>
</Devices>
<DeviceClasses>
<DeviceClass id="airConditioner">
<ModuleClasses>
<ModuleClass name="operationStatus">
<Extend domain="example1.SDT" entity="operationStatus"/>
</ModuleClass>
<ModuleClass name="installationLocation">
<Extend domain="example1.SDT" entity="installationLocation"/>
</ModuleClass>
<ModuleClass name="measuredCumulativePowerConsumption">
<Extend domain="example1.SDT" entity="measuredCumulativePowerConsumption"/>
</ModuleClass>
<ModuleClass name="measuredCumulativePowerConsumption">
<Extend domain="example1.SDT" entity="measuredCumulativePowerConsumption"/>
</ModuleClass>
<ModuleClass name="onTimerSetting">
<Extend domain="example1.SDT" entity="onTimerSetting"/>
</ModuleClass>
</ModuleClasses>
</DeviceClass>
</DeviceClasses>
</Domain>
\ No newline at end of file
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Example1 SDT inspired by some Echonet Lite examples -->
<Domain xmlns="http://homegatewayinitiative.org/xml/dal/3.0"
<Domain xmlns="http://www.onem2m.org/xml/sdt/4.0"
xmlns:xi="http://www.w3.org/2001/XInclude"
id="example3.SDT">
......@@ -8,28 +8,28 @@
<xi:include href="./example1.SDT.xml" parse="xml" />
</Imports>
<Devices>
<Device id="waschingMachine">
<Modules>
<Module name="operationStatus">
<extends domain="example1.SDT" class="operationStatus"/>
</Module>
<Module name="installationLocation">
<extends domain="example1.SDT" class="installationLocation"/>
</Module>
<Module name="measuredCumulativePowerConsumption">
<extends domain="example1.SDT" class="measuredCumulativePowerConsumption"/>
</Module>
<Module name="measuredCumulativePowerConsumption">
<extends domain="example1.SDT" class="measuredCumulativePowerConsumption"/>
</Module>
<Module name="onTimerSetting">
<extends domain="example1.SDT" class="onTimerSetting"/>
</Module>
<Module name="statusDoor">
<extends domain="example1.SDT" class="statusDoor"/>
</Module>
</Modules>
</Device>
</Devices>
<DeviceClasses>
<DeviceClass id="waschingMachine">
<ModuleClasses>
<ModuleClass name="operationStatus">
<Extend domain="example1.SDT" entity="operationStatus"/>
</ModuleClass>
<ModuleClass name="installationLocation">
<Extend domain="example1.SDT" entity="installationLocation"/>
</ModuleClass>
<ModuleClass name="measuredCumulativePowerConsumption">
<Extend domain="example1.SDT" entity="measuredCumulativePowerConsumption"/>
</ModuleClass>
<ModuleClass name="measuredCumulativePowerConsumption">
<Extend domain="example1.SDT" entity="measuredCumulativePowerConsumption"/>
</ModuleClass>
<ModuleClass name="onTimerSetting">
<Extend domain="example1.SDT" entity="onTimerSetting"/>
</ModuleClass>
<ModuleClass name="statusDoor">
<Extend domain="example1.SDT" entity="statusDoor"/>
</ModuleClass>
</ModuleClasses>
</DeviceClass>
</DeviceClasses>
</Domain>
\ No newline at end of file
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Test the extends element -->
<Domain id="extend-test" xmlns="http://www.onem2m.org/xml/sdt/4.0" xmlns:xi="http://www.w3.org/2001/XInclude">
<ModuleClasses>
<ModuleClass name="TestExtendsParent">
<Data>
<DataPoint name="TestExtendsDataPoint1" writable="true">
<DataType>
<SimpleType type="integer" />
</DataType>
</DataPoint>
<DataPoint name="TestExtendsDataPoint2" writable="true">
<DataType>
<SimpleType type="integer" />
</DataType>
</DataPoint>
</Data>
</ModuleClass>
<ModuleClass name="TestExtendsChild">
<Extend domain="extend-test" entity="TestExtendsParent">
<Exclude name="TestExtendsDataPoint2" type="datapoint" />
</Extend>
<Data>
<DataPoint name="TestExtendsDataPoint3" writable="true">
<DataType>
<SimpleType type="integer" />
</DataType>
</DataPoint>
</Data>
</ModuleClass>
</ModuleClasses>
</Domain>
\ No newline at end of file
......@@ -5,7 +5,7 @@
<!--
+................................................+
:Domain:org.homegatewayinitiative :
:Domain:org.onem2m :
: :
: +..........................................+ :
: :Module:BooleanState : :
......@@ -62,8 +62,8 @@
-->
<Domain xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns="http://homegatewayinitiative.org/xml/dal/3.0"
id="org.homegatewayinitiative">
xmlns="http://www.onem2m.org/xml/sdt/4.0"
id="org.onem2m">
<!-- The following import statements include ModuleClasses from HGI -->
......@@ -71,7 +71,7 @@
<xi:include href="./dal-core.xml" parse="xml" />
</Imports>
<Modules>
<ModuleClasses>
<ModuleClass name="BooleanState">
<Doc>
<tt>BooleanState</tt> is the preferred module for modelling a functionality corresponding to an underlying binary state.This module should be used to abstract away from the actual datatype and values in question. Note that the module does not define whether the execution mode is blocking or non-blocking.
......@@ -113,15 +113,15 @@
</Event>
</Events>
</ModuleClass>
</Modules>
</ModuleClasses>
<!-- Definition of the Device starts here. -->
<Devices>
<DeviceClasses>
<!-- The Device contains several sub-devices and offers one action on its own. -->
<Device id="MSEEB.root">
<DeviceClass id="MSEEB.root">
<Doc>
This device is intended as a demonstration of how to define a Root Device with multiple sub-devices.
</Doc>
......@@ -139,7 +139,7 @@
<SimpleType type="string" />
</Property>
<Property name="VendorURL">
<Doc>Original value: http://www.homegatewayinitative.org</Doc>
<Doc>Original value: http://www.onem2m.org</Doc>
<SimpleType type="uri" />
</Property>
<Property name="SerialNumber">
......@@ -153,21 +153,21 @@
- A module with some data points for the firmware version of the whole device and a list of names of the containted power switches.
-->
<Modules>
<Module name="rootPowerOnOff" optional="true">
<extends domain="hgi.dal.core" class="BooleanState"/>
<ModuleClasses>
<ModuleClass name="rootPowerOnOff" optional="true">
<Doc>
The proprietry interface for turning all switches of the extension block on and off.
The action "BooleanState:get" returns "true" when any of the sub-devices is in the state "on", otherwise it returns "false".
</Doc>
<Extend domain="hgi.dal.core" entity="BooleanState"/>
<Properties>
<Property name="version" value="1.0.0">
<Doc>Version for this ModuleClass</Doc>
<SimpleType type="string" />
</Property>
</Properties>
</Module>
<Module name="power">
</ModuleClass>
<ModuleClass name="power">
<Actions>
<Action name="getPowerConsumption">
<Doc>Get the power consumption.</Doc>
......@@ -200,9 +200,9 @@
</DataType>
</Action>
</Actions>
</Module>
</ModuleClass>
<Module name="extensionBlockDataPoints">
<ModuleClass name="extensionBlockDataPoints">
<Actions>
<Action name="getNames">
<DataType name="names">
......@@ -241,8 +241,8 @@
</DataType>
</DataPoint>
</Data>
</Module>
</Modules>
</ModuleClass>
</ModuleClasses>
<!-- Definition of sub-devices starts here. -->
......@@ -263,11 +263,11 @@
<SimpleType type="string" />
</Property>
</Properties>
<Modules>
<Module name="power">
<extends domain="hgi.dal.core" class="BooleanState"/>
</Module>
</Modules>
<ModuleClasses>
<ModuleClass name="power">
<Extend domain="hgi.dal.core" entity="BooleanState"/>
</ModuleClass>
</ModuleClasses>
</SubDevice>
<!-- This is the second power switch of the extension block. -->
......@@ -283,22 +283,22 @@
<Property name="Vendor" value="HGI">
<SimpleType type="string" />
</Property>
<Property name="VendorURL" value="http://homegatwaysinitiative.org">
<Property name="VendorURL" value="http://www.onem2m.org">
<SimpleType type="uri" />
</Property>
<Property name="maximumAltitude" value="2800">
<SimpleType type="integer" />
</Property>
</Properties>
<Modules>
<Module name="power">
<extends domain="hgi.dal.core" class="BooleanState"/>
</Module>
</Modules>
<ModuleClasses>
<ModuleClass name="power">
<Extend domain="hgi.dal.core" entity="BooleanState"/>
</ModuleClass>
</ModuleClasses>
</SubDevice>
</SubDevices>
</Device>
</Devices>
</DeviceClass>
</DeviceClasses>
</Domain>
<?xml version="1.0" encoding="iso-8859-1"?>
<Domain xmlns="http://www.onem2m.org/xml/sdt/4.0" xmlns:xi="http://www.w3.org/2001/XInclude" id="productClass-test" >
<ProductClasses>
<ProductClass id="TestProductClass" semanticURI="http://example.com/TestProduct.rdf">
<Doc>This is a test product</Doc>
<Properties>
<Property name="aProperty">
<SimpleType type="string"></SimpleType>
</Property>
</Properties>
<ModuleClasses>
<ModuleClass name="aModuleClass">
<Extend domain="hgi.dal.core" entity="BooleanState" />
</ModuleClass>
</ModuleClasses>
<SubDevices>
<SubDevice id="aSubDevice">
<ModuleClasses>
<ModuleClass name="aSubDeviceModuleClass">
<Extend domain="hgi.dal.core" entity="BooleanState"/>
</ModuleClass>
</ModuleClasses>
</SubDevice>
</SubDevices>
<DeviceClass>
<Extend domain="deviceClass.test" entity="Test" />
</DeviceClass>
</ProductClass>
<!-- Derived ProductClass -->
<ProductClass id="DerivedProductClass" semanticURI="http://example.com/DerivedProduct.rdf">
<Extend domain="productClass.test" entity="TestProductClass" />
<ModuleClasses>
<ModuleClass name="anotherModuleClass">
<Extend domain="hgi.dal.core" entity="BooleanState" />
</ModuleClass>
</ModuleClasses>
</ProductClass>
</ProductClasses>
</Domain>
\ No newline at end of file
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Test the data types references -->
<Domain id="semanticURI-test" xmlns="http://www.onem2m.org/xml/sdt/4.0" xmlns:xi="http://www.w3.org/2001/XInclude" semanticURI="http://example.com/semanticURI-test.rdf">
<DataTypes>
<DataType name="temperatureType" unitOfMeasure="C" semanticURI="http://example.com/temperatureType.rdf">
<SimpleType type="float"/>
</DataType>
<DataType name="anEnumType" semanticURI="http://example.com/anEnumType.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"/>
</Enum>
</DataType>
</DataTypes>
<ModuleClasses>
<ModuleClass name="TestDataTypes" semanticURI="http://example.com/TestDataTypes.rdf">
<Data>
<DataPoint name="TestDataPoint" writable="true" semanticURI="http://example.com/TestDataPoint.rdf">
<DataType>
<Extend domain="datatypes-test" entity="temperatureType" />
</DataType>
</DataPoint>
</Data>
</ModuleClass>
</ModuleClasses>
</Domain>
\ No newline at end of file
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Test the void BasicType -->
<Domain id="void-test" xmlns="http://www.onem2m.org/xml/sdt/4.0" xmlns:xi="http://www.w3.org/2001/XInclude">
<ModuleClasses>
<ModuleClass name="TestVoid">
<Actions>
<Action name="TestVoidAction">
<DataType>
<SimpleType type="void"/>
</DataType>
</Action>
</Actions>
<Data>
<DataPoint name="TestVoidDataPoint" writable="true">
<DataType>
<SimpleType type="void"/>
</DataType>
</DataPoint>
</Data>
</ModuleClass>
</ModuleClasses>
</Domain>
\ No newline at end of file