use of com.infiniteautomation.mango.rest.v2.model.pointValue.quantize.DataPointStatisticsGenerator in project ma-modules-public by infiniteautomation.
the class PointValueTimeCsvWriter method writeMultiplePointStatsAtSameTime.
@Override
public void writeMultiplePointStatsAtSameTime(List<DataPointStatisticsGenerator> periodStats, long timestamp) throws IOException {
this.jgen.writeStartObject();
boolean first = true;
for (DataPointStatisticsGenerator gen : periodStats) {
if (info.isMultiplePointsPerArray()) {
writeEntry(gen, true, first);
} else {
throw new ShouldNeverHappenException("Implement me?");
}
first = false;
}
this.jgen.writeEndObject();
}
use of com.infiniteautomation.mango.rest.v2.model.pointValue.quantize.DataPointStatisticsGenerator in project ma-modules-public by infiniteautomation.
the class PointValueTimeJsonWriter method writeMultiplePointStatsAtSameTime.
/* (non-Javadoc)
* @see com.infiniteautomation.mango.rest.v2.model.pointValue.query.PointValueTimeWriter#writeMultipleStatsAsObject(java.util.List)
*/
@Override
public void writeMultiplePointStatsAtSameTime(List<DataPointStatisticsGenerator> periodStats, long timestamp) throws IOException {
this.jgen.writeStartObject();
if (info.fieldsContains(PointValueField.TIMESTAMP))
writeTimestamp(timestamp);
for (DataPointStatisticsGenerator gen : periodStats) {
if (info.isMultiplePointsPerArray()) {
DataPointVO vo = gen.getVo();
this.jgen.writeObjectFieldStart(vo.getXid());
writeEntry(gen, false, false);
this.jgen.writeEndObject();
} else {
throw new ShouldNeverHappenException("Implement me?");
}
}
this.jgen.writeEndObject();
}
Aggregations