Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
frascati
frascati
Commits
e1a726db
Commit
e1a726db
authored
Apr 20, 2012
by
Gwenael Cattez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move demonstration modules from sandbox to trunk
parent
e57ba110
Changes
100
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
75 changed files
with
5138 additions
and
0 deletions
+5138
-0
demo/common/common-homeautomation/common-homeautomation-interface/pom.xml
...on-homeautomation/common-homeautomation-interface/pom.xml
+35
-0
demo/common/common-homeautomation/common-homeautomation-interface/src/main/java/org/ow2/frascati/demo/common/homeautomation/actuator/Actuator.java
...rascati/demo/common/homeautomation/actuator/Actuator.java
+35
-0
demo/common/common-homeautomation/common-homeautomation-interface/src/main/java/org/ow2/frascati/demo/common/homeautomation/actuator/OnOffActuator.java
...ti/demo/common/homeautomation/actuator/OnOffActuator.java
+56
-0
demo/common/common-homeautomation/common-homeautomation-interface/src/main/java/org/ow2/frascati/demo/common/homeautomation/actuator/OnOffDimActuator.java
...demo/common/homeautomation/actuator/OnOffDimActuator.java
+46
-0
demo/common/common-homeautomation/common-homeautomation-interface/src/main/resources/zibase.wsdl
...n-homeautomation-interface/src/main/resources/zibase.wsdl
+55
-0
demo/common/common-homeautomation/common-homeautomation-light/pom.xml
...common-homeautomation/common-homeautomation-light/pom.xml
+59
-0
demo/common/common-homeautomation/common-homeautomation-light/src/main/java/org/ow2/frascati/demo/common/homeautomation/light/Light.java
.../ow2/frascati/demo/common/homeautomation/light/Light.java
+138
-0
demo/common/common-homeautomation/common-homeautomation-light/src/main/resources/images/light_off.png
...eautomation-light/src/main/resources/images/light_off.png
+0
-0
demo/common/common-homeautomation/common-homeautomation-light/src/main/resources/images/light_on.png
...meautomation-light/src/main/resources/images/light_on.png
+0
-0
demo/common/common-homeautomation/common-homeautomation-light/src/main/resources/light.composite
...n-homeautomation-light/src/main/resources/light.composite
+55
-0
demo/common/common-homeautomation/common-homeautomation-switch/pom.xml
...ommon-homeautomation/common-homeautomation-switch/pom.xml
+54
-0
demo/common/common-homeautomation/common-homeautomation-switch/src/main/java/org/ow2/frascati/demo/common/homeautomation/Switch.java
...a/org/ow2/frascati/demo/common/homeautomation/Switch.java
+93
-0
demo/common/common-homeautomation/common-homeautomation-switch/src/main/resources/switch.composite
...homeautomation-switch/src/main/resources/switch.composite
+50
-0
demo/common/common-homeautomation/common-homeautomation-zibase-mock/pom.xml
...-homeautomation/common-homeautomation-zibase-mock/pom.xml
+55
-0
demo/common/common-homeautomation/common-homeautomation-zibase-mock/src/main/java/org/ow2/frascati/demo/zibase/ZibaseMockImpl.java
...ain/java/org/ow2/frascati/demo/zibase/ZibaseMockImpl.java
+92
-0
demo/common/common-homeautomation/common-homeautomation-zibase-mock/src/main/resources/zibase-mock.composite
...tion-zibase-mock/src/main/resources/zibase-mock.composite
+44
-0
demo/common/common-homeautomation/common-homeautomation-zibase/pom.xml
...ommon-homeautomation/common-homeautomation-zibase/pom.xml
+60
-0
demo/common/common-homeautomation/common-homeautomation-zibase/src/main/java/org/ow2/frascati/demo/zibase/Zibase.java
...se/src/main/java/org/ow2/frascati/demo/zibase/Zibase.java
+44
-0
demo/common/common-homeautomation/common-homeautomation-zibase/src/main/java/org/ow2/frascati/demo/zibase/ZibaseImpl.java
...rc/main/java/org/ow2/frascati/demo/zibase/ZibaseImpl.java
+319
-0
demo/common/common-homeautomation/common-homeautomation-zibase/src/main/java/org/ow2/frascati/demo/zibase/client/ZibaseClient.java
...ava/org/ow2/frascati/demo/zibase/client/ZibaseClient.java
+111
-0
demo/common/common-homeautomation/common-homeautomation-zibase/src/main/java/org/ow2/frascati/demo/zibase/elements/ZibaseDeviceElement.java
...w2/frascati/demo/zibase/elements/ZibaseDeviceElement.java
+44
-0
demo/common/common-homeautomation/common-homeautomation-zibase/src/main/java/org/ow2/frascati/demo/zibase/elements/ZibaseDeviceElementImpl.java
...rascati/demo/zibase/elements/ZibaseDeviceElementImpl.java
+93
-0
demo/common/common-homeautomation/common-homeautomation-zibase/src/main/java/org/ow2/frascati/demo/zibase/elements/ZibaseElement.java
.../org/ow2/frascati/demo/zibase/elements/ZibaseElement.java
+43
-0
demo/common/common-homeautomation/common-homeautomation-zibase/src/main/java/org/ow2/frascati/demo/zibase/elements/ZibaseElementImpl.java
.../ow2/frascati/demo/zibase/elements/ZibaseElementImpl.java
+91
-0
demo/common/common-homeautomation/common-homeautomation-zibase/src/main/java/org/ow2/frascati/demo/zibase/elements/ZibaseMacroElement.java
...ow2/frascati/demo/zibase/elements/ZibaseMacroElement.java
+38
-0
demo/common/common-homeautomation/common-homeautomation-zibase/src/main/java/org/ow2/frascati/demo/zibase/elements/ZibaseMacroElementImpl.java
...frascati/demo/zibase/elements/ZibaseMacroElementImpl.java
+74
-0
demo/common/common-homeautomation/common-homeautomation-zibase/src/main/java/org/ow2/frascati/demo/zibase/exceptions/WrongZibaseInitialisationException.java
...zibase/exceptions/WrongZibaseInitialisationException.java
+60
-0
demo/common/common-homeautomation/common-homeautomation-zibase/src/main/resources/zibase.composite
...homeautomation-zibase/src/main/resources/zibase.composite
+44
-0
demo/common/common-homeautomation/common-homeautomation-zibase/src/main/resources/zibase.wsdl
...mmon-homeautomation-zibase/src/main/resources/zibase.wsdl
+55
-0
demo/common/common-homeautomation/pom.xml
demo/common/common-homeautomation/pom.xml
+61
-0
demo/common/onoffdevice/pom.xml
demo/common/onoffdevice/pom.xml
+36
-0
demo/common/onoffdevice/src/main/java/org/ow2/frascati/demo/common/onoffdevice/IOnOffDevice.java
...rg/ow2/frascati/demo/common/onoffdevice/IOnOffDevice.java
+57
-0
demo/common/onoffdevice/src/main/java/org/ow2/frascati/demo/common/onoffdevice/SwOnOffDevice.java
...g/ow2/frascati/demo/common/onoffdevice/SwOnOffDevice.java
+316
-0
demo/common/onoffdevice/src/main/resources/images/defaultOff.png
...mmon/onoffdevice/src/main/resources/images/defaultOff.png
+0
-0
demo/common/onoffdevice/src/main/resources/images/defaultOn.png
...ommon/onoffdevice/src/main/resources/images/defaultOn.png
+0
-0
demo/common/pom.xml
demo/common/pom.xml
+43
-0
demo/common/twitter/pom.xml
demo/common/twitter/pom.xml
+68
-0
demo/common/twitter/src/main/java/org/ow2/frascati/demo/twitter/ITwitter.java
...src/main/java/org/ow2/frascati/demo/twitter/ITwitter.java
+67
-0
demo/common/twitter/src/main/java/org/ow2/frascati/demo/twitter/TwitterImpl.java
.../main/java/org/ow2/frascati/demo/twitter/TwitterImpl.java
+201
-0
demo/common/twitter/src/main/resources/Twitter.wsdl
demo/common/twitter/src/main/resources/Twitter.wsdl
+84
-0
demo/common/twitter/src/main/resources/twitter.composite
demo/common/twitter/src/main/resources/twitter.composite
+44
-0
demo/common/twitter/src/main/resources/twitter_deploy.composite
...ommon/twitter/src/main/resources/twitter_deploy.composite
+35
-0
demo/common/twitter/src/main/resources/twitter_localhost.composite
...on/twitter/src/main/resources/twitter_localhost.composite
+35
-0
demo/fire-emergency/fire-control-center/pom.xml
demo/fire-emergency/fire-control-center/pom.xml
+63
-0
demo/fire-emergency/fire-control-center/src/main/java/org/ow2/frascati/demo/fireemergency/firecontrolcenter/FireControlCenter.java
...mo/fireemergency/firecontrolcenter/FireControlCenter.java
+555
-0
demo/fire-emergency/fire-control-center/src/main/resources/a3servers.xml
...ency/fire-control-center/src/main/resources/a3servers.xml
+35
-0
demo/fire-emergency/fire-control-center/src/main/resources/firecontrolcenter_deploy.composite
...ter/src/main/resources/firecontrolcenter_deploy.composite
+67
-0
demo/fire-emergency/fire-control-center/src/main/resources/firecontrolcenter_localhost.composite
.../src/main/resources/firecontrolcenter_localhost.composite
+68
-0
demo/fire-emergency/fire-control-center/src/main/resources/images/AlertOff.png
...ire-control-center/src/main/resources/images/AlertOff.png
+0
-0
demo/fire-emergency/fire-control-center/src/main/resources/images/AlertOn.png
...fire-control-center/src/main/resources/images/AlertOn.png
+0
-0
demo/fire-emergency/fire-control-center/src/main/resources/images/DoorClosed.jpg
...e-control-center/src/main/resources/images/DoorClosed.jpg
+0
-0
demo/fire-emergency/fire-control-center/src/main/resources/images/DoorOpen.jpg
...ire-control-center/src/main/resources/images/DoorOpen.jpg
+0
-0
demo/fire-emergency/fire-control-center/src/main/resources/images/SprinklerOff.jpg
...control-center/src/main/resources/images/SprinklerOff.jpg
+0
-0
demo/fire-emergency/fire-control-center/src/main/resources/images/SprinklerOn.jpg
...-control-center/src/main/resources/images/SprinklerOn.jpg
+0
-0
demo/fire-emergency/fire-control-center/src/main/resources/images/controllerPanel.jpg
...trol-center/src/main/resources/images/controllerPanel.jpg
+0
-0
demo/fire-emergency/fire-control-center/src/main/resources/jndi.properties
...cy/fire-control-center/src/main/resources/jndi.properties
+25
-0
demo/fire-emergency/fire-controller/pom.xml
demo/fire-emergency/fire-controller/pom.xml
+61
-0
demo/fire-emergency/fire-controller/src/main/java/org/ow2/frascati/demo/fireemergency/firecontroller/FireController.java
...ati/demo/fireemergency/firecontroller/FireController.java
+177
-0
demo/fire-emergency/fire-controller/src/main/resources/Twitter.wsdl
...emergency/fire-controller/src/main/resources/Twitter.wsdl
+84
-0
demo/fire-emergency/fire-controller/src/main/resources/firecontroller_deploy.composite
...roller/src/main/resources/firecontroller_deploy.composite
+153
-0
demo/fire-emergency/fire-controller/src/main/resources/firecontroller_deploy.composite_diagram
...rc/main/resources/firecontroller_deploy.composite_diagram
+5
-0
demo/fire-emergency/fire-controller/src/main/resources/firecontroller_localhost.composite
...ler/src/main/resources/firecontroller_localhost.composite
+66
-0
demo/fire-emergency/fire-detector/pom.xml
demo/fire-emergency/fire-detector/pom.xml
+55
-0
demo/fire-emergency/fire-detector/src/main/java/org/ow2/frascati/demo/fireemergency/firedetector/FireDetector.java
...rascati/demo/fireemergency/firedetector/FireDetector.java
+102
-0
demo/fire-emergency/fire-detector/src/main/java/org/ow2/frascati/demo/fireemergency/firedetector/IFireDetector.java
...ascati/demo/fireemergency/firedetector/IFireDetector.java
+36
-0
demo/fire-emergency/fire-detector/src/main/java/org/ow2/frascati/demo/fireemergency/firedetector/SwFireDetector.java
...scati/demo/fireemergency/firedetector/SwFireDetector.java
+110
-0
demo/fire-emergency/fire-detector/src/main/resources/firedetector.composite
...y/fire-detector/src/main/resources/firedetector.composite
+41
-0
demo/fire-emergency/fire-detector/src/main/resources/firedetector_deploy.composite
...detector/src/main/resources/firedetector_deploy.composite
+33
-0
demo/fire-emergency/fire-detector/src/main/resources/firedetector_localhost.composite
...ector/src/main/resources/firedetector_localhost.composite
+47
-0
demo/fire-emergency/fire-detector/src/main/resources/images/fireDetector.jpg
.../fire-detector/src/main/resources/images/fireDetector.jpg
+0
-0
demo/fire-emergency/integration-test/pom.xml
demo/fire-emergency/integration-test/pom.xml
+161
-0
demo/fire-emergency/integration-test/src/test/java/org/ow2/frascati/demo/integrationTest/FireEmergencyIT.java
...rg/ow2/frascati/demo/integrationTest/FireEmergencyIT.java
+136
-0
demo/fire-emergency/integration-test/src/test/resources/a3servers.xml
...ergency/integration-test/src/test/resources/a3servers.xml
+34
-0
demo/fire-emergency/integration-test/src/test/resources/jndi.properties
...gency/integration-test/src/test/resources/jndi.properties
+25
-0
demo/fire-emergency/itemis-demo-interface/pom.xml
demo/fire-emergency/itemis-demo-interface/pom.xml
+9
-0
No files found.
demo/common/common-homeautomation/common-homeautomation-interface/pom.xml
0 → 100644
View file @
e1a726db
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright (C) 2008-2012 Inria, University of Lille -->
<!-- -->
<!-- This library is free software; you can redistribute it and/or -->
<!-- modify it under the terms of the GNU Lesser General Public -->
<!-- License as published by the Free Software Foundation; either -->
<!-- version 2 of the License, or (at your option) any later version. -->
<!-- -->
<!-- This library is distributed in the hope that it will be useful, -->
<!-- but WITHOUT ANY WARRANTY; without even the implied warranty of -->
<!-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -->
<!-- Lesser General Public License for more details. -->
<!-- -->
<!-- You should have received a copy of the GNU Lesser General Public -->
<!-- License along with this library; if not, write to the Free Software -->
<!-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -->
<!-- -->
<!-- Contact: frascati@ow2.org -->
<!-- -->
<!-- Author: Gwenael CATTEZ -->
<!-- -->
<!-- Contributors : -->
<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/xsd/maven-4.0.0.xsd"
>
<modelVersion>
4.0.0
</modelVersion>
<parent>
<artifactId>
common-homeautomation
</artifactId>
<groupId>
org.ow2.frascati.demo
</groupId>
<version>
0.0.1-SNAPSHOT
</version>
<relativePath>
..
</relativePath>
</parent>
<artifactId>
common-homeautomation-interface
</artifactId>
<name>
Common interfaces for home automation
</name>
</project>
\ No newline at end of file
demo/common/common-homeautomation/common-homeautomation-interface/src/main/java/org/ow2/frascati/demo/common/homeautomation/actuator/Actuator.java
0 → 100644
View file @
e1a726db
/**
* OW2 FraSCAti Assembly Factory
* Copyright (C) 2008-2012 Inria, University of Lille
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Contact: frascati@ow2.org
*
* Author: Gwénaël Cattez
*
* Contributor(s):
*
*/
package
org.ow2.frascati.demo.common.homeautomation.actuator
;
/**
* General interface representing all kind of actuator (switch, ligth,...)
*/
public
interface
Actuator
{
}
demo/common/common-homeautomation/common-homeautomation-interface/src/main/java/org/ow2/frascati/demo/common/homeautomation/actuator/OnOffActuator.java
0 → 100644
View file @
e1a726db
/**
* OW2 FraSCAti Assembly Factory
* Copyright (C) 2008-2012 Inria, University of Lille
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Contact: frascati@ow2.org
*
* Author: Gwénaël Cattez
*
* Contributor(s):
*
*/
package
org.ow2.frascati.demo.common.homeautomation.actuator
;
/**
* Interface representing a 2 states (on,off) actuator
*/
public
interface
OnOffActuator
extends
Actuator
{
/**
* The parameter to send to the zibase to turn off an actuator
*/
public
final
static
int
ZIBASE_FUNCTION_OFF
=
0
;
/**
* The parameter to send to the zibase to turn on an actuator
*/
public
final
static
int
ZIBASE_FUNCTION_ON
=
1
;
/**
* Turn the actuator on
*/
public
void
acturatorOn
();
/**
* Turn the actuator off
*/
public
void
acturatorOff
();
}
demo/common/common-homeautomation/common-homeautomation-interface/src/main/java/org/ow2/frascati/demo/common/homeautomation/actuator/OnOffDimActuator.java
0 → 100644
View file @
e1a726db
/**
* OW2 FraSCAti Assembly Factory
* Copyright (C) 2008-2012 Inria, University of Lille
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Contact: frascati@ow2.org
*
* Author: Gwénaël Cattez
*
* Contributor(s):
*
*/
package
org.ow2.frascati.demo.common.homeautomation.actuator
;
/**
* Interface representing a 3 states (on,off,dim) actuator
*/
public
interface
OnOffDimActuator
extends
OnOffActuator
{
/**
* The parameter to send to the zibase to dim the actuator
*/
public
final
static
int
ZIBASE_FUNCTION_DIM
=
2
;
/**
* Dim the actuator, the dim value sent to the zibase is worth ZIBASE_ACTIONMODULE_DIM + dimValue * ZIBASE_ACTIONMODULE_DIM_CONSTANT
*
* @param dimValue the value of the dim parameter in percent
*/
public
void
actuatorDim
(
int
dimValue
);
}
demo/common/common-homeautomation/common-homeautomation-interface/src/main/resources/zibase.wsdl
0 → 100644
View file @
e1a726db
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions
name=
"Zibase"
targetNamespace=
"http://zibase.demo.frascati.ow2.org/"
xmlns:ns1=
"http://schemas.xmlsoap.org/soap/http"
xmlns:soap=
"http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns=
"http://zibase.demo.frascati.ow2.org/"
xmlns:wsdl=
"http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd=
"http://www.w3.org/2001/XMLSchema"
>
<wsdl:types>
<xsd:schema
attributeFormDefault=
"unqualified"
elementFormDefault=
"qualified"
targetNamespace=
"http://zibase.demo.frascati.ow2.org/"
xmlns:tns=
"http://zibase.demo.frascati.ow2.org/"
xmlns:xsd=
"http://www.w3.org/2001/XMLSchema"
>
<xsd:element
name=
"invokeModule"
type=
"tns:invokeModule"
/>
<xsd:complexType
name=
"invokeModule"
>
<xsd:sequence>
<xsd:element
minOccurs=
"0"
name=
"arg0"
nillable=
"true"
type=
"xsd:string"
/>
<xsd:element
minOccurs=
"0"
name=
"arg1"
nillable=
"true"
type=
"xsd:string"
/>
<xsd:element
minOccurs=
"0"
name=
"arg2"
nillable=
"true"
type=
"xsd:string"
/>
<xsd:element
minOccurs=
"0"
name=
"arg3"
nillable=
"true"
type=
"xsd:string"
/>
</xsd:sequence>
</xsd:complexType>
<xsd:element
name=
"invokeModuleResponse"
type=
"tns:invokeModuleResponse"
/>
<xsd:complexType
name=
"invokeModuleResponse"
>
<xsd:sequence>
<xsd:element
minOccurs=
"0"
name=
"return"
nillable=
"true"
type=
"xsd:string"
/>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
</wsdl:types>
<wsdl:message
name=
"invokeModuleResponse"
>
<wsdl:part
element=
"tns:invokeModuleResponse"
name=
"parameters"
>
</wsdl:part>
</wsdl:message>
<wsdl:message
name=
"invokeModule"
>
<wsdl:part
element=
"tns:invokeModule"
name=
"parameters"
>
</wsdl:part>
</wsdl:message>
<wsdl:portType
name=
"ZibasePortType"
>
<wsdl:operation
name=
"invokeModule"
>
<wsdl:input
message=
"tns:invokeModule"
name=
"invokeModule"
>
</wsdl:input>
<wsdl:output
message=
"tns:invokeModuleResponse"
name=
"invokeModuleResponse"
>
</wsdl:output>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding
name=
"ZibaseSoapBinding"
type=
"tns:ZibasePortType"
>
<soap:binding
style=
"document"
transport=
"http://schemas.xmlsoap.org/soap/http"
/>
<wsdl:operation
name=
"invokeModule"
>
<soap:operation
soapAction=
""
style=
"document"
/>
<wsdl:input
name=
"invokeModule"
>
<soap:body
use=
"literal"
/>
</wsdl:input>
<wsdl:output
name=
"invokeModuleResponse"
>
<soap:body
use=
"literal"
/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service
name=
"Zibase"
>
<wsdl:port
binding=
"tns:ZibaseSoapBinding"
name=
"ZibasePort"
>
<soap:address
location=
"http://localhost:9100/zibase/invoke"
/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
\ No newline at end of file
demo/common/common-homeautomation/common-homeautomation-light/pom.xml
0 → 100644
View file @
e1a726db
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright (C) 2008-2012 Inria, University of Lille -->
<!-- -->
<!-- This library is free software; you can redistribute it and/or -->
<!-- modify it under the terms of the GNU Lesser General Public -->
<!-- License as published by the Free Software Foundation; either -->
<!-- version 2 of the License, or (at your option) any later version. -->
<!-- -->
<!-- This library is distributed in the hope that it will be useful, -->
<!-- but WITHOUT ANY WARRANTY; without even the implied warranty of -->
<!-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -->
<!-- Lesser General Public License for more details. -->
<!-- -->
<!-- You should have received a copy of the GNU Lesser General Public -->
<!-- License along with this library; if not, write to the Free Software -->
<!-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -->
<!-- -->
<!-- Contact: frascati@ow2.org -->
<!-- -->
<!-- Author: Gwenael CATTEZ -->
<!-- -->
<!-- Contributors : -->
<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/xsd/maven-4.0.0.xsd"
>
<modelVersion>
4.0.0
</modelVersion>
<parent>
<artifactId>
common-homeautomation
</artifactId>
<groupId>
org.ow2.frascati.demo
</groupId>
<version>
0.0.1-SNAPSHOT
</version>
<relativePath>
..
</relativePath>
</parent>
<artifactId>
common-homeautomation-light
</artifactId>
<name>
Common Ligth component
</name>
<properties>
<composite.file>
light
</composite.file>
<composite.file.local>
light
</composite.file.local>
<composite.file.deploy>
light
</composite.file.deploy>
</properties>
<dependencies>
<dependency>
<groupId>
org.ow2.frascati.demo
</groupId>
<artifactId>
common-onoffdevice
</artifactId>
</dependency>
<dependency>
<groupId>
org.ow2.frascati
</groupId>
<artifactId>
frascati-binding-ws
</artifactId>
</dependency>
<dependency>
<groupId>
org.ow2.frascati.demo
</groupId>
<artifactId>
common-homeautomation-interface
</artifactId>
</dependency>
</dependencies>
</project>
\ No newline at end of file
demo/common/common-homeautomation/common-homeautomation-light/src/main/java/org/ow2/frascati/demo/common/homeautomation/light/Light.java
0 → 100644
View file @
e1a726db
/**
* OW2 FraSCAti Assembly Factory
* Copyright (C) 2008-2012 Inria, University of Lille
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Contact: frascati@ow2.org
*
* Author: Gwénaël Cattez
*
* Contributor(s):
*
*/
package
org.ow2.frascati.demo.common.homeautomation.light
;
import
org.osoa.sca.annotations.Property
;
import
org.osoa.sca.annotations.Reference
;
import
org.ow2.frascati.demo.common.homeautomation.actuator.OnOffDimActuator
;
import
org.ow2.frascati.demo.common.onoffdevice.SwOnOffDevice
;
import
org.ow2.frascati.demo.zibase.ZibasePortType
;
/**
* Implementation of an on,off,dim light communicated with a zibase
*/
public
class
Light
extends
SwOnOffDevice
implements
OnOffDimActuator
{
private
static
final
long
serialVersionUID
=
-
2220769980129769032L
;
/**
* @Property
* Zibase module Id
*/
private
String
moduleID
;
/**
* @Property
* Zibase protocol Id
*/
private
String
protocolID
;
/**
* The Zibase reference
*/
@Reference
(
required
=
false
)
protected
ZibasePortType
zibase
;
/**
* Constructor for {@link SwOnOffDevice} class, set the title of the Swing Panel
*/
public
Light
()
{
super
(
"Remote Ligth"
);
}
/**
* @see org.ow2.frascati.demo.common.onoffdevice.SwOnOffDevice#onAction()
*/
@Override
public
Boolean
onAction
()
{
acturatorOn
();
return
null
;
}
/**
* @see org.ow2.frascati.demo.common.onoffdevice.SwOnOffDevice#offAction()
*/
@Override
public
Boolean
offAction
()
{
acturatorOff
();
return
null
;
}
/**
* @see org.ow2.frascati.demo.common.homeautomation.actuator.OnOffActuator#acturatorOn()
*/
public
void
acturatorOn
()
{
zibase
.
invokeModule
(
moduleID
,
String
.
valueOf
(
OnOffDimActuator
.
ZIBASE_FUNCTION_ON
),
protocolID
,
null
);
}
/**
* @see org.ow2.frascati.demo.common.homeautomation.actuator.OnOffActuator#acturatorOff()
*/
public
void
acturatorOff
()
{
zibase
.
invokeModule
(
moduleID
,
String
.
valueOf
(
OnOffDimActuator
.
ZIBASE_FUNCTION_OFF
),
protocolID
,
null
);
}
/**
* @see org.ow2.frascati.demo.common.homeautomation.actuator.OnOffDimActuator#actuatorDim(int)
*/
public
void
actuatorDim
(
int
dimValue
)
{
zibase
.
invokeModule
(
moduleID
,
String
.
valueOf
(
OnOffDimActuator
.
ZIBASE_FUNCTION_DIM
),
protocolID
,
String
.
valueOf
(
dimValue
));
// int convertedDim=dimValue*OnOffDimActuator.ZIBASE_ACTIONMODULE_DIM_CONSTANT;
// convertedDim+=OnOffDimActuator.ZIBASE_ACTIONMODULE_DIM;
// zibase.invokeModule(moduleID, convertedDim);
}
public
String
getModuleID
()
{
return
moduleID
;
}
@Property
public
void
setModuleID
(
String
moduleID
)
{
this
.
moduleID
=
moduleID
;
}
public
String
getProtocolID
()
{
return
protocolID
;
}
@Property
public
void
setProtocolID
(
String
protocolID
)
{
this
.
protocolID
=
protocolID
;
}
}
demo/common/common-homeautomation/common-homeautomation-light/src/main/resources/images/light_off.png
0 → 100644
View file @
e1a726db
5.84 KB
demo/common/common-homeautomation/common-homeautomation-light/src/main/resources/images/light_on.png
0 → 100644
View file @
e1a726db
7.05 KB
demo/common/common-homeautomation/common-homeautomation-light/src/main/resources/light.composite
0 → 100644
View file @
e1a726db
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright (C) 2008-2012 Inria, University of Lille -->
<!-- -->
<!-- This library is free software; you can redistribute it and/or -->
<!-- modify it under the terms of the GNU Lesser General Public -->
<!-- License as published by the Free Software Foundation; either -->
<!-- version 2 of the License, or (at your option) any later version. -->
<!-- -->
<!-- This library is distributed in the hope that it will be useful, -->
<!-- but WITHOUT ANY WARRANTY; without even the implied warranty of -->
<!-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -->
<!-- Lesser General Public License for more details. -->
<!-- -->
<!-- You should have received a copy of the GNU Lesser General Public -->
<!-- License along with this library; if not, write to the Free Software -->
<!-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -->
<!-- -->
<!-- Contact: frascati@ow2.org -->
<!-- -->
<!-- Author: Gwenael CATTEZ -->
<!-- -->
<!-- Contributors : -->
<composite
xmlns=
"http://www.osoa.org/xmlns/sca/1.0"
xmlns:xsd=
"http://www.w3.org/2001/XMLSchema"
xmlns:wsdli=
"http://www.w3.org/2004/08/wsdl-instance"
name=
"light"
>
<component
name=
"light"
>
<property
name=
"moduleID"
>
A10
</property>
<property
name=
"protocolID"
>
0
</property>
<property
name=
"onText"
>
turn on
</property>
<property
name=
"offText"
>
turn off
</property>
<property
name=
"onIconPath"
>
images/light_on.png
</property>
<property
name=
"offIconPath"
>
images/light_off.png
</property>
<service
name=
"onoffdim-actuator"
>
<interface.java
interface=
"org.ow2.frascati.demo.common.homeautomation.actuator.OnOffDimActuator"
/>
</service>
<implementation.java
class=
"org.ow2.frascati.demo.common.homeautomation.light.Light"
/>
<reference
name=
"zibase"
>
<interface.wsdl
interface=
"zibase.wsdl#wsdl.interface(ZibasePortType)"
/>
<binding.ws
uri=
"http://localhost:9100/zibase/invoke"
wsdlElement=
"http://zibase.demo.frascati.ow2.org/#wsdl.port(Zibase/ZibasePort)"
/>
</reference>
</component>
<service
name=
"onoffdim-actuator"
promote=
"light/onoffdim-actuator"
>
<binding.ws
uri=
"http://localhost:9103/light/onoffdim"
/>
</service>
</composite>
\ No newline at end of file
demo/common/common-homeautomation/common-homeautomation-switch/pom.xml
0 → 100644
View file @
e1a726db
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright (C) 2008-2012 Inria, University of Lille -->
<!-- -->
<!-- This library is free software; you can redistribute it and/or -->
<!-- modify it under the terms of the GNU Lesser General Public -->
<!-- License as published by the Free Software Foundation; either -->
<!-- version 2 of the License, or (at your option) any later version. -->
<!-- -->
<!-- This library is distributed in the hope that it will be useful, -->
<!-- but WITHOUT ANY WARRANTY; without even the implied warranty of -->
<!-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -->
<!-- Lesser General Public License for more details. -->
<!-- -->
<!-- You should have received a copy of the GNU Lesser General Public -->
<!-- License along with this library; if not, write to the Free Software -->
<!-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -->
<!-- -->
<!-- Contact: frascati@ow2.org -->
<!-- -->
<!-- Author: Gwenael CATTEZ -->
<!-- -->
<!-- Contributors : -->
<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/xsd/maven-4.0.0.xsd"
>
<modelVersion>
4.0.0
</modelVersion>
<parent>
<artifactId>
common-homeautomation
</artifactId>
<groupId>
org.ow2.frascati.demo
</groupId>
<version>
0.0.1-SNAPSHOT
</version>
<relativePath>
..
</relativePath>
</parent>
<artifactId>
common-homeautomation-switch
</artifactId>
<name>
Common Switch component
</name>
<properties>