Package zephyropen.command

Examples of zephyropen.command.Command


    ApiFactory.getReference().add(this);

    last = System.currentTimeMillis();
   
    Command out = new Command(
        PrototypeFactory.getDeviceTypeString(deviceName));
   
    // do it
    run(out);
  }
View Full Code Here


    if (results.isEmpty()) {
      constants.info("no devices found");
      return;
    }

    Command devs = new Command(ZephyrOpen.discovery);
    devs.add(ZephyrOpen.address, local.getBluetoothAddress());
    devs.add(ZephyrOpen.deviceName, local.getFriendlyName());
   
    RemoteDevice target = null;
    Enumeration<RemoteDevice> list = results.elements();
    while (list.hasMoreElements()) {

      target = list.nextElement();
      try {

        devs.add(target.getFriendlyName(false), target.getBluetoothAddress());

      } catch (Exception e) {
        constants.error(e.getMessage());
      }
    }
   
    // share to group
    devs.send();
    constants.info( devs.toXML(), this);
  }
View Full Code Here

    private int bytesRead = 0;

    /** */
    public PolarDevice(String addr) {
        port = new PolarSerialPort(addr);
        command = new Command(PrototypeFactory.polar);
    }
View Full Code Here

  }

  /** send a "close" message */
  public void killDevice(String dev, String usr) {

    Command kill = new Command();
    kill.add(action, ZephyrOpen.kill);
    kill.add(user, usr);
    kill.add(deviceName, dev);
    kill.send();
    kill.send();

    info("sent: " + kill.toString(), this);
  }
View Full Code Here

            for(int c = 0 ; c < buffSize ; c++){
              data+= (char)buffer[c];
            }
                       
            String[] val = data.split(" : ");
            Command cmd = new Command(PrototypeFactory.elevation);
            cmd.add("back", val[0].trim());
            cmd.add("seat", val[1].trim());
            ///cmd.add(ZephyrOpen.user, System.getProperty("user.name", "brad"));
           
            // listeners
            cmd.send();
           
            // log
            String fin = System.currentTimeMillis() + " " + val[0].trim() + " " + val[1].trim();
            // System.out.println(fin);
            log.append(fin);
View Full Code Here

  }

  /** send a "close" message */
  public void closeServers() {

    Command kill = new Command();
    kill.add(action, ZephyrOpen.close);
    kill.send();
    kill.send();

    info("sent: " + kill.toString(), this);
  }
View Full Code Here

    if (!configured) {
      System.out.println("not configured, terminate.");
      System.exit(0);
    }

    Command command = new Command();
    command.add(action, shutdown);
    command.send();
    command.send();
    command.add(action, kill);
    command.send();
    command.send();
  }
View Full Code Here

   */
  public BioharnessDevice(String name) {

    port = new SearchSPP(name);

    command = new Command(PrototypeFactory.bioharness);

    command.add(ZephyrOpen.deviceName, name);

  }
View Full Code Here

   */
  public HrmDevice(String name) {
   
    port = new SearchSPP(name);

    command = new Command(PrototypeFactory.hrm);
   
    command.add(ZephyrOpen.deviceName, getDeviceName());
   
  }
View Full Code Here

  /** Constructor */
  private OSCChannel() {

    /** reuse command object */
    feedback = new Command(deviceName);

    try {

      /** construct the server socket */
      serverSocket = new DatagramSocket(port);
View Full Code Here

TOP

Related Classes of zephyropen.command.Command

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.