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

            if (responseReceived == false)
            {
                CommandTimeoutEventArgs e = new CommandTimeoutEventArgs(currentCommand, InputBuffer());
                OnCommandTimeout(e);
                inputBuffer.Clear();
            }
        }
예제 #3
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 OnCommandTimeout(CommandTimeoutEventArgs e)
 {
     if (CommandTimeout != null)
     {
         // Invokes the delegates.
         CommandTimeout(this, e);
         sendNextCommand();
     }
 }
예제 #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);
     }
      }
 }
예제 #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();
         }
     }
 }
예제 #6
0
 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");
      }
 }