Пример #1
0
  /**
   * Sets the CD status.
   *
   * @param Status the new CD status
   */
  protected void setCDStatus(int Status) {
    if (status != Status) {
      this.status = Status;

      if (status == 300) {
        atmssMBox.send(new Msg("300", 3, "normal"));
      }

      if (Status == 301) {
        numOf500 = 0; // For demo only
      }

      if (status == 398) {
        shutdown();
      }

      if (status == 399) {
        atmssMBox.send(new Msg("399", 3, "out of service"));
        fatalHalt();
      }
    }
  }
Пример #2
0
  /* (non-Javadoc)
   * @see hwEmulators.EmulatorActions#restart()
   */
  @Override
  public void restart() {
    shutdown();
    long ms = new Random(new Date().getTime()).nextInt(1500) + 200; // 200 - 1700
    try {
      sleep(ms);
    } catch (InterruptedException e) {
    }
    setCDStatus(300);
    setUIEnable(true);
    atmssMBox.send(new Msg("Component Restarted", 3, "Restarted"));

    textArea.setText("");
  }