summaryrefslogtreecommitdiff
path: root/ebus-xml
diff options
context:
space:
mode:
authoryvesf <yvesf-git@xapek.org>2011-06-25 17:14:10 +0200
committeryvesf <yvesf-git@xapek.org>2011-06-25 17:14:10 +0200
commit1ccc6292abd33742cd615f1094e23dfdbe6a37f4 (patch)
tree608280a0580cf75dee69e9d4b4deb6c6fb0bea89 /ebus-xml
parenta85541d9f7622813ec98bf042164414edc1fb366 (diff)
downloadebus-alt-1ccc6292abd33742cd615f1094e23dfdbe6a37f4.tar.gz
ebus-alt-1ccc6292abd33742cd615f1094e23dfdbe6a37f4.zip
ebus-xml
Diffstat (limited to 'ebus-xml')
-rw-r--r--ebus-xml/.project11
-rw-r--r--ebus-xml/ebus-0.1.xsd158
-rw-r--r--ebus-xml/ebus.xml257
-rw-r--r--ebus-xml/transform/ebus.html.xslt112
-rw-r--r--ebus-xml/transform/ebus.txt.xslt49
5 files changed, 587 insertions, 0 deletions
diff --git a/ebus-xml/.project b/ebus-xml/.project
new file mode 100644
index 0000000..533290a
--- /dev/null
+++ b/ebus-xml/.project
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>ebus-xml</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ </buildSpec>
+ <natures>
+ </natures>
+</projectDescription>
diff --git a/ebus-xml/ebus-0.1.xsd b/ebus-xml/ebus-0.1.xsd
new file mode 100644
index 0000000..19895a8
--- /dev/null
+++ b/ebus-xml/ebus-0.1.xsd
@@ -0,0 +1,158 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://xapek.org/ebus/0.1"
+ xmlns:tns="http://xapek.org/ebus/0.1" elementFormDefault="qualified">
+ <element name="ebus">
+ <complexType>
+ <sequence>
+ <element name="devices">
+ <complexType>
+ <sequence minOccurs="0">
+ <element name="device" type="tns:DEVICE"
+ maxOccurs="unbounded" />
+ </sequence>
+ </complexType>
+ </element>
+ <element name="packets">
+ <complexType>
+ <sequence minOccurs="0">
+ <element name="packet" type="tns:PACKET"
+ maxOccurs="unbounded" />
+ </sequence>
+ </complexType>
+ </element>
+ </sequence>
+ </complexType>
+ </element>
+
+ <complexType name="DEVICE">
+ <annotation>
+ <documentation xml:lang="en">
+ Example: &gt;device
+ address="#x10" type="master"
+ name="heizkreisregler1"&lt;Heizkreisregler 2&gt;/device&lt;
+ </documentation>
+ </annotation>
+ <sequence>
+ <element name="description" type="tns:DESCRIPTION"
+ minOccurs="0" maxOccurs="unbounded" />
+ </sequence>
+ <attribute name="address" type="hexBinary" use="required" />
+ <attribute name="type" type="string" use="required" />
+ <attribute name="name" type="string" use="required" />
+ </complexType>
+
+ <complexType name="PACKET">
+ <annotation>
+ <documentation xml:lang="en">TODO</documentation>
+ </annotation>
+ <sequence>
+ <element name="description" type="tns:DESCRIPTION"
+ minOccurs="0" maxOccurs="unbounded" />
+ <element name="fields" type="tns:FIELDS" minOccurs="1"
+ maxOccurs="1" />
+ </sequence>
+ <attribute name="primary" type="hexBinary" use="required" />
+ <attribute name="secondary" type="hexBinary" use="required" />
+ <attribute name="name" type="string" use="required" />
+ </complexType>
+
+ <complexType name="DESCRIPTION">
+ <simpleContent>
+ <extension base="string">
+ <attribute name="lang" type="string" use="required" />
+ </extension>
+ </simpleContent>
+ </complexType>
+
+ <complexType name="FIELDS">
+ <choice minOccurs="0" maxOccurs="unbounded">
+ <element name="byte" type="tns:FIELD_BYTE" />
+ <element name="data1b" type="tns:FIELD_DATA1B"></element>
+ <element name="data1c" type="tns:FIELD_DATA1C"></element>
+ <element name="bcd" type="tns:FIELD_BCD"></element>
+ <element name="data2b" type="tns:FIELD_DATA2B"></element>
+ <element name="data2c" type="tns:FIELD_DATA2C"></element>
+ <element name="word" type="tns:FIELD_WORD"></element>
+ <element name="bit" type="tns:FIELD_BIT"></element>
+ <element name="byteEnum" type="tns:FIELD_BYTE_ENUM" />
+ </choice>
+ </complexType>
+
+ <complexType name="FIELD_BASE_TYPE">
+ <sequence>
+ <element name="description" type="tns:DESCRIPTION"
+ minOccurs="0" maxOccurs="unbounded" />
+ </sequence>
+ <attribute name="offset" type="int" use="required" />
+ <attribute name="name" type="string" use="required" />
+ </complexType>
+
+
+
+ <complexType name="FIELD_BYTE" final="#all">
+ <complexContent>
+ <extension base="tns:FIELD_BASE_TYPE"></extension>
+ </complexContent>
+ </complexType>
+
+ <complexType name="FIELD_DATA1B">
+ <complexContent>
+ <extension base="tns:FIELD_BASE_TYPE"></extension>
+ </complexContent>
+ </complexType>
+
+ <complexType name="FIELD_DATA1C">
+ <complexContent>
+ <extension base="tns:FIELD_BASE_TYPE"></extension>
+ </complexContent>
+ </complexType>
+
+ <complexType name="FIELD_BCD">
+ <complexContent>
+ <extension base="tns:FIELD_BASE_TYPE"></extension>
+ </complexContent>
+ </complexType>
+
+ <complexType name="FIELD_DATA2B">
+ <complexContent>
+ <extension base="tns:FIELD_BASE_TYPE"></extension>
+ </complexContent>
+ </complexType>
+
+ <complexType name="FIELD_DATA2C">
+ <complexContent>
+ <extension base="tns:FIELD_BASE_TYPE"></extension>
+ </complexContent>
+ </complexType>
+
+ <complexType name="FIELD_WORD">
+ <complexContent>
+ <extension base="tns:FIELD_BASE_TYPE"></extension>
+ </complexContent>
+ </complexType>
+
+ <complexType name="FIELD_BIT">
+ <complexContent>
+ <extension base="tns:FIELD_BASE_TYPE"></extension>
+ </complexContent>
+ </complexType>
+
+ <complexType name="FIELD_BYTE_ENUM" final="#all">
+ <complexContent>
+ <extension base="tns:FIELD_BASE_TYPE">
+ <sequence>
+ <element name="option" minOccurs="1" maxOccurs="unbounded">
+ <complexType>
+ <sequence>
+ <element name="description" type="tns:DESCRIPTION"
+ minOccurs="0" maxOccurs="unbounded" />
+ </sequence>
+ <attribute name="value" type="hexBinary" use="required"></attribute>
+ <attribute name="name" type="string" use="required"></attribute>
+ </complexType>
+ </element>
+ </sequence>
+ </extension>
+ </complexContent>
+ </complexType>
+</schema>
diff --git a/ebus-xml/ebus.xml b/ebus-xml/ebus.xml
new file mode 100644
index 0000000..5b7f1f0
--- /dev/null
+++ b/ebus-xml/ebus.xml
@@ -0,0 +1,257 @@
+<?xml version="1.0" standalone="yes"?>
+<!-- Ebus Paketspezifikation. https://xapek.org/ -->
+<ebus xmlns="http://xapek.org/ebus/0.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://xapek.org/ebus/0.1 ebus-0.1.xsd">
+ <devices>
+ <device address="00" type="master" name="pcModem">
+ <description lang="de">PC oder Modem</description>
+ </device>
+ <device address="03" type="master" name="feuerungsautomat1">
+ <description lang="de">Feuerungsautomat 1</description>
+ </device>
+ <device address="0f" type="master" name="rcClockModel">
+ <description lang="de">RC-Clock Model</description>
+ </device>
+ <device address="07" type="master" name="unknown">
+ <description lang="de">Unbekannt</description>
+ </device>
+ <device address="10" type="master" name="heizkreisregler2">
+ <description lang="de">Heizkreisregler 2</description>
+ </device>
+ <device address="11" type="master" name="busInterface1">
+ <description lang="de">Bus Interface 1</description>
+ </device>
+ <device address="13" type="master" name="feuerungsautomat2">
+ <description lang="de">Feuerungsautomat 2</description>
+ </device>
+ <device address="30" type="master" name="heizkreisregler1">
+ <description lang="de">Heizkreisregler 1</description>
+ </device>
+ <device address="31" type="master" name="busInterface2">
+ <description lang="de">Bus Interface 2</description>
+ </device>
+ <device address="33" type="master" name="feuerungsautomat3">
+ <description lang="de">Feuerungsautomat 3</description>
+ </device>
+ <device address="70" type="master" name="heizkreisregler2">
+ <description lang="de">Heizkreisregler 2</description>
+ </device>
+ <device address="71" type="master" name="heizkreisregler9">
+ <description lang="de">Heizkreisregler 9</description>
+ </device>
+ <device address="73" type="master" name="feuerungsautomat4">
+ <description lang="de">Feuerungsautomat 4</description>
+ </device>
+ <device address="f1" type="master" name="heizkreisregler10">
+ <description lang="de">Heizkreisregler 10</description>
+ </device>
+ <device address="50" type="slave" name="mischer1">
+ <description lang="de">Mischer 1</description>
+ </device>
+ <device address="51" type="slave" name="mischer2">
+ <description lang="de">Mischer 2</description>
+ </device>
+ <device address="90" type="slave" name="fernsteller1">
+ <description lang="de">Raumgeräte/Fernsteller 1</description>
+ </device>
+ <device address="91" type="slave" name="fernsteller2">
+ <description lang="de">Raumgeräte/Fernsteller 2</description>
+ </device>
+ <device address="f0" type="master" name="heizkreisregler3">
+ <description lang="de">Heizkreisregler 3</description>
+ </device>
+ <device address="f3" type="master" name="feuerungsautomat5">
+ <description lang="de">Feuerungsautomat 5</description>
+ </device>
+ <device address="fe" type="broadcast" name="broadcast">
+ <description lang="de">Broadcast-Adresse</description>
+ </device>
+ <device address="ff" type="master" name="pc">
+ <description lang="de">PC</description>
+ </device>
+ </devices>
+ <packets>
+ <packet primary="05" secondary="03" name="betriebsdatenRegler1">
+ <description lang="de">Betriebsdaten des Feuerungsautomaten an den Regler Block1</description>
+ <fields>
+ <byte offset="3" name="stellgradKesselleistung">
+ <description lang="de">Stellgrad Kesselleistung</description>
+ </byte>
+ <data1c offset="4" name="kesselTemperatur">
+ <description lang="de">Kessel Temperatur</description>
+ </data1c>
+ <byte offset="4" name="ruecklaufTemperatur">
+ <description lang="de">Rücklauf Temperatur</description>
+ </byte>
+ <byte offset="6" name="boilerTemperatur">
+ <description lang="de">Boiler Temperatur</description>
+ </byte>
+ <byte offset="7" name="aussenTemperatur">
+ <description lang="de">Aussentemperatur</description>
+ </byte>
+ </fields>
+ </packet>
+ <packet primary="05" secondary="07"
+ name="betriebsdatenFeuerungsautomat">
+ <description lang="de">"Betriebsdaten des Reglers an den Feuerungsautomaten</description>
+ <fields>
+ <byteEnum offset="0" name="betriebszustand">
+ <option value="00" name="brennerAbschalten">
+ <description lang="de">Brenner Abschalten</description>
+ </option>
+ <option value="01" name="keineAktion">
+ <description lang="de">Keine Aktion</description>
+ </option>
+ <option value="55" name="brauchwasserbereitung">
+ <description lang="de">Brauchwasserbereitung</description>
+ </option>
+ <option value="aa" name="heizbetieb">
+ <description lang="de">Heizbetrieb</description>
+ </option>
+ <option value="cc" name="emissionskontrolle">
+ <description lang="de">Emissionskontrolle</description>
+ </option>
+ <option value="dd" name="tuevFunktion">
+ <description lang="de">TÜV Funktion</description>
+ </option>
+ <option value="ee" name="reglerStopp">
+ <description lang="de">Regler Stopp</description>
+ </option>
+ <option value="66" name="brauchwasserReglerstopp">
+ <description lang="de">Brauchwasserbereitung bei Reglerstoppfunktion</description>
+ </option>
+ <option value="bb" name="brauchwasserHeizbetrieb">
+ <description lang="de">Brauchwasserbereitung bei Heizbetrieb</description>
+ </option>
+ <option value="44" name="reglerstoppStufig">
+ <description lang="de">Reglerstoppfunktion bei stufigem Betrieb</description>
+ </option>
+ </byteEnum>
+ <byteEnum offset="1" name="aktion">
+ <option value="00" name="keineAktion">
+ <description lang="de">Keine Aktion</description>
+ </option>
+ <option value="01" name="ausschaltenKesselpumpe">
+ <description lang="de">Ausschalten Kesselpumpe</description>
+ </option>
+ <option value="02" name="einschaltenKesselpumpe">
+ <description lang="de">Einschalten Kesselpumpe</description>
+ </option>
+ <option value="03" name="ausschaltenVariableVerbraucher">
+ <description lang="de">Ausschalten variable Verbraucher</description>
+ </option>
+ <option value="04" name="einschaltenVariableVerbraucher">
+ <description lang="de">Einschalten variable Verbraucher</description>
+ </option>
+ </byteEnum>
+ <data2c offset="2" name="kesselSollwertTemperatur">
+ <description lang="de">Kessel Temperatur Sollwert</description>
+ </data2c>
+ <data2b offset="4" name="kesselSollwertDruck">
+ <description lang="de">Kesseldruck Sollwert</description>
+ </data2b>
+ <data1c offset="6" name="stellgrad">
+ <description lang="de">Stellgrad</description>
+ </data1c>
+ <data1c offset="7" name="brauchwasserSollwert">
+ <description lang="de">Brauchwasser Sollwert</description>
+ </data1c>
+ </fields>
+ </packet>
+
+ <packet primary="07" secondary="00" name="datumZeit">
+ <description lang="de">Datum/Zeit Meldung eines eBus Master</description>
+ <fields>
+ <data2b offset="0" name="aussenTemperatur" />
+ <bcd offset="2" name="sekunden" />
+ <bcd offset="3" name="minuten" /><!-- FEHLER ab hier beim offset??? -->
+ <bcd offset="4" name="stunden" />
+ <bcd offset="5" name="tag" />
+ <bcd offset="6" name="monat" />
+ <bcd offset="7" name="wochentag" />
+ <bcd offset="8" name="jahr" />
+ </fields>
+ </packet>
+
+ <packet primary="08" secondary="00" name="sollwertuebertragungRegler">
+ <description lang="de">Sollwertübertragung des Reglers an andere Regler</description>
+ <fields>
+ <data2b offset="0" name="TK_soll">
+ <description lang="de">Kessel Sollwert in °C [1/256]</description>
+ </data2b>
+ <data2b offset="2" name="TA_ist">
+ <description lang="de">Aussentemperatur in °C [1/256]</description>
+ </data2b>
+ <data1b offset="4" name="L_zwang">
+ <description lang="de">Leistungszwang in Prozent</description>
+ </data1b>
+ <bit offset="5" name="Status">
+ <description lang="de">Status</description>
+ </bit>
+ <data2b offset="6" name="TB_soll">
+ <description lang="de">Brauchwassersollwert</description>
+ </data2b>
+ </fields>
+ </packet>
+
+ <packet primary="03" secondary="08" name="brenstoffmengeLesen">
+ <description lang="Gesamtbrennstoffmenge Lesen"></description>
+ <fields />
+ </packet>
+
+ <!-- #x50, Kromschröder Spezial -->
+ <packet primary="50" secondary="14" name="vorlauftemperatur">
+ <description lang="de">Reversed from http://www.mikrocontroller.net/topic/91164#1070401</description>
+ <fields>
+ <data2b offset="0" name="vorlauftemperaturIst">
+ <description lang="de">Aktuelle Vorlauftemperatur
+ Mischerkreis</description>
+ </data2b>
+ <data2b offset="2" name="vorlauftemperaturSoll">
+ <description lang="de">Soll Vorlaufteperatur
+ Mischerkreis</description>
+ </data2b>
+ </fields>
+ </packet>
+
+ <packet primary="50" secondary="17" name="solarDaten">
+ <description lang="de">Solar Daten</description>
+ <fields>
+ <bit offset="0" name="solarPumpe">
+ <description lang="de">Betriebszustand Solarpumpe</description>
+ </bit>
+ <data2c offset="2" name="tempKollektor">
+ <description lang="de">>Wassertemperatur am Kollektor</description>
+ </data2c>
+ <data2c offset="4" name="tempWarmwasserSolar">
+ <description lang="de">Warmwassertemperatur am
+ Kollektor</description>
+ </data2c>
+ </fields>
+ </packet>
+
+ <packet primary="50" secondary="18" name="solarDatenSumme">
+ <description lang="de">Reversed siehe ebus-wiki</description>
+ <fields>
+ <data2b offset="0" name="aktuelleLeistung">
+ <description lang="de">Aktuelle Solarleistung</description>
+ </data2b>
+ <word offset="2" name="tagesertragLow">
+ <description lang="de">Tagesertrag low</description>
+ </word>
+ <word offset="4" name="tagesertragHigh">
+ <description lang="de">Tagesertrag high * 1000</description>
+ </word>
+ <word offset="6" name="ertragssumme">
+ <description lang="de">Ertragssumme</description>
+ </word>
+ <word offset="8" name="ertragssummeT">
+ <description lang="de">Ertragssumme T * 1000</description>
+ </word>
+ <word offset="10" name="ertragssummeM">
+ <description lang="de">Etragssumme M * 1000 * 1000</description>
+ </word>
+ </fields>
+ </packet>
+ </packets>
+</ebus>
diff --git a/ebus-xml/transform/ebus.html.xslt b/ebus-xml/transform/ebus.html.xslt
new file mode 100644
index 0000000..bf2d031
--- /dev/null
+++ b/ebus-xml/transform/ebus.html.xslt
@@ -0,0 +1,112 @@
+<?xml version="1.0" encoding="utf8"?>
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+ <xsl:template match="/">
+ <html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf8" />
+ <style type="text/css">
+ table {
+ border: 1px solid gray;
+ width: 100%;
+ }
+ table td {
+ border-left: 1px dotted gray;
+ border-right: 1px
+ dotted gray;
+ }
+
+ table th {
+ border: 1px dotted gray;
+ }
+ </style>
+ </head>
+ <body>
+ <h2>Ebus Geräte</h2>
+ <table class="devices">
+ <tr>
+ <th>Adresse</th>
+ <th>Gerät</th>
+ <th>Typ</th>
+ </tr>
+ <xsl:for-each select="ebus/devices/device">
+ <tr>
+ <td>
+ <!-- anchor -->
+ <xsl:value-of select="@address" />
+ </td>
+ <td>
+ <xsl:value-of select="text()" />
+ </td>
+ <td>
+ <xsl:value-of select="@type" />
+ </td>
+ </tr>
+ </xsl:for-each>
+ </table>
+
+ <h2>Ebus Pakete</h2>
+ <table class="packets">
+ <tr>
+ <th>Primary Command</th>
+ <th>Secondary Command</th>
+ <th>Name</th>
+ <th>Description</th>
+ </tr>
+ <xsl:for-each select="ebus/packets/packet">
+ <tr>
+ <td>
+ <xsl:value-of select="@primary" />
+ </td>
+ <td>
+ <xsl:value-of select="@secondary" />
+ </td>
+ <td>
+ <xsl:value-of select="@name" />
+ </td>
+ <td>
+ <xsl:value-of select="@description" />
+ </td>
+ </tr>
+ <tr>
+ <td />
+ <td colspan="3">
+ <table class="fields">
+ <tr>
+ <th>offset</th>
+ <th>typ</th>
+ <th>name</th>
+ <th>Description</th>
+ </tr>
+ <xsl:for-each select="fields/*">
+ <tr>
+ <td>
+ <xsl:value-of select="@offset" />
+ </td>
+ <td>
+ <xsl:value-of select="name()" />
+ </td>
+ <td>
+ <xsl:value-of select="@name" />
+ </td>
+ <td>
+ <xsl:value-of select="text()" />
+ </td>
+ </tr>
+ </xsl:for-each>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="4">
+ <hr />
+ </td>
+ </tr>
+ </xsl:for-each>
+ </table>
+ </body>
+ </html>
+ </xsl:template>
+
+</xsl:stylesheet>
diff --git a/ebus-xml/transform/ebus.txt.xslt b/ebus-xml/transform/ebus.txt.xslt
new file mode 100644
index 0000000..dda1e33
--- /dev/null
+++ b/ebus-xml/transform/ebus.txt.xslt
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="utf8"?>
+<xsl:stylesheet version="1.0"
+xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+<!-- TODO: padding -->
+ <xsl:output method="text" />
+ <xsl:template match="/">
+=== Ebus Geräte
+
+Adresse | Gerät | Typ
+
+ <xsl:for-each select="ebus/devices/device">
+ <xsl:value-of select="@address"/>
+ <xsl:text>|</xsl:text>
+ <xsl:value-of select="text()"/>
+ <xsl:text>|</xsl:text>
+ <xsl:value-of select="@type"/>
+ <xsl:text>
+</xsl:text>
+ </xsl:for-each>
+
+=== Ebus Pakete
+
+Primary Command | Secondary Command | Name | Description
+ ---- offset | typ | name | description
+ <xsl:for-each select="ebus/packets/packet">
+ <xsl:value-of select="@primary"/>
+ <xsl:text>|</xsl:text>
+ <xsl:value-of select="@secondary"/>
+ <xsl:text>|</xsl:text>
+ <xsl:value-of select="@name"/>
+ <xsl:text>|</xsl:text>
+ <xsl:value-of select="@description"/>
+
+ <xsl:for-each select="fields/*">
+ <xsl:value-of select="@offset"/>
+ <xsl:text>|</xsl:text>
+ <xsl:value-of select="name()"/>
+ <xsl:text>|</xsl:text>
+ <xsl:value-of select="@name"/>
+ <xsl:text>|</xsl:text>
+ <xsl:value-of select="text()"/>
+ <xsl:text>
+ </xsl:text>
+ </xsl:for-each>
+ <xsl:text>
+ </xsl:text>
+ </xsl:for-each>
+ </xsl:template>
+</xsl:stylesheet>