Package com.storedobject.iot
Class DataSet.LimitStatus
- 
Field SummaryFields inherited from class com.storedobject.iot.DataSet.DataStatusalarmAt
- 
Method SummaryModifier and TypeMethodDescriptionintalarm()Evaluates the current value against predefined limits and returns an alarm status based on the value range.getValue()Retrieves the value associated with this instance.Retrieves the value definition associated with the current limit status.Provides a textual representation of the current status based on the alarm level.unit()value()Provides the current value as a formatted string.value(double value, boolean showUnit) Formats a given numeric value into a string representation.Retrieves the formatted value of the specified attribute for the current status.Methods inherited from class com.storedobject.iot.DataSet.DataStatusalert, caption, dailyStatistics, display, equals, getAlarmAt, getAlarmMessage, getId, getUnit, hashCode, hourlyStatistics, label, monthlyStatistics, ordinality, significance, tooltip, weeklyStatistics, yearlyStatistics
- 
Method Details- 
getValueDefinitionRetrieves the value definition associated with the current limit status.- Overrides:
- getValueDefinitionin class- DataSet.DataStatus<Double>
- Returns:
- the ValueLimitobject representing the value definition specific to limit status.
 
- 
getValueRetrieves the value associated with this instance.- Specified by:
- getValuein class- DataSet.DataStatus<Double>
- Returns:
- the value as a Double
 
- 
alarmpublic int alarm()Evaluates the current value against predefined limits and returns an alarm status based on the value range.The method first checks whether the value is considered "unlimited". If so, it returns 0 to indicate no alarm. Otherwise, it compares the current value to specific threshold values provided by ValueLimit, determining the severity of the alarm as follows:- Returns 3 if the value exceeds or equals the highest or higher thresholds. - Returns 1 if the value exceeds or equals the high threshold. - Returns 0 if the value lies between the high and low thresholds. - Returns -1 if the value is below the low threshold but above the lower threshold. - Returns -2 if the value is below the lower threshold but above the lowest threshold. - Returns -3 if the value is below the lowest threshold. - Specified by:
- alarmin class- DataSet.DataStatus<Double>
- Returns:
- An integer representing the alarm level:
 0: No alarm for unlimited or normal range values, 3: Severe high-level alarm, 1: Low-level high alarm, -1: Low-level low alarm, -2: Moderate low-level alarm, -3: Critical low-level alarm.
 
- 
statusLabelProvides a textual representation of the current status based on the alarm level.- Specified by:
- statusLabelin class- DataSet.DataStatus<Double>
- Returns:
- A string representing the status label. Possible values are: "highest", "higher", "high", "normal", "low", "lower", or "lowest".
 
- 
valueProvides the current value as a formatted string. This method internally calls thevalue(double, boolean)method with the instance's default value and a flag to indicate whether the unit should be shown.- Specified by:
- valuein class- DataSet.DataStatus<Double>
- Returns:
- A string representation of the current value, potentially including the unit based on the internal configuration.
 
- 
valueFormats a given numeric value into a string representation. If the input value is not a finite number (e.g., infinity, NaN, or extreme double limits), it returns "N/A". Otherwise, the value is formatted based on the number of decimals defined in the associatedValueLimitand optionally includes a unit suffix.- Overrides:
- valuein class- DataSet.DataStatus<Double>
- Parameters:
- value- The numeric value to be formatted.
- showUnit- A boolean flag indicating whether the unit suffix should be included in the formatted string.
- Returns:
- A string representation of the value, formatted to the specified number of decimals and optionally including the unit suffix. Returns "N/A" for invalid values.
 
- 
valueRetrieves the formatted value of the specified attribute for the current status. If the attribute is null or empty, it falls back to the default value method. The method dynamically resolves and applies appropriate display logic for the attribute if not available in the cached custom functions.- Overrides:
- valuein class- DataSet.DataStatus<Double>
- Parameters:
- attribute- the name of the attribute whose value is to be retrieved. It can be null or empty, in which case the default value is returned.
- Returns:
- a string representing the formatted value of the specified attribute, or "None" if the corresponding value object is unavailable.
 
- 
unit
 
-