public class Datadroppers
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
NOT_IMPLEMENTED |
static int |
RETURN_ERROR_EMPTY |
static int |
RETURN_ERROR_ENCODING |
static int |
RETURN_ERROR_INVALID_PARAMETER |
static int |
RETURN_ERROR_LOGIN
not used
|
static int |
RETURN_ERROR_LOGIN_NOT_SET
not used
|
static int |
RETURN_ERROR_MULTIPLE_DATA_FOUND
This error will occur when the data's name does not allow to identify a
unique data.
|
static int |
RETURN_ERROR_NETWORK |
static int |
RETURN_ERROR_NO_DATA_FOUND |
static int |
RETURN_NOT_SET
Error was reseted and not set to any particular value.
|
static int |
RETURN_SUCCESS |
Constructor and Description |
---|
Datadroppers()
Constructor to invoke when using DD library from JAVA context
|
Datadroppers(processing.core.PApplet processing)
Constructor to invoke when using DD library from Processing
context.
|
Modifier and Type | Method and Description |
---|---|
boolean |
createData(java.lang.String dataName,
java.lang.String meta,
java.lang.String type,
java.lang.String unit,
java.lang.String gps)
Create a data
|
boolean |
drop(java.lang.String dataName,
java.lang.String dataValue)
Add a value to a data (drop off)
|
int |
getReturned()
Get the code for the last error that occurred.
|
DataValue[] |
history(java.lang.String dataName)
Get the whole history values of a given data (history, unlimited)
|
DataValue[] |
history(java.lang.String dataName,
int length)
Get the last 'length' history values of a given data (history, limited)
|
DataValue |
pick(java.lang.String dataName)
Get the last value of a data (pick)
|
DataSignature |
pickDataInfo(java.lang.String dataName)
Get the full information of a given data
|
DataSignature[] |
searchData(java.lang.String searchString)
Search for a given data
|
public static final int RETURN_NOT_SET
public static final int NOT_IMPLEMENTED
public static final int RETURN_SUCCESS
public static final int RETURN_ERROR_LOGIN
public static final int RETURN_ERROR_NETWORK
public static final int RETURN_ERROR_LOGIN_NOT_SET
public static final int RETURN_ERROR_NO_DATA_FOUND
public static final int RETURN_ERROR_MULTIPLE_DATA_FOUND
public static final int RETURN_ERROR_INVALID_PARAMETER
public static final int RETURN_ERROR_EMPTY
public static final int RETURN_ERROR_ENCODING
public Datadroppers()
public Datadroppers(processing.core.PApplet processing)
processing
- The top level processing Applet pointer (Usually 'this' from within processing).public boolean drop(java.lang.String dataName, java.lang.String dataValue)
dataName
- The label of the datadataValue
- The new value to be dropped offgetReturned()
public DataValue pick(java.lang.String dataName)
dataName
- The label of the datagetReturned()
public DataValue[] history(java.lang.String dataName)
dataName
- The label of the datagetReturned()
public DataValue[] history(java.lang.String dataName, int length)
dataName
- The label of the datalength
- Number of values to returngetReturned()
public DataSignature pickDataInfo(java.lang.String dataName)
dataName
- The label of the datagetReturned()
public DataSignature[] searchData(java.lang.String searchString)
searchString
- The label/meta information of the data you are looking forgetReturned()
public boolean createData(java.lang.String dataName, java.lang.String meta, java.lang.String type, java.lang.String unit, java.lang.String gps)
dataName
- The label of the datameta
- The data's meta information (for search engine)type
- The data's type (example: integer, float, gps, string etc...)unit
- The data's unit (example: deg, ppm etc...)gps
- The data's location, in decimal degrees format "latitude,longitude"
(example: Berlin is 52.5243700,13.4105300, Sydney is -33.8678500,151.2073200 etc...)getReturned()
public int getReturned()