final X10Code allLightsOff = new X10Code("A/17"); final X10Code dim = new X10Code("A/21"); final X10Code bright = new X10Code("A/22"); final X10Code porchLight = new X10Code("B/5"); void foo(Number rptCount) { cpuxa.xmitX10Rpt(dim, rptCount); } void run() { if (cpuxa.recvX10(allLightsOff)) { cpuxa.xmitX10Rpt(dim, 5); cpuxa.xmitX10Rpt(bright, 6); cpuxa.x10QuickOn(porchLight); } else cpuxa.x10QuickOff(porchLight); }