public Power(HanReader han) { PackageTime = han.getPackageTime(); MeterID = han.getString((int)Kamstrup.Kamstrup_List1.MeterID); MeterType = han.getString((int)Kamstrup.Kamstrup_List1.MeterType); ActiveImportPower = han.getInt((int)Kamstrup.Kamstrup_List1.ActiveImportPower); ActiveExportPower = han.getInt((int)Kamstrup.Kamstrup_List1.ActiveExportPower); ReactiveImportPower = han.getInt((int)Kamstrup.Kamstrup_List1.ReactiveImportPower); ReactiveExportPower = han.getInt((int)Kamstrup.Kamstrup_List1.ReactiveExportPower); CurrentL1 = han.getInt((int)Kamstrup.Kamstrup_List1.CurrentL1) / 100.0M; CurrentL2 = han.getInt((int)Kamstrup.Kamstrup_List1.CurrentL2) / 100.0M; CurrentL3 = han.getInt((int)Kamstrup.Kamstrup_List1.CurrentL3) / 100.0M; VoltageL1 = han.getInt((int)Kamstrup.Kamstrup_List1.VoltageL1); VoltageL2 = han.getInt((int)Kamstrup.Kamstrup_List1.VoltageL2); VoltageL3 = han.getInt((int)Kamstrup.Kamstrup_List1.VoltageL3); }
public Energy(HanReader han) { PackageTime = han.getTime((int)Kamstrup.Kamstrup_List2.MeterClock); MeterID = han.getString((int)Kamstrup.Kamstrup_List2.MeterID); MeterType = han.getString((int)Kamstrup.Kamstrup_List2.MeterType); ActiveImportPower = han.getInt((int)Kamstrup.Kamstrup_List2.ActiveImportPower); ActiveExportPower = han.getInt((int)Kamstrup.Kamstrup_List2.ActiveExportPower); ReactiveImportPower = han.getInt((int)Kamstrup.Kamstrup_List2.ReactiveImportPower); ReactiveExportPower = han.getInt((int)Kamstrup.Kamstrup_List2.ReactiveExportPower); CurrentL1 = han.getInt((int)Kamstrup.Kamstrup_List2.CurrentL1) / 100.0M; CurrentL2 = han.getInt((int)Kamstrup.Kamstrup_List2.CurrentL2) / 100.0M; CurrentL3 = han.getInt((int)Kamstrup.Kamstrup_List2.CurrentL3) / 100.0M; VoltageL1 = han.getInt((int)Kamstrup.Kamstrup_List2.VoltageL1); VoltageL2 = han.getInt((int)Kamstrup.Kamstrup_List2.VoltageL2); VoltageL3 = han.getInt((int)Kamstrup.Kamstrup_List2.VoltageL3); CumulativeActiveImportEnergy = han.getInt((int)Kamstrup.Kamstrup_List2.CumulativeActiveImportEnergy) / 100.0M;; CumulativeActiveExportEnergy = han.getInt((int)Kamstrup.Kamstrup_List2.CumulativeActiveExportEnergy) / 100.0M;; CumulativeReactiveImportEnergy = han.getInt((int)Kamstrup.Kamstrup_List2.CumulativeReactiveImportEnergy) / 100.0M; CumulativeReactiveExportEnergy = han.getInt((int)Kamstrup.Kamstrup_List2.CumulativeReactiveExportEnergy) / 100.0M; }