Class TimestampedValue
java.lang.Object
neqsim.process.streaming.TimestampedValue
- All Implemented Interfaces:
Serializable
Represents a value with an associated timestamp for real-time data streaming.
This class is designed for high-frequency data exchange with AI-based production optimization platforms and real-time digital twin systems.
- Version:
- 1.0
- Author:
- ESOL
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumQuality indicator for the measurement value. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final TimestampedValue.Qualityprivate static final longprivate final Instantprivate final Stringprivate final double -
Constructor Summary
ConstructorsConstructorDescriptionTimestampedValue(double value, String unit) Creates a new timestamped value with current time and GOOD quality.TimestampedValue(double value, String unit, Instant timestamp) Creates a new timestamped value with specified timestamp and GOOD quality.TimestampedValue(double value, String unit, Instant timestamp, TimestampedValue.Quality quality) Creates a new timestamped value with all parameters. -
Method Summary
Modifier and TypeMethodDescriptionGets the quality indicator.Gets the timestamp.getUnit()Gets the engineering unit.doublegetValue()Gets the numeric value.booleanisUsable()Checks if the value is usable (GOOD, SIMULATED, or ESTIMATED quality).static TimestampedValueCreates a new TimestampedValue marked as simulated.toString()
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
value
private final double value -
timestamp
-
unit
-
quality
-
-
Constructor Details
-
TimestampedValue
Creates a new timestamped value with current time and GOOD quality.- Parameters:
value- the numeric valueunit- the engineering unit
-
TimestampedValue
-
TimestampedValue
public TimestampedValue(double value, String unit, Instant timestamp, TimestampedValue.Quality quality) Creates a new timestamped value with all parameters.- Parameters:
value- the numeric valueunit- the engineering unittimestamp- the timestampquality- the quality indicator
-
-
Method Details
-
getValue
public double getValue()Gets the numeric value.- Returns:
- the value
-
getUnit
-
getTimestamp
-
getQuality
-
isUsable
public boolean isUsable()Checks if the value is usable (GOOD, SIMULATED, or ESTIMATED quality).- Returns:
- true if the value can be used for calculations
-
simulated
Creates a new TimestampedValue marked as simulated.- Parameters:
value- the numeric valueunit- the engineering unit- Returns:
- a new TimestampedValue with SIMULATED quality
-
toString
-