Package com.googlecode.grtframework.rpc

Examples of com.googlecode.grtframework.rpc.RPCMessage


        sensor.addBatteryVoltageListener(this);

    }

    public void batteryVoltageChanged(BatteryVoltageEvent ev) {
        System.out.println(new RPCMessage(key, ev.getVoltage()));
        connection.send(new RPCMessage(key, ev.getVoltage()));
    }
View Full Code Here


  private void notifyListeners(String received) {
    if (isTelemetryLine(received)) {
      // RPCMessage message = new RPCMessage(getKey(received),
      // getData(received));
      RPCMessage message = decode(received);
      // System.out.println(message);
      // TODO only notify specific 'keyed' listeners
      for (Enumeration e = listeners.elements(); e.hasMoreElements();) {
        ((RPCMessageListener) e.nextElement()).messageReceived(message);
      }
View Full Code Here

    // newline to flush all buffers
    return ("USB" + m.getKey() + ":" + m.getData() + "\n").getBytes();
  }

  private static RPCMessage decode(String received) {
    return new RPCMessage(getKey(received), getData(received));
  }
View Full Code Here

    private void notifyListeners(String received) {
        if (isTelemetryLine(received)) {
            // RPCMessage message = new RPCMessage(getKey(received),
            // getData(received));
            RPCMessage message = decode(received);
//             System.out.println(message);
            // TODO only notify specific 'keyed' listeners
            for (Enumeration e = listeners.elements(); e.hasMoreElements();) {
                ((RPCMessageListener) e.nextElement()).messageReceived(message);
            }
View Full Code Here

        // newline to flush all buffers
        return ("USB" + m.getKey() + ":" + m.getData() + "\n");
    }

    private static RPCMessage decode(String received) {
        return new RPCMessage(getKey(received), getData(received));
    }
View Full Code Here

    this.rpcKey = rpcKey;
  }

  @Override
  public void activate() {
    conn.send(new RPCMessage(rpcKey, DATA_ACTIVATED));
  }
View Full Code Here

    conn.send(new RPCMessage(rpcKey, DATA_ACTIVATED));
  }

  @Override
  public void deactivate() {
    conn.send(new RPCMessage(rpcKey, DATA_DEACTIVATED));
  }
View Full Code Here

TOP

Related Classes of com.googlecode.grtframework.rpc.RPCMessage

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.