simtools.data.async
Class StreamingMSDataSource

java.lang.Object
  extended by simtools.data.ValueProvider
      extended by simtools.data.DataSource
          extended by simtools.data.async.TimeStampedDataSource
              extended by simtools.data.async.StreamingTSDataSource
                  extended by simtools.data.async.StreamingMSDataSource

public class StreamingMSDataSource
extends StreamingTSDataSource

A streaming data source with optional label, raw and status values in addition to the time/value pair of StreamingTSDataSource

Author:
Claude Cazenave

Nested Class Summary
protected  class StreamingMSDataSource.AuxiliaryCollection
           
 class StreamingMSDataSource.StreamingIntegerSource
           
 class StreamingMSDataSource.StreamingLabelSource
           
 
Nested classes/interfaces inherited from class simtools.data.async.StreamingTSDataSource
StreamingTSDataSource.StreamingTimeSource
 
Nested classes/interfaces inherited from class simtools.data.async.TimeStampedDataSource
TimeStampedDataSource.TimeSource
 
Field Summary
protected  StreamingMSDataSource.StreamingLabelSource _label
           
protected  StreamingMSDataSource.StreamingIntegerSource _raw
           
protected  StreamingMSDataSource.StreamingIntegerSource _status
           
 
Fields inherited from class simtools.data.async.StreamingTSDataSource
_dmax, _dmin, _lastIndex, _maxSize, _minDuration, _size, _startIndex, _t, _t2, _time2, _v
 
Fields inherited from class simtools.data.async.TimeStampedDataSource
_auxiliaries
 
Fields inherited from class simtools.data.DataSource
endNotificationListeners, listeners, sortedOrder
 
Fields inherited from class simtools.data.ValueProvider
ByteProvider, DoubleProvider, FloatProvider, IntegerProvider, kind, LongProvider, ObjectProvider, ShortProvider
 
Constructor Summary
StreamingMSDataSource(java.lang.String id, StreamingTSDataSourceCollection c, int minSize, int maxSize, double minDuration, boolean withLabel, boolean withRawValue, boolean withStatus)
          Create a streaming data source with optional label, raw and status values
StreamingMSDataSource(java.lang.String id, StreamingTSDataSourceCollection c, int minSize, int maxSize, double minDuration, boolean withLabel, boolean withRawValue, boolean withStatus, boolean withTime2)
          Create a streaming data source with optional label, raw and status values
StreamingMSDataSource(java.lang.String id, StreamingTSDataSourceCollection c, int minSize, int maxSize, double minDuration, int auxiliaryMinSize, double auxiliaryMinDuration, boolean withLabel, boolean withRawValue, boolean withStatus, boolean withTime2)
          Create a streaming data source with optional time2, label, raw and status values
StreamingMSDataSource(java.lang.String label, java.lang.String id, StreamingTSDataSourceCollection c, int minSize, int maxSize, double minDuration, int auxiliaryMinSize, double auxiliaryMinDuration, boolean withLabel, boolean withRawValue, boolean withStatus, boolean withTime2)
          Create a streaming data source with optional time2, label, raw and status values
 
Method Summary
 void add(double t, double v, java.lang.String l, long r, long s)
          Add a new set of values and notify listeners
 void add(double t, double v, java.lang.String l, long r, long s, double t2)
          Add a new set of values and notify listeners
 void addValues(double t, double v, java.lang.String l, long r, long s, double t2)
          Add a new set of values
 java.lang.String getDataSourceInformationClass()
          This method provide the UI Data source information class name.
 StreamingMSDataSource.StreamingLabelSource getLabel()
           
 StreamingMSDataSource.StreamingIntegerSource getRaw()
           
 StreamingMSDataSource.StreamingIntegerSource getStatus()
           
 void notifyAllEndNotificationListeners()
           
 
Methods inherited from class simtools.data.async.StreamingTSDataSource
add, add, addValues, computeMinMax, getDoubleMax, getDoubleMin, getDoubleValue, getEnd, getLastIndex, getMax, getMin, getStart, getStartIndex, getTime2, getValue, initialiseIndex, isValid, setTime2
 
Methods inherited from class simtools.data.async.TimeStampedDataSource
createEmptyDataSource, getAuxiliarySources, getCollection, getInfo, getInformation, getName, getTime, isCompound, setInfo, setMax, setMin, setMinmax, setTime, toString
 
Methods inherited from class simtools.data.DataSource
addEndNotificationListener, addListener, computeLastIndex, computeMax, computeMin, computeSortedOrder, computeStartIndex, equals, getByteMax, getByteMin, getChoiceFormat, getFloatMax, getFloatMin, getIntegerMax, getIntegerMin, getLongMax, getLongMin, getShortMax, getShortMin, getSortedOrder, getSourceDependencies, isAuxiliary, isComparable, notifyEndNotificationListeners, notifyListenersForDataReplaced, notifyListenersForDataReplaced, notifyListenersForIndexRangeChange, notifyListenersForInfoChange, notifyListenersForOrderChange, notifyListenersForValueChange, notifyListenersForValueRangeChange, removeEndNotificationListener, removeListener, setSlice, sortedOrder, updateSortedOrder
 
Methods inherited from class simtools.data.ValueProvider
getByteValue, getFloatValue, getIntegerValue, getKind, getLongValue, getObjectValue, getShortValue, valueClass
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_label

protected StreamingMSDataSource.StreamingLabelSource _label

_raw

protected StreamingMSDataSource.StreamingIntegerSource _raw

_status

protected StreamingMSDataSource.StreamingIntegerSource _status
Constructor Detail

StreamingMSDataSource

public StreamingMSDataSource(java.lang.String label,
                             java.lang.String id,
                             StreamingTSDataSourceCollection c,
                             int minSize,
                             int maxSize,
                             double minDuration,
                             int auxiliaryMinSize,
                             double auxiliaryMinDuration,
                             boolean withLabel,
                             boolean withRawValue,
                             boolean withStatus,
                             boolean withTime2)
                      throws java.io.IOException,
                             TimeStampedDataSourceCollection.InvalidFormatException
Create a streaming data source with optional time2, label, raw and status values

Parameters:
label - The data source name
id - The data source id
c - Its collection parent
minSize - The minimum number of values to keep
maxSize - The maximum number of values to keep
minDuration - The minimun duration of value to keep
auxiliaryMinSize - The minimum number of values to keep for all auxiliary data
auxiliaryMinDuration - The minimun duration of value to keep for all auxiliary data
withLabel - If true label values ar also stored (see add method)
withRawValue - If true raw values are also stored
withStatus - If true status values are also stored
withTime2 - If true time2 values are also stored
Throws:
java.io.IOException
TimeStampedDataSourceCollection.InvalidFormatException

StreamingMSDataSource

public StreamingMSDataSource(java.lang.String id,
                             StreamingTSDataSourceCollection c,
                             int minSize,
                             int maxSize,
                             double minDuration,
                             int auxiliaryMinSize,
                             double auxiliaryMinDuration,
                             boolean withLabel,
                             boolean withRawValue,
                             boolean withStatus,
                             boolean withTime2)
                      throws java.io.IOException,
                             TimeStampedDataSourceCollection.InvalidFormatException
Create a streaming data source with optional time2, label, raw and status values

Parameters:
id - The data source id
c - Its collection parent
minSize - The minimum number of values to keep
maxSize - The maximum number of values to keep
minDuration - The minimun duration of value to keep
auxiliaryMinSize - The minimum number of values to keep for all auxiliary data
auxiliaryMinDuration - The minimun duration of value to keep for all auxiliary data
withLabel - If true label values ar also stored (see add method)
withRawValue - If true raw values are also stored
withStatus - If true status values are also stored
withTime2 - If true time2 values are also stored
Throws:
java.io.IOException
TimeStampedDataSourceCollection.InvalidFormatException

StreamingMSDataSource

public StreamingMSDataSource(java.lang.String id,
                             StreamingTSDataSourceCollection c,
                             int minSize,
                             int maxSize,
                             double minDuration,
                             boolean withLabel,
                             boolean withRawValue,
                             boolean withStatus,
                             boolean withTime2)
                      throws java.io.IOException,
                             TimeStampedDataSourceCollection.InvalidFormatException
Create a streaming data source with optional label, raw and status values

Parameters:
id - The data source id
c - Its collection parent
minSize - The minimum number of values to keep
maxSize - The maximum number of values to keep
minDuration - The minimun duration of value to keep
auxiliaryMinSize - The minimum number of values to keep for all auxiliary data
auxiliaryMinDuration - The minimun duration of value to keep for all auxiliary data
withLabel - If true label values ar also stored (see add method)
withRawValue - If true raw values are also stored
withStatus - If true status values are also stored
Throws:
java.io.IOException
TimeStampedDataSourceCollection.InvalidFormatException

StreamingMSDataSource

public StreamingMSDataSource(java.lang.String id,
                             StreamingTSDataSourceCollection c,
                             int minSize,
                             int maxSize,
                             double minDuration,
                             boolean withLabel,
                             boolean withRawValue,
                             boolean withStatus)
                      throws java.io.IOException,
                             TimeStampedDataSourceCollection.InvalidFormatException
Create a streaming data source with optional label, raw and status values

Parameters:
id - The data source id
c - Its collection parent
minSize - The minimum number of values to keep
maxSize - The maximum number of values to keep
minDuration - The minimun duration of value to keep
auxiliaryMinSize - The minimum number of values to keep for all auxiliary data
auxiliaryMinDuration - The minimun duration of value to keep for all auxiliary data
withLabel - If true label values ar also stored (see add method)
withRawValue - If true raw values are also stored
withStatus - If true status values are also stored
Throws:
java.io.IOException
TimeStampedDataSourceCollection.InvalidFormatException
Method Detail

getLabel

public StreamingMSDataSource.StreamingLabelSource getLabel()
Returns:
Returns the _label.

getRaw

public StreamingMSDataSource.StreamingIntegerSource getRaw()
Returns:
Returns the _raw.

getStatus

public StreamingMSDataSource.StreamingIntegerSource getStatus()
Returns:
Returns the _status.

getDataSourceInformationClass

public java.lang.String getDataSourceInformationClass()
Description copied from class: DataSource
This method provide the UI Data source information class name. Should be overloaded in sub classes to return specified information

Overrides:
getDataSourceInformationClass in class TimeStampedDataSource
Returns:
the box

add

public void add(double t,
                double v,
                java.lang.String l,
                long r,
                long s)
Add a new set of values and notify listeners

Parameters:
t -
v -
l -
r -
s -

add

public void add(double t,
                double v,
                java.lang.String l,
                long r,
                long s,
                double t2)
Add a new set of values and notify listeners

Parameters:
t -
v -
l -
r -
s -
t2 -
t2Enabled -

addValues

public void addValues(double t,
                      double v,
                      java.lang.String l,
                      long r,
                      long s,
                      double t2)
Add a new set of values

Parameters:
t -
v -
l -
r -
s -
t2 -
t2Enabled -

notifyAllEndNotificationListeners

public void notifyAllEndNotificationListeners()
Overrides:
notifyAllEndNotificationListeners in class StreamingTSDataSource