/// <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 { } } }
public byte[] DisconnectRequest() { byte[] data = client.DisconnectRequest(false); if (data == null) { return(null); } return(data); }
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; } }
byte[] DisconnectRequest() { byte[] data = client.DisconnectRequest(); GXLogWriter.WriteLog("Disconnect request"); return(data); }