package de.hottis.MeasurementCollector;

import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;

import org.openmuc.jmbus.DataRecord;

public class FinderOnePhasePowerMeter extends ADataParser {
	public FinderOnePhasePowerMeter(String name) {
		super(name);
	}
	
	public List<ADataObject> parse(LocalDateTime timestamp, List<DataRecord> dataRecords) {
		ArrayList<ADataObject> list = new ArrayList<ADataObject>();
		
		ElectricEnergyDataObject tdo = new ElectricEnergyDataObject(timestamp, name, 
				dataRecords.get(0).getScaledDataValue(), dataRecords.get(4).getScaledDataValue());
		list.add(tdo);
		
		return list;
	}
}
