Skip to content

Commit

Permalink
New version supporting different communication protocols. Code improved
Browse files Browse the repository at this point in the history
for event-based applications.
  • Loading branch information
estevaosaleme committed Mar 27, 2018
1 parent de29ca9 commit fb68799
Show file tree
Hide file tree
Showing 44 changed files with 1,316 additions and 277 deletions.
38 changes: 29 additions & 9 deletions .classpath
Original file line number Diff line number Diff line change
@@ -1,12 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
<classpathentry kind="lib" path="libs/cling-core-2.0.1.jar"/>
<classpathentry kind="lib" path="libs/seamless-http-1.1.0.jar"/>
<classpathentry kind="lib" path="libs/seamless-util-1.1.0.jar"/>
<classpathentry kind="lib" path="libs/seamless-xml-1.1.0.jar"/>
<classpathentry kind="lib" path="libs/mpeg-metadata-1.0.0.jar"/>
<classpathentry kind="lib" path="libs/RXTXcomm.jar"/>
<classpathentry kind="output" path="bin"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="local-repo/lprm/mpeg-metadata/1.0.0/mpeg-metadata-1.0.0.jar"/>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
/bin
/target/
14 changes: 13 additions & 1 deletion .project
Original file line number Diff line number Diff line change
@@ -1,17 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>SERenderer</name>
<name>PlaySEM_SERenderer</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.wst.common.project.facet.core.builder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
</natures>
</projectDescription>
3 changes: 3 additions & 0 deletions .settings/org.eclipse.buildship.core.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER)
connection.project.dir=
eclipse.preferences.version=1
3 changes: 3 additions & 0 deletions .settings/org.eclipse.core.resources.prefs
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
eclipse.preferences.version=1
encoding//src/main/java=UTF-8
encoding//src/main/resources=UTF-8
encoding//src/test/java=UTF-8
encoding/<project>=UTF-8
7 changes: 4 additions & 3 deletions .settings/org.eclipse.jdt.core.prefs
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.7
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.8
4 changes: 4 additions & 0 deletions .settings/org.eclipse.m2e.core.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1
37 changes: 37 additions & 0 deletions Californium.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#Californium CoAP Properties file
#Tue Aug 08 16:10:59 BRT 2017
DEFAULT_ENDPOINT_THREAD_COUNT=1
MAX_TRANSMIT_WAIT=93000
MAX_RETRANSMIT=4
UDP_CONNECTOR_SENDER_THREAD_COUNT=1
DEFAULT_LEISURE=5000
NOTIFICATION_MAX_AGE=128000
CROP_ROTATION_PERIOD=2000
USE_RANDOM_MID_START=true
ACK_TIMEOUT_SCALE=2
UDP_CONNECTOR_DATAGRAM_SIZE=2000
DEDUPLICATOR=DEDUPLICATOR_MARK_AND_SWEEP
HTTP_PORT=88080
NSTART=1
NOTIFICATION_CHECK_INTERVAL=86400000
MAX_MESSAGE_SIZE=1024
DEFAULT_COAP_PORT=5683
DEFAULT_BLOCK_SIZE=512
UDP_CONNECTOR_RECEIVE_BUFFER=0
ACK_TIMEOUT=2000
HTTP_CACHE_SIZE=32
UDP_CONNECTOR_OUT_CAPACITY=2147483647
HTTP_SERVER_SOCKET_BUFFER_SIZE=8192
ACK_RANDOM_FACTOR=1.5
MARK_AND_SWEEP_INTERVAL=10000
NOTIFICATION_CHECK_INTERVAL_COUNT=100
HTTP_CACHE_RESPONSE_MAX_AGE=86400
UDP_CONNECTOR_LOG_PACKETS=false
PROBING_RATE=1.0
NOTIFICATION_REREGISTRATION_BACKOFF=2000
EXCHANGE_LIFECYCLE=247000
SERVER_THRESD_NUMER=8
UDP_CONNECTOR_RECEIVER_THREAD_COUNT=1
UDP_CONNECTOR_SEND_BUFFER=0
HTTP_SERVER_SOCKET_TIMEOUT=100000
USE_RANDOM_TOKEN_START=true
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,12 @@
See wiki for more information: https://github.com/estevaosaleme/PlaySEM_SERenderer/wiki


mvn package
java -Xbootclasspath/p:alpn-boot-$ALPN_VERSION.jar -jar target/jetty-http2-echo-server.jar

RestfulHttp2Service
VMarguments
-Xbootclasspath/p:libs/alpn-boot-8.1.9.v20160720.jar


