projects
/
iot2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
f91c1fb
)
Exchanging cameras between benchmarks; updating database
author
rtrimana
<rtrimana@uci.edu>
Tue, 16 Jan 2018 00:27:28 +0000
(16:27 -0800)
committer
rtrimana
<rtrimana@uci.edu>
Tue, 16 Jan 2018 00:27:28 +0000
(16:27 -0800)
benchmarks/Java/HomeSecurityController/HomeSecurityController.java
patch
|
blob
|
history
benchmarks/Java/HomeSecurityController/Makefile
patch
|
blob
|
history
benchmarks/Java/IrrigationController/IrrigationController.java
patch
|
blob
|
history
benchmarks/Java/SmartLightsController/SmartLightsController.java
patch
|
blob
|
history
localconfig/mysql/camSet.config
patch
|
blob
|
history
localconfig/mysql/cameraSet.config
patch
|
blob
|
history
localconfig/mysql/cameras.config
patch
|
blob
|
history
others/Mysql/IoTMain.gz
patch
|
blob
|
history
diff --git
a/benchmarks/Java/HomeSecurityController/HomeSecurityController.java
b/benchmarks/Java/HomeSecurityController/HomeSecurityController.java
index b6a398a9b5e494f3852c78df84344bb7ba8c34f4..2ef8dc5543c1841a9baf9e15538f6d4817f811de 100644
(file)
--- a/
benchmarks/Java/HomeSecurityController/HomeSecurityController.java
+++ b/
benchmarks/Java/HomeSecurityController/HomeSecurityController.java
@@
-624,11
+624,11
@@
public class HomeSecurityController implements SmartthingsSensorCallback, Smartt
*/
public void init() {
*/
public void init() {
- System.out.println("DEBUG: Stopping here for debug purposes!");
- while(true) { }
+
//
System.out.println("DEBUG: Stopping here for debug purposes!");
+
//
while(true) { }
// Initialize IoTCloud server
// Initialize IoTCloud server
-
/*
initIoTCloudServer();
+ initIoTCloudServer();
// Iterate over the set of rooms
for (RoomSmart rm : roomSet.values()) {
// Iterate over the set of rooms
for (RoomSmart rm : roomSet.values()) {
@@
-673,7
+673,7
@@
public class HomeSecurityController implements SmartthingsSensorCallback, Smartt
}
}
}
}
- }
*/
+ }
}
}
}
}
diff --git
a/benchmarks/Java/HomeSecurityController/Makefile
b/benchmarks/Java/HomeSecurityController/Makefile
index 9d3aee2864ceeb57f67b273bdef4174e91f5b8ac..ca4234cc0dba3415c832f87b4f57e0a97b1f7130 100644
(file)
--- a/
benchmarks/Java/HomeSecurityController/Makefile
+++ b/
benchmarks/Java/HomeSecurityController/Makefile
@@
-22,14
+22,14
@@
PHONY += homesecurity
homesecurity:
$(JAVAC) $(JFLAGS) *.java
cp HomeSecurityController.config $(BIN_DIR)/HomeSecurityController
homesecurity:
$(JAVAC) $(JFLAGS) *.java
cp HomeSecurityController.config $(BIN_DIR)/HomeSecurityController
- cp HomeSecurityController.tomoyo $(BIN_DIR)/HomeSecurityController
+
#
cp HomeSecurityController.tomoyo $(BIN_DIR)/HomeSecurityController
cd $(BIN_DIR)/HomeSecurityController; $(JAR) $(JARFLAGS) HomeSecurityController.jar ../HomeSecurityController/HomeSecurityController*.class ../HomeSecurityController/*.class ../iotcode/interfaces/SmartthingsSensor*.class ../iotcode/interfaces/SmartthingsActuator*.class ../iotcode/interfaces/Camera*.class ../iotcode/interfaces/Alarm*.class ../iotcode/interfaces/Room*.class ../iotcode/interfaces/ZoneState*.class ../iotcode/interfaces/Resolution*.class
PHONY += check-homesecurity
check-homesecurity:
$(JAVAC) $(JFLAGS) $(CHECKER_OPT) $(ASTUBS) *.java
cp HomeSecurityController.config $(BIN_DIR)/HomeSecurityController
cd $(BIN_DIR)/HomeSecurityController; $(JAR) $(JARFLAGS) HomeSecurityController.jar ../HomeSecurityController/HomeSecurityController*.class ../HomeSecurityController/*.class ../iotcode/interfaces/SmartthingsSensor*.class ../iotcode/interfaces/SmartthingsActuator*.class ../iotcode/interfaces/Camera*.class ../iotcode/interfaces/Alarm*.class ../iotcode/interfaces/Room*.class ../iotcode/interfaces/ZoneState*.class ../iotcode/interfaces/Resolution*.class
PHONY += check-homesecurity
check-homesecurity:
$(JAVAC) $(JFLAGS) $(CHECKER_OPT) $(ASTUBS) *.java
cp HomeSecurityController.config $(BIN_DIR)/HomeSecurityController
- cp HomeSecurityController.tomoyo $(BIN_DIR)/HomeSecurityController
+
#
cp HomeSecurityController.tomoyo $(BIN_DIR)/HomeSecurityController
cd $(BIN_DIR)/HomeSecurityController; $(JAR) $(JARFLAGS) HomeSecurityController.jar ../HomeSecurityController/HomeSecurityController*.class ../HomeSecurityController/*.class ../iotcode/interfaces/SmartthingsSensor*.class ../iotcode/interfaces/SmartthingsActuator*.class ../iotcode/interfaces/Camera*.class ../iotcode/interfaces/Alarm*.class ../iotcode/interfaces/Room*.class ../iotcode/interfaces/ZoneState*.class ../iotcode/interfaces/Resolution*.class
.PHONY: $(PHONY)
cd $(BIN_DIR)/HomeSecurityController; $(JAR) $(JARFLAGS) HomeSecurityController.jar ../HomeSecurityController/HomeSecurityController*.class ../HomeSecurityController/*.class ../iotcode/interfaces/SmartthingsSensor*.class ../iotcode/interfaces/SmartthingsActuator*.class ../iotcode/interfaces/Camera*.class ../iotcode/interfaces/Alarm*.class ../iotcode/interfaces/Room*.class ../iotcode/interfaces/ZoneState*.class ../iotcode/interfaces/Resolution*.class
.PHONY: $(PHONY)
diff --git
a/benchmarks/Java/IrrigationController/IrrigationController.java
b/benchmarks/Java/IrrigationController/IrrigationController.java
index c06646ff0f87a9b608fcb8b894ab4da10f0786c9..4bcec6248df9c38bfd1364bf8534a5b6976ba414 100644
(file)
--- a/
benchmarks/Java/IrrigationController/IrrigationController.java
+++ b/
benchmarks/Java/IrrigationController/IrrigationController.java
@@
-257,18
+257,18
@@
public class IrrigationController extends UnicastRemoteObject implements Weather
}
System.out.println("DEBUG: Waiting for phone to send weather information");
}
System.out.println("DEBUG: Waiting for phone to send weather information");
- while (waitingForInterface.get()) {
-
try {
-
Thread.sleep(1000);
-
} catch (Exception e) {
-
e.printStackTrace();
-
}
- }
+
//
while (waitingForInterface.get()) {
+
//
try {
+
//
Thread.sleep(1000);
+
//
} catch (Exception e) {
+
//
e.printStackTrace();
+
//
}
+
//
}
// TODO: Use a phone input interface later
// TODO: Use a phone input interface later
-
//
inchesPerWeek = 20.00;
-
//
weatherZipCode = 92612;
-
//
daysToWaterOn = 255;
-
//
inchesPerMinute.add(1.50);
+ inchesPerWeek = 20.00;
+ weatherZipCode = 92612;
+ daysToWaterOn = 255;
+ inchesPerMinute.add(1.50);
System.out.println("DEBUG: inchesPerWeek: " + inchesPerWeek);
System.out.println("DEBUG: weatherZipCode: " + weatherZipCode);
System.out.println("DEBUG: inchesPerWeek: " + inchesPerWeek);
System.out.println("DEBUG: weatherZipCode: " + weatherZipCode);
@@
-330,6
+330,8
@@
public class IrrigationController extends UnicastRemoteObject implements Weather
// init the sprinkler controller, do it here since it only needs to be done once per controller
try {
spr.init();
// init the sprinkler controller, do it here since it only needs to be done once per controller
try {
spr.init();
+ // Wait until sprinkler is active
+ Thread.sleep(30000);
} catch (Exception e) {
e.printStackTrace();
}
} catch (Exception e) {
e.printStackTrace();
}
diff --git
a/benchmarks/Java/SmartLightsController/SmartLightsController.java
b/benchmarks/Java/SmartLightsController/SmartLightsController.java
index 9f3ad93dd23864cbafb3752e2da2794a063633b8..4f1c915e9b50de1ca76713c2004fada6b05cf3af 100644
(file)
--- a/
benchmarks/Java/SmartLightsController/SmartLightsController.java
+++ b/
benchmarks/Java/SmartLightsController/SmartLightsController.java
@@
-340,7
+340,7
@@
public class SmartLightsController {
System.out.println("Initialized rooms!");
// Setup the cameras, start them all and assign each one a motion detector
System.out.println("Initialized rooms!");
// Setup the cameras, start them all and assign each one a motion detector
-
for (CameraSmart cam : cameras.values()) {
+
/*
for (CameraSmart cam : cameras.values()) {
// Each camera will have a motion detector unique to it since the motion detection has state
MotionDetection mo = new MotionDetection(12, 0.5f, 10, 10);
// Each camera will have a motion detector unique to it since the motion detection has state
MotionDetection mo = new MotionDetection(12, 0.5f, 10, 10);
@@
-362,6
+362,8
@@
public class SmartLightsController {
camMotionDetect.put(cam, mo);
}
System.out.println("Initialized cameras!");
camMotionDetect.put(cam, mo);
}
System.out.println("Initialized cameras!");
+*/
+ System.out.println("Skipped cameras!");
//Initialize the light-bulbs, will turn off the bulb
for (LightBulbSmart bulb : mainRoomLightBulbs.values()) {
//Initialize the light-bulbs, will turn off the bulb
for (LightBulbSmart bulb : mainRoomLightBulbs.values()) {
@@
-371,9
+373,12
@@
public class SmartLightsController {
Thread.sleep(1000);
}
System.out.println("Initialized bulbs!");
Thread.sleep(1000);
}
System.out.println("Initialized bulbs!");
+
+ System.out.println("STOP here until we have 2 more working cameras!");
+ while (true) { }
// Run the main loop that will keep check the bulbs and rooms periodically
// Run the main loop that will keep check the bulbs and rooms periodically
-
while (true) {
+
/*
while (true) {
// Run this code every <specified time>
long currentTimeSeconds = (new Date()).getTime() / 1000;
// Run this code every <specified time>
long currentTimeSeconds = (new Date()).getTime() / 1000;
@@
-410,7
+415,7
@@
public class SmartLightsController {
}
}
}
}
- }
+ }
*/
}
}
}
}
diff --git
a/localconfig/mysql/camSet.config
b/localconfig/mysql/camSet.config
index 9b21ecdb943177138ef51f6b181bed0b204c6009..b6c0316a56697ea168903985ecb574a5d557dd5a 100644
(file)
--- a/
localconfig/mysql/camSet.config
+++ b/
localconfig/mysql/camSet.config
@@
-1,5
+1,5
@@
SELECT * FROM
CameraSmart
WHERE
SELECT * FROM
CameraSmart
WHERE
-ID='CM
4
'
+ID='CM
2
'
;
;
diff --git
a/localconfig/mysql/cameraSet.config
b/localconfig/mysql/cameraSet.config
index 4233b236d43a3150edded771570980a70787f964..5798c171313152480bc35c4628c6ee76e3206fbd 100644
(file)
--- a/
localconfig/mysql/cameraSet.config
+++ b/
localconfig/mysql/cameraSet.config
@@
-1,5
+1,5
@@
-SELECT * FROM
\r
-CameraSmart
\r
-WHERE
\r
-ID='CM
3'
\r
-;
\r
+SELECT * FROM
+CameraSmart
+WHERE
+ID='CM
1'
+;
diff --git
a/localconfig/mysql/cameras.config
b/localconfig/mysql/cameras.config
index e84b46408d40ffee2c9cb1d18bd1ca7d3fdab6ee..d4f64bd80f6406283c03431e9a5e186ac2c1b600 100644
(file)
--- a/
localconfig/mysql/cameras.config
+++ b/
localconfig/mysql/cameras.config
@@
-1,5
+1,5
@@
SELECT * FROM
CameraSmart
WHERE
SELECT * FROM
CameraSmart
WHERE
-ID='CM
1' or ID='CM2
'
+ID='CM
3' or ID='CM4
'
;
;
diff --git
a/others/Mysql/IoTMain.gz
b/others/Mysql/IoTMain.gz
index 123e17bec1456172b01cfc21ba41ca320fca69ae..5604d94dc3d2f192d392eae8fb95c599a2792660 100644
(file)
Binary files a/others/Mysql/IoTMain.gz and b/others/Mysql/IoTMain.gz differ