return;
}
String pattern = oscIn.getPattern();
ValidCommands command;
try {
command = ValidCommands.valueOf(pattern);
} catch (Exception e) {
LOG.log(Level.WARNING, "Unknown message: "+pattern, e);
return;
}
String[] msg = new String[1+command.getNrOfParams()];
msg[0] = pattern;
if (oscIn.getBlob()==null && command.getNrOfParams()>0 &&
command.getNrOfParams()!=oscIn.getArgs().length) {
String args = oscIn.getArgs()==null ? "null" : ""+oscIn.getArgs().length;
LOG.log(Level.WARNING, "Parameter cound missmatch, expected: {0} available: {1} ",
new String[]{""+command.getNrOfParams(), ""+args});
return;
}
//ignore nr of parameter for osc generator
if (command != ValidCommands.OSC_GENERATOR1 && command != ValidCommands.OSC_GENERATOR2) {
for (int i=0; i<command.getNrOfParams(); i++) {
msg[1+i] = oscIn.getArgs()[i];
}
}
LOG.log(Level.INFO, "Recieved OSC message: {0}", msg);