-
Notifications
You must be signed in to change notification settings - Fork 0
/
WaveRecipeAlgorithm.java
47 lines (41 loc) · 1.55 KB
/
WaveRecipeAlgorithm.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//
// WaveRecipeAlgorithm.java
// AndroidWaveProject
//
// Created by Philip Kuryloski on 2011-02-02.
// Copyright 2011 University of California, Berkeley. All rights reserved.
//
package edu.berkeley.androidwave.waverecipe.waverecipealgorithm;
import java.util.Map;
/**
* WaveRecipeAlgorithm
*
* Interface describing a WaveRecipeAlgorithm, which provides the
* computational component of a WaveRecipe. Recipe creators must implement
* this interface, and provide that implementation within their recipe.
*
* Arguments not included within Android are generic objects, because the
* dynamic loading used to instantiate this algorithm in Android results in
* two separate namespaces. Therefore, we essentially cannot cast or type
* easily at compile time.
*
* For conviencience, recipe developers are provided with
* WaveRecipeAlgorithmListenerShadow calls methods across the distinct
* namespaces
*/
public interface WaveRecipeAlgorithm {
/**
* setAuthorizedMaxOutputRate
*
* Provides a hint to the WaveRecipeAlgorithm of what data rate it is
* allowed to produce (without being throttled by AndroidWave)
*/
public void setAuthorizedMaxOutputRate(double maxOutputRate) throws Exception;
/**
* setWaveRecipeAlgorithmListener
*
* @param listener should implement the WaveRecipeAlgorithmListener interface
*/
public boolean setWaveRecipeAlgorithmListener(Object listener) throws Exception;
public void ingestSensorData(long time, Map<String, Double>values) throws Exception;
}