Package org.eso.ias.plugin
Class ValueToSend
java.lang.Object
org.eso.ias.plugin.filter.FilteredValue
org.eso.ias.plugin.ValueToSend
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 Summary
Modifier and TypeFieldDescriptionfinal boolean
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.final IasValidity
The validityfinal String
The unique ID of the monitor pointfinal OperationalMode
The operational mode of the monitor point (it is overridden by the plugin operational mode, if set)Fields inherited from class org.eso.ias.plugin.filter.FilteredValue
filteredTimestamp, producedTimestamp, samples, value
-
Constructor Summary
ConstructorDescriptionValueToSend
(String id, Object value, List<Filter.EnrichedSample> samples, long monitoredSystemTimestamp, OperationalMode opMode, IasValidity iasValidity) ConstructorValueToSend
(String id, FilteredValue filteredValue, OperationalMode opMode, IasValidity actualValidity) Builds aValueToSend
from the passedFilteredValue
. -
Method Summary
Modifier and TypeMethodDescriptiontoString()
Builds and return a newValueToSend
with the assigned ID.withMode
(OperationalMode opMode) Builds and return a newValueToSend
with the assigned operational mode.
-
Field Details
-
id
The unique ID of the monitor point -
operationalMode
The operational mode of the monitor point (it is overridden by the plugin operational mode, if set) -
degraded
public final boolean degradedThe 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
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 coresamples
- The history of samples used by the filter to produce the valuemonitoredSystemTimestamp
- The timestamp when the value has been provided by the monitored systemopMode
- The operational modeiasValidity
- The validity
-
ValueToSend
public ValueToSend(String id, FilteredValue filteredValue, OperationalMode opMode, IasValidity actualValidity) Builds aValueToSend
from the passedFilteredValue
.- Parameters:
id
- The ID of the valuefilteredValue
- The value produced applying the filteropMode
- The operational mode
-
-
Method Details
-
withMode
Builds and return a newValueToSend
with the assigned operational mode.- Parameters:
opMode
- The operational mode- Returns:
- The new value with the passed operational mode
-
withId
Builds and return a newValueToSend
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
- Overrides:
toString
in classFilteredValue
- See Also:
-