Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
encounters
EncounterBasedCommunication
Commits
1ffc2b27
Commit
1ffc2b27
authored
Jul 04, 2018
by
LIly
Browse files
Merge branch 'master' of
https://gitlab.mpi-sws.org/encounters/ebc
parents
e84fce76
bd98423f
Changes
1
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
1ffc2b27
...
...
@@ -39,7 +39,7 @@ repositories {
maven { url "https://dl.bintray.com/tslilyai/EncounterBasedCommunication" }
}
dependencies {
compile 'org.mpisws:ebclibrary:0.1.
8
'
compile 'org.mpisws:ebclibrary:0.1.
0.1
'
}
```
...
...
@@ -153,13 +153,11 @@ EncounterQueryConstraint encounterConstraintSpaceTime = new SpaceTimeIntersectCo
null
/*non-null values constrains to encounters overlapping with the specified time value*/
);
/* EXAMPLE: SENDING TO ENCOUNTERS THAT OCCURRED ON YOUR PATH (TRAJECTORY) */
List
<
TrajectoryElement
>
myTrajectory
=
ebc
.
getCommunicationClient
().
getMyTrajectory
(
CURRENT_TIME_MS
()
-
MIN_TO_MS
(
100
)
/*starttime*/
,
CURRENT_TIME_MS
()
/*endtime*/
);
EncounterQueryConstraint
encounterConstraintTrajectory
=
new
TrajectoryConstraint
(
myTrajectory
,
MIN_TO_MS
(
10
)
/* length of overlap with myTrajectory */
,
null
/*non-null values constrains to encounters overlapping with the specified time value*/
);
System
.
currentTimeMillis
()-
DAYS2MS
(
1
),
System
.
currentTimeMillis
(),
MIN2MS
(
10
),
null
// don't factor in causality,
false
);
// Note that this will require the network to be available, as messages through encounters
// are sent via a secure cloud service
...
...
@@ -185,8 +183,8 @@ Client.GetReceivedMessagesCallback callback = new ESClient.GetReceivedMessagesCa
msgText
=
encounterForwardingMessage
.
getMsgText
();
break
;
case
PRIVATE_MESSAGE:
MessageChannelMessage
messageChannel
Message
=
msg
.
get
MessageChannel
Message
();
msgText
=
messageChannel
Message
.
getMsgText
();
PrivateMessage
private
Message
=
msg
.
get
Private
Message
();
msgText
=
private
Message
.
getMsgText
();
break
;
default
:
// skip non-messaging type messages used as metadata
msgText
=
""
;
...
...
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