Commit 0e557b59 authored by Christophe Demarey's avatar Christophe Demarey
Browse files

Move knx code in a separate module.

parent afb26086
......@@ -190,21 +190,6 @@
<groupId>tmp.demo.homeautomation</groupId>
<artifactId>skype</artifactId>
</dependency>
<dependency>
<groupId>tmp.demo.homeautomation</groupId>
<artifactId>calimero</artifactId>
<version>2.0a4</version>
</dependency>
<dependency>
<groupId>tmp.demo.homeautomation</groupId>
<artifactId>calimero-ng</artifactId>
<version>2.0a4</version>
</dependency>
<!-- <dependency>
<groupId>tmp.demo.homeautomation</groupId>
<artifactId>nabaztagComApi</artifactId>
<version>1.0</version>
</dependency> -->
<dependency>
<groupId>tmp.demo.homeautomation</groupId>
<artifactId>swingx-beaninfo</artifactId>
......
......@@ -2,7 +2,6 @@
<service name="mediatorService" promote="Mediator/mediatorService"/>
<include name="knx"/>
<include name="map"/>
<include name="tts"/>
<include name="weather"/>
......@@ -41,7 +40,7 @@
<interface.java interface="org.ow2.frascati.demo.homeautomation.api.GcalService"/>
</reference>
<reference name="knxService" target="knxMockComponent/knxMockService">
<reference name="knxService">
<interface.java interface="org.ow2.frascati.demo.homeautomation.api.KnxService"/>
</reference>
......
......@@ -36,6 +36,11 @@
<artifactId>home-automation-comm-skype-mock</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.ow2.frascati.demo</groupId>
<artifactId>home-automation-knx-mock</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
<!-- ======== -->
......
<?xml version="1.0" encoding="UTF-8" ?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<name>Home Automation Demonstration KNX Mock module</name>
<groupId>org.ow2.frascati.demo</groupId>
<artifactId>home-automation-knx-mock</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<parent>
<groupId>org.ow2.frascati.demo</groupId>
<artifactId>home-automation-parent</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<!-- ===== -->
<!-- Build -->
<!-- ===== -->
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
</plugins>
</build>
<!-- ============= -->
<!-- Properties -->
<!-- ============= -->
<properties>
</properties>
<!-- ============ -->
<!-- Dependencies -->
<!-- ============ -->
<dependencies>
<dependency>
<groupId>org.ow2.frascati.demo</groupId>
<artifactId>home-automation-core</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</project>
......@@ -23,7 +23,7 @@
* Contributor(s):
*/
package org.ow2.frascati.demo.homeautomation.lib;
package org.ow2.frascati.demo.homeautomation.knx;
import java.util.logging.Level;
import java.util.logging.Logger;
......@@ -33,7 +33,7 @@ import org.ow2.frascati.demo.homeautomation.api.KnxService;
public class KnxServiceMockImpl implements KnxService {
public void init() {
Logger.getLogger(KnxServiceImpl.class.getName()).log(Level.INFO," [KNX mock service] connection to KNX devices established successfully");
Logger.getLogger(KnxServiceMockImpl.class.getName()).log(Level.INFO," [KNX mock service] connection to KNX devices established successfully");
}
@Override
......@@ -43,12 +43,12 @@ public class KnxServiceMockImpl implements KnxService {
@Override
public void switchLightOFF(String lightId) {
Logger.getLogger(KnxServiceImpl.class.getName()).log(Level.INFO," [KNX mock service] Light (id=" + lightId + ") switched OFF");
Logger.getLogger(KnxServiceMockImpl.class.getName()).log(Level.INFO," [KNX mock service] Light (id=" + lightId + ") switched OFF");
}
@Override
public void switchLightON(String lightId) {
Logger.getLogger(KnxServiceImpl.class.getName()).log(Level.INFO," [KNX mock service] Light (id=" + lightId + ") switched ON");
Logger.getLogger(KnxServiceMockImpl.class.getName()).log(Level.INFO," [KNX mock service] Light (id=" + lightId + ") switched ON");
}
}
<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" name="home-automation">
<component name="knxMockComponent">
<implementation.java class="org.ow2.frascati.demo.homeautomation.knx.KnxServiceMockImpl"/>
<service name="knxMockService" requires="qos">
<interface.java interface="org.ow2.frascati.demo.homeautomation.api.KnxService"/>
</service>
</component>
<wire source="Mediator/knxService" target="knxMockComponent/knxMockService"/>
</composite>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" ?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<name>Home Automation Demonstration KNX module</name>
<groupId>org.ow2.frascati.demo</groupId>
<artifactId>home-automation-knx</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<parent>
<groupId>org.ow2.frascati.demo</groupId>
<artifactId>home-automation-parent</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<!-- ===== -->
<!-- Build -->
<!-- ===== -->
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
</plugins>
</build>
<!-- ============= -->
<!-- Properties -->
<!-- ============= -->
<properties>
</properties>
<!-- ============ -->
<!-- Dependencies -->
<!-- ============ -->
<dependencies>
<dependency>
<groupId>org.ow2.frascati.demo</groupId>
<artifactId>home-automation-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>tmp.demo.homeautomation</groupId>
<artifactId>calimero</artifactId>
<version>2.0a4</version>
</dependency>
<dependency>
<groupId>tmp.demo.homeautomation</groupId>
<artifactId>calimero-ng</artifactId>
<version>2.0a4</version>
</dependency>
</dependencies>
</project>
......@@ -23,7 +23,7 @@
* Contributor(s):
*/
package org.ow2.frascati.demo.homeautomation.lib;
package org.ow2.frascati.demo.homeautomation.knx;
import java.net.InetAddress;
import java.net.InetSocketAddress;
......
<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" name="knx">
<!-- testing purpose only promotion -->
<service name="knxService" promote="knxComponent/knxService"></service>
<service name="knxMockService" promote="knxMockComponent/knxMockService"></service>
<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" name="home-automation">
<component name="knxComponent">
<implementation.java class="org.ow2.frascati.demo.homeautomation.lib.KnxServiceImpl"/>
<implementation.java class="org.ow2.frascati.demo.homeautomation.knx.KnxServiceImpl"/>
<service name="knxService" requires="qos">
<interface.java interface="org.ow2.frascati.demo.homeautomation.api.KnxService"/>
......@@ -35,17 +31,8 @@
</map>
</property>
-->
</component>
<component name="knxMockComponent">
<implementation.java class="org.ow2.frascati.demo.homeautomation.lib.KnxServiceMockImpl"/>
<service name="knxMockService" requires="qos">
<interface.java interface="org.ow2.frascati.demo.homeautomation.api.KnxService"/>
</service>
</component>
<wire source="Mediator/knxService" target="knxComponent/knxService"/>
</composite>
\ No newline at end of file
......@@ -131,6 +131,8 @@
<module>comm-skype</module>
<module>comm-skype-mock</module>
<module>comm-orange</module>
<module>knx</module>
<module>knx-mock</module>
</modules>
......
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