Package org.netxms.client.datacollection
Class DciDataRow
java.lang.Object
org.netxms.client.datacollection.DciDataRow
Single row in DCI data
-
Constructor Summary
ConstructorsConstructorDescriptionDciDataRow(Date timestamp, double min, double max) Create min/max-only band row (no average — produced by tier reads with function=MINMAX).DciDataRow(Date timestamp, double avg, double min, double max) Create aggregated data row with avg/min/max values.DciDataRow(Date timestamp, Object value) -
Method Summary
Modifier and TypeMethodDescriptiondoubleGet average value (only valid for aggregated rows).doubleGet maximum value (only valid for aggregated rows).doubleGet minimum value (only valid for aggregated rows).intGet the number of raw samples that contributed to this aggregated bucket.getValue()doublelongvoidinvert()Invert valuebooleanCheck if this row contains aggregated data.voidsetRawValue(String rawValue) Set raw valuevoidsetSampleCount(int sampleCount) Set sample count (used by NXCP parser).toString()
-
Constructor Details
-
DciDataRow
-
DciDataRow
Create aggregated data row with avg/min/max values.- Parameters:
timestamp- bucket timestampavg- average valuemin- minimum valuemax- maximum value
-
DciDataRow
Create min/max-only band row (no average — produced by tier reads with function=MINMAX). The primary value is set to the midpoint so charts that ignore min/max still render something sensible. Average value is set to NaN to signal that no avg was queried.- Parameters:
timestamp- bucket timestampmin- minimum valuemax- maximum value
-
-
Method Details
-
setRawValue
Set raw value- Parameters:
rawValue- new raw value
-
getTimestamp
- Returns:
- the timestamp
-
getValue
- Returns:
- the value
-
getValueAsString
- Returns:
- the value
-
getValueAsLong
public long getValueAsLong()- Returns:
- the value
-
getValueAsDouble
public double getValueAsDouble()- Returns:
- the value
-
getRawValue
- Returns:
- raw value
-
invert
public void invert()Invert value -
isAggregated
public boolean isAggregated()Check if this row contains aggregated data.- Returns:
- true if aggregated
-
getAvgValue
public double getAvgValue()Get average value (only valid for aggregated rows).- Returns:
- average value
-
getMinValue
public double getMinValue()Get minimum value (only valid for aggregated rows).- Returns:
- minimum value
-
getMaxValue
public double getMaxValue()Get maximum value (only valid for aggregated rows).- Returns:
- maximum value
-
getSampleCount
public int getSampleCount()Get the number of raw samples that contributed to this aggregated bucket. Set to 0 when the row is not from a tier read or when the server is older and does not include sample counts in the response.- Returns:
- sample count, or 0 if not available
-
setSampleCount
public void setSampleCount(int sampleCount) Set sample count (used by NXCP parser).- Parameters:
sampleCount- number of raw samples in the bucket
-
toString
-