org.openuat.sensors
Interface SamplesSink_Int

All Known Implementing Classes:
TimeSeries_Int

public interface SamplesSink_Int

This interface represents a sink for sample values, and only defines three methods: to add new samples, to react to a segment becoming "active" (by some definition) and to react to a segment becoming "inactive". In contrast to the SamplesSink interface, this one uses int values for samples, and is thus better suited for resource limited scenarios like J2ME.

Version:
1.0
Author:
Rene Mayrhofer

Method Summary
 void addSample(int sample, int index)
          Adds a new sample to the sink.
 void segmentEnd(int index)
          Should be called when it is detected that an active segment end, i.e. when it is detected that the source has become quiescent by some definition.
 void segmentStart(int index)
          Should be called when it is detected that an active segment starts, i.e. when it is detected that the source has become active by some definition.
 

Method Detail

addSample

void addSample(int sample,
               int index)
Adds a new sample to the sink.

Parameters:
sample - The new sample value to add.
index - The index of this sample. All samples are required to be equally spaced.

segmentStart

void segmentStart(int index)
Should be called when it is detected that an active segment starts, i.e. when it is detected that the source has become active by some definition.

Parameters:
index - The index at which the active segment starts.

segmentEnd

void segmentEnd(int index)
Should be called when it is detected that an active segment end, i.e. when it is detected that the source has become quiescent by some definition.

Parameters:
index - The index at which the active segment ends.


2005-2009, Rene Mayrhofer.