Permalink
Browse files

Merge with main repo

  • Loading branch information...
jschober88 committed Sep 10, 2014
1 parent a3fd292 commit 2fcf99fc10489f31182b774a76b34db53f4135fd
Showing with 14,435 additions and 1,580 deletions.
  1. BIN .gradle/1.12/taskArtifacts/cache.properties.lock
  2. +2 −2 build.gradle
  3. +10 −10 iotsys-bacnet/src/at/ac/tuwien/auto/iotsys/gateway/connectors/bacnet/BACnetConnector.java
  4. +1 −0 iotsys-bacnet4j/src/com/serotonin/bacnet4j/npdu/ip/IpMessageControl.java
  5. +9 −1 iotsys-common/build.gradle
  6. +1 −1 iotsys-common/src/at/ac/tuwien/auto/iotsys/commons/obix/objects/HistoryFilterImpl.java
  7. +42 −0 iotsys-common/src/at/ac/tuwien/auto/iotsys/commons/persistent/UIDb.java
  8. +101 −0 iotsys-common/src/at/ac/tuwien/auto/iotsys/commons/persistent/UIDbImpl.java
  9. +265 −0 iotsys-common/src/at/ac/tuwien/auto/iotsys/commons/persistent/UIDbRepo.java
  10. +0 −2 iotsys-common/src/at/ac/tuwien/auto/iotsys/commons/persistent/models/Canvas.java
  11. +85 −0 iotsys-common/src/at/ac/tuwien/auto/iotsys/commons/persistent/models/CanvasObject.java
  12. +53 −0 iotsys-common/src/at/ac/tuwien/auto/iotsys/commons/persistent/models/CanvasObjectConnection.java
  13. +62 −0 iotsys-common/src/at/ac/tuwien/auto/iotsys/commons/persistent/models/UIKeyValue.java
  14. +77 −0 iotsys-common/src/at/ac/tuwien/auto/iotsys/commons/persistent/models/User.java
  15. +7 −2 iotsys-enocean-library/src/org/opencean/core/EnoceanSerialConnector.java
  16. +38 −13 iotsys-gateway/build.gradle
  17. +9 −34 iotsys-gateway/config/devices.xml
  18. +3 −1 iotsys-gateway/config/iotsys.properties
  19. +50 −28 iotsys-gateway/res/login/login.html
  20. +33 −12 iotsys-gateway/res/login_error/login-failed.html
  21. +45 −24 iotsys-gateway/res/obelix/index.html
  22. +1,535 −1,205 iotsys-gateway/res/obelix/javascripts/app.js
  23. +1 −1 iotsys-gateway/res/obelix/stylesheets/app.css
  24. +0 −1 iotsys-gateway/res/obelix/stylesheets/jquery.qtip.css
  25. +0 −1 iotsys-gateway/res/obelix/stylesheets/tourist.css
  26. +2 −0 iotsys-gateway/src/at/ac/tuwien/auto/iotsys/gateway/IoTSySGateway.java
  27. +1 −1 iotsys-gateway/src/at/ac/tuwien/auto/iotsys/gateway/IoTSySGatewayActivator.java
  28. +5 −1 iotsys-gateway/src/at/ac/tuwien/auto/iotsys/gateway/obix/objectbroker/ObjectBrokerImpl.java
  29. +4 −0 iotsys-gateway/src/at/ac/tuwien/auto/iotsys/gateway/obix/server/ObixServer.java
  30. +13 −0 iotsys-gateway/src/at/ac/tuwien/auto/iotsys/gateway/obix/server/ObixServerImpl.java
  31. +36 −32 iotsys-gateway/src/at/ac/tuwien/auto/iotsys/gateway/obix/server/TomcatServer.java
  32. +4 −4 iotsys-gateway/src/at/ac/tuwien/auto/iotsys/gateway/obix/server/TomcatServerNoSecurity.java
  33. +197 −0 iotsys-gateway/src/at/ac/tuwien/auto/iotsys/gateway/obix/server/UIDbServlet.java
  34. +2 −2 iotsys-gateway/test/at/ac/tuwien/auto/iotsys/gateway/test/HistoryServiceTest.java
  35. +0 −10 iotsys-gateway/test/at/ac/tuwien/auto/iotsys/mdnssd/test/DnsServiceTest.java
  36. +1 −0 iotsys-osgi/build.gradle
  37. +53 −0 iotsys-tomcat/build.gradle
  38. BIN {iotsys-gateway/lib/tomcat → iotsys-tomcat/lib}/ecj-P20140317-1600.jar
  39. BIN {iotsys-gateway/lib/tomcat → iotsys-tomcat/lib}/tomcat-dbcp.jar
  40. BIN {iotsys-gateway/lib/tomcat → iotsys-tomcat/lib}/tomcat-embed-core.jar
  41. BIN {iotsys-gateway/lib/tomcat → iotsys-tomcat/lib}/tomcat-embed-el.jar
  42. BIN {iotsys-gateway/lib/tomcat → iotsys-tomcat/lib}/tomcat-embed-jasper.jar
  43. BIN {iotsys-gateway/lib/tomcat → iotsys-tomcat/lib}/tomcat-embed-logging-juli.jar
  44. BIN {iotsys-gateway/lib/tomcat → iotsys-tomcat/lib}/tomcat-embed-logging-log4j.jar
  45. BIN {iotsys-gateway/lib/tomcat → iotsys-tomcat/lib}/tomcat7-embed-websocket.jar
  46. +2 −2 obelix/config.rb
  47. +43 −27 obelix/source/index.haml
  48. +643 −136 obelix/source/javascripts/app.js
  49. +76 −26 obelix/source/stylesheets/app.scss
  50. +10,923 −0 obelix/vendor/assets/javascripts/canvasjs.js
  51. 0 obelix/{source → vendor/assets}/stylesheets/jquery.qtip.css
  52. 0 obelix/{source → vendor/assets}/stylesheets/tourist.css
  53. +1 −1 settings.gradle
