Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
SDT
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
16
Issues
16
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MAS
SDT
Commits
0533e668
Commit
0533e668
authored
Oct 16, 2015
by
ankraft
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added another constraint example
parent
bcbcaab4
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
59 additions
and
56 deletions
+59
-56
domain.rnc
SDT/schema3.0/etc/domain.rnc
+6
-6
domain.rng
SDT/schema3.0/src/domain.rng
+6
-6
domain.xsd
SDT/schema3.0/src/domain.xsd
+6
-6
dal-eg.xml
SDT/schema3.0/test/dal-eg.xml
+6
-6
mseeb.xml
SDT/schema3.0/test/mseeb.xml
+35
-32
No files found.
SDT/schema3.0/etc/domain.rnc
View file @
0533e668
...
...
@@ -12,22 +12,22 @@ Domain =
element Device {
attribute id { xsd:Name },
DocDef,
Characteristic
sDef?,
Propertie
sDef?,
Modules?,
element SubDevices {
element SubDevice {
attribute id { xsd:Name },
DocDef,
Characteristic
sDef?,
Propertie
sDef?,
Modules?
}+
}?
}+
}?
}
Characteristic
sDef =
element
Characteristic
s {
element
Characteristic
{
Propertie
sDef =
element
Propertie
s {
element
Property
{
attribute name { text },
attribute optional { xsd:boolean }?,
attribute value { text }?,
...
...
@@ -94,7 +94,7 @@ ModuleDef =
attribute class { text }
}?,
DocDef,
Characteristic
sDef?,
Propertie
sDef?,
Actions?,
Data?,
Events?
...
...
SDT/schema3.0/src/domain.rng
View file @
0533e668
...
...
@@ -43,7 +43,7 @@
</attribute>
<ref name="DocDef"/>
<optional>
<ref name="
Characteristic
sDef"/>
<ref name="
Propertie
sDef"/>
</optional>
<optional>
<ref name="Modules"/>
...
...
@@ -57,7 +57,7 @@
</attribute>
<ref name="DocDef"/>
<optional>
<ref name="
Characteristic
sDef"/>
<ref name="
Propertie
sDef"/>
</optional>
<optional>
<ref name="Modules"/>
...
...
@@ -74,10 +74,10 @@
</define>
<define name="
Characteristic
sDef">
<element name="
Characteristic
s">
<define name="
Propertie
sDef">
<element name="
Propertie
s">
<oneOrMore>
<element name="
Characteristic
">
<element name="
Property
">
<attribute name="name">
<text/>
</attribute>
...
...
@@ -252,7 +252,7 @@
</optional>
<ref name="DocDef"/>
<optional>
<ref name="
Characteristic
sDef"/>
<ref name="
Propertie
sDef"/>
</optional>
<optional>
<ref name="Actions"/>
...
...
SDT/schema3.0/src/domain.xsd
View file @
0533e668
...
...
@@ -42,7 +42,7 @@
<xs:complexType>
<xs:sequence>
<xs:group
ref=
"DocDef"
/>
<xs:element
minOccurs=
"0"
ref=
"
Characteristic
s"
/>
<xs:element
minOccurs=
"0"
ref=
"
Propertie
s"
/>
<xs:element
minOccurs=
"0"
ref=
"Modules"
/>
<xs:element
minOccurs=
"0"
ref=
"SubDevices"
/>
</xs:sequence>
...
...
@@ -60,20 +60,20 @@
<xs:complexType>
<xs:sequence>
<xs:group
ref=
"DocDef"
/>
<xs:element
minOccurs=
"0"
ref=
"
Characteristic
s"
/>
<xs:element
minOccurs=
"0"
ref=
"
Propertie
s"
/>
<xs:element
minOccurs=
"0"
ref=
"Modules"
/>
</xs:sequence>
<xs:attribute
name=
"id"
use=
"required"
type=
"xs:Name"
/>
</xs:complexType>
</xs:element>
<xs:element
name=
"
Characteristic
s"
>
<xs:element
name=
"
Propertie
s"
>
<xs:complexType>
<xs:sequence>
<xs:element
maxOccurs=
"unbounded"
ref=
"
Characteristic
"
/>
<xs:element
maxOccurs=
"unbounded"
ref=
"
Property
"
/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element
name=
"
Characteristic
"
>
<xs:element
name=
"
Property
"
>
<xs:complexType>
<xs:sequence>
<xs:group
ref=
"DocDef"
/>
...
...
@@ -196,7 +196,7 @@
<xs:sequence>
<xs:element
minOccurs=
"0"
ref=
"extends"
/>
<xs:group
ref=
"DocDef"
/>
<xs:element
minOccurs=
"0"
ref=
"
Characteristic
s"
/>
<xs:element
minOccurs=
"0"
ref=
"
Propertie
s"
/>
<xs:element
minOccurs=
"0"
ref=
"Actions"
/>
<xs:element
minOccurs=
"0"
ref=
"Data"
/>
<xs:element
minOccurs=
"0"
ref=
"Events"
/>
...
...
SDT/schema3.0/test/dal-eg.xml
View file @
0533e668
...
...
@@ -19,18 +19,18 @@
<tt>
on
</tt>
and
<tt>
off
</tt>
. This is clearly a candidate for the
module class
<tt>
BooleanState
</tt>
.
</Doc>
<
Characteristic
s>
<
Characteristic
name=
"Name"
>
<
Propertie
s>
<
Property
name=
"Name"
>
<Doc>
Original value: PowerSwitch
</Doc>
<SimpleType
type=
"string"
/>
</
Characteristic
>
</
Property
>
<!-- The Vendor field should probably be part of the domain -->
<
Characteristic
name=
"Vendor"
>
<
Property
name=
"Vendor"
>
<Doc>
Original value: Telekom Innovation Laboratories
</Doc>
<SimpleType
type=
"string"
/>
</
Characteristic
>
</
Characteristic
s>
</
Property
>
</
Propertie
s>
<Modules>
<Module
name=
"proprietaryPower"
>
...
...
SDT/schema3.0/test/mseeb.xml
View file @
0533e668
...
...
@@ -125,28 +125,28 @@
<Doc>
This device is intended as a demonstration of how to define a Root Device with multiple sub-devices.
</Doc>
<
Characteristic
s>
<
Characteristic
name=
"Name"
>
<
Propertie
s>
<
Property
name=
"Name"
>
<Doc>
Original value: Multi Socket Electrical-Extension-Block
</Doc>
<SimpleType
type=
"string"
/>
</
Characteristic
>
<
Characteristic
name=
"Vendor"
>
</
Property
>
<
Property
name=
"Vendor"
>
<Doc>
Original value: HGI
</Doc>
<SimpleType
type=
"string"
/>
</
Characteristic
>
<
Characteristic
name=
"FirmwareVersion"
>
</
Property
>
<
Property
name=
"FirmwareVersion"
>
<Doc>
Original value: 1.0
</Doc>
<SimpleType
type=
"string"
/>
</
Characteristic
>
<
Characteristic
name=
"VendorURL"
>
</
Property
>
<
Property
name=
"VendorURL"
>
<Doc>
Original value: http://www.homegatewayinitative.org
</Doc>
<SimpleType
type=
"uri"
/>
</
Characteristic
>
<
Characteristic
name=
"SerialNumber"
>
</
Property
>
<
Property
name=
"SerialNumber"
>
<Doc>
Original value: 1234.5
</Doc>
<SimpleType
type=
"string"
/>
</
Characteristic
>
</
Characteristic
s>
</
Property
>
</
Propertie
s>
<!-- These are the modules for the device:
- Switch on/off all contained switches. It inherits from hgi.dal.core.BooleanState.
...
...
@@ -160,12 +160,12 @@
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>
<
Characteristic
s>
<
Characteristic
name=
"version"
value=
"1.0.0"
>
<
Propertie
s>
<
Property
name=
"version"
value=
"1.0.0"
>
<Doc>
Version for this ModuleClass
</Doc>
<SimpleType
type=
"string"
/>
</
Characteristic
>
</
Characteristic
s>
</
Property
>
</
Propertie
s>
</Module>
<Module
name=
"power"
>
<Actions>
...
...
@@ -182,6 +182,9 @@
<Constraint
name=
"minValue"
type=
"float"
value=
"0.0"
>
<Doc>
The value must be equal or greater 0.0
</Doc>
</Constraint>
<Constraint
name=
"step"
type=
"float"
value=
"0.1"
>
<Doc>
Steps are 0.1
</Doc>
</Constraint>
</Constraints>
</DataType>
</Array>
...
...
@@ -252,14 +255,14 @@
<Doc>
This sub device is intended as a demonstration of how to use the abstract modules defined in the
<em>
HGI Core
</em>
domain.
</Doc>
<
Characteristic
s>
<
Characteristic
name=
"Name"
value=
"PowerSwitch 1"
>
<
Propertie
s>
<
Property
name=
"Name"
value=
"PowerSwitch 1"
>
<SimpleType
type=
"string"
/>
</
Characteristic
>
<
Characteristic
name=
"Vendor"
value=
"HGI"
>
</
Property
>
<
Property
name=
"Vendor"
value=
"HGI"
>
<SimpleType
type=
"string"
/>
</
Characteristic
>
</
Characteristic
s>
</
Property
>
</
Propertie
s>
<Modules>
<Module
name=
"power"
>
<extends
domain=
"hgi.dal.core"
class=
"BooleanState"
/>
...
...
@@ -273,20 +276,20 @@
<Doc>
This sub device is intended as a demonstration of how to use the abstract modules defined in the
<em>
HGI Core
</em>
domain.
</Doc>
<
Characteristic
s>
<
Characteristic
name=
"Name"
value=
"PowerSwitch 2"
>
<
Propertie
s>
<
Property
name=
"Name"
value=
"PowerSwitch 2"
>
<SimpleType
type=
"string"
/>
</
Characteristic
>
<
Characteristic
name=
"Vendor"
value=
"HGI"
>
</
Property
>
<
Property
name=
"Vendor"
value=
"HGI"
>
<SimpleType
type=
"string"
/>
</
Characteristic
>
<
Characteristic
name=
"VendorURL"
value=
"http://homegatwaysinitiative.org"
>
</
Property
>
<
Property
name=
"VendorURL"
value=
"http://homegatwaysinitiative.org"
>
<SimpleType
type=
"uri"
/>
</
Characteristic
>
<
Characteristic
name=
"maximumAltitude"
value=
"2800"
>
</
Property
>
<
Property
name=
"maximumAltitude"
value=
"2800"
>
<SimpleType
type=
"integer"
/>
</
Characteristic
>
</
Characteristic
s>
</
Property
>
</
Propertie
s>
<Modules>
<Module
name=
"power"
>
<extends
domain=
"hgi.dal.core"
class=
"BooleanState"
/>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment