@Override synchronized public void enableReceiveFraming(int arg0) throws UnsupportedCommOperationException { checkState(); throw new UnsupportedCommOperationException("receive framing not supported/implemented"); }
private void sendDataEvents(boolean read, boolean write) { if (read && m_NotifyOnDataAvailable && !m_DataAvailableNotified) { m_DataAvailableNotified = true; m_EventListener.serialEvent(new SerialPortEvent(this, SerialPortEvent.DATA_AVAILABLE, false, true)); } if (write && m_NotifyOnOutputEmpty && !m_OutputEmptyNotified) { m_OutputEmptyNotified = true; m_EventListener.serialEvent(new SerialPortEvent(this, SerialPortEvent.OUTPUT_BUFFER_EMPTY, false, true)); } }
@Override synchronized public boolean isRTS() { checkState(); return getControlLineState(TIOCM_RTS); }
@Override synchronized public void notifyOnDataAvailable(boolean x) { checkState(); m_NotifyOnDataAvailable = x; nudgePipe(); }
@Override synchronized public void notifyOnParityError(boolean x) { checkState(); m_NotifyOnParityError = x; }
/** * Closes the communications port. */ public void close() { CommPortIdentifier.close(this); }
private void checkState() { if (m_FD < 0) failWithIllegalStateException(); }
private void sendDataEvents(boolean read, boolean write) { if (read && m_NotifyOnDataAvailable && !m_DataAvailableNotified) { m_DataAvailableNotified = true; m_EventListener.serialEvent(new SerialPortEvent(this, SerialPortEvent.DATA_AVAILABLE, false, true)); } if (write && m_NotifyOnOutputEmpty && !m_OutputEmptyNotified) { m_OutputEmptyNotified = true; m_EventListener.serialEvent(new SerialPortEvent(this, SerialPortEvent.OUTPUT_BUFFER_EMPTY, false, true)); } }
@Override synchronized public void enableReceiveFraming(int arg0) throws UnsupportedCommOperationException { checkState(); throw new UnsupportedCommOperationException("receive framing not supported/implemented"); }
@Override synchronized public void notifyOnOutputEmpty(boolean x) { checkState(); m_NotifyOnOutputEmpty = x; nudgePipe(); }
@Override synchronized public boolean isCTS() { checkState(); return getControlLineState(TIOCM_CTS); }
@Override synchronized public int getReceiveTimeout() { checkState(); return m_ReceiveTimeoutValue; }
private void sendDataEvents(boolean read, boolean write) { if (read && m_NotifyOnDataAvailable && !m_DataAvailableNotified) { m_DataAvailableNotified = true; m_EventListener.serialEvent(new SerialPortEvent(this, SerialPortEvent.DATA_AVAILABLE, false, true)); } if (write && m_NotifyOnOutputEmpty && !m_OutputEmptyNotified) { m_OutputEmptyNotified = true; m_EventListener.serialEvent(new SerialPortEvent(this, SerialPortEvent.OUTPUT_BUFFER_EMPTY, false, true)); } }
@Override synchronized public void enableReceiveFraming(int arg0) throws UnsupportedCommOperationException { checkState(); throw new UnsupportedCommOperationException(); }
@Override synchronized public void notifyOnOutputEmpty(boolean x) { checkState(); m_NotifyOnOutputEmpty = x; nudgePipe(); }
@Override synchronized public int getFlowControlMode() { checkState(); return m_FlowControlMode; }
@Override synchronized public int getParity() { checkState(); return m_Parity; }
@Override synchronized public void notifyOnFramingError(boolean x) { checkState(); m_NotifyOnFramingError = x; }
@Override synchronized public void notifyOnParityError(boolean x) { checkState(); m_NotifyOnParityError = x; }
@Override synchronized public int getParity() { checkState(); return m_Parity; }