Binary file not shown.
View
@@ -62,11 +62,11 @@ subprojects{
description = 'IoTSyS - Integration middleware for the Internet of Things'
task deploy << {
ant.echo(message:'java -cp "iotsys-coap-0.1.jar;iotsys-rfid-0.1.jar;iotsys-bacnet-0.1.jar;iotsys-bacnet4j-0.1.jar;iotsys-calimero-0.1.jar;iotsys-common-0.1.jar;iotsys-control-0.1.jar;iotsys-encoding-json-0.1.jar;iotsys-gateway-0.1.jar;iotsys-knx-0.1.jar;iotsys-obix-0.1.jar;iotsys-virtual-0.1.jar;iotsys-wmbus-0.1.jar;iotsys-enocean-0.1.jar;iotsys-enocean-library-0.1.jar;iotsys-xacml-0.1.jar;res;iotsys-demoapp-0.1.jar;iotsys-xbee-0.1.jar;iotsys-mdnssd-0.1.jar" at.ac.tuwien.auto.iotsys.gateway.IoTSySGateway', file:distLibRunFile)
ant.echo(message:'java -cp "iotsys-coap-0.1.jar;iotsys-rfid-0.1.jar;iotsys-bacnet-0.1.jar;iotsys-bacnet4j-0.1.jar;iotsys-calimero-0.1.jar;iotsys-common-0.1.jar;iotsys-control-0.1.jar;iotsys-encoding-json-0.1.jar;iotsys-gateway-0.1.jar;iotsys-knx-0.1.jar;iotsys-obix-0.1.jar;iotsys-virtual-0.1.jar;iotsys-wmbus-0.1.jar;iotsys-enocean-0.1.jar;iotsys-enocean-library-0.1.jar;iotsys-xacml-0.1.jar;res;iotsys-demoapp-0.1.jar;iotsys-xbee-0.1.jar;iotsys-mdnssd-0.1.jar;iotsys-tomcat-0.1.jar" at.ac.tuwien.auto.iotsys.gateway.IoTSySGateway', file:distLibRunFile)
ant.echo(message:'IOTSYS_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )${file.separator}"${line.separator}', file:distLibRunFileSh)
ant.echo(message:'cd $IOTSYS_PATH${line.separator}', file:distLibRunFileSh, append:true)
ant.echo(message:'sudo java -cp "${IOTSYS_PATH}iotsys-coap-0.1.jar:${IOTSYS_PATH}iotsys-rfid-0.1.jar:${IOTSYS_PATH}iotsys-bacnet-0.1.jar:${IOTSYS_PATH}iotsys-bacnet4j-0.1.jar:${IOTSYS_PATH}iotsys-calimero-0.1.jar:${IOTSYS_PATH}iotsys-common-0.1.jar:${IOTSYS_PATH}iotsys-control-0.1.jar:${IOTSYS_PATH}iotsys-encoding-json-0.1.jar:${IOTSYS_PATH}iotsys-gateway-0.1.jar:${IOTSYS_PATH}iotsys-knx-0.1.jar:${IOTSYS_PATH}iotsys-obix-0.1.jar:${IOTSYS_PATH}iotsys-virtual-0.1.jar:${IOTSYS_PATH}iotsys-wmbus-0.1.jar:${IOTSYS_PATH}iotsys-enocean-0.1.jar:${IOTSYS_PATH}iotsys-enocean-library-0.1.jar:${IOTSYS_PATH}iotsys-xacml-0.1.jar:${IOTSYS_PATH}res:${IOTSYS_PATH}iotsys-demoapp-0.1.jar:${IOTSYS_PATH}iotsys-xbee-0.1.jar;${IOTSYS_PATH}iotsys-mdnssd-0.1.jar" at.ac.tuwien.auto.iotsys.gateway.IoTSySGateway', file:distLibRunFileSh, append:true)
ant.echo(message:'sudo java -cp "${IOTSYS_PATH}iotsys-coap-0.1.jar:${IOTSYS_PATH}iotsys-rfid-0.1.jar:${IOTSYS_PATH}iotsys-bacnet-0.1.jar:${IOTSYS_PATH}iotsys-bacnet4j-0.1.jar:${IOTSYS_PATH}iotsys-calimero-0.1.jar:${IOTSYS_PATH}iotsys-common-0.1.jar:${IOTSYS_PATH}iotsys-control-0.1.jar:${IOTSYS_PATH}iotsys-encoding-json-0.1.jar:${IOTSYS_PATH}iotsys-gateway-0.1.jar:${IOTSYS_PATH}iotsys-knx-0.1.jar:${IOTSYS_PATH}iotsys-obix-0.1.jar:${IOTSYS_PATH}iotsys-virtual-0.1.jar:${IOTSYS_PATH}iotsys-wmbus-0.1.jar:${IOTSYS_PATH}iotsys-enocean-0.1.jar:${IOTSYS_PATH}iotsys-enocean-library-0.1.jar:${IOTSYS_PATH}iotsys-xacml-0.1.jar:${IOTSYS_PATH}res:${IOTSYS_PATH}iotsys-demoapp-0.1.jar:${IOTSYS_PATH}iotsys-xbee-0.1.jar:${IOTSYS_PATH}iotsys-mdnssd-0.1.jar:iotsys-tomcat-0.1.jar" at.ac.tuwien.auto.iotsys.gateway.IoTSySGateway', file:distLibRunFileSh, append:true)
File deployResDir = new File(distLib.absolutePath + '/res')
File deployConfDir = new File(distLib.absolutePath + '/config')
@@ -54,7 +54,7 @@
import com.serotonin.bacnet4j.util.PropertyReferences;
import com.serotonin.bacnet4j.util.PropertyValues;
public class BACnetConnector extends Connector{
public class BACnetConnector extends Connector {
private static final Logger log = Logger.getLogger(BACnetConnector.class.getName());
public static void main(String[] args) {
new BACnetConnector();
@@ -86,19 +86,19 @@ public BACnetConnector(int localDeviceID, String broadCastIP,
log.info("Creating BACnet connector - localDeviceID: " + localDeviceID + ", broadCastIP: "+ broadCastIP + ", localDevicePort: " + localDevicePort);
localDevice = new LocalDevice(this.localDeviceID, this.broadCastIP);
localDevice.setPort(this.localDevicePort);
localDevice.getEventHandler().addListener(new DeviceListener());
}
public void connect() {
try {
log.info("Initializing BACnet connector.");
try {
localDevice.initialize();
} catch (IOException e1) {
e1.printStackTrace();
}
log.info("Initializing BACnet connector.");
localDevice.getEventHandler().addListener(new DeviceListener());
}
public void connect() {
}
public void disconnect() {
@@ -359,6 +359,7 @@ private void sendImpl(byte[] data, InetSocketAddress addr) throws BACnetExceptio
socket.send(packet);
}
catch (Exception e) {
e.printStackTrace();
throw new BACnetException(e);
}
}
View
@@ -12,6 +12,10 @@ eclipse{
}
}
//repositories {
// flatDir { dirs "lib"}
//}
jar {
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
@@ -192,7 +196,9 @@ jar {
"org.apache.xerces.jaxp.validation," +
"com.csvreader," +
"com.fasterxml.jackson.annotation," +
"com.sun.xml.ws.api.message",
"com.sun.xml.ws.api.message",
//"org.apache.http",
"Import-Package": "obix, obix.asm, obix.contracts, obix.contracts.impl, obix.io, obix.net, obix.test, obix.tools, obix.ui, obix.ui.fields, obix.ui.views, obix.xml,at.ac.tuwien.auto.iotsys.obix, at.ac.tuwien.auto.iotsys.obix.observer," +
"org.xml.sax, org.xml.sax.helpers, org.xml.sax.ext, org.apache.xalan, org.apache.xalan.res, org.w3c.dom, org.w3c.dom.traversal, org.w3c.dom.ls, javax.xml.parsers, javax.xml.xpath, javax.xml.transform.sax, javax.xml.transform.dom, javax.xml.namespace, javax.xml.transform, javax.xml.transform.stream, javax.xml.validation, javax.xml.datatype, javax.net.ssl"
)
@@ -254,6 +260,8 @@ dependencies {
compile ":log4j-1.2.16:"
compile ":slf4j-api-1.6.4:"
compile ":slf4j-log4j12-1.6.4:"
//compile ":mx4j-jmx:"
testCompile group: 'junit',name:'junit',version: '4.8+'
testCompile ":httpclient-4.3"
testCompile ":httpclient-cache-4.3:"
@@ -127,7 +127,7 @@ public Abstime end() {
}
while (limit.get() > 0 & records.size() > limit.get())
records.remove(records.size()-1);// remove the latest or oldest? records.size()-1 or 0
records.remove(0);// remove the latest or oldest? records.size()-1 or 0
return new ArrayList<Obj>(records);
}
@@ -0,0 +1,42 @@
/*
Copyright (c) 2013 - IotSyS Gateway
Institute of Computer Aided Automation, Automation Systems Group, TU Wien.
All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
package at.ac.tuwien.auto.iotsys.commons.persistent;
import java.util.Map;
import at.ac.tuwien.auto.iotsys.commons.persistent.models.User;
/**
* @author Nam Giang - zang at kaist dot ac dot kr
*
*/
public interface UIDb {
public String getValue(String key);
public Map<String, String> getUiStorage();
public void updateBulkKeyValue(Map<String, String> uiKeyValues);
public User getUser(String name);
public void addUser(User u);
public void deleteUser(String name);
public void updateUser(String name, User u);
public boolean authenticateUser(String name, String password);
}
@@ -0,0 +1,101 @@
/*
Copyright (c) 2013 - IotSyS Gateway
Institute of Computer Aided Automation, Automation Systems Group, TU Wien.
All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
package at.ac.tuwien.auto.iotsys.commons.persistent;
import java.util.HashMap;
import java.util.Map;
import java.util.logging.Logger;
import at.ac.tuwien.auto.iotsys.commons.PropertiesLoader;
import at.ac.tuwien.auto.iotsys.commons.persistent.models.User;
/**
* @author Nam Giang - zang at kaist dot ac dot kr
*
*/
public class UIDbImpl implements UIDb {
private static UIDb INSTANCE;
private static final Logger log = Logger.getLogger(UIDbImpl.class.getName());
public static UIDb getInstance(){
INSTANCE = UIDbRepo.getInstance();
if (INSTANCE == null)
INSTANCE = new UIDbImpl();
return INSTANCE;
}
@Override
public String getValue(String key) {
// TODO Auto-generated method stub
return null;
}
@Override
public void updateBulkKeyValue(Map<String, String> uiKeyValues) {
// TODO Auto-generated method stub
}
@Override
public User getUser(String name) {
// TODO Auto-generated method stub
return new User(name, "password", "admin");
}
@Override
public void addUser(User u) {
// TODO Auto-generated method stub
}
@Override
public void deleteUser(String name) {
// TODO Auto-generated method stub
}
@Override
public void updateUser(String name, User u) {
// TODO Auto-generated method stub
}
@Override
public Map<String, String> getUiStorage() {
Map<String, String> sample = new HashMap<String, String>();
sample.put("_id", "uikeyval");
sample.put("device_name", "awefjawei");
return sample;
}
@Override
public boolean authenticateUser(String name, String password) {
// DB not found, proceed with bootstrap account iotsys/s3cret
String bootstrapUser = PropertiesLoader.getInstance().getProperties().getProperty("iotsys.gateway.security.bootstrapUser", "iotsys");
String bootstrapPassword = PropertiesLoader.getInstance().getProperties().getProperty("iotsys.gateway.security.bootstrapPassword", "s3cret");
if (!name.equals(bootstrapUser))
return false;
if (!password.equals(bootstrapPassword))
return false;
return true;
}
}
Oops, something went wrong.

0 comments on commit 2fcf99f

Please sign in to comment.