public class DataPoint
extends java.lang.Object
These data points include other features such as description, quality and location, that can be optionally configured.
Data points can be sent to Device Cloud using the following methods from Cloud Connector Manager object:
BinaryDataPoint,
DataStream| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
data |
protected java.lang.String |
description |
protected android.location.Location |
location |
protected int |
quality |
protected DataStream |
stream |
protected java.lang.String |
timeStamp |
protected com.digi.android.cloudconnector.DataPoint.DataPointType |
type |
| Constructor and Description |
|---|
DataPoint(byte[] data,
DataStream stream)
Class constructor.
|
DataPoint(double data,
DataStream stream)
Class constructor.
|
DataPoint(float data,
DataStream stream)
Class constructor.
|
DataPoint(int data,
DataStream stream)
Class constructor.
|
DataPoint(long data,
DataStream stream)
Class constructor.
|
DataPoint(java.lang.String data,
DataStream stream)
Class constructor.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getData()
Returns the data point data.
|
DataStream |
getDataStream()
Returns the data-stream destination of the data point.
|
java.lang.String |
getDescription()
Returns the data point description.
|
android.location.Location |
getLocation()
Returns the data point location.
|
int |
getQuality()
Returns the data point quality.
|
java.lang.String |
getTimestamp()
Returns the data point time stamp.
|
void |
setDescription(java.lang.String description)
Sets the data point description.
|
void |
setLocation(android.location.Location location)
Sets the data point location.
|
void |
setQuality(int quality)
Sets the data point quality.
|
protected java.lang.String data
protected java.lang.String description
protected java.lang.String timeStamp
protected DataStream stream
protected android.location.Location location
protected int quality
protected com.digi.android.cloudconnector.DataPoint.DataPointType type
public DataPoint(int data,
DataStream stream)
DataPoint of type integer
with the given data value.data - Data point value.stream - Data stream destination of this data point.java.lang.NullPointerException - If stream == null.DataStreampublic DataPoint(long data,
DataStream stream)
DataPoint of type long
with the given data value.data - Data point value.stream - Data stream destination of this data point.java.lang.NullPointerException - If stream == null.DataStreampublic DataPoint(float data,
DataStream stream)
DataPoint of type float
with the given data value.data - Data point value.stream - Data stream destination of this data point.java.lang.NullPointerException - If stream == null.DataStreampublic DataPoint(double data,
DataStream stream)
DataPoint of type double
with the given data value.data - Data point value.stream - Data stream destination of this data point.java.lang.NullPointerException - If stream == null.DataStreampublic DataPoint(java.lang.String data,
DataStream stream)
DataPoint of type string
with the given data value.data - Data point value.stream - Data stream destination of this data point.java.lang.NullPointerException - If data == null or
if stream == null.DataStreampublic DataPoint(byte[] data,
DataStream stream)
DataPoint of type binary
with the given data value.
The binary data is stored as a Base 64 encoded string in Device Cloud.
In order to store the binary data in the original format you can use the
BinaryDataPoint class with the CloudConnectorManager.sendBinaryDataPoint(BinaryDataPoint)
method.
data - Data point value.stream - Data stream destination of this data point.java.lang.NullPointerException - If data == null or
if stream == null.DataStreampublic DataStream getDataStream()
DataStreampublic java.lang.String getData()
public android.location.Location getLocation()
public void setLocation(android.location.Location location)
location - The data point location.public int getQuality()
public void setQuality(int quality)
quality - The data point quality.public java.lang.String getDescription()
public void setDescription(java.lang.String description)
description - The data point description-public java.lang.String getTimestamp()