コード例 #1
0
  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);
    }
  }
コード例 #2
0
 public ChassisProxy(int id, int replyMbx) {
   super(RackName.create(RackName.CHASSIS, id), replyMbx, 5000, 1000, 1000);
   this.id = id;
 }
コード例 #3
0
 public int getCommandMbx() {
   return (RackName.create(RackName.CHASSIS, id));
 }
コード例 #4
0
 public int getCommandMbx() {
   return (RackName.create(RackName.SCAN2D, id));
 }
コード例 #5
0
 public Scan2DProxy(int id, int replyMbx) {
   super(RackName.create(RackName.SCAN2D, id), replyMbx, 10000, 5000, 1000);
   this.id = id;
 }
コード例 #6
0
 public int getCommandMbx() {
   return (RackName.create(RackName.LADAR, id));
 }
コード例 #7
0
 public LadarProxy(int id, int replyMbx) {
   super(RackName.create(RackName.LADAR, id), replyMbx, 10000, 5000, 1000);
   this.id = id;
 }