Exemplo n.º 1
0
 private void sendHeartBeat()
 {
     try
     {
         //Byte[] bytes = new Byte[1];
         //bytes[0] = ENQ;
         //stream.Write(bytes, 0, bytes.Length);
         SendCadCommand(stream, CADHelpers.GetSeq(), "ENQ");
         lastHBSent = DateTime.Now.ToString("MM/dd/yyyy hh:mm:ss");
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.Message);
     }
 }
Exemplo n.º 2
0
 private void sendAck()
 {
     try
     {
         //Byte[] bytes = new Byte[1];
         //bytes[0] = ACK;
         //stream.Write(bytes, 0, bytes.Length);
         SendCadCommand(stream, CADHelpers.GetSeq(), "ACK");
     }
     catch (Exception ex)
     {
         //throw new Exception("ERROR Acking CAD: " + ex.Message);
         string err = ex.ToString();
     }
 }
Exemplo n.º 3
0
 public void sendMessage(string command)
 {
     if (ConnectStatus())
     {
         if (command.ToUpper() == "ACK")
         {
             sendAck();
             //return "ACKED";
         }
         else
         {
             SendCadCommand(stream, CADHelpers.GetSeq(), command);
             //return ret;
         }
     }
 }