}
String[] parts = line.split(",");
System.out.println(line);
if (parts[0].equals("m")) {
// m,Camera|Actuator|Nozzle1|Nozzle2,x.xx,y.yy,z.zz,c.cc
Movable movable = Movable.valueOf(parts[1]);
double x = getDouble(parts[2]);
double y = getDouble(parts[3]);
double z = getDouble(parts[4]);
double c = getDouble(parts[5]);
machine.moveTo(movable, x, y, z, c);
out.print("ok\n");
}
else if (parts[0].equals("a")) {
// a,true|false
boolean on = parts[1].equals("true");
machine.actuate(on);
out.print("ok\n");
}
else if (parts[0].equals("p")) {
// m,Nozzle1|Nozzle2,true|false
Movable movable = Movable.valueOf(parts[1]);
boolean pick = parts[2].equals("true");
if (pick) {
machine.pick(movable);
}
else {