Close

If you finished the communication with a field device you should close the COM port.

The Close method returns a CloseResult.
[Test]
public void Usage()
{
  HartCommunicationLite communication = new HartCommunicationLite("COM1");

  OpenResult openResult = communication.Open();
  Assert.That(openResult, Is.EqualTo(OpenResult.Opened));

  CloseResult closeResult = communication.Close();
  Assert.That(closeResult, Is.EqualTo(CloseResult.Closed));
}

Last edited Feb 28, 2011 at 2:13 PM by schubertj, version 2

Comments

No comments yet.