public synchronized void setActivePilot(int pilotMbx) {
    currentSequenceNo++;
    try {
      ChassisSetActivePilotMsg cmdMsg = new ChassisSetActivePilotMsg(pilotMbx);

      TimsMsgRouter.send(
          MSG_CHASSIS_SET_ACTIVE_PILOT, commandMbx, replyMbx, (byte) 0, currentSequenceNo, cmdMsg);

      TimsDataMsg reply;
      do {
        reply = TimsMsgRouter.receive(replyMbx, onTimeout);
      } while (reply.seq_nr != currentSequenceNo);

      if (reply.type == RackMsgType.MSG_OK) {
        System.out.println(
            RackName.nameString(replyMbx)
                + ": "
                + RackName.nameString(commandMbx)
                + ".setActivePilot");
      } else {
        System.out.println(
            RackName.nameString(replyMbx)
                + ": "
                + RackName.nameString(commandMbx)
                + ".setActivePilot replied error");
      }
    } catch (MsgException e) {
      System.out.println(
          RackName.nameString(replyMbx) + ": " + RackName.nameString(commandMbx) + ".on " + e);
    }
  }
 public ChassisProxy(int id, int replyMbx) {
   super(RackName.create(RackName.CHASSIS, id), replyMbx, 5000, 1000, 1000);
   this.id = id;
 }
 public int getCommandMbx() {
   return (RackName.create(RackName.CHASSIS, id));
 }
Esempio n. 4
0
 public int getCommandMbx() {
   return (RackName.create(RackName.SCAN2D, id));
 }
Esempio n. 5
0
 public Scan2DProxy(int id, int replyMbx) {
   super(RackName.create(RackName.SCAN2D, id), replyMbx, 10000, 5000, 1000);
   this.id = id;
 }
Esempio n. 6
0
 public int getCommandMbx() {
   return (RackName.create(RackName.LADAR, id));
 }
Esempio n. 7
0
 public LadarProxy(int id, int replyMbx) {
   super(RackName.create(RackName.LADAR, id), replyMbx, 10000, 5000, 1000);
   this.id = id;
 }