org.unisens
Interface MeasurementEntry

All Superinterfaces:
java.lang.Cloneable, Entry, TimedEntry
All Known Subinterfaces:
SignalEntry, ValuesEntry

public interface MeasurementEntry
extends TimedEntry

MeasurementEntry is the superclass of SignalEntry and ValuesEntry and defines the common methods. Direct instances of MeasurementEntry are normally not used.

Author:
Joerg Ottenbacher, Radi Nedkov, Malte Kirst

Method Summary
 int getAdcResolution()
          Gets the resolution in bits of the ADC used to acquire the data contained in this Entry
 int getAdcZero()
          Gets the output given by the ADC, when the input falls exactly at the center of the ADC range.
 int getBaseline()
          Gets the value of ADC output that would map to 0 physical units input.
 int getChannelCount()
          Gets the number of channels in this Entry
 java.lang.String[] getChannelNames()
          Gets the names of all channels as Array of String
 DataType getDataType()
          Gets the DataType of the data contained in this Entry
 double getLsbValue()
          Gets the equivalent value of the physical variable represented by the least significant bit of the ADC used to acquire the data contained in this Entry
 java.lang.String getUnit()
          Gets the string that specifies the physical unit of the acquired variable(s)
 void setAdcProperties(int adcZero, int adcResolution, int baseline, double lsbValue)
          Sets the properties of the ADC used to acquire the data contained in this Entry.
 void setAdcResolution(int adcResolution)
          Sets the resolution in bits of the ADC used to acquire the data contained in this Entry.
 void setAdcZero(int adcZero)
          Sets the output given by the ADC, when the input falls exactly at the center of the ADC range.
 void setBaseline(int baseline)
          Sets the value of ADC output that would map to 0 physical units input.
 void setChannelNames(java.lang.String[] channelNames)
          Sets the names of the channels in this Entry.
 void setDataType(DataType dataType)
          Sets the DataType of the data contained in this Entry
 void setLsbValue(double lsbValue)
          Sets the equivalent value of the physical variable represented by the least significant bit of the ADC used to acquire the data contained in this Entry
 void setUnit(java.lang.String unit)
          Sets the string that specifies the physical unit of the acquired variable(s)
 
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

getChannelNames

java.lang.String[] getChannelNames()
Gets the names of all channels as Array of String

Returns:
the names of all channels

getAdcResolution

int getAdcResolution()
Gets the resolution in bits of the ADC used to acquire the data contained in this Entry

Returns:
the resolution in bits

setAdcResolution

void setAdcResolution(int adcResolution)
Sets the resolution in bits of the ADC used to acquire the data contained in this Entry.

Parameters:
adcResolution - the resolution in bits

getAdcZero

int getAdcZero()
Gets the output given by the ADC, when the input falls exactly at the center of the ADC range. For bipolar ADCs with two's complement output adcZero is usually zero. adcZero is just an additional information for characterizing the used ADC. adcZero is not necessary for the calculation of physical values. You can use this information for the calculation of the ADC's physical range.

Returns:
the output given by the ADC, when the input falls exactly at the center of the ADC range

setAdcZero

void setAdcZero(int adcZero)
Sets the output given by the ADC, when the input falls exactly at the center of the ADC range. For bipolar ADCs with two's complement output adcZero is usually zero.

Parameters:
adcZero - the output given by the ADC, when the input falls exactly at the center of the ADC range

getBaseline

int getBaseline()
Gets the value of ADC output that would map to 0 physical units input. This value can be beyond the ADC output range. The value of the physical variable is calculated by: value = (ADCout - baseline) * lsbValue.

Returns:
the value of ADC output that would map to the value of 0 of the physical variable

setBaseline

void setBaseline(int baseline)
Sets the value of ADC output that would map to 0 physical units input. This value can be beyond the ADC output range. The value of the physical variable is calculated by: value = (ADCout - baseline) * lsbValue.

Parameters:
baseline - the value of ADC output that would map to the value of 0 of the physical variable

getLsbValue

double getLsbValue()
Gets the equivalent value of the physical variable represented by the least significant bit of the ADC used to acquire the data contained in this Entry

Returns:
the value of the physical variable represented by the least significant bit of the ADC

setLsbValue

void setLsbValue(double lsbValue)
Sets the equivalent value of the physical variable represented by the least significant bit of the ADC used to acquire the data contained in this Entry

Parameters:
lsbValue - the value of the physical variable represented by the least significant bit of the ADC

getUnit

java.lang.String getUnit()
Gets the string that specifies the physical unit of the acquired variable(s)

Returns:
the unit

setUnit

void setUnit(java.lang.String unit)
Sets the string that specifies the physical unit of the acquired variable(s)

Parameters:
unit - the unit

getChannelCount

int getChannelCount()
Gets the number of channels in this Entry

Returns:
the number of Channels

setChannelNames

void setChannelNames(java.lang.String[] channelNames)
Sets the names of the channels in this Entry. The number of channels cannot be changed after a channel is created

Parameters:
channelNames - the names of the channels as Array of Strings

getDataType

DataType getDataType()
Gets the DataType of the data contained in this Entry

Returns:
the DataType

setDataType

void setDataType(DataType dataType)
Sets the DataType of the data contained in this Entry

Parameters:
dataType - the DataType

setAdcProperties

void setAdcProperties(int adcZero,
                      int adcResolution,
                      int baseline,
                      double lsbValue)
Sets the properties of the ADC used to acquire the data contained in this Entry.

Parameters:
adcZero - the output given by the ADC, when the input falls exactly at the center of the ADC range
adcResolution - the resolution in bits of the ADC
baseline - the value of ADC output that would map to 0 physical units input
lsbValue - the equivalent value of the physical variable represented by the least significant bit of the ADC
See Also:
setAdcZero, setAdcResolution, setBaseline, setLsbValue