public static void PopulateDiscreteProperties(FTN.Discrete cimDiscrete, ResourceDescription rd, ImportHelper importHelper, TransformAndLoadReport report) { if ((cimDiscrete != null) && (rd != null)) { OMSConverter.PopulateMeasurmentProperties(cimDiscrete, rd, importHelper, report); if (cimDiscrete.MinValueHasValue) { rd.AddProperty(new Property(ModelCode.DISCRETE_MINVAL, cimDiscrete.MinValue)); } if (cimDiscrete.MaxValueHasValue) { rd.AddProperty(new Property(ModelCode.DISCRETE_MAXVAL, cimDiscrete.MaxValue)); } if (cimDiscrete.NormalValueHasValue) { rd.AddProperty(new Property(ModelCode.DISCRETE_NORMVAL, cimDiscrete.NormalValue)); } if (cimDiscrete.ValidCommandsHasValue) { rd.AddProperty(new Property(ModelCode.DISCRETE_VALIDCOMMANDS, GetDMSCommand(cimDiscrete.ValidCommands))); } if (cimDiscrete.ValidStatesHasValue) { rd.AddProperty(new Property(ModelCode.DISCRETE_VALIDSTATES, GetDMSStates(cimDiscrete.ValidStates))); } } }
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 PopulateConnectivityNodeContainerProperties(FTN.ConnectivityNodeContainer cimConnNCon, ResourceDescription rd, ImportHelper importHelper, TransformAndLoadReport report) { if ((cimConnNCon != null) && (rd != null)) { OMSConverter.PopulatePowerSystemResourceProperties(cimConnNCon, rd, importHelper, report); } }
public static void PopulateConductingEquipmentProperties(FTN.ConductingEquipment cimConductingEquipment, ResourceDescription rd, ImportHelper importHelper, TransformAndLoadReport report) { if ((cimConductingEquipment != null) && (rd != null)) { OMSConverter.PopulateEquipmentProperties(cimConductingEquipment, rd, importHelper, report); } }
public static void PopulateACLineSegmentProperties(FTN.ACLineSegment cimACLineSeg, ResourceDescription rd, ImportHelper importHelper, TransformAndLoadReport report) { if ((cimACLineSeg != null) && (rd != null)) { OMSConverter.PopulateConductorProperties(cimACLineSeg, rd, importHelper, report); } }
public static void PopulateBreakerProperties(FTN.Breaker cimBreaker, ResourceDescription rd, ImportHelper importHelper, TransformAndLoadReport report) { if ((cimBreaker != null) && (rd != null)) { OMSConverter.PopulateProtectedSwitchProperties(cimBreaker, rd, importHelper, report); } }
public static void PopulatePowerSystemResourceProperties(FTN.PowerSystemResource cimPowerSystemResource, ResourceDescription rd, ImportHelper importHelper, TransformAndLoadReport report) { if ((cimPowerSystemResource != null) && (rd != null)) { OMSConverter.PopulateIdentifiedObjectProperties(cimPowerSystemResource, rd); } }
public static void PopulateTerminalProperties(FTN.Terminal cimTerminal, ResourceDescription rd, ImportHelper importHelper, TransformAndLoadReport report) { if ((cimTerminal != null) && (rd != null)) { OMSConverter.PopulateIdentifiedObjectProperties(cimTerminal, rd); if (cimTerminal.ConnectivityNodeHasValue) { long gid = importHelper.GetMappedGID(cimTerminal.ConnectivityNode.ID); if (gid < 0) { report.Report.Append("WARNING: Convert ").Append(cimTerminal.GetType().ToString()).Append(" rdfID = \"").Append(cimTerminal.ID); report.Report.Append("\" - Failed to set reference to TransformerWinding: rdfID \"").Append(cimTerminal.ConnectivityNode.ID).AppendLine(" \" is not mapped to GID!"); } rd.AddProperty(new Property(ModelCode.TERMINAL_CONNECTNODE, gid)); } if (cimTerminal.ConductingEquipmentHasValue) { long gid = importHelper.GetMappedGID(cimTerminal.ConductingEquipment.ID); if (gid < 0) { report.Report.Append("WARNING: Convert ").Append(cimTerminal.GetType().ToString()).Append(" rdfID = \"").Append(cimTerminal.ID); report.Report.Append("\" - Failed to set reference to TransformerWinding: rdfID \"").Append(cimTerminal.ConductingEquipment.ID).AppendLine(" \" is not mapped to GID!"); } rd.AddProperty(new Property(ModelCode.TERMINAL_CONDEQUIP, gid)); } } }
public static void PopulateEquipmentProperties(FTN.Equipment cimEquipment, ResourceDescription rd, ImportHelper importHelper, TransformAndLoadReport report) { if ((cimEquipment != null) && (rd != null)) { OMSConverter.PopulatePowerSystemResourceProperties(cimEquipment, rd, importHelper, report); if (cimEquipment.NormallyInServiceHasValue) { rd.AddProperty(new Property(ModelCode.EQUIPMENT_NORMINSERV, cimEquipment.NormallyInService)); } } }
public static void PopulateConductorProperties(FTN.Conductor cimConductor, ResourceDescription rd, ImportHelper importHelper, TransformAndLoadReport report) { if ((cimConductor != null) && (rd != null)) { OMSConverter.PopulateConductingEquipmentProperties(cimConductor, rd, importHelper, report); if (cimConductor.LengthHasValue) { rd.AddProperty(new Property(ModelCode.CONDUCTOR_LEN, cimConductor.Length)); } } }
private ResourceDescription CreateEnergyConsumerResourceDescription(FTN.EnergyConsumer cimEnergyConsumer) { ResourceDescription rd = null; if (cimEnergyConsumer != null) { long gid = ModelCodeHelper.CreateGlobalId(0, (short)DMSType.ENERGCONSUMER, importHelper.CheckOutIndexForDMSType(DMSType.ENERGCONSUMER)); rd = new ResourceDescription(gid); importHelper.DefineIDMapping(cimEnergyConsumer.ID, gid); ////populate ResourceDescription OMSConverter.PopulateEnergyConsumerProperties(cimEnergyConsumer, rd, importHelper, report); } return(rd); }
private ResourceDescription CreatecimAnalogResourceDescription(FTN.Analog cimAnalog) { ResourceDescription rd = null; if (cimAnalog != null) { long gid = ModelCodeHelper.CreateGlobalId(0, (short)DMSType.ANALOG, importHelper.CheckOutIndexForDMSType(DMSType.ANALOG)); rd = new ResourceDescription(gid); importHelper.DefineIDMapping(cimAnalog.ID, gid); ////populate ResourceDescription OMSConverter.PopulateAnalogProperties(cimAnalog, rd, importHelper, report); } return(rd); }
private ResourceDescription CreateDiscreteResourceDescription(FTN.Discrete cimDiscrete) { ResourceDescription rd = null; if (cimDiscrete != null) { long gid = ModelCodeHelper.CreateGlobalId(0, (short)DMSType.DISCRETE, importHelper.CheckOutIndexForDMSType(DMSType.DISCRETE)); rd = new ResourceDescription(gid); importHelper.DefineIDMapping(cimDiscrete.ID, gid); ////populate ResourceDescription OMSConverter.PopulateDiscreteProperties(cimDiscrete, rd, importHelper, report); } return(rd); }
private ResourceDescription CreateTerminalResourceDescription(FTN.Terminal cimTerminal) { ResourceDescription rd = null; if (cimTerminal != null) { long gid = ModelCodeHelper.CreateGlobalId(0, (short)DMSType.TERMINAL, importHelper.CheckOutIndexForDMSType(DMSType.TERMINAL)); rd = new ResourceDescription(gid); importHelper.DefineIDMapping(cimTerminal.ID, gid); ////populate ResourceDescription OMSConverter.PopulateTerminalProperties(cimTerminal, rd, importHelper, report); } return(rd); }
private ResourceDescription CreateBreakerResourceDescription(FTN.Breaker cimBreakerSegment) { ResourceDescription rd = null; if (cimBreakerSegment != null) { long gid = ModelCodeHelper.CreateGlobalId(0, (short)DMSType.BREAKER, importHelper.CheckOutIndexForDMSType(DMSType.BREAKER)); rd = new ResourceDescription(gid); importHelper.DefineIDMapping(cimBreakerSegment.ID, gid); ////populate ResourceDescription OMSConverter.PopulateBreakerProperties(cimBreakerSegment, rd, importHelper, report); } return(rd); }
private ResourceDescription CreateACLineSegResourceDescription(FTN.ACLineSegment cimACLineSegment) { ResourceDescription rd = null; if (cimACLineSegment != null) { long gid = ModelCodeHelper.CreateGlobalId(0, (short)DMSType.ACLINESEGMENT, importHelper.CheckOutIndexForDMSType(DMSType.ACLINESEGMENT)); rd = new ResourceDescription(gid); importHelper.DefineIDMapping(cimACLineSegment.ID, gid); ////populate ResourceDescription OMSConverter.PopulateACLineSegmentProperties(cimACLineSegment, rd, importHelper, report); } return(rd); }
private ResourceDescription CreateConnectNodeResourceDescriptionn(FTN.ConnectivityNode cimConnNode) { ResourceDescription rd = null; if (cimConnNode != null) { long gid = ModelCodeHelper.CreateGlobalId(0, (short)DMSType.CONNECTNODE, importHelper.CheckOutIndexForDMSType(DMSType.CONNECTNODE)); rd = new ResourceDescription(gid); importHelper.DefineIDMapping(cimConnNode.ID, gid); ////populate ResourceDescription OMSConverter.PopulateConnecttivityNodeProperties(cimConnNode, rd, importHelper, report); } return(rd); }
public static void PopulateEnergySourceProperties(FTN.EnergySource cimEnergySource, ResourceDescription rd, ImportHelper importHelper, TransformAndLoadReport report) { if ((cimEnergySource != null) && (rd != null)) { OMSConverter.PopulateConductingEquipmentProperties(cimEnergySource, rd, importHelper, report); if (cimEnergySource.ActivePowerHasValue) { rd.AddProperty(new Property(ModelCode.ENERGSOURCE_ACTPOW, cimEnergySource.ActivePower)); } if (cimEnergySource.NominalVoltageHasValue) { rd.AddProperty(new Property(ModelCode.ENERGSOURCE_NOMVOLT, cimEnergySource.NominalVoltage)); } } }
public static void PopulateEnergyConsumerProperties(FTN.EnergyConsumer cimEnergyConsumer, ResourceDescription rd, ImportHelper importHelper, TransformAndLoadReport report) { if ((cimEnergyConsumer != null) && (rd != null)) { OMSConverter.PopulateConductingEquipmentProperties(cimEnergyConsumer, rd, importHelper, report); if (cimEnergyConsumer.PfixedHasValue) { rd.AddProperty(new Property(ModelCode.ENERGCONSUMER_PFIXED, cimEnergyConsumer.Pfixed)); } if (cimEnergyConsumer.QfixedHasValue) { rd.AddProperty(new Property(ModelCode.ENERGCONSUMER_QFIXED, cimEnergyConsumer.Qfixed)); } } }
public static void PopulateConnecttivityNodeProperties(FTN.ConnectivityNode cimConnecNode, ResourceDescription rd, ImportHelper importHelper, TransformAndLoadReport report) { if ((cimConnecNode != null) && (rd != null)) { OMSConverter.PopulateIdentifiedObjectProperties(cimConnecNode, rd); if (cimConnecNode.ConnectivityNodeContainerHasValue) { long gid = importHelper.GetMappedGID(cimConnecNode.ConnectivityNodeContainer.ID); if (gid < 0) { report.Report.Append("WARNING: Convert ").Append(cimConnecNode.GetType().ToString()).Append(" rdfID = \"").Append(cimConnecNode.ID); report.Report.Append("\" - Failed to set reference to PowerTransformer: rdfID \"").Append(cimConnecNode.ConnectivityNodeContainer.ID).AppendLine(" \" is not mapped to GID!"); } rd.AddProperty(new Property(ModelCode.CONNECTNODE_CONNECTNODECONT, gid)); } } }
public static void PopulateAnalogProperties(FTN.Analog cimAnalog, ResourceDescription rd, ImportHelper importHelper, TransformAndLoadReport report) { if ((cimAnalog != null) && (rd != null)) { OMSConverter.PopulateMeasurmentProperties(cimAnalog, rd, importHelper, report); if (cimAnalog.MinValueHasValue) { rd.AddProperty(new Property(ModelCode.ANALOG_MINVAL, cimAnalog.MinValue)); } if (cimAnalog.MaxValueHasValue) { rd.AddProperty(new Property(ModelCode.ANALOG_MAXVAL, cimAnalog.MaxValue)); } if (cimAnalog.NormalValueHasValue) { rd.AddProperty(new Property(ModelCode.ANALOG_NORMVAL, cimAnalog.NormalValue)); } } }
public static void PopulateSwitchProperties(FTN.Switch cimSwitch, ResourceDescription rd, ImportHelper importHelper, TransformAndLoadReport report) { if ((cimSwitch != null) && (rd != null)) { OMSConverter.PopulateConductingEquipmentProperties(cimSwitch, rd, importHelper, report); if (cimSwitch.NormalOpenHasValue) { rd.AddProperty(new Property(ModelCode.SWITCH_NORMOPEN, cimSwitch.NormalOpen)); } if (cimSwitch.SwitchOnCountHasValue) { rd.AddProperty(new Property(ModelCode.SWITCH_ONCOUNT, cimSwitch.SwitchOnCount)); } if (cimSwitch.SwitchOnDateHasValue) { rd.AddProperty(new Property(ModelCode.SWITCH_ONDATE, cimSwitch.SwitchOnDate)); } } }