From: joelbandi Date: Fri, 22 Jul 2016 21:28:41 +0000 (-0700) Subject: Merge branch 'master' of ssh://plrg.eecs.uci.edu/home/git/iotcloud X-Git-Url: http://plrg.eecs.uci.edu/git/?p=iotcloud.git;a=commitdiff_plain;h=31fb11ef209d4f4d6d935320796b8e78a55c9722;hp=f4129f71302f3d6650c07e6559c1093aabc59135 Merge branch 'master' of ssh://plrg.eecs.uci.edu/home/git/iotcloud --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..307c75e --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +*.class +build/ +compiled/ + diff --git a/src/serverJ/.idea/compiler.xml b/src/serverJ/.idea/compiler.xml new file mode 100644 index 0000000..05ea1dc --- /dev/null +++ b/src/serverJ/.idea/compiler.xml @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/serverJ/.idea/copyright/profiles_settings.xml b/src/serverJ/.idea/copyright/profiles_settings.xml new file mode 100644 index 0000000..e7bedf3 --- /dev/null +++ b/src/serverJ/.idea/copyright/profiles_settings.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/src/serverJ/.idea/libraries/Maven__org_bouncycastle_bcprov_jdk15on_1_52.xml b/src/serverJ/.idea/libraries/Maven__org_bouncycastle_bcprov_jdk15on_1_52.xml new file mode 100644 index 0000000..4b942f1 --- /dev/null +++ b/src/serverJ/.idea/libraries/Maven__org_bouncycastle_bcprov_jdk15on_1_52.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/serverJ/.idea/libraries/Maven__org_json_json_20090211.xml b/src/serverJ/.idea/libraries/Maven__org_json_json_20090211.xml new file mode 100644 index 0000000..e57dc0a --- /dev/null +++ b/src/serverJ/.idea/libraries/Maven__org_json_json_20090211.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/serverJ/.idea/misc.xml b/src/serverJ/.idea/misc.xml new file mode 100644 index 0000000..233a7f0 --- /dev/null +++ b/src/serverJ/.idea/misc.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/serverJ/.idea/modules.xml b/src/serverJ/.idea/modules.xml new file mode 100644 index 0000000..ef33d7f --- /dev/null +++ b/src/serverJ/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/src/serverJ/.idea/workspace.xml b/src/serverJ/.idea/workspace.xml new file mode 100644 index 0000000..655dfea --- /dev/null +++ b/src/serverJ/.idea/workspace.xml @@ -0,0 +1,770 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1469215057799 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No facets are configured + + + + + + + + + + + + + + + 1.8 + + + + + + + + serverJ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/serverJ/pom.xml b/src/serverJ/pom.xml new file mode 100644 index 0000000..ec5d251 --- /dev/null +++ b/src/serverJ/pom.xml @@ -0,0 +1,25 @@ + + + 4.0.0 + + com.iotcloud.iot + iotcloudserverlib + 1.0-SNAPSHOT + + + + org.bouncycastle + bcprov-jdk15on + 1.52 + + + org.json + json + 20090211 + + + + + \ No newline at end of file diff --git a/src/serverJ/serverJ.iml b/src/serverJ/serverJ.iml new file mode 100644 index 0000000..61230e4 --- /dev/null +++ b/src/serverJ/serverJ.iml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/serverJ/src/main/java/com/iotcloud/iot/slots/Slot.java b/src/serverJ/src/main/java/com/iotcloud/iot/slots/Slot.java new file mode 100644 index 0000000..33605e9 --- /dev/null +++ b/src/serverJ/src/main/java/com/iotcloud/iot/slots/Slot.java @@ -0,0 +1,28 @@ +package com.iotcloud.iot.slots; + +/** + * Created by joel on 7/22/16. + */ + +import org.json.JSONException; +import org.json.JSONObject; +public class Slot { + + + //int is not a good choice for sequenceNumber I believe; + + int sequenceNumber; + String slotValue; + + public Slot(int sequenceNumber, String slotValue) { + this.sequenceNumber = sequenceNumber; + this.slotValue = slotValue; + } + + public String toJsonString() throws JSONException { + JSONObject obj = new JSONObject(); + obj.put(Integer.toString(this.sequenceNumber),this.slotValue); + return obj.toString(); + } + +}