org.csstudio.data.values
Interface IValue

All Superinterfaces:
java.io.Serializable
All Known Subinterfaces:
IDoubleValue, IEnumeratedValue, ILongValue, IMinMaxDoubleValue, IStringValue

public interface IValue
extends java.io.Serializable

Base interface for all control system values.

The Value handles all the other 'stuff' that comes with a control system value except for the actual value itself:

It also offers convenience routines for displaying values.

In some cases, that's already all that there might be, because a sample can have a severity that indicates that there was no value, and the status describes why.

In most cases, however, access to the actual data requires the specific subtypes DoubleValue, StringValue etc.

Author:
Kay Kasemir
See Also:
IDoubleValue, ILongValue, IStringValue, IEnumeratedValue, IMinMaxDoubleValue

Nested Class Summary
static class IValue.Format
           
static class IValue.Quality
          Describe the data quality.
 
Method Summary
 java.lang.String format()
          Format the value via the Default format.
 java.lang.String format(IValue.Format how, int precision)
          Format the value as a string.
 IMetaData getMetaData()
          Meta Data that helps with using the value, mostly for formatting.
 IValue.Quality getQuality()
          Get the quality of this value.
 ISeverity getSeverity()
          Get the severity info.
 java.lang.String getStatus()
          Get the status text that might describe the severity.
 ITimestamp getTime()
          Get the time stamp.
 

Method Detail

getTime

ITimestamp getTime()
Get the time stamp.

Returns:
The time stamp.

getSeverity

ISeverity getSeverity()
Get the severity info.

Returns:
The severity info.
See Also:
ISeverity, getStatus()

getStatus

java.lang.String getStatus()
Get the status text that might describe the severity.

Returns:
The status string.
See Also:
getSeverity()

getQuality

IValue.Quality getQuality()
Get the quality of this value.

Returns:
The quality.
See Also:
IValue.Quality

getMetaData

IMetaData getMetaData()
Meta Data that helps with using the value, mostly for formatting.

It might be OK for some value types to only have null MetaData, while others might require a specific one like NumericMetaData.

Returns:
The Meta Data.

format

java.lang.String format(IValue.Format how,
                        int precision)
Format the value as a string.

This means only the numeric or string value. Not the timestamp, not the severity and status.

Parameters:
how - Detail on how to format.
precision - Might be used by some format types to select for example the number of digits after the decimal point. A precision of '-1' might select the default-precision obtained from the MetaData.
Returns:
This Value's value as a string.
See Also:
#toString()

format

java.lang.String format()
Format the value via the Default format. Typically this means: using the meta data.

Returns:
This Value's value as a string.
See Also:
format(Format, int), #toString()