public static void PopulateMeasurmentProperties(FTN.Measurement cimMeasurment, ResourceDescription rd, ImportHelper importHelper, TransformAndLoadReport report) { if ((cimMeasurment != null) && (rd != null)) { OMSConverter.PopulateIdentifiedObjectProperties(cimMeasurment, rd); if (cimMeasurment.DirectionHasValue) { rd.AddProperty(new Property(ModelCode.MEASUREMENT_DIRECTION, (short)cimMeasurment.Direction)); } if (cimMeasurment.MeasurementTypeHasValue) { rd.AddProperty(new Property(ModelCode.MEASUREMENT_TYPE, cimMeasurment.MeasurementType)); } if (cimMeasurment.UnitSymbolHasValue) { var unitSym = GetDMSUnitSymbol(cimMeasurment.UnitSymbol); rd.AddProperty(new Property(ModelCode.MEASUREMENT_UNITSYMB, (short)unitSym)); //rd.AddProperty(new Property(ModelCode.MEASUREMENT_UNITSYMB, (long)cimMeasurment.UnitSymbol)); //rd.AddProperty(new Property(ModelCode.MEASUREMENT_UNITSYMB, (short)cimMeasurment.UnitSymbol)); //rd.AddProperty(new Property(ModelCode.MEASUREMENT_UNITSYMB, cimMeasurment.UnitSymbol.ToString())); } if (cimMeasurment.PowerSystemResourceHasValue) { long gid = importHelper.GetMappedGID(cimMeasurment.PowerSystemResource.ID); if (gid < 0) { report.Report.Append("WARNING: Convert ").Append(cimMeasurment.GetType().ToString()).Append(" rdfID = \"").Append(cimMeasurment.ID); report.Report.Append("\" - Failed to set reference to TransformerWinding: rdfID \"").Append(cimMeasurment.PowerSystemResource.ID).AppendLine(" \" is not mapped to GID!"); } rd.AddProperty(new Property(ModelCode.MEASUREMENT_PSR, gid)); } } }
public static void PopulateMeasurementProperties(FTN.Measurement cimConductingEquipment, ResourceDescription rd, ImportHelper importHelper, TransformAndLoadReport report) { if ((cimConductingEquipment != null) && (rd != null)) { PowerTransformerConverter.PopulateIdentifiedObjectProperties(cimConductingEquipment, rd); if (cimConductingEquipment.ScadaAddressHasValue) { rd.AddProperty(new Property(ModelCode.MEASUREMENT_SCADA_ADDRESS, cimConductingEquipment.ScadaAddress)); } if (cimConductingEquipment.DirectionHasValue) { rd.AddProperty(new Property(ModelCode.MEASUREMENT_DIRECTION, (short)GetDMSDirection(cimConductingEquipment.Direction))); } if (cimConductingEquipment.MeasurementTypeHasValue) { rd.AddProperty(new Property(ModelCode.MEASUREMENT_TYPE, (short)GetDMSMeasurementType(cimConductingEquipment.MeasurementType))); } if (cimConductingEquipment.PowerSystemResourceHasValue) { long gid = importHelper.GetMappedGID(cimConductingEquipment.PowerSystemResource.ID); if (gid < 0) { report.Report.Append("WARNING: Convert ").Append(cimConductingEquipment.GetType().ToString()).Append(" rdfID = \"").Append(cimConductingEquipment.ID); report.Report.Append("\" - Failed to set reference to PowerSystemResource: rdfID \"").Append(cimConductingEquipment.PowerSystemResource.ID).AppendLine(" \" is not mapped to GID!"); } rd.AddProperty(new Property(ModelCode.MEASUREMENT_POWER_SYS_RESOURCE, gid)); } } }
public static void PopulateMeasurementProperties(FTN.Measurement cimMeasurement, ResourceDescription rd, ImportHelper importHelper, TransformAndLoadReport report) { if ((cimMeasurement != null) && (rd != null)) { PowerTransformerConverter.PopulateIdentifiedObjectProperties(cimMeasurement, rd); if (cimMeasurement.MeasurementTypeHasValue) { rd.AddProperty(new Property(ModelCode.MEASUREMENT_MEAS_TYPE, (short)GetDMSMeasurementType(cimMeasurement.MeasurementType))); } } }
public static void PopulateMeasurementProperties(FTN.Measurement cimMeasurement, ResourceDescription rd, ImportHelper importHelper, TransformAndLoadReport report) { if ((cimMeasurement != null) && (rd != null)) { SCADAConverter.PopulateIdentifiedObjectProperties(cimMeasurement, rd); if (cimMeasurement.PowerSystemResourceHasValue) { long gid = importHelper.GetMappedGID(cimMeasurement.PowerSystemResource.ID); if (gid < 0) { report.Report.Append("WARNING: Convert ").Append(cimMeasurement.GetType().ToString()).Append(" rdfID = \"").Append(cimMeasurement.ID); report.Report.Append("\" - Failed to set reference to PowerSystemResource: rdfID \"").Append(cimMeasurement.PowerSystemResource.ID).AppendLine(" \" is not mapped to GID!"); } rd.AddProperty(new Property(ModelCode.MEASUREMENT_PSR, gid)); } if (cimMeasurement.TerminalsHasValue) { long gid = importHelper.GetMappedGID(cimMeasurement.Terminals.ID); if (gid < 0) { report.Report.Append("WARNING: Convert ").Append(cimMeasurement.GetType().ToString()).Append(" rdfID = \"").Append(cimMeasurement.ID); report.Report.Append("\" - Failed to set reference to Terminal: rdfID \"").Append(cimMeasurement.Terminals.ID).AppendLine(" \" is not mapped to GID!"); } rd.AddProperty(new Property(ModelCode.MEASUREMENT_TERMINAL, gid)); } if (cimMeasurement.DirectionHasValue) { rd.AddProperty(new Property(ModelCode.MEASUREMENT_DIRECTION, (short)GetDMSSignalDirection((SignalDirection)cimMeasurement.Direction))); } if (cimMeasurement.MeasurementTypeHasValue) { rd.AddProperty(new Property(ModelCode.MEASUREMENT_MEASTYPE, (short)GetDMSMeasurementType((MeasurementType)cimMeasurement.MeasurementType))); } if (cimMeasurement.BaseAddressHasValue) { rd.AddProperty(new Property(ModelCode.MEASUREMENT_BASEADDR, cimMeasurement.BaseAddress)); } if (cimMeasurement.ObjectmRIDHasValue) { rd.AddProperty(new Property(ModelCode.MEASUREMENT_OBJMRID, cimMeasurement.ObjectmRID)); } if (cimMeasurement.TimeStampHasValue) { rd.AddProperty(new Property(ModelCode.MEASUREMENT_TIMESTAMP, cimMeasurement.TimeStamp)); } } }