Пример #1
0
  /**
   * Overriding the parent class behavior, this sends this simulator's current output message to the
   * server, rather than to other local simulators or coordinators.
   */
  public void sendMessages() {
    // if this simulator's output message is non-empty
    if (!output.isEmpty()) {
      // send the output message to the server
      client.sendMessageToServer(output.toString());

      // clear the output message
      output = new message();
    }
  }
Пример #2
0
 /** remove coupling dynamically use : to seperate the addCouplingSymbol, src, p1, dest, and p2 */
 public void removeDistributedCoupling(String src, String p1, String dest, String p2) {
   String dcc = Constants.removeCouplingSymbol + ":" + src + ":" + p1 + ":" + dest + ":" + p2;
   System.out.println("RTCoupledSimulatorClient remove Coupling---" + dcc);
   client.sendMessageToServer(dcc);
 }