void logbook_CommandTimeout(object sender, CommandTimeoutEventArgs e)
 {
     log.Append("logbook_CommandTimeout", "Logbook Command Timeout");
     UpdateTextBoxInvoke(textBox1, String.Format("{0}", e.FailedCommand.name), logLines);
 }
        private void CommandTimedOut(Object o)
        {
            commandTimer.Dispose();
            waitingForResponse = false;

            if (responseReceived == false)
            {
                CommandTimeoutEventArgs e = new CommandTimeoutEventArgs(currentCommand, InputBuffer());
                OnCommandTimeout(e);
                inputBuffer.Clear();
            }
        }
 // The protected OnCommandResult method raises the event by invoking
 // the delegates. The sender is always this, the current instance
 // of the class.
 protected virtual void OnCommandTimeout(CommandTimeoutEventArgs e)
 {
     if (CommandTimeout != null)
     {
         // Invokes the delegates.
         CommandTimeout(this, e);
         sendNextCommand();
     }
 }
Esempio n. 4
0
 private void logbook_CommandTimeout(object o, CommandTimeoutEventArgs ev)
 {
     log.Append("logbook_CommandTimeout", String.Format("Error: Logbook didn't respond to {0}", ev.FailedCommand.name));
      log.Append("logbook_CommandTimeout", Encoding.ASCII.GetString(ev.FailedResponse, 0, ev.FailedResponse.Length));
      if (runningMode == RunningModes.Started)
      {
     if (ev.FailedCommand.Equals(Logbook.Command.ReadASCII))
     {
        ReadASCIICommandFailed(false);
     }
      }
 }
Esempio n. 5
0
 // The protected OnCommandResult method raises the event by invoking
 // the delegates. The sender is always this, the current instance
 // of the class.
 protected virtual void FireOnCommandTimeout(CommandTimeoutEventArgs e)
 {
     if (CommandTimeout != null)
     {
         // Invokes the delegates.
         CommandTimeout(this, e);
         if (disconnectAfterResult)
         {
             ClosePort();
             FireOnDisconnected();
         }
         else
         {
             commandQWait.Set();
         }
     }
 }
 void logbook_CommandTimeout(object sender, CommandTimeoutEventArgs e)
 {
     if (e.FailedCommand == Logbook.Command.ReadASCII)
      {
     UpdateLabel(testReadingLabel, "Timed out");
      }
      if (e.FailedCommand == Logbook.Command.InputPowerOn)
      {
     UpdateLabel(identifyLabel, "Power on Timed out");
      }
      if (e.FailedCommand == Logbook.Command.IdentifySensors)
      {
     UpdateLabel(identifyLabel, "Identify Timed out");
      }
      if (e.FailedCommand == Logbook.Command.GetSensorRanges)
      {
     UpdateLabel(identifyLabel, "Get Range Timed out");
      }
 }