mvn exec:java -Dexec.mainClass=com.hascode.tutorial.mqtt.Ma
7 changes: 7 additions & 0 deletions config.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#PlaySEM SE Renderer - Settings
emulateDevices=true
debugMode=true
serial_port=COM3
#Communication mode
#UPNP,WEBSOCKET,COAP,MQTT (Sensitive case) (In case of problem, check your firewall)
communicationMode=WEBSOCKET
Binary file removed docs/PlaySEM_SERenderer_Interface.png
Binary file not shown.
Binary file removed libs/RXTXcomm.jar
Binary file not shown.
Binary file removed libs/cling-core-2.0.1.jar
Binary file not shown.
Binary file removed libs/rxtxSerial.dll
Binary file not shown.
Binary file removed libs/seamless-http-1.1.0.jar
Binary file not shown.
Binary file removed libs/seamless-util-1.1.0.jar
Binary file not shown.
Binary file removed libs/seamless-xml-1.1.0.jar
Binary file not shown.
File renamed without changes.
9 changes: 9 additions & 0 deletions log4j.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Set root logger level to DEBUG and its only appender to A1.
log4j.rootLogger=DEBUG, A1

# A1 is set to be a ConsoleAppender.
log4j.appender.A1=org.apache.log4j.ConsoleAppender

# A1 uses PatternLayout.
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
200 changes: 200 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,200 @@
<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>
<groupId>PlaySEM</groupId>
<artifactId>PlaySEM-SER</artifactId>
<version>1.1.0-SNAPSHOT</version>
<packaging>jar</packaging>

<repositories>
<!-- moquette -->
<repository>
<id>bintray</id>
<url>https://jcenter.bintray.com</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<!-- cling-upnp -->
<repository>
<id>4thline</id>
<url>http://4thline.org/m2/</url>
</repository>
<!-- local-maven-repo -->
<repository>
<id>local-maven-repo</id>
<url>file:///${project.basedir}/local-repo</url>
</repository>
</repositories>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jetty-version>9.4.0.v20161208</jetty-version>
</properties>

<build>

<plugins>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<archive>
<manifest>
<mainClass>
br.ufes.inf.lprm.sensoryeffect.renderer.SERendererBroker
</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</execution>
</executions>
</plugin>

</plugins>

</build>

<dependencies>
<!-- To write basic websockets -->
<dependency>
<groupId>org.eclipse.jetty.websocket</groupId>
<artifactId>websocket-api</artifactId>
<version>${jetty-version}</version>
</dependency>

<!-- To run websockets in embedded server -->
<dependency>
<groupId>org.eclipse.jetty.websocket</groupId>
<artifactId>websocket-server</artifactId>
<version>${jetty-version}</version>
</dependency>

<!-- https://mvnrepository.com/artifact/org.eclipse.jetty.aggregate/jetty-all -->
<dependency>
<groupId>org.eclipse.jetty.aggregate</groupId>
<artifactId>jetty-all</artifactId>
<version>${jetty-version}</version>
<type>pom</type>
</dependency>
<!-- https://mvnrepository.com/artifact/org.eclipse.jetty/jetty-server -->
<dependency>
<groupId>org.eclipse.jetty.http2</groupId>
<artifactId>http2-server</artifactId>
<version>${jetty-version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-alpn-server</artifactId>
<version>${jetty-version}</version>
</dependency>


<!-- https://mvnrepository.com/artifact/org.eclipse.californium/californium-core -->
<dependency>
<groupId>org.eclipse.californium</groupId>
<artifactId>californium-core</artifactId>
<version>2.0.0-M4</version>
</dependency>

<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.5</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.7.5</version>
</dependency>

<!-- mqtt moquette -->
<dependency>
<groupId>io.moquette</groupId>
<artifactId>moquette-broker</artifactId>
<version>0.10</version>
</dependency>

<!-- Json simple -->
<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
<version>1.1.1</version>
</dependency>

<!-- https://mvnrepository.com/artifact/commons-io/commons-io -->
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.5</version>
</dependency>

<!-- https://mvnrepository.com/artifact/org.fourthline.cling/cling-core -->
<dependency>
<groupId>org.fourthline.cling</groupId>
<artifactId>cling-core</artifactId>
<version>2.1.1</version>
</dependency>

<!-- https://mvnrepository.com/artifact/org.seamless/seamless-http -->
<dependency>
<groupId>org.seamless</groupId>
<artifactId>seamless-http</artifactId>
<version>1.1.0</version>
</dependency>

<!-- https://mvnrepository.com/artifact/org.seamless/seamless-util -->
<dependency>
<groupId>org.seamless</groupId>
<artifactId>seamless-util</artifactId>
<version>1.1.0</version>
</dependency>

<!-- https://mvnrepository.com/artifact/org.seamless/seamless-xml -->
<dependency>
<groupId>org.seamless</groupId>
<artifactId>seamless-xml</artifactId>
<version>1.1.0</version>
</dependency>

<!-- https://mvnrepository.com/artifact/org.rxtx/rxtx -->
<dependency>
<groupId>org.rxtx</groupId>
<artifactId>rxtx</artifactId>
<version>2.1.7</version>
</dependency>

<!-- local repo -->
<dependency>
<groupId>lprm</groupId>
<artifactId>mpeg-metadata</artifactId>
<version>1.0.0</version>
</dependency>

</dependencies>

</project>
Loading

0 comments on commit fb68799

Please sign in to comment.