Class TimestampedValue

java.lang.Object
neqsim.process.streaming.TimestampedValue
All Implemented Interfaces:
Serializable

public class TimestampedValue extends Object implements 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:
  • Field Details

  • Constructor Details

    • TimestampedValue

      public TimestampedValue(double value, String unit)
      Creates a new timestamped value with current time and GOOD quality.
      Parameters:
      value - the numeric value
      unit - the engineering unit
    • TimestampedValue

      public TimestampedValue(double value, String unit, Instant timestamp)
      Creates a new timestamped value with specified timestamp and GOOD quality.
      Parameters:
      value - the numeric value
      unit - the engineering unit
      timestamp - the timestamp
    • TimestampedValue

      public TimestampedValue(double value, String unit, Instant timestamp, TimestampedValue.Quality quality)
      Creates a new timestamped value with all parameters.
      Parameters:
      value - the numeric value
      unit - the engineering unit
      timestamp - the timestamp
      quality - the quality indicator
  • Method Details

    • getValue

      public double getValue()
      Gets the numeric value.
      Returns:
      the value
    • getUnit

      public String getUnit()
      Gets the engineering unit.
      Returns:
      the unit string
    • getTimestamp

      public Instant getTimestamp()
      Gets the timestamp.
      Returns:
      the timestamp
    • getQuality

      public TimestampedValue.Quality getQuality()
      Gets the quality indicator.
      Returns:
      the quality
    • 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

      public static TimestampedValue simulated(double value, String unit)
      Creates a new TimestampedValue marked as simulated.
      Parameters:
      value - the numeric value
      unit - the engineering unit
      Returns:
      a new TimestampedValue with SIMULATED quality
    • toString

      public String toString()
      Overrides:
      toString in class Object