This project is read-only.

Command 0 is a special HART command, which is using the short address to receive the long address. The long address is required for all other commands. If AutomaticZeroCommand is set to true, it is not necessary to call the method SendZeroCommand. The method returns an object of type CommandResult.

public void Usage()
  HartCommunicationLite communication = new HartCommunicationLite("COM1");

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

  CommandResult commandResult = communication.SendZeroCommand();
  Assert.That(commandResult, Is.Not.Null);
  Assert.That(commandResult.CommandNumber, Is.EqualTo(0));
  Assert.That(commandResult.ResponseCode.FirstByte, Is.EqualTo(0));

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

Last edited Mar 14, 2011 at 4:26 PM by schubertj, version 5


No comments yet.