Framework Professional Edition Package


org.mbs.util.wireadmin
Class MeasurementEnvelope

java.lang.Object
  extended by java.lang.Number
      extended by org.mbs.util.wireadmin.Primitive
          extended by org.mbs.util.wireadmin.MeasurementEnvelope
All Implemented Interfaces:
java.io.Serializable, Envelope

public class MeasurementEnvelope
extends Primitive

Can be used for representing a value with an error, a unit and a time-stamp. The value and error are represented as doubles and the time is measured in milliseconds since midnight, January 1, 1970 UTC.

Author:
Krasimira Velikova
See Also:
Serialized Form

Field Summary
protected  double error
           
protected  double maxValue
           
protected  double minValue
           
protected  long time
           
protected  Unit unit
           
protected  double value
           
 
Fields inherited from class org.mbs.util.wireadmin.Primitive
BOOLEAN, BYTE, CHARACTER, DOUBLE, FLOAT, identification, INTEGER, LONG, scope, SHORT
 
Constructor Summary
MeasurementEnvelope(java.lang.String scope, java.lang.Object identification, double value, double minValue, double maxValue, double error, Unit unit, long time)
          Creates a new measurement envelope of type Primitive.DOUBLE
MeasurementEnvelope(java.lang.String scope, java.lang.Object identification, double value, double error, Unit unit)
          Creates a new measurement envelope of type Primitive.DOUBLE.
 
Method Summary
 double doubleValue()
          Returns the value of the specified state as a double.
 double getError()
          Retrieves the error state
 long getTime()
          Retrieves the creation time
 Unit getUnit()
          Retrieves the measurement unit
 double maxValue()
          Maximum allowed value
 double minValue()
          Minimum allowed value
 
Methods inherited from class org.mbs.util.wireadmin.Primitive
booleanValue, byteValue, charValue, floatValue, getIdentification, getScope, getType, getValue, intValue, longValue, shortValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

value

protected double value

minValue

protected double minValue

maxValue

protected double maxValue

error

protected double error

time

protected long time

unit

protected Unit unit
Constructor Detail

MeasurementEnvelope

public MeasurementEnvelope(java.lang.String scope,
                           java.lang.Object identification,
                           double value,
                           double error,
                           Unit unit)
Creates a new measurement envelope of type Primitive.DOUBLE. This constructor defines the default range from Double.MIN_VALUE to Double.MAX_VALUE and initializes the creation time to the current time.

Parameters:
scope - scope the scope of the primitive
identification - the identification
value - the value
error - an error state
unit - the measurement unit
See Also:
MeasurementEnvelope(String, Object, double, double, double, double, Unit, long)

MeasurementEnvelope

public MeasurementEnvelope(java.lang.String scope,
                           java.lang.Object identification,
                           double value,
                           double minValue,
                           double maxValue,
                           double error,
                           Unit unit,
                           long time)
Creates a new measurement envelope of type Primitive.DOUBLE

Parameters:
scope - scope the scope of the primitive
identification - the identification
value - the value
minValue - the minimum value
maxValue - the maximum allowed value
error - an error state
unit - the measurement unit
time - the creation time
See Also:
Primitive.Primitive(int, String, Object)
Method Detail

minValue

public double minValue()
Minimum allowed value

Returns:
the minimum allowed value

maxValue

public double maxValue()
Maximum allowed value

Returns:
the maximum allowed value

getError

public double getError()
Retrieves the error state

Returns:
the error state

getUnit

public Unit getUnit()
Retrieves the measurement unit

Returns:
the measurement unit

getTime

public long getTime()
Retrieves the creation time

Returns:
the creation time

doubleValue

public double doubleValue()
Description copied from class: Primitive
Returns the value of the specified state as a double.

Overrides:
doubleValue in class Primitive
See Also:
Primitive.doubleValue()

Framework Professional Edition Package


Copyright © 1999-2007 ProSyst Software GmbH. All Rights Reserved