Class ValueToSend


public class ValueToSend extends FilteredValue
The value to send to the core of the IAS.

The FilteredValue returns the value of the monitor point to send to the IAS after the filtering to avoid sending spurious values.

The ValueToSend adds more information not produced by the filtering, like the operational mode, the validity and the identifier.

ValueToSend is immutable.

Author:
acaproni
  • Field Details

    • id

      public final String id
      The unique ID of the monitor point
    • operationalMode

      public final OperationalMode operationalMode
      The operational mode of the monitor point (it is overridden by the plugin operational mode, if set)
    • degraded

      public final boolean degraded
      The value to send can be generated out of many samples that are all supposed to arrive before the refresh time elapses, where the refresh rate is the time the monitored system or the device produces a new value. If it is not the case the something went wrong because same sampling has been lost.
    • iasValidity

      public final IasValidity iasValidity
      The validity
  • Constructor Details

    • ValueToSend

      public ValueToSend(String id, Object value, List<Filter.EnrichedSample> samples, long monitoredSystemTimestamp, OperationalMode opMode, IasValidity iasValidity)
      Constructor
      Parameters:
      id - The ID of the value to send.
      value - The value to send to the IAS core
      samples - The history of samples used by the filter to produce the value
      monitoredSystemTimestamp - The timestamp when the value has been provided by the monitored system
      opMode - The operational mode
      iasValidity - The validity
    • ValueToSend

      public ValueToSend(String id, FilteredValue filteredValue, OperationalMode opMode, IasValidity actualValidity)
      Builds a ValueToSend from the passed FilteredValue.
      Parameters:
      id - The ID of the value
      filteredValue - The value produced applying the filter
      opMode - The operational mode
  • Method Details

    • withMode

      public ValueToSend withMode(OperationalMode opMode)
      Builds and return a new ValueToSend with the assigned operational mode.
      Parameters:
      opMode - The operational mode
      Returns:
      The new value with the passed operational mode
    • withId

      public ValueToSend withId(String newId)
      Builds and return a new ValueToSend with the assigned ID. This method supports replication that changes the ID before sending the value to the BSDB
      Parameters:
      newId - The new ID of the value to send to the BSDB
      Returns:
      A new value with the passed ID
    • toString

      public String toString()
      Overrides:
      toString in class FilteredValue
      See Also: