コード例 #1
0
 /// <summary>
 /// Disconnect.
 /// </summary>
 public void Disconnect()
 {
     if (Media != null && Client != null)
     {
         try
         {
             if (Trace > TraceLevel.Info)
             {
                 Console.WriteLine("Disconnecting from the meter.");
             }
             GXReplyData reply = new GXReplyData();
             ReadDLMSPacket(Client.DisconnectRequest(), reply);
         }
         catch
         {
         }
     }
 }
コード例 #2
0
ファイル: Driver.cs プロジェクト: matrixitUser/matrix-mx
 public byte[] DisconnectRequest()
 {
     byte[] data = client.DisconnectRequest(false);
     if (data == null)
     {
         return(null);
     }
     return(data);
 }
コード例 #3
0
 public void Close()
 {
     if (Media != null && Client != null)
     {
         try
         {
             Console.WriteLine("Disconnecting from the meter.");
             GXReplyData reply = new GXReplyData();
             ReadDLMSPacket(Client.DisconnectRequest(), reply);
             Media.Close();
         }
         catch
         {
         }
         Media  = null;
         Client = null;
     }
 }
コード例 #4
0
 byte[] DisconnectRequest()
 {
     byte[] data = client.DisconnectRequest();
     GXLogWriter.WriteLog("Disconnect request");
     return(data);
 }