public class SubscribedProvider extends java.lang.Object implements SampleProvider
Modifier and Type | Field and Description |
---|---|
private boolean |
active |
private java.io.DataInputStream |
dis |
protected java.text.DateFormat |
formatter |
private java.lang.String |
host |
private float[] |
latest |
private java.lang.String |
name |
private int |
sampleSize |
private PublishedSource |
source |
private long |
timeStamp |
Constructor and Description |
---|
SubscribedProvider(java.io.DataInputStream dis,
PublishedSource source) |
Modifier and Type | Method and Description |
---|---|
void |
fetchSample(float[] sample,
int offset)
Fetches a sample from a sensors or filter.
|
java.lang.String |
getHost() |
java.lang.String |
getName() |
PublishedSource |
getSource() |
java.lang.String |
getTime() |
long |
getTimeStamp() |
boolean |
isActive() |
int |
sampleSize()
Returns the number of elements in a sample.
The number of elements does not change during runtime. |
protected java.text.DateFormat formatter
private int sampleSize
private float[] latest
private PublishedSource source
private java.io.DataInputStream dis
private long timeStamp
private java.lang.String host
private java.lang.String name
private boolean active
public SubscribedProvider(java.io.DataInputStream dis, PublishedSource source)
public int sampleSize()
SampleProvider
sampleSize
in interface SampleProvider
public void fetchSample(float[] sample, int offset)
SampleProvider
fetchSample
in interface SampleProvider
sample
- The array to store the sample in.offset
- The elements of the sample are stored in the array starting at the offset position.public PublishedSource getSource()
public java.lang.String getHost()
public java.lang.String getName()
public long getTimeStamp()
public boolean isActive()
public java.lang.String getTime()