Package com.neophob.sematrix.osc.model

Examples of com.neophob.sematrix.osc.model.OscMessage


   *
   * @param eol the eol
   * @return the payload
   */
  public OscMessage getPayload() {
    return new OscMessage("/"+command, parameter);
  }
View Full Code Here


  public abstract void handleOscMessage(OscMessage msg);
 
  @Override
  public void update(Observable o, Object arg) {
    if (arg instanceof OscMessage) {
      OscMessage msg = (OscMessage) arg;
      handleOscMessage(msg);
        } else {
          LOG.log(Level.WARNING, "Ignored notification of unknown type: "+arg);
        }
  }
View Full Code Here

      }
      args = new String[tmp.size()];
      args = tmp.toArray(args);
     
    }
    OscMessage msg = new OscMessage(m.getName(), args, blob);
    this.notifyOscClients(msg);   
  }
View Full Code Here

    final String param = "param234";
   
    OscServer srv1 = OscServerFactory.createServer(this, 8888, 4096);
    srv1.startServer();

    OscMessage msg = new OscMessage(msgName);
    OscClientFactory.sendOscMessage("127.0.0.1", 8888, msg);
    Thread.sleep(100);
    Assert.assertEquals(msgName, lastMsgHandler.getOscPattern());
   
    msg = new OscMessage(msgNameTwo, param);
    OscClientFactory.sendOscMessage("127.0.0.1", 8888, msg);
    Thread.sleep(100);
    Assert.assertEquals(msgNameTwo, lastMsgHandler.getOscPattern());
    Assert.assertEquals(param, lastMsgHandler.getArgs()[0]);

    OscClientFactory.disconnectOscClient();
    Thread.sleep(100);

    srv1.stopServer();

    //recreate a new server on a new port, test osc client
    srv1 = OscServerFactory.createServer(this, 8889, 4096);
    srv1.startServer();
   
    msg = new OscMessage(msgName3, param);
    OscClientFactory.sendOscMessage("127.0.0.1", 8889, msg);
    Thread.sleep(100);
    Assert.assertEquals(msgName3, lastMsgHandler.getOscPattern());
    Assert.assertEquals(param, lastMsgHandler.getArgs()[0]);
View Full Code Here

    super(handler, "127.0.0.1", 3333, 50000);   
  }
 
  @Override
  public void startServer() {
    this.notifyOscClients(new OscMessage("/HELLO"));
    this.notifyOscClients(new OscMessage("/HELLO", new byte[] {0,1,2}));
    this.notifyOscClients(new OscMessage("/HELLO", new String[] {"WORLD"}, new byte[] {0,1,2}));
    this.notifyOscClients(new OscMessage("/HELLO", "WORLD"));
  }
View Full Code Here

TOP

Related Classes of com.neophob.sematrix.osc.model.OscMessage

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.