Package lejos.robotics.filter
Class SubscribedProvider
- java.lang.Object
-
- lejos.robotics.filter.SubscribedProvider
-
- All Implemented Interfaces:
SampleProvider
public class SubscribedProvider extends java.lang.Object implements SampleProvider
-
-
Field Summary
Fields Modifier and Type Field Description protected java.text.DateFormatformatter
-
Constructor Summary
Constructors Constructor Description SubscribedProvider(java.io.DataInputStream dis, PublishedSource source)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidfetchSample(float[] sample, int offset)Fetches a sample from a sensor or filter.java.lang.StringgetHost()java.lang.StringgetName()PublishedSourcegetSource()java.lang.StringgetTime()longgetTimeStamp()booleanisActive()intsampleSize()Returns the number of elements in a sample.
The number of elements does not change during runtime.
-
-
-
Constructor Detail
-
SubscribedProvider
public SubscribedProvider(java.io.DataInputStream dis, PublishedSource source)
-
-
Method Detail
-
sampleSize
public int sampleSize()
Description copied from interface:SampleProviderReturns the number of elements in a sample.
The number of elements does not change during runtime.- Specified by:
sampleSizein interfaceSampleProvider- Returns:
- the number of elements in a sample
-
fetchSample
public void fetchSample(float[] sample, int offset)Description copied from interface:SampleProviderFetches a sample from a sensor or filter.- Specified by:
fetchSamplein interfaceSampleProvider- Parameters:
sample- The array to store the sample in.offset- The elements of the sample are stored in the array starting at the offset position.
-
getSource
public PublishedSource getSource()
-
getHost
public java.lang.String getHost()
-
getName
public java.lang.String getName()
-
getTimeStamp
public long getTimeStamp()
-
isActive
public boolean isActive()
-
getTime
public java.lang.String getTime()
-
-