public void configureConnection(ConnectionFactory connFactory, Properties connectionConfig) throws PositionException { if (connConfigd) { comm.disconnect(); comm = null; connConfigd = false; } try { comm = new SerialCommunicate(connFactory, connectionConfig); } catch (PositionException e) { throw (e); } connConfigd = true; }
public void disconnect() { if (connConfigd && comm != null) comm.disconnect(); }