public synchronized IndividualAddress[] readAddress(boolean oneAddressOnly)
		throws KNXTimeoutException, KNXRemoteException, KNXLinkClosedException
	{
		final List l = new ArrayList();
		try {
			svcResponse = IND_ADDR_RESPONSE;
			tl.broadcast(false, Priority.SYSTEM, DataUnitBuilder.createCompactAPDU(
				IND_ADDR_READ, null));
			long wait = responseTimeout * 1000;
			final long end = System.currentTimeMillis() + wait;
			while (wait > 0) {
				l.add(new IndividualAddress(waitForResponse(0, 0, wait)));
				if (oneAddressOnly)
					break;
				wait = end - System.currentTimeMillis();
			}
		}
		catch (final KNXTimeoutException e) {
			if (l.isEmpty())
				throw e;
		}
		finally {
			svcResponse = 0;
		}
		return (IndividualAddress[]) l.toArray(new IndividualAddress[l.size()]);
	}
public synchronized IndividualAddress [ ] readAddress ( boolean oneAddressOnly ) throws KNXTimeoutException , KNXRemoteException , KNXLinkClosedException { final List l = new ArrayList ( ) ; try { svcResponse = IND_ADDR_RESPONSE ; tl . broadcast ( false , Priority . SYSTEM , DataUnitBuilder . createCompactAPDU ( IND_ADDR_READ , null ) ) ; long wait = responseTimeout * 1000 ; final long end = System . currentTimeMillis ( ) + wait ; while ( wait > 0 ) { l . add ( new IndividualAddress ( waitForResponse ( 0 , 0 , wait ) ) ) ; if ( oneAddressOnly ) break ; wait = end - System . currentTimeMillis ( ) ; } } catch ( final KNXTimeoutException e ) { if ( l . isEmpty ( ) ) throw e ; } finally { svcResponse = 0 ; } return ( IndividualAddress [ ] ) l . toArray ( new IndividualAddress [ l . size ( ) ] ) ; }
/* (non-Javadoc)
@see tuwien.auto.calimero.mgmt.ManagementClient#readAddress(boolean)