Esempio n. 1
0
 void IGXDLMSBase.Save(GXXmlWriter writer)
 {
     writer.WriteElementString("DataLinkLayerReference", DataLinkLayerReference, 2);
     writer.WriteElementString("IPAddress", IPAddress.ToString(), 3);
     writer.WriteStartElement("MulticastIPAddress", 4);
     if (MulticastIPAddress != null)
     {
         foreach (IPAddress it in MulticastIPAddress)
         {
             writer.WriteElementString("Value", it.ToString(), 4);
         }
     }
     writer.WriteEndElement();
     writer.WriteStartElement("IPOptions", 5);
     if (IPOptions != null)
     {
         foreach (GXDLMSIp4SetupIpOption it in IPOptions)
         {
             writer.WriteStartElement("IPOption", 5);
             writer.WriteElementString("Type", (int)it.Type, 5);
             writer.WriteElementString("Length", it.Length, 5);
             writer.WriteElementString("Data", GXDLMSTranslator.ToHex(it.Data), 5);
             writer.WriteEndElement();
         }
     }
     writer.WriteEndElement();
     writer.WriteElementString("SubnetMask", SubnetMask.ToString(), 6);
     writer.WriteElementString("GatewayIPAddress", GatewayIPAddress.ToString(), 7);
     writer.WriteElementString("UseDHCP", UseDHCP, 8);
     writer.WriteElementString("PrimaryDNSAddress", PrimaryDNSAddress.ToString(), 9);
     writer.WriteElementString("SecondaryDNSAddress", SecondaryDNSAddress.ToString(), 10);
 }
Esempio n. 2
0
 void IGXDLMSBase.Save(GXXmlWriter writer)
 {
     writer.WriteElementString("DataLinkLayerReference", DataLinkLayerReference);
     writer.WriteElementString("AddressConfigMode", (int)AddressConfigMode);
     SaveIPAddress(writer, UnicastIPAddress, "UnicastIPAddress");
     SaveIPAddress(writer, MulticastIPAddress, "MulticastIPAddress");
     SaveIPAddress(writer, GatewayIPAddress, "GatewayIPAddress");
     if (PrimaryDNSAddress != null)
     {
         writer.WriteElementString("PrimaryDNSAddress", PrimaryDNSAddress.ToString());
     }
     if (SecondaryDNSAddress != null)
     {
         writer.WriteElementString("SecondaryDNSAddress", SecondaryDNSAddress.ToString());
     }
     writer.WriteElementString("TrafficClass", TrafficClass);
     SaveNeighborDiscoverySetup(writer, NeighborDiscoverySetup, "NeighborDiscoverySetup");
 }