Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
encounters
EncounterBasedCommunication
Commits
42462e1c
Commit
42462e1c
authored
Dec 11, 2018
by
Roberta De Viti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
print exception
parent
a551f513
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
2 deletions
+16
-2
testapp/src/main/java/org/mpisws/testapp/simulator/Alarm.java
...app/src/main/java/org/mpisws/testapp/simulator/Alarm.java
+4
-0
testapp/src/main/java/org/mpisws/testapp/simulator/NullWakelock.java
.../main/java/org/mpisws/testapp/simulator/NullWakelock.java
+4
-0
testapp/src/main/java/org/mpisws/testapp/simulator/SimulationClientBT.java
...java/org/mpisws/testapp/simulator/SimulationClientBT.java
+8
-2
No files found.
testapp/src/main/java/org/mpisws/testapp/simulator/Alarm.java
0 → 100644
View file @
42462e1c
package
org.mpisws.testapp.simulator
;
public
class
Alarm
{
}
testapp/src/main/java/org/mpisws/testapp/simulator/NullWakelock.java
0 → 100644
View file @
42462e1c
package
org.mpisws.testapp.simulator
;
public
class
NullWakelock
{
}
testapp/src/main/java/org/mpisws/testapp/simulator/SimulationClientBT.java
View file @
42462e1c
...
...
@@ -29,7 +29,7 @@ import java.util.UUID;
*/
public
class
SimulationClientBT
{
Context
context
;
protected
static
final
int
NUM_SIMULATED_DEVICES
=
10
0
;
protected
static
final
int
NUM_SIMULATED_DEVICES
=
10
;
protected
static
final
int
NUM_SIMULATED_EPOCHS
=
10
;
private
static
final
String
TAG
=
SimulationClientBT
.
class
.
getSimpleName
();
...
...
@@ -115,10 +115,13 @@ public class SimulationClientBT {
}
private
void
sendDHKeysOverSocket
(
BluetoothSocket
sock
)
{
try
{
if
(
sock
==
null
)
return
;
OutputStream
os
=
sock
.
getOutputStream
();
ObjectOutputStream
out
=
new
ObjectOutputStream
(
os
);
out
.
writeObject
(
mSharedSecrets
);
out
.
writeObject
(
otherDHNonces
);
out
.
writeObject
(
otherDHPubKeys
);
...
...
@@ -130,12 +133,15 @@ public class SimulationClientBT {
Log
.
d
(
TAG
,
"Got response: "
+
line
);
in
.
close
();
os
.
close
();
out
.
close
();
os
.
close
();
sock
.
close
();
}
catch
(
IOException
e
)
{
System
.
out
.
println
(
"SimulationClient: General I/O exception: "
+
e
.
getMessage
());
e
.
printStackTrace
();
}
// run the simulator core
Log
.
d
(
TAG
,
"Running simulator core!"
);
new
Thread
(
core
).
start
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment