org.unisens
Interface ValuesEntry

All Superinterfaces:
java.lang.Cloneable, Entry, MeasurementEntry, TimedEntry

public interface ValuesEntry
extends MeasurementEntry

A ValuesEntry represents data acquired at certain points in time. Points in time are determined by sample number using a specific sampleRate.

Author:
Joerg Ottenbacher, Radi Nedkov, Malte Kirst

Method Summary
 void append(Value data)
          Appends a Value object to this ValueEntry.
 void append(Value[] data)
          Appends an Array of Values object to this ValueEntry
 void appendValuesList(ValueList valueList)
          Appends the Values contained in a ValuesList object to this ValueEntry
 Value[] read(int length)
          Reads from the data file beginning at the current postion of the file pointer and presents the data as Array of Value
 Value[] read(long pos, int length)
          Reads from the data file beginning at a given postion and presents the data as Array of Value
 Value[] readScaled(int length)
           
 Value[] readScaled(long pos, int length)
           
 ValueList readValuesList(int length)
          Reads from the data file beginning at the current position of the file pointer and presents the data as a ValuesList object.
 ValueList readValuesList(long pos, int length)
          Reads from the data file beginning at a given position and presents the data as a ValuesList object.
 ValueList readValuesListScaled(int length)
          Reads from the data file beginning at the current position of the file pointer and presents the data as a ValuesList object.
 ValueList readValuesListScaled(long pos, int length)
          Reads from the data file beginning at a given position and presents the data as a ValuesList object.
 
Methods inherited from interface org.unisens.MeasurementEntry
getAdcResolution, getAdcZero, getBaseline, getChannelCount, getChannelNames, getDataType, getLsbValue, getUnit, setAdcProperties, setAdcResolution, setAdcZero, setBaseline, setChannelNames, setDataType, setLsbValue, setUnit
 
Methods inherited from interface org.unisens.TimedEntry
getCount, getSampleRate, resetPos, setSampleRate
 
Methods inherited from interface org.unisens.Entry
addCustomAttribute, clone, close, createBinFileFormat, createCsvFileFormat, createCustomFileFormat, createXmlFileFormat, getComment, getContentClass, getCustomAttributes, getFileFormat, getId, getName, getSource, getSourceId, getUnisens, rename, setComment, setContentClass, setFileFormat, setName, setSource, setSourceId, setUnisens
 

Method Detail

read

Value[] read(long pos,
             int length)
             throws java.io.IOException
Reads from the data file beginning at a given postion and presents the data as Array of Value

Parameters:
pos - the position/row to start from
length - number of rows to read
Returns:
an Array of Value objects
Throws:
java.io.IOException

read

Value[] read(int length)
             throws java.io.IOException
Reads from the data file beginning at the current postion of the file pointer and presents the data as Array of Value

Parameters:
length - number of rows to read
Returns:
an Array of Value objects
Throws:
java.io.IOException

readScaled

Value[] readScaled(long pos,
                   int length)
                   throws java.io.IOException
Throws:
java.io.IOException

readScaled

Value[] readScaled(int length)
                   throws java.io.IOException
Throws:
java.io.IOException

append

void append(Value data)
            throws java.lang.IllegalArgumentException,
                   java.io.IOException
Appends a Value object to this ValueEntry.

Parameters:
data - the Value to append
Throws:
java.lang.IllegalArgumentException
java.io.IOException

append

void append(Value[] data)
            throws java.lang.IllegalArgumentException,
                   java.io.IOException
Appends an Array of Values object to this ValueEntry

Parameters:
data - the Values to append
Throws:
java.lang.IllegalArgumentException
java.io.IOException

appendValuesList

void appendValuesList(ValueList valueList)
                      throws java.io.IOException,
                             java.lang.IllegalArgumentException
Appends the Values contained in a ValuesList object to this ValueEntry

Parameters:
valueList - the ValuesList to append
Throws:
java.io.IOException
java.lang.IllegalArgumentException

readValuesList

ValueList readValuesList(int length)
                         throws java.io.IOException
Reads from the data file beginning at the current position of the file pointer and presents the data as a ValuesList object.

Parameters:
length - number of rows to read
Returns:
a ValuesList
Throws:
java.io.IOException

readValuesList

ValueList readValuesList(long pos,
                         int length)
                         throws java.io.IOException
Reads from the data file beginning at a given position and presents the data as a ValuesList object.

Parameters:
pos - the position/row to start from
length - number of rows to read
Returns:
a ValuesList
Throws:
java.io.IOException

readValuesListScaled

ValueList readValuesListScaled(int length)
                               throws java.io.IOException
Reads from the data file beginning at the current position of the file pointer and presents the data as a ValuesList object. The data values are scaled according to baseline and lsbValue. value = (ADCout - baseline) * lsbValue.

Parameters:
length - number of rows to read
Returns:
a ValuesList
Throws:
java.io.IOException

readValuesListScaled

ValueList readValuesListScaled(long pos,
                               int length)
                               throws java.io.IOException
Reads from the data file beginning at a given position and presents the data as a ValuesList object. The data values are scaled according to baseline and lsbValue. value = (ADCout - baseline) * lsbValue.

Parameters:
pos - the position/row to start from
length - number of rows to read
Returns:
a ValuesList
Throws:
java.io.IOException