X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.history%2Fsrc%2Forg%2Fsimantics%2Fhistory%2FHistoryItem.java;fp=bundles%2Forg.simantics.history%2Fsrc%2Forg%2Fsimantics%2Fhistory%2FHistoryItem.java;h=0c48308e813c0ec745aabc7549ea51064a8e8ada;hb=969bd23cab98a79ca9101af33334000879fb60c5;hp=0000000000000000000000000000000000000000;hpb=866dba5cd5a3929bbeae85991796acb212338a08;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.history/src/org/simantics/history/HistoryItem.java b/bundles/org.simantics.history/src/org/simantics/history/HistoryItem.java new file mode 100644 index 000000000..0c48308e8 --- /dev/null +++ b/bundles/org.simantics.history/src/org/simantics/history/HistoryItem.java @@ -0,0 +1,47 @@ +package org.simantics.history; + +import org.simantics.databoard.annotations.Identifier; +import org.simantics.databoard.type.Datatype; +import org.simantics.databoard.util.Bean; + +/** + * (Utility Class) Item format for HistoryItem. + * + * @author toni.kalajainen@semantum.fi + */ +public class HistoryItem extends Bean.Id { + + /** + * Unique identifier of the item. + */ + public @Identifier String id; + + /** + * Describes the format of the packed sample. The sample must be a record. + * The record must have any combination of the following named fields. + * The field types must one of: byte, integer, long, float, double. + * + * time, endTime, value - are mandatory fields. + * + * time - Region start time, the time of the 1st sample included into the band + * endTime - Region end time, the time of the last sample included into the band + * + * value - First value in the band + * lastValue - Last value in the band + * avg - Average value of all included samples + * median - Median value of all samples in the band + * min - Lowest value in the band + * max - Highest value in the band + * + * quality - 0 = Good, -1 = No value + * count - The number of included samples in the band + */ + public Datatype format; + + public HistoryItem(String id, Datatype format) { + super(); + this.id = id; + this.format = format; + } + +}