try { final ResourceManager rm = (ResourceManager) InitialNaming.lookup(ResourceManager.NAME); port = rm.claimIOResource(getDevice(), basePort, 8); configure(BAUD9600); getDevice().registerAPI(SerialPortAPI.class, this); } catch (NameNotFoundException nnfex) { throw new DriverException(nnfex); } catch (ResourceNotFreeException rnfex) { throw new DriverException(rnfex); } }
try { final ResourceManager rm = (ResourceManager) InitialNaming .lookup(ResourceManager.NAME); port = claimPorts(rm, getDevice(), basePort, 8); configure(BAUD9600); getDevice().registerAPI(SerialPortAPI.class, this); } catch (NameNotFoundException nnfex) { throw new DriverException(nnfex); } catch (ResourceNotFreeException rnfex) { throw new DriverException(rnfex); } }
	protected void startDevice() throws DriverException {		try {			final ResourceManager rm = (ResourceManager) InitialNaming.lookup(ResourceManager.NAME);			port = rm.claimIOResource(getDevice(), basePort, 8);			configure(BAUD9600);			getDevice().registerAPI(SerialPortAPI.class, this);		} catch (NameNotFoundException nnfex) {			throw new DriverException(nnfex);		} catch (ResourceNotFreeException rnfex) {			throw new DriverException(rnfex);		}	}