public static void main(String[] args) throws Exception { String source = null; if (args.length == 2) { if (!args[0].equals("-comm")) { usage(); System.exit(1); } source = args[1]; } else if (args.length != 0) { usage(); System.exit(1); } PhoenixSource phoenix; if (source == null) { phoenix = BuildSource.makePhoenix(PrintStreamMessenger.err); } else { phoenix = BuildSource.makePhoenix(source, PrintStreamMessenger.err); } MoteIF mif = new MoteIF(phoenix); TestSerial serial = new TestSerial(mif); serial.sendPackets(); }