Beispiel #1
0
 /**
  * Close port. This method deletes event listener first, then closes the port
  *
  * @return If the operation is successfully completed, the method returns true, otherwise false
  * @throws SerialPortException
  */
 public boolean closePort() throws SerialPortException {
   checkPortOpened("closePort()");
   if (eventListenerAdded) {
     removeEventListener();
   }
   boolean returnValue = serialInterface.closePort(portHandle);
   if (returnValue) {
     maskAssigned = false;
     portOpened = false;
   }
   return returnValue;
 }