-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
782adf2
commit 7d95224
Showing
53 changed files
with
3,507 additions
and
1,069 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
library/src/main/java/com/mbientlab/metawear/AnonymousRoute.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package com.mbientlab.metawear; | ||
|
||
/** | ||
* Pared down variant of the {@link Route} interface that only has one {@link Subscriber}. This | ||
* interface can be used to retrieve logged data from a board that was not programmed by the current | ||
* device. | ||
* @author Eric Tsai | ||
*/ | ||
public interface AnonymousRoute { | ||
/** | ||
* String identifying the data producer chain the subscriber is receiving data from | ||
* @return String identifying the data chain | ||
*/ | ||
String identifier(); | ||
/** | ||
* Subscribe to the data produced by this chain | ||
* @param subscriber Subscriber implementation to handle the received data | ||
*/ | ||
void subscribe(Subscriber subscriber); | ||
/** | ||
* Sets the environment values passed into the {@link Subscriber#apply(Data, Object...) apply} function | ||
* @param env Environment values to use with the subscriber | ||
*/ | ||
void setEnvironment(Object ... env); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
library/src/main/java/com/mbientlab/metawear/TaskTimeoutException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package com.mbientlab.metawear; | ||
|
||
import java.util.concurrent.TimeoutException; | ||
|
||
/** | ||
* Variant of the {@link TimeoutException} class that contains a partial result of the task | ||
* @author Eric Tsai | ||
*/ | ||
public class TaskTimeoutException extends TimeoutException { | ||
private static final long serialVersionUID = -1265719967367246950L; | ||
|
||
/** Partial result of the task */ | ||
public final Object partial; | ||
|
||
/** | ||
* Creates an exception with the given message and partial result | ||
* @param message Message to accompany the exception | ||
* @param partial Partial result of the task | ||
*/ | ||
public TaskTimeoutException(String message, Object partial) { | ||
super(message); | ||
|
||
this.partial = partial; